public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/8 v2] Introduce the Tertiary Program loader
Date: Sat, 22 Jan 2011 23:04:38 +0100	[thread overview]
Message-ID: <20110122220438.DB85EB187@gemini.denx.de> (raw)
In-Reply-To: <1291217737-3870-4-git-send-email-Haiying.Wang@freescale.com>

Dear Haiying.Wang at freescale.com,

In message <1291217737-3870-4-git-send-email-Haiying.Wang@freescale.com> you wrote:
> From: Haiying Wang <Haiying.Wang@freescale.com>
> 
> TPL is introduced to enable a loader stub that boots out of some type of RAM,
> after being loaded by an SPL or similar platform-specific mechanism.
> 
> One example of using this tpl loader is to initialize the ddr through spd code
> in case the L2 SRAM size is not big enough to hold the final uboot image and
> the nand spl code needs to be limitated to 4K byte, then tpl code will load the
> final uboot image after ddr is initialized.
> 
> Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
> ---
> Incorporate Mike's comment to use new variable NAND_SPL_OBJS-y
>  Makefile |   17 +++++++++++++++--
>  README   |   27 +++++++++++++++++++++++++++
>  2 files changed, 42 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 87a383d..94af465 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -290,6 +290,10 @@ LDPPFLAGS += \
>  	$(shell $(LD) --version | \
>  	  sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p')
>  
> +ifeq ($(CONFIG_TPL_U_BOOT),y)
> +TPL_BOOT = tpl
> +endif

I don't understand what the "TPL_BOOT" is good for, or how it's
supposed to work.

>  ifeq ($(CONFIG_NAND_U_BOOT),y)
>  NAND_SPL = nand_spl
>  U_BOOT_NAND = $(obj)u-boot-nand.bin
> @@ -407,8 +411,15 @@ $(obj)u-boot.lds: $(LDSCRIPT)
>  $(NAND_SPL):	$(TIMESTAMP_FILE) $(VERSION_FILE) depend
>  		$(MAKE) -C nand_spl/board/$(BOARDDIR) all
>  
> -$(U_BOOT_NAND):	$(NAND_SPL) $(obj)u-boot.bin
> -		cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin
> +$(TPL_BOOT):	$(TIMESTAMP_FILE) $(VERSION_FILE) depend
> +		$(MAKE) -C tpl/board/$(BOARDDIR) all

Assume CONFIG_TPL_U_BOOT is not defined, then TPL_BOOT is not defined,
and this rule will probably cause a build error, doesn't it?

Has this code ever been tested?


And if we use a variable for the "tlp" string, should this not be

	...
	$(MAKE) -C $(TPL_BOOT)/board/$(BOARDDIR) all

??

> +NAND_SPL_OBJS-y += $(obj)nand_spl/u-boot-spl-16k.bin
> +NAND_SPL_OBJS-$(CONFIG_TPL_U_BOOT) += $(obj)tpl/u-boot-tpl.bin
> +NAND_SPL_OBJS-y += $(obj)u-boot.bin

Ditto here and in the following - but how is NAND_SPL related to TPL
building? These should be completely independent?

> +- TPL Boot Support
> +		CONFIG_TPL_U_BOOT
> +
> +		Builds a U-Boot image that contains a loader stub (tertiary
> +		program loader -- TPL) that boots out of some type of RAM,
> +		after being loaded by an SPL or similar platform-specific
> +		mechanism.  This symbol will be set in all build phases.
> +
> +		CONFIG_TPL_BOOT
> +
> +		This is set by the build system when compiling code to go into
> +		the TPL.  It is not set when building the code that the TPL
> +		loads, or when building the SPL.

Can we not do with a single variable definition?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Things that try to look like things often do look  more  like  things
than things. Well-known fact.       - Terry Pratchett, _Wyrd Sisters_

  parent reply	other threads:[~2011-01-22 22:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-01 15:35 [U-Boot] [PATCH 0/8 v2] Add support to tpl boot and p1021mds board Haiying.Wang at freescale.com
2010-12-01 15:35 ` [U-Boot] [PATCH 1/8] powerpc/85xx: do not reloc l2srbar if CONFIG_FLASH_BASE is not defined Haiying.Wang at freescale.com
2010-12-01 16:01   ` Kumar Gala
2010-12-01 15:35 ` [U-Boot] [PATCH 2/8] 8xxx/ddr: add support to only compute the ddr sdram size Haiying.Wang at freescale.com
2011-01-14 16:29   ` Kumar Gala
2010-12-01 15:35 ` [U-Boot] [PATCH 3/8 v2] Introduce the Tertiary Program loader Haiying.Wang at freescale.com
2011-01-21  8:14   ` Kumar Gala
2011-01-22 22:05     ` Wolfgang Denk
2011-01-22 22:04   ` Wolfgang Denk [this message]
2011-01-24  4:21     ` Haiying Wang
2011-01-24 12:49       ` Wolfgang Denk
2011-01-24 19:38         ` Scott Wood
2011-01-24 20:08           ` Wolfgang Denk
2011-01-24 21:54         ` Haiying Wang
2011-01-24 22:09           ` Wolfgang Denk
2011-01-24 22:17             ` Haiying Wang
2011-01-24 22:29               ` Wolfgang Denk
2011-01-24 23:34                 ` Scott Wood
2011-01-26 21:07                 ` Haiying Wang
2011-01-26 21:34                   ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110122220438.DB85EB187@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox