diff options
| author | Mark Hatle <mark.hatle@amd.com> | 2023-01-14 17:20:38 -0800 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2023-04-10 09:03:22 -0700 |
| commit | a7d6409f885b01429bd9d2e3d4d89f652362af0a (patch) | |
| tree | 36cf329c4fa3fe708739f4328fb857b6bb8ca454 | |
| parent | ae1383983506fca16ad26490fcacfdd68e6776ba (diff) | |
| download | meta-xilinx-a7d6409f885b01429bd9d2e3d4d89f652362af0a.tar.gz | |
qemu-xilinx-system-native: Move pmu-rom enablement to recipe
Setting the pmu-rom being required by QEMU within the machine.conf will cause
the recipe's hash to change, which can cause a ripple effect causing other
things to rebuild. Moving this to the recipe, and switching it on based
on what licenses the user allows will avoid this conflict.
Additionally add a warning message to the xilinx-vars.bbclass if the user has
not enabled the license.
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
3 files changed, 8 insertions, 3 deletions
diff --git a/meta-xilinx-core/classes/xilinx-vars.bbclass b/meta-xilinx-core/classes/xilinx-vars.bbclass index a1a0e38c..51d3cd87 100644 --- a/meta-xilinx-core/classes/xilinx-vars.bbclass +++ b/meta-xilinx-core/classes/xilinx-vars.bbclass | |||
| @@ -23,4 +23,10 @@ python xilinx_variables_config_eventhandler () { | |||
| 23 | bb.fatal("The loaded DEFAULTTUNE is %s, but it appears you intended %s. " \ | 23 | bb.fatal("The loaded DEFAULTTUNE is %s, but it appears you intended %s. " \ |
| 24 | "This is usually as a result of specifying it after the 'require' in the machine .conf file. " \ | 24 | "This is usually as a result of specifying it after the 'require' in the machine .conf file. " \ |
| 25 | "See meta-xilinx-core/conf/machine/README." % (tune_prior, tune_final)) | 25 | "See meta-xilinx-core/conf/machine/README." % (tune_prior, tune_final)) |
| 26 | |||
| 27 | # Verify 'xilinx' is in LICENSE_FLAGS_ACCEPTED | ||
| 28 | license_flags = d.getVar('LICENSE_FLAGS_ACCEPTED') or "" | ||
| 29 | if 'xilinx' not in license_flags.split(): | ||
| 30 | bb.warn("The ZynqMP pmu-rom is not enabled, qemu may not be able to emulate a ZynqMP system without it. " \ | ||
| 31 | "To enable this you must add 'xilinx' to the LICENSE_FLAGS_ACCEPTED to indicate you accept the software license.") | ||
| 26 | } | 32 | } |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-generic.conf index 1ca25862..6c01548f 100644 --- a/meta-xilinx-core/conf/machine/zynqmp-generic.conf +++ b/meta-xilinx-core/conf/machine/zynqmp-generic.conf | |||
| @@ -60,9 +60,6 @@ HDF_MACHINE = "zcu102-zynqmp" | |||
| 60 | # Basic features: | 60 | # Basic features: |
| 61 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget wifi bluetooth" | 61 | MACHINE_FEATURES += "rtc ext2 ext3 vfat usbhost usbgadget wifi bluetooth" |
| 62 | 62 | ||
| 63 | # Qemu Xilinx Native when targeting ZynqMP generic requires the pmu rom | ||
| 64 | DEPENDS:append:pn-qemu-xilinx-native = " pmu-rom-native" | ||
| 65 | |||
| 66 | # Default SD image build onfiguration, use qemu-sd to pad | 63 | # Default SD image build onfiguration, use qemu-sd to pad |
| 67 | IMAGE_CLASSES += "image-types-xilinx-qemu" | 64 | IMAGE_CLASSES += "image-types-xilinx-qemu" |
| 68 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies | 65 | # Add wic.qemu-sd only if initramfs_image not set due to circular dependecies |
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend new file mode 100644 index 00000000..0444dbab --- /dev/null +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_%.bbappend | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | # Automatically enable pmu-rom-native for ZynqMP support, or warn the user | ||
| 2 | DEPENDS .= "${@' pmu-rom-native' if 'xilinx' in d.getVar('LICENSE_FLAGS_ACCEPTED').split() else ''}" | ||
