summaryrefslogtreecommitdiffstats
path: root/docs/README.booting.microblaze.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/README.booting.microblaze.md')
-rw-r--r--docs/README.booting.microblaze.md121
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
37This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and 42This boot flow requires the use of the AMD Xilinx tools, specifically XSDB and
38the associated JTAG device drivers. This also requires access to the JTAG interface 43the associated JTAG device drivers. This also requires access to the JTAG interface
39on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG 44on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG
40modules. 45modules.
41 46
421. Source the Vivado or Vitis tools `settings.sh` scripts. 47### Sourcing the XSDB tools
432. 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 49Source the Vivado or Vitis tools `settings.sh` scripts.
45 Xilinx -> XSCT Console. 50
51### Deploying the images to target
52
53Deploying the images can be done in two methods.
54
55#### Using devtool boot-jtag script
56
571. 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```
622. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl
633. 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
701. Power on the board, Launch the XSDB shell from command line as shown below.
46``` 71```
47$ xsct 72$ xsdb
48``` 73```
493. In the XSCT console, connect to the target over JTAG using the connect command. 742. 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```
53xsct% connect 78xsdb% connect
54``` 79```
554. The targets command lists the available targets and allows you to select a 803. 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```
59xsct% targets 84xsdb% 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
68bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user 93bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user
69can use `fpga -no-revision-check` to skip FPGA silicon revision. 94can use `fpga -no-revision-check` to skip FPGA silicon revision.
70 95
71``` 96```
72xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit 97xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit
73xsct% after 2000 98xsdb% after 2000
74xsct% targets -set -nocase -filter {name =~ "microblaze*#0"} 99xsdb% targets -set -nocase -filter {name =~ "microblaze*#0"}
75xsct% catch {stop} 100xsdb% catch {stop}
76xsct% after 1000 101xsdb% after 1000
77``` 102```
78### Loading U-boot using XSCT 103##### Loading U-boot using XSDB
79 104
801. Download `u-boot.elf` to the target CPU using XSCT. Microblaze u-boot.elf will be 1051. Download `u-boot.elf` to the target CPU using XSDB. Microblaze u-boot.elf will be
81located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend 106located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend
82the execution of active target using `stop` command. 107the execution of active target using `stop` command.
83``` 108```
84xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf 109xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf
85``` 110```
862. After loading u-boot.elf resume the execution of active target using the `con` 1112. After loading u-boot.elf resume the execution of active target using the `con`
87command in XSCT shell. 112command in XSDB shell.
88``` 113```
89xsct% con 114xsdb% con
90``` 115```
913. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. 1163. 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
95U-Boot> 120U-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
100Load the images into the target DDR/MIG load address i.e., 125Load 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
121system has ethernet it is recommended that you use TFTP to load these images 146system has ethernet it is recommended that you use TFTP to load these images
122using U-Boot. 147using U-Boot.
123 148
124#### Using XSCT 149###### Using XSDB
125 150
1261. Suspend the execution of active target using `stop` command in XSCT. 1511. Suspend the execution of active target using `stop` command in XSDB.
127``` 152```
128xsct% stop 153xsdb% stop
129``` 154```
1302. Using the `dow` command to load the images into the target DDR/MIG 1552. Using the `dow` command to load the images into the target DDR/MIG
131load address. 156load address.
132``` 157```
133xsct% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 158xsdb% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000
134xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 159xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000
135xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 160xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000
136xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 161xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000
137``` 162```
138 163
139#### Using TFTP 164###### Using TFTP
140 165
1411. Configure the `ipaddr` and `serverip` of the U-Boot environment. 1661. Setup TFTP directory on host machine and copy the images to your TFTP directory
167 so that you can load them from U-Boot.
1682. Configure the `ipaddr` and `serverip` of the U-Boot environment.
142``` 169```
143U-Boot> set serverip <server ip> 170U-Boot> set serverip <server ip>
144U-Boot> set ipaddr <board ip> 171U-Boot> set ipaddr <board ip>
145``` 172```
1462. Load the images to DDR address. Make sure images are copied to tftp directory. 1733. Load the images to DDR address.
147``` 174```
148U-Boot> tftpboot 0x80000000 ${TFTPDIR}/linux.bin.ub 175U-Boot> tftpboot 0x80000000 linux.bin.ub
149U-Boot> tftpboot 0x81e00000 ${TFTPDIR}/system.dtb 176U-Boot> tftpboot 0x81e00000 system.dtb
150U-Boot> tftpboot 0x82e00000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 177U-Boot> tftpboot 0x82e00000 core-image-minimal-${MACHINE}.cpio.gz.u-boot
151U-Boot> tftpboot 0xff200000 ${TFTPDIR}/boot.scr 178U-Boot> tftpboot 0xff200000 boot.scr
152``` 179```
153 180
154### Booting Linux 181##### Booting Linux
155 182
156Once the images are loaded continue the execution. 183Once the images are loaded continue the execution.
157 184
1581. After loading images resume the execution of active target using the `con` 1851. After loading images resume the execution of active target using the `con`
159command in XSCT shell, Skip step 1 for if you have used TFTP to load images. 186command in XSDB shell, Skip step 1 for if you have used TFTP to load images.
160``` 187```
161xsct% con 188xsdb% con
162``` 189```
1632. Terminate xsct shell. 1902. Terminate xsdb shell.
164``` 191```
165xsct% exit 192xsdb% exit
166``` 193```
1673. In the target Serial Terminal, from U-Boot prompt run `boot` command. 1943. In the target Serial Terminal, from U-Boot prompt run `boot` command.
168``` 195```