summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@amd.com>2025-02-03 14:27:16 -0700
committerMark Hatle <mark.hatle@amd.com>2025-03-30 14:16:15 -0600
commit6f3228a648a7ee82a0af424382d4dc55b6ee3dc5 (patch)
treeb997ec513eb50d5c573cff7f3c444b766d225395
parent82cb81d5911529ed1499f310fa02937ef3f82bc6 (diff)
downloadmeta-xilinx-6f3228a648a7ee82a0af424382d4dc55b6ee3dc5.tar.gz
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 <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass12
-rw-r--r--meta-xilinx-core/conf/machine/microblaze-generic.conf2
-rw-r--r--meta-xilinx-core/conf/machine/versal-generic.conf2
-rw-r--r--meta-xilinx-core/conf/machine/versal-net-generic.conf2
-rw-r--r--meta-xilinx-core/conf/machine/zynq-generic.conf2
-rw-r--r--meta-xilinx-core/conf/machine/zynqmp-generic.conf2
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 @@
3OVERRIDES .= ":qemuboot-xilinx" 3OVERRIDES .= ":qemuboot-xilinx"
4 4
5# Default machine targets for Xilinx QEMU (FDT Generic) 5# Default machine targets for Xilinx QEMU (FDT Generic)
6# Allow QB_MACHINE to be overridden by a BSP config
7QB_MACHINE ?= "${QB_MACHINE_XILINX}"
8QB_RNG="" 6QB_RNG=""
9QB_MACHINE_XILINX:aarch64 = "-machine arm-generic-fdt"
10QB_MACHINE_XILINX:arm = "-M arm-generic-fdt-7series"
11QB_MACHINE_XILINX:microblaze = "-M microblaze-fdt-plnx"
12 7
13QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" 8QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}"
14QB_DEFAULT_FSTYPE ?= "${@qemu_rootfs_params(d,'fstype')}" 9QB_DEFAULT_FSTYPE ?= "${@qemu_rootfs_params(d,'fstype')}"
@@ -16,13 +11,6 @@ QB_ROOTFS ?= "${@qemu_rootfs_params(d,'rootfs')}"
16QB_ROOTFS_OPT ?= "${@qemu_rootfs_params(d,'rootfs-opt')}" 11QB_ROOTFS_OPT ?= "${@qemu_rootfs_params(d,'rootfs-opt')}"
17QB_DTB ?= "${@qemu_default_dtb(d)}" 12QB_DTB ?= "${@qemu_default_dtb(d)}"
18 13
19# defaults
20QB_DEFAULT_KERNEL ?= "none"
21QB_DEFAULT_KERNEL:zynq ?= "${@'zImage' if \
22 d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'zImage-initramfs-${MACHINE}.bin'}"
23QB_DEFAULT_KERNEL:microblaze ?= "${@'simpleImage.mb' if \
24 d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'simpleImage.mb-initramfs-${MACHINE}.bin'}"
25
26# https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Boot-Mode-Pin-Settings 14# https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/Boot-Mode-Pin-Settings
27# https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/Boot-Modes 15# https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/Boot-Modes
28# https://docs.amd.com/r/en-US/ug1304-versal-acap-ssdg/Boot-Device-Modes 16# 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 += " \
54IMAGE_FSTYPES += "cpio.gz" 54IMAGE_FSTYPES += "cpio.gz"
55 55
56# Microblaze QEMU Configurations 56# Microblaze QEMU Configurations
57QB_MACHINE ?= "-M microblaze-fdt-plnx"
58
57QB_MEM ?= "-m 2G" 59QB_MEM ?= "-m 2G"
58QB_KERNEL_CMDLINE_APPEND ?= "console=ttyUL0,115200 root=/dev/ram0 rw" 60QB_KERNEL_CMDLINE_APPEND ?= "console=ttyUL0,115200 root=/dev/ram0 rw"
59QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" 61QB_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 += " \
47 47
48# Versal QEMU Configurations 48# Versal QEMU Configurations
49# This machine has a QEMU model, runqemu setup: 49# This machine has a QEMU model, runqemu setup:
50QB_MACHINE ?= "-machine arm-generic-fdt"
51
50QB_MEM ?= "-m 8G" 52QB_MEM ?= "-m 8G"
51QB_DEFAULT_KERNEL ?= "none" 53QB_DEFAULT_KERNEL ?= "none"
52# Iteration appears to be eth0 then eth1 54# 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 += " \
47 47
48# Versal QEMU Configurations 48# Versal QEMU Configurations
49# This machine has a QEMU model, runqemu setup: 49# This machine has a QEMU model, runqemu setup:
50QB_MACHINE ?= "-machine arm-generic-fdt"
51
50QB_MEM ?= "-m 8G" 52QB_MEM ?= "-m 8G"
51QB_DEFAULT_KERNEL ?= "none" 53QB_DEFAULT_KERNEL ?= "none"
52# Iteration appears to be eth0 then eth1 54# 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 '') == ''
44 44
45# Zynq-7000 QEMU Configurations 45# Zynq-7000 QEMU Configurations
46# This machine has a QEMU model, runqemu setup: 46# This machine has a QEMU model, runqemu setup:
47QB_MACHINE ?= "-M arm-generic-fdt-7series"
48
47QB_MEM ?= "-m 1024" 49QB_MEM ?= "-m 1024"
48QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" 50QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@"
49 51
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 += " \
57 57
58# ZynqMP QEMU Configurations 58# ZynqMP QEMU Configurations
59# This machine has a QEMU model, runqemu setup: 59# This machine has a QEMU model, runqemu setup:
60QB_MACHINE ?= "-machine arm-generic-fdt"
61
60QB_MEM ?= "-m 4096" 62QB_MEM ?= "-m 4096"
61# Iteration appears to be eth3, eth2, eth1, eth0 63# Iteration appears to be eth3, eth2, eth1, eth0
62QB_NETWORK_DEVICE ?= "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" 64QB_NETWORK_DEVICE ?= "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@"