summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass')
-rw-r--r--meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass23
1 files changed, 17 insertions, 6 deletions
diff --git a/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass
index a0ea1531..df7016d4 100644
--- a/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass
+++ b/meta-xilinx-core/classes-recipe/qemuboot-xilinx.bbclass
@@ -23,10 +23,26 @@ 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/ug585-zynq-7000-SoC-TRM/Boot-Mode-Pin-Settings
26# https://docs.amd.com/r/en-US/ug1085-zynq-ultrascale-trm/Boot-Modes 27# 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 28# https://docs.amd.com/r/en-US/ug1304-versal-acap-ssdg/Boot-Device-Modes
28QB_BOOT_MODE ?= "-boot mode=5" 29QB_BOOT_MODE ?= "-boot mode=5"
29 30
31
32# ZynqMP or Versal SD and eMMC drive index.
33# Note: Do not set drive index based on boot mode some boards may have primary
34# boot mode as QSPI/OSPI and secondary boot mode as SD/eMMC.
35#
36# SoC Device Drive Index
37# Zynq-7000, ZynqMP, Versal SD0 0
38# ZynqMP, Versal SD1 1
39# ZynqMP, Versal eMMC0(secondary boot only) 2
40# ZynqMP, Versal eMMC1 3
41
42QB_SD_DRIVE_INDEX ?= "1"
43QB_SD_DRIVE_INDEX:zynq ?= "0"
44QB_SD_DRIVE_INDEX:versal-net ?= "0"
45
30inherit qemuboot 46inherit qemuboot
31 47
32def qemu_target_binary(data): 48def qemu_target_binary(data):
@@ -78,6 +94,7 @@ def qemu_rootfs_params(data, param):
78 bundle_image = data.getVar('INITRAMFS_IMAGE_BUNDLE') or "" 94 bundle_image = data.getVar('INITRAMFS_IMAGE_BUNDLE') or ""
79 soc_family = data.getVar('SOC_FAMILY') or "" 95 soc_family = data.getVar('SOC_FAMILY') or ""
80 tune_features = (data.getVar('TUNE_FEATURES') or []).split() 96 tune_features = (data.getVar('TUNE_FEATURES') or []).split()
97 sd_index = data.getVar('QB_SD_DRIVE_INDEX') or ""
81 if 'microblaze' in tune_features: 98 if 'microblaze' in tune_features:
82 soc_family = 'microblaze' 99 soc_family = 'microblaze'
83 100
@@ -101,12 +118,6 @@ def qemu_rootfs_params(data, param):
101 return fstype_dict[soc_family] 118 return fstype_dict[soc_family]
102 119
103 elif param == 'rootfs-opt': 120 elif param == 'rootfs-opt':
104 sd_index = "1"
105 if soc_family == 'zynq':
106 sd_index = "0"
107 if soc_family == 'versal-net':
108 sd_index = "0"
109
110 # Device is using a disk 121 # Device is using a disk
111 if not initramfs_image: 122 if not initramfs_image:
112 return ' -drive if=sd,index=%s,file=@ROOTFS@,format=raw' % (sd_index) 123 return ' -drive if=sd,index=%s,file=@ROOTFS@,format=raw' % (sd_index)