Hi there,
I'm a little confused by some of this email - at the start you seem to be asking about your "distribution" - I assume this is your operating system, and as a result I will answer that first part as far as I understand the question.
I think you are confusing a Linux payload loaded by Coreboot, and the kernel that your operating system uses. Coreboot has the ability to load various payloads, including SeaBIOS, GNU Grub2, Filo, and Linux (this is a non-exhaustive list, one should note). These are almost always loaded from the flash chip directly. See the following page for more information: https://www.coreboot.org/Payloads. What you will likely want is to load SeaBIOS, which can then load your operating system as usual.
As for creating a Linux payload, if you look in menuconfig, and select a Linux payload. You will see that you can specify a kernel binary, and an initrd optionally. The basic requirement is a valid bzImage. Optionally specifying an initrd environment allows us to boot this directly, which is very useful as a recovery environment.
Perhaps some others can answer your question about the last part. I wish you good luck.
-Duncan
On 05.05.2017 19:11, Healer64 via coreboot wrote:
I've looked through all the docs I can find on this, but there doesn't seem to be much available. Hopefully some of you can help answer my questions. My distribution includes a vmlinuz kernel. Do I need to compile a custom bzimage kernel or will the stock kernel suffice?
I am using lvm on a dmcrypted disk for the root filesystem. Presumably these binaries and helper scripts will be needed in the initrd. So far the only help I've seen on creating the initrd for the payload is Ron's email to this list where he says
"Your best bet is to do the standard trivial initramfs with a simple program: main(){printf("hin"); while (1);} Let's pretend it's called mymain.c cc -o mymain -static mymain.c put that in your prototype root file system with the name init. make sure you create /dev/console. Then bundle it all up with cpio and you've got an initramfs"
That seems to describe more of a shim than a true initrd. Also he mentions initramfs whereas menuconfig asks for initrd. Which is correct? I don't see any reference to filesystem drivers in Ron's email, but surely they are required to mount the root. I'm guessing this is a test example that is not intended to boot.
Can anyone provide help or instructions on an actual bootable initrd/initramfs? Can a pointer to the initramfs in /boot be used? What kind of size will it be? My rom is limited to 8Mb and the kernel is over 5Mb.
Sent with ProtonMail [1] Secure Email.
Links: