diff options
author | Mark Hatle <mark.hatle@amd.com> | 2025-02-03 14:27:16 -0700 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2025-03-30 14:16:15 -0600 |
commit | 6f3228a648a7ee82a0af424382d4dc55b6ee3dc5 (patch) | |
tree | b997ec513eb50d5c573cff7f3c444b766d225395 | |
parent | 82cb81d5911529ed1499f310fa02937ef3f82bc6 (diff) | |
download | meta-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>
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 @@ | |||
3 | OVERRIDES .= ":qemuboot-xilinx" | 3 | OVERRIDES .= ":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 | ||
7 | QB_MACHINE ?= "${QB_MACHINE_XILINX}" | ||
8 | QB_RNG="" | 6 | QB_RNG="" |
9 | QB_MACHINE_XILINX:aarch64 = "-machine arm-generic-fdt" | ||
10 | QB_MACHINE_XILINX:arm = "-M arm-generic-fdt-7series" | ||
11 | QB_MACHINE_XILINX:microblaze = "-M microblaze-fdt-plnx" | ||
12 | 7 | ||
13 | QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" | 8 | QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" |
14 | QB_DEFAULT_FSTYPE ?= "${@qemu_rootfs_params(d,'fstype')}" | 9 | QB_DEFAULT_FSTYPE ?= "${@qemu_rootfs_params(d,'fstype')}" |
@@ -16,13 +11,6 @@ QB_ROOTFS ?= "${@qemu_rootfs_params(d,'rootfs')}" | |||
16 | QB_ROOTFS_OPT ?= "${@qemu_rootfs_params(d,'rootfs-opt')}" | 11 | QB_ROOTFS_OPT ?= "${@qemu_rootfs_params(d,'rootfs-opt')}" |
17 | QB_DTB ?= "${@qemu_default_dtb(d)}" | 12 | QB_DTB ?= "${@qemu_default_dtb(d)}" |
18 | 13 | ||
19 | # defaults | ||
20 | QB_DEFAULT_KERNEL ?= "none" | ||
21 | QB_DEFAULT_KERNEL:zynq ?= "${@'zImage' if \ | ||
22 | d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'zImage-initramfs-${MACHINE}.bin'}" | ||
23 | QB_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 += " \ | |||
54 | IMAGE_FSTYPES += "cpio.gz" | 54 | IMAGE_FSTYPES += "cpio.gz" |
55 | 55 | ||
56 | # Microblaze QEMU Configurations | 56 | # Microblaze QEMU Configurations |
57 | QB_MACHINE ?= "-M microblaze-fdt-plnx" | ||
58 | |||
57 | QB_MEM ?= "-m 2G" | 59 | QB_MEM ?= "-m 2G" |
58 | QB_KERNEL_CMDLINE_APPEND ?= "console=ttyUL0,115200 root=/dev/ram0 rw" | 60 | QB_KERNEL_CMDLINE_APPEND ?= "console=ttyUL0,115200 root=/dev/ram0 rw" |
59 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" | 61 | 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 += " \ | |||
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: |
50 | QB_MACHINE ?= "-machine arm-generic-fdt" | ||
51 | |||
50 | QB_MEM ?= "-m 8G" | 52 | QB_MEM ?= "-m 8G" |
51 | QB_DEFAULT_KERNEL ?= "none" | 53 | QB_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: |
50 | QB_MACHINE ?= "-machine arm-generic-fdt" | ||
51 | |||
50 | QB_MEM ?= "-m 8G" | 52 | QB_MEM ?= "-m 8G" |
51 | QB_DEFAULT_KERNEL ?= "none" | 53 | QB_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: |
47 | QB_MACHINE ?= "-M arm-generic-fdt-7series" | ||
48 | |||
47 | QB_MEM ?= "-m 1024" | 49 | QB_MEM ?= "-m 1024" |
48 | QB_NETWORK_DEVICE ?= "-net nic,netdev=net0,macaddr=@MAC@" | 50 | QB_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: |
60 | QB_MACHINE ?= "-machine arm-generic-fdt" | ||
61 | |||
60 | QB_MEM ?= "-m 4096" | 62 | QB_MEM ?= "-m 4096" |
61 | # Iteration appears to be eth3, eth2, eth1, eth0 | 63 | # Iteration appears to be eth3, eth2, eth1, eth0 |
62 | QB_NETWORK_DEVICE ?= "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" | 64 | QB_NETWORK_DEVICE ?= "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" |