diff options
author | Marek Vasut <marex@denx.de> | 2016-05-08 13:21:53 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-20 10:20:21 +0100 |
commit | 158cbd737f9f6c2de756506caf919a0a3d0a05b9 (patch) | |
tree | 0f012e5154ec30fdf31cc9ef39346b61e8bf54cd | |
parent | 28777e593d3dd3a5d0ee2effcdca6a971e2887f9 (diff) | |
download | openembedded-core-158cbd737f9f6c2de756506caf919a0a3d0a05b9.tar.gz openembedded-core-158cbd737f9f6c2de756506caf919a0a3d0a05b9.tar.bz2 openembedded-core-158cbd737f9f6c2de756506caf919a0a3d0a05b9.zip |
kernel: fitimage: Repair misuse of shell test command
The kernel fitImage must be amended with signature if and only if
UBOOT_SIGN_ENABLE = 1 . In the current case, the UBOOT_SIGN_ENABLE
could be either 0 (default) or 1 , which test -n always correctly
interprets as non-empty string, thus always true. This does not
match the logic above though, so replace the test with check which
passes only for UBOOT_SIGN_ENABLE = 1 .
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Yannick Gicquel <yannick.gicquel@iot.bzh>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r-- | meta/classes/kernel-fitimage.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass index 809bd4d698..298eda2a23 100644 --- a/meta/classes/kernel-fitimage.bbclass +++ b/meta/classes/kernel-fitimage.bbclass @@ -250,7 +250,7 @@ do_assemble_fitimage() { # # Step 5: Sign the image and add public key to U-Boot dtb # - if test -n "${UBOOT_SIGN_ENABLE}"; then + if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then uboot-mkimage \ ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ -F -k "${UBOOT_SIGN_KEYDIR}" \ |