* [U-Boot] ARM926ejs Porting: uboot.lds problem
@ 2010-12-22 15:08 于会
2010-12-22 18:14 ` Albert ARIBAUD
0 siblings, 1 reply; 4+ messages in thread
From: 于会 @ 2010-12-22 15:08 UTC (permalink / raw)
To: u-boot
Hello,
Happy hacking in U-Boot, let's start quickly!
Here' s porting information below:
1. Porting arm926ejs SoC to our new SoC call "AVT2210"
2. Sdram base address: 0x40000000, size: 0x2000000(32M)
3. No flash now.
4. UART: Common 16550
5. U-Boot version: u-boot-2010.12-rc2
6. Linux OS
7. ELDK arm-linux-gcc toolchain
Here's code modified below:
1. #define CONFIG_SYS_TEXT_BASE 0x401E0000
2. #define CONFIG_SYS_INIT_SP_ADDR 0x401F0000
3. UART: use ns16550 serail driver.
After previous, U-Boot running on the target, I can see "U-Boot> ",
I typed "hlep"but problem when "find_cmd" function,
I got "Unknow command 'help' try 'help'".
I found errors in "&__u_boot_cmd_end - &__u_boot_cmd_start".
in the ${TOPDIR}/common/main.c: main_loop function:
if (len == -1)
puts ("<INTERRUPT>\n");
else
rc = run_command (lastcommand, flag);
gdb, 's' command to run_command
then 's' to find_command function as below:
cmd_tbl_t *find_cmd (const char *cmd)
{
int len = &__u_boot_cmd_end - &__u_boot_cmd_start;
return find_cmd_tbl(cmd, &__u_boot_cmd_start, len);
}
I 'p len', len is 0x00 !!!!!
' p &__u_boot_cmd_end - &__u_boot_cmd_start' is 30
&__u_boot_cmd_end is: 0x41e25bfc
&__u_boot_cmd_start is: 0x41e258b3
Oh, I God!
then call find_cmd_tbl function, as below:
cmd_tbl_t *find_cmd_tbl (const char *cmd, cmd_tbl_t *table, int table_len)
{
... ...
&table is also: 0x00
I have no idea!!!
I found
__u_boot_cmd_end, __u_boot_cmd_start
in ${TOPDIR}/arch/arm/cpu/arm926ejs/u-boot.lds
code as below:
. = .;
__u_boot_cmd_start = .;
.u_boot_cmd : { *(.u_boot_cmd) }
__u_boot_cmd_end = .;
. = ALIGN(4);
Help! Help! Thanks a lot.
Abraham Yu.
^ permalink raw reply [flat|nested] 4+ messages in thread* [U-Boot] ARM926ejs Porting: uboot.lds problem 2010-12-22 15:08 [U-Boot] ARM926ejs Porting: uboot.lds problem 于会 @ 2010-12-22 18:14 ` Albert ARIBAUD 2010-12-22 23:08 ` 于会 0 siblings, 1 reply; 4+ messages in thread From: Albert ARIBAUD @ 2010-12-22 18:14 UTC (permalink / raw) To: u-boot Le 22/12/2010 16:08, ???? a ??crit : > Help! Help! Thanks a lot. > > Abraham Yu. Hi Abraham, Without knowing the source code that you compile, it is hard to tell exactly what goes on. You say "code modified", but which board did you modify, and how exactly do you build it? A patch would be welcome to at least reproduce your build. Also, can you explain how exactly you get u-boot on the board if you don't have NOR? JTAG? Some other way? Amicalement, -- Albert. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] ARM926ejs Porting: uboot.lds problem 2010-12-22 18:14 ` Albert ARIBAUD @ 2010-12-22 23:08 ` 于会 2010-12-23 6:36 ` Albert ARIBAUD 0 siblings, 1 reply; 4+ messages in thread From: 于会 @ 2010-12-22 23:08 UTC (permalink / raw) To: u-boot Thanks Albert! >Without knowing the source code that you compile, it is hard to tell >exactly what goes on. You say "code modified", but which board did you >modify, and how exactly do you build it? A patch would be welcome to at >least reproduce your build. > >Also, can you explain how exactly you get u-boot on the board if you >don't have NOR? JTAG? Some other way? We have our own SoC, base on arm926ejs core, only ICache, DCache, and other APB, AHB, SRAM etc, base address different from other SoC, like davince, Marwell etc. What I porting, just reference to other arm926ejs board like atmel's at91cap9adk, but our board is a little different with it. First, I will run U-Boot from DRAM, no NOR or NAND, just use openocd to download U-Boot image to sdram base address: 0x40000000, and then execute it. Later, I will run from SPI NOR, Nand, MMC, SD etc. (How can code to u-boot main tree, Free as freedom) BTW, I didn't use any patches, where I get them? Thank you so much, ^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] ARM926ejs Porting: uboot.lds problem 2010-12-22 23:08 ` 于会 @ 2010-12-23 6:36 ` Albert ARIBAUD 0 siblings, 0 replies; 4+ messages in thread From: Albert ARIBAUD @ 2010-12-23 6:36 UTC (permalink / raw) To: u-boot Le 23/12/2010 00:08, ???? a ??crit : > Thanks Albert! > >Without knowing the source code that you compile, it is hard to tell > >exactly what goes on. You say "code modified", but which board did you > >modify, and how exactly do you build it? A patch would be welcome to at > >least reproduce your build. > > > >Also, can you explain how exactly you get u-boot on the board if you > >don't have NOR? JTAG? Some other way? > > We have our own SoC, base on arm926ejs core, only ICache, DCache, > and other APB, AHB, SRAM etc, base address different from other SoC, > like davince, Marwell etc. > What I porting, just reference to other arm926ejs board like atmel's > at91cap9adk, but our board is a little different with it. > First, I will run U-Boot from DRAM, no NOR or NAND, just use openocd > to download U-Boot image to sdram base address: 0x40000000, and > then execute it. > Later, I will run from SPI NOR, Nand, MMC, SD etc. > (How can code to u-boot main tree, Free as freedom) > BTW, I didn't use any patches, where I get them? I am not talking about patches that you should aply to u-boot; I am talking about turning the changes that you made to u-boot into patches and sending that to the list so that people (including me) can look at them and provide comments. Anyway, you will have to submit patches eventually if you want support for your SoC to be added to mainstream U-boot; the sooner you do this, the less work you will have overall to get the code accepted. If you cannot provide the source code, then I'm afraid there is not much I can do -- only you know what exact changes you did! I can only confirm what you already suspect, that your issue is certainly related to ELF relocation support in your SoC's code. > Thank you so much, No problem. Amicalement, -- Albert. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-23 6:36 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-12-22 15:08 [U-Boot] ARM926ejs Porting: uboot.lds problem 于会 2010-12-22 18:14 ` Albert ARIBAUD 2010-12-22 23:08 ` 于会 2010-12-23 6:36 ` Albert ARIBAUD
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox