From: Tom Rini Date: Tue, 27 Sep 2016 13:29:54 -0400 Subject: [U-Boot] [PATCH] spl: saveenv: adding saveenv support in SPL In-Reply-To: <1474958708-18429-1-git-send-email-ravibabu@ti.com> References: <1474958708-18429-1-git-send-email-ravibabu@ti.com> Message-ID: <20160927172954.GH4884@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Sep 27, 2016 at 12:15:08PM +0530, Ravi Babu wrote: > By default saveenv option is not supported for SPL. This patch > enable the support for save environment variable for SPL build. > > Enable save environment support in SPL after setenv. By default > the saveenv option is not provided in SPL, but some boards need > this support in 'Falcon' boot, where SPL need to boot from > different images based on environment variable set by OS. For > example OS may set "reboot_image" environment variable to > "recovery" inorder to boot recovery image by SPL. The SPL read > "reboot_image" and act accordingly and change the reboot_image > to default mode using setenv and save the environemnt. [snip] > diff --git a/drivers/mmc/mmc_private.h b/drivers/mmc/mmc_private.h > index 49ec022..e0c9849 100644 > --- a/drivers/mmc/mmc_private.h > +++ b/drivers/mmc/mmc_private.h > @@ -28,8 +28,7 @@ ulong mmc_bread(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt, > void *dst); > #endif > > -#ifndef CONFIG_SPL_BUILD > - > +#if !(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_SAVEENV)) > unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start, > lbaint_t blkcnt); The comments in this area are now wrong after this patch so please update them as part of the patch. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: