summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorJagadeesh Krishnanjanappa <workjagadeesh@gmail.com>2022-12-13 14:58:36 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-01-06 17:31:37 +0000
commit0c63018ef3843cfefd2be31c0a6693181037410d (patch)
tree00aaac0b484b819d94082fffad3b05fdf892dd86 /meta/classes
parent22fef4e278beae60d1a6afbe4645fb36732bc736 (diff)
downloadopenembedded-core-contrib-0c63018ef3843cfefd2be31c0a6693181037410d.tar.gz
qemuboot.bbclass: make sure runqemu boots bundled initramfs kernel image
The QB_DEFAULT_KERNEL is set to pick bundled initramfs kernel image if the Linux kernel image is generated with INITRAMFS_IMAGE_BUNDLE="1". This makes runqemu to automatically pick bundled initramfs kernel image instead of explicitly mentioning bundled initramfs kernel image in runqemu. [YOCTO #14748] Signed-off-by: Jagadeesh Krishnanjanappa <workjagadeesh@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 52371624313184e1a825519160c3833e282df8b9) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/qemuboot.bbclass3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 648af09b6e..92ae69d9f2 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -7,6 +7,7 @@
# QB_OPT_APPEND: options to append to qemu, e.g., "-show-cursor"
#
# QB_DEFAULT_KERNEL: default kernel to boot, e.g., "bzImage"
+# e.g., "bzImage-initramfs-qemux86-64.bin" if INITRAMFS_IMAGE_BUNDLE is set to 1.
#
# QB_DEFAULT_FSTYPE: default FSTYPE to boot, e.g., "ext4"
#
@@ -75,7 +76,7 @@
QB_MEM ?= "-m 256"
QB_SERIAL_OPT ?= "-serial mon:stdio -serial null"
-QB_DEFAULT_KERNEL ?= "${KERNEL_IMAGETYPE}"
+QB_DEFAULT_KERNEL ?= "${@bb.utils.contains("INITRAMFS_IMAGE_BUNDLE", "1", "${KERNEL_IMAGETYPE}-${INITRAMFS_LINK_NAME}.bin", "${KERNEL_IMAGETYPE}", d)}"
QB_DEFAULT_FSTYPE ?= "ext4"
QB_OPT_APPEND ?= "-show-cursor"
QB_NETWORK_DEVICE ?= "-device virtio-net-pci,netdev=net0,mac=@MAC@"