open-power / pnor

Packaging scripts for flash images.
Apache License 2.0
4 stars 48 forks source link

Current BOOTKERNEL physical size is not enough to transition to GCC 11.3.0 + GLIBC 2.3.6 #159

Open runlevel5 opened 1 year ago

runlevel5 commented 1 year ago

My attempt to compile blackbird image with buildroot 2023.02 failed with following error:

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.

see log for more details

and

TRACE: Done checkSpaceConstraints
TRACE: createPnorPartition:: 0
TRACE: createPnorImg:: 0
TRACE: createPnorPartition:: 67072000
TRACE: createPnorImg:: 67072000
TRACE:  fpart --target /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/pnor/blackbird.pnor --partition-offset 67072000 --add --offset 0 --size 32768 --name BACKUP_PART --flags 0x0
TRACE:  fpart --target /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/pnor/blackbird.pnor --partition-offset 67072000 --user 1 --name BACKUP_PART --value 6291456 --force
TRACE:  fpart --target /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/pnor/blackbird.pnor --partition-offset 0 --add --offset 67072000 --size 32768 --name BACKUP_PART --flags 0x0
TRACE:  fpart --target /home/tle/Work/op-build/output/host/powerpc64le-buildroot-linux-gnu/sysroot/pnor/blackbird.pnor --partition-offset 0 --user 1 --name BACKUP_PART --value 6291456 --force
TRACE: fillPnorImage:: 67072000
fcp: errno : libffs.c(1165) : (code=27) __ffs_entry_truncate => File too large (errno=27)
fcp: errno : cmd_write.c(123) : (code=27) __write => File too large (errno=27)

So it's seems to me the physical size needs to get adjusted

IlyaSmirnov91 commented 1 year ago

@runlevel5 , have you tried adjusting the BOOTKERNEL size in p9Layouts/defaultPnorLayout_64.xml? How much of an increase do we need?

runlevel5 commented 1 year ago

@IlyaSmirnov91 I was poking into that approach but it is not the right way IMHO. I am trying to understand why the kernel image is 3MB bigger than that of compiled with GCC 9 or 8. Please bear with me as I am getting quite close to the answer