Skip to contentSkip to conversation

Compiling U-BOOT bootloader on x86

U-Boot Ravi Kant Tiwari 2 participants 4 messages May 4, 2013 – May 5, 2013

lore
Share & tools
lore
#0 lore raw

I have download and extracted u-boot-1.1.6 on Linux ubuntu. I just want to compile the source code using GCC(not targeting cross compilation for any embedded platform).

I tried running provided MAKEALL makefile but "powerpc-linux-gcc : Not Found" is happening.

My understanding is irrespective of platform the source code should compile.

What are the necessary makefile and environment changes i need to do for compilation on x86?

#1 lore raw

Dear Ravi Kant Tiwari,

Quoted 3 lines · In message <[email protected]> you wrote:

I have download and extracted u-boot-1.1.6 on Linux ubuntu. I just want to compile the source code using GCC(not targeting cross compilation for any embedded platform).

First: U-Boot 1.1.6 is prehistoric (more than 7 years old). If you intend to do anything with U-Boot, then please use recent code.

Quoted 1 line

My understanding is irrespective of platform the source code should compile.

Your understanding is incomplete / incorrect.

Quoted 2 lines

What are the necessary makefile and environment changes i need to do for compilation on x86?

No changes are needed, but dependingon which exact target board you are compiling for, you will need a cross tool chain for the respective target architecture.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
No journaling file system can recover your data if the disk dies.
                                 - Steve Rago in <[email protected]>
#2 lore raw

Dear Wolfgang,

Thank you very much . I have taken the *recent code*. Still facing some issues

I have followed following steps to compile it on x86.
1) make clean;
2) make coreboot-x86_config
3) ./MAKEALL -C x86

In step 3 i observed following:

ravitiwari at RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ make clean ravitiwari at RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ make coreboot-x86_config
Configuring for coreboot-x86 - Board: coreboot, Options:
SYS_TEXT_BASE=0x01110000
ravitiwari at RAVI-HP-Pavilion-dv2000-GJ175PA-ACJ:~/u-boot-2013.04$ ./MAKEALL -C x86
Configuring for coreboot-x86 - Board: coreboot, Options:
SYS_TEXT_BASE=0x01110000
make[1]: *** [interrupts.o] Error 127
make: *** [arch/x86/cpu/libx86.o] Error 2
make[1]: *** [coreboot.o] Error 127
make: *** [arch/x86/cpu/coreboot/libcoreboot.o] Error 2
make[1]: *** [bootm.o] Error 127
make: *** [arch/x86/lib/libx86.o] Error 2
size: './u-boot': No such file
/bin/bash: sparse: command not found
make[1]: *** [interrupts.o] Error 127
make: *** [arch/x86/cpu/libx86.o] Error 2
make: *** Waiting for unfinished jobs....
/bin/bash: sparse: command not found
make[1]: *** [coreboot.o] Error 127
make: *** [arch/x86/cpu/coreboot/libcoreboot.o] Error 2 /bin/bash: sparse: command not found
make[1]: *** [bootm.o] Error 127
make: *** [arch/x86/lib/libx86.o] Error 2
make: INTERNAL: Exiting with 4 jobserver tokens available; should be 3!

--------------------- SUMMARY ---------------------------- Boards compiled: 1
Boards with errors: 1 ( coreboot-x86 )
----------------------------------------------------------

If at present i am not targeting any embedded platform then why i need *cross tool chain*? x86 tool chain (GCC compiler) is already there in my system.

Regards,
Ravi Tiwari

Quoted 34 lines · Wolfgang Denk

Dear Ravi Kant Tiwari,

Quoted 1 line · In message <[email protected]> you wrote:

I have download and extracted u-boot-1.1.6 on Linux ubuntu. I just want

to

Quoted 2 lines

compile the source code using GCC(not targeting cross compilation for any embedded platform).

First: U-Boot 1.1.6 is prehistoric (more than 7 years old). If you intend to do anything with U-Boot, then please use recent code.

Quoted 1 line

My understanding is irrespective of platform the source code should

compile.

Your understanding is incomplete / incorrect.

Quoted 2 lines

What are the necessary makefile and environment changes i need to do for compilation on x86?

No changes are needed, but dependingon which exact target board you are compiling for, you will need a cross tool chain for the respective target architecture.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de No journaling file system can recover your data if the disk dies.
- Steve Rago in <[email protected]>

#3 lore raw

Dear ravi tiwari,

Quoted 5 lines · In message <CAEA1ePfrRnUH=reO4nsk3c3S4Sx1oVsVLNSFPqvrWzGXfLzCoA@mail.gmail.com>…

I have followed following steps to compile it on x86.
1) make clean;
2) make coreboot-x86_config
3) ./MAKEALL -C x86

This makes no sense. "MAKEALL" will as first thing run "make mrproper", which makes 1) redundant and undoes 2). If you want to compile for "coreboot-x86", then only "./MAKEALL coreboot-x86" is needed.

Quoted 4 lines

Configuring for coreboot-x86 - Board: coreboot, Options:
SYS_TEXT_BASE=0x01110000
make[1]: *** [interrupts.o] Error 127
make: *** [arch/x86/cpu/libx86.o] Error 2

I recommend to run plain "make" so you can see the actual error messages. Otherwise, check the log files in the LOG directory.

Quoted 1 line

/bin/bash: sparse: command not found

In any case, it seems you should install "sparse".

Quoted 1 line · Wolfgang Denk

And please: don't top post / full quote.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
He'd heard her use that sweet, innocent  tone  of  voice  before.  It
meant that, pretty soon, there was going to be trouble.
                                        - Terry Pratchett, _Truckers_