[U-Boot] ARM relocation, probably trivial mistake

Reinhard Meyer u-boot at emk-elektronik.de
Thu Sep 30 15:57:26 CEST 2010


Hello,

after enabling relocation I get the following output:

U-Boot 2010.09-00106-g6e135b9-dirty (Sep 30 2010 - 16:57:43)

U-Boot code: 21F00000 -> 21F3C140  BSS: -> 21F7D700
CPU: AT91SAM9XE
Crystal frequency:   18.432 MHz
CPU clock        :  198.656 MHz
Master clock     :   99.328 MHz
I2C:   ready
monitor len: 0007D700 <<<< this must be wrong, the binary is short of 256k large
ramsize: 04000000 <<<< correct
Top of RAM usable for U-Boot at: 24000000 <<<< correct
Reserving 501k for U-Boot at: 23f82000
Reserving 143k for malloc() at: 23f5e100
Reserving 24 Bytes for Board Info at: 23f5e0e8
Reserving 88 Bytes for Global Data at: 23f5e090
New Stack Pointer is: 23f5e088
RAM Configuration:
Bank #0: 20000000 64 MiB <<< correct
relocation Offset is: 02082000 <<<< could be right

<<< system hangs here >>>

Details: initial bootstrap loads u-boot to RAM at 21f00000
(1MiB short of 32 MiB which is the minimum RAM populated)

I have set the following values:
#define	CONFIG_SKIP_LOWLEVEL_INIT
#define CONFIG_SKIP_RELOCATE_UBOOT
/*#define	CONFIG_SYS_ARM_WITHOUT_RELOC*/
#define	CONFIG_SYS_NO_ICACHE
#define	CONFIG_SYS_NO_DCACHE

and

/* SDRAM: min 32, upto 128 MB */
#define CONFIG_NR_DRAM_BANKS		1
#define PHYS_SDRAM			0x20000000
#define PHYS_SDRAM_MAX_SIZE		0x08000000
#define CONFIG_SYS_MEMTEST_START	PHYS_SDRAM
#define CONFIG_SYS_MEMTEST_END		0x21e00000
#define CONFIG_SYS_LOAD_ADDR		(PHYS_SDRAM+0x01000000)	/* 16 MB into RAM */
#define	CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM
#define	CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x1000 - CONFIG_SYS_GBL_DATA_SIZE)

and in config.mk:

TEXT_BASE = 0x21f00000

and

int dram_init(void)
{
	gd->ram_size =
		get_ram_size((void*)PHYS_SDRAM, PHYS_SDRAM_MAX_SIZE);
	return 0;
}

void dram_init_banksize(void)
{
	gd->bd->bi_dram[0].start = PHYS_SDRAM;
	gd->bd->bi_dram[0].size =
		get_ram_size((void*)PHYS_SDRAM, PHYS_SDRAM_MAX_SIZE);
}

I do probably have a simple misunderstanding of the concept.

1. should CONFIG_SKIP_RELOCATE_UBOOT be not defined anymore?

2. TEXT_BASE must be the address where the u-boot is loaded
by 1st loader and startet, right?

With Best Regards,
Reinhard



More information about the U-Boot mailing list