summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-05-08 13:21:53 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-20 10:20:54 +0100
commitd3a2da45b6a0a0cf249d68ccb80d58b259b2ddca (patch)
treea2e9908ccd3eccba9f9b7f4ce2292487bead21ee /meta/classes
parent5ca7cbf4df8f369dd62acf6bbe9ba7148494e929 (diff)
downloadpoky-d3a2da45b6a0a0cf249d68ccb80d58b259b2ddca.tar.gz
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 . (From OE-Core rev: 158cbd737f9f6c2de756506caf919a0a3d0a05b9) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/kernel-fitimage.bbclass2
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() {
250 # 250 #
251 # Step 5: Sign the image and add public key to U-Boot dtb 251 # Step 5: Sign the image and add public key to U-Boot dtb
252 # 252 #
253 if test -n "${UBOOT_SIGN_ENABLE}"; then 253 if [ "x${UBOOT_SIGN_ENABLE}" = "x1" ] ; then
254 uboot-mkimage \ 254 uboot-mkimage \
255 ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \ 255 ${@'-D "${UBOOT_MKIMAGE_DTCOPTS}"' if len('${UBOOT_MKIMAGE_DTCOPTS}') else ''} \
256 -F -k "${UBOOT_SIGN_KEYDIR}" \ 256 -F -k "${UBOOT_SIGN_KEYDIR}" \