[U-Boot] debug uboot from ram for x86 board
Graeme Russ
graeme.russ at gmail.com
Thu Dec 25 12:36:56 CET 2008
On Thu, Dec 25, 2008 at 4:52 PM, LanceZ <Lance.Zhang at taihootech.com> wrote:
>
> Hi there,
>
> I am trying to add some codes(driver) to u boot, but I do not have jtag or
> other debugging tools. what I can use are :serial port/ethernet, so I can
> use tftp and loadb to download the bin to ram.
>
> Currently, I tried to use "loadb" to load the sample(hello_world) to ram and
> then execute it, I always failed .here are the output for my testing.
>
> I rename hello_world to rt61test
> then rebuild all uboot
> use nm command get follows:
>
> 00040000 T rt61test
> 00040098 T dummy
>
> then start my board
> In: serial
> Out: serial
> Err: serial
> Net: i82559#0
> boot > loadb 0x40000
> ## Ready for binary (kermit) download to 0x00040000 at 115200 bps...
> ## Start Addr = 0x00040000
> boot > go 40000
> ## Starting application at 0x00040000 ...
> Invalid Instruction at 0000:00000000
>
> I also tried other address for loadb(loadb 0x1000000)
>
> I got the same error result
>
> Appreciate anyone can give me a direction or explain the error
>
> Thanks
Hi Lance,
I have the same problem. I am in the process of finalising some other x86
common code to make the custom board port more seemless before I dig deeper.
I do, however, feel that a look at the nios code (lib_nios/board.c) might
shed some light on the issue. Specifically the comment in do_go_exec:
unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char *argv[])
{
/*
* x86 does not use a dedicated register to pass the pointer
* to the global_data
*/
argv[-1] = (char *)gd;
return entry (argc, argv);
}
I think the lib_i386 implementation of do_go_exec() is not right
Regards,
Graeme
More information about the U-Boot
mailing list