Hi everyone, I want to build coreboot and linux kernel as a payload. I just followed this wiki article: http://www.coreboot.org/QEMU_Build_Tutorial#Building_a_Linux_kernel_payload. My host system is ubuntu 8.04 on dell vostro 1400 notebook.
1. checkout the coreboot v2 r2405 2. download qemu 0.90 and apply the three patches 3. make linux kernel elf mkelfImage --append="console=ttyS0" --initrd=/boot/initrd.img /boot/vmlinuz linux.elf 4. building coreboot 4.1 Change payload in Confilg.lb to linux.elf 4.2 change option ROM_SIZE to 10*1024*1024 because linux.elf is about 9M. If ROM_SIZE is too small, coreboot will terminate with an error. So I change ROM_SIZE to 10M. 4.3 copy qemu-bios.rom to qemu directory and rename it to bios.bin. 5. build qemu 0.9.0 6. run qemu
Because I just want to run coreboot and linux payload, So I do not create hda img for qemu.
./qemu -L . -hda /dev/null -nographic -no-kqemu
Qemu exit with error message "qemu: could not load PC bios './bios.bin'"
I changed the BIOS_SIZE in vl.h to 11M and qemu did not work too.
#define BIOS_SIZE (10240+1024)*1024
But I download the coreboot and payload in http://www.coreboot.org/images/b/b9/Qemu_coreboot_filo.zip, it works.
I compare the bios.bin in Qemu_coreboot_filo.zip and the one I created. The one I crated is ELF 32-bit LSB executable and the one in Qemu_coreboot_filo.zip is data.
#file qemu-bios.rom qemu-bios.rom: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, corrupted section header size
#file qemu_coreboot_filo.bin qemu_coreboot_filo.bin: data
I think the qemu-bios.rom has wrong format and that is why qemu can not load bios.bin I created. I use objcopy -O binary to get data file of qemu-bios.rom but it outputs an empty file.
Any suggestions? How can I build coreboot and linux kernel as payload of qemu. Thanks.
------ yajin
Hi Yajin,
On Mon, Aug 11, 2008 at 09:25:09PM +0800, yajin wrote:
Hi everyone, I want to build coreboot and linux kernel as a payload. I just followed this wiki article: http://www.coreboot.org/QEMU_Build_Tutorial#Building_a_Linux_kernel_payload. My host system is ubuntu 8.04 on dell vostro 1400 notebook.
OK - try using the qemu that comes with ubuntu 8.04. It should work; at least it does for me. Our wiki is sadly out of date :/
Does that help?
If not, try using buildrom to generate your coreboot + kernel payload. If you want to use buildrom, use revision 209, or if you want to use the latest revision apply this patch before you build:
http://www.coreboot.org/pipermail/coreboot/2008-August/037380.html
That fixes kernel and LAB build in buildrom for revisions 210 and higher.
I hope to get that patch committed today.
Thanks, Ward.
Hi Ward, buildrom revision 209 works for me. Thanks very much.
---------------------- Thanks & Regards
yajin
Hi Yajin,
On Mon, Aug 11, 2008 at 09:25:09PM +0800, yajin wrote:
Hi everyone, I want to build coreboot and linux kernel as a payload. I just followed this wiki article: http://www.coreboot.org/QEMU_Build_Tutorial#Building_a_Linux_kernel_payload. My host system is ubuntu 8.04 on dell vostro 1400 notebook.
OK - try using the qemu that comes with ubuntu 8.04. It should work; at least it does for me. Our wiki is sadly out of date :/
Does that help?
If not, try using buildrom to generate your coreboot + kernel payload. If you want to use buildrom, use revision 209, or if you want to use the latest revision apply this patch before you build:
http://www.coreboot.org/pipermail/coreboot/2008-August/037380.html
That fixes kernel and LAB build in buildrom for revisions 210 and higher.
I hope to get that patch committed today.
Thanks, Ward.
On Mon, Aug 11, 2008 at 11:21:35PM +0800, yajin wrote:
Hi Ward, buildrom revision 209 works for me. Thanks very much.
Very good. You can now use the latest buildrom revision (219), that patch I send you the link to went in so kernel build is fixed.
Thanks, Ward.