From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6691606441308979200 X-Received: by 2002:a1c:e708:: with SMTP id e8mr17066600wmh.11.1558011034439; Thu, 16 May 2019 05:50:34 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:b642:: with SMTP id i2ls1479853wre.13.gmail; Thu, 16 May 2019 05:50:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaQ092E+uT69/BFr/Rk0HXeL26GeolzE1ynnOZFrYjqzGS0PAArSa85A/gCAnZyymLMnMI X-Received: by 2002:adf:edc5:: with SMTP id v5mr4137027wro.257.1558011034057; Thu, 16 May 2019 05:50:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558011034; cv=none; d=google.com; s=arc-20160816; b=EhJKZyIOzqm2uumecSNMl7FBtU4ikIQ1lmzdbwE8R97IRLKk12TxSTASzIANSNTPC6 z11PpXDIKQB3TiIo+fA6ChcZ8j6xus9fZgtQ1egPHE53vkxWepDh9mnZZtQjdLDhaovN E9DUI7CD1PEYWQDLFLRBoPl8b5iJPdrcxm92UUOpkr+4ayixnJRtP69k6syH3WMks5s7 Zbt6HM+eV974Hy4yZTscbMlCCrFBZgkRDcbuNMPAM5VCl3J1bG1q+yTjWBCApoHNhBqq FwFlVM2Xgjs6enm5KYgwvtKtrLL+2lmHqH4XgKxAPSxxWvdWeA9mJ/Rtl/NDt5KU8Mou 0tNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=2TrcQMxOXAT9zP45RTtnjByE1skzKneSRTCJAA9BQ9g=; b=x9gh4S8ChQH3U2GZz47ST9V3NecBtAb70jQtmMRK0YaIt/WHQC4olcuI63Qm6DvD/j mJl6fl4Iky4/Rfc98puEaaxmU9eBBPfZSRyWm5oWQav/iNZMOvBzBHTNUf857bfcKF+0 09ZIHBmmltWYnyquBYOEujL2EKEkwrafd7HWewx1PolT0rVPHobHRtKvtve5uNg6Q1tx QtevfNbzCEQRIyAPQficpYXUw7rGF/LZBcSrzPsbdT1hhTMGSULC6kPu7zH+A+1FWKtC JbvmCUWxgj1ekGEj7zg5RKF8AcfkuFtyb0u7iz1VCu3q9dX6p6hXKg4Qtp7yVX2MN6OD 6fsg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id j20si514338wme.0.2019.05.16.05.50.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 05:50:34 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id x4GCoXAr001508 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 16 May 2019 14:50:33 +0200 Received: from ring.ppmd.siemens.net (linux-ses-ext02.ppmd.siemens.net [139.25.69.232]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x4GCoX9C002601; Thu, 16 May 2019 14:50:33 +0200 From: claudius.heine.ext@siemens.com To: isar-users@googlegroups.com Cc: Claudius Heine Subject: [PATCH 1/2] image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed Date: Thu, 16 May 2019 14:50:29 +0200 Message-Id: <20190516125030.13190-2-claudius.heine.ext@siemens.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190516125030.13190-1-claudius.heine.ext@siemens.com> References: <20190516125030.13190-1-claudius.heine.ext@siemens.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: SWiEzbXU5v8x From: Claudius Heine Before the value of those variables where calculated at runtime with the content of the target root file system. But if the root file system does not contain the files yet or no longer, this variable will be empty, even if those files are already copied to the deploy directory. Setting this to fixed value allows to use them in every state of the root file system. Change from the last version is that KERNEL_IMAGE and INITRD_IMAGE variables not contain the `${PF}`, so that they don't overwrite each other. Signed-off-by: Claudius Heine --- meta/classes/image.bbclass | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 93d9bfc..398275f 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -13,8 +13,8 @@ IMAGE_INSTALL += "${@ ("linux-image-" + d.getVar("KERNEL_NAME", True)) if d.getV IMAGE_FULLNAME = "${PF}" # These variables are used by wic and start_vm -KERNEL_IMAGE ?= "${@get_image_name(d, 'vmlinuz')[1]}" -INITRD_IMAGE ?= "${@get_image_name(d, 'initrd.img')[1]}" +KERNEL_IMAGE ?= "${PF}-vmlinuz" +INITRD_IMAGE ?= "${PF}-initrd.img" # Useful variables for imager implementations: PP = "/home/builder/${PN}" @@ -149,12 +149,10 @@ addtask rootfs_install before do_build after do_unpack do_copy_boot_files[dirs] = "${DEPLOY_DIR_IMAGE}" do_copy_boot_files() { - KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')[1]} if [ -n "${KERNEL_IMAGE}" ]; then cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 'vmlinuz')[0]} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGE} fi - INITRD_IMAGE=${@get_image_name(d, 'initrd.img')[1]} if [ -n "${INITRD_IMAGE}" ]; then sudo cp -f ${IMAGE_ROOTFS}/boot/${@get_image_name(d, 'initrd.img')[0]} ${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE} fi -- 2.20.1