[coreboot] elf payload legacybios - boots on v3 in qemu

Myles Watson mylesgw at gmail.com
Mon May 12 20:38:20 CEST 2008

> -----Original Message-----
> From: coreboot-bounces+mylesgw=gmail.com at coreboot.org [mailto:coreboot-
> bounces+mylesgw=gmail.com at coreboot.org] On Behalf Of Kevin O'Connor
> Sent: Saturday, May 10, 2008 2:05 PM
> To: Coreboot
> Subject: [coreboot] elf payload legacybios - boots on v3 in qemu
> Hi,
> The latest git version of legacybios now supports building an elf
> payload.

I like the simplicity of your approach.  Very nice.

> Note that the payload likely wont work on real hardware - see my
> previous email on legacybios and coreboot.

Should we make an option to build just the 16-bit version of the BIOS.  It
seemed more forgiving on real hardware.  It seems like there is a lot more
that is board-specific in the 32-bit version.

BTW, have you listed the board-specific components anywhere?  I don't
remember seeing one.

1. Memory map
2. ACPI tables
3. Boot configuration settings (CMOS settings in Bochs)

It seems like it would be nice to be able to separate the board-specific
information into files that could be read in at build time.  It would also
be nice to be able to configure the boot order, etc.

Another way to go would be to go back to a loader/wrapper that would copy
the BIOS to the correct locations, and copy a memory map to the right spot.
This would fix the problem with the v2 build.


> To build, pull the latest legacybios from git (see
> http://git.linuxtogo.org ) and run make.  The resulting elf payload
> will be in out/bios.bin.elf.  I've also placed a payload (with serial
> debugging) at:
> http://linuxtogo.org/~kevin/legacybios/bios.bin.elf-20080510
> Unfortunately, the payload will not boot on coreboot-v2.  It seems v2
> will not let one load a binary into the 0xf0000 area:
> ==============================
> New segment addr 0xf0000 size 0x10000 offset 0x1000 filesize 0x10000
> (cleaned up) New segment addr 0xf0000 size 0x10000 offset 0x1000 filesize
> 0x10000
> No matching ram area found for range:
>   [0x00000000000f0000, 0x0000000000100000)
> Ram areas
>   [0x0000000000000000, 0x0000000000001000) Reserved
>   [0x0000000000001000, 0x00000000000f0000) RAM
>   [0x00000000000f0000, 0x0000000000100000) Reserved
>   [0x0000000000100000, 0x0000000008000000) RAM
> Can not load ELF Image.
> ==============================
> Some sample v3 messages:
> ==============================
> LAR: CHECK normal/payload/segment0 @ 0xfffc3e30
> start 0xfffc3e80 len 23167 reallen 65536 compression 1 entry 0x000f6c90
> loadaddress 0
> x000f0000
> LAR: Compression algorithm #1 (lzma) used
> LAR: Attempting to open 'normal/payload/segment1'.
> LAR: Start 0xfffc0000 len 0x40000
> LAR: seen member normal/option_table
> LAR: seen member normal/initram/segment0
> LAR: seen member normal/stage2/segment0
> LAR: seen member normal/stage2/segment1
> LAR: seen member normal/stage2/segment2
> LAR: seen member normal/payload/segment0
> LAR: seen member bootblock
> LAR: File not found!
> LAR: load_file: No such file 'normal/payload/segment1'
> LAR: load_file_segments: All loaded, entry 0x000f6c90
> Start bios
> BIOS - begin
> Starting rombios32
> ==============================
> -Kevin
> --
> coreboot mailing list
> coreboot at coreboot.org
> http://www.coreboot.org/mailman/listinfo/coreboot

More information about the coreboot mailing list