What is u-boot relocation address?
Hi all,
What does CFG_LOAD_ADDR mean and how it differs from TEXT_BASE in config.mk?
Signature · 3 lines
Sincerely, Vladimir "Farcaller" Pouzanov http://hackndev.com
Quoted 3 lines · Vladimir Farcaller Pouzanov
Hi all,
What does
CFG_LOAD_ADDRmean and how it differs fromTEXT_BASEin config.mk?
find . -type f -print -exec grep CFG_LOAD_ADDR {} /dev/null \;
and a bit of work with a text editor will show you that CFG_LOAD_ADDR is used as a default argument to commands that load something into memory, like loadb, tftp, etc. This is usually somewhere in DRAM.
TEXT_BASE is the starting address that u-boot is built for usually in FLASH. Later u-boot moves itself up to the top of available memory.
Quoted 2 lines · Andrew Dyer
TEXT_BASEis the starting address that u-boot is built for usually in FLASH. Later u-boot moves itself up to the top of available memory.
Is it ok that TEXT_BASE of 0x0 leads to crash? Also U-boot seems to follow TEXT_BASE value after relocation:
TEXT_BASE = 0xA1000000:
U-Boot code: A1000000 -> A1016290 BSS: -> A1018948
TEXT_BASE = 0xA1700000:
U-Boot code: A1700000 -> A1716290 BSS: -> A1718948
Signature · 3 lines
Sincerely, Vladimir "Farcaller" Pouzanov http://hackndev.com
Quoted 2 lines · Vladimir "Farcaller" Pouzanov
Is it ok that
TEXT_BASEof0x0leads to crash? Also U-boot seems to followTEXT_BASEvalue after relocation:
Now I'm completely confused...
CFG_MONITOR_BASE is u-boot startting location before relocation? CFG_FLASH_BASE is the same?TEXT_BASE is... hm... (same as both constants above) 0x0? Doesn't work. And shouldn't work:
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
cmp r0, r1 /* don't reloc during debug */
beq stack_setup_start == 0 so is _TEXT_BASE, result = no relocation and crash....
Please help :(
Signature · 3 lines
Sincerely, Vladimir "Farcaller" Pouzanov http://hackndev.com
Quoted 3 lines · Vladimir "Farcaller" Pouzanov
Quoted 2 lines · Vladimir "Farcaller" Pouzanov
Is it ok that
TEXT_BASEof0x0leads to crash? Also U-boot seems to followTEXT_BASEvalue after relocation:
Seems that I've provided not enough information, so let's start from..hm.. beginning.
I'm trying to run u-boot on Palm Tungsten T3 handheld, PXA261 (ARM, same as PXA250+16Mb flash). It works ok when executed from native OS (TEXT_BASE=0xA1000000, u-boot.lds SECTION starts from 0xA1000000, u-boot is copied to 0xA1000000). But I have problems from running it as native bootloader from flash (0x0). I'm not sure how I should set all that configuration defines. It seems to boot if u-boot.lds SECTION starts from 0x00000000 (TEXT_BASE still the same), but there are random crashes in 'loady' and u-boot seems to freeze after ~30 sec. of serial inactivity.
Signature · 3 lines
Sincerely, Vladimir "Farcaller" Pouzanov http://hackndev.com
Quoted 2 lines · In message <[email protected]> you wrote:
What does
CFG_LOAD_ADDRmean and how it differs fromTEXT_BASEin config.mk?
CFG_LOAD_ADDR is the default setting for the load_addr variable, i. e. the default load address.
And it has absolutely nothing to do with TEXT_BASE - they are completely unrelated.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de An age is called Dark not because the light fails to shine, but because people refuse to see it. -- James Michener, "Space"
Quoted 3 lines · In message <[email protected]> you wrote:
Is it ok that
TEXT_BASEof0x0leads to crash? Also U-boot seems to followTEXT_BASEvalue after relocation:
Which architecture are you talking about?
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If it went on at this rate, in several billion years he'd be rich beyond his wildest dreams! - Terry Pratchett, _Soul Music_
Quoted 2 lines · Wolfgang Denk
In message <[email protected]> you wrote:
Which architecture are you talking about?
PXA261 (arm)
Signature · 3 lines
Sincerely, Vladimir "Farcaller" Pouzanov http://hackndev.com
Quoted 2 lines · In message <[email protected]> you wrote:
Now I'm completely confused...
Then I recommend to read the source code.
Quoted 1 line
CFG_MONITOR_BASEis u-boot startting location before relocation?
No, it's the start address of the U-Boot image in flash.
Quoted 1 line
CFG_FLASH_BASEis the same?
This may be, but is not always the case. Both are unrelated. But the following should always be true: CFG_FLASH_BASE <= CFG_MONITOR_BASE <= CFG_FLASH_BASE + sizeof(your flash memory) - sizeof(u-boot image)
Quoted 1 line
TEXT_BASEis... hm... (same as both constants above)0x0? Doesn't work. And
No, TEXT_BASE is something different. What exactly it is depends on which architecture you're talking about.
Best regards,
Wolfgang Denk
Signature · 6 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "The good Christian should beware of mathematicians and all those who make empty prophecies. The danger already exists that mathematicians have made a covenant with the devil to darken the spirit and confine man in the bonds of Hell." - Saint Augustine
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 3 lines · Vladimir "Farcaller" Pouzanov
Quoted 2 lines · Vladimir "Farcaller" Pouzanov
Is it ok that
TEXT_BASEof0x0leads to crash? Also U-boot seems to followTEXT_BASEvalue after relocation:Seems that I've provided not enough information, so let's start from..hm.. beginning.
I'm trying to run u-boot on Palm Tungsten T3 handheld, PXA261 (ARM, same as
On ARM, TEXT_BASE must point to (initialized) RAM. If you set it to 0 (= ROM), then crashes must be expected.
Best regards,
Wolfgang Denk
Signature · 3 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de God made the integers; all else is the work of Man. - Kronecker
Quoted 2 lines · Wolfgang Denk
On ARM,
TEXT_BASEmust point to (initialized) RAM. If you set it to 0 (= ROM), then crashes must be expected.
Thanks for writing all that configuration settings values.
Can you give me any hint where I could start looking for 30sec. bug (random crashes in 'loady' and u-boot seems to freeze after ~30 sec. of serial inactivity)? I'm sure that my board init sequence is correct.
mtest works correctly, so SDRAM seems to be configured correctly.
Signature · 3 lines
Sincerely, Vladimir "Farcaller" Pouzanov http://hackndev.com