diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/README.booting.microblaze.md | 121 | ||||
-rw-r--r-- | docs/README.booting.storage.md | 52 | ||||
-rw-r--r-- | docs/README.booting.versal.md | 195 | ||||
-rw-r--r-- | docs/README.booting.zynq.md | 124 | ||||
-rw-r--r-- | docs/README.booting.zynqmp.md | 224 | ||||
-rw-r--r-- | docs/README.dfx.user.dts.md | 706 | ||||
-rw-r--r-- | docs/README.fpgamanager.custom.md | 478 | ||||
-rw-r--r-- | docs/README.fw.package.md | 61 |
8 files changed, 1013 insertions, 948 deletions
diff --git a/docs/README.booting.microblaze.md b/docs/README.booting.microblaze.md index 1ffcc3c8..91c0eda9 100644 --- a/docs/README.booting.microblaze.md +++ b/docs/README.booting.microblaze.md | |||
@@ -4,11 +4,16 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo | |||
4 | 4 | ||
5 | * [Setting Up the Target](#setting-up-the-target) | 5 | * [Setting Up the Target](#setting-up-the-target) |
6 | * [Booting from JTAG](#booting-from-jtag) | 6 | * [Booting from JTAG](#booting-from-jtag) |
7 | * [Loading Bitstream using XSCT](#loading-bitstream-using-xsct) | 7 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
8 | * [Loading U-boot using XSCT](#loading-u-boot-using-xsct) | 8 | * [Deploying the images to target](#deploying-the-images-to-target) |
9 | * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) | 9 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
10 | * [Using XSCT](#using-xsct) | 10 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
11 | * [Using TFTP](#using-tftp) | 11 | * [Loading Bitstream using XSDB](#loading-bitstream-using-xsdb) |
12 | * [Loading U-boot using XSDB](#loading-u-boot-using-xsdb) | ||
13 | * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) | ||
14 | * [Using XSDB](#using-xsdb) | ||
15 | * [Using TFTP](#using-tftp) | ||
16 | * [Booting Linux](#booting-linux) | ||
12 | 17 | ||
13 | ## Setting Up the Target | 18 | ## Setting Up the Target |
14 | 19 | ||
@@ -34,59 +39,79 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo | |||
34 | 39 | ||
35 | ## Booting from JTAG | 40 | ## Booting from JTAG |
36 | 41 | ||
37 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 42 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
38 | the associated JTAG device drivers. This also requires access to the JTAG interface | 43 | the associated JTAG device drivers. This also requires access to the JTAG interface |
39 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 44 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
40 | modules. | 45 | modules. |
41 | 46 | ||
42 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 47 | ### Sourcing the XSDB tools |
43 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 48 | |
44 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 49 | Source the Vivado or Vitis tools `settings.sh` scripts. |
45 | Xilinx -> XSCT Console. | 50 | |
51 | ### Deploying the images to target | ||
52 | |||
53 | Deploying the images can be done in two methods. | ||
54 | |||
55 | #### Using devtool boot-jtag script | ||
56 | |||
57 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
58 | ``` | ||
59 | $ devtool boot-jtag --help | ||
60 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
61 | ``` | ||
62 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
63 | 3. Execute this script using xsdb tool as shown below. | ||
64 | ``` | ||
65 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl | ||
66 | ``` | ||
67 | |||
68 | #### Manually executing xsdb commands | ||
69 | |||
70 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
46 | ``` | 71 | ``` |
47 | $ xsct | 72 | $ xsdb |
48 | ``` | 73 | ``` |
49 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 74 | 2. In the XSDB console, connect to the target over JTAG using the connect command. |
50 | Optionally user can use `-url` to specify the local/remote hw_server. The | 75 | Optionally user can use `-url` to specify the local/remote hw_server. The |
51 | connect command returns the channel ID of the connection. | 76 | connect command returns the channel ID of the connection. |
52 | ``` | 77 | ``` |
53 | xsct% connect | 78 | xsdb% connect |
54 | ``` | 79 | ``` |
55 | 4. The targets command lists the available targets and allows you to select a | 80 | 3. The targets command lists the available targets and allows you to select a |
56 | target using its ID. The targets are assigned IDs as they are discovered on | 81 | target using its ID. The targets are assigned IDs as they are discovered on |
57 | the JTAG chain, so the IDs can change from session to session. | 82 | the JTAG chain, so the IDs can change from session to session. |
58 | ``` | 83 | ``` |
59 | xsct% targets | 84 | xsdb% targets |
60 | ``` | 85 | ``` |
61 | 86 | ||
62 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 87 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
63 | option to select a target instead of selecting the target using its ID. | 88 | option to select a target instead of selecting the target using its ID. |
64 | 89 | ||
65 | ### Loading Bitstream using XSCT | 90 | ##### Loading Bitstream using XSDB |
66 | 91 | ||
67 | * Download the bitstream for the target using XSCT with the `fpga` command. Microblaze | 92 | * Download the bitstream for the target using XSDB with the `fpga` command. Microblaze |
68 | bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user | 93 | bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user |
69 | can use `fpga -no-revision-check` to skip FPGA silicon revision. | 94 | can use `fpga -no-revision-check` to skip FPGA silicon revision. |
70 | 95 | ||
71 | ``` | 96 | ``` |
72 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit | 97 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit |
73 | xsct% after 2000 | 98 | xsdb% after 2000 |
74 | xsct% targets -set -nocase -filter {name =~ "microblaze*#0"} | 99 | xsdb% targets -set -nocase -filter {name =~ "microblaze*#0"} |
75 | xsct% catch {stop} | 100 | xsdb% catch {stop} |
76 | xsct% after 1000 | 101 | xsdb% after 1000 |
77 | ``` | 102 | ``` |
78 | ### Loading U-boot using XSCT | 103 | ##### Loading U-boot using XSDB |
79 | 104 | ||
80 | 1. Download `u-boot.elf` to the target CPU using XSCT. Microblaze u-boot.elf will be | 105 | 1. Download `u-boot.elf` to the target CPU using XSDB. Microblaze u-boot.elf will be |
81 | located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend | 106 | located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend |
82 | the execution of active target using `stop` command. | 107 | the execution of active target using `stop` command. |
83 | ``` | 108 | ``` |
84 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 109 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
85 | ``` | 110 | ``` |
86 | 2. After loading u-boot.elf resume the execution of active target using the `con` | 111 | 2. After loading u-boot.elf resume the execution of active target using the `con` |
87 | command in XSCT shell. | 112 | command in XSDB shell. |
88 | ``` | 113 | ``` |
89 | xsct% con | 114 | xsdb% con |
90 | ``` | 115 | ``` |
91 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 116 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
92 | ``` | 117 | ``` |
@@ -95,7 +120,7 @@ Hit any key to stop autoboot: 0 | |||
95 | U-Boot> | 120 | U-Boot> |
96 | ``` | 121 | ``` |
97 | 122 | ||
98 | ### Loading Kernel, Device tree, Root Filesystem and U-boot boot script | 123 | ##### Loading Kernel, Device tree, Root Filesystem and U-boot boot script |
99 | 124 | ||
100 | Load the images into the target DDR/MIG load address i.e., | 125 | Load the images into the target DDR/MIG load address i.e., |
101 | `DDR base address + <image_offset>`. MicroBlaze U-boot boot script(boot.scr) | 126 | `DDR base address + <image_offset>`. MicroBlaze U-boot boot script(boot.scr) |
@@ -121,48 +146,50 @@ this process can take a long time to execute (more than 10 minutes). If your | |||
121 | system has ethernet it is recommended that you use TFTP to load these images | 146 | system has ethernet it is recommended that you use TFTP to load these images |
122 | using U-Boot. | 147 | using U-Boot. |
123 | 148 | ||
124 | #### Using XSCT | 149 | ###### Using XSDB |
125 | 150 | ||
126 | 1. Suspend the execution of active target using `stop` command in XSCT. | 151 | 1. Suspend the execution of active target using `stop` command in XSDB. |
127 | ``` | 152 | ``` |
128 | xsct% stop | 153 | xsdb% stop |
129 | ``` | 154 | ``` |
130 | 2. Using the `dow` command to load the images into the target DDR/MIG | 155 | 2. Using the `dow` command to load the images into the target DDR/MIG |
131 | load address. | 156 | load address. |
132 | ``` | 157 | ``` |
133 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 | 158 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 |
134 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 | 159 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 |
135 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 | 160 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 |
136 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 | 161 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 |
137 | ``` | 162 | ``` |
138 | 163 | ||
139 | #### Using TFTP | 164 | ###### Using TFTP |
140 | 165 | ||
141 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 166 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
167 | so that you can load them from U-Boot. | ||
168 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
142 | ``` | 169 | ``` |
143 | U-Boot> set serverip <server ip> | 170 | U-Boot> set serverip <server ip> |
144 | U-Boot> set ipaddr <board ip> | 171 | U-Boot> set ipaddr <board ip> |
145 | ``` | 172 | ``` |
146 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 173 | 3. Load the images to DDR address. |
147 | ``` | 174 | ``` |
148 | U-Boot> tftpboot 0x80000000 ${TFTPDIR}/linux.bin.ub | 175 | U-Boot> tftpboot 0x80000000 linux.bin.ub |
149 | U-Boot> tftpboot 0x81e00000 ${TFTPDIR}/system.dtb | 176 | U-Boot> tftpboot 0x81e00000 system.dtb |
150 | U-Boot> tftpboot 0x82e00000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | 177 | U-Boot> tftpboot 0x82e00000 core-image-minimal-${MACHINE}.cpio.gz.u-boot |
151 | U-Boot> tftpboot 0xff200000 ${TFTPDIR}/boot.scr | 178 | U-Boot> tftpboot 0xff200000 boot.scr |
152 | ``` | 179 | ``` |
153 | 180 | ||
154 | ### Booting Linux | 181 | ##### Booting Linux |
155 | 182 | ||
156 | Once the images are loaded continue the execution. | 183 | Once the images are loaded continue the execution. |
157 | 184 | ||
158 | 1. After loading images resume the execution of active target using the `con` | 185 | 1. After loading images resume the execution of active target using the `con` |
159 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 186 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
160 | ``` | 187 | ``` |
161 | xsct% con | 188 | xsdb% con |
162 | ``` | 189 | ``` |
163 | 2. Terminate xsct shell. | 190 | 2. Terminate xsdb shell. |
164 | ``` | 191 | ``` |
165 | xsct% exit | 192 | xsdb% exit |
166 | ``` | 193 | ``` |
167 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 194 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
168 | ``` | 195 | ``` |
diff --git a/docs/README.booting.storage.md b/docs/README.booting.storage.md index 4d33600d..d9689712 100644 --- a/docs/README.booting.storage.md +++ b/docs/README.booting.storage.md | |||
@@ -22,7 +22,7 @@ This section describes how to manually prepare and populate an SD card image. | |||
22 | There are automation tools in OpenEmbedded that can generate disk images already | 22 | There are automation tools in OpenEmbedded that can generate disk images already |
23 | formatted and prepared such that they can be written directly to a disk. Refer | 23 | formatted and prepared such that they can be written directly to a disk. Refer |
24 | to the Yocto Project Manual for more details: | 24 | to the Yocto Project Manual for more details: |
25 | https://docs.yoctoproject.org/4.1.2/singleindex.html#creating-partitioned-images-using-wic | 25 | https://docs.yoctoproject.org/4.1.4/singleindex.html#creating-partitioned-images-using-wic |
26 | 26 | ||
27 | ## Writing image to SD or eMMC device | 27 | ## Writing image to SD or eMMC device |
28 | 28 | ||
@@ -33,11 +33,17 @@ There are two ways to write the images to SD card or eMMC device. | |||
33 | 2. To write image to eMMC device make sure you need to boot Linux from JTAG or | 33 | 2. To write image to eMMC device make sure you need to boot Linux from JTAG or |
34 | SD or QSPI first, then copy the wic image to `<target_rootfs>/tmp` directory. | 34 | SD or QSPI first, then copy the wic image to `<target_rootfs>/tmp` directory. |
35 | 35 | ||
36 | > **Note:** `<target-image>` refers to core-image-minimal or petalinux-image-minimal | ||
37 | |||
36 | ### Using Wic file | 38 | ### Using Wic file |
37 | 39 | ||
38 | Write wic image file to the SD card or eMMC device. | 40 | Write wic image file to the SD card or eMMC device. Use dd command or balena |
41 | etcher to flash the wic image file to SD card. WIC image will be | ||
42 | build/tmp/deploy/${MACHINE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.wic, See | ||
43 | [Flashing Images Using bmaptool](https://docs.yoctoproject.org/singleindex.html#flashing-images-using-bmaptool) | ||
44 | for fast and easy way to flash the image | ||
39 | ``` | 45 | ``` |
40 | $ sudo dd if=xilinx-default-sd-${DATETIME}-sda.direct of=/dev/mmcblk<devnum> bs=4M | 46 | $ sudo dd if=<target-image>-${MACHINE}-${DATETIME}.rootfs.wic of=/dev/mmcblk<devnum> bs=4M |
41 | ``` | 47 | ``` |
42 | 48 | ||
43 | ### Using Yocto images | 49 | ### Using Yocto images |
@@ -55,22 +61,40 @@ $ sudo lsblk /dev/mmcblk<devnum> -o NAME,FSTYPE,LABEL,PARTLABEL | |||
55 | $ sudo mount -L boot /mnt/boot; sudo mount -L root /mnt/rootfs` | 61 | $ sudo mount -L boot /mnt/boot; sudo mount -L root /mnt/rootfs` |
56 | ``` | 62 | ``` |
57 | 3. Copy the boot images to the SD card or eMMC device FAT32 partition. | 63 | 3. Copy the boot images to the SD card or eMMC device FAT32 partition. |
64 | |||
65 | * Linux | ||
58 | * boot.bin | 66 | * boot.bin |
59 | * boot.scr | 67 | * boot.scr |
60 | * Image or uImage (For Zynq7000 only) | 68 | * Image or uImage (For Zynq7000 only) |
61 | * system.dtb | 69 | * system.dtb |
62 | * rootfs.cpio.gz.u-boot (If using a ramdisk) | 70 | * rootfs.cpio.gz.u-boot (If using a ramdisk) |
63 | ``` | 71 | ``` |
64 | $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin | 72 | $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin |
65 | $ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr | 73 | $ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr |
66 | $ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image | 74 | $ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image |
67 | $ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb | 75 | $ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb |
68 | $ cp ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot /mnt/boot/rootfs.cpio.gz.u-boot | 76 | $ cp ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot /mnt/boot/rootfs.cpio.gz.u-boot |
69 | ``` | 77 | ``` |
70 | 4. Extract `core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content to the SD | 78 | * Xen |
79 | * boot.bin | ||
80 | * boot.scr | ||
81 | * Image | ||
82 | * xen | ||
83 | * system.dtb | ||
84 | * rootfs.cpio.gz (If using a ramdisk) | ||
85 | ``` | ||
86 | $ cp ${DEPLOY_DIR_IMAGE}/boot.bin /mnt/boot/boot.bin | ||
87 | $ cp ${DEPLOY_DIR_IMAGE}/boot.scr /mnt/boot/boot.scr | ||
88 | $ cp ${DEPLOY_DIR_IMAGE}/Image /mnt/boot/Image | ||
89 | $ cp ${DEPLOY_DIR_IMAGE}/xen /mnt/boot/xen | ||
90 | $ cp ${DEPLOY_DIR_IMAGE}/system.dtb /mnt/boot/system.dtb | ||
91 | $ cp ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.cpio.gz /mnt/boot/rootfs.cpio.gz | ||
92 | ``` | ||
93 | |||
94 | 4. Extract `<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content to the SD | ||
71 | card or eMMC device EXT4 partition. | 95 | card or eMMC device EXT4 partition. |
72 | ``` | 96 | ``` |
73 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs | 97 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs |
74 | $ sync | 98 | $ sync |
75 | ``` | 99 | ``` |
76 | 5. Unmount the SD Card or eMMC device and boot from SD or eMMC boot modes. | 100 | 5. Unmount the SD Card or eMMC device and boot from SD or eMMC boot modes. |
@@ -97,10 +121,10 @@ $ sudo lsblk /dev/sd<X> -o NAME,FSTYPE,LABEL,PARTLABEL | |||
97 | ``` | 121 | ``` |
98 | $ sudo mount -L root /mnt/rootfs` | 122 | $ sudo mount -L root /mnt/rootfs` |
99 | ``` | 123 | ``` |
100 | 3. Extract `core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content | 124 | 3. Extract `<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz` file content |
101 | to the USB or SATA device EXT4 partition. | 125 | to the USB or SATA device EXT4 partition. |
102 | ``` | 126 | ``` |
103 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs | 127 | $ sudo tar -xf ${DEPLOY_DIR_IMAGE}/<target-image>-${MACHINE}-${DATETIME}.rootfs.tar.gz -C /mnt/rootfs |
104 | $ sync | 128 | $ sync |
105 | ``` | 129 | ``` |
106 | 4. Unmount the USB or SATA device. | 130 | 4. Unmount the USB or SATA device. |
diff --git a/docs/README.booting.versal.md b/docs/README.booting.versal.md index afdeba2b..25738784 100644 --- a/docs/README.booting.versal.md +++ b/docs/README.booting.versal.md | |||
@@ -5,10 +5,15 @@ modes. | |||
5 | 5 | ||
6 | * [Setting Up the Target](#setting-up-the-target) | 6 | * [Setting Up the Target](#setting-up-the-target) |
7 | * [Booting from JTAG](#booting-from-jtag) | 7 | * [Booting from JTAG](#booting-from-jtag) |
8 | * [Loading boot.bin using XSCT](#loading-bootbin-using-xsct) | 8 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
9 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | 9 | * [Deploying the images to target](#deploying-the-images-to-target) |
10 | * [Using XSCT](#using-xsct) | 10 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
11 | * [Using TFTP](#using-tftp) | 11 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
12 | * [Loading boot.bin using XSDB](#loading-bootbin-using-xsdb) | ||
13 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | ||
14 | * [Using XSDB](#using-xsdb) | ||
15 | * [Using TFTP](#using-tftp) | ||
16 | * [Booting Linux](#booting-linux) | ||
12 | * [Booting from SD](#booting-from-sd) | 17 | * [Booting from SD](#booting-from-sd) |
13 | * [Booting from QSPI](#booting-from-qspi) | 18 | * [Booting from QSPI](#booting-from-qspi) |
14 | 19 | ||
@@ -37,37 +42,61 @@ modes. | |||
37 | 42 | ||
38 | ## Booting from JTAG | 43 | ## Booting from JTAG |
39 | 44 | ||
40 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 45 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
41 | the associated JTAG device drivers. This also requires access to the JTAG interface | 46 | the associated JTAG device drivers. This also requires access to the JTAG interface |
42 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 47 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
43 | modules. | 48 | modules. |
44 | 49 | ||
45 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 50 | ### Sourcing the XSDB tools |
46 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 51 | |
47 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 52 | Source the Vivado or Vitis tools `settings.sh` scripts. |
48 | Xilinx -> XSCT Console. | 53 | |
54 | ### Deploying the images to target | ||
55 | |||
56 | Deploying the images can be done in two methods. | ||
57 | |||
58 | #### Using devtool boot-jtag script | ||
59 | |||
60 | > **Note:** For Xen boot flow boot-jtag script doesn't include loading xen, kernel | ||
61 | > and root filesystem, This step needs to be done manually as mentioned in XSDB | ||
62 | > or TFTP method below. | ||
63 | |||
64 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
65 | ``` | ||
66 | $ devtool boot-jtag --help | ||
67 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
68 | ``` | ||
69 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
70 | 3. Execute this script using xsdb tool as shown below. | ||
49 | ``` | 71 | ``` |
50 | $ xsct | 72 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl |
51 | ``` | 73 | ``` |
52 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 74 | |
75 | #### Manually executing xsdb commands | ||
76 | |||
77 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
78 | ``` | ||
79 | $ xsdb | ||
80 | ``` | ||
81 | 2. In the XSDB console, connect to the target over JTAG using the connect command. | ||
53 | Optionally user can use `-url` to specify the local/remote hw_server. The | 82 | Optionally user can use `-url` to specify the local/remote hw_server. The |
54 | connect command returns the channel ID of the connection. | 83 | connect command returns the channel ID of the connection. |
55 | ``` | 84 | ``` |
56 | xsct% connect | 85 | xsdb% connect |
57 | ``` | 86 | ``` |
58 | 4. The targets command lists the available targets and allows you to select a | 87 | 3. The targets command lists the available targets and allows you to select a |
59 | target using its ID. The targets are assigned IDs as they are discovered on | 88 | target using its ID. The targets are assigned IDs as they are discovered on |
60 | the JTAG chain, so the IDs can change from session to session. | 89 | the JTAG chain, so the IDs can change from session to session. |
61 | ``` | 90 | ``` |
62 | xsct% targets | 91 | xsdb% targets |
63 | ``` | 92 | ``` |
64 | 93 | ||
65 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 94 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
66 | option to select a target instead of selecting the target using its ID. | 95 | option to select a target instead of selecting the target using its ID. |
67 | 96 | ||
68 | ### Loading boot.bin using XSCT | 97 | ##### Loading boot.bin using XSDB |
69 | 98 | ||
70 | 1. Download the boot.bin for the target using XSCT with the `device program` command. | 99 | 1. Download the boot.bin for the target using XSDB with the `device program` command. |
71 | Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default | 100 | Versal boot.bin will be located in the `${DEPLOY_DIR_IMAGE}` directory. Default |
72 | boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and | 101 | boot.bin consists of boot pdi, plm.elf, psm.elf, bl31.elf, u-boot.elf and |
73 | system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file. | 102 | system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file. |
@@ -76,15 +105,15 @@ system.dtb. This boot.bin is generated using bootgen tool by passing a .bif file | |||
76 | > u-boot and kernel. | 105 | > u-boot and kernel. |
77 | 106 | ||
78 | ``` | 107 | ``` |
79 | xsct% targets -set -nocase -filter {name =~ "*PMC*"} | 108 | xsdb% targets -set -nocase -filter {name =~ "*PMC*"} |
80 | xsct% device program ${DEPLOY_DIR_IMAGE}/boot.bin | 109 | xsdb% device program ${DEPLOY_DIR_IMAGE}/boot.bin |
81 | xsct% targets -set -nocase -filter {name =~ "*A72*#0"} | 110 | xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} |
82 | xsct% stop | 111 | xsdb% stop |
83 | ``` | 112 | ``` |
84 | 2. After loading boot.bin resume the execution of active target using the `con` | 113 | 2. After loading boot.bin resume the execution of active target using the `con` |
85 | command in XSCT shell. | 114 | command in XSDB shell. |
86 | ``` | 115 | ``` |
87 | xsct% con | 116 | xsdb% con |
88 | ``` | 117 | ``` |
89 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 118 | 3. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
90 | ``` | 119 | ``` |
@@ -93,20 +122,38 @@ Hit any key to stop autoboot: 0 | |||
93 | U-Boot> | 122 | U-Boot> |
94 | ``` | 123 | ``` |
95 | 124 | ||
96 | ### Loading Kernel, Root Filesystem and U-boot boot script | 125 | ##### Loading Kernel, Root Filesystem and U-boot boot script |
97 | 126 | ||
98 | Load the images into the target DDR/PL DRR load address i.e., | 127 | Load the images into the target DDR/PL DRR load address i.e., |
99 | `DDR base address + <image_offset>`. | 128 | `DDR base address + <image_offset>`. |
100 | 129 | ||
101 | Below example uses base DDR address as 0x0 which matches in vivado address editor. | 130 | Below example uses base DDR address as 0x0 which matches in vivado address editor. |
102 | 131 | ||
132 | 1. **Linux** | ||
133 | |||
103 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | | 134 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | |
104 | |--------------------|------------------|--------------|---------------------| | 135 | |--------------------|------------------|--------------|---------------------| |
105 | | Kernel | 0x0 | 0x200000 | 0x200000 | | 136 | | Linux Kernel | 0x0 | 0x200000 | 0x200000 | |
106 | | Device Tree | 0x0 | 0x1000 | 0x1000 | | 137 | | Device Tree Blob | 0x0 | 0x1000 | 0x1000 | |
107 | | Rootfs | 0x0 | 0x4000000 | 0x4000000 | | 138 | | Rootfs | 0x0 | 0x4000000 | 0x4000000 | |
108 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | | 139 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | |
109 | 140 | ||
141 | 2. **Xen** | ||
142 | |||
143 | > **Note:** Xen, Rootfs and Device Tree image offset is calculated as shown below. | ||
144 | > * `Xen Rootfs = Base DDR Address + Linux Kernel Image Offset(0xE00000) + Size of Linux Kernel Image` | ||
145 | > * `Xen Kernel = Base DDR Address + Xen Rootfs Image Offset (Ex: 0x2600000) + Size of Xen Rootfs` | ||
146 | > * `Device Tree Blob = Base DDR Address + Xen Kernel Image Offset (Ex: 0xBA00000) + Size of Device Tree Blob` | ||
147 | |||
148 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | | ||
149 | |--------------------|------------------|--------------|---------------------| | ||
150 | | Linux Kernel | 0x0 | 0xE00000 | 0xE00000 | | ||
151 | | Xen Rootfs | 0x0 | 0x2600000 | 0x2600000 | | ||
152 | | Xen Kernel | 0x0 | 0xBA00000 | 0xBA00000 | | ||
153 | | Device Tree Blob | 0x0 | 0xC000000 | 0xC000000 | | ||
154 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | | ||
155 | |||
156 | |||
110 | > **Note:** | 157 | > **Note:** |
111 | > 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal | 158 | > 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal |
112 | > 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot` | 159 | > 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot` |
@@ -119,55 +166,101 @@ using U-Boot. | |||
119 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this | 166 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this |
120 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. | 167 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. |
121 | 168 | ||
122 | #### Using XSCT | 169 | ###### Using XSDB |
123 | 170 | ||
124 | 1. Suspend the execution of active target using `stop` command in XSCT. | 171 | 1. Suspend the execution of active target using `stop` command in XSDB. |
125 | ``` | 172 | ``` |
126 | xsct% stop | 173 | xsdb% stop |
127 | ``` | 174 | ``` |
128 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load | 175 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load |
129 | address. | 176 | address. |
130 | ``` | ||
131 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | ||
132 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 | ||
133 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | ||
134 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
135 | xsct% targets -set -nocase -filter {name =~ "*A72*#0"} | ||
136 | ``` | ||
137 | 177 | ||
138 | #### Using TFTP | 178 | * Linux XSDB |
179 | ``` | ||
180 | xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} | ||
181 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | ||
182 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x1000 | ||
183 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | ||
184 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
185 | ``` | ||
186 | |||
187 | * Xen XSDB | ||
188 | ``` | ||
189 | xsdb% targets -set -nocase -filter {name =~ "*A72*#0"} | ||
190 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0xE00000 | ||
191 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz 0x2600000 | ||
192 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/xen 0xBA00000 | ||
193 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0xC000000 | ||
194 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
195 | ``` | ||
196 | |||
197 | ###### Using TFTP | ||
139 | 198 | ||
140 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 199 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
200 | so that you can load them from U-Boot. | ||
201 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
141 | ``` | 202 | ``` |
142 | Versal> set serverip <server ip> | 203 | Versal> set serverip <server ip> |
143 | Versal> set ipaddr <board ip> | 204 | Versal> set ipaddr <board ip> |
144 | ``` | 205 | ``` |
145 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 206 | 3. Load the images to DDR address. |
146 | ``` | ||
147 | U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image | ||
148 | U-Boot> tftpboot 0x1000 ${TFTPDIR}/system.dtb | ||
149 | U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | ||
150 | U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr | ||
151 | 207 | ||
152 | ``` | 208 | * Linux TFTP |
153 | ### Booting Linux | 209 | ``` |
210 | U-Boot> tftpboot 0x200000 Image | ||
211 | U-Boot> tftpboot 0x1000 system.dtb | ||
212 | U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot | ||
213 | U-Boot> tftpboot 0x20000000 boot.scr | ||
214 | ``` | ||
215 | |||
216 | * Xen TFTP | ||
217 | ``` | ||
218 | U-Boot> tftpboot 0xE00000 Image | ||
219 | U-Boot> setenv kernel_size 0x$filesize | ||
220 | U-Boot> tftpboot 0x2600000 core-image-minimal-${MACHINE}.cpio.gz | ||
221 | U-Boot> setenv ramdisk_size 0x$filesize | ||
222 | U-Boot> tftpboot 0xBA00000 xen | ||
223 | U-Boot> tftpboot 0xC000000 system.dtb | ||
224 | U-Boot> tftpboot 0x20000000 boot.scr | ||
225 | ``` | ||
226 | |||
227 | ##### Booting Linux | ||
154 | 228 | ||
155 | Once the images are loaded continue the execution. | 229 | Once the images are loaded continue the execution. |
156 | 230 | ||
157 | 1. After loading images resume the execution of active target using the `con` | 231 | 1. After loading images resume the execution of active target using the `con` |
158 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 232 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
159 | ``` | 233 | ``` |
160 | xsct% con | 234 | xsdb% con |
161 | ``` | 235 | ``` |
162 | 2. Terminate xsct shell. | 236 | 2. Terminate xsdb shell. |
163 | ``` | 237 | ``` |
164 | xsct% exit | 238 | xsdb% exit |
165 | ``` | 239 | ``` |
166 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 240 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
241 | |||
242 | * Linux boot | ||
167 | ``` | 243 | ``` |
168 | U-Boot> boot | 244 | U-Boot> boot |
169 | ``` | 245 | ``` |
170 | 246 | ||
247 | * XEN JTAG boot | ||
248 | |||
249 | * XSDB | ||
250 | > **Note:** You need to calculate the Kernel(kernel_size) and ramdisk(ramdisk_size) | ||
251 | > image size manually from `${DEPLOY_DIR_IMAGE}` directory. For example if your | ||
252 | > kernel size is 24269312 bytes you need to convert to hex 0x1725200 and use it. | ||
253 | ``` | ||
254 | U-Boot> setenv kernel_size <filesize> | ||
255 | U-Boot> setenv ramdisk_size <filesize> | ||
256 | U-Boot> boot | ||
257 | ``` | ||
258 | |||
259 | * TFTP | ||
260 | ``` | ||
261 | U-Boot> boot | ||
262 | ``` | ||
263 | |||
171 | ## Booting from SD | 264 | ## Booting from SD |
172 | 265 | ||
173 | 1. Load the SD card into the VCK190 board in the J302 SD slot. | 266 | 1. Load the SD card into the VCK190 board in the J302 SD slot. |
@@ -181,9 +274,9 @@ U-Boot> boot | |||
181 | card (part number: X_EBM-01, REV_A01). | 274 | card (part number: X_EBM-01, REV_A01). |
182 | 2. With the card powered off, install the QSPI daughter card. | 275 | 2. With the card powered off, install the QSPI daughter card. |
183 | 3. Power on the VCK190 board and boot using JTAG or SD boot mode, to ensure that | 276 | 3. Power on the VCK190 board and boot using JTAG or SD boot mode, to ensure that |
184 | U-Boot is running and also have boot.bin copied to DDR location using XSCT | 277 | U-Boot is running and also have boot.bin copied to DDR location using XSDB |
185 | `dow` or `tftpboot` or `fatload` command. | 278 | `dow` or `tftpboot` or `fatload` command. |
186 | 4. Follow Flash boot instructions [README](README.booting.flash.md) for more details. | 279 | 4. Follow Flash boot instructions [README](README.booting.flash.md) for more details. |
187 | 5. After flashing the images, turn off the power switch on the board, and change | 280 | 5. After flashing the images, turn off the power switch on the board, and change |
188 | the SW1 boot mode pin settings to QSPI boot mode (1-ON, 2-OFF, 3-ON, 4-ON) by | 281 | the SW1 boot mode pin settings to QSPI boot mode (1-ON, 2-OFF, 3-ON, 4-ON) by |
189 | setting the SW1. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file | 282 | setting the SW1. Refer [Setting Up the Target](#setting-up-the-target). |
diff --git a/docs/README.booting.zynq.md b/docs/README.booting.zynq.md index a9b6e8f3..28aad78f 100644 --- a/docs/README.booting.zynq.md +++ b/docs/README.booting.zynq.md | |||
@@ -5,10 +5,15 @@ boot modes. | |||
5 | 5 | ||
6 | * [Setting Up the Target](#setting-up-the-target) | 6 | * [Setting Up the Target](#setting-up-the-target) |
7 | * [Booting from JTAG](#booting-from-jtag) | 7 | * [Booting from JTAG](#booting-from-jtag) |
8 | * [Loading boot components using XSCT](#loading-boot-components-using-xsct) | 8 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
9 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | 9 | * [Deploying the images to target](#deploying-the-images-to-target) |
10 | * [Using XSCT](#using-xsct) | 10 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
11 | * [Using TFTP](#using-tftp) | 11 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
12 | * [Loading boot components using XSDB](#loading-boot-components-using-xsdb) | ||
13 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | ||
14 | * [Using XSDB](#using-xsdb) | ||
15 | * [Using TFTP](#using-tftp) | ||
16 | * [Booting Linux](#booting-linux) | ||
12 | * [Booting from SD](#booting-from-sd) | 17 | * [Booting from SD](#booting-from-sd) |
13 | * [Booting from QSPI](#booting-from-qspi) | 18 | * [Booting from QSPI](#booting-from-qspi) |
14 | 19 | ||
@@ -35,37 +40,58 @@ boot modes. | |||
35 | --- | 40 | --- |
36 | ## Booting from JTAG | 41 | ## Booting from JTAG |
37 | 42 | ||
38 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 43 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
39 | the associated JTAG device drivers. This also requires access to the JTAG interface | 44 | the associated JTAG device drivers. This also requires access to the JTAG interface |
40 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 45 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
41 | modules. | 46 | modules. |
42 | 47 | ||
43 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 48 | ### Sourcing the XSDB tools |
44 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 49 | |
45 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 50 | Source the Vivado or Vitis tools `settings.sh` scripts. |
46 | Xilinx -> XSCT Console. | 51 | |
52 | ### Deploying the images to target | ||
53 | |||
54 | Deploying the images can be done in two methods. | ||
55 | |||
56 | #### Using devtool boot-jtag script | ||
57 | |||
58 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
59 | ``` | ||
60 | $ devtool boot-jtag --help | ||
61 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
62 | ``` | ||
63 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
64 | 3. Execute this script using xsdb tool as shown below. | ||
47 | ``` | 65 | ``` |
48 | $ xsct | 66 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl |
49 | ``` | 67 | ``` |
50 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 68 | |
69 | #### Manually executing xsdb commands | ||
70 | |||
71 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
72 | ``` | ||
73 | $ xsdb | ||
74 | ``` | ||
75 | 2. In the XSDB console, connect to the target over JTAG using the connect command. | ||
51 | Optionally user can use `-url` to specify the local/remote hw_server. The | 76 | Optionally user can use `-url` to specify the local/remote hw_server. The |
52 | connect command returns the channel ID of the connection. | 77 | connect command returns the channel ID of the connection. |
53 | ``` | 78 | ``` |
54 | xsct% connect | 79 | xsdb% connect |
55 | ``` | 80 | ``` |
56 | 4. The targets command lists the available targets and allows you to select a | 81 | 3. The targets command lists the available targets and allows you to select a |
57 | target using its ID. The targets are assigned IDs as they are discovered on | 82 | target using its ID. The targets are assigned IDs as they are discovered on |
58 | the JTAG chain, so the IDs can change from session to session. | 83 | the JTAG chain, so the IDs can change from session to session. |
59 | ``` | 84 | ``` |
60 | xsct% targets | 85 | xsdb% targets |
61 | ``` | 86 | ``` |
62 | 87 | ||
63 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 88 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
64 | option to select a target instead of selecting the target using its ID. | 89 | option to select a target instead of selecting the target using its ID. |
90 | |||
65 | --- | 91 | --- |
66 | ### Loading boot components using XSCT | 92 | ##### Loading boot components using XSDB |
67 | 93 | ||
68 | 1. Download the boot images for the target using XSCT with the `fpga` and `dow` | 94 | 1. Download the boot images for the target using XSDB with the `fpga` and `dow` |
69 | command. Zynq boot images will be located in the `${DEPLOY_DIR_IMAGE}` | 95 | command. Zynq boot images will be located in the `${DEPLOY_DIR_IMAGE}` |
70 | directory. | 96 | directory. |
71 | 97 | ||
@@ -74,24 +100,24 @@ xsct% targets | |||
74 | 100 | ||
75 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. | 101 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. |
76 | ``` | 102 | ``` |
77 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit | 103 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit |
78 | ``` | 104 | ``` |
79 | 3. Select APU Cortex-A9 Core 0 to load and execute FSBL. | 105 | 3. Select APU Cortex-A9 Core 0 to load and execute FSBL. |
80 | ``` | 106 | ``` |
81 | xsct% targets -set -nocase -filter {name =~ "arm*#0"} | 107 | xsdb% targets -set -nocase -filter {name =~ "arm*#0"} |
82 | xsct% catch {stop} | 108 | xsdb% catch {stop} |
83 | ``` | 109 | ``` |
84 | 5. Download and run FSBL from APU Cortex-A9 Core 0 | 110 | 5. Download and run FSBL from APU Cortex-A9 Core 0 |
85 | ``` | 111 | ``` |
86 | xsct% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf | 112 | xsdb% dow ${DEPLOY_DIR_IMAGE}/zynq_fsbl.elf |
87 | xsct% con | 113 | xsdb% con |
88 | ``` | 114 | ``` |
89 | 7. Now download U-boot.elf and Device tree to APU and execute. | 115 | 7. Now download U-boot.elf and Device tree to APU and execute. |
90 | ``` | 116 | ``` |
91 | xsct% stop | 117 | xsdb% stop |
92 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 118 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
93 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 119 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
94 | xsct% con | 120 | xsdb% con |
95 | ``` | 121 | ``` |
96 | 122 | ||
97 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 123 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
@@ -101,7 +127,7 @@ Hit any key to stop autoboot: 0 | |||
101 | U-Boot> | 127 | U-Boot> |
102 | ``` | 128 | ``` |
103 | --- | 129 | --- |
104 | ### Loading Kernel, Root Filesystem and U-boot boot script | 130 | ##### Loading Kernel, Root Filesystem and U-boot boot script |
105 | 131 | ||
106 | Load the images into the target DDR load address i.e., | 132 | Load the images into the target DDR load address i.e., |
107 | `DDR base address + <image_offset>`. | 133 | `DDR base address + <image_offset>`. |
@@ -127,53 +153,56 @@ using U-Boot. | |||
127 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this | 153 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this |
128 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. | 154 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. |
129 | --- | 155 | --- |
130 | #### Using XSCT | 156 | ###### Using XSDB |
131 | 157 | ||
132 | 1. Suspend the execution of active target using `stop` command in XSCT. | 158 | 1. Suspend the execution of active target using `stop` command in XSDB. |
133 | ``` | 159 | ``` |
134 | xsct% stop | 160 | xsdb% stop |
135 | ``` | 161 | ``` |
136 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load | 162 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load |
137 | address. | 163 | address. |
138 | ``` | 164 | ``` |
139 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000 | 165 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/uImage 0x200000 |
140 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 166 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
141 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | 167 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 |
142 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000 | 168 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x3000000 |
143 | ``` | 169 | ``` |
144 | --- | 170 | --- |
145 | #### Using TFTP | 171 | ###### Using TFTP |
146 | 172 | ||
147 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 173 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
174 | so that you can load them from U-Boot. | ||
175 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
148 | ``` | 176 | ``` |
149 | Versal> set serverip <server ip> | 177 | Versal> set serverip <server ip> |
150 | Versal> set ipaddr <board ip> | 178 | Versal> set ipaddr <board ip> |
151 | ``` | 179 | ``` |
152 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 180 | 3. Load the images to DDR address. |
153 | ``` | 181 | ``` |
154 | U-Boot> tftpboot 0x200000 ${TFTPDIR}/uImage | 182 | U-Boot> tftpboot 0x200000 uImage |
155 | U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb | 183 | U-Boot> tftpboot 0x100000 system.dtb |
156 | U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | 184 | U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot |
157 | U-Boot> tftpboot 0x3000000 ${TFTPDIR}/boot.scr | 185 | U-Boot> tftpboot 0x3000000 boot.scr |
158 | ``` | 186 | ``` |
159 | --- | 187 | --- |
160 | ### Booting Linux | 188 | ##### Booting Linux |
161 | 189 | ||
162 | Once the images are loaded continue the execution. | 190 | Once the images are loaded continue the execution. |
163 | 191 | ||
164 | 1. After loading images resume the execution of active target using the `con` | 192 | 1. After loading images resume the execution of active target using the `con` |
165 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 193 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
166 | ``` | 194 | ``` |
167 | xsct% con | 195 | xsdb% con |
168 | ``` | 196 | ``` |
169 | 2. Terminate xsct shell. | 197 | 2. Terminate xsdb shell. |
170 | ``` | 198 | ``` |
171 | xsct% exit | 199 | xsdb% exit |
172 | ``` | 200 | ``` |
173 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 201 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
174 | ``` | 202 | ``` |
175 | U-Boot> boot | 203 | U-Boot> boot |
176 | ``` | 204 | ``` |
205 | |||
177 | --- | 206 | --- |
178 | ## Booting from SD | 207 | ## Booting from SD |
179 | 208 | ||
@@ -181,14 +210,15 @@ U-Boot> boot | |||
181 | 2. Configure the ZC702 board to boot in SD-Boot mode (1-OFF, 2-OFF, 3-ON, 4-ON, 5-OFF) | 210 | 2. Configure the ZC702 board to boot in SD-Boot mode (1-OFF, 2-OFF, 3-ON, 4-ON, 5-OFF) |
182 | by setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). | 211 | by setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). |
183 | 3. Follow SD boot instructions [README](README.booting.storage.md) for more details. | 212 | 3. Follow SD boot instructions [README](README.booting.storage.md) for more details. |
213 | |||
184 | --- | 214 | --- |
185 | ## Booting from QSPI | 215 | ## Booting from QSPI |
186 | 216 | ||
187 | 1. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot | 217 | 1. To boot ZC702 board in QSPI boot mode, Power on the ZCU102 board and boot |
188 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have | 218 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have |
189 | boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` | 219 | boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` |
190 | command. | 220 | command. |
191 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. | 221 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. |
192 | 3. After flashing the images, turn off the power switch on the board, and change | 222 | 3. After flashing the images, turn off the power switch on the board, and change |
193 | the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) | 223 | the SW16 boot mode pin settings to QSPI boot mode (1-OFF, 2-ON, 3-OFF, 4-OFF, 5-OFF) |
194 | by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file | 224 | by setting the SW16. Refer [Setting Up the Target](#setting-up-the-target). |
diff --git a/docs/README.booting.zynqmp.md b/docs/README.booting.zynqmp.md index c8f8aa21..44e6f2b7 100644 --- a/docs/README.booting.zynqmp.md +++ b/docs/README.booting.zynqmp.md | |||
@@ -5,10 +5,15 @@ NAND boot modes. | |||
5 | 5 | ||
6 | * [Setting Up the Target](#setting-up-the-target) | 6 | * [Setting Up the Target](#setting-up-the-target) |
7 | * [Booting from JTAG](#booting-from-jtag) | 7 | * [Booting from JTAG](#booting-from-jtag) |
8 | * [Loading boot components using XSCT](#loading-boot-components-using-xsct) | 8 | * [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
9 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | 9 | * [Deploying the images to target](#deploying-the-images-to-target) |
10 | * [Using XSCT](#using-xsct) | 10 | * [Using devtool boot-jtag script](#using-devtool-boot-jtag-script) |
11 | * [Using TFTP](#using-tftp) | 11 | * [Manually executing xsdb commands](#manually-executing-xsdb-commands) |
12 | * [Loading boot components using XSDB](#loading-boot-components-using-xsdb) | ||
13 | * [Loading Kernel, Root Filesystem and U-boot boot script](#loading-kernel-root-filesystem-and-u-boot-boot-script) | ||
14 | * [Using XSDB](#using-xsdb) | ||
15 | * [Using TFTP](#using-tftp) | ||
16 | * [Booting Linux](#booting-linux) | ||
12 | * [Booting from SD](#booting-from-sd) | 17 | * [Booting from SD](#booting-from-sd) |
13 | * [Booting from QSPI](#booting-from-qspi) | 18 | * [Booting from QSPI](#booting-from-qspi) |
14 | 19 | ||
@@ -34,37 +39,61 @@ NAND boot modes. | |||
34 | 39 | ||
35 | ## Booting from JTAG | 40 | ## Booting from JTAG |
36 | 41 | ||
37 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 42 | This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and |
38 | the associated JTAG device drivers. This also requires access to the JTAG interface | 43 | the associated JTAG device drivers. This also requires access to the JTAG interface |
39 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG | 44 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
40 | modules. | 45 | modules. |
41 | 46 | ||
42 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 47 | ### Sourcing the XSDB tools |
43 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 48 | |
44 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 49 | Source the Vivado or Vitis tools `settings.sh` scripts. |
45 | Xilinx -> XSCT Console. | 50 | |
51 | ### Deploying the images to target | ||
52 | |||
53 | Deploying the images can be done in two methods. | ||
54 | |||
55 | #### Using devtool boot-jtag script | ||
56 | |||
57 | > **Note:** For Xen boot flow boot-jtag script doesn't include loading xen, kernel | ||
58 | > and root filesystem, This step needs to be done manually as mentioned in XSDB | ||
59 | > or TFTP method below. | ||
60 | |||
61 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
62 | ``` | ||
63 | $ devtool boot-jtag --help | ||
64 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
46 | ``` | 65 | ``` |
47 | $ xsct | 66 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl |
67 | 3. Execute this script using xsdb tool as shown below. | ||
48 | ``` | 68 | ``` |
49 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 69 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl |
70 | ``` | ||
71 | |||
72 | #### Manually executing xsdb commands | ||
73 | |||
74 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
75 | ``` | ||
76 | $ xsdb | ||
77 | ``` | ||
78 | 2. In the XSDB console, connect to the target over JTAG using the connect command. | ||
50 | Optionally user can use `-url` to specify the local/remote hw_server. The | 79 | Optionally user can use `-url` to specify the local/remote hw_server. The |
51 | connect command returns the channel ID of the connection. | 80 | connect command returns the channel ID of the connection. |
52 | ``` | 81 | ``` |
53 | xsct% connect | 82 | xsdb% connect |
54 | ``` | 83 | ``` |
55 | 4. The targets command lists the available targets and allows you to select a | 84 | 3. The targets command lists the available targets and allows you to select a |
56 | target using its ID. The targets are assigned IDs as they are discovered on | 85 | target using its ID. The targets are assigned IDs as they are discovered on |
57 | the JTAG chain, so the IDs can change from session to session. | 86 | the JTAG chain, so the IDs can change from session to session. |
58 | ``` | 87 | ``` |
59 | xsct% targets | 88 | xsdb% targets |
60 | ``` | 89 | ``` |
61 | 90 | ||
62 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 91 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` |
63 | option to select a target instead of selecting the target using its ID. | 92 | option to select a target instead of selecting the target using its ID. |
64 | 93 | ||
65 | ### Loading boot components using XSCT | 94 | ##### Loading boot components using XSDB |
66 | 95 | ||
67 | 1. Download the boot images for the target using XSCT with the `fpga` and `dow` | 96 | 1. Download the boot images for the target using XSDB with the `fpga` and `dow` |
68 | command. ZyqnMP boot images will be located in the `${DEPLOY_DIR_IMAGE}` | 97 | command. ZyqnMP boot images will be located in the `${DEPLOY_DIR_IMAGE}` |
69 | directory. | 98 | directory. |
70 | 99 | ||
@@ -73,43 +102,46 @@ xsct% targets | |||
73 | 102 | ||
74 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. | 103 | 2. Program the bitstream or skip this step if you are loading from u-boot or linux. |
75 | ``` | 104 | ``` |
76 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit | 105 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/download.bit |
77 | ``` | 106 | ``` |
78 | 3. By default, JTAG security gates are enabled. Disable the security gates for | 107 | 3. By default, JTAG security gates are enabled. Disable the security gates for |
79 | DAP, PL TAP, and PMU (this makes the PMU MB target visible to the debugger). | 108 | DAP, PL TAP, and PMU (this makes the PMU MB target visible to the debugger). |
80 | ``` | 109 | ``` |
81 | xsct% targets -set -nocase -filter {name =~ "*PSU*"} | 110 | xsdb% targets -set -nocase -filter {name =~ "*PSU*"} |
82 | xsct% mask_write 0xFFCA0038 0x1C0 0x1C0 | 111 | xsdb% mask_write 0xFFCA0038 0x1C0 0x1C0 |
83 | ``` | 112 | ``` |
84 | 3. Verify if the PMU MB target is listed under the PMU device. Now, load the PMU | 113 | 3. Verify if the PMU MB target is listed under the PMU device. Now, load the PMU |
85 | firmware. | 114 | firmware. |
86 | ``` | 115 | ``` |
87 | xsct% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"} | 116 | xsdb% targets -set -nocase -filter {name =~ "*MicroBlaze PMU*"} |
88 | xsct% catch {stop} | 117 | xsdb% catch {stop} |
89 | xsct% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf | 118 | xsdb% dow ${DEPLOY_DIR_IMAGE}/pmufw.elf |
90 | xsct% con | 119 | xsdb% con |
91 | ``` | 120 | ``` |
92 | 5. Reset APU Cortex-A53 Core 0 to load and execute FSBL, This step is important, | 121 | 5. Reset APU Cortex-A53 Core 0 to load and execute FSBL, This step is important, |
93 | because when the ZynqMP boots up in JTAG boot mode, all the APU and RPU cores | 122 | because when the ZynqMP boots up in JTAG boot mode, all the APU and RPU cores |
94 | are held in reset. You must clear the resets on each core before performing | 123 | are held in reset. You must clear the resets on each core before performing |
95 | debugging on these cores. You can use the `rst` command in XSCT to clear the | 124 | debugging on these cores. You can use the `rst` command in XSDB to clear the |
96 | resets. | 125 | resets. |
97 | ``` | 126 | ``` |
98 | xsct% targets -set -nocase -filter {name =~ "*A53*#0"} | 127 | xsdb% targets -set -nocase -filter {name =~ "*A53*#0"} |
99 | xsct% rst -processor -clear-registers | 128 | xsdb% rst -processor -clear-registers |
100 | ``` | 129 | ``` |
101 | 6. Download and run FSBL from APU Cortex-A53 Core 0 | 130 | 6. Download and run FSBL from APU Cortex-A53 Core 0 |
102 | ``` | 131 | ``` |
103 | xsct% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf | 132 | xsdb% dow ${DEPLOY_DIR_IMAGE}/zynqmp_fsbl.elf |
104 | xsct% con | 133 | xsdb% con |
105 | ``` | 134 | ``` |
106 | 7. Now download TF-A, U-boot.elf and Device tree to APU and execute. | 135 | 7. Now download TF-A, U-boot.elf and Device tree blob to APU and execute. |
136 | |||
137 | > **Note:** For Xen boot system.dtb load address will vary, see below table. | ||
138 | |||
107 | ``` | 139 | ``` |
108 | xsct% stop | 140 | xsdb% stop |
109 | xsct% dow ${DEPLOY_DIR_IMAGE}/bl31.elf | 141 | xsdb% dow ${DEPLOY_DIR_IMAGE}/bl31.elf |
110 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 142 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
111 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | 143 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 |
112 | xsct% con | 144 | xsdb% con |
113 | ``` | 145 | ``` |
114 | 146 | ||
115 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. | 147 | 8. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. |
@@ -119,20 +151,37 @@ Hit any key to stop autoboot: 0 | |||
119 | U-Boot> | 151 | U-Boot> |
120 | ``` | 152 | ``` |
121 | 153 | ||
122 | ### Loading Kernel, Root Filesystem and U-boot boot script | 154 | ##### Loading Kernel, Root Filesystem and U-boot boot script |
123 | 155 | ||
124 | Load the images into the target DDR/PL DRR load address i.e., | 156 | Load the images into the target DDR/PL DRR load address i.e., |
125 | `DDR base address + <image_offset>`. | 157 | `DDR base address + <image_offset>`. |
126 | 158 | ||
127 | Below example uses base DDR address as 0x0 which matches in vivado address editor. | 159 | Below example uses base DDR address as 0x0 which matches in vivado address editor. |
128 | 160 | ||
161 | 1. **Linux** | ||
162 | |||
129 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | | 163 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | |
130 | |--------------------|------------------|--------------|---------------------| | 164 | |--------------------|------------------|--------------|---------------------| |
131 | | Kernel | 0x0 | 0x200000 | 0x200000 | | 165 | | Linux Kernel | 0x0 | 0x200000 | 0x200000 | |
132 | | Device Tree | 0x0 | 0x1000 | 0x1000 | | 166 | | Device Tree Blob | 0x0 | 0x100000 | 0x100000 | |
133 | | Rootfs | 0x0 | 0x04000000 | 0x4000000 | | 167 | | Rootfs | 0x0 | 0x04000000 | 0x4000000 | |
134 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | | 168 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | |
135 | 169 | ||
170 | 2. **Xen** | ||
171 | |||
172 | > **Note:** Xen, Rootfs and Device Tree image offset is calculated as shown below. | ||
173 | > * `Xen Rootfs = Base DDR Address + Linux Kernel Image Offset(0xE00000) + Size of Linux Kernel Image` | ||
174 | > * `Xen Kernel = Base DDR Address + Xen Rootfs Image Offset (Ex: 0x2600000) + Size of Xen Rootfs` | ||
175 | > * `Device Tree Blob = Base DDR Address + Xen Kernel Image Offset (Ex: 0xBA00000) + Size of Device Tree Blob` | ||
176 | |||
177 | | Image Type | Base DDR Address | Image Offset | Load Address in DDR | | ||
178 | |--------------------|------------------|--------------|---------------------| | ||
179 | | Linux Kernel | 0x0 | 0xE00000 | 0xE00000 | | ||
180 | | Xen Rootfs | 0x0 | 0x2600000 | 0x2600000 | | ||
181 | | Xen Kernel | 0x0 | 0xBA00000 | 0xBA00000 | | ||
182 | | Device Tree Blob | 0x0 | 0xC000000 | 0xC000000 | | ||
183 | | U-boot boot script | 0x0 | 0x20000000 | 0x20000000 | | ||
184 | |||
136 | > **Note:** | 185 | > **Note:** |
137 | > 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal | 186 | > 1. `<target-image>` refers to core-image-minimal or petalinux-image-minimal |
138 | > 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot` | 187 | > 2. For pxeboot boot create a symlink for `<target-image>-${MACHINE}-${DATETIME}.cpio.gz.u-boot` |
@@ -145,54 +194,101 @@ using U-Boot. | |||
145 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this | 194 | > 4. If common ${DEPLOY_DIR_IMAGE}/system.dtb is used by u-boot and kernel, this |
146 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. | 195 | > is already part of boot.bin we can skip loading dtb, else load kernel dtb. |
147 | 196 | ||
148 | #### Using XSCT | 197 | ###### Using XSDB |
149 | 198 | ||
150 | 1. Suspend the execution of active target using `stop` command in XSCT. | 199 | 1. Suspend the execution of active target using `stop` command in XSDB. |
151 | ``` | 200 | ``` |
152 | xsct% stop | 201 | xsdb% stop |
153 | ``` | 202 | ``` |
154 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load | 203 | 2. Using the `dow` command to load the images into the target DDR/PL DDR load |
155 | address. | 204 | address. |
156 | ``` | ||
157 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | ||
158 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | ||
159 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | ||
160 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
161 | ``` | ||
162 | 205 | ||
163 | #### Using TFTP | 206 | * Linux XSDB |
207 | ``` | ||
208 | xsdb% targets -set -nocase -filter {name =~ "*A53*#0"} | ||
209 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0x200000 | ||
210 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x100000 | ||
211 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x4000000 | ||
212 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
213 | ``` | ||
164 | 214 | ||
165 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 215 | * Xen XSDB |
166 | ``` | 216 | ``` |
167 | Versal> set serverip <server ip> | 217 | xsdb% targets -set -nocase -filter {name =~ "*A53*#0"} |
168 | Versal> set ipaddr <board ip> | 218 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/Image 0xE00000 |
219 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz 0x2600000 | ||
220 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/xen 0xBA00000 | ||
221 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0xC000000 | ||
222 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0x20000000 | ||
223 | ``` | ||
224 | |||
225 | ###### Using TFTP | ||
226 | |||
227 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory | ||
228 | so that you can load them from U-Boot. | ||
229 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
169 | ``` | 230 | ``` |
170 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 231 | ZynqMP> set serverip <host-server-ip-address> |
232 | ZynqMP> set ipaddr <board-ip-address> | ||
171 | ``` | 233 | ``` |
172 | U-Boot> tftpboot 0x200000 ${TFTPDIR}/Image | 234 | 3. Load the images to DDR address. |
173 | U-Boot> tftpboot 0x100000 ${TFTPDIR}/system.dtb | ||
174 | U-Boot> tftpboot 0x4000000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | ||
175 | U-Boot> tftpboot 0x20000000 ${TFTPDIR}/boot.scr | ||
176 | 235 | ||
177 | ``` | 236 | * Linux TFTP |
178 | ### Booting Linux | 237 | ``` |
238 | U-Boot> tftpboot 0x200000 Image | ||
239 | U-Boot> tftpboot 0x100000 system.dtb | ||
240 | U-Boot> tftpboot 0x4000000 core-image-minimal-${MACHINE}.cpio.gz.u-boot | ||
241 | U-Boot> tftpboot 0x20000000 boot.scr | ||
242 | ``` | ||
243 | |||
244 | * Xen TFTP | ||
245 | ``` | ||
246 | U-Boot> tftpboot 0xE00000 Image | ||
247 | U-Boot> setenv kernel_size 0x$filesize | ||
248 | U-Boot> tftpboot 0x2600000 core-image-minimal-${MACHINE}.cpio.gz | ||
249 | U-Boot> setenv ramdisk_size 0x$filesize | ||
250 | U-Boot> tftpboot 0xBA00000 xen | ||
251 | U-Boot> tftpboot 0xC000000 system.dtb | ||
252 | U-Boot> tftpboot 0x20000000 boot.scr | ||
253 | ``` | ||
254 | |||
255 | ##### Booting Linux | ||
179 | 256 | ||
180 | Once the images are loaded continue the execution. | 257 | Once the images are loaded continue the execution. |
181 | 258 | ||
182 | 1. After loading images resume the execution of active target using the `con` | 259 | 1. After loading images resume the execution of active target using the `con` |
183 | command in XSCT shell, Skip step 1 for if you have used TFTP to load images. | 260 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
184 | ``` | 261 | ``` |
185 | xsct% con | 262 | xsdb% con |
186 | ``` | 263 | ``` |
187 | 2. Terminate xsct shell. | 264 | 2. Terminate xsdb shell. |
188 | ``` | 265 | ``` |
189 | xsct% exit | 266 | xsdb% exit |
190 | ``` | 267 | ``` |
191 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 268 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
269 | |||
270 | * Linux boot | ||
192 | ``` | 271 | ``` |
193 | U-Boot> boot | 272 | U-Boot> boot |
194 | ``` | 273 | ``` |
195 | 274 | ||
275 | * XEN JTAG boot | ||
276 | |||
277 | * XSDB | ||
278 | > **Note:** You need to calculate the Kernel(kernel_size) and ramdisk(ramdisk_size) | ||
279 | > image size manually from `${DEPLOY_DIR_IMAGE}` directory. For example if your | ||
280 | > kernel size is 24269312 bytes you need to convert to hex 0x1725200 and use it. | ||
281 | ``` | ||
282 | U-Boot> setenv kernel_size <filesize> | ||
283 | U-Boot> setenv ramdisk_size <filesize> | ||
284 | U-Boot> boot | ||
285 | ``` | ||
286 | |||
287 | * TFTP | ||
288 | ``` | ||
289 | U-Boot> boot | ||
290 | ``` | ||
291 | |||
196 | ## Booting from SD | 292 | ## Booting from SD |
197 | 293 | ||
198 | 1. Load the SD card into the ZCU102 board in the J100 SD slot. | 294 | 1. Load the SD card into the ZCU102 board in the J100 SD slot. |
@@ -204,9 +300,9 @@ U-Boot> boot | |||
204 | 300 | ||
205 | 1. To boot ZCU012 board in QSPI boot mode, Power on the ZCU102 board and boot | 301 | 1. To boot ZCU012 board in QSPI boot mode, Power on the ZCU102 board and boot |
206 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have | 302 | using JTAG or SD boot mode, to ensure that U-Boot is running and also have |
207 | boot.bin copied to DDR location using XSCT `dow` or `tftpboot` or `fatload` | 303 | boot.bin copied to DDR location using XSDB `dow` or `tftpboot` or `fatload` |
208 | command. | 304 | command. |
209 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. | 305 | 2. Follow Flash boot instructions [README](README.booting.flash.md) for more details. |
210 | 3. After flashing the images, turn off the power switch on the board, and change | 306 | 3. After flashing the images, turn off the power switch on the board, and change |
211 | the SW6 boot mode pin settings to QSPI boot mode (1-ON, 2-ON, 3-OFF, 4-ON) by | 307 | the SW6 boot mode pin settings to QSPI boot mode (1-ON, 2-ON, 3-OFF, 4-ON) by |
212 | setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). \ No newline at end of file | 308 | setting the SW6. Refer [Setting Up the Target](#setting-up-the-target). |
diff --git a/docs/README.dfx.user.dts.md b/docs/README.dfx.user.dts.md index 69e1e52b..9caf866e 100644 --- a/docs/README.dfx.user.dts.md +++ b/docs/README.dfx.user.dts.md | |||
@@ -16,11 +16,12 @@ following use cases. | |||
16 | > **Note:** Refer https://github.com/Xilinx/dfx-mgr/blob/master/README.md for | 16 | > **Note:** Refer https://github.com/Xilinx/dfx-mgr/blob/master/README.md for |
17 | > shell.json and accel.json file content. | 17 | > shell.json and accel.json file content. |
18 | 18 | ||
19 | * **Zynq-7000 and ZynqMP**: | 19 | * **Zynq 7000, ZynqMP and Versal**: |
20 | * Design: Vivado flat design. | 20 | * Design: Vivado flat or Segmented Configuration design. |
21 | * Input files to firmware recipes: .bit, .dtsi or dtbo and shell.json (optional) | 21 | * Input files to firmware recipes: .bit or .bin or _pld.pdi, .dtsi or dtbo and shell.json (optional) |
22 | * Usage Examples: | 22 | * Usage Examples: |
23 | ``` | 23 | ``` |
24 | # Zynq 7000 or ZynqMP flat design | ||
24 | SRC_URI = " \ | 25 | SRC_URI = " \ |
25 | file://<flat_design_pl>.bit \ | 26 | file://<flat_design_pl>.bit \ |
26 | file://<flat_design_pl>.dtsi \ | 27 | file://<flat_design_pl>.dtsi \ |
@@ -29,6 +30,7 @@ SRC_URI = " \ | |||
29 | ``` | 30 | ``` |
30 | 31 | ||
31 | ``` | 32 | ``` |
33 | # Zynq 7000 or ZynqMP flat design | ||
32 | SRC_URI = " \ | 34 | SRC_URI = " \ |
33 | file://<flat_design_pl>.bit \ | 35 | file://<flat_design_pl>.bit \ |
34 | file://<flat_design_pl>.dtbo \ | 36 | file://<flat_design_pl>.dtbo \ |
@@ -36,9 +38,69 @@ SRC_URI = " \ | |||
36 | " | 38 | " |
37 | ``` | 39 | ``` |
38 | 40 | ||
41 | ``` | ||
42 | # Zynq 7000 or ZynqMP flat design | ||
43 | SRC_URI = " \ | ||
44 | file://<flat_design_pl>.bin \ | ||
45 | file://<flat_design_pl>.dtsi \ | ||
46 | file://shell.json \ | ||
47 | " | ||
48 | ``` | ||
49 | |||
50 | ``` | ||
51 | # Zynq 7000 or ZynqMP flat design | ||
52 | SRC_URI = " \ | ||
53 | file://<flat_design_pl>.bin \ | ||
54 | file://<flat_design_pl>.dtbo \ | ||
55 | file://shell.json \ | ||
56 | " | ||
57 | ``` | ||
58 | |||
59 | ``` | ||
60 | # Zynq 7000 or ZynqMP flat design | ||
61 | SRC_URI = " \ | ||
62 | file://<flat_design_pl>.bit \ | ||
63 | file://shell.json \ | ||
64 | " | ||
65 | ``` | ||
66 | |||
67 | ``` | ||
68 | # Zynq 7000 or ZynqMP flat design | ||
69 | SRC_URI = " \ | ||
70 | file://<flat_design_pl>.bin \ | ||
71 | file://shell.json \ | ||
72 | " | ||
73 | ``` | ||
74 | |||
75 | ``` | ||
76 | # Versal Segmented Configuration design | ||
77 | SRC_URI = " \ | ||
78 | file://<flat_design>_pld.pdi \ | ||
79 | file://<flat_design>_pld.dtsi \ | ||
80 | file://shell.json \ | ||
81 | " | ||
82 | ``` | ||
83 | |||
84 | ``` | ||
85 | # Versal Segmented Configuration design | ||
86 | SRC_URI = " \ | ||
87 | file://<flat_design>_pld.pdi \ | ||
88 | file://<flat_design>_pld.dtbo \ | ||
89 | file://shell.json \ | ||
90 | " | ||
91 | ``` | ||
92 | |||
93 | ``` | ||
94 | # Versal Segmented Configuration design | ||
95 | SRC_URI = " \ | ||
96 | file://<flat_design>_pld.pdi \ | ||
97 | file://shell.json \ | ||
98 | " | ||
99 | ``` | ||
100 | |||
39 | * **ZynqMP and Versal**: | 101 | * **ZynqMP and Versal**: |
40 | * Design: Vivado DFx design. | 102 | * Design: Vivado DFx design. |
41 | * Input files to firmware recipes: .bit(ZynqMP) or .pdi(Versal), .dtsi or dtbo | 103 | * Input files to firmware recipes: .bit/bin(ZynqMP) or .pdi(Versal), .dtsi or dtbo |
42 | shell.json or accel.json (optional) and .xclbin (optional). | 104 | shell.json or accel.json (optional) and .xclbin (optional). |
43 | * Usage Examples: | 105 | * Usage Examples: |
44 | 106 | ||
@@ -63,6 +125,44 @@ SRC_URI = " \ | |||
63 | ``` | 125 | ``` |
64 | 126 | ||
65 | ``` | 127 | ``` |
128 | # ZynqMP DFx Static | ||
129 | SRC_URI = " \ | ||
130 | file://<dfx_design_static_pl>.bin \ | ||
131 | file://<dfx_design_static_pl>.dtsi \ | ||
132 | file://shell.json \ | ||
133 | file://<dfx_design_static_pl>.xclbin \ | ||
134 | " | ||
135 | ``` | ||
136 | |||
137 | ``` | ||
138 | # ZynqMP DFx Static | ||
139 | SRC_URI = " \ | ||
140 | file://<dfx_design_static_pl>.bin \ | ||
141 | file://<dfx_design_static_pl>.dtbo \ | ||
142 | file://shell.json \ | ||
143 | file://<dfx_design_static_pl>.xclbin \ | ||
144 | " | ||
145 | ``` | ||
146 | |||
147 | ``` | ||
148 | # ZynqMP DFx Static | ||
149 | SRC_URI = " \ | ||
150 | file://<dfx_design_static_pl>.bit \ | ||
151 | file://shell.json \ | ||
152 | file://<dfx_design_static_pl>.xclbin \ | ||
153 | " | ||
154 | ``` | ||
155 | |||
156 | ``` | ||
157 | # ZynqMP DFx Static | ||
158 | SRC_URI = " \ | ||
159 | file://<dfx_design_static_pl>.bin \ | ||
160 | file://shell.json \ | ||
161 | file://<dfx_design_static_pl>.xclbin \ | ||
162 | " | ||
163 | ``` | ||
164 | |||
165 | ``` | ||
66 | # ZynqMP DFx RP | 166 | # ZynqMP DFx RP |
67 | SRC_URI = " \ | 167 | SRC_URI = " \ |
68 | file://<dfx_design_rp_rm_pl>.bit \ | 168 | file://<dfx_design_rp_rm_pl>.bit \ |
@@ -81,6 +181,45 @@ SRC_URI = " \ | |||
81 | file://<dfx_design_rp_rm_pl>.xclbin \ | 181 | file://<dfx_design_rp_rm_pl>.xclbin \ |
82 | " | 182 | " |
83 | ``` | 183 | ``` |
184 | |||
185 | ``` | ||
186 | # ZynqMP DFx RP | ||
187 | SRC_URI = " \ | ||
188 | file://<dfx_design_rp_rm_pl>.bin \ | ||
189 | file://<dfx_design_rp_rm_pl>.dtsi \ | ||
190 | file://accel.json \ | ||
191 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
192 | " | ||
193 | ``` | ||
194 | |||
195 | ``` | ||
196 | # ZynqMP DFx RP | ||
197 | SRC_URI = " \ | ||
198 | file://<dfx_design_rp_rm_pl>.bin \ | ||
199 | file://<dfx_design_rp_rm_pl>.dtbo \ | ||
200 | file://accel.json \ | ||
201 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
202 | " | ||
203 | ``` | ||
204 | |||
205 | ``` | ||
206 | # ZynqMP DFx RP | ||
207 | SRC_URI = " \ | ||
208 | file://<dfx_design_rp_rm_pl>.bit \ | ||
209 | file://accel.json \ | ||
210 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
211 | " | ||
212 | ``` | ||
213 | |||
214 | ``` | ||
215 | # ZynqMP DFx RP | ||
216 | SRC_URI = " \ | ||
217 | file://<dfx_design_rp_rm_pl>.bin \ | ||
218 | file://accel.json \ | ||
219 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
220 | " | ||
221 | ``` | ||
222 | |||
84 | ``` | 223 | ``` |
85 | # Versal DFx Static | 224 | # Versal DFx Static |
86 | SRC_URI = " \ | 225 | SRC_URI = " \ |
@@ -102,6 +241,15 @@ SRC_URI = " \ | |||
102 | ``` | 241 | ``` |
103 | 242 | ||
104 | ``` | 243 | ``` |
244 | # Versal DFx Static | ||
245 | SRC_URI = " \ | ||
246 | file://<dfx_design_static_pl>.pdi \ | ||
247 | file://shell.json \ | ||
248 | file://<dfx_design_static_pl>.xclbin \ | ||
249 | " | ||
250 | ``` | ||
251 | |||
252 | ``` | ||
105 | # Versal DFx RP | 253 | # Versal DFx RP |
106 | SRC_URI = " \ | 254 | SRC_URI = " \ |
107 | file://<dfx_design_rp_rm_pl>.pdi \ | 255 | file://<dfx_design_rp_rm_pl>.pdi \ |
@@ -120,16 +268,29 @@ SRC_URI = " \ | |||
120 | file://<dfx_design_rp_rm_pl>.xclbin \ | 268 | file://<dfx_design_rp_rm_pl>.xclbin \ |
121 | " | 269 | " |
122 | ``` | 270 | ``` |
271 | |||
272 | ``` | ||
273 | # Versal DFx RP | ||
274 | SRC_URI = " \ | ||
275 | file://<dfx_design_rp_rm_pl>.pdi \ | ||
276 | file://accel.json \ | ||
277 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
278 | " | ||
279 | ``` | ||
123 | --- | 280 | --- |
124 | 281 | ||
125 | ## How to create a firmware recipe app | 282 | ## How to create a firmware recipe app |
126 | 283 | ||
127 | 1. Follow [Building Instructions](../README.building.md) upto step 4. | 284 | 1. Follow SDT or XSCT Build instructions whichever build method is used but not |
128 | 2. Create recipes-firmware directory in meta layer and copy the .bit/pdi, | 285 | both. |
286 | a. [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md) upto step 4. | ||
287 | b. [XSCT Building Instructions](../README.building.md) | ||
288 | upto step 4.b (With SDT overlay). | ||
289 | 2. Create recipes-firmware directory in meta layer and copy the .bit/bin/pdi, | ||
129 | .dtsi/dtbo, .json and .xclbin file to these directories. | 290 | .dtsi/dtbo, .json and .xclbin file to these directories. |
130 | ``` | 291 | ``` |
131 | $ mkdir -p <meta-layer>/recipes-firmware/<recipes-firmware-app>/files | 292 | $ mkdir -p <meta-layer>/recipes-firmware/<recipes-firmware-app>/files |
132 | $ cp -r <path-to-files>/*.{bit or pdi, dtsi or dtbo, shell.json or accel.json and .xclbin} <meta-layer>/recipes-firmware/<firmware-app-name>/files | 293 | $ cp -r <path-to-files>/*.{bit or bin or pdi, dtsi or dtbo, shell.json or accel.json and .xclbin} <meta-layer>/recipes-firmware/<firmware-app-name>/files |
133 | ``` | 294 | ``` |
134 | 3. Now create the recipes for flat or static or partial firmware using recipetool. | 295 | 3. Now create the recipes for flat or static or partial firmware using recipetool. |
135 | ``` | 296 | ``` |
@@ -144,8 +305,9 @@ LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda | |||
144 | inherit dfx_user_dts | 305 | inherit dfx_user_dts |
145 | 306 | ||
146 | SRC_URI = "\ | 307 | SRC_URI = "\ |
147 | file://zcu111-pl-demo.bit \ | 308 | file://shell.json \ |
148 | file://zcu111-pl-demo.dtsi \ | 309 | file://zcu111-pl-demo-user-dts.bit \ |
310 | file://zcu111-pl-demo-user-dts.dtsi \ | ||
149 | " | 311 | " |
150 | 312 | ||
151 | COMPATIBLE_MACHINE ?= "^$" | 313 | COMPATIBLE_MACHINE ?= "^$" |
@@ -153,7 +315,7 @@ COMPATIBLE_MACHINE:zynqmp = "zynqmp" | |||
153 | ``` | 315 | ``` |
154 | 5. Add firmware-recipe app to image and enable fpga-overlay machine features to | 316 | 5. Add firmware-recipe app to image and enable fpga-overlay machine features to |
155 | local.conf as shown below. | 317 | local.conf as shown below. |
156 | > **Note:** fpga-manager-script provides fpgautil tool to load .bit/pdi and dtbo | 318 | > **Note:** fpga-manager-script provides fpgautil tool to load .bin/pdi and dtbo |
157 | > at runtime linux. | 319 | > at runtime linux. |
158 | ``` | 320 | ``` |
159 | MACHINE_FEATURES += "fpga-overlay" | 321 | MACHINE_FEATURES += "fpga-overlay" |
@@ -162,7 +324,11 @@ IMAGE_INSTALL:append = " \ | |||
162 | fpga-manager-script \ | 324 | fpga-manager-script \ |
163 | " | 325 | " |
164 | ``` | 326 | ``` |
165 | 6. Follow [Building Instructions](../README.building.md) and continue from step 5. | 327 | 6. Follow SDT or XSCT Build instructions whichever build method is used but not |
328 | both. | ||
329 | a. [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) and continue from step 5. | ||
330 | b. [XSCT Building Instructions](../README.building.md) | ||
331 | and continue from step 5. | ||
166 | 7. Once images are built firmware app files will be installed on target_rootfs. | 332 | 7. Once images are built firmware app files will be installed on target_rootfs. |
167 | ``` | 333 | ``` |
168 | # <target_rootfs>/lib/firmware/xilinx/firmware-app-name | 334 | # <target_rootfs>/lib/firmware/xilinx/firmware-app-name |
@@ -170,7 +336,7 @@ IMAGE_INSTALL:append = " \ | |||
170 | --- | 336 | --- |
171 | 337 | ||
172 | ## Test Procedure on Target | 338 | ## Test Procedure on Target |
173 | * Once Linux boots on target, use fpgautil command to load .bit or .pdi and | 339 | * Once Linux boots on target, use fpgautil command to load .bin or .pdi and |
174 | corresponding dt overlay as shown below. | 340 | corresponding dt overlay as shown below. |
175 | > **Note:** firmware can be loaded only with sudo or root permissions. | 341 | > **Note:** firmware can be loaded only with sudo or root permissions. |
176 | --- | 342 | --- |
@@ -179,142 +345,188 @@ IMAGE_INSTALL:append = " \ | |||
179 | 345 | ||
180 | * ZynqMP | 346 | * ZynqMP |
181 | ``` | 347 | ``` |
182 | yocto-zynqmp-generic-20231:~$ sudo su | 348 | yocto-zynqmp-generic:~$ cd / |
183 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | 349 | yocto-zynqmp-generic:/$ sudo su |
350 | yocto-zynqmp-generic:/# cat /proc/interrupts | ||
184 | CPU0 CPU1 CPU2 CPU3 | 351 | CPU0 CPU1 CPU2 CPU3 |
185 | 11: 13309 13021 13673 14170 GICv2 30 Level arch_timer | 352 | 11: 3399 4404 3273 3113 GICv2 30 Level arch_timer |
186 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | 353 | 14: 0 0 0 0 GICv2 67 Level zynqmp-ipi |
187 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | 354 | 15: 0 0 0 0 GICv2 58 Level ffa60000.rtc |
188 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | 355 | 16: 0 0 0 0 GICv2 59 Level ffa60000.rtc |
189 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | 356 | 17: 0 0 0 0 GICv2 88 Level ams-irq |
190 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | 357 | 18: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon |
191 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | 358 | 19: 0 0 0 0 GICv2 175 Level arm-pmu |
192 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | 359 | 20: 0 0 0 0 GICv2 176 Level arm-pmu |
193 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | 360 | 21: 0 0 0 0 GICv2 177 Level arm-pmu |
194 | 22: 0 0 0 0 GICv2 88 Level ams-irq | 361 | 22: 0 0 0 0 GICv2 178 Level arm-pmu |
195 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | 362 | 23: 379 0 0 0 GICv2 53 Level xuartps |
196 | 24: 327 0 0 0 GICv2 53 Level xuartps | 363 | 26: 0 0 0 0 GICv2 156 Level zynqmp-dma |
197 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | 364 | 27: 0 0 0 0 GICv2 157 Level zynqmp-dma |
198 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | 365 | 28: 0 0 0 0 GICv2 158 Level zynqmp-dma |
199 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | 366 | 29: 0 0 0 0 GICv2 159 Level zynqmp-dma |
200 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | 367 | 30: 0 0 0 0 GICv2 160 Level zynqmp-dma |
201 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | 368 | 31: 0 0 0 0 GICv2 161 Level zynqmp-dma |
202 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | 369 | 32: 0 0 0 0 GICv2 162 Level zynqmp-dma |
203 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | 370 | 33: 0 0 0 0 GICv2 163 Level zynqmp-dma |
204 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | 371 | 34: 0 0 0 0 GICv2 109 Level zynqmp-dma |
205 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | 372 | 35: 0 0 0 0 GICv2 110 Level zynqmp-dma |
206 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | 373 | 36: 0 0 0 0 GICv2 111 Level zynqmp-dma |
207 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | 374 | 37: 0 0 0 0 GICv2 112 Level zynqmp-dma |
208 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | 375 | 38: 0 0 0 0 GICv2 113 Level zynqmp-dma |
209 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | 376 | 39: 0 0 0 0 GICv2 114 Level zynqmp-dma |
210 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | 377 | 40: 0 0 0 0 GICv2 115 Level zynqmp-dma |
211 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | 378 | 41: 0 0 0 0 GICv2 116 Level zynqmp-dma |
212 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | 379 | 42: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller |
213 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | 380 | 43: 11183 0 0 0 GICv2 47 Level ff0f0000.spi |
214 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | 381 | 44: 77 0 0 0 GICv2 95 Level eth0, eth0 |
215 | 45: 76 0 0 0 GICv2 95 Level eth0, eth0 | 382 | 45: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon |
216 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | 383 | 46: 2365 0 0 0 GICv2 49 Level cdns-i2c |
217 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | 384 | 47: 326 0 0 0 GICv2 50 Level cdns-i2c |
218 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | 385 | 49: 0 0 0 0 GICv2 84 Edge ff150000.watchdog |
219 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | 386 | 50: 0 0 0 0 GICv2 151 Level fd4a0000.display |
220 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | 387 | 51: 551 0 0 0 GICv2 81 Level mmc0 |
221 | 52: 548 0 0 0 GICv2 81 Level mmc0 | 388 | 52: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] |
222 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | 389 | 53: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 |
223 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | 390 | 54: 0 0 0 0 zynq-gpio 22 Edge sw19 |
224 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | 391 | IPI0: 73 69 133 115 Rescheduling interrupts |
225 | IPI0: 64 25 87 38 Rescheduling interrupts | 392 | IPI1: 2590 1426 1711 13134 Function call interrupts |
226 | IPI1: 1933 6579 1096 5686 Function call interrupts | ||
227 | IPI2: 0 0 0 0 CPU stop interrupts | 393 | IPI2: 0 0 0 0 CPU stop interrupts |
228 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | 394 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts |
229 | IPI4: 0 0 0 0 Timer broadcast interrupts | 395 | IPI4: 0 0 0 0 Timer broadcast interrupts |
230 | IPI5: 0 0 0 0 IRQ work interrupts | 396 | IPI5: 0 0 0 0 IRQ work interrupts |
231 | IPI6: 0 0 0 0 CPU wake-up interrupts | 397 | IPI6: 0 0 0 0 CPU wake-up interrupts |
232 | Err: 0 | 398 | Err: 0 |
233 | yocto-zynqmp-generic-20231:/home/petalinux# tree /lib/firmware/ | 399 | yocto-zynqmp-generic:/# |
400 | yocto-zynqmp-generic:/# tree /lib/firmware/ | ||
234 | /lib/firmware/ | 401 | /lib/firmware/ |
235 | `-- xilinx | 402 | `-- xilinx |
236 | `-- zcu111-pl-demo | 403 | `-- zcu111-pl-demo-user-dts |
237 | |-- zcu111-pl-demo.bit.bin | 404 | |-- shell.json |
238 | `-- zcu111-pl-demo.dtbo | 405 | |-- zcu111-pl-demo-user-dts.bin |
239 | 406 | `-- zcu111-pl-demo-user-dts.dtbo | |
240 | 2 directories, 2 files | 407 | |
241 | yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -b /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.bit -o /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.dtbo | 408 | 2 directories, 3 files |
242 | [ 91.039773] fpga_manager fpga0: writing zcu111-pl-demo.bit to Xilinx ZynqMP FPGA Manager | 409 | yocto-zynqmp-generic:/# |
243 | [ 91.528214] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name | 410 | yocto-zynqmp-generic:/# fpgautil -b /lib/firmware/xilinx/zcu111-pl-demo-user-dts/zcu111-pl-demo-user-dts.bin -o /lib/firmware/xilinx/zcu111-pl-demo-user-dts/zcu111-pl-demo-user-dts.dtbo |
244 | [ 91.538354] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/pid | 411 | [ 86.077583] fpga_manager fpga0: writing zcu111-pl-demo-user-dts.bin to Xilinx ZynqMP FPGA Manager |
245 | [ 91.547598] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets | 412 | [ 86.300854] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-region/firmware-name |
246 | [ 91.557087] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/uid | 413 | [ 86.311158] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-region/pid |
247 | [ 91.566804] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0 | 414 | [ 86.320571] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-region/resets |
248 | [ 91.576312] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0 | 415 | [ 86.330230] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-region/uid |
249 | [ 91.586255] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_0 | 416 | [ 86.340074] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0 |
250 | [ 91.596280] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0 | 417 | [ 86.349574] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0 |
251 | [ 91.606300] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_1 | 418 | [ 86.359510] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_0 |
252 | [ 91.616325] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_2 | 419 | [ 86.369526] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0 |
253 | [ 91.626342] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0 | 420 | [ 86.379544] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_1 |
254 | [ 91.636705] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ddr4_0 | 421 | [ 86.389561] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_2 |
255 | [ 91.661849] gpio gpiochip3: (a0000000.gpio): not an immutable chip, please consider fixing it! | 422 | [ 86.399588] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0 |
256 | [ 91.662020] gpio gpiochip4: (a0010000.gpio): not an immutable chip, please consider fixing it! | 423 | [ 86.409951] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ddr4_0 |
257 | [ 91.863492] a0030000.serial: ttyUL0 at MMIO 0xa0030000 (irq = 58, base_baud = 0) is a uartlite | 424 | [ 86.439309] a0030000.serial: ttyUL0 at MMIO 0xa0030000 (irq = 57, base_baud = 0) is a uartlite |
258 | [ 91.876674] uartlite a0030000.serial: Runtime PM usage count underflow! | 425 | [ 86.456365] uartlite a0030000.serial: Runtime PM usage count underflow! |
259 | [ 91.906539] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input1 | 426 | [ 86.466353] input: axi:pl-gpio-keys as /devices/platform/axi/axi:pl-gpio-keys/input/input1 |
260 | Time taken to load BIN is 901.000000 Milli Seconds | 427 | Time taken to load BIN is 402.000000 Milli Seconds |
261 | BIN FILE loaded through FPGA manager successfully | 428 | BIN FILE loaded through FPGA manager successfully |
262 | yocto-zynqmp-generic-20231:/home/petalinux# | 429 | yocto-zynqmp-generic:/# |
263 | ``` | 430 | ``` |
264 | * Versal (DFx Static) | 431 | * Versal (DFx Static) |
265 | ``` | 432 | ``` |
266 | yocto-vck190-dfx-2023:~$ sudo su | 433 | yocto-vck190-versal:/$ sudo su |
267 | root@yocto-vck190-dfx-2023:~# | 434 | yocto-vck190-versal:/# fpgautil -b /lib/firmware/xilinx/vck190-dfx-static/vck190-dfx-static.pdi -o /lib/firmware/xilinx/vck190-dfx-static/vck190-dfx-static.dtbo |
268 | root@yocto-vck190-dfx-2023:~# fpgautil -o /lib/firmware/xilinx/vck190-dfx-static/vck190-dfx-static.dtbo | 435 | [ 110.575263] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/external-fpga-config |
269 | [ 257.555571] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/external-fpga-config | 436 | [ 110.585557] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/pid |
270 | [ 257.565879] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/pid | 437 | [ 110.594365] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/uid |
271 | [ 257.574670] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/uid | 438 | [ 110.603307] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR0 |
272 | [ 257.583599] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR0 | 439 | [ 110.613152] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR1 |
273 | [ 257.593434] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR1 | 440 | [ 110.623007] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR2 |
274 | [ 257.603268] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR2 | 441 | [ 110.632849] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_axi_bram_ctrl_0 |
275 | [ 257.613100] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_axi_bram_ctrl_0 | 442 | [ 110.644516] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp1 |
276 | [ 257.624762] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp1 | 443 | [ 110.656351] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp2 |
277 | [ 257.636589] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp2 | 444 | [ 110.668188] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp3 |
278 | [ 257.648415] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp3 | 445 | [ 110.682762] of-fpga-region fpga:fpga-PR0: FPGA Region probed |
279 | [ 257.663234] of-fpga-region fpga:fpga-PR0: FPGA Region probed | 446 | [ 110.689956] of-fpga-region fpga:fpga-PR1: FPGA Region probed |
280 | [ 257.669135] of-fpga-region fpga:fpga-PR1: FPGA Region probed | 447 | [ 110.695890] of-fpga-region fpga:fpga-PR2: FPGA Region probed |
281 | [ 257.675022] of-fpga-region fpga:fpga-PR2: FPGA Region probed | 448 | Time taken to load BIN is 133.000000 Milli Seconds |
282 | root@yocto-vck190-dfx-2023:~# | 449 | BIN FILE loaded through FPGA manager successfully |
450 | yocto-vck190-versal:/# | ||
283 | ``` | 451 | ``` |
284 | * Versal (DFx RP) | 452 | * Versal (DFx RP) |
285 | ``` | 453 | ``` |
286 | root@yocto-vck190-dfx-2023:~# fpgautil -b /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.pdi -o /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.dtbo -f Partial -n PR0 | 454 | yocto-vck190-versal:/$ sudo su |
287 | [ 273.511455] fpga_manager fpga0: writing vck190-dfx-rp1rm1-dipsw.pdi to Xilinx Versal FPGA Manager | 455 | yocto-vck190-versal:/# fpgautil -b /lib/firmware/xilinx/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.pdi -o /lib/firmware/xilinx/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.dtbo -f Partial -n PR0 |
288 | [284052.461]Loading PDI from DDR | 456 | [ 154.155127] fpga_manager fpga0: writing vck190-dfx-rp1rm1-dipsw.pdi to Xilinx Versal FPGA Manager |
289 | [284052.566]Monolithic/Master Device | 457 | [173465.709]Loading PDI from DDR |
290 | [284055.847]3.365 ms: PDI initialization time | 458 | [173465.800]Monolithic/Master Device |
291 | [284059.809]+++Loading Image#: 0x0, Name: pl_cfi, Id: 0x18700002 | 459 | [173469.235]3.520 ms: PDI initialization time |
292 | [284065.432]---Loading Partition#: 0x0, Id: 0x103 | 460 | [173473.045]+++Loading Image#: 0x0, Name: pl_cfi, Id: 0x18700002 |
293 | [284069.829] 0.033 ms for Partition#: 0x0, Size: 1312 Bytes | 461 | [173478.669]---Loading Partition#: 0x0, Id: 0x103 |
294 | [284074.973]---Loading Partition#: 0x1, Id: 0x105 | 462 | [173483.052] 0.032 ms for Partition#: 0x0, Size: 1264 Bytes |
295 | [284079.344] 0.007 ms for Partition#: 0x1, Size: 160 Bytes | 463 | [173488.219]---Loading Partition#: 0x1, Id: 0x203 |
296 | [284084.430]---Loading Partition#: 0x2, Id: 0x205 | 464 | [173492.599] 0.030 ms for Partition#: 0x1, Size: 672 Bytes |
297 | [284088.844] 0.049 ms for Partition#: 0x2, Size: 960 Bytes | 465 | [173497.682]---Loading Partition#: 0x2, Id: 0x303 |
298 | [284093.887]---Loading Partition#: 0x3, Id: 0x203 | 466 | [173503.193] 1.159 ms for Partition#: 0x2, Size: 204960 Bytes |
299 | [284098.280] 0.030 ms for Partition#: 0x3, Size: 688 Bytes | 467 | [173507.400]---Loading Partition#: 0x3, Id: 0x403 |
300 | [284103.342]---Loading Partition#: 0x4, Id: 0x303 | 468 | [173511.805] 0.054 ms for Partition#: 0x3, Size: 8400 Bytes |
301 | [284108.863] 1.156 ms for Partition#: 0x4, Size: 209440 Bytes | 469 | [173516.979]Subsystem PDI Load: Done |
302 | [284113.052]---Loading Partition#: 0x5, Id: 0x305 | 470 | [ 154.220425] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/rp1_axi_gpio_0 |
303 | [284117.712] 0.296 ms for Partition#: 0x5, Size: 3536 Bytes | 471 | [ 154.239592] input: axi:pl-gpio-keys as /devices/platform/axi/axi:pl-gpio-keys/input/input1 |
304 | [284122.594]---Loading Partition#: 0x6, Id: 0x403 | 472 | Time taken to load BIN is 99.000000 Milli Seconds |
305 | [284126.991] 0.034 ms for Partition#: 0x6, Size: 8096 Bytes | ||
306 | [284132.136]---Loading Partition#: 0x7, Id: 0x405 | ||
307 | [284136.507] 0.007 ms for Partition#: 0x7, Size: 160 Bytes | ||
308 | [284141.636]Subsystem PDI Load: Done | ||
309 | [ 273.615503] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/firmware-name | ||
310 | [ 273.627382] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/fpga-bridges | ||
311 | [ 273.636953] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/partial-fpga-config | ||
312 | [ 273.647241] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/rp1_axi_gpio_0 | ||
313 | [ 273.660826] gpio gpiochip1: (a4010000.gpio): not an immutable chip, please consider fixing it! | ||
314 | [ 273.670490] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input0 | ||
315 | Time taken to load BIN is 171.000000 Milli Seconds | ||
316 | BIN FILE loaded through FPGA manager successfully | 473 | BIN FILE loaded through FPGA manager successfully |
317 | root@yocto-vck190-dfx-2023:~# | 474 | yocto-vck190-versal:/# |
475 | ``` | ||
476 | * Versal (Segmented Configuration) | ||
477 | ``` | ||
478 | yocto-vck190-versal:/$ sudo su | ||
479 | yocto-vck190-versal:/# fpgautil -b /lib/firmware/xilinx/vck190-dfx-full/vck190-dfx-full.pdi -o /lib/firmware/xilinx/vck190-dfx-full/vck190-dfx-full.dtbo | ||
480 | [ 642.857986] fpga_manager fpga0: writing vck190-dfx-full.pdi to Xilinx Versal FPGA Manager | ||
481 | [653673.622]Loading PDI from DDR | ||
482 | [653673.713]Monolithic/Master Device | ||
483 | [653677.159]3.531 ms: PDI initialization time | ||
484 | [653680.973]+++Loading Image#: 0x0, Name: pl_cfi, Id: 0x18700001 | ||
485 | [653686.608]---Loading Partition#: 0x0, Id: 0x103 | ||
486 | [653705.058] 14.091 ms for Partition#: 0x0, Size: 22176 Bytes | ||
487 | [653707.626]---Loading Partition#: 0x1, Id: 0x105 | ||
488 | [653712.243] 0.264 ms for Partition#: 0x1, Size: 4784 Bytes | ||
489 | [653717.183]---Loading Partition#: 0x2, Id: 0x205 | ||
490 | [653725.148] 3.608 ms for Partition#: 0x2, Size: 64368 Bytes | ||
491 | [653727.632]---Loading Partition#: 0x3, Id: 0x203 | ||
492 | [653732.018] 0.030 ms for Partition#: 0x3, Size: 672 Bytes | ||
493 | [653737.107]---Loading Partition#: 0x4, Id: 0x303 | ||
494 | [653768.983] 27.516 ms for Partition#: 0x4, Size: 1115456 Bytes | ||
495 | [653771.723]---Loading Partition#: 0x5, Id: 0x305 | ||
496 | [653777.150] 1.068 ms for Partition#: 0x5, Size: 69056 Bytes | ||
497 | [653781.371]---Loading Partition#: 0x6, Id: 0x403 | ||
498 | [653785.892] 0.166 ms for Partition#: 0x6, Size: 242320 Bytes | ||
499 | [653791.103]---Loading Partition#: 0x7, Id: 0x405 | ||
500 | ERR PldMemCtrlrMap: 0x490E | ||
501 | ERR PldInitNode: 0xFFFF | ||
502 | ERR XPm_InitNode: 0xFFFF | ||
503 | ALERT XPm_ProcessCmd: Error 0x15 while processing command 0xC023E | ||
504 | ALERT XPm_ProcessCmd: Err Code: 0x15 | ||
505 | [653811.158]CMD: 0x000C023E execute failed, Processed Cdo Length 0x129C | ||
506 | [653817.390]CMD Payload START, Len:0x00000008 | ||
507 | 0x00000000F20012C0: 0x18700001 0x0000000A 0xF6110000 0x00000002 | ||
508 | 0x00000000F20012CC: 0x00000000 0x00000000 0x80000000 0x00000000 | ||
509 | 0x00000000F20012DC: | ||
510 | [653834.800]CMD Payload END | ||
511 | [653837.277]Error loading PL data: | ||
512 | CFU_ISR: 0x00000000, CFU_STATUS: 0x00002A8C | ||
513 | PMC ERR1: 0x00000000, PMC ERR2: 0x00000000 | ||
514 | [653848.127]PLM Error Status: 0x223E0015 | ||
515 | [65 851.704]XPlm _IpiDispatehHandl0:: Error:hIPI crmmand faileddfor tommanA ID: 0x1000701 | ||
516 | [653859.465]PLM Error Status: 0x27010015 | ||
517 | [ 643.063905] fpga_region region0: failed to load FPGA image | ||
518 | [ 643.069420] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/firmware-name | ||
519 | [ 643.079075] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/pid | ||
520 | [ 643.087857] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/uid | ||
521 | [ 643.096849] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_bram_ctrl_0 | ||
522 | [ 643.107288] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_dip_sw | ||
523 | [ 643.117729] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_led | ||
524 | [ 643.127906] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_pb | ||
525 | [ 643.137996] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0 | ||
526 | [ 643.178340] 20100000000.serial: ttyUL0 at MMIO 0x20100000000 (irq = 41, base_baud = 0) is a uartlite | ||
527 | [ 643.189536] uartlite 20100000000.serial: Runtime PM usage count underflow! | ||
528 | [ 643.198059] input: axi:pl-gpio-keys as /devices/platform/axi/axi:pl-gpio-keys/input/input0 | ||
529 | yocto-vck190-versal:/# | ||
318 | ``` | 530 | ``` |
319 | --- | 531 | --- |
320 | 532 | ||
@@ -324,148 +536,148 @@ root@yocto-vck190-dfx-2023:~# | |||
324 | * Verify PL GPIO DIP switches and Push buttons are registered. | 536 | * Verify PL GPIO DIP switches and Push buttons are registered. |
325 | * Move the DIP Switches ON/OFF and verify the interrupt counts. | 537 | * Move the DIP Switches ON/OFF and verify the interrupt counts. |
326 | ``` | 538 | ``` |
327 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | 539 | yocto-zynqmp-generic:/# cat /proc/interrupts |
328 | CPU0 CPU1 CPU2 CPU3 | 540 | CPU0 CPU1 CPU2 CPU3 |
329 | 11: 23303 22971 24203 24990 GICv2 30 Level arch_timer | 541 | 11: 4254 6509 4214 4236 GICv2 30 Level arch_timer |
330 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | 542 | 14: 0 0 0 0 GICv2 67 Level zynqmp-ipi |
331 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | 543 | 15: 0 0 0 0 GICv2 58 Level ffa60000.rtc |
332 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | 544 | 16: 0 0 0 0 GICv2 59 Level ffa60000.rtc |
333 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | 545 | 17: 0 0 0 0 GICv2 88 Level ams-irq |
334 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | 546 | 18: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon |
335 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | 547 | 19: 0 0 0 0 GICv2 175 Level arm-pmu |
336 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | 548 | 20: 0 0 0 0 GICv2 176 Level arm-pmu |
337 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | 549 | 21: 0 0 0 0 GICv2 177 Level arm-pmu |
338 | 22: 0 0 0 0 GICv2 88 Level ams-irq | 550 | 22: 0 0 0 0 GICv2 178 Level arm-pmu |
339 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | 551 | 23: 579 0 0 0 GICv2 53 Level xuartps |
340 | 24: 515 0 0 0 GICv2 53 Level xuartps | 552 | 26: 0 0 0 0 GICv2 156 Level zynqmp-dma |
341 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | 553 | 27: 0 0 0 0 GICv2 157 Level zynqmp-dma |
342 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | 554 | 28: 0 0 0 0 GICv2 158 Level zynqmp-dma |
343 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | 555 | 29: 0 0 0 0 GICv2 159 Level zynqmp-dma |
344 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | 556 | 30: 0 0 0 0 GICv2 160 Level zynqmp-dma |
345 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | 557 | 31: 0 0 0 0 GICv2 161 Level zynqmp-dma |
346 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | 558 | 32: 0 0 0 0 GICv2 162 Level zynqmp-dma |
347 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | 559 | 33: 0 0 0 0 GICv2 163 Level zynqmp-dma |
348 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | 560 | 34: 0 0 0 0 GICv2 109 Level zynqmp-dma |
349 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | 561 | 35: 0 0 0 0 GICv2 110 Level zynqmp-dma |
350 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | 562 | 36: 0 0 0 0 GICv2 111 Level zynqmp-dma |
351 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | 563 | 37: 0 0 0 0 GICv2 112 Level zynqmp-dma |
352 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | 564 | 38: 0 0 0 0 GICv2 113 Level zynqmp-dma |
353 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | 565 | 39: 0 0 0 0 GICv2 114 Level zynqmp-dma |
354 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | 566 | 40: 0 0 0 0 GICv2 115 Level zynqmp-dma |
355 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | 567 | 41: 0 0 0 0 GICv2 116 Level zynqmp-dma |
356 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | 568 | 42: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller |
357 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | 569 | 43: 11183 0 0 0 GICv2 47 Level ff0f0000.spi |
358 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | 570 | 44: 146 0 0 0 GICv2 95 Level eth0, eth0 |
359 | 45: 110 0 0 0 GICv2 95 Level eth0, eth0 | 571 | 45: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon |
360 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | 572 | 46: 2365 0 0 0 GICv2 49 Level cdns-i2c |
361 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | 573 | 47: 326 0 0 0 GICv2 50 Level cdns-i2c |
362 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | 574 | 49: 0 0 0 0 GICv2 84 Edge ff150000.watchdog |
363 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | 575 | 50: 0 0 0 0 GICv2 151 Level fd4a0000.display |
364 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | 576 | 51: 551 0 0 0 GICv2 81 Level mmc0 |
365 | 52: 548 0 0 0 GICv2 81 Level mmc0 | 577 | 52: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] |
366 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | 578 | 53: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 |
367 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | 579 | 54: 0 0 0 0 zynq-gpio 22 Edge sw19 |
368 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | 580 | 58: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N |
369 | 59: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N | 581 | 59: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E |
370 | 60: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E | 582 | 60: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S |
371 | 61: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S | 583 | 61: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W |
372 | 62: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W | 584 | 62: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C |
373 | 63: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C | 585 | 63: 0 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 |
374 | 64: 0 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 | 586 | 64: 0 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 |
375 | 65: 0 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 | 587 | 65: 0 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 |
376 | 66: 0 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 | 588 | 66: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 |
377 | 67: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 | 589 | 67: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 |
378 | 68: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 | 590 | 68: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 |
379 | 69: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 | 591 | 69: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 |
380 | 70: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 | 592 | 70: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 |
381 | 71: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 | 593 | IPI0: 77 79 141 123 Rescheduling interrupts |
382 | IPI0: 64 25 87 38 Rescheduling interrupts | 594 | IPI1: 2621 1536 1782 13236 Function call interrupts |
383 | IPI1: 2066 6747 1212 5791 Function call interrupts | ||
384 | IPI2: 0 0 0 0 CPU stop interrupts | 595 | IPI2: 0 0 0 0 CPU stop interrupts |
385 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | 596 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts |
386 | IPI4: 0 0 0 0 Timer broadcast interrupts | 597 | IPI4: 0 0 0 0 Timer broadcast interrupts |
387 | IPI5: 0 0 0 0 IRQ work interrupts | 598 | IPI5: 0 0 0 0 IRQ work interrupts |
388 | IPI6: 0 0 0 0 CPU wake-up interrupts | 599 | IPI6: 0 0 0 0 CPU wake-up interrupts |
389 | Err: 0 | 600 | Err: 0 |
390 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | 601 | yocto-zynqmp-generic:/# |
602 | yocto-zynqmp-generic:/# | ||
603 | yocto-zynqmp-generic:/# cat /proc/interrupts | ||
391 | CPU0 CPU1 CPU2 CPU3 | 604 | CPU0 CPU1 CPU2 CPU3 |
392 | 11: 28169 27725 29250 30190 GICv2 30 Level arch_timer | 605 | 11: 4972 7894 4568 4673 GICv2 30 Level arch_timer |
393 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | 606 | 14: 0 0 0 0 GICv2 67 Level zynqmp-ipi |
394 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | 607 | 15: 0 0 0 0 GICv2 58 Level ffa60000.rtc |
395 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | 608 | 16: 0 0 0 0 GICv2 59 Level ffa60000.rtc |
396 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | 609 | 17: 0 0 0 0 GICv2 88 Level ams-irq |
397 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | 610 | 18: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon |
398 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | 611 | 19: 0 0 0 0 GICv2 175 Level arm-pmu |
399 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | 612 | 20: 0 0 0 0 GICv2 176 Level arm-pmu |
400 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | 613 | 21: 0 0 0 0 GICv2 177 Level arm-pmu |
401 | 22: 0 0 0 0 GICv2 88 Level ams-irq | 614 | 22: 0 0 0 0 GICv2 178 Level arm-pmu |
402 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | 615 | 23: 685 0 0 0 GICv2 53 Level xuartps |
403 | 24: 603 0 0 0 GICv2 53 Level xuartps | 616 | 26: 0 0 0 0 GICv2 156 Level zynqmp-dma |
404 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | 617 | 27: 0 0 0 0 GICv2 157 Level zynqmp-dma |
405 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | 618 | 28: 0 0 0 0 GICv2 158 Level zynqmp-dma |
406 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | 619 | 29: 0 0 0 0 GICv2 159 Level zynqmp-dma |
407 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | 620 | 30: 0 0 0 0 GICv2 160 Level zynqmp-dma |
408 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | 621 | 31: 0 0 0 0 GICv2 161 Level zynqmp-dma |
409 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | 622 | 32: 0 0 0 0 GICv2 162 Level zynqmp-dma |
410 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | 623 | 33: 0 0 0 0 GICv2 163 Level zynqmp-dma |
411 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | 624 | 34: 0 0 0 0 GICv2 109 Level zynqmp-dma |
412 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | 625 | 35: 0 0 0 0 GICv2 110 Level zynqmp-dma |
413 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | 626 | 36: 0 0 0 0 GICv2 111 Level zynqmp-dma |
414 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | 627 | 37: 0 0 0 0 GICv2 112 Level zynqmp-dma |
415 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | 628 | 38: 0 0 0 0 GICv2 113 Level zynqmp-dma |
416 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | 629 | 39: 0 0 0 0 GICv2 114 Level zynqmp-dma |
417 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | 630 | 40: 0 0 0 0 GICv2 115 Level zynqmp-dma |
418 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | 631 | 41: 0 0 0 0 GICv2 116 Level zynqmp-dma |
419 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | 632 | 42: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller |
420 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | 633 | 43: 11183 0 0 0 GICv2 47 Level ff0f0000.spi |
421 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | 634 | 44: 265 0 0 0 GICv2 95 Level eth0, eth0 |
422 | 45: 134 0 0 0 GICv2 95 Level eth0, eth0 | 635 | 45: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon |
423 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | 636 | 46: 2365 0 0 0 GICv2 49 Level cdns-i2c |
424 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | 637 | 47: 326 0 0 0 GICv2 50 Level cdns-i2c |
425 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | 638 | 49: 0 0 0 0 GICv2 84 Edge ff150000.watchdog |
426 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | 639 | 50: 0 0 0 0 GICv2 151 Level fd4a0000.display |
427 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | 640 | 51: 551 0 0 0 GICv2 81 Level mmc0 |
428 | 52: 548 0 0 0 GICv2 81 Level mmc0 | 641 | 52: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] |
429 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | 642 | 53: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 |
430 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | 643 | 54: 0 0 0 0 zynq-gpio 22 Edge sw19 |
431 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | 644 | 58: 12 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N |
432 | 59: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N | 645 | 59: 8 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E |
433 | 60: 4 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E | 646 | 60: 8 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S |
434 | 61: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S | 647 | 61: 8 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W |
435 | 62: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W | 648 | 62: 10 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C |
436 | 63: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C | 649 | 63: 2 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 |
437 | 64: 2 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 | 650 | 64: 4 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 |
438 | 65: 2 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 | 651 | 65: 2 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 |
439 | 66: 4 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 | 652 | 66: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 |
440 | 67: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 | 653 | 67: 2 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 |
441 | 68: 2 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 | 654 | 68: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 |
442 | 69: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 | 655 | 69: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 |
443 | 70: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 | 656 | 70: 4 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 |
444 | 71: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 | 657 | IPI0: 77 79 142 123 Rescheduling interrupts |
445 | IPI0: 64 26 87 38 Rescheduling interrupts | 658 | IPI1: 2641 1596 2011 13239 Function call interrupts |
446 | IPI1: 2163 6791 1243 5866 Function call interrupts | ||
447 | IPI2: 0 0 0 0 CPU stop interrupts | 659 | IPI2: 0 0 0 0 CPU stop interrupts |
448 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | 660 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts |
449 | IPI4: 0 0 0 0 Timer broadcast interrupts | 661 | IPI4: 0 0 0 0 Timer broadcast interrupts |
450 | IPI5: 0 0 0 0 IRQ work interrupts | 662 | IPI5: 0 0 0 0 IRQ work interrupts |
451 | IPI6: 0 0 0 0 CPU wake-up interrupts | 663 | IPI6: 0 0 0 0 CPU wake-up interrupts |
452 | Err: 0 | 664 | Err: 0 |
453 | yocto-zynqmp-generic-20231:/home/petalinux# | 665 | yocto-zynqmp-generic:/# |
454 | ``` | 666 | ``` |
455 | --- | 667 | --- |
456 | 668 | ||
457 | ### Unloading PL bitstream or pdi and dt overlay | 669 | ### Unloading PL bitstream or pdi and dt overlay |
458 | * Zynq or ZynqMP | 670 | * Zynq or ZynqMP |
459 | ``` | 671 | ``` |
460 | yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -R | 672 | yocto-zynqmp-generic:/home/petalinux# fpgautil -R |
461 | ``` | 673 | ``` |
462 | * Versal (DFx RP) | 674 | * Versal (DFx RP) |
463 | ``` | 675 | ``` |
464 | root@yocto-vck190-dfx-2023:~# fpgautil -R -n PR0 | 676 | yocto-vck190-versal:/# fpgautil -R -n PR0 |
465 | ``` | 677 | ``` |
466 | * Versal (DFx Static) | 678 | * Versal (DFx Static) |
467 | ``` | 679 | ``` |
468 | root@yocto-vck190-dfx-2023:~# fpgautil -R -n Full | 680 | yocto-vck190-versal:/# fpgautil -R -n Full |
469 | ``` | 681 | ``` |
470 | --- | 682 | --- |
471 | 683 | ||
diff --git a/docs/README.fpgamanager.custom.md b/docs/README.fpgamanager.custom.md deleted file mode 100644 index dbdf5907..00000000 --- a/docs/README.fpgamanager.custom.md +++ /dev/null | |||
@@ -1,478 +0,0 @@ | |||
1 | # Build Instructions to create firmware recipes using fpgamanager_custom bbclass | ||
2 | |||
3 | * [Introduction](#introduction) | ||
4 | * [How to create a firmware recipe app](#how-to-create-a-firmware-recipe-app) | ||
5 | * [Test Procedure on Target](#test-procedure-on-target) | ||
6 | * [Loading PL bitstream or pdi and dt overlay](#loading-pl-bitstream-or-pdi-and-dt-overlay) | ||
7 | * [Testing PL functionality](#testing-pl-functionality) | ||
8 | * [Unloading PL bitstream or pdi and dt overlay](#unloading-pl-bitstream-or-pdi-and-dt-overlay) | ||
9 | * [References](#references) | ||
10 | |||
11 | > **Note:** This README will be deprecated in 2024.1 release. User sthould start | ||
12 | > using [DFx User DTS README](README.dfx.user.dts.md) | ||
13 | |||
14 | ## Introduction | ||
15 | This readme describes the build instructions to create firmware recipes using | ||
16 | fpgamanager_custom.bbclass for dynamic configuration. This bitbake class supports | ||
17 | following use cases. | ||
18 | |||
19 | > **Note:** Refer https://github.com/Xilinx/dfx-mgr/blob/master/README.md for | ||
20 | > shell.json and accel.json file content. | ||
21 | |||
22 | * **Zynq-7000 and ZynqMP**: | ||
23 | * Design: Vivado flat design. | ||
24 | * Input files to firmware recipes: .bit, .dtsi or dtbo and shell.json (optional) | ||
25 | * Usage Examples: | ||
26 | ``` | ||
27 | SRC_URI = " \ | ||
28 | file://<flat_design_pl>.bit \ | ||
29 | file://<flat_design_pl>.dtsi \ | ||
30 | file://shell.json \ | ||
31 | " | ||
32 | ``` | ||
33 | |||
34 | ``` | ||
35 | SRC_URI = " \ | ||
36 | file://<flat_design_pl>.bit \ | ||
37 | file://<flat_design_pl>.dtbo \ | ||
38 | file://shell.json \ | ||
39 | " | ||
40 | ``` | ||
41 | |||
42 | * **ZynqMP and Versal**: | ||
43 | * Design: Vivado DFx design. | ||
44 | * Input files to firmware recipes: .bit(ZynqMP) or .pdi(Versal), .dtsi or dtbo | ||
45 | shell.json or accel.json (optional) and .xclbin (optional). | ||
46 | * Usage Examples: | ||
47 | |||
48 | ``` | ||
49 | # ZynqMP DFx Static | ||
50 | SRC_URI = " \ | ||
51 | file://<dfx_design_static_pl>.bit \ | ||
52 | file://<dfx_design_static_pl>.dtsi \ | ||
53 | file://shell.json \ | ||
54 | file://<dfx_design_static_pl>.xclbin \ | ||
55 | " | ||
56 | ``` | ||
57 | |||
58 | ``` | ||
59 | # ZynqMP DFx Static | ||
60 | SRC_URI = " \ | ||
61 | file://<dfx_design_static_pl>.bit \ | ||
62 | file://<dfx_design_static_pl>.dtbo \ | ||
63 | file://shell.json \ | ||
64 | file://<dfx_design_static_pl>.xclbin \ | ||
65 | " | ||
66 | ``` | ||
67 | |||
68 | ``` | ||
69 | # ZynqMP DFx RP | ||
70 | SRC_URI = " \ | ||
71 | file://<dfx_design_rp_rm_pl>.bit \ | ||
72 | file://<dfx_design_rp_rm_pl>.dtsi \ | ||
73 | file://accel.json \ | ||
74 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
75 | " | ||
76 | ``` | ||
77 | |||
78 | ``` | ||
79 | # ZynqMP DFx RP | ||
80 | SRC_URI = " \ | ||
81 | file://<dfx_design_rp_rm_pl>.bit \ | ||
82 | file://<dfx_design_rp_rm_pl>.dtbo \ | ||
83 | file://accel.json \ | ||
84 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
85 | " | ||
86 | ``` | ||
87 | ``` | ||
88 | # Versal DFx Static | ||
89 | SRC_URI = " \ | ||
90 | file://<dfx_design_static_pl>.pdi \ | ||
91 | file://<dfx_design_static_pl>.dtsi \ | ||
92 | file://shell.json \ | ||
93 | file://<dfx_design_static_pl>.xclbin \ | ||
94 | " | ||
95 | ``` | ||
96 | |||
97 | ``` | ||
98 | # Versal DFx Static | ||
99 | SRC_URI = " \ | ||
100 | file://<dfx_design_static_pl>.pdi \ | ||
101 | file://<dfx_design_static_pl>.dtbo \ | ||
102 | file://shell.json \ | ||
103 | file://<dfx_design_static_pl>.xclbin \ | ||
104 | " | ||
105 | ``` | ||
106 | |||
107 | ``` | ||
108 | # Versal DFx RP | ||
109 | SRC_URI = " \ | ||
110 | file://<dfx_design_rp_rm_pl>.pdi \ | ||
111 | file://<dfx_design_rp_rm_pl>.dtsi \ | ||
112 | file://accel.json \ | ||
113 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
114 | " | ||
115 | ``` | ||
116 | |||
117 | ``` | ||
118 | # Versal DFx RP | ||
119 | SRC_URI = " \ | ||
120 | file://<dfx_design_rp_rm_pl>.pdi \ | ||
121 | file://<dfx_design_rp_rm_pl>.dtbo \ | ||
122 | file://accel.json \ | ||
123 | file://<dfx_design_rp_rm_pl>.xclbin \ | ||
124 | " | ||
125 | ``` | ||
126 | --- | ||
127 | |||
128 | ## How to create a firmware recipe app | ||
129 | |||
130 | 1. Follow [Building Instructions](../README.building.md) upto step 4. | ||
131 | 2. Create recipes-firmware directory in meta layer and copy the .bit/pdi, | ||
132 | .dtsi/dtbo, .json and .xclbin file to these directories. | ||
133 | ``` | ||
134 | $ mkdir -p <meta-layer>/recipes-firmware/<recipes-firmware-app>/files | ||
135 | $ cp -r <path-to-files>/*.{bit or pdi, dtsi or dtbo, shell.json or accel.json and .xclbin} <meta-layer>/recipes-firmware/<firmware-app-name>/files | ||
136 | ``` | ||
137 | 3. Now create the recipes for flat or static or partial firmware using recipetool. | ||
138 | ``` | ||
139 | $ recipetool create -o <meta-layer>/recipes-firmware/<firmware-app-name>/firmware-app-name.bb file:///<meta-layer>/recipes-firmware/<firmware-app-name>/files | ||
140 | ``` | ||
141 | 4. Modify the recipe and inherit fpgamanager_custom bbclass as shown below. | ||
142 | ``` | ||
143 | SUMMARY = "Full Bitstream loading zcu111-pl-demo firmware using fpgamanager_custom bbclass" | ||
144 | LICENSE = "MIT" | ||
145 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | ||
146 | |||
147 | inherit fpgamanager_custom | ||
148 | |||
149 | SRC_URI = "\ | ||
150 | file://zcu111-pl-demo.bit \ | ||
151 | file://zcu111-pl-demo.dtsi \ | ||
152 | " | ||
153 | |||
154 | COMPATIBLE_MACHINE ?= "^$" | ||
155 | COMPATIBLE_MACHINE:zynqmp = "zynqmp" | ||
156 | ``` | ||
157 | 5. Add firmware-recipe app to image and enable fpga-overlay machine features to | ||
158 | local.conf as shown below. | ||
159 | > **Note:** fpga-manager-script provides fpgautil tool to load .bit/pdi and dtbo | ||
160 | > at runtime linux. | ||
161 | ``` | ||
162 | MACHINE_FEATURES += "fpga-overlay" | ||
163 | IMAGE_INSTALL:append = " \ | ||
164 | firmware-app-name \ | ||
165 | fpga-manager-script \ | ||
166 | " | ||
167 | ``` | ||
168 | 6. Follow [Building Instructions](../README.building.md) and continue from step 5. | ||
169 | 7. Once images are built firmware app files will be installed on target_rootfs. | ||
170 | ``` | ||
171 | # <target_rootfs>/lib/firmware/xilinx/firmware-app-name | ||
172 | ``` | ||
173 | --- | ||
174 | |||
175 | ## Test Procedure on Target | ||
176 | * Once Linux boots on target, use fpgautil command to load .bit or .pdi and | ||
177 | corresponding dt overlay as shown below. | ||
178 | > **Note:** firmware can be loaded only with sudo or root permissions. | ||
179 | --- | ||
180 | |||
181 | ### Loading PL bitstream or pdi and dt overlay | ||
182 | |||
183 | * ZynqMP | ||
184 | ``` | ||
185 | yocto-zynqmp-generic-20231:~$ sudo su | ||
186 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | ||
187 | CPU0 CPU1 CPU2 CPU3 | ||
188 | 11: 13309 13021 13673 14170 GICv2 30 Level arch_timer | ||
189 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | ||
190 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | ||
191 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | ||
192 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | ||
193 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | ||
194 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | ||
195 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | ||
196 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | ||
197 | 22: 0 0 0 0 GICv2 88 Level ams-irq | ||
198 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | ||
199 | 24: 327 0 0 0 GICv2 53 Level xuartps | ||
200 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | ||
201 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | ||
202 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | ||
203 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | ||
204 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | ||
205 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | ||
206 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | ||
207 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | ||
208 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | ||
209 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | ||
210 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | ||
211 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | ||
212 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | ||
213 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | ||
214 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | ||
215 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | ||
216 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | ||
217 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | ||
218 | 45: 76 0 0 0 GICv2 95 Level eth0, eth0 | ||
219 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | ||
220 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | ||
221 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | ||
222 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | ||
223 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | ||
224 | 52: 548 0 0 0 GICv2 81 Level mmc0 | ||
225 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | ||
226 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | ||
227 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | ||
228 | IPI0: 64 25 87 38 Rescheduling interrupts | ||
229 | IPI1: 1933 6579 1096 5686 Function call interrupts | ||
230 | IPI2: 0 0 0 0 CPU stop interrupts | ||
231 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | ||
232 | IPI4: 0 0 0 0 Timer broadcast interrupts | ||
233 | IPI5: 0 0 0 0 IRQ work interrupts | ||
234 | IPI6: 0 0 0 0 CPU wake-up interrupts | ||
235 | Err: 0 | ||
236 | yocto-zynqmp-generic-20231:/home/petalinux# tree /lib/firmware/ | ||
237 | /lib/firmware/ | ||
238 | `-- xilinx | ||
239 | `-- zcu111-pl-demo | ||
240 | |-- zcu111-pl-demo.bit.bin | ||
241 | `-- zcu111-pl-demo.dtbo | ||
242 | |||
243 | 2 directories, 2 files | ||
244 | yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -b /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.bit -o /lib/firmware/xilinx/zcu111-pl-demo/zcu111-pl-demo.dtbo | ||
245 | [ 91.039773] fpga_manager fpga0: writing zcu111-pl-demo.bit to Xilinx ZynqMP FPGA Manager | ||
246 | [ 91.528214] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/firmware-name | ||
247 | [ 91.538354] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/pid | ||
248 | [ 91.547598] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/resets | ||
249 | [ 91.557087] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga-full/uid | ||
250 | [ 91.566804] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/afi0 | ||
251 | [ 91.576312] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/clocking0 | ||
252 | [ 91.586255] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_0 | ||
253 | [ 91.596280] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/misc_clk_0 | ||
254 | [ 91.606300] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_1 | ||
255 | [ 91.616325] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_gpio_2 | ||
256 | [ 91.626342] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/axi_uartlite_0 | ||
257 | [ 91.636705] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/ddr4_0 | ||
258 | [ 91.661849] gpio gpiochip3: (a0000000.gpio): not an immutable chip, please consider fixing it! | ||
259 | [ 91.662020] gpio gpiochip4: (a0010000.gpio): not an immutable chip, please consider fixing it! | ||
260 | [ 91.863492] a0030000.serial: ttyUL0 at MMIO 0xa0030000 (irq = 58, base_baud = 0) is a uartlite | ||
261 | [ 91.876674] uartlite a0030000.serial: Runtime PM usage count underflow! | ||
262 | [ 91.906539] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input1 | ||
263 | Time taken to load BIN is 901.000000 Milli Seconds | ||
264 | BIN FILE loaded through FPGA manager successfully | ||
265 | yocto-zynqmp-generic-20231:/home/petalinux# | ||
266 | ``` | ||
267 | * Versal (DFx Static) | ||
268 | ``` | ||
269 | yocto-vck190-dfx-2023:~$ sudo su | ||
270 | root@yocto-vck190-dfx-2023:~# | ||
271 | root@yocto-vck190-dfx-2023:~# fpgautil -o /lib/firmware/xilinx/vck190-dfx-static/vck190-dfx-static.dtbo | ||
272 | [ 257.555571] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/external-fpga-config | ||
273 | [ 257.565879] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/pid | ||
274 | [ 257.574670] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/uid | ||
275 | [ 257.583599] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR0 | ||
276 | [ 257.593434] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR1 | ||
277 | [ 257.603268] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/fpga_PR2 | ||
278 | [ 257.613100] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_axi_bram_ctrl_0 | ||
279 | [ 257.624762] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp1 | ||
280 | [ 257.636589] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp2 | ||
281 | [ 257.648415] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/static_region_dfx_decoupler_rp3 | ||
282 | [ 257.663234] of-fpga-region fpga:fpga-PR0: FPGA Region probed | ||
283 | [ 257.669135] of-fpga-region fpga:fpga-PR1: FPGA Region probed | ||
284 | [ 257.675022] of-fpga-region fpga:fpga-PR2: FPGA Region probed | ||
285 | root@yocto-vck190-dfx-2023:~# | ||
286 | ``` | ||
287 | * Versal (DFx RP) | ||
288 | ``` | ||
289 | root@yocto-vck190-dfx-2023:~# fpgautil -b /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.pdi -o /lib/firmware/xilinx/vck190-dfx-static/rp1/vck190-dfx-rp1rm1-dipsw/vck190-dfx-rp1rm1-dipsw.dtbo -f Partial -n PR0 | ||
290 | [ 273.511455] fpga_manager fpga0: writing vck190-dfx-rp1rm1-dipsw.pdi to Xilinx Versal FPGA Manager | ||
291 | [284052.461]Loading PDI from DDR | ||
292 | [284052.566]Monolithic/Master Device | ||
293 | [284055.847]3.365 ms: PDI initialization time | ||
294 | [284059.809]+++Loading Image#: 0x0, Name: pl_cfi, Id: 0x18700002 | ||
295 | [284065.432]---Loading Partition#: 0x0, Id: 0x103 | ||
296 | [284069.829] 0.033 ms for Partition#: 0x0, Size: 1312 Bytes | ||
297 | [284074.973]---Loading Partition#: 0x1, Id: 0x105 | ||
298 | [284079.344] 0.007 ms for Partition#: 0x1, Size: 160 Bytes | ||
299 | [284084.430]---Loading Partition#: 0x2, Id: 0x205 | ||
300 | [284088.844] 0.049 ms for Partition#: 0x2, Size: 960 Bytes | ||
301 | [284093.887]---Loading Partition#: 0x3, Id: 0x203 | ||
302 | [284098.280] 0.030 ms for Partition#: 0x3, Size: 688 Bytes | ||
303 | [284103.342]---Loading Partition#: 0x4, Id: 0x303 | ||
304 | [284108.863] 1.156 ms for Partition#: 0x4, Size: 209440 Bytes | ||
305 | [284113.052]---Loading Partition#: 0x5, Id: 0x305 | ||
306 | [284117.712] 0.296 ms for Partition#: 0x5, Size: 3536 Bytes | ||
307 | [284122.594]---Loading Partition#: 0x6, Id: 0x403 | ||
308 | [284126.991] 0.034 ms for Partition#: 0x6, Size: 8096 Bytes | ||
309 | [284132.136]---Loading Partition#: 0x7, Id: 0x405 | ||
310 | [284136.507] 0.007 ms for Partition#: 0x7, Size: 160 Bytes | ||
311 | [284141.636]Subsystem PDI Load: Done | ||
312 | [ 273.615503] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/firmware-name | ||
313 | [ 273.627382] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/fpga-bridges | ||
314 | [ 273.636953] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /fpga/partial-fpga-config | ||
315 | [ 273.647241] OF: overlay: WARNING: memory leak will occur if overlay removed, property: /__symbols__/rp1_axi_gpio_0 | ||
316 | [ 273.660826] gpio gpiochip1: (a4010000.gpio): not an immutable chip, please consider fixing it! | ||
317 | [ 273.670490] input: pl-gpio-keys as /devices/platform/pl-gpio-keys/input/input0 | ||
318 | Time taken to load BIN is 171.000000 Milli Seconds | ||
319 | BIN FILE loaded through FPGA manager successfully | ||
320 | root@yocto-vck190-dfx-2023:~# | ||
321 | ``` | ||
322 | --- | ||
323 | |||
324 | ### Testing PL functionality | ||
325 | |||
326 | * This examples uses PL GPIO DIP switches and Push buttons to capture interrupts. | ||
327 | * Verify PL GPIO DIP switches and Push buttons are registered. | ||
328 | * Move the DIP Switches ON/OFF and verify the interrupt counts. | ||
329 | ``` | ||
330 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | ||
331 | CPU0 CPU1 CPU2 CPU3 | ||
332 | 11: 23303 22971 24203 24990 GICv2 30 Level arch_timer | ||
333 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | ||
334 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | ||
335 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | ||
336 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | ||
337 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | ||
338 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | ||
339 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | ||
340 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | ||
341 | 22: 0 0 0 0 GICv2 88 Level ams-irq | ||
342 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | ||
343 | 24: 515 0 0 0 GICv2 53 Level xuartps | ||
344 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | ||
345 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | ||
346 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | ||
347 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | ||
348 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | ||
349 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | ||
350 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | ||
351 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | ||
352 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | ||
353 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | ||
354 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | ||
355 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | ||
356 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | ||
357 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | ||
358 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | ||
359 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | ||
360 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | ||
361 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | ||
362 | 45: 110 0 0 0 GICv2 95 Level eth0, eth0 | ||
363 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | ||
364 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | ||
365 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | ||
366 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | ||
367 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | ||
368 | 52: 548 0 0 0 GICv2 81 Level mmc0 | ||
369 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | ||
370 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | ||
371 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | ||
372 | 59: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N | ||
373 | 60: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E | ||
374 | 61: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S | ||
375 | 62: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W | ||
376 | 63: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C | ||
377 | 64: 0 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 | ||
378 | 65: 0 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 | ||
379 | 66: 0 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 | ||
380 | 67: 0 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 | ||
381 | 68: 0 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 | ||
382 | 69: 0 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 | ||
383 | 70: 0 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 | ||
384 | 71: 0 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 | ||
385 | IPI0: 64 25 87 38 Rescheduling interrupts | ||
386 | IPI1: 2066 6747 1212 5791 Function call interrupts | ||
387 | IPI2: 0 0 0 0 CPU stop interrupts | ||
388 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | ||
389 | IPI4: 0 0 0 0 Timer broadcast interrupts | ||
390 | IPI5: 0 0 0 0 IRQ work interrupts | ||
391 | IPI6: 0 0 0 0 CPU wake-up interrupts | ||
392 | Err: 0 | ||
393 | yocto-zynqmp-generic-20231:/home/petalinux# cat /proc/interrupts | ||
394 | CPU0 CPU1 CPU2 CPU3 | ||
395 | 11: 28169 27725 29250 30190 GICv2 30 Level arch_timer | ||
396 | 14: 0 0 0 0 GICv2 67 Level zynqmp_ipi | ||
397 | 15: 0 0 0 0 GICv2 175 Level arm-pmu | ||
398 | 16: 0 0 0 0 GICv2 176 Level arm-pmu | ||
399 | 17: 0 0 0 0 GICv2 177 Level arm-pmu | ||
400 | 18: 0 0 0 0 GICv2 178 Level arm-pmu | ||
401 | 19: 0 0 0 0 GICv2 58 Level ffa60000.rtc | ||
402 | 20: 0 0 0 0 GICv2 59 Level ffa60000.rtc | ||
403 | 21: 0 0 0 0 GICv2 42 Level ff960000.memory-controller | ||
404 | 22: 0 0 0 0 GICv2 88 Level ams-irq | ||
405 | 23: 0 0 0 0 GICv2 155 Level axi-pmon, axi-pmon | ||
406 | 24: 603 0 0 0 GICv2 53 Level xuartps | ||
407 | 27: 0 0 0 0 GICv2 156 Level zynqmp-dma | ||
408 | 28: 0 0 0 0 GICv2 157 Level zynqmp-dma | ||
409 | 29: 0 0 0 0 GICv2 158 Level zynqmp-dma | ||
410 | 30: 0 0 0 0 GICv2 159 Level zynqmp-dma | ||
411 | 31: 0 0 0 0 GICv2 160 Level zynqmp-dma | ||
412 | 32: 0 0 0 0 GICv2 161 Level zynqmp-dma | ||
413 | 33: 0 0 0 0 GICv2 162 Level zynqmp-dma | ||
414 | 34: 0 0 0 0 GICv2 163 Level zynqmp-dma | ||
415 | 35: 0 0 0 0 GICv2 109 Level zynqmp-dma | ||
416 | 36: 0 0 0 0 GICv2 110 Level zynqmp-dma | ||
417 | 37: 0 0 0 0 GICv2 111 Level zynqmp-dma | ||
418 | 38: 0 0 0 0 GICv2 112 Level zynqmp-dma | ||
419 | 39: 0 0 0 0 GICv2 113 Level zynqmp-dma | ||
420 | 40: 0 0 0 0 GICv2 114 Level zynqmp-dma | ||
421 | 41: 0 0 0 0 GICv2 115 Level zynqmp-dma | ||
422 | 42: 0 0 0 0 GICv2 116 Level zynqmp-dma | ||
423 | 43: 0 0 0 0 GICv2 154 Level fd4c0000.dma-controller | ||
424 | 44: 5938 0 0 0 GICv2 47 Level ff0f0000.spi | ||
425 | 45: 134 0 0 0 GICv2 95 Level eth0, eth0 | ||
426 | 46: 0 0 0 0 GICv2 57 Level axi-pmon, axi-pmon | ||
427 | 47: 4802 0 0 0 GICv2 49 Level cdns-i2c | ||
428 | 48: 501 0 0 0 GICv2 50 Level cdns-i2c | ||
429 | 50: 0 0 0 0 GICv2 84 Edge ff150000.watchdog | ||
430 | 51: 0 0 0 0 GICv2 151 Level fd4a0000.display | ||
431 | 52: 548 0 0 0 GICv2 81 Level mmc0 | ||
432 | 53: 0 0 0 0 GICv2 165 Level ahci-ceva[fd0c0000.ahci] | ||
433 | 54: 0 0 0 0 GICv2 97 Level xhci-hcd:usb1 | ||
434 | 55: 0 0 0 0 zynq-gpio 22 Edge sw19 | ||
435 | 59: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_PB_SW9_N | ||
436 | 60: 4 0 0 0 gpio-xilinx 3 Edge PL_GPIO_PB_SW12_E | ||
437 | 61: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_PB_SW13_S | ||
438 | 62: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_PB_SW10_W | ||
439 | 63: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_PB_SW11_C | ||
440 | 64: 2 0 0 0 gpio-xilinx 7 Edge PL_GPIO_DIP_SW7 | ||
441 | 65: 2 0 0 0 gpio-xilinx 6 Edge PL_GPIO_DIP_SW6 | ||
442 | 66: 4 0 0 0 gpio-xilinx 5 Edge PL_GPIO_DIP_SW5 | ||
443 | 67: 2 0 0 0 gpio-xilinx 4 Edge PL_GPIO_DIP_SW4 | ||
444 | 68: 2 0 0 0 gpio-xilinx 3 Edge PL_GPIO_DIP_SW3 | ||
445 | 69: 2 0 0 0 gpio-xilinx 2 Edge PL_GPIO_DIP_SW2 | ||
446 | 70: 2 0 0 0 gpio-xilinx 1 Edge PL_GPIO_DIP_SW1 | ||
447 | 71: 2 0 0 0 gpio-xilinx 0 Edge PL_GPIO_DIP_SW0 | ||
448 | IPI0: 64 26 87 38 Rescheduling interrupts | ||
449 | IPI1: 2163 6791 1243 5866 Function call interrupts | ||
450 | IPI2: 0 0 0 0 CPU stop interrupts | ||
451 | IPI3: 0 0 0 0 CPU stop (for crash dump) interrupts | ||
452 | IPI4: 0 0 0 0 Timer broadcast interrupts | ||
453 | IPI5: 0 0 0 0 IRQ work interrupts | ||
454 | IPI6: 0 0 0 0 CPU wake-up interrupts | ||
455 | Err: 0 | ||
456 | yocto-zynqmp-generic-20231:/home/petalinux# | ||
457 | ``` | ||
458 | --- | ||
459 | |||
460 | ### Unloading PL bitstream or pdi and dt overlay | ||
461 | * Zynq or ZynqMP | ||
462 | ``` | ||
463 | yocto-zynqmp-generic-20231:/home/petalinux# fpgautil -R | ||
464 | ``` | ||
465 | * Versal (DFx RP) | ||
466 | ``` | ||
467 | root@yocto-vck190-dfx-2023:~# fpgautil -R -n PR0 | ||
468 | ``` | ||
469 | * Versal (DFx Static) | ||
470 | ``` | ||
471 | root@yocto-vck190-dfx-2023:~# fpgautil -R -n Full | ||
472 | ``` | ||
473 | --- | ||
474 | |||
475 | ## References | ||
476 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841645/Solution+Zynq+PL+Programming+With+FPGA+Manager | ||
477 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841847/Solution+ZynqMP+PL+Programming | ||
478 | * https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/1188397412/Solution+Versal+PL+Programming | ||
diff --git a/docs/README.fw.package.md b/docs/README.fw.package.md new file mode 100644 index 00000000..a7e54402 --- /dev/null +++ b/docs/README.fw.package.md | |||
@@ -0,0 +1,61 @@ | |||
1 | # How to package and depoly firmware elf or bin to linux root filesystem | ||
2 | |||
3 | * [Introduction](#introduction) | ||
4 | * [How to create and install firmware package recipe](#how-to-create-and-install-firmware-package-recipe) | ||
5 | |||
6 | ## Introduction | ||
7 | This readme describes how to package and deploy firmware baremetal or freertos | ||
8 | application elf or bin files to linux root filesystem under /lib/firmware directory. | ||
9 | Packaging an firmware baremetal or freertos application elf or bin files to linux | ||
10 | root filesystem is not automated from multiconfig baremetal or freertos recipes. | ||
11 | Hence user has to create a linux recipe and inherit fw-package which provides | ||
12 | infrastructure to package and deploy firmware elf or bin files to linux root | ||
13 | filesystem. | ||
14 | |||
15 | ## How to create and install firmware package recipe | ||
16 | |||
17 | 1. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) upto step 4. | ||
18 | |||
19 | 2. Create recipes-firmware directory in distribution meta layer. | ||
20 | ``` | ||
21 | $ mkdir -p <meta-layer>/recipes-firmware/<firmware-package-name>/ | ||
22 | ``` | ||
23 | 3. Now create the recipes firmware package using recipetool. | ||
24 | ``` | ||
25 | $ recipetool create -o <meta-layer>/recipes-firmware/<firmware-package-name>/firmware-package-name.bb | ||
26 | ``` | ||
27 | 4. Modify the recipe and inherit fw-package bbclass as shown below. | ||
28 | |||
29 | > **Note:** | ||
30 | > * **DESTDIR:** Variable to specify elf or bin directory path. Default is set to | ||
31 | > /lib/firmware directory from fw-package,bbclass and user can | ||
32 | > change this value to /boot directory depending on requirement. | ||
33 | > * **FW_NAME:** Variable to define firmware baremetal or freertos application | ||
34 | > recipe name. | ||
35 | > * **TARGET_MC:** Variable to define one of the multiconfig target name | ||
36 | > (ex: cortexr5-0-zynqmp-baremetal) from the BBMULTICONFIG list | ||
37 | > generated at [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) | ||
38 | > step 4. | ||
39 | |||
40 | ``` | ||
41 | SUMMARY = "Recipe to package and deploy baremetal or freertos elf or bin to linux rootfs" | ||
42 | LICENSE = "CLOSED" | ||
43 | |||
44 | inherit fw-package | ||
45 | |||
46 | FW_NAME = "hello-world" | ||
47 | |||
48 | TARGET_MC = "cortexr5-0-zynqmp-baremetal" | ||
49 | |||
50 | FW_MCDEPENDS := "mc::${TARGET_MC}:${FW_NAME}:do_deploy" | ||
51 | FW_DEPLOY_DIR := "${TOPDIR}/tmp-${TARGET_MC}/deploy/images/${MACHINE}" | ||
52 | ``` | ||
53 | 5. Add firmware-package recipe to image to local.conf as shown below. | ||
54 | |||
55 | ``` | ||
56 | IMAGE_INSTALL:append = " \ | ||
57 | firmware-package-name \ | ||
58 | " | ||
59 | ``` | ||
60 | 6. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) and continue from | ||
61 | step 5. | ||