I see a difference in the way 4.4 handles initrd images for linux payloads versus the way it is done in head. With 4.4 my Linux kernel can not find the external initrd, so it is necessary to build it as part of the kernel. With head it works fine.
It looks like 4.4 is adding the initrd as a separate section named "(empty)" with type "null" and the kernel can't find it:
performing operation on 'COREBOOT' region... Name Offset Type Size cbfs master header 0x0 cbfs header 32 cpu_microcode_blob.bin 0x80 microcode 22528 cmos.default 0x5900 cmos_default 256 cmos_layout.bin 0x5a40 cmos_layout 1948 fallback/dsdt.aml 0x6240 raw 13847 (empty) 0x98c0 null 26264 fallback/romstage 0xff80 stage 74020 (empty) 0x22140 null 56664 mrc.cache 0x2fec0 mrc_cache 65536 fallback/ramstage 0x3ff00 stage 84790 fallback/payload 0x54a80 payload 1618769 (empty) 0x1dfe40 null 2226328 bootblock 0x3ff700 bootblock 1952
While in head it is bundling them together into the payload region (3.9 MB == bzImage + initrd.img) -- the kernel can find the image and use it:
Performing operation on 'COREBOOT' region... Name Offset Type Size cbfs master header 0x0 cbfs header 32 fallback/romstage 0x80 stage 14620 cpu_microcode_blob.bin 0x3a00 microcode 22528 fallback/ramstage 0x9280 stage 43781 cmos_layout.bin 0x13dc0 cmos_layout 1948 fallback/dsdt.aml 0x145c0 raw 4021 fallback/payload 0x155c0 payload 3906169 (empty) 0x3cf080 null 199256 bootblock 0x3ffb00 bootblock 960
I don't see any changes in the util/cbfstool/cbfs-payload-linux.c file between these two versions. Is there something else that changed?
* Trammell Hudson hudson@trmm.net [160727 13:58]:
I see a difference in the way 4.4 handles initrd images for linux payloads versus the way it is done in head. With 4.4 my Linux kernel can not find the external initrd, so it is necessary to build it as part of the kernel. With head it works fine.
It looks like 4.4 is adding the initrd as a separate section named "(empty)" with type "null" and the kernel can't find it:
(empty) is indeed what it claims to be, empty space in the image. There is no initrd in there.
performing operation on 'COREBOOT' region... Name Offset Type Size cbfs master header 0x0 cbfs header 32 cpu_microcode_blob.bin 0x80 microcode 22528 cmos.default 0x5900 cmos_default 256 cmos_layout.bin 0x5a40 cmos_layout 1948 fallback/dsdt.aml 0x6240 raw 13847 (empty) 0x98c0 null 26264 fallback/romstage 0xff80 stage 74020 (empty) 0x22140 null 56664 mrc.cache 0x2fec0 mrc_cache 65536 fallback/ramstage 0x3ff00 stage 84790 fallback/payload 0x54a80 payload 1618769 (empty) 0x1dfe40 null 2226328 bootblock 0x3ff700 bootblock 1952
While in head it is bundling them together into the payload region (3.9 MB == bzImage + initrd.img) -- the kernel can find the image and use it:
Performing operation on 'COREBOOT' region... Name Offset Type Size cbfs master header 0x0 cbfs header 32 fallback/romstage 0x80 stage 14620 cpu_microcode_blob.bin 0x3a00 microcode 22528 fallback/ramstage 0x9280 stage 43781 cmos_layout.bin 0x13dc0 cmos_layout 1948 fallback/dsdt.aml 0x145c0 raw 4021 fallback/payload 0x155c0 payload 3906169 (empty) 0x3cf080 null 199256 bootblock 0x3ffb00 bootblock 960
I don't see any changes in the util/cbfstool/cbfs-payload-linux.c file between these two versions. Is there something else that changed?
It seems these two images are significantly different from each other, apart from the payload. Almost all the stages are about twice as big in the first image.
Did you compare the .config files for both images? Did you use the same compiler to produce them? Are these for the same mainboard? Which one?
Stefan
On Thu, Jul 28, 2016 at 10:04:56PM +0200, Stefan Reinauer wrote:
- Trammell Hudson hudson@trmm.net [160727 13:58]:
It looks like 4.4 is adding the initrd as a separate section named "(empty)" with type "null" and the kernel can't find it:
(empty) is indeed what it claims to be, empty space in the image. There is no initrd in there.
Ah, yes. I see that the (empty) space is the amount remaining from the end of the payload to the bootblock at the top of the ROM image.
So that then leads to the question, where is the initrd image when I build with coreboot-4.4 with the same .config file?
Building with head runs:
build/util/cbfstool/cbfstool build/coreboot.pre.tmp add-payload -f bzImage -n fallback/payload -t payload -c none -r COREBOOT -I "initrd.img"
While 4.4 executes:
build/util/cbfstool/cbfstool build/coreboot.pre.tmp add-payload -f ./bzImage -n fallback/payload -t payload -c none -r COREBOOT
Looks like the fix happened when the definition of $(CONFIG_CBFS_PREFIX)/payload-options was moved from ./Makefile.inc to ./payloads/external/Makefile.inc. In 4.4 the definition happens before ADDITIONAL_PAYLOAD_CONFIG is defined, so it will always be empty and initrd is ignored.