[U-Boot] [PATCH 4/4] sandbox: dumpimage: Test dumpimage
Simon Glass
sjg at chromium.org
Thu Sep 19 04:44:31 CEST 2013
Hi,
On Tue, Sep 17, 2013 at 6:42 PM, <guilherme.maciel.ferreira at gmail.com>wrote:
> From: Guilherme Maciel Ferreira <guilherme.maciel.ferreira at gmail.com>
>
>
Please can you add a commit message describing this commit?
> Signed-off-by: Guilherme Maciel Ferreira <
> guilherme.maciel.ferreira at gmail.com>
> ---
> test/image/test-imagetools.sh | 107
> +++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 107 insertions(+), 0 deletions(-)
> create mode 100755 test/image/test-imagetools.sh
>
> diff --git a/test/image/test-imagetools.sh b/test/image/test-imagetools.sh
> new file mode 100755
> index 0000000..b243794
> --- /dev/null
> +++ b/test/image/test-imagetools.sh
> @@ -0,0 +1,107 @@
> +#!/bin/bash
> +#
> +# Written by Guilherme Maciel Ferreira <
> guilherme.maciel.ferreira at gmail.com>
> +#
> +# Sanity check for mkimage and dumpimage tools
> +#
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# To run this:
> +#
> +# make O=sandbox sandbox_config
> +# make O=sandbox
> +# ./test/image/test-imagetools.sh
> +
> +
> +BASEDIR=sandbox
> +
> +LINUX_VERSION=`uname -r`
> +IMAGE=linux-${LINUX_VERSION}.img
> +DATAFILE0=vmlinuz-${LINUX_VERSION}
> +DATAFILE1=initrd.img-${LINUX_VERSION}
> +DATAFILE2=System.map-${LINUX_VERSION}
>
It seems that this uses your native OS images. Is it intended to run on the
target rather than the host?
If so, then I think you need sudo so that it can open the OS image for
update, else I get:
test/image/test-imagetools.sh
Building image...
# sandbox/tools/mkimage -A x86 -O linux -T multi -n "3.2.0-53-generic" -d
/boot/vmlinuz-3.2.0-53-generic:/boot/initrd.img-3.2.0-53-generic:/boot/System.map-3.2.0-53-generic
linux-3.2.0-53-generic.img
./sandbox/tools/mkimage: Can't open /boot/vmlinuz-3.2.0-53-generic:
Permission denied
done.
So maybe you should adjust mkimage to open the image read-only in the case
where it will not need to update it?
Regards,
Simon
More information about the U-Boot
mailing list