diff options
author | Nathan Rossi <nathan@nathanrossi.com> | 2017-11-14 23:15:23 +1000 |
---|---|---|
committer | Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> | 2017-11-21 11:19:00 -0800 |
commit | d6aaa8a9406e1b2b1545c804fd64807543fa6808 (patch) | |
tree | 400aec95883d47d1b13fe5d46ecc475176590a12 /conf | |
parent | c29b040639203fd3f1d96db01162db2611e6a7b3 (diff) | |
download | meta-xilinx-d6aaa8a9406e1b2b1545c804fd64807543fa6808.tar.gz |
zcu102-zynqmp: Setup runqemu to boot from an SD image
This sets up the zcu102-zynqmp machine to by default generate a padded
SD card image for which runqemu can use to boot from. This image
includes all the components that are expected from to boot and mirrors
the same requirements that the real board has.
The QEMU args are changed to default to the SD boot mode and only U-Boot
SPL is passed in as a ROM image to boot the QEMU instance.
This setup mimics the boot flow of the physical target where the Boot
ROM loads U-Boot SPL and the PMU Firmware from the boot.bin.
Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
Diffstat (limited to 'conf')
-rw-r--r-- | conf/machine/zcu102-zynqmp.conf | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/conf/machine/zcu102-zynqmp.conf b/conf/machine/zcu102-zynqmp.conf index 41e9e119..80b6d6f3 100644 --- a/conf/machine/zcu102-zynqmp.conf +++ b/conf/machine/zcu102-zynqmp.conf | |||
@@ -13,6 +13,11 @@ MACHINE_FEATURES = "rtc ext2 ext3 vfat usbhost" | |||
13 | UBOOT_MACHINE = "xilinx_zynqmp_zcu102_rev1_0_defconfig" | 13 | UBOOT_MACHINE = "xilinx_zynqmp_zcu102_rev1_0_defconfig" |
14 | SPL_BINARY = "spl/boot.bin" | 14 | SPL_BINARY = "spl/boot.bin" |
15 | 15 | ||
16 | # Default SD image build onfiguration, use qemu-sd to pad | ||
17 | IMAGE_CLASSES += "image-types-xilinx-qemu" | ||
18 | IMAGE_FSTYPES += "wic.qemu-sd" | ||
19 | WKS_FILES ?= "sdimage-bootpart.wks" | ||
20 | |||
16 | SERIAL_CONSOLE = "115200 ttyPS0" | 21 | SERIAL_CONSOLE = "115200 ttyPS0" |
17 | SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" | 22 | SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" |
18 | 23 | ||
@@ -23,11 +28,14 @@ PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-xlnx" | |||
23 | PREFERRED_PROVIDER_virtual/pmu-firmware ?= "zynqmp-pmu-pmu-firmware" | 28 | PREFERRED_PROVIDER_virtual/pmu-firmware ?= "zynqmp-pmu-pmu-firmware" |
24 | 29 | ||
25 | EXTRA_IMAGEDEPENDS += " \ | 30 | EXTRA_IMAGEDEPENDS += " \ |
31 | u-boot-zynq-uenv \ | ||
26 | arm-trusted-firmware \ | 32 | arm-trusted-firmware \ |
27 | qemu-devicetrees \ | 33 | qemu-devicetrees \ |
28 | virtual/pmu-firmware \ | 34 | virtual/pmu-firmware \ |
29 | " | 35 | " |
30 | 36 | ||
37 | IMAGE_BOOT_FILES += "uEnv.txt atf-uboot.ub ${KERNEL_IMAGETYPE}-zynqmp-zcu102-rev1.0.dtb" | ||
38 | |||
31 | # This machine has a QEMU model, runqemu setup: | 39 | # This machine has a QEMU model, runqemu setup: |
32 | IMAGE_CLASSES += "qemuboot-xilinx" | 40 | IMAGE_CLASSES += "qemuboot-xilinx" |
33 | QB_MACHINE = "-machine xlnx-zcu102" | 41 | QB_MACHINE = "-machine xlnx-zcu102" |
@@ -41,23 +49,19 @@ PREFERRED_PROVIDER_qemu-helper-native = "qemu-xilinx-helper-native" | |||
41 | # Use the multiarch script instead of launching QEMU directly | 49 | # Use the multiarch script instead of launching QEMU directly |
42 | QB_SYSTEM_NAME_append = "-multiarch" | 50 | QB_SYSTEM_NAME_append = "-multiarch" |
43 | 51 | ||
44 | # Setup hw-dtb, unhalt, atf and u-boot loading | 52 | # Replicate BootROM like behaviour, having loaded SPL and PMU(ROM+FW) |
45 | QB_OPT_APPEND_append_qemuboot-xilinx = " \ | 53 | QB_OPT_APPEND_append_qemuboot-xilinx = " \ |
46 | -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zcu102-arm.dtb \ | 54 | -hw-dtb ${DEPLOY_DIR_IMAGE}/qemu-hw-devicetrees/multiarch/zcu102-arm.dtb \ |
47 | ${@qemu_zynqmp_unhalt(d, True)} \ | 55 | ${@qemu_zynqmp_unhalt(d, True)} \ |
48 | -device loader,file=${DEPLOY_DIR_IMAGE}/arm-trusted-firmware.elf,cpu-num=0 \ | 56 | -device loader,addr=0xfffc0000,file=${DEPLOY_DIR_IMAGE}/u-boot-spl.bin,cpu-num=0 \ |
49 | -device loader,file=${DEPLOY_DIR_IMAGE}/u-boot.elf \ | ||
50 | " | 57 | " |
51 | 58 | ||
52 | # Load the kernel image so the user can run 'booti 0x80000 0x6000000 0x4000000' to boot the kernel | 59 | # Attach the rootfs disk image to the second SD interface of QEMU (which is SD0) |
53 | QB_DEFAULT_FSTYPE_qemuboot-xilinx = "cpio.gz.u-boot" | 60 | QB_DEFAULT_FSTYPE_qemuboot-xilinx = "wic.qemu-sd" |
54 | QB_ROOTFS_OPT_qemuboot-xilinx = " -device loader,addr=0x6000000,file=@ROOTFS@,force-raw=true" | 61 | QB_OPT_APPEND_append_qemuboot-xilinx = " -boot mode=3" |
55 | QB_OPT_APPEND_append_qemuboot-xilinx = " \ | 62 | QB_ROOTFS_OPT_qemuboot-xilinx = " -drive if=sd,index=1,file=@ROOTFS@,format=raw" |
56 | -device loader,addr=0x4000000,file=${DEPLOY_DIR_IMAGE}/${QB_DTB} \ | ||
57 | -device loader,addr=0x80000,file=${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} \ | ||
58 | -pmu-args '${QB_PMU_OPT}' \ | ||
59 | " | ||
60 | 63 | ||
64 | # PMU instance args | ||
61 | PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf" | 65 | PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf" |
62 | QB_PMU_OPT = " \ | 66 | QB_PMU_OPT = " \ |
63 | -M microblaze-fdt \ | 67 | -M microblaze-fdt \ |
@@ -68,4 +72,5 @@ QB_PMU_OPT = " \ | |||
68 | -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \ | 72 | -device loader,addr=0xfd1a0074,data=0x1011003,data-len=4 \ |
69 | -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \ | 73 | -device loader,addr=0xfd1a007C,data=0x1010f03,data-len=4 \ |
70 | " | 74 | " |
75 | QB_OPT_APPEND_append_qemuboot-xilinx = " -pmu-args '${QB_PMU_OPT}'" | ||
71 | 76 | ||