Skip to contentSkip to conversation

PPC U-boot Don't Want to Relocated

U-Boot-Users Sebastien Douheret 2 participants 2 messages Jul 13, 2006

lore
Share & tools
lore
#0 lore raw

Hello Jason,

you must have previously initialized RAM with another way to have an writable area to set stack, data segment, BSS and so on (see remark in Wolfgang Denk email). If you have it, you can skip relocation by setting TEXT_BASE to a RAM address and patch code in some files. What is your CPU ?
As for me, i have a board based on MPC7447/MPC7448 and i use this method (not relocate code) to simplify debug with JTAG probe.
I have patch boot code in cpu/74xx_7xx/start.s file and relocation offset in lib_ppc/board.c file :
/*
* Now that we have DRAM mapped and working, we can
* relocate the code and continue running from DRAM.
*
* Reserve memory at end of RAM for (top down in that order):
* - kernel log buffer
* - protected RAM
* - LCD framebuffer
* - monitor code
* - board info struct
*/
len = (ulong)&_end - CFG_MONITOR_BASE;

#ifdef DEBUG_JTAG_PROBE
	/* IC-PATCH : Skip relocation to debug facilities */
	addr = TEXT_BASE + len + (4096-1);

#else

#ifndef	CONFIG_VERY_BIG_RAM
	addr = CFG_SDRAM_BASE + gd->ram_size;
#else
	/* only allow stack below 256M */
	addr = CFG_SDRAM_BASE +
	       (gd->ram_size > 256 << 20) ? 256 << 20 : gd->ram_size;

#endif
#endif /* DEBUG_JTAG_PROBE */

Best regards,

Sebastien.

Cet ?t?, pensez aux cartes postales de laposte.net !

#1 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:

you must have previously initialized RAM with another way to have an writab le area to set stack, data segment, BSS and so on (see remark in Wolfgang D enk email).

Agreed.

Quoted 2 lines

If you have it, you can skip relocation by setting TEXT_BASE to a RAM addre ss and patch code in some files. What is your CPU ?

Thsi is NOT what the OP wanted. He asked what needs to be done to run out of FLASH only.

Best regards,

Wolfgang Denk

Signature · 5 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"... freedom ... is a worship word..."
"It is our worship word too."
	-- Cloud William and Kirk, "The Omega Glory", stardate unknown