Hello,
to get a fast boot time on my mainboard I want to stick a whole kernel-image into my flashchip.
The idea I want to realize is to have a kernel image in the Flash which has all drivers for my hardware compiled in. I don't want to have a busybox environment or an X-server in the flash, but just the kernel image.
Booting should look as follows: * Coreboot initialization * Payload Kernel Image (64bit) * (sysv)init or upstart from harddrive
Advantage: * Fast
Disadvantage: * needs to reflash/rebuild the bios every kernel update
What do I need except a kernel image which has all drivers compilled in? What needs to be done to get this setup working?
Kind regards, Harald
What do I need except a kernel image which has all drivers compilled in? What needs to be done to get this setup working?
Have you looked at buildrom? It has a Linux kernel payload option. If it's not exactly what you want it should at least provide some direction.
Thanks, Myles
Harald Gutmann wrote:
What do I need except a kernel image which has all drivers compilled in? What needs to be done to get this setup working?
Two ways:
1. Use mkelfImage to get a payload from vmlinux See http://www.coreboot.org/Mkelfimage for download info.
mkelfImage -t vmlinux-i386 --kernel=~/linux-version/vmlinux --output=~/linux.elf
~/linux.elf is your payload. Add ramdisk if you like.
2. Try using vmlinux as payload directly, it might work, we don't know
It would be interesting to know if vmlinux+initramfs works: http://www.coreboot.org/Initramfs
Note that you always want to use the uncompressed vmlinux to start with, and enable payload LZMA compression. LZMA compresses better than the in-kernel compression used for bzImage.
//Peter
On Wednesday 24 June 2009 17:54:51 Peter Stuge wrote:
Harald Gutmann wrote:
What do I need except a kernel image which has all drivers compilled in? What needs to be done to get this setup working?
Two ways:
- Use mkelfImage to get a payload from vmlinux See http://www.coreboot.org/Mkelfimage for download info.
mkelfImage -t vmlinux-i386 --kernel=~/linux-version/vmlinux --output=~/linux.elf
~/linux.elf is your payload. Add ramdisk if you like.
Good starting point, thanks!
- Try using vmlinux as payload directly, it might work, we don't know
It would be interesting to know if vmlinux+initramfs works: http://www.coreboot.org/Initramfs
Note that you always want to use the uncompressed vmlinux to start with, and enable payload LZMA compression. LZMA compresses better than the in-kernel compression used for bzImage.
Thanks, I think I would have missed that.
One open question: How do I pass the kernel cmd-line? Is it possible to set that on kernel compile time?
//Peter
Regards, Harald
On Wednesday 24 June 2009 18:12:33 Harald Gutmann wrote:
On Wednesday 24 June 2009 17:54:51 Peter Stuge wrote:
Harald Gutmann wrote:
What do I need except a kernel image which has all drivers compilled in? What needs to be done to get this setup working?
Two ways:
- Use mkelfImage to get a payload from vmlinux See http://www.coreboot.org/Mkelfimage for download info.
mkelfImage -t vmlinux-i386 --kernel=~/linux-version/vmlinux --output=~/linux.elf
~/linux.elf is your payload. Add ramdisk if you like.
Good starting point, thanks!
- Try using vmlinux as payload directly, it might work, we don't know
It would be interesting to know if vmlinux+initramfs works: http://www.coreboot.org/Initramfs
Note that you always want to use the uncompressed vmlinux to start with, and enable payload LZMA compression. LZMA compresses better than the in-kernel compression used for bzImage.
Thanks, I think I would have missed that.
One open question: How do I pass the kernel cmd-line? Is it possible to set that on kernel compile time?
CONFIG_CMDLINE_BOOL, "Built-in kernel command line" in "Processor type and features
(Sometimes it would be better to do a quick research before asking. ;))
//Peter
Regards, Harald
On K, 2009-06-24 at 17:54 +0200, Peter Stuge wrote:
Harald Gutmann wrote:
What do I need except a kernel image which has all drivers compilled in? What needs to be done to get this setup working?
Two ways:
- Use mkelfImage to get a payload from vmlinux See http://www.coreboot.org/Mkelfimage for download info.
mkelfImage -t vmlinux-i386 --kernel=~/linux-version/vmlinux --output=~/linux.elf
~/linux.elf is your payload. Add ramdisk if you like.
- Try using vmlinux as payload directly, it might work, we don't know
It would be interesting to know if vmlinux+initramfs works: http://www.coreboot.org/Initramfs
Note that you always want to use the uncompressed vmlinux to start with, and enable payload LZMA compression. LZMA compresses better than the in-kernel compression used for bzImage.
I suppose packing twice with LZMA would make no sense either? Having in mind that linux-2.6.30 supports LZMA for bzImage. So kernel code would be packed twice, and the highmem kernel loader in bzImage once for payload.
Waste of decompression time I bet myself without testing.
And thanks - good point about using vmlinux, I hadn't thought of that before reading this thread.
Regards, Mart Raudsepp