On Mon, Jul 6, 2026 at 10:33 PM Jon Mason <[email protected]> wrote: > > On Wed, Jul 1, 2026 at 7:58 AM Alex Kiernan via lists.openembedded.org > <[email protected]> wrote: > > > > Add a QEMU machine for exercising an AArch32-only ARMv8-A target > > (Cortex-A32) under emulation, defaulting to the cortexa32-crypto tune. > > QEMU has no Cortex-A32 model, so it runs on the 'virt' machine with > > qemu-system-arm and -cpu max, which provides the ARMv8-A AArch32 feature > > set including the crypto extensions needed by the crypto tune. The kernel > > is built as a zImage and u-boot uses qemu_arm_defconfig, matching the > > other 32-bit ARM QEMU machines. > > > > Map KMACHINE to qemuarma15 so the existing linux-yocto BSP is reused, and > > add qemuarmv8a32 to linux-yocto's COMPATIBLE_MACHINE so a kernel can be > > built for it. > > > > AI-Generated: Claude Code (Claude Opus 4.8) > > Signed-off-by: Alex Kiernan <[email protected]> > > Signed-off-by: Alex Kiernan <[email protected]> > > --- > > meta/conf/machine/qemuarmv8a32.conf | 36 > > +++++++++++++++++++++++++++ > > meta/recipes-kernel/linux/linux-yocto_6.18.bb | 2 +- > > 2 files changed, 37 insertions(+), 1 deletion(-) > > > > diff --git a/meta/conf/machine/qemuarmv8a32.conf > > b/meta/conf/machine/qemuarmv8a32.conf > > new file mode 100644 > > index 000000000000..8e49a56ae720 > > --- /dev/null > > +++ b/meta/conf/machine/qemuarmv8a32.conf > > @@ -0,0 +1,36 @@ > > +#@TYPE: Machine > > +#@NAME: QEMU ARMv8 AArch32 machine on Cortex-A32 > > +#@DESCRIPTION: Machine configuration for running an AArch32 system on QEMU > > + > > +DEFAULTTUNE = "cortexa32-crypto" > > + > > +require conf/machine/include/arm/armv8a/tune-cortexa32.inc > > +require conf/machine/include/qemu.inc > > + > > +KERNEL_IMAGETYPE = "zImage" > > + > > +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" > > +UBOOT_MACHINE ?= "qemu_arm_defconfig" > > + > > +SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0" > > + > > +# For runqemu > > +QB_SYSTEM_NAME = "qemu-system-arm" > > +QB_MACHINE = "-machine virt" > > +# QEMU doesn't know about Cortex-A32 > > +QB_CPU = "-cpu max" > > I have concerns that this isn't doing what is expected. Looking at > qemu-system-arm -machine virt -cpu > I'm seeing > ... > cortex-a15 > cortex-a7 > cortex-a8 > cortex-a9 > ... > and not any of the armv8 cores. So, I think that you aren't going to > get any of the ARMv8 features with 'max', despite them possibly being > in the tune referenced above, which might cause crashes or other > unintended issues.
Totally agree... this is the part I really wasn't happy with. > You might be okay on qemu-system-aarch64, given the ARMv8 cores there. > Maybe you can try emulating the cortex-a35 core and running it in > 32bit mode > At some point I had this working, but I went around it repeatedly and failed to get it to work again :( The commented out pieces I have (which I'm 99% sure I had working): QB_SYSTEM_NAME = "qemu-system-aarch64" QB_CPU = "-cpu cortex-a32" QB_CPU_KVM = "-cpu host,aarch64=off -machine gic-version=3" Any pointers on what I might be missing? > If I'm wrong, please provide a link to the documentation stating that > max on qemu-system-arm does what you say, because I'm not seeing it on > https://www.qemu.org/docs/master/system/arm/virt.html > > Thanks, > Jon > > > +QB_SMP ?= "-smp 4" > > +QB_CPU_KVM = "-cpu host -machine gic-version=3" > > +# For graphics to work we need to define the VGA device as well as the > > necessary USB devices > > +QB_GRAPHICS = "-device virtio-gpu-pci" > > +QB_OPT_APPEND = "-device qemu-xhci -device usb-tablet -device usb-kbd" > > +# Virtio Networking support > > +QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" > > +QB_NETWORK_DEVICE = "-device virtio-net-pci,netdev=net0,mac=@MAC@" > > +# Virtio block device > > +QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device > > virtio-blk-pci,drive=disk0" > > +# Virtio serial console > > +QB_SERIAL_OPT = "-device virtio-serial-pci -chardev null,id=virtcon > > -device virtconsole,chardev=virtcon" > > +QB_TCPSERIAL_OPT = "-device virtio-serial-pci -chardev > > socket,id=virtcon,port=@PORT@,host=127.0.0.1,nodelay=on -device > > virtconsole,chardev=virtcon" > > + > > +KMACHINE:qemuarmv8a32 = "qemuarma15" > > diff --git a/meta/recipes-kernel/linux/linux-yocto_6.18.bb > > b/meta/recipes-kernel/linux/linux-yocto_6.18.bb > > index 2b1298dedf9c..a818506bb6f3 100644 > > --- a/meta/recipes-kernel/linux/linux-yocto_6.18.bb > > +++ b/meta/recipes-kernel/linux/linux-yocto_6.18.bb > > @@ -52,7 +52,7 @@ KCONF_BSP_AUDIT_LEVEL = "1" > > > > KERNEL_DEVICETREE:qemuarmv5 = "arm/versatile-pb.dtb" > > > > -COMPATIBLE_MACHINE = > > "^(qemuarm|qemuarmv5|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32|qemuloongarch64)$" > > +COMPATIBLE_MACHINE = > > "^(qemuarm|qemuarmv5|qemuarmv8a32|qemuarm64|qemux86|qemuppc|qemuppc64|qemumips|qemumips64|qemux86-64|qemuriscv64|qemuriscv32|qemuloongarch64)$" > > > > # Functionality flags > > KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" > > > > -- > > 2.43.0 > > > > > > > > -- Alex Kiernan
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#240368): https://lists.openembedded.org/g/openembedded-core/message/240368 Mute This Topic: https://lists.openembedded.org/mt/120062731/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
