[coreboot] build failure: cannot move location counter backwards

Darren Hart dvhart at linux.intel.com
Wed Jun 22 06:17:24 CEST 2011



On 06/21/2011 08:34 PM, Kevin O'Connor wrote:
> On Mon, Jun 20, 2011 at 10:58:06PM -0700, Darren Hart wrote:
>> On 06/20/2011 04:09 PM, Cristian Măgherușan-Stanciu wrote:
>>> Hi,
>>>
>>> I documented the latest developments (git and crossgcc) at
>>> http://www.coreboot.org/Build_HOWTO. Please someone double-check.
>>
>> My build succeeded following these instructions. As a first-time user,
>> it would be helpful to have a quick-start guide which would be basically
>> this wiki page + the steps necessary to do boot what I built in qemu.
>> There are bits of that here:
>>
>> http://www.coreboot.org/QEMU
> 
> Unfortunately, it looks like that page has old information on it.
> 
>> So perhaps a link, although it is a bit unclear to me which bits of what
>> I built get used when I try to boot searbios in qemu. I don't seem to
>> need corebios.rom at all, just the seabios bios.bin:
>>
>> $ qemu -bios ./payloads/external/SeaBIOS/seabios/out/bios.bin -hda
>> /dev/zero -serial stdio
> 
> SeaBIOS ( http://seabios.org/ ) is now the default BIOS for both QEMU
> and KVM.  So, it is possible to run SeaBIOS without coreboot on these
> emulators.  SeaBIOS, however, can't initialize a real machine - that's
> what coreboot does.
> 
>> I get an option to press F12 in the console and select a boot device.
>> Seems to work.
>>
>> Am I using coreboot?
> 
> No.
> 
>> Is it integrated into the payload? Reading the
>> QEMU_Build_tutorial, http://www.coreboot.org/QEMU_Build_Tutorial, led me
>> to try:
>>
>> $ qemu -bios build/coreboot.rom -hda /dev/zero -serial stdio
>>
>> This resulted in something else entirely, the shell output terminating
>> in the following:
>>
>> coreboot memory table:
>>  0. 0000000000000000-0000000000000fff: CONFIGURATION TABLES
>>  1. 0000000000001000-000000000009ffff: RAM
>>  2. 00000000000c0000-0000000017feffff: RAM
>>  3. 0000000017ff0000-0000000017ffffff: CONFIGURATION TABLES
>>  4. 00000000ff800000-00000000ffffffff: RESERVED
>> Wrote coreboot table at: 17ff1400 - 17ff15c4  checksum 6c1c
>> coreboot table: 452 bytes.
>> Multiboot Information structure has been written.
>>  0. FREE SPACE 17ff3400 0000cc00
>>  1. GDT        17ff0200 00000200
>>  2. IRQ TABLE  17ff0400 00001000
>>  3. COREBOOT   17ff1400 00002000
>> Check CBFS header at fffcfc39
>> magic is 386f92fa
>> ERROR: No valid CBFS header found!
>> CBFS:  Could not find file fallback/payload
>> Boot failed.
> 
> You're now running coreboot, but coreboot was unable to find your
> payload (eg, SeaBIOS).  Make sure when you run coreboot's "make
> menuconfig", you set "Add a payload" to "SeaBIOS" - this is the
> fastest way to get up and running.

I did select SeaBIOS and watched the build fetch the sources for it and
build it:

$ find . -name "*bios*bin"
./payloads/external/SeaBIOS/seabios/out/bios.bin

So the payload was built. As I understood the build output, the SeaBIOS
binary was added to the 256K rom image, is that not correct?

Rebuilding results in:

Total size: 96832  Fixed: 55848  Free: 34240 (used 73.9% of 128KiB rom)
    CBFS       coreboot.rom
    PAYLOAD    SeaBIOS (internal, compression: LZMA)
    CBFSPRINT  coreboot.rom

coreboot.rom: 256 kB, bootblocksize 834, romsize 262144, offset 0x0
Alignment: 64 bytes

Name                           Offset     Type         Size
cmos_layout.bin                0x0        unknown      1159
fallback/romstage              0x4c0      stage        8120
fallback/coreboot_ram          0x24c0     stage        26045
fallback/payload               0x8ac0     payload      48906
(empty)                        0x14a40    null         176694


This suggests at least to me that the SeaBIOS payload was included into
coreboot.rom. Should I be able to boot this ROM in qemu and boot to
SeaBIOS ?

--
Darren

> 
>> It isn't clear to me from the various pages I've read which of the above
>> (if either) is the appropriate way to boot coreboot on qemu. Can anyone
>> clear that up for me?
> 
> Hope this helps.
> 
> -Kevin

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel




More information about the coreboot mailing list