From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 29 Jun 2020 11:54:41 -0400 Subject: [PATCH] cmd: add clone command In-Reply-To: <20200627031549.4156-1-johnchau.2nd@gmail.com> References: <20200627031549.4156-1-johnchau.2nd@gmail.com> Message-ID: <20200629155441.GU8432@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 Sat, Jun 27, 2020 at 11:15:49AM +0800, John Chau wrote: > From: John Chau > > This patch adds a feature for block device cloning similar to dd > command, this should be useful for boot-strapping a device where > usb gadget or networking is not available. For instance one can > clone a factory image into a blank emmc from an external sd card. > > Signed-off-by: John Chau In general, checkpatch.pl complains a lot and those need to be fixed. [snip] > +config CMD_CLONE > + bool "clone" > + depends on BLK > + select CLONE There's no "config CLONE" so we don't need this line. [snip] > +//FIXME: we assume blk size of both devices can be divided by 1M, which should be normal > +#define BUFSIZE (1 * 1024 * 1024) Can we do some run-time checks of the block sizes of each device and confirm this assumption and fail if it's not true? Finally, we should also enable this on sandbox so that it's build-tested and put through coverity. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: