public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 17/18] SPL: Enhance drivers/mtd/nand/nand_spl_load.c
Date: Fri, 24 Aug 2012 15:56:35 -0700	[thread overview]
Message-ID: <20120824225635.GD23250@bill-the-cat> (raw)
In-Reply-To: <5037F285.2070409@freescale.com>

On Fri, Aug 24, 2012 at 04:30:45PM -0500, Scott Wood wrote:
> On 08/24/2012 04:20 PM, Tom Rini wrote:
> > On Fri, Aug 24, 2012 at 04:09:13PM -0500, Scott Wood wrote:
> >> On 08/20/2012 11:45 AM, Tom Rini wrote:
> >>> diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
> >>> index 29dc20e..5475c8c 100644
> >>> --- a/drivers/mtd/nand/Makefile
> >>> +++ b/drivers/mtd/nand/Makefile
> >>> @@ -27,12 +27,7 @@ LIB	:= $(obj)libnand.o
> >>>  
> >>>  ifdef CONFIG_CMD_NAND
> >>>  ifdef CONFIG_SPL_BUILD
> >>> -ifdef CONFIG_SPL_NAND_SIMPLE
> >>> -COBJS-y += nand_spl_simple.o
> >>> -endif
> >>> -ifdef CONFIG_SPL_NAND_LOAD
> >>> -COBJS-y	+= nand_spl_load.o
> >>> -endif
> >>> +COBJS-$(CONFIG_SPL_NAND_SIMPLE) += nand_spl_simple.o nand_spl_load.o
> >>
> >> OK, I was wrong, I will complain. :-)
> >>
> >> The commit message didn't mention you were changing
> >> CONFIG_SPL_NAND_SIMPLE.  That needs to be able to support small SPLs.
> >> Is your new "enhanced" nand_spl_load small enough (with proper
> >> configuration) to work with all the SPLs that currently use
> >> nand_spl/nand_boot.c (e.g. PPC 44x)?
> > 
> > OK, I suspect it would be close-to-fail.  There's a "few" bytes overhead
> > to parse the header and so forth, but it also allows for direct Linux
> > booting.  Is that something you want for these machines or no?
> 
> I don't think there's room for any new features at all.  The SPL must
> fit in 4K.  Canyonlands is at 4020 bytes currently.
> 
> Why can't the new functionality be conditionally built?

I'm not sure there would be a point.  The nand_boot() method is read
u-boot.bin from nand, read env from nand and read redundant env from
nand, boot u-boot.  The spl_nand_load_image method doesn't boot u-boot,
reads the image header, parses, reads the image.  In short, I don't
think a modified version would gain us anything more than a lot of
complex #ifdefs :(

> > It wouldn't be hard to put the enhanced version nand_spl_simple.c and leave
> > nand_spl_load.c alone.
> 
> nand_spl_simple.c is what I'm talking about needing to not expand.  Why
> does the new stuff need to be bound to a specific NAND boot implementation?

Sorry, I got it backwards.  I mean (and did locally) leave the very tiny
and simple approach alone, add to the version where we have a little,
but not a lot, of space.

-- 
Tom

  reply	other threads:[~2012-08-24 22:56 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-20 16:45 [U-Boot] [PATCH v2 0/18] ARM: SPL: Make more generic, merge DaVinci and OMAP Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 01/18] Makefile: Move SPL files to clobber, remove from clean Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 02/18] spl_mmc: Make FAT checks / calls guarded with CONFIG_SPL_FAT_SUPPORT Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 03/18] omap-common: SPL: Add CONFIG_SPL_DISPLAY_PRINT / spl_display_print() Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 04/18] omap-common: Fix typo in save_boot_params() in lowlevel_init.S Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 05/18] ARM: SPL: Rename omap_boot_device to spl_boot_device Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 06/18] ARM: SPL: Rename omap_boot_mode to spl_boot_mode() Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 07/18] ARM: SPL: Remove NAND_MODE_HW_ECC from spl_nand.c Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 08/18] ARM: SPL: Only call mem_malloc_init if configured Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 09/18] ARM: SPL: Add <asm/spl.h> and <asm/arch/spl.h> Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 10/18] ARM: SPL: Make spl_mmc.c more generic Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 11/18] ARM: SPL: Clean up spl.c / spl_nand.c slightly Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 12/18] ARM: SPL: Start hooking in the current SPI SPL support Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 13/18] ARM: SPL: Move gpmc_init() to spl_board_init() Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 14/18] SPL: Move the omap SPL framework to common/spl Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 15/18] ARM: SPL: Convert davinci to CONFIG_SPL_FRAMEWORK Tom Rini
2012-08-22 10:04   ` Christian Riesch
2012-08-22 10:13     ` Prabhakar Lad
2012-08-22 17:46     ` Tom Rini
2012-08-22 19:19       ` Tom Rini
2012-08-22 23:14         ` Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 16/18] da850_am18xxevm: Add README.da850_am18xxevm Tom Rini
2012-08-21  5:09   ` Prabhakar Lad
2012-08-21 15:34     ` Tom Rini
2012-08-22  4:46       ` Prabhakar Lad
2012-08-22  6:28         ` Tom Rini
2012-08-22  8:13   ` Christian Riesch
2012-08-22  9:07     ` Prabhakar Lad
2012-08-22  9:17       ` Christian Riesch
2012-08-22 10:05         ` Prabhakar Lad
2012-08-22 15:09           ` Christian Riesch
2012-08-23  4:51             ` Prabhakar Lad
2012-08-22 17:44           ` Tom Rini
2012-08-22 17:37     ` Tom Rini
2012-08-20 16:45 ` [U-Boot] [PATCH v2 17/18] SPL: Enhance drivers/mtd/nand/nand_spl_load.c Tom Rini
2012-08-24 21:09   ` Scott Wood
2012-08-24 21:10     ` Scott Wood
2012-08-24 21:17       ` Tom Rini
2012-08-24 21:20     ` Tom Rini
2012-08-24 21:30       ` Scott Wood
2012-08-24 22:56         ` Tom Rini [this message]
2012-08-20 16:45 ` [U-Boot] [PATCH v2 18/18] SPL: Enhance spi_spl_load to match the other load functions Tom Rini

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=20120824225635.GD23250@bill-the-cat \
    --to=trini@ti.com \
    --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