diff options
author | John Toomey <john.toomey@xilinx.com> | 2022-07-26 17:36:13 +0100 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2022-07-28 12:49:51 -0700 |
commit | 843923cfc2083fe2f9c8bc83834331da527b5cb7 (patch) | |
tree | b5de4c557ac924175697714991aa38e1baca6a1a | |
parent | 57d107ea449d60bc279e9929009976d6d3ad95a5 (diff) | |
download | meta-xilinx-843923cfc2083fe2f9c8bc83834331da527b5cb7.tar.gz |
qemu-xilinx cleanup
Refactor qemuboot-xilinx.bbclass and machine-xilinx-qemu.inc. Following
the example of the core version of qemu.bbclass and match inc file.
Refactor some of the functions to make them more readable. Specifically
around qemu_rootfs_params. Code may not be as compact, but it'll be
easier to read (and update) in the future.
Add mising qemu-system-native PREFERRED_PROVIDER (and recipe PROVIDE).
This resolves the issue where occasionally you use runqemu and the qemu
binary appears to be missing.
*-generic.conf: Remove overrides that are the same as the default qemu
settings.
Remove :append operations on QB_OPT_APPEND, this allows easy override
when someone includes a generic machine.
Signed-off-by: John Toomey <jtoomey@xilinx.com>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org>
7 files changed, 134 insertions, 125 deletions
diff --git a/meta-xilinx-core/classes/qemuboot-xilinx.bbclass b/meta-xilinx-core/classes/qemuboot-xilinx.bbclass index 59d3f0ab..0f7c75ed 100644 --- a/meta-xilinx-core/classes/qemuboot-xilinx.bbclass +++ b/meta-xilinx-core/classes/qemuboot-xilinx.bbclass | |||
@@ -10,6 +10,12 @@ QB_MACHINE_XILINX:aarch64 = "-machine arm-generic-fdt" | |||
10 | QB_MACHINE_XILINX:arm = "-M arm-generic-fdt-7series" | 10 | QB_MACHINE_XILINX:arm = "-M arm-generic-fdt-7series" |
11 | QB_MACHINE_XILINX:microblaze = "-M microblaze-fdt-plnx" | 11 | QB_MACHINE_XILINX:microblaze = "-M microblaze-fdt-plnx" |
12 | 12 | ||
13 | QB_SYSTEM_NAME = "${@qemu_target_binary(d)}" | ||
14 | QB_DEFAULT_FSTYPE = "${@qemu_rootfs_params(d,'fstype')}" | ||
15 | QB_ROOTFS = "${@qemu_rootfs_params(d,'rootfs')}" | ||
16 | QB_ROOTFS_OPT = "${@qemu_rootfs_params(d,'rootfs-opt')}" | ||
17 | QB_DTB = "${@qemu_default_dtb(d)}" | ||
18 | |||
13 | # defaults | 19 | # defaults |
14 | QB_DEFAULT_KERNEL ?= "none" | 20 | QB_DEFAULT_KERNEL ?= "none" |
15 | QB_DEFAULT_KERNEL:zynq ?= "${@'zImage' if \ | 21 | QB_DEFAULT_KERNEL:zynq ?= "${@'zImage' if \ |
@@ -19,6 +25,118 @@ QB_DEFAULT_KERNEL:microblaze ?= "${@'simpleImage.mb' if \ | |||
19 | 25 | ||
20 | inherit qemuboot | 26 | inherit qemuboot |
21 | 27 | ||
28 | def qemu_target_binary(data): | ||
29 | package_arch = data.getVar("PACKAGE_ARCH") | ||
30 | qemu_target_binary = (data.getVar("QEMU_TARGET_BINARY_%s" % package_arch) or "") | ||
31 | if qemu_target_binary: | ||
32 | return qemu_target_binary | ||
33 | |||
34 | target_arch = data.getVar("TARGET_ARCH") | ||
35 | if target_arch == "microblazeeb": | ||
36 | target_arch = "microblaze" | ||
37 | elif target_arch == "aarch64": | ||
38 | target_arch += "-multiarch" | ||
39 | elif target_arch == "arm": | ||
40 | target_arch = "aarch64" | ||
41 | return "qemu-system-%s" % target_arch | ||
42 | |||
43 | def qemu_add_extra_args(data): | ||
44 | initramfs_image = data.getVar('INITRAMFS_IMAGE') or "" | ||
45 | bundle_image = data.getVar('INITRAMFS_IMAGE_BUNDLE') or "" | ||
46 | deploy_dir = data.getVar('DEPLOY_DIR_IMAGE') or "" | ||
47 | machine_name = data.getVar('MACHINE') or "" | ||
48 | soc_family = data.getVar('SOC_FAMILY') or "" | ||
49 | qb_extra_args = '' | ||
50 | # Add kernel image and boot.scr to qemu boot command when initramfs_image supplied | ||
51 | kernel_name = '' | ||
52 | bootscr_image = '%s/boot.scr' % deploy_dir | ||
53 | if soc_family in ('zynqmp', 'versal'): | ||
54 | kernel_name = 'Image' | ||
55 | bootscr_loadaddr = '0x20000000' | ||
56 | if initramfs_image: | ||
57 | kernel_image = '%s/%s' % (deploy_dir, kernel_name) | ||
58 | if bundle_image == "1": | ||
59 | kernel_image = '%s/%s-initramfs-%s.bin' % (deploy_dir, kernel_name, machine_name) | ||
60 | kernel_loadaddr = '0x200000' | ||
61 | if kernel_name: | ||
62 | qb_extra_args = ' -device loader,file=%s,addr=%s,force-raw=on' % (kernel_image, kernel_loadaddr) | ||
63 | qb_extra_args += ' -device loader,file=%s,addr=%s,force-raw=on' % (bootscr_image, bootscr_loadaddr) | ||
64 | if soc_family == 'versal': | ||
65 | qb_extra_args += ' -boot mode=5' | ||
66 | else: | ||
67 | if soc_family in ('zynqmp', 'versal'): | ||
68 | qb_extra_args = ' -boot mode=5' | ||
69 | return qb_extra_args | ||
70 | |||
71 | def qemu_rootfs_params(data, param): | ||
72 | initramfs_image = data.getVar('INITRAMFS_IMAGE') or "" | ||
73 | bundle_image = data.getVar('INITRAMFS_IMAGE_BUNDLE') or "" | ||
74 | soc_family = data.getVar('SOC_FAMILY') or "" | ||
75 | tune_features = (data.getVar('TUNE_FEATURES') or []).split() | ||
76 | if 'microblaze' in tune_features: | ||
77 | soc_family = 'microblaze' | ||
78 | soc_variant = data.getVar('SOC_VARIANT') or "" | ||
79 | |||
80 | if param == 'rootfs': | ||
81 | return 'none' if bundle_image == "1" else '' | ||
82 | |||
83 | elif param == 'fstype': | ||
84 | fstype_dict = { | ||
85 | "microblaze": "cpio.gz", | ||
86 | "zynq": "cpio.gz", | ||
87 | "zynqmp": "cpio.gz.u-boot", | ||
88 | "versal": "cpio.gz.u-boot.qemu-sd-fatimg" | ||
89 | } | ||
90 | if not initramfs_image: | ||
91 | image_fs = data.getVar('IMAGE_FSTYPES') | ||
92 | if 'wic.qemu-sd' in image_fs: | ||
93 | return 'wic.qemu-sd' | ||
94 | return fstype_dict[soc_family] | ||
95 | |||
96 | elif param == 'rootfs-opt': | ||
97 | sd_index = "1" | ||
98 | if soc_family == 'zynq': | ||
99 | sd_index = "0" | ||
100 | if soc_family == 'versal' and soc_variant == 'net': | ||
101 | sd_index = "0" | ||
102 | |||
103 | # Device is using a disk | ||
104 | if not initramfs_image: | ||
105 | return ' -drive if=sd,index=%s,file=@ROOTFS@,format=raw' % (sd_index) | ||
106 | |||
107 | # Device is using a ramdisk | ||
108 | if soc_family not in ('zynq', 'microblaze'): | ||
109 | return ' -device loader,file=@ROOTFS@,addr=0x04000000,force-raw=on' | ||
110 | |||
111 | # Ramdisk must be compiled into the kernel | ||
112 | return '' | ||
113 | |||
114 | def qemu_default_dtb(data): | ||
115 | if data.getVar("IMAGE_BOOT_FILES", True): | ||
116 | dtbs = data.getVar("IMAGE_BOOT_FILES", True).split(" ") | ||
117 | # IMAGE_BOOT_FILES has extra renaming info in the format '<source>;<target>' | ||
118 | # Note: Wildcard sources work here only because runqemu expands them at run time | ||
119 | dtbs = [f.split(";")[0] for f in dtbs] | ||
120 | dtbs = [f for f in dtbs if f.endswith(".dtb")] | ||
121 | if len(dtbs) != 0: | ||
122 | return dtbs[0] | ||
123 | return "" | ||
124 | |||
125 | def qemu_default_serial(data): | ||
126 | if data.getVar("SERIAL_CONSOLES", True): | ||
127 | first_console = data.getVar("SERIAL_CONSOLES", True).split(" ")[0] | ||
128 | speed, console = first_console.split(";", 1) | ||
129 | # zynqmp uses earlycon and stdout (in dtb) | ||
130 | if "zynqmp" in data.getVar("MACHINEOVERRIDES", True).split(":"): | ||
131 | return "" | ||
132 | return "console=%s,%s earlyprintk" % (console, speed) | ||
133 | return "" | ||
134 | |||
135 | def qemu_zynqmp_unhalt(data, multiarch): | ||
136 | if multiarch: | ||
137 | return "-global xlnx,zynqmp-boot.cpu-num=0 -global xlnx,zynqmp-boot.use-pmufw=true" | ||
138 | return "-device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4 -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4" | ||
139 | |||
22 | # rewrite the qemuboot with the custom sysroot bindir | 140 | # rewrite the qemuboot with the custom sysroot bindir |
23 | python do_write_qemuboot_conf:append() { | 141 | python do_write_qemuboot_conf:append() { |
24 | val = os.path.join(d.getVar('BASE_WORKDIR'), d.getVar('BUILD_SYS'), 'qemu-xilinx-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/') | 142 | val = os.path.join(d.getVar('BASE_WORKDIR'), d.getVar('BUILD_SYS'), 'qemu-xilinx-helper-native/1.0-r1/recipe-sysroot-native/usr/bin/') |
@@ -28,4 +146,3 @@ python do_write_qemuboot_conf:append() { | |||
28 | with open(qemuboot, 'w') as f: | 146 | with open(qemuboot, 'w') as f: |
29 | cf.write(f) | 147 | cf.write(f) |
30 | } | 148 | } |
31 | |||
diff --git a/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc b/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc index 0fcc5087..7b953975 100644 --- a/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc +++ b/meta-xilinx-core/conf/machine/include/machine-xilinx-qemu.inc | |||
@@ -1,111 +1,17 @@ | |||
1 | # This include is used to setup default QEMU and qemuboot config for meta-xilinx | 1 | # This include is used to setup default QEMU and qemuboot config for meta-xilinx |
2 | # machines. | 2 | # machines. |
3 | 3 | ||
4 | # Use the xilinx specific version for these users | ||
5 | IMAGE_CLASSES += "qemuboot-xilinx" | ||
6 | |||
7 | # depend on qemu-helper-native, which will depend on QEMU | ||
8 | EXTRA_IMAGEDEPENDS += "qemu-helper-native:do_addto_recipe_sysroot" | ||
9 | |||
10 | PREFERRED_PROVIDER_qemu-helper-native = "qemu-xilinx-helper-native" | 4 | PREFERRED_PROVIDER_qemu-helper-native = "qemu-xilinx-helper-native" |
11 | PREFERRED_PROVIDER_qemu = "qemu-xilinx" | 5 | PREFERRED_PROVIDER_qemu = "qemu-xilinx" |
12 | PREFERRED_PROVIDER_qemu-native = "qemu-xilinx-native" | 6 | PREFERRED_PROVIDER_qemu-native = "qemu-xilinx-native" |
7 | PREFERRED_PROVIDER_qemu-system-native = "qemu-xilinx-system-native" | ||
13 | PREFERRED_PROVIDER_nativesdk-qemu = "nativesdk-qemu-xilinx" | 8 | PREFERRED_PROVIDER_nativesdk-qemu = "nativesdk-qemu-xilinx" |
14 | 9 | ||
15 | def qemu_add_extra_args(d): | 10 | # enable the overrides for the context of the conf only |
16 | initramfs_image = d.getVar('INITRAMFS_IMAGE') or "" | 11 | MACHINEOVERRIDES =. "qemuboot-xilinx:" |
17 | bundle_image = d.getVar('INITRAMFS_IMAGE_BUNDLE') or "" | ||
18 | deploy_dir = d.getVar('DEPLOY_DIR_IMAGE') or "" | ||
19 | machine_name = d.getVar('MACHINE') or "" | ||
20 | soc_family = d.getVar('SOC_FAMILY') or "" | ||
21 | qb_extra_args = '' | ||
22 | # Add kernel image and boot.scr to qemu boot command when initramfs_image supplied | ||
23 | kernel_name = '' | ||
24 | bootscr_image = '%s/boot.scr' % deploy_dir | ||
25 | if soc_family in ('zynqmp', 'versal'): | ||
26 | kernel_name = 'Image' | ||
27 | bootscr_loadaddr = '0x20000000' | ||
28 | if initramfs_image: | ||
29 | kernel_image = '%s/%s' % (deploy_dir, kernel_name) | ||
30 | if bundle_image == "1": | ||
31 | kernel_image = '%s/%s-initramfs-%s.bin' % (deploy_dir, kernel_name, machine_name) | ||
32 | kernel_loadaddr = '0x200000' | ||
33 | if kernel_name: | ||
34 | qb_extra_args = ' -device loader,file=%s,addr=%s,force-raw=on' % (kernel_image, kernel_loadaddr) | ||
35 | qb_extra_args += ' -device loader,file=%s,addr=%s,force-raw=on' % (bootscr_image, bootscr_loadaddr) | ||
36 | if soc_family == 'versal': | ||
37 | qb_extra_args += ' -boot mode=5' | ||
38 | else: | ||
39 | if soc_family in ('zynqmp', 'versal'): | ||
40 | qb_extra_args = ' -boot mode=5' | ||
41 | return qb_extra_args | ||
42 | |||
43 | def qemu_rootfs_params(d,param): | ||
44 | initramfs_image = d.getVar('INITRAMFS_IMAGE') or "" | ||
45 | bundle_image = d.getVar('INITRAMFS_IMAGE_BUNDLE') or "" | ||
46 | soc_family = d.getVar('SOC_FAMILY') or "" | ||
47 | tune_features = (d.getVar('TUNE_FEATURES') or []).split() | ||
48 | if param == 'rootfs': | ||
49 | return 'none' if bundle_image == "1" else '' | ||
50 | elif param == 'fstype': | ||
51 | fstype_dict = { | ||
52 | "microblaze": "cpio.gz", | ||
53 | "zynq": "cpio.gz", | ||
54 | "zynqmp": "cpio.gz.u-boot", | ||
55 | "versal": "cpio.gz.u-boot.qemu-sd-fatimg" | ||
56 | } | ||
57 | if 'microblaze' in tune_features: | ||
58 | soc_family = 'microblaze' | ||
59 | if not initramfs_image: | ||
60 | image_fs = d.getVar('IMAGE_FSTYPES') | ||
61 | if 'wic.qemu-sd' in image_fs: | ||
62 | return 'wic.qemu-sd' | ||
63 | return fstype_dict[soc_family] | ||
64 | |||
65 | elif param == 'rootfs-opt': | ||
66 | if not initramfs_image or soc_family == 'versal': | ||
67 | sd_index = "1" | ||
68 | if soc_family == 'zynq': sd_index = "0" | ||
69 | return ' -drive if=sd,index=%s,file=@ROOTFS@,format=raw' % (sd_index) | ||
70 | elif soc_family not in ('zynq') or 'microblaze' in tune_features: | ||
71 | return ' -device loader,file=@ROOTFS@,addr=0x04000000,force-raw=on' | ||
72 | 12 | ||
73 | def qemu_default_dtb(d): | 13 | # depend on qemu-helper-native, which will depend on QEMU |
74 | if d.getVar("IMAGE_BOOT_FILES", True): | 14 | EXTRA_IMAGEDEPENDS += "qemu-system-native qemu-helper-native:do_addto_recipe_sysroot" |
75 | dtbs = d.getVar("IMAGE_BOOT_FILES", True).split(" ") | ||
76 | # IMAGE_BOOT_FILES has extra renaming info in the format '<source>;<target>' | ||
77 | # Note: Wildcard sources work here only because runqemu expands them at run time | ||
78 | dtbs = [f.split(";")[0] for f in dtbs] | ||
79 | dtbs = [f for f in dtbs if f.endswith(".dtb")] | ||
80 | if len(dtbs) != 0: | ||
81 | return dtbs[0] | ||
82 | return "" | ||
83 | |||
84 | def qemu_default_serial(d): | ||
85 | if d.getVar("SERIAL_CONSOLES", True): | ||
86 | first_console = d.getVar("SERIAL_CONSOLES", True).split(" ")[0] | ||
87 | speed, console = first_console.split(";", 1) | ||
88 | # zynqmp uses earlycon and stdout (in dtb) | ||
89 | if "zynqmp" in d.getVar("MACHINEOVERRIDES", True).split(":"): | ||
90 | return "" | ||
91 | return "console=%s,%s earlyprintk" % (console, speed) | ||
92 | return "" | ||
93 | |||
94 | def qemu_target_binary(d): | ||
95 | ta = d.getVar("TARGET_ARCH", True) | ||
96 | if ta == "microblazeeb": | ||
97 | ta = "microblaze" | ||
98 | elif ta == "arm": | ||
99 | ta = "aarch64" | ||
100 | return "qemu-system-%s" % ta | ||
101 | |||
102 | def qemu_zynqmp_unhalt(d, multiarch): | ||
103 | if multiarch: | ||
104 | return "-global xlnx,zynqmp-boot.cpu-num=0 -global xlnx,zynqmp-boot.use-pmufw=true" | ||
105 | return "-device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4 -device loader,addr=0xfd1a0104,data=0x8000000e,data-len=4" | ||
106 | 15 | ||
107 | # For qemuboot, default setup across all machines in meta-xilinx | 16 | # Use the xilinx specific version for these users |
108 | QB_SYSTEM_NAME:aarch64 ?= "${@qemu_target_binary(d)}-multiarch" | 17 | IMAGE_CLASSES += "qemuboot-xilinx" |
109 | QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" | ||
110 | QB_DEFAULT_FSTYPE ?= "cpio" | ||
111 | QB_DTB ?= "${@qemu_default_dtb(d)}" | ||
diff --git a/meta-xilinx-core/conf/machine/microblaze-generic.conf b/meta-xilinx-core/conf/machine/microblaze-generic.conf index 3fcc453d..c0e41948 100644 --- a/meta-xilinx-core/conf/machine/microblaze-generic.conf +++ b/meta-xilinx-core/conf/machine/microblaze-generic.conf | |||
@@ -47,13 +47,10 @@ UBOOT_INITIAL_ENV = "" | |||
47 | 47 | ||
48 | HDF_MACHINE = "kc705-microblazeel" | 48 | HDF_MACHINE = "kc705-microblazeel" |
49 | IMAGE_FSTYPES += "cpio.gz" | 49 | IMAGE_FSTYPES += "cpio.gz" |
50 | QB_ROOTFS:qemuboot-xilinx = "${@qemu_rootfs_params(d,'rootfs')}" | ||
51 | QB_DEFAULT_FSTYPE:qemuboot-xilinx = "${@qemu_rootfs_params(d,'fstype')}" | ||
52 | QB_ROOTFS_OPT:qemuboot-xilinx = " ${@qemu_rootfs_params(d,'rootfs-opt')}" | ||
53 | 50 | ||
54 | QB_KERNEL_CMDLINE = "none" | 51 | QB_KERNEL_CMDLINE = "none" |
55 | 52 | ||
56 | QB_OPT_APPEND ?= "" | 53 | QB_OPT_APPEND = "" |
57 | 54 | ||
58 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" | 55 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" |
59 | 56 | ||
diff --git a/meta-xilinx-core/conf/machine/versal-generic.conf b/meta-xilinx-core/conf/machine/versal-generic.conf index 53b20cb8..b737f1d1 100644 --- a/meta-xilinx-core/conf/machine/versal-generic.conf +++ b/meta-xilinx-core/conf/machine/versal-generic.conf | |||
@@ -60,17 +60,14 @@ QB_NETWORK_DEVICE = "" | |||
60 | QB_KERNEL_CMDLINE_APPEND ?= "" | 60 | QB_KERNEL_CMDLINE_APPEND ?= "" |
61 | QB_NET = "none" | 61 | QB_NET = "none" |
62 | 62 | ||
63 | QB_DEFAULT_FSTYPE:qemuboot-xilinx = "${@qemu_rootfs_params(d,'fstype')}" | ||
64 | QB_ROOTFS_OPT:qemuboot-xilinx = " ${@qemu_rootfs_params(d,'rootfs-opt')}" | ||
65 | |||
66 | QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" | 63 | QEMU_HW_DTB_PATH = "${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch" |
67 | QEMU_HW_DTB_PS ?="${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb" | 64 | QEMU_HW_DTB_PS = "${QEMU_HW_DTB_PATH}/board-versal-ps-vck190.dtb" |
68 | QEMU_HW_DTB_PMC ?="${QEMU_HW_DTB_PATH}/board-versal-pmc-vc-p-a2197-00.dtb" | 65 | QEMU_HW_DTB_PMC = "${QEMU_HW_DTB_PATH}/board-versal-pmc-vc-p-a2197-00.dtb" |
69 | 66 | ||
70 | QEMU_HW_DTB_PS_vp1202-versal = "${QEMU_HW_DTB_PATH}/board-versal-vp1202-ps-virt.dtb" | 67 | QEMU_HW_DTB_PS_vp1202-versal = "${QEMU_HW_DTB_PATH}/board-versal-vp1202-ps-virt.dtb" |
71 | QEMU_HW_DTB_PMC_vp1202-versal = "${QEMU_HW_DTB_PATH}/board-versal-vp1202-pmc-virt.dtb" | 68 | QEMU_HW_DTB_PMC_vp1202-versal = "${QEMU_HW_DTB_PATH}/board-versal-vp1202-pmc-virt.dtb" |
72 | 69 | ||
73 | QB_OPT_APPEND:append:qemuboot-xilinx = " \ | 70 | QB_OPT_APPEND = " \ |
74 | -hw-dtb ${QEMU_HW_DTB_PS} \ | 71 | -hw-dtb ${QEMU_HW_DTB_PS} \ |
75 | -serial null -serial null \ | 72 | -serial null -serial null \ |
76 | ${@qemu_add_extra_args(d)} \ | 73 | ${@qemu_add_extra_args(d)} \ |
@@ -89,7 +86,7 @@ QB_PLM_OPT = " \ | |||
89 | -hw-dtb ${QEMU_HW_DTB_PMC} \ | 86 | -hw-dtb ${QEMU_HW_DTB_PMC} \ |
90 | -display none \ | 87 | -display none \ |
91 | " | 88 | " |
92 | QB_OPT_APPEND:append:qemuboot-xilinx = " -plm-args '${QB_PLM_OPT}'" | 89 | QB_OPT_APPEND += " -plm-args '${QB_PLM_OPT}'" |
93 | 90 | ||
94 | #### No additional settings should be after the Postamble | 91 | #### No additional settings should be after the Postamble |
95 | #### Postamble | 92 | #### Postamble |
diff --git a/meta-xilinx-core/conf/machine/zynq-generic.conf b/meta-xilinx-core/conf/machine/zynq-generic.conf index 71bfda61..3c30c362 100644 --- a/meta-xilinx-core/conf/machine/zynq-generic.conf +++ b/meta-xilinx-core/conf/machine/zynq-generic.conf | |||
@@ -39,11 +39,6 @@ WKS_FILES ?= "sdimage-bootpart.wks" | |||
39 | QB_MEM = "-m 1024" | 39 | QB_MEM = "-m 1024" |
40 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" | 40 | QB_NETWORK_DEVICE = "-net nic,netdev=net0,macaddr=@MAC@" |
41 | 41 | ||
42 | QB_SYSTEM_NAME ?= "${@qemu_target_binary(d)}" | ||
43 | QB_ROOTFS:qemuboot-xilinx = "${@qemu_rootfs_params(d,'rootfs')}" | ||
44 | QB_DEFAULT_FSTYPE:qemuboot-xilinx = "${@qemu_rootfs_params(d,'fstype')}" | ||
45 | QB_ROOTFS_OPT:qemuboot-xilinx = " ${@qemu_rootfs_params(d,'rootfs-opt')}" | ||
46 | |||
47 | QB_KERNEL_CMDLINE = "none" | 42 | QB_KERNEL_CMDLINE = "none" |
48 | 43 | ||
49 | QB_KERNEL_ROOT = "/dev/mmcblk0p2" | 44 | QB_KERNEL_ROOT = "/dev/mmcblk0p2" |
diff --git a/meta-xilinx-core/conf/machine/zynqmp-generic.conf b/meta-xilinx-core/conf/machine/zynqmp-generic.conf index 98615661..15fe9d11 100644 --- a/meta-xilinx-core/conf/machine/zynqmp-generic.conf +++ b/meta-xilinx-core/conf/machine/zynqmp-generic.conf | |||
@@ -63,11 +63,10 @@ IMAGE_BOOT_FILES += " \ | |||
63 | 63 | ||
64 | # This machine has a QEMU model, runqemu setup: | 64 | # This machine has a QEMU model, runqemu setup: |
65 | QB_MEM = "-m 4096" | 65 | QB_MEM = "-m 4096" |
66 | QB_OPT_APPEND ?= "" | ||
67 | QB_NETWORK_DEVICE = "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" | 66 | QB_NETWORK_DEVICE = "-net nic -net nic -net nic -net nic,netdev=net0,macaddr=@MAC@" |
68 | 67 | ||
69 | # Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW) | 68 | # Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW) |
70 | QB_OPT_APPEND:append:qemuboot-xilinx = " \ | 69 | QB_OPT_APPEND = " \ |
71 | -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zcu102-arm.dtb \ | 70 | -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zcu102-arm.dtb \ |
72 | ${@qemu_zynqmp_unhalt(d, True)} \ | 71 | ${@qemu_zynqmp_unhalt(d, True)} \ |
73 | -device loader,file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware.elf,cpu-num=0 \ | 72 | -device loader,file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware.elf,cpu-num=0 \ |
@@ -76,10 +75,6 @@ QB_OPT_APPEND:append:qemuboot-xilinx = " \ | |||
76 | ${@qemu_add_extra_args(d)} \ | 75 | ${@qemu_add_extra_args(d)} \ |
77 | " | 76 | " |
78 | 77 | ||
79 | QB_ROOTFS:qemuboot-xilinx = "${@qemu_rootfs_params(d,'rootfs')}" | ||
80 | QB_DEFAULT_FSTYPE:qemuboot-xilinx = "${@qemu_rootfs_params(d,'fstype')}" | ||
81 | QB_ROOTFS_OPT:qemuboot-xilinx = "${@qemu_rootfs_params(d,'rootfs-opt')}" | ||
82 | |||
83 | QB_PMU_OPT = " \ | 78 | QB_PMU_OPT = " \ |
84 | -M microblaze-fdt \ | 79 | -M microblaze-fdt \ |
85 | -display none \ | 80 | -display none \ |
@@ -89,7 +84,7 @@ QB_PMU_OPT = " \ | |||
89 | -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \ | 84 | -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \ |
90 | -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \ | 85 | -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \ |
91 | " | 86 | " |
92 | QB_OPT_APPEND:append:qemuboot-xilinx = " -pmu-args '${QB_PMU_OPT}'" | 87 | QB_OPT_APPEND += " -pmu-args '${QB_PMU_OPT}'" |
93 | 88 | ||
94 | do_write_qemuboot_conf[depends] += "u-boot-zynq-uenv:do_deploy" | 89 | do_write_qemuboot_conf[depends] += "u-boot-zynq-uenv:do_deploy" |
95 | 90 | ||
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb index f5b89f05..f177872a 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb +++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb | |||
@@ -1,5 +1,7 @@ | |||
1 | require qemu-xilinx-native.inc | 1 | require qemu-xilinx-native.inc |
2 | 2 | ||
3 | PROVIDES = "qemu-system-native" | ||
4 | |||
3 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" | 5 | EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}" |
4 | 6 | ||
5 | PACKAGECONFIG ??= "fdt alsa kvm pie" | 7 | PACKAGECONFIG ??= "fdt alsa kvm pie" |