[U-Boot] T1040RDB u-boot chain load u-boot

Radu-andrei Bulie radu-andrei.bulie at nxp.com
Wed Jun 13 12:32:00 UTC 2018


Hi,


The u-boot-spl.bin (written in nand) loads the u-boot.bin which was previously written in nand. When the board boots, this process is transparent to you. (The address for the u-boot.bin in nand is 0x40000). The load process is done through the spl routines that are used by the u-boot-spl.bin image to load the u-boot from offset 0x40000.

To summarize,  the boot process is like this: PBL ----> (NAND -RCW) ----> u-boot-spl --->u-boot.bin

From the booted u-boot if you try to launch u-boot.bin which was transferred in a memory location by you, you will for sure get a hang because the u-boot.bin will try to reinitialize some blocks that were already initialized. You could end up taking the carpet from underneath your feet.

If you want to load another u-boot instance you will have probably to make changes in the u-boot.bin image. 


Radu


-----Original Message-----
From: Chris Packham [mailto:judge.packham at gmail.com] 
Sent: Friday, June 8, 2018 12:20 AM
To: nicolae.rosia.oss at gmail.com
Cc: u-boot <u-boot at lists.denx.de>; Priyanka Jain <priyanka.jain at nxp.com>; Radu-andrei Bulie <radu-andrei.bulie at nxp.com>
Subject: Re: [U-Boot] T1040RDB u-boot chain load u-boot

On Thu, Jun 7, 2018 at 10:46 PM Nicolae Rosia <nicolae.rosia.oss at gmail.com> wrote:
<snip>

> Scenario 4:
> Remove RAMBOOT_PBL from defconfig:
> -CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL"
> +CONFIG_SYS_EXTRA_OPTIONS="SPL_FSL_PBL"
>
> This results in a binary that is more than 3GB (??????)
>
> Scenario 4.1:
> I noticed that CONFIG_SYS_TEXT_BASE affects the size of binary so I 
> thought I can fix this by placing it near RAM end, 4 GB - 8 MB:
> -CONFIG_SYS_TEXT_BASE=0x30001000
> +CONFIG_SYS_TEXT_BASE=0xFF800000
> -CONFIG_SYS_EXTRA_OPTIONS="RAMBOOT_PBL,SPL_FSL_PBL"
> +CONFIG_SYS_EXTRA_OPTIONS="SPL_FSL_PBL"
>
> but the size of u-boot.bin is ~249 MB

That's probably because there's some other fixed address in use (probably the reset vector). You'll want to adjust that address to match your new location or maybe use something like SKIP_LOW_LEVEL_INIT assuming powerpc has such a thing.


More information about the U-Boot mailing list