From: Aneesh V <aneesh@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support
Date: Fri, 29 Jul 2011 13:04:09 +0530 [thread overview]
Message-ID: <4E326271.7020903@ti.com> (raw)
In-Reply-To: <20110728135005.03c97ac0@schlenkerla.am.freescale.net>
Hi Scott, Simon,
On Friday 29 July 2011 12:20 AM, Scott Wood wrote:
> On Thu, 28 Jul 2011 19:46:25 +0530
> Aneesh V<aneesh@ti.com> wrote:
>
>> On Thursday 28 July 2011 02:08 PM, Simon Schwarz wrote:
>>> +#ifdef CONFIG_SPL_NAND_SUPPORT
>>> +static void nand_load_image(void)
>>> +{
>>> + gpmc_init();
>>> + nand_init();
>>> + nand_spl_load_image(CONFIG_SYS_NAND_U_BOOT_OFFS,
>>> + CONFIG_SYS_NAND_U_BOOT_SIZE,
>>> + (uchar *)CONFIG_SYS_NAND_U_BOOT_DST);
>>
>> Guess CONFIG_SYS_NAND_U_BOOT_DST is same as CONFIG_SYS_TEXT_BASE. Why
>> define a new flag then?
>
> History from when CONFIG_SYS_TEXT_BASE was just TEXT_BASE and there was no
> separate CONFIG_SYS_TEXT_BASE_SPL. Also, what if there's a middle step
> before the final U-Boot? This is a define that's used across all
> platforms.
>
Perhaps he should not use any hard-coded destination. Please see below.
>>> +#ifdef CONFIG_NAND_ENV_DST
>>> + nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
>>> + (uchar *)CONFIG_NAND_ENV_DST);
>>> +#ifdef CONFIG_ENV_OFFSET_REDUND
>>> + nand_spl_load_image(CONFIG_ENV_OFFSET_REDUND, CONFIG_ENV_SIZE,
>>> + (uchar *)CONFIG_NAND_ENV_DST + CONFIG_ENV_SIZE);
>>> +#endif
>>> +#endif
>>> + nand_deselect();
>>> + parse_image_header((struct image_header *)CONFIG_SYS_NAND_U_BOOT_DST);
>>
>> I think you are assuming the image type and size here.
>
> This is how all the other NAND SPLs do it. We're building both at the same
> time to create a single combination image, so it's not that bad of an
> assumption.
For OMAP, we are not building a combination image. OMAP typically
allows booting from a FAT file system in an MMC card in addition to raw
boot from eMMC/NAND. So, we have separate files for SPL/x-loader and
u-boot. The SPL file(MLO) is picked up by ROM code and u-boot is picked
up by x-loader/SPL.
The first version of my MMC SPL too was also making assumptions about
the image. But Wolfgang asked me to make it more generic.
According to this I added the necessary code to parse a mkimage header
and find the image size, load address, image type etc from the image
itself and use these while loading the image and while jumping to it.
This gives us more flexibility about the second image.
1. In raw boot the second image can be changed anytime by flashing a
new image(let's say kernel uImage) at the pre-defined location for the
second image.
2. In FAT mode just change CONFIG_SPL_FAT_LOAD_PAYLOAD_NAME and you can
load a different image with mkimage header.
Only the jumping part needs some customization for different types of
images if parameters are passed.
I would like Simon to do it the same way for NAND. Here he is calling
parse_image_header() but only after loading the entire image. That
helps in the jumping part. But he could make the loading part also
generic.
best regards,
Aneesh
next prev parent reply other threads:[~2011-07-29 7:34 UTC|newest]
Thread overview: 134+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-28 14:14 [U-Boot] [0/5]devkit8000 nand_spl support simonschwarzcor at googlemail.com
2011-06-28 14:14 ` [U-Boot] [1/5]devkit8000 nand_spl: armv7 support nand_spl boot simonschwarzcor at googlemail.com
2011-06-29 8:27 ` Andreas Bießmann
2011-06-30 11:10 ` Aneesh V
2011-06-28 14:14 ` [U-Boot] [2/5]devkit8000 nand_spl: omap3 " simonschwarzcor at googlemail.com
2011-06-29 8:43 ` Andreas Bießmann
2011-06-30 9:06 ` Simon Schwarz
2011-06-30 10:38 ` Aneesh V
2011-06-28 14:14 ` [U-Boot] [3/5]devkit8000 nand_spl: Add RAM configuration independent of x-loader or CH simonschwarzcor at googlemail.com
2011-06-28 14:14 ` [U-Boot] [4/5]devkit8000 nand_spl: Add SPL NAND support to omap_gpmc driver simonschwarzcor at googlemail.com
2011-06-29 8:58 ` Andreas Bießmann
2011-06-30 11:01 ` Simon Schwarz
2011-06-28 14:14 ` [U-Boot] [5/5]devkit8000 nand_spl: add nand_spl support simonschwarzcor at googlemail.com
2011-06-28 15:01 ` Andreas Bießmann
2011-07-25 18:05 ` [U-Boot] [PATCH V2 0/5] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-25 18:05 ` [U-Boot] [PATCH V2 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-25 18:05 ` [U-Boot] [PATCH V2 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-26 6:07 ` Andreas Bießmann
2011-07-26 8:42 ` Simon Schwarz
2011-07-28 6:20 ` Aneesh V
2011-07-25 18:05 ` [U-Boot] [PATCH V2 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-26 5:59 ` Andreas Bießmann
2011-07-26 8:47 ` Simon Schwarz
2011-07-25 18:05 ` [U-Boot] [PATCH V2 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-26 6:11 ` Andreas Bießmann
2011-07-25 18:05 ` [U-Boot] [PATCH V2 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-26 6:17 ` Andreas Bießmann
2011-07-26 9:09 ` Simon Schwarz
2011-07-26 10:22 ` [U-Boot] [PATCH V3 0/5] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-26 10:22 ` [U-Boot] [PATCH V3 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-26 10:22 ` [U-Boot] [PATCH V3 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-26 10:22 ` [U-Boot] [PATCH V3 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-26 10:22 ` [U-Boot] [PATCH V3 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-26 10:22 ` [U-Boot] [PATCH V3 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-26 10:42 ` Andreas Bießmann
2011-07-26 12:34 ` Simon Schwarz
2011-07-26 11:04 ` Wolfgang Denk
2011-07-26 11:06 ` [U-Boot] [PATCH V3 0/5] OMAP3 and devkit8000 SPL support Wolfgang Denk
2011-07-26 12:31 ` Simon Schwarz
2011-07-26 12:09 ` [U-Boot] [PATCH V4 " Simon Schwarz
2011-07-26 12:09 ` [U-Boot] [PATCH V4 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-26 12:09 ` [U-Boot] [PATCH V4 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-26 18:06 ` Scott Wood
[not found] ` <4E2FCF6E.10701@gmail.com>
[not found] ` <20110727163839.736d5bed@schlenkerla.am.freescale.net>
2011-07-28 7:51 ` Simon Schwarz
2011-07-28 18:56 ` Scott Wood
2011-07-29 8:48 ` Simon Schwarz
2011-07-26 12:09 ` [U-Boot] [PATCH V4 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-26 18:04 ` Scott Wood
2011-07-26 18:12 ` Scott Wood
2011-07-27 9:22 ` Simon Schwarz
2011-07-27 14:55 ` V, Aneesh
2011-07-27 22:01 ` Scott Wood
2011-07-28 7:27 ` Aneesh V
2011-07-26 12:09 ` [U-Boot] [PATCH V4 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-26 12:09 ` [U-Boot] [PATCH V4 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-27 12:50 ` [U-Boot] [PATCH V5 0/5] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-27 12:50 ` [U-Boot] [PATCH V5 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-27 12:50 ` [U-Boot] [PATCH V5 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-27 12:50 ` [U-Boot] [PATCH V5 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-27 12:50 ` [U-Boot] [PATCH V5 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-27 12:50 ` [U-Boot] [PATCH V5 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-28 8:38 ` [U-Boot] [PATCH V6 0/5] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-28 8:38 ` [U-Boot] [PATCH V6 1/5] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-28 8:50 ` Aneesh V
2011-07-28 9:42 ` Simon Schwarz
2011-07-29 16:53 ` Simon Schwarz
2011-07-28 8:38 ` [U-Boot] [PATCH V6 2/5] omap-common: add nand spl support Simon Schwarz
2011-07-28 9:42 ` Aneesh V
2011-07-28 12:44 ` Simon Schwarz
2011-07-28 14:24 ` Aneesh V
2011-07-28 14:34 ` Simon Schwarz
2011-08-02 12:03 ` Simon Schwarz
2011-08-02 12:18 ` Aneesh V
2011-08-02 12:30 ` Simon Schwarz
2011-07-28 9:58 ` Aneesh V
2011-07-28 12:54 ` Simon Schwarz
2011-07-28 14:16 ` Aneesh V
2011-07-28 18:50 ` Scott Wood
2011-07-28 19:07 ` Wolfgang Denk
2011-07-29 7:34 ` Aneesh V [this message]
2011-07-29 8:19 ` Simon Schwarz
2011-07-28 8:38 ` [U-Boot] [PATCH V6 3/5] nand spl: add NAND Library to new SPL Simon Schwarz
2011-07-28 11:54 ` Aneesh V
2011-07-28 14:04 ` Simon Schwarz
2011-07-28 16:18 ` Aneesh V
2011-07-29 12:17 ` Simon Schwarz
2011-07-28 19:16 ` Scott Wood
2011-07-29 9:12 ` Simon Schwarz
2011-07-29 9:27 ` Wolfgang Denk
2011-07-29 12:27 ` Simon Schwarz
2011-07-28 8:38 ` [U-Boot] [PATCH V6 4/5] omap3: new SPL structure support Simon Schwarz
2011-07-28 8:38 ` [U-Boot] [PATCH V6 5/5] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-07-28 10:51 ` Aneesh V
2011-07-28 11:54 ` Simon Schwarz
2011-07-29 16:53 ` [U-Boot] [PATCH V7 0/7] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-07-29 16:53 ` [U-Boot] [PATCH V7 1/7] omap-common/omap4: relocate early UART clock setup Simon Schwarz
2011-07-29 16:53 ` [U-Boot] [PATCH V7 2/7] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-07-29 16:53 ` [U-Boot] [PATCH V7 3/7] omap-common: add nand spl support Simon Schwarz
2011-07-29 16:53 ` [U-Boot] [PATCH V7 4/7] spl: add NAND Library to new SPL Simon Schwarz
2011-08-01 17:58 ` Scott Wood
2011-08-02 8:15 ` Simon Schwarz
2011-07-29 16:53 ` [U-Boot] [PATCH V7 5/7] spl: Add POWER library to new spl Simon Schwarz
2011-07-29 16:53 ` [U-Boot] [PATCH V7 6/7] omap3: new SPL structure support Simon Schwarz
2011-07-29 16:53 ` [U-Boot] [PATCH V7 7/7] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-08-01 16:23 ` [U-Boot] [PATCH V7 0/7] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-08-02 15:59 ` [U-Boot] [PATCH V8 0/9] " Simon Schwarz
2011-08-02 15:59 ` [U-Boot] [PATCH V8 1/9] omap-common/omap4: relocate early UART clock setup Simon Schwarz
2011-08-02 15:59 ` [U-Boot] [PATCH V8 2/9] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-08-02 15:59 ` [U-Boot] [PATCH V8 3/9] omap-common: add nand spl support Simon Schwarz
2011-08-05 7:30 ` Aneesh V
2011-08-08 7:50 ` Simon Schwarz
2011-08-08 9:04 ` Aneesh V
2011-08-02 15:59 ` [U-Boot] [PATCH V8 4/9] spl: add NAND Library to new SPL Simon Schwarz
2011-08-02 16:12 ` Scott Wood
2011-08-02 15:59 ` [U-Boot] [PATCH V8 5/9] spl: Add POWER library to new spl Simon Schwarz
2011-08-02 15:59 ` [U-Boot] [PATCH V8 6/9] omap3: new SPL structure support Simon Schwarz
2011-08-02 15:59 ` [U-Boot] [PATCH V8 7/9] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-08-02 15:59 ` [U-Boot] [PATCH V8 8/9] omap3: implement boot parameter saving Simon Schwarz
2011-08-05 7:41 ` Aneesh V
2011-08-08 8:03 ` Simon Schwarz
2011-08-08 8:44 ` Aneesh V
2011-08-08 10:59 ` Simon Schwarz
2011-08-02 15:59 ` [U-Boot] [PATCH V8 9/9] omap-common: reorganize spl.c Simon Schwarz
2011-08-08 13:11 ` [U-Boot] [PATCH V9 0/9] OMAP3 and devkit8000 SPL support Simon Schwarz
2011-08-08 13:11 ` [U-Boot] [PATCH V9 1/9] omap-common/omap4: relocate early UART clock setup Simon Schwarz
2011-08-08 13:11 ` [U-Boot] [PATCH V9 2/9] omap3: Configure RAM bank 0 if in SPL Simon Schwarz
2011-08-08 13:11 ` [U-Boot] [PATCH V9 3/9] omap-common: add nand spl support Simon Schwarz
2011-08-08 13:11 ` [U-Boot] [PATCH V9 4/9] spl: add NAND Library to new SPL Simon Schwarz
2011-08-08 23:34 ` Scott Wood
2011-08-08 13:11 ` [U-Boot] [PATCH V9 5/9] spl: Add POWER library to new spl Simon Schwarz
2011-08-08 13:11 ` [U-Boot] [PATCH V9 6/9] omap3: new SPL structure support Simon Schwarz
2011-08-08 13:11 ` [U-Boot] [PATCH V9 7/9] devkit8000: Add nand-spl support for new SPL Simon Schwarz
2011-08-08 13:11 ` [U-Boot] [PATCH V9 8/9] omap3: implement boot parameter saving Simon Schwarz
2011-08-08 13:11 ` [U-Boot] [PATCH V9 9/9] omap-common: reorganize spl.c Simon Schwarz
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=4E326271.7020903@ti.com \
--to=aneesh@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