[U-Boot] Help with Cross-Compiling U-boot for PPC

Peter Barada peter.barada at logicpd.com
Thu Jan 5 16:31:01 CET 2012


On 01/04/2012 04:35 PM, Will Khan wrote:
> Hi all,
>
> My goal is to (simply) build u-boot to run on my target processor which is MPC8349.  My host environment where I will be building the u-boot is a SUSE linux system running on an intel x86 PC (therefore I will cross compile).  I have followed the instructions on the wiki and README file, and created a u-boot.bin file.  I after I load the u-boot.bin (with a BDI2000 debugger) and reset the device,  it produces random (garbage) text through the serial port.  It normally should produce a welcome message, etc..
>
> Here are my steps:
>
> I have downloaded the latest u-boot version and unpacked it: v2011.12-rc2
>
> Make distclean
> Make MPC8349EMDS_config
> CROSS_COMPILE=powerpc-linux-
> Export CROSSCOMPILE
> Make all
>
> (note that I derived the above commands from the README file in the u-boot directory (see sections at Line 274, line 3350)
>
> I believe my configuration of the BDI2000 debugger is correct as I've successfully loaded my older version of u-boot.bin (created by someone before me) many times with it and it worked.
>
> If there is an obvious step I am missing, or incorrect syntax, please let me know.
Yes, debug u-boot with GDB using the BDI...

Load youru-boot image in the BDI, set the PC to the entry point, then in
a shell, fire up your cross debugger via "powerpc-linux-gdb u-boot",
then in gdb, connect to your target via "target remote <abatron
IP>:2001" (where "<abatron ip>" is the hostname or IP address of your
Abatron), and you can then debug the code on the board.

I'd look at the UART initialisation to make sure the baud rate is
correct (i.e. do you have the proper cpu frequencies set, and the proper
derived UART divisor(s) for your desired baud rate)...

-- 
Peter Barada
peter.barada at logicpd.com



More information about the U-Boot mailing list