diff options
Diffstat (limited to 'docs/README.booting.microblaze.md')
-rw-r--r-- | docs/README.booting.microblaze.md | 121 |
1 files changed, 74 insertions, 47 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 | ``` |