Skip to content

Conversation

rarbab
Copy link
Collaborator

@rarbab rarbab commented Apr 11, 2025

We'd like to move to the kernel v6.1 series because it should be supported for the remaining service life of Mowgli.

Building the newer kernel requires a newer buildroot. And doing that brings in a newer GCC, so the rest of the patches here are just adjusting to those changes:

  • petitboot is upstream now. Remove the copy we were maintaining to fix the clash.
  • loadkeys and occ needed version bumps to build with the newer compiler.
  • Patches are requires to apply with no fuzz now, so one of ppe42-gcc's patches needed a tweak.

@op-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@rarbab rarbab force-pushed the mowgli/buildroot-2025.02-kernel-6.1 branch 2 times, most recently from 4958d02 to 71b4993 Compare April 21, 2025 18:18
rarbab and others added 7 commits April 21, 2025 16:39
Petitboot is now upstream in the base set of buildroot packages. Remove
it from the op-build br2-external tree, and remove things that are now
automatically selected by CONFIG_PACKAGE_PETITBOOT=y from the buildroot
config.

The udev rules pertaining to SCSI devices, software RAID devices,
and removable devices are not upstream. Move them to the overlay.

Also move petituser's dotfiles to the overlay, to retain the "root shell by
default" behavior from commit db6ca35 ("petitboot: Enable user
separation").

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
With the newer buildroot,

* Building for power8 is now the default for ppc64le
* GCC 8 is no longer available
* The default optimization level has changed from -Os to -O2

Adjust to these changes and normalize our configs by running

  openpower/scripts/update-defconfigs.sh \
	--disable BR2_GCC_VERSION_8_X \
	--enable BR2_OPTIMIZE_S

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Due to buildroot commit 8f88a644ed7d ("support/scripts/apply-patches.sh:
set the maximum fuzz factor to 0"), a couple of patches now fail to
apply. Adjust them to apply without any fuzz.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Signed-off-by: Trung Lê <8@tle.id.au>
(cherry picked from open-power/op-build commit dc572413d5cce95f760ab239cb4f0d5833656fe1)
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Related to open-power/occ#32

Signed-off-by: Trung Lê <8@tle.id.au>
(cherry picked from open-power/op-build commit 8959f9ea474fa56990dcee24fd387cddd039bf76)
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Update to the v6.1 LTS kernel series, which has a later end-of-life.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
@rarbab rarbab force-pushed the mowgli/buildroot-2025.02-kernel-6.1 branch from 71b4993 to 63a80ab Compare April 21, 2025 21:40
rarbab added 5 commits April 21, 2025 19:12
Of the ten upstream patches we were backporting to v5.10.108, only these
two are not present in v6.1.133:

  6fa6b796e037 tpm: tis_i2c: Add compatible string nuvoton,npct75x
  e5d76ae8822c tpm: Drop explicit initialization of struct i2c_device_id::driver_data to 0

Apply the patches individually, not squashed together like the ten were.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
These patches were eventually committed upstream after some slight
changes. Replace them with the finalized upstream patches verbatim.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
There is no difference between our custom device_table.txt and the
default one. Remove it to keep us in sync with buildroot updates going
forward.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
Cherry-pick the changes these buildroot commits made to /etc/fstab:

  8196b299ba12 ("skeleton: fix permissions on /dev/pts/ptmx")
  d380dde1d287 ("skeleton: make /run a proper directory/filesystem")

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
The inittab in our overlay is currently missing the changes from these
buildroot commits:

  22fde22e35f9 ("Create and mount /dev/shm")
  d39641ccd64b ("target/generic: inittab: fix devpts mounts when devtmpfs is used")
  bf01e51f3c62 ("skeleton + init: prepare /run/lock and adjust compat symlinks")
  d524cc7d9de5 ("busybox: add an inittab entry to activate swap")
  456ea9871ea0 ("busybox: add /dev/std{in, out, err} symlinks to inittab")
  fb4c041cfb6b ("inittab: disable reboot by ctrl-alt-del")

Our inittab is really just the buildroot default with every line
modified to suppress console output. To prevent us from getting out of
sync going forward, stop overlaying a new inittab and just use a
post-build script to modify whatever buildroot provides instead.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
@runlevel5
Copy link

@rarbab I ran into following error when compiling under Fedora 33:

rrors.xml ../../../../src/import/chips/ocmb/explorer/procedures/xml/error_info/exp_i2c_scom_errors.xml ../../../../src/import/chips/ocmb/explorer/procedures/xml/error_info/exp_inband_errors.xml ../../../../src/import/chips/ocmb/explorer/procedures/xml/error_info/exp_omi_init_errors.xml ../../../../src/import/chips/ocmb/explorer/procedures/xml/error_info/mss_exp_errors.xml ../../../../src/import/chips/p9a/procedures/xml/error_info/p9a_freq_errors.xml ../../../../src/import/chips/p9a/procedures/xml/error_info/p9a_omi_train_errors.xml ../../../../src/import/chips/ocmb/gemini/procedures/xml/error_info/gem_draminit_errors.xml ../../../../src/import/chips/ocmb/common/procedures/xml/error_info/pmic_errors.xml
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
    MAKE       test GEN
make[5]: *** [../../src/build/mkrules/passes.rules.mk:105: _BUILD/PASSES/GEN/POST] Error 2
make[4]: *** [../src/build/mkrules/passes.rules.mk:105: _BUILD/SUBDIR/GEN/usr] Error 2
make[3]: *** [../src/build/mkrules/passes.rules.mk:105: _BUILD/PASSES/GEN/POST] Error 2
make[2]: *** [src/build/mkrules/passes.rules.mk:106: _BUILD/SUBDIR/GEN/src] Error 2
make[1]: *** [src/build/mkrules/passes.rules.mk:105: _BUILD/PASSES/GEN/POST] Error 2
make[1]: Leaving directory '/home/tle/Work/ibm-op-build/output/build/hostboot-6301ece350c73bf0c42b60e601d5a01745823ef7'
make: *** [package/pkg-generic.mk:273: /home/tle/Work/ibm-op-build/output/build/hostboot-6301ece350c73bf0c42b60e601d5a01745823ef7/.stamp_built] Error 2
make: Leaving directory '/home/tle/Work/ibm-op-build/buildroot'

wondering if you happen to run into the same compilation issue?

@rarbab
Copy link
Collaborator Author

rarbab commented Jul 16, 2025

@rarbab I ran into following error when compiling under Fedora 33:

Fedora 33 is really old, that hasn't been supported in quite a while. I have built this PR on RHEL8. That's generally the priority because it's what the IBM builder machines for production firmware currently use.

Also, FYI, this branch of op-build (release-mowgli) is basically only used for mowgli_defconfig, it cherry-picks things from the main branch but otherwise I wouldn't be surprised if other defconfigs are broken.

@runlevel5
Copy link

@rarbab okay let me try to build it on RHEL 8 too

@runlevel5
Copy link

@rarbab is there any special setup with your RHEL8, there are lots of missing packages that requires for the op-build for example bison or flex. I tried to run op-build but did get not far, lots of errors related to python2.

Anyway, I tried Fedora 34 and got to the same big size image issue:

location = /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/hostboot_build_images/
Note: the following metrics are not a true representation of section utilization, since some sections are substantially padded before applying ECC
WOFDATA section size: 3145728, bytes used: 3142656, bytes unused: 3072
HCODE section size: 1179648, bytes used: 1179648, bytes unused: 0
HBEL section size: 147456, bytes used: 147456, bytes unused: 0
HBBL section size: 28672, bytes used: 27648, bytes unused: 1024
HBD section size: 1179648, bytes used: 1179648, bytes unused: 0
SBE section size: 770048, bytes used: 769536, bytes unused: 512
OCC section size: 1179648, bytes used: 1179648, bytes unused: 0
BOOTKERNEL section size: 19660800, bytes used: 39321600, bytes unused: -19660800
ERROR: PnorUtils::checkSpaceConstraints: Image provided (/home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//zImage.epapr) has size (39321600) which is greater than allocated space (19660800) for section=BOOTKERNEL.  Aborting! at /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/hostboot_build_images/PnorUtils.pm line 462.
Error running command: /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/hostboot_build_images//buildpnor.pl --pnorOutBin /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/pnor/blackbird.pnor --pnorLayout /home/tle/Work/op-build/output/build/openpower-pnor-3e9fa97dd8ac5e92de1e71178d41529e6ef9d9f1/p9Layouts/defaultPnorLayout_64.xml --editedLayoutLocation /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/hostboot_build_images/ --binFile_HBD /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//BLACKBIRD_HB.targeting.bin.ecc --binFile_SBE /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//nimbus_sbe.img.ecc --binFile_HBB /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//hostboot.header.bin.ecc --binFile_HBI /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//hostboot_extended.header.bin.ecc --binFile_HBRT /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//hostboot_runtime.header.bin.ecc --binFile_HBEL /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//hbel.bin.ecc --binFile_GUARD /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//guard.bin.ecc --binFile_PAYLOAD /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//skiboot.lid.xz --binFile_BOOTKERNEL /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//zImage.epapr --binFile_NVRAM /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//nvram.bin --binFile_ATTR_TMP /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//attr_tmp.bin.ecc --binFile_OCC /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/occ/occ.bin.ecc --binFile_ATTR_PERM /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//attr_perm.bin.ecc --binFile_FIRDATA /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//firdata.bin.ecc --binFile_CAPP /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//cappucode.bin.ecc --binFile_SECBOOT /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//secboot.bin.ecc --binFile_VERSION /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//openpower_pnor_version.bin --binFile_IMA_CATALOG /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//ima_catalog.bin.ecc --binFile_DJVPD /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//djvpd_fill.bin.ecc --binFile_CVPD /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//cvpd.bin.ecc --binFile_MVPD /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//mvpd_fill.bin.ecc --binFile_WOFDATA /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//wofdata.bin.ecc --binFile_MEMD /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//memd_extra_data.bin.ecc --binFile_SBKT /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//SBKT.bin --binFile_HCODE /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//p9n.ref_image.hdr.bin.ecc --binFile_HBBL /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//hbbl.bin.ecc --binFile_RINGOVD /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//ringOvd.bin --binFile_HB_VOLATILE /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/openpower_pnor_scratch//guard.bin.ecc --fpartCmd "fpart" --fcpCmd "fcp". Nonzero return code of (6400) returned.
make: *** [package/pkg-generic.mk:354: /home/tle/Work/op-build/output/build/openpower-pnor-3e9fa97dd8ac5e92de1e71178d41529e6ef9d9f1/.stamp_images_installed] Error 2
make: Leaving directory '/home/tle/Work/op-build/buildroot'

which I find interesting, could it be BR2_OPTIMIZE flag does not work?

@rarbab
Copy link
Collaborator Author

rarbab commented Jul 18, 2025

If you want to try op-build with kernel 6.1, I would recommend just cherry-picking commit 63a80ab to the master branch. Because while this release-mowgli branch is first in piloting kernel 6.1, as you're seeing, it is a service branch that is behind master in other ways. That said, if you want to get into the weeds on exactly why it fails to build for you...

@rarbab is there any special setup with your RHEL8, there are lots of missing packages that requires for the op-build for example bison or flex. I tried to run op-build but did get not far, lots of errors related to python2.

Might be good to specify that I am using RHEL8.10, but regardless, bison and flex should be available:

$ dnf list --installed bison flex
Installed Packages
bison.x86_64          3.0.4-10.el8           @rhel-8-for-x86_64-appstream-rpms
flex.x86_64           2.6.1-9.el8            @rhel-8-for-x86_64-appstream-rpms

I think release-mowgli is missing some fix (present in master) that requires python to be python3. You might need to use alternatives or tweak your path to ensure this.

Anyway, I tried Fedora 34 and got to the same big size image issue:

Not sure what's going on with this one. I'm sure BR2_OPTIMIZE_S is causing compilation to use -Os. I'd guess it's either again because this branch is missing something from master, or something to do with Fedora 34 ending 3 years ago.

@runlevel5
Copy link

@rarbab it's interesting to see that you are using x86_64 computer to do the cross compilation. Perhaps the issue of the oversized image might be due to the default settings that shipped with Fedora ppc64le.

Btw the reason I chose Fedora 34 because it was equivalent to RHEL 8.

I will experiment a bit more with my x86_64 to see if I could re-produce the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants