* [PATCH] wic/plugins: fix kernel version detection for bios
@ 2021-02-04 16:34 Henning Schild
0 siblings, 0 replies; only message in thread
From: Henning Schild @ 2021-02-04 16:34 UTC (permalink / raw)
To: isar-users; +Cc: Vijai Kumar K, Henning Schild
From: Henning Schild <henning.schild@siemens.com>
The mechanism used to "cut off the end" seems to cut off too much.
>>> "vmlinuz-4.19.0-14-amd64".strip('-' + 'amd64')
'vmlinuz-4.19.0-1'
But indeed we would hope for 'vmlinuz-4.19.0-14'. This is a fix that
should be aplied asap, it seems to affect all "even" kernel revisions,
"odd" is odly enough no problem.
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
index 493615b481..503c471cce 100644
--- a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
+++ b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py
@@ -135,7 +135,7 @@ class BootimgPcbiosIsarPlugin(SourcePlugin):
kernel_name = get_bitbake_var("KERNEL_NAME")
rootfs_dir = get_bitbake_var("IMAGE_ROOTFS")
kernel = os.path.basename(os.path.realpath(os.path.join(rootfs_dir, kernel_file)))
- kernel_version = kernel.strip('-' + kernel_name).strip(kernel_file + '-')
+ kernel_version = kernel[len(kernel_file)+1:-(len(kernel_name)+1)]
initrd = "initrd.img-%s-%s" % (kernel_version, kernel_name)
syslinux_conf += "KERNEL " + kernel + "\n"
--
2.26.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-02-04 16:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 16:34 [PATCH] wic/plugins: fix kernel version detection for bios Henning Schild
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox