[U-Boot] RFC: U-Boot OneNAND IPL TEXT_BASE
Kyungmin Park
kmpark at infradead.org
Sun May 2 05:54:41 CEST 2010
Hi,
Which CPU do you use? In most ARM cpu, CPU load the IPL into its
internal SRAM, and runs at here.
But in your case it's not. So you maybe redefine IPL address.
Instead of modifying the config.mk, how about to define IPL_TEXT_BASE.
e.g.,
In OneNAND IPL code,
#ifndef BOARD_IPL_TEXT_BASE
#define ONENAND_IPL_TEXT_BASE BOARD_IPL_TEXT_BASE
#endif
load IPL code ONENAND_IPL_TEXT_BASE instead of current code.
Thank you,
Kyungmin Park
On Sat, May 1, 2010 at 11:48 AM, Marek Vasut <marek.vasut at gmail.com> wrote:
> Hey,
>
> I've been tinkering with OneNAND IPL in uboot. I found out it wan't to load
> itself to the address specified in board/$(BOARDDIR)/config.mk . That's fine in
> most cases, but in my case that wasn't possible.
>
> In my case, SDRAM init didn't fit into the IPL, so I had to copy U-Boot into
> SRAM, then execute it and let it relocate itself into SDRAM. One more time:
> IPL: OneNAND->SRAM
> U-Boot: SRAM->SDRAM
>
> It all works fine, but when compiling the IPL, I had to alter TEXT_BASE not to
> point into SDRAM but SRAM too (because of stack). I introduced a variable called
> IPL which allows using config.mk from (for example) onenand-
> ipl/board/$(BOARDDIR)/config.mk rather than the board/$(BOARDDIR)/config.mk one,
> which is in my opinion a correct behaviour.
>
> Any opinions?
>
> Thanks in advance.
>
> diff --git a/config.mk b/config.mk
> index 73b5195..8639580 100644
> --- a/config.mk
> +++ b/config.mk
> @@ -130,9 +130,13 @@ BOARDDIR = $(VENDOR)/$(BOARD)
> else
> BOARDDIR = $(BOARD)
> endif
> +ifdef IPL
> +sinclude $(TOPDIR)/$(IPL)/board/$(BOARDDIR)/config.mk # include IPL specific
> rules
> +else
> ifdef BOARD
> sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
> endif
> +endif
>
> #########################################################################
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
More information about the U-Boot
mailing list