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.md151
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
3Booting OS images on MicroBlaze target boards can be done using JTAG and QSPI boot modes. 3Booting 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
37This boot flow requires the use of the AMD Xilinx tools, specifically XSCT and 44This 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 45the 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 46on the board, a number of AMD Xilinx and third-party boards come with on-board JTAG
40modules. 47modules.
41 48
421. Source the Vivado or Vitis tools `settings.sh` scripts. 49### Sourcing the XSDB tools
432. 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 51Source the Vivado or Vitis tools `settings.sh` scripts.
45 Xilinx -> XSCT Console. 52
53### Deploying the images to target
54
55Deploying the images can be done in two methods.
56
57#### Using devtool boot-jtag script
58
591. 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```
642. Script will be generated under ${DEPLOY_DIR_IMAGE}/boot-jtag.tcl
653. 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
721. Power on the board, Launch the XSDB shell from command line as shown below.
46``` 73```
47$ xsct 74$ xsdb
48``` 75```
493. In the XSCT console, connect to the target over JTAG using the connect command. 762. 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```
53xsct% connect 80xsdb% connect
54``` 81```
554. The targets command lists the available targets and allows you to select a 823. 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```
59xsct% targets 86xsdb% 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
68bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user 95bitstream will be located in the `${DEPLOY_DIR_IMAGE}` directory. Optionally user
69can use `fpga -no-revision-check` to skip FPGA silicon revision. 96can use `fpga -no-revision-check` to skip FPGA silicon revision.
70 97
71``` 98```
72xsct% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit 99xsdb% fpga -no-revision-check ${DEPLOY_DIR_IMAGE}/system-${MACHINE}.bit
73xsct% after 2000 100xsdb% after 2000
74xsct% targets -set -nocase -filter {name =~ "microblaze*#0"} 101xsdb% targets -set -nocase -filter {name =~ "microblaze*#0"}
75xsct% catch {stop} 102xsdb% catch {stop}
76xsct% after 1000 103xsdb% after 1000
77``` 104```
78### Loading U-boot using XSCT 105##### Loading U-boot using XSDB
79 106
801. Download `u-boot.elf` to the target CPU using XSCT. Microblaze u-boot.elf will be 1071. 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 108located in the `${DEPLOY_DIR_IMAGE}` directory. Before u-boot.elf is loaded suspend
82the execution of active target using `stop` command. 109the execution of active target using `stop` command.
83``` 110```
84xsct% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf 111xsdb% dow ${DEPLOY_DIR_IMAGE}/u-boot.elf
85``` 112```
862. After loading u-boot.elf resume the execution of active target using the `con` 1132. After loading u-boot.elf resume the execution of active target using the `con`
87command in XSCT shell. 114command in XSDB shell.
88``` 115```
89xsct% con 116xsdb% con
90``` 117```
913. In the target Serial Terminal, press any key to stop the U-Boot auto-boot. 1183. 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
95U-Boot> 122U-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
100Load the images into the target DDR/MIG load address i.e., 127Load 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
121system has ethernet it is recommended that you use TFTP to load these images 148system has ethernet it is recommended that you use TFTP to load these images
122using U-Boot. 149using U-Boot.
123 150
124#### Using XSCT 151###### Using XSDB
125 152
1261. Suspend the execution of active target using `stop` command in XSCT. 1531. Suspend the execution of active target using `stop` command in XSDB.
127``` 154```
128xsct% stop 155xsdb% stop
129``` 156```
1302. Using the `dow` command to load the images into the target DDR/MIG 1572. Using the `dow` command to load the images into the target DDR/MIG
131load address. 158load address.
132``` 159```
133xsct% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000 160xsdb% dow -data ${DEPLOY_DIR_IMAGE}/linux.bin.ub 0x80000000
134xsct% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000 161xsdb% dow -data ${DEPLOY_DIR_IMAGE}/system.dtb 0x81e00000
135xsct% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000 162xsdb% dow -data ${DEPLOY_DIR_IMAGE}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 0x82e00000
136xsct% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000 163xsdb% dow -data ${DEPLOY_DIR_IMAGE}/boot.scr 0xff200000
137``` 164```
138 165
139#### Using TFTP 166###### Using TFTP
140 167
1411. Configure the `ipaddr` and `serverip` of the U-Boot environment. 1681. Setup TFTP directory on host machine and copy the images to your TFTP directory
169 so that you can load them from U-Boot.
1702. Configure the `ipaddr` and `serverip` of the U-Boot environment.
142``` 171```
143U-Boot> set serverip <server ip> 172U-Boot> set serverip <server ip>
144U-Boot> set ipaddr <board ip> 173U-Boot> set ipaddr <board ip>
145``` 174```
1462. Load the images to DDR address. Make sure images are copied to tftp directory. 1753. Load the images to DDR address.
147``` 176```
148U-Boot> tftpboot 0x80000000 ${TFTPDIR}/linux.bin.ub 177U-Boot> tftpboot 0x80000000 linux.bin.ub
149U-Boot> tftpboot 0x81e00000 ${TFTPDIR}/system.dtb 178U-Boot> tftpboot 0x81e00000 system.dtb
150U-Boot> tftpboot 0x82e00000 ${TFTPDIR}/core-image-minimal-${MACHINE}.cpio.gz.u-boot 179U-Boot> tftpboot 0x82e00000 core-image-minimal-${MACHINE}.cpio.gz.u-boot
151U-Boot> tftpboot 0xff200000 ${TFTPDIR}/boot.scr 180U-Boot> tftpboot 0xff200000 boot.scr
152``` 181```
153 182
154### Booting Linux 183##### Booting Linux
155 184
156Once the images are loaded continue the execution. 185Once the images are loaded continue the execution.
157 186
1581. After loading images resume the execution of active target using the `con` 1871. 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. 188command in XSDB shell, Skip step 1 for if you have used TFTP to load images.
160``` 189```
161xsct% con 190xsdb% con
162``` 191```
1632. Terminate xsct shell. 1922. Terminate xsdb shell.
164``` 193```
165xsct% exit 194xsdb% exit
166``` 195```
1673. In the target Serial Terminal, from U-Boot prompt run `boot` command. 1963. In the target Serial Terminal, from U-Boot prompt run `boot` command.
168``` 197```
169U-Boot> boot 198U-Boot> boot
170``` 199```
200
201## Limitation
202
2031. Booting core-image-minimal or other image target excluding
204 petalinux-image-minimal you can observe below error message.
205
206```
207Error: argument "/en*" is wrong: "dev" not a valid ifname
208Starting syslogd/klogd: done
209
210Poky (Yocto Project Reference Distro) 5.0.2 kcu105-microblazeel ttyUL0
211
212INIT: Id "1" respawning too fast: disabled for 5 minutes
213
214kcu105-microblazeel login:
215```
216
217This is due to pni-names distro feature is not enabled by default and eudev uses
218classic network interface naming scheme. To resolve this issue add pni-names
219distro feature from <distro>.conf or local.file.
220
221```
222DISTRO_FEATURES:append:microblaze = " pni-names"
223``` \ No newline at end of file