summaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp
diff options
context:
space:
mode:
authorSandeep Gundlupet Raju <sandeep.gundlupet-raju@xilinx.com>2022-05-10 09:44:30 -0600
committerMark Hatle <mhatle@xilinx.com>2022-05-10 12:05:23 -0700
commitece00a76504abe8c90ed32ab5d6dbdcc2ceaf2d0 (patch)
tree61d5fee7d0916acf8d40a14f66c51ae934f2070f /meta-xilinx-bsp
parent2848271f22a77abd2086fa4438886f885a75e1ef (diff)
downloadmeta-xilinx-ece00a76504abe8c90ed32ab5d6dbdcc2ceaf2d0.tar.gz
meta-xilinx: Move booting README from bsp layer
Move README.booting.md file from meta-xilinx-bsp layer to meta-xilinx. Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-raju@xilinx.com> Signed-off-by: Mark Hatle <mhatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-bsp')
-rw-r--r--meta-xilinx-bsp/README.booting.md266
1 files changed, 0 insertions, 266 deletions
diff --git a/meta-xilinx-bsp/README.booting.md b/meta-xilinx-bsp/README.booting.md
deleted file mode 100644
index dc48f6b2..00000000
--- a/meta-xilinx-bsp/README.booting.md
+++ /dev/null
@@ -1,266 +0,0 @@
1Booting meta-xilinx boards
2==========================
3
4Contents
5--------
6
7* [Loading via JTAG](#loading-via-jtag)
8 * [XSDB](#xsdb)
9 * [Load Bitstream](#load-bitstream)
10 * [Load U-Boot (MicroBlaze)](#load-u-boot-microblaze)
11 * [Load U-Boot (Zynq)](#load-u-boot-zynq)
12 * [U-Boot Console](#u-boot-console)
13 * [Kernel, Root Filesystem and Device Tree](#kernel-root-filesystem-and-device-tree)
14 * [Booting via U-Boot](#booting-via-u-boot)
15* [Loading via SD](#loading-via-sd)
16 * [Preparing SD/MMC](#preparing-sdmmc)
17 * [Installing U-Boot](#installing-u-boot)
18 * [Installing Kernel and Device Tree](#installing-kernel-and-device-tree)
19 * [Installing Root Filesystem](#installing-root-filesystem)
20 * [U-Boot Configuration File](#u-boot-configuration-file)
21 * [Booting](#booting)
22* [Loading via TFTP](#loading-via-tftp)
23 * [Kernel, Root Filesystem and Device Tree](#kernel-root-filesystem-and-device-tree-1)
24 * [Booting via U-Boot](#booting-via-u-boot-1)
25
26
27Loading via JTAG
28----------------
29This boot flow requires the use of the Xilinx tools, specifically XSDB and the
30associated JTAG device drivers. This also requires access to the JTAG interface
31on the board, a number of Xilinx and third-party boards come with on-board JTAG
32modules.
33
34### XSDB
35Start `xsdb` and connect. Ensure that the target chip is visible.
36
37 $ xsdb
38 xsdb% connect
39 xsdb% targets
40
41### Load Bitstream
42**(Note: This step is only required for platforms which have a bitstream e.g.
43MicroBlaze.)**
44
45Download the bitstream for the system using XSDB with the `fpga -f` command. If
46a bitstream is available from meta-xilinx is will be located in the
47`deploy/images/<machine-name>/` directory.
48
49 xsdb% fpga -f download.bit
50
51### Load U-Boot (MicroBlaze)
52Download `u-boot.elf` to the target CPU via the use of XSDB.
53
54 xsdb% targets -set -filter {name =~ "MicroBlaze*"}
55 xsdb% rst
56 xsdb% dow u-boot.elf
57 xsdb% con
58
59### Load U-Boot (Zynq)
60Ensure the board is configured to boot from JTAG. The Zynq platform requires the
61loading of SPL first, this can be done by loading the `u-boot-spl.bin` and
62executing it at location `0x0`. `u-boot-spl.bin` is not output to the deploy
63directory by default, it can be obtained from the work directory for U-Boot
64(`git/spl/u-boot-spl.bin`) or can be extracted from `boot.bin` using
65`dd if=boot.bin of=u-boot-spl.bin bs=1 skip=2240`.
66
67 xsdb% targets -set -filter {name =~ "ARM*#0"}
68 xsdb% dow -data u-boot-spl.bin 0x0
69 xsdb% rwr pc 0x0
70 xsdb% con
71
72On the UART console the following should appear, indicating SPL was loaded.
73
74 U-Boot SPL 2016.01
75 Trying to boot from unknown boot device
76 SPL: Unsupported Boot Device!
77 SPL: failed to boot from all boot devices
78 ### ERROR ### Please RESET the board ###
79
80Once SPL has loaded U-Boot can now be loaded into memory and executed. Download
81`u-boot.elf` to the target.
82
83 xsdb% stop
84 xsdb% dow u-boot.elf
85 xsdb% con
86
87### U-Boot Console
88U-Boot will load and the console will be available on the UART interface.
89
90 ...
91 Hit any key to stop autoboot: 0
92 U-Boot>
93
94### Kernel, Root Filesystem and Device Tree
95Whilst it is possible to load the images via JTAG this connection is slow and
96this process can take a long time to execute (more than 10 minutes). If your
97system has ethernet it is recommended that you use TFTP to load these images
98using U-Boot.
99
100Once U-Boot has been loaded, pause the execution using XSDB and use the `dow`
101command to load the images into the targets memory. Once the images are loaded
102continue the execution and return to the U-Boot console.
103
104MicroBlaze (kc705-microblazeel):
105
106 xsdb% stop
107 xsdb% dow -data linux.bin.ub 0x85000000
108 xsdb% dow -data core-image-minimal-kc705-microblazeel.cpio.gz.u-boot 0x86000000
109 xsdb% dow -data kc705-microblazeel.dtb 0x84000000
110 xsdb% con
111
112Zynq:
113
114 xsdb% stop
115 xsdb% dow -data uImage 0x2000000
116 xsdb% dow -data core-image-minimal-<machine name>.cpio.gz.u-boot 0x3000000
117 xsdb% dow -data <machine name>.dtb 0x2A00000
118 xsdb% con
119
120### Booting via U-Boot
121At the U-Boot console use the `bootm` command to execute the kernel.
122
123MicroBlaze (kc705-microblazeel):
124
125 U-Boot> bootm 0x85000000 0x86000000 0x84000000
126
127Zynq:
128
129 U-Boot> bootm 0x2000000 0x3000000 0x2A00000
130
131
132Loading via SD
133---------------------
134**(Note: This section only applies to Zynq and ZynqMP.)**
135
136### Preparing SD/MMC
137Setup the card with the first partition formatted as FAT16. If you intend to
138boot with the root filesystem located on the SD card, also create a second
139partition formatted as EXT4.
140
141It is recommended that the first partition be at least 64MB in size, however
142this value will depend on whether using a ramdisk for the root filesystem and
143how large the ramdisk is.
144
145This section describes how to manually prepare and populate an SD card image.
146There are automation tools in OpenEmbedded that can generate disk images already
147formatted and prepared such that they can be written directly to a disk. Refer
148to the Yocto Project Development Manual for more details:
149 http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#creating-partitioned-images
150
151### Installing U-Boot (Zynq)
152Add the following files to the first partition:
153
154* `boot.bin`
155* `u-boot.img`
156
157### Installing U-Boot (ZynqMP)
158Add the following files to the first partition:
159
160* `boot.bin`
161* `u-boot.bin`
162
163### Installing Kernel and Device Tree (Zynq)
164Add the following files to the first partition:
165
166* `uImage`
167* `<machine name>.dtb`
168
169### Installing Kernel and Device Tree (ZynqMP)
170Add the following files to the first partition:
171
172* `Image`
173* `<machine name>.dtb`
174
175### Install ARM Trusted Firmware (ZynqMP)
176Add the following file to the first partition:
177
178 * `atf-uboot.ub`
179
180### Install U-boot environment file (ZynqMP)
181Add the following file to the first partition:
182
183 * `uEnv.txt`
184
185### Installing Root Filesystem
186If using a ramdisk also add the `.cpio.gz.u-boot` type of root filesystem image
187to the first partition.
188
189* `core-image-minimal-<machine name>.cpio.gz.u-boot`
190
191If using the SD card as the root filesystem, populate the second partition with
192the content of the root filesystem. To install the root filesystem extract the
193corresponding tarball into the root of the second partition (the following
194command assumes that the second partition is mounted at /media/root).
195
196 tar x -C /media/root -f core-image-minimal-<machine name>.tar.gz
197
198### U-Boot Configuration File
199Also create the file `uEnv.txt` on the first partition of the SD card partition,
200with the following contents. Replacing the names of files where appropriate.
201
202 kernel_image=uImage
203 devicetree_image=<machine name>.dtb
204
205If using a ramdisk root filesystem setup the `ramdisk_image` variable.
206
207 ramdisk_image=core-image-minimal-<machine name>.cpio.gz.u-boot
208
209If using the SD card as the root filesystem setup the kernel boot args, and
210`uenvcmd` variable.
211
212 bootargs=root=/dev/mmcblk0p2 rw rootwait
213 uenvcmd=fatload mmc 0 0x3000000 ${kernel_image} && fatload mmc 0 0x2A00000 ${devicetree_image} && bootm 0x3000000 - 0x2A00000
214
215### Booting
216Insert the SD card and connect UART to a terminal program and power on the
217board. (For boards that have configurable boot jumper/switches ensure the board
218is configured for SD).
219
220Initially U-Boot SPL will load, which will in turn load U-Boot. U-Boot will use
221the `uEnv.txt` to automatically load and execute the kernel.
222
223
224Loading via TFTP
225----------------
226**(Note: This boot flow requires ethernet on the baord and a TFTP server)**
227
228Boot your system into U-Boot, using one of boot methods (e.g. JTAG, SD, QSPI).
229
230### Kernel, Root Filesystem and Device Tree
231Place the following images into the root of the TFTP server directory:
232
233* `core-image-minimal-<machine name>.cpio.gz.u-boot`
234* `uImage` (Zynq) or `linux.bin.ub` (MicroBlaze)
235* `<machine name>.dtb`
236
237### Booting via U-Boot
238The serial console of the target board will display the U-Boot console.
239Configure the `ipaddr` and `serverip` of the U-Boot environment.
240
241 U-Boot> set serverip <server ip>
242 U-Boot> set ipaddr <board ip>
243
244Using the U-Boot console; load the Kernel, root filesystem and the DTB into
245memory. And then boot Linux using the `bootm` command. (Note the load addresses
246will be dependant on machine used)
247
248MicroBlaze (kc705-microblazeel):
249
250 U-Boot> tftpboot 0x85000000 linux.bin.ub
251 U-Boot> tftpboot 0x86000000 core-image-minimal-kc705-microblazeel.cpio.gz.u-boot
252 U-Boot> tftpboot 0x84000000 kc705-microblazeel.dtb
253 U-Boot> bootm 0x85000000 0x86000000 0x84000000
254
255Zynq:
256
257 U-Boot> tftpboot 0x2000000 uImage
258 U-Boot> tftpboot 0x3000000 core-image-minimal-<machine name>.cpio.gz.u-boot
259 U-Boot> tftpboot 0x2A00000 <machine name>.dtb
260 U-Boot> bootm 0x2000000 0x3000000 0x2A00000
261
262U-Boot will prepare the Kernel for boot and then it will being to execute.
263
264 ...
265 Starting kernel...
266