From patchwork Tue Jul 2 08:14:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Amstutz X-Patchwork-Id: 45914 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30D86C3064D for ; Tue, 2 Jul 2024 08:14:48 +0000 (UTC) Subject: [kirkstone][PATCH] uboot-sign: Fix index error in concat_dtb_helper() with multiple configs To: openembedded-core@lists.openembedded.org From: "Florian Amstutz" X-Originating-Location: Malters, Lucerne, CH (178.197.211.131) X-Originating-Platform: Windows Chrome 126 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Tue, 02 Jul 2024 01:14:40 -0700 Message-ID: List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 02 Jul 2024 08:14:48 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/201414 Since j is not unset after the inner loop, the image will only be copied for the first configuration. Signed-off-by: Florian Amstutz --- meta/classes/uboot-sign.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.34.1 diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass index 6bb4ddc600..5b75c8a3b0 100644 --- a/meta/classes/uboot-sign.bbclass +++ b/meta/classes/uboot-sign.bbclass @@ -137,8 +137,7 @@ concat_dtb_helper() { if [ -n "${UBOOT_CONFIG}" ] then -                               i=0 -                               j=0 +                               unset i j for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do @@ -148,7 +147,9 @@ concat_dtb_helper() { cp ${UBOOT_IMAGE} ${B}/${CONFIG_B_PATH}/u-boot-$type.${UBOOT_SUFFIX} fi done +                                       unset j done +                               unset i fi else bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available."