public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: claudius.heine.ext@siemens.com
To: isar-users@googlegroups.com
Cc: Claudius Heine <ch@denx.de>
Subject: [PATCH 1/2] image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed
Date: Thu, 16 May 2019 14:50:29 +0200	[thread overview]
Message-ID: <20190516125030.13190-2-claudius.heine.ext@siemens.com> (raw)
In-Reply-To: <20190516125030.13190-1-claudius.heine.ext@siemens.com>

From: Claudius Heine <ch@denx.de>

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 <ch@denx.de>
---
 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


  reply	other threads:[~2019-05-16 12:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-16 12:50 [PATCH 0/2] Fix of #56 claudius.heine.ext
2019-05-16 12:50 ` claudius.heine.ext [this message]
2019-05-16 13:32   ` [PATCH 1/2] image.bbclass: make KERNEL_IMAGE & INITRD_IMAGE variable fixed Claudius Heine
2019-05-16 12:50 ` [PATCH 2/2] Revert "meta/classes/image: Call transform_template after rootfs_install" claudius.heine.ext
2019-05-17 10:58   ` Maxim Yu. Osipov
2019-05-20  7:19     ` Claudius Heine
2019-05-20 19:47       ` Baurzhan Ismagulov
2019-05-21  8:06         ` Claudius Heine
2019-05-18 11:35 ` [PATCH 0/2] Fix of #56 Maxim Yu. Osipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190516125030.13190-2-claudius.heine.ext@siemens.com \
    --to=claudius.heine.ext@siemens.com \
    --cc=ch@denx.de \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox