diff options
Diffstat (limited to 'docs/README.booting.microblaze.md')
-rw-r--r-- | docs/README.booting.microblaze.md | 151 |
1 files changed, 102 insertions, 49 deletions
diff --git a/docs/README.booting.microblaze.md b/docs/README.booting.microblaze.md index 1ffcc3c8..21bd1dad 100644 --- a/docs/README.booting.microblaze.md +++ b/docs/README.booting.microblaze.md | |||
@@ -2,13 +2,20 @@ | |||
2 | 2 | ||
3 | Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI boot modes. | 3 | Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI boot modes. |
4 | 4 | ||
5 | * [Setting Up the Target](#setting-up-the-target) | 5 | - [Booting OS Images on MicroBlaze target boards](#booting-os-images-on-microblaze-target-boards) |
6 | * [Booting from JTAG](#booting-from-jtag) | 6 | - [Setting Up the Target](#setting-up-the-target) |
7 | * [Loading Bitstream using XSCT](#loading-bitstream-using-xsct) | 7 | - [Booting from JTAG](#booting-from-jtag) |
8 | * [Loading U-boot using XSCT](#loading-u-boot-using-xsct) | 8 | - [Sourcing the XSDB tools](#sourcing-the-xsdb-tools) |
9 | * [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-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 Bitstream using XSDB](#loading-bitstream-using-xsdb) | ||
13 | - [Loading U-boot using XSDB](#loading-u-boot-using-xsdb) | ||
14 | - [Loading Kernel, Device tree, Root Filesystem and U-boot boot script](#loading-kernel-device-tree-root-filesystem-and-u-boot-boot-script) | ||
15 | - [Using XSDB](#using-xsdb) | ||
16 | - [Using TFTP](#using-tftp) | ||
17 | - [Booting Linux](#booting-linux) | ||
18 | - [Limitation](#limitation) | ||
12 | 19 | ||
13 | ## Setting Up the Target | 20 | ## Setting Up the Target |
14 | 21 | ||
@@ -34,59 +41,79 @@ Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI bo | |||
34 | 41 | ||
35 | ## Booting from JTAG | 42 | ## Booting from JTAG |
36 | 43 | ||
37 | This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and | 44 | 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 | 45 | 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 | 46 | on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG |
40 | modules. | 47 | modules. |
41 | 48 | ||
42 | 1. Source the Vivado or Vitis tools `settings.sh` scripts. | 49 | ### Sourcing the XSDB tools |
43 | 2. Power on the board, Open the XSCT console in the Vitis IDE by clicking the | 50 | |
44 | XSCT button. Alternatively, you can also open the XSCT console by selecting | 51 | Source the Vivado or Vitis tools `settings.sh` scripts. |
45 | Xilinx -> XSCT Console. | 52 | |
53 | ### Deploying the images to target | ||
54 | |||
55 | Deploying the images can be done in two methods. | ||
56 | |||
57 | #### Using devtool boot-jtag script | ||
58 | |||
59 | 1. Run devtool command to generate the boot-jtag.tcl script. | ||
60 | ``` | ||
61 | $ devtool boot-jtag --help | ||
62 | $ devtool boot-jtag --image core-image-minimal --hw_server TCP:<hostname/ip-addr>:3121 | ||
63 | ``` | ||
64 | 2. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl | ||
65 | 3. Execute this script using xsdb tool as shown below. | ||
66 | ``` | ||
67 | $ xsdb <absolute-path-to-deploy-dir-image>/boot-jtag.tcl | ||
68 | ``` | ||
69 | |||
70 | #### Manually executing xsdb commands | ||
71 | |||
72 | 1. Power on the board, Launch the XSDB shell from command line as shown below. | ||
46 | ``` | 73 | ``` |
47 | $ xsct | 74 | $ xsdb |
48 | ``` | 75 | ``` |
49 | 3. In the XSCT console, connect to the target over JTAG using the connect command. | 76 | 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 | 77 | Optionally user can use `-url` to specify the local/remote hw_server. The |
51 | connect command returns the channel ID of the connection. | 78 | connect command returns the channel ID of the connection. |
52 | ``` | 79 | ``` |
53 | xsct% connect | 80 | xsdb% connect |
54 | ``` | 81 | ``` |
55 | 4. The targets command lists the available targets and allows you to select a | 82 | 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 | 83 | 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. | 84 | the JTAG chain, so the IDs can change from session to session. |
58 | ``` | 85 | ``` |
59 | xsct% targets | 86 | xsdb% targets |
60 | ``` | 87 | ``` |
61 | 88 | ||
62 | > **Note:** For non-interactive usage such as scripting, you can use the `-filter` | 89 | > **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. | 90 | option to select a target instead of selecting the target using its ID. |
64 | 91 | ||
65 | ### Loading Bitstream using XSCT | 92 | ##### Loading Bitstream using XSDB |
66 | 93 | ||
67 | * Download the bitstream for the target using XSCT with the `fpga` command. Microblaze | 94 | * 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 | 95 | bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user |
69 | can use `fpga -no-revision-check` to skip FPGA silicon revision. | 96 | can use `fpga -no-revision-check` to skip FPGA silicon revision. |
70 | 97 | ||
71 | ``` | 98 | ``` |
72 | xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit | 99 | xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit |
73 | xsct% after 2000 | 100 | xsdb% after 2000 |
74 | xsct% targets -set -nocase -filter {name =~ "microblaze*#0"} | 101 | xsdb% targets -set -nocase -filter {name =~ "microblaze*#0"} |
75 | xsct% catch {stop} | 102 | xsdb% catch {stop} |
76 | xsct% after 1000 | 103 | xsdb% after 1000 |
77 | ``` | 104 | ``` |
78 | ### Loading U-boot using XSCT | 105 | ##### Loading U-boot using XSDB |
79 | 106 | ||
80 | 1. Download `u-boot.elf` to the target CPU using XSCT. Microblaze u-boot.elf will be | 107 | 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 | 108 | located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend |
82 | the execution of active target using `stop` command. | 109 | the execution of active target using `stop` command. |
83 | ``` | 110 | ``` |
84 | xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf | 111 | xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf |
85 | ``` | 112 | ``` |
86 | 2. After loading u-boot.elf resume the execution of active target using the `con` | 113 | 2. After loading u-boot.elf resume the execution of active target using the `con` |
87 | command in XSCT shell. | 114 | command in XSDB shell. |
88 | ``` | 115 | ``` |
89 | xsct% con | 116 | xsdb% con |
90 | ``` | 117 | ``` |
91 | 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. |
92 | ``` | 119 | ``` |
@@ -95,7 +122,7 @@ Hit any key to stop autoboot: 0 | |||
95 | U-Boot> | 122 | U-Boot> |
96 | ``` | 123 | ``` |
97 | 124 | ||
98 | ### Loading Kernel, Device tree, Root Filesystem and U-boot boot script | 125 | ##### Loading Kernel, Device tree, Root Filesystem and U-boot boot script |
99 | 126 | ||
100 | Load the images into the target DDR/MIG load address i.e., | 127 | 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) | 128 | `DDR base address + <image_offset>`. MicroBlaze U-boot boot script(boot.scr) |
@@ -121,50 +148,76 @@ 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 | 148 | system has ethernet it is recommended that you use TFTP to load these images |
122 | using U-Boot. | 149 | using U-Boot. |
123 | 150 | ||
124 | #### Using XSCT | 151 | ###### Using XSDB |
125 | 152 | ||
126 | 1. Suspend the execution of active target using `stop` command in XSCT. | 153 | 1. Suspend the execution of active target using `stop` command in XSDB. |
127 | ``` | 154 | ``` |
128 | xsct% stop | 155 | xsdb% stop |
129 | ``` | 156 | ``` |
130 | 2. Using the `dow` command to load the images into the target DDR/MIG | 157 | 2. Using the `dow` command to load the images into the target DDR/MIG |
131 | load address. | 158 | load address. |
132 | ``` | 159 | ``` |
133 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 | 160 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 |
134 | xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 | 161 | 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 | 162 | 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 | 163 | xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 |
137 | ``` | 164 | ``` |
138 | 165 | ||
139 | #### Using TFTP | 166 | ###### Using TFTP |
140 | 167 | ||
141 | 1. Configure the `ipaddr` and `serverip` of the U-Boot environment. | 168 | 1. Setup TFTP directory on host machine and copy the images to your TFTP directory |
169 | so that you can load them from U-Boot. | ||
170 | 2. Configure the `ipaddr` and `serverip` of the U-Boot environment. | ||
142 | ``` | 171 | ``` |
143 | U-Boot> set serverip <server ip> | 172 | U-Boot> set serverip <server ip> |
144 | U-Boot> set ipaddr <board ip> | 173 | U-Boot> set ipaddr <board ip> |
145 | ``` | 174 | ``` |
146 | 2. Load the images to DDR address. Make sure images are copied to tftp directory. | 175 | 3. Load the images to DDR address. |
147 | ``` | 176 | ``` |
148 | U-Boot> tftpboot 0x80000000 ${TFTPDIR}/linux.bin.ub | 177 | U-Boot> tftpboot 0x80000000 linux.bin.ub |
149 | U-Boot> tftpboot 0x81e00000 ${TFTPDIR}/system.dtb | 178 | U-Boot> tftpboot 0x81e00000 system.dtb |
150 | U-Boot> tftpboot 0x82e00000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot | 179 | U-Boot> tftpboot 0x82e00000 core-image-minimal-${MACHINE}.cpio.gz.u-boot |
151 | U-Boot> tftpboot 0xff200000 ${TFTPDIR}/boot.scr | 180 | U-Boot> tftpboot 0xff200000 boot.scr |
152 | ``` | 181 | ``` |
153 | 182 | ||
154 | ### Booting Linux | 183 | ##### Booting Linux |
155 | 184 | ||
156 | Once the images are loaded continue the execution. | 185 | Once the images are loaded continue the execution. |
157 | 186 | ||
158 | 1. After loading images resume the execution of active target using the `con` | 187 | 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. | 188 | command in XSDB shell, Skip step 1 for if you have used TFTP to load images. |
160 | ``` | 189 | ``` |
161 | xsct% con | 190 | xsdb% con |
162 | ``` | 191 | ``` |
163 | 2. Terminate xsct shell. | 192 | 2. Terminate xsdb shell. |
164 | ``` | 193 | ``` |
165 | xsct% exit | 194 | xsdb% exit |
166 | ``` | 195 | ``` |
167 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. | 196 | 3. In the target Serial Terminal, from U-Boot prompt run `boot` command. |
168 | ``` | 197 | ``` |
169 | U-Boot> boot | 198 | U-Boot> boot |
170 | ``` | 199 | ``` |
200 | |||
201 | ## Limitation | ||
202 | |||
203 | 1. Booting core-image-minimal or other image target excluding | ||
204 | petalinux-image-minimal you can observe below error message. | ||
205 | |||
206 | ``` | ||
207 | Error: argument "/en*" is wrong: "dev" not a valid ifname | ||
208 | Starting syslogd/klogd: done | ||
209 | |||
210 | Poky (Yocto Project Reference Distro) 5.0.2 kcu105-microblazeel ttyUL0 | ||
211 | |||
212 | INIT: Id "1" respawning too fast: disabled for 5 minutes | ||
213 | |||
214 | kcu105-microblazeel login: | ||
215 | ``` | ||
216 | |||
217 | This is due to pni-names distro feature is not enabled by default and eudev uses | ||
218 | classic network interface naming scheme. To resolve this issue add pni-names | ||
219 | distro feature from <distro>.conf or local.file. | ||
220 | |||
221 | ``` | ||
222 | DISTRO_FEATURES:append:microblaze = " pni-names" | ||
223 | ``` \ No newline at end of file | ||