From 6f3228a648a7ee82a0af424382d4dc55b6ee3dc5 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Mon, 3 Feb 2025 14:27:16 -0700 Subject: meta-xilinx-core: qemuboot-xilinx.bbclass: Cleanup variables QB_MACHINE is now set in each base machine. This ensures that the default configuration is correct, and can still be overriden if necessary. This solves a problem where bitbake -e could fail to expand properly in some cases. QB_DEFAULT_KERNEL was removed, and restored back to the default settings. The defaults now work properly with all tested configurations. Note: simpleImage.mb is obsolete and no longer used in this context. Signed-off-by: Mark Hatle --- meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass | 12 ------------ meta-xilinx-core/conf/machine/microblaze-generic.conf | 2 ++ meta-xilinx-core/conf/machine/versal-generic.conf | 2 ++ meta-xilinx-core/conf/machine/versal-net-generic.conf | 2 ++ meta-xilinx-core/conf/machine/zynq-generic.conf | 2 ++ meta-xilinx-core/conf/machine/zynqmp-generic.conf | 2 ++ 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass index 67612d05..2b704645 100644 --- a/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass +++ b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass @@ -3,12 +3,7 @@ OVERRIDES .= ":qemuboot-xilinx" # Default machine targets for Xilinx QEMU (FDT Generic) -# Allow QB_MACHINE to be overridden by a BSP config -QB_MACHINE ?= "${QB_MACHINE_XILINX}" QB_RNG="" -QB_MACHINE_XILINX:aarch64 = "-machine arm-generic-fdt" -QB_MACHINE_XILINX:arm = "-M arm-generic-fdt-7series" -QB_MACHINE_XILINX:microblaze = "-M microblaze-fdt-plnx" QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" QB_DEFAULT_FSTYPE ?= "${@qemu_rootfs_params(d,'fstype')}" @@ -16,13 +11,6 @@ QB_ROOTFS ?= "${@qemu_rootfs_params(d,'rootfs')}" QB_ROOTFS_OPT ?= "${@qemu_rootfs_params(d,'rootfs-opt')}" QB_DTB ?= "${@qemu_default_dtb(d)}" -# defaults -QB_DEFAULT_KERNEL ?= "none" -QB_DEFAULT_KERNEL:zynq ?= "${@'zImage' if \ - d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'zImage-initramfs-${MACHINE}.bin'}" -QB_DEFAULT_KERNEL:microblaze ?= "${@'simpleImage.mb' if \ - d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'simpleImage.mb-initramfs-${MACHINE}.bin'}" - # https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Boot-Mode-Pin-Settings # https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/Boot-Modes # https://docs.amd.com/r/en-US/ug1304-versal-acap-ssdg/Boot-Device-Modes diff --git a/meta-xilinx-core/conf/machine/microblaze-generic.conf b/meta-xilinx-core/conf/machine/microblaze-generic.conf index 9af5e83b..deb00d29 100644 --- a/meta-xilinx-core/conf/machine/microblaze-generic.conf +++ b/meta-xilinx-core/conf/machine/microblaze-generic.conf @@ -54,6 +54,8 @@ EXTRA_IMAGEDEPENDS += " \ IMAGE_FSTYPES += "cpio.gz" # Microblaze QEMU Configurations +QB_MACHINE ?= "-M microblaze-fdt-plnx" + QB_MEM ?= "-m 2G" QB_KERNEL_CMDLINE_APPEND ?= "console=ttyUL0,115200 root=/dev/ram0 rw" QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" diff --git a/meta-xilinx-core/conf/machine/versal-generic.conf b/meta-xilinx-core/conf/machine/versal-generic.conf index 80ad17b9..de900af0 100644 --- a/meta-xilinx-core/conf/machine/versal-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-generic.conf @@ -47,6 +47,8 @@ IMAGE_BOOT_FILES += " \ # Versal QEMU Configurations # This machine has a QEMU model, runqemu setup: +QB_MACHINE ?= "-machine arm-generic-fdt" + QB_MEM ?= "-m 8G" QB_DEFAULT_KERNEL ?= "none" # Iteration appears to be eth0 then eth1 diff --git a/meta-xilinx-core/conf/machine/versal-net-generic.conf b/meta-xilinx-core/conf/machine/versal-net-generic.conf index 83ec54b6..eef3e8d5 100644 --- a/meta-xilinx-core/conf/machine/versal-net-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-net-generic.conf @@ -47,6 +47,8 @@ IMAGE_BOOT_FILES += " \ # Versal QEMU Configurations # This machine has a QEMU model, runqemu setup: +QB_MACHINE ?= "-machine arm-generic-fdt" + QB_MEM ?= "-m 8G" QB_DEFAULT_KERNEL ?= "none" # Iteration appears to be eth0 then eth1 diff --git a/meta-xilinx-core/conf/machine/zynq-generic.conf b/meta-xilinx-core/conf/machine/zynq-generic.conf index 661b3340..9355d6d2 100644 --- a/meta-xilinx-core/conf/machine/zynq-generic.conf +++ b/meta-xilinx-core/conf/machine/zynq-generic.conf @@ -44,6 +44,8 @@ IMAGE_FSTYPES += "${@'wic.qemu-sd' if (d.getVar('INITRAMFS_IMAGE') or '') == '' # Zynq-7000 QEMU Configurations # This machine has a QEMU model, runqemu setup: +QB_MACHINE ?= "-M arm-generic-fdt-7series" + QB_MEM ?= "-m 1024" QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" diff --git a/meta-xilinx-core/conf/machine/zynqmp-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-generic.conf index ec17c297..1be1789f 100644 --- a/meta-xilinx-core/conf/machine/zynqmp-generic.conf +++ b/meta-xilinx-core/conf/machine/zynqmp-generic.conf @@ -57,6 +57,8 @@ IMAGE_BOOT_FILES += " \ # ZynqMP QEMU Configurations # This machine has a QEMU model, runqemu setup: +QB_MACHINE ?= "-machine arm-generic-fdt" + QB_MEM ?= "-m 4096" # Iteration appears to be eth3, eth2, eth1, eth0 QB_NETWORK_DEVICE ?= "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" -- cgit v1.2.3-54-g00ecf