From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Mon, 19 Sep 2016 01:27:52 +0200 Subject: [U-Boot] [PATCH] ML: SPL: NOR: Add CONFIG_SPL_NOR_COPY_ENTIRE_IMAGE define to enable whole image copy from NOR In-Reply-To: <20160918192449.GW8156@bill-the-cat> References: <1474015431-24329-1-git-send-email-l.majewski@majess.pl> <20160918180314.GT8156@bill-the-cat> <20160918211034.722a74ea@jawa> <20160918192449.GW8156@bill-the-cat> Message-ID: <20160919012752.4156d483@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Tom, > On Sun, Sep 18, 2016 at 09:10:34PM +0200, Lukasz Majewski wrote: > > Hi Tom, > > > > > On Fri, Sep 16, 2016 at 10:43:51AM +0200, Lukasz Majewski wrote: > > > > > > > This define gives the possibility to copy entire image > > > > (including header) from NOR parallel memory to e.g. SDRAM. > > > > > > > > The legacy behavior is preserved, since other board don't > > > > enabled this option. > > > > > > What's the use case? > > > > This code is used on some boards (ppc [1]) in which we copy only > > payload of the image (i.e. we drop the package metadata). > > > > In my particular case I would like to copy the image with its meta > > data (in similar way works spl_nand.c and spl_mmc.c). > > > > Since, I wanted to avoid code duplication, I've decided to add this > > flag. > > So another way of saying this, if I follow correctly, is that today > SPL NOR doesn't work with u-boot.img but only u-boot.bin ? Yes, exactly. > > > > > Signed-off-by: Lukasz Majewski > > > > --- > > > > Kconfig | 10 ++++++++++ > > > > > > This should now get moved to common/spl/Kconfig > > > > OK. > > > > As a side note - I do have some other patches which move some > > SPL_NOR options to Kconfig. > > > > However, I omitted them when I saw great work done by Simon to move > > a lot of SPL options to Kconfig. I hope them will be merged soon :-) > > It's in now :) Great :-) > > > > > README | 4 ++++ > > > > > > This can be dropped. > > > > So, we don't add any new entries to README and now rely solely on > > Kconfig "help" sections? > > Correct. OK. > > > > [snip] > > > > diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c > > > > index 8ea874c..1e0f739 100644 > > > > --- a/common/spl/spl_nor.c > > > > +++ b/common/spl/spl_nor.c > > > > @@ -9,13 +9,15 @@ > > > > > > > > int spl_nor_load_image(void) > > > > { > > > > + void *img_src; > > > > int ret; > > > > +#ifndef CONFIG_SPL_NOR_COPY_ENTIRE_IMAGE > > > > /* > > > > * Loading of the payload to SDRAM is done with > > > > skipping of > > > > * the mkimage header in this SPL NOR driver > > > > */ > > > > spl_image.flags |= SPL_COPY_PAYLOAD_ONLY; > > > > - > > > > +#endif > > > > #ifdef CONFIG_SPL_OS_BOOT > > > > if (!spl_start_uboot()) { > > > > const struct image_header *header; > > > > @@ -64,9 +66,13 @@ int spl_nor_load_image(void) > > > > if (ret) > > > > return ret; > > > > > > > > > > We should have a comment here about how we're calculating the > > > base of where to copy from. > > > > I will be more verbose with v2 :-). > > > > Thanks for review. > > No problem, thank you! > Best regards, ?ukasz Majewski -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: