[coreboot] cbfstool and initrd.cpio.xz
Trammell Hudson
hudson at trmm.net
Fri Mar 17 20:14:08 CET 2017
I was having a problem with adding compressed initrd images to my Linux
payload with cbfstool. What I noticed is that if I build my initrd.cpio
file and compress/link it into the bzImage via the Linux kernel's
.config file, the kernel starts up just fine and executes out of the
initrd. Likewise, if I have the coreboot .config bundle the bzImage and
an uncompressed initrd.cpio, then it also works, but produces an image
much too large for a real system. However, trying to have cbfstool
bundle initrd.cpio.xz would cause the kernel to panic.
Digging through the Linux kernel build scripts, I found that
linux/scripts/gen_initramfs_list.sh passes in some extra options to
compress the initrd.cpio file before linking it in. These options are
necessary for the kernel to be able to decompress the xz file:
xz \
--check=crc32 \
--lzma2=dict=1MiB \
--extreme \
< "$<" \
> "$@"
--
Trammell
More information about the coreboot
mailing list