Commit Graph

10 Commits

Author SHA1 Message Date
Weisser, Pascal.ext
2e9e8f6fb3 qemuboot: Trigger write_qemuboot_conf task on changes of kernel image realpath
The qemuboot.conf file contains the realpath of the kernel image
referenced by QB_DEFAULT_KERNEL. So, it must be recreated in case the
realpath of the referenced kernel image changes.

The variables KERNEL_IMAGE_NAME and KERNEL_IMAGE_BIN_EXT determine the
realpath of the kernel image relative to DEPLOY_DIR_IMAGE. Adding both of
them to the vardeps of the write_qemuboot_conf task triggers the
write_qemuboot_conf task in case the realpath of the kernel image
referenced by QB_DEFAULT_KERNEL changes.

Fixes: [YOCTO 15525]

(From OE-Core rev: f8b3975a9ce36ea7af5fd76243a823da2842415b)

Signed-off-by: "Weisser, Pascal" <pascal.weisser.ext@karlstorz.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-07-04 22:56:15 +01:00
Ross Burton
daa6afead8 classes/qemuboot: add depends on qemu-system-native and qemu-helper-native
Any image that inherits qemuboot must also add image dependencies on
qemu-system-native and qemu-helper-native, otherwise the image won't
be able to be booted.

Currently this is done by conf/machine/include/qemu.inc, but not every
machine that uses qemuboot includes that file.

Move the EXTRA_IMAGEDEPENDS from qemu.inc into qemuboot.bbclass, so that
the dependencies don't have to be duplicated.

(From OE-Core rev: dd54cf058f632e985917ff227483995f368e6a7d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-03-25 13:01:14 +00:00
Joe Slater
c2e742e2be qemuboot: predictable network interface names
Allow interface renaming if 'pni-names' is a distro
feature.

We do not add QB_NO_PNI to QB_CMDLINE_IP_SLIRP because
renaming was never suppressed for slirp.

(From OE-Core rev: d8d92ad46273a4e305f690f2820a475e4d7f6701)

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2024-02-21 22:20:10 +00:00
Marcus Folkesson
37dc9faae0 qemuboot.bbclass: fix typos in documentation
comand -> command
docuemntation -> documentation

(From OE-Core rev: 302228fb858384a7ef4e46ecae80d1ebbc00f1a7)

Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-23 10:49:19 +01:00
Ross Burton
a4857688c3 qemuboot: reduce default size of software I/O translation buffer
With 6.5+ (specifically, if DMA_BOUNCE_UNALIGNED_KMALLOC is set) the
SWIOTLB is used, and it defaults to 64MB. This is too much when there's
only 256MB of RAM, so request 0 slabs and lets the kernel round up to
the appropriate minimum (1MB on aarch64, typically). In virtual hardware
there's very little need for these bounce buffers, so the 64MB would be
mostly wasted.

(From OE-Core rev: 369e768d87b80be9efe76937bfafeddabc35f559)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-10-09 15:51:13 +01:00
Richard Purdie
71282bbc53 qemuboot: Update hardcoded path to match new layout
Obviously this code is horrible and shouldn't hardcode it. Update it to match
the WORKDIR change to drop PE/PR for now.

(From OE-Core rev: 05095c116602d1a8c388cc02afffcc36230138f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-11 13:22:01 +01:00
Richard Purdie
afcd4b9cbc qemuboot/runqemu: Fix 6.2 and later kernel network device naming
With kernel 6.2 and later network devices are renamed by systemd. This does not
match with the current network device naming assumed in our configuration.

We may or may not change that naming but for now, pass the right kernel commandline
so things work as expected with newer kernels and removing a blocker on upgrading
to the 6.4 kernel by default.

(From OE-Core rev: 9e9c33d51e401fe2b4a632db74ccb3449e4b23ee)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-08-09 13:22:00 +01:00
Xiangyu Chen
45f278ed23 qemuboot.bbclass: add QB_NFSROOTFS_EXTRA_OPT for nfs rootfs extra option
This extra options to be appended to the nfs rootfs options in kernel boot arg.

(From OE-Core rev: a255a7f350b558445f4f6c29f60e77c33883b08a)

Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-01-26 22:22:53 +00:00
Jagadeesh Krishnanjanappa
80b0e933a0 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]

(From OE-Core rev: 52371624313184e1a825519160c3833e282df8b9)

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>
2022-12-21 10:16:31 +00:00
Richard Purdie
fd1517e2b5 classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.

(From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-08-12 15:27:17 +01:00