From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 14 May 2018 16:50:17 -0400 Subject: [U-Boot] [U-Boot,3/3] mmc: support writing sparse images In-Reply-To: References: <1522996524-23376-1-git-send-email-jassisinghbrar@gmail.com> <20180508171547.GB12235@bill-the-cat.ec.rr.com> <20180514144659.GM12235@bill-the-cat.ec.rr.com> Message-ID: <20180514205017.GY12235@bill-the-cat.ec.rr.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, May 14, 2018 at 05:14:42PM +0100, Alex Kiernan wrote: > On Mon, May 14, 2018 at 3:47 PM Tom Rini wrote: > > > On Mon, May 14, 2018 at 06:42:41PM +0530, Jassi Brar wrote: > > > Hi Tom, > > > > > > On Tue, May 8, 2018 at 10:45 PM, Tom Rini wrote: > > > > On Fri, Apr 06, 2018 at 12:05:24PM +0530, jassisinghbrar at gmail.com > wrote: > > > > > > > >> From: Jassi Brar > > > >> > > > >> Provide an alternate path for sparse-images to be > > > >> written to MMC. For example, via tftp on platforms > > > >> that don't support fastboot protocol. Or when an > > > >> image is to written at some offset, rather than the > > > >> start of a partition. > > > >> > > > >> Signed-off-by: Jassi Brar > > > > > > > > Applied to u-boot/master, thanks! > > > > > > I see you modified the patch to protect the feature with > > > CONFIG_FASTBOOT_FLASH, which kills the purpose -- this feature is for > > > platforms that don't support fastboot. > > > > > > Do you want me to send the patch to revert the protection? > > > Sorry, I guess maybe things weren't clear enough all around, and we > > should (functionally) revert patches 2 and 3 and try something > > different. It is OK to say "lets make writing sparse images more widely > > available". It's not OK to make every platform with MMC write grow a > > decent bit in binary size. Making a quick pass at re-enabling things on > > a platform without fastboot support already grew things by nearly 2KiB. > > The other part which is I believe got me down this path was that without > > a change to common/Makefile to always (outside of SPL) include > > common/image-sparse.o things don't link. > > > In sum, a new patch to add an option to allow people to opt-in for > > swrite would be good. And please make sure to do something like: > > diff --git a/common/Makefile b/common/Makefile > > index d0681c7dd96a..92b2aa1ca8f0 100644 > > --- a/common/Makefile > > +++ b/common/Makefile > > @@ -120,6 +120,7 @@ ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV > > obj-y += fb_nand.o > > endif > > endif > > +obj-$(CONFIG_MMC_WRITE) += image-sparse.o > > endif > > Isn't this just move image-sparse to lib and add a separate guard for it > (LIB_IMAGE_SPARSE?) which can be selected by both FASTBOOT and a new > command symbol (CMD_MMC_SWRITE)? > > This is all overlapping with the UDP fastboot code I've been posting, so > I'd kinda like it to fit nicely with that, rather than have to refactor it > to fit something different! That sounds like a good idea to me, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: