[gnome-continuous-yocto/gnomeostree-3.28-rocko: 428/8267] kernel: fitimage: Repair misuse of shell test command



commit d3a2da45b6a0a0cf249d68ccb80d58b259b2ddca
Author: Marek Vasut <marex denx de>
Date:   Sun May 8 13:21:53 2016 +0200

    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>

 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 809bd4d..298eda2 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}" \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]