Submitter | Darren Hart |
---|---|
Date | 2011-06-20 22:19:24 |
Message ID | <4DFFC76C.60401@linux.intel.com> |
Download | mbox | patch |
Permalink | /patch/3185/ |
State | Rejected |
Headers | show |
Comments
Hi, You need to use our cross-compiler. Run 'make crossgcc' in the coreboot directory and you will get our reference toolchain compiled. Then run 'make' once again and everything should compile. I will try to fix the doc if this is missing from there. Cristi
Am Montag, den 20.06.2011, 15:19 -0700 schrieb Darren Hart: > I'm new to coreboot Welcome! > and just trying to get it to boot into qemu. I've > tried using SeaBios as well as just copying "yes" to payload.elf. I > updated the Makefile to use gcc 4.5 instead of the 4.4 that ships with > my distribution (Ubuntu 10.10): […] > src/arch/x86/coreboot_ram.ld:129 cannot move location counter backwards > (from 0000000000118000 to 0000000000004000) > collect2: ld returned 1 exit status > make: *** [build/coreboot_ram] Error 1 You should try the tested tool chain crossgcc [1]. make crossgcc which should be doing something similar as the following [2]. cd coreboot/util/crossgcc ./buildgcc cd ../.. rm -f .xcompile Thanks, Paul [1] http://patchwork.coreboot.org/patch/2964/ [2] http://www.taringa.net/comunidades/linuxeros-debian/2899363/[Tutorial]+Compilar+coreboot.html
Hi Darren, * Darren Hart <dvhart@linux.intel.com> [110621 00:19]: > I'm new to coreboot and just trying to get it to boot into qemu. I've > tried using SeaBios as well as just copying "yes" to payload.elf. I > updated the Makefile to use gcc 4.5 instead of the 4.4 that ships with > my distribution (Ubuntu 10.10): > Index: Makefile > =================================================================== > --- Makefile (revision 6637) > +++ Makefile (working copy) > @@ -64,7 +64,7 @@ > endif > endif > > -HOSTCC = gcc > +HOSTCC = gcc-4.5 > HOSTCXX = g++ > HOSTCFLAGS := -I$(srck) -I$(objk) -g > HOSTCXXFLAGS := -I$(srck) -I$(objk) This will only change the compiler used to compile your userland utilities. You need to change the script util/xcompile/xcompile to get the target compiler changed. (And possibly delete the file .xcompile in your coreboot directory before trying again) > CC coreboot_ram > src/arch/x86/coreboot_ram.ld:129 cannot move location counter backwards > (from 0000000000118000 to 0000000000004000) > collect2: ld returned 1 exit status > make: *** [build/coreboot_ram] Error 1 This is a common tool chain bug we hit mostly on Ubuntu based systems so far. (Maybe someone could open a bug report so they know about this breakage?) So far, the easiest way to get a known good toolchain is to build the coreboot reference toolchain. It should build out of the box on any Linux, MacOSX (with Xcode and MacPorts installed) and Windows (with MINGW or Cygwin installed) system. To build it, go to util/crossgcc in your coreboot tree and run the buildgcc script: $ ./buildgcc Then sit back and wait for a few minutes for the build to finish. The resulting toolchain will per default end up in util/crossgcc/xgcc and will be automatically picked up by the coreboot build system. Again, you should delete your coreboot/.xcompile file after making changes to the toolchain. Hope that helps, Stefan
Hi, I documented the latest developments (git and crossgcc) at http://www.coreboot.org/Build_HOWTO. Please someone double-check. Cristi
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 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 I get an option to press F12 in the console and select a boot device. Seems to work. Am I using coreboot? 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. 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?
Patch
Index: Makefile =================================================================== --- Makefile (revision 6637) +++ Makefile (working copy) @@ -64,7 +64,7 @@ endif endif -HOSTCC = gcc +HOSTCC = gcc-4.5 HOSTCXX = g++ HOSTCFLAGS := -I$(srck) -I$(objk) -g HOSTCXXFLAGS := -I$(srck) -I$(objk)