public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Cc: Quirin Gylstorff <quirin.gylstorff@siemens.com>,
	Venkata Pyla <venkata.pyla@toshiba-tsip.com>
Subject: [PATCH] initramfs: Fix detection of kernel image
Date: Tue, 20 Jun 2023 18:58:46 +0200	[thread overview]
Message-ID: <892c6e34-bd87-04fa-1155-dad3fd060b93@siemens.com> (raw)

From: Jan Kiszka <jan.kiszka@siemens.com>

This can also be vmlinuz-.... Broken like this when using the class for
x86 e.g.:

Log data follows:
| DEBUG: Executing python function sstate_task_prefunc
| DEBUG: Python function sstate_task_prefunc finished
| DEBUG: Executing shell function do_generate_initramfs
| update-initramfs: Generating /boot/initrd.img-vmlinux*
| W: No zstd in /usr/bin:/sbin:/bin, using gzip
| grep: /boot/config-vmlinux*: No such file or directory
| E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
| update-initramfs: failed for /boot/initrd.img-vmlinux* with 1.
| WARNING: exit code 1 from a shell command.
ERROR: Task (/build/../work/recipes-initramfs/cip-core-initramfs/cip-core-initramfs.bb:do_generate_initramfs) failed with exit code '1'

Reported-by: Venkata Pyla <venkata.pyla@toshiba-tsip.com>
Fixes: 961a56828ca3 ("classes/initramfs: Print messages in case of a build error")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/classes/initramfs.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/initramfs.bbclass b/meta/classes/initramfs.bbclass
index 817e97a3..925c3f6d 100644
--- a/meta/classes/initramfs.bbclass
+++ b/meta/classes/initramfs.bbclass
@@ -44,7 +44,7 @@ do_generate_initramfs() {
     fi
 
     sudo -E chroot "${INITRAMFS_ROOTFS}" sh -c '\
-        export kernel_version=$(basename /boot/vmlinux* | cut -d'-' -f2-); \
+        export kernel_version=$(basename /boot/vmlinu[xz]* | cut -d'-' -f2-); \
         if [ -n "$kernel_version" ]; then \
           update-initramfs -u -v -k "$kernel_version"; \
         else \
-- 
2.35.3

             reply	other threads:[~2023-06-20 16:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 16:58 Jan Kiszka [this message]
2023-06-22  5:12 ` Uladzimir Bely

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=892c6e34-bd87-04fa-1155-dad3fd060b93@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.com \
    --cc=quirin.gylstorff@siemens.com \
    --cc=venkata.pyla@toshiba-tsip.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