From: Tom Rini Date: Mon, 12 Oct 2015 11:17:53 -0400 Subject: [U-Boot] [U-Boot, v4, 06/10] common/armflash: add command to check if image exists In-Reply-To: <1444407488-32646-7-git-send-email-ryan.harkin@linaro.org> References: <1444407488-32646-7-git-send-email-ryan.harkin@linaro.org> Message-ID: <20151012151753.GB23893@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 Fri, Oct 09, 2015 at 05:18:04PM +0100, Ryan Harkin wrote: > Add a command to the ARM flash support to check if an image exists or > not. > > If the image is found, it will return CMD_RET_SUCCESS, else > CMD_RET_FAILURE. This allows hush scripts to conditionally load images. > > A simple example: > > if afs exists ${kernel_name}; then echo found; else echo \ > not found; fi > > Signed-off-by: Ryan Harkin > Reviewed-by: Linus Walleij Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: