Hi,
You have to use mkelfImage to convert the bzImage to elf format. It's in the utils folder of coreboot.
John.
On 08/09/14 09:25, Werner Zeh wrote:
Hi. I try to use the linux kernel as payload in coreboot. I use a bzImage of the kernel. When I compile, I get the following message: OBJCOPY cpu/x86/smm/smm_wrap.ramstage.o CC generated/ramstage.o CC cbfs/fallback/ramstage.debug OBJCOPY cbfs/fallback/ramstage.elf CBFS coreboot.rom PAYLOAD ../bzImage (compression: none) E: The stage file is not in ELF format! CONFIG .config CBFSPRINT coreboot.rom coreboot.rom: 4096 kB, bootblocksize 848, romsize 4194304, offset 0x0 alignment: 64 bytes Name Offset Type Size fallback/romstage 0x0 stage 20906 fallback/ramstage 0x5200 stage 62994 fallback/payload 0x14880 payload 1392465 config 0x168840 raw 3366 (empty) 0x1695c0 null 2713240 Am I wrong assumimg that the image may be a real (compressed) bzImage? Should I use a vmlinuz better? Or is my bzImage is not suitable (maybe parts of it are compressed or so)? Thanks.
Am 08.09.2014 um 12:09 schrieb John Lewis:
You have to use mkelfImage to convert the bzImage to elf format. It's in the utils folder of coreboot.
No, you don't.
Patrick
On 08/09/14 12:40, John Lewis wrote:
On 08/09/14 12:37, Patrick Georgi wrote:
Am 08.09.2014 um 12:09 schrieb John Lewis:
You have to use mkelfImage to convert the bzImage to elf format. It's in the utils folder of coreboot.
No, you don't.
I meant "You can use", okay?
John.
And I was also thinking using it from within SeaBIOS, and didn't make the distinction.
As of last week, I am booting a bzimage+initramfs combination just fine. bzimage will be fine.
It's a good idea to set the command line args, and I recomment, for testing console=ttyS0,115200 earlyprintk=ttyS0,115200,keep
Your best bet is to do the standard trivial initramfs with a simple program: main(){printf("hi\n"); 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
I can start some notes on the wiki if you're still stuck.
ron
Am 08.09.2014 um 13:44 schrieb John Lewis:
No, you don't.
I meant "You can use", okay?
Sorry, my reply came across harsher than I intended..
And I was also thinking using it from within SeaBIOS, and didn't make the distinction.
Ah, okay. Please note that 3c12cb03847d2db41809ae434530782a7dbef48b fixes the issues that prevented the native linux payload feature from working with SeaBIOS.
Maybe we should retire mkelfImage. I'm actually amazed that it still works!
Patrick
I think it's time to retire mkelfImage and I can submit that patch now if we agree.
ron