summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass9
1 files changed, 7 insertions, 2 deletions
diff --git a/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass
index 7466ab5e..5dc21efa 100644
--- a/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass
+++ b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass
@@ -23,6 +23,10 @@ QB_DEFAULT_KERNEL:zynq ?= "${@'zImage' if \
23QB_DEFAULT_KERNEL:microblaze ?= "${@'simpleImage.mb' if \ 23QB_DEFAULT_KERNEL:microblaze ?= "${@'simpleImage.mb' if \
24 d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'simpleImage.mb-initramfs-${MACHINE}.bin'}" 24 d.getVar('INITRAMFS_IMAGE_BUNDLE') != '1' else 'simpleImage.mb-initramfs-${MACHINE}.bin'}"
25 25
26# https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/Boot-Modes
27# https://docs.amd.com/r/en-US/ug1304-versal-acap-ssdg/Boot-Device-Modes
28QB_DEVICE_MODE ?= "-boot mode=5"
29
26inherit qemuboot 30inherit qemuboot
27 31
28def qemu_target_binary(data): 32def qemu_target_binary(data):
@@ -46,6 +50,7 @@ def qemu_add_extra_args(data):
46 deploy_dir = data.getVar('DEPLOY_DIR_IMAGE') or "" 50 deploy_dir = data.getVar('DEPLOY_DIR_IMAGE') or ""
47 machine_name = data.getVar('MACHINE') or "" 51 machine_name = data.getVar('MACHINE') or ""
48 soc_family = data.getVar('SOC_FAMILY') or "" 52 soc_family = data.getVar('SOC_FAMILY') or ""
53 boot_mode = data.getVar('QB_DEVICE_MODE') or ""
49 qb_extra_args = '' 54 qb_extra_args = ''
50 # Add kernel image and boot.scr to qemu boot command when initramfs_image supplied 55 # Add kernel image and boot.scr to qemu boot command when initramfs_image supplied
51 kernel_name = '' 56 kernel_name = ''
@@ -62,10 +67,10 @@ def qemu_add_extra_args(data):
62 qb_extra_args = ' -device loader,file=%s,addr=%s,force-raw=on' % (kernel_image, kernel_loadaddr) 67 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) 68 qb_extra_args += ' -device loader,file=%s,addr=%s,force-raw=on' % (bootscr_image, bootscr_loadaddr)
64 if soc_family == 'versal': 69 if soc_family == 'versal':
65 qb_extra_args += ' -boot mode=5' 70 qb_extra_args += ' %s' % boot_mode
66 else: 71 else:
67 if soc_family in ('zynqmp', 'versal'): 72 if soc_family in ('zynqmp', 'versal'):
68 qb_extra_args = ' -boot mode=5' 73 qb_extra_args = ' %s' % boot_mode
69 return qb_extra_args 74 return qb_extra_args
70 75
71def qemu_rootfs_params(data, param): 76def qemu_rootfs_params(data, param):