Skip to content

Commit 78fedd0

Browse files
committed
fix(snagboot): update snagboot documentation.
add the comprehensive procedure for using snagboot along with sample configurations. Signed-off-by: sadik <s-sadik@ti.com>
1 parent 9b76f07 commit 78fedd0

2 files changed

Lines changed: 212 additions & 7 deletions

File tree

source/images/snagfactory.png

220 KB
Loading

source/linux/Foundational_Components/Tools/Flash_via_Fastboot.rst

Lines changed: 212 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,20 @@ Installing Snagfactory
2222
* More info about installation can be found in `Snagfactory Readme <https://github.com/bootlin/snagboot/blob/main/README.md>`__.
2323
* Snagfactory also is available on pip.
2424

25-
.. code-block:: console
25+
.. code-block:: console
2626
27-
$ python3 -m pip install --user snagboot
27+
$ python3 -m pip install --user snagboot
28+
$ python3 -m pip install --user snagboot[gui]
2829
2930
.. note::
3031

31-
At the time of 11.0 release, the corresponding Snagfactory version was v2.2.
32+
At the time of 11.1 release, the corresponding Snagfactory version was v2.3.
33+
34+
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
35+
36+
.. note::
37+
38+
AM62DX support was added after v2.3. Refer this `commit <https://github.com/bootlin/snagboot/commit/d5a691b1916207ee674e99620c63cc3a6c3b3a28>`__.
3239

3340
*****************************************
3441
Building bootloader binaries for Recovery
@@ -87,6 +94,14 @@ in :file:`Rules.make` file present in the top level of Linux SDK Installer.
8794
8895
BOOT_MACHINE_A53=am62px_evm_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config
8996
97+
.. ifconfig:: CONFIG_part_variant in ('AM62DX')
98+
99+
.. code-block:: make
100+
101+
UBOOT_MACHINE_R5=am62dx_evm_r5_defconfig am62x_r5_usbdfu.config
102+
103+
BOOT_MACHINE_A53=am62dx_evm_a53_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config
104+
90105
Generate the bootloader images using top-level makefile by running following
91106
commands on the terminal from the top-level of the Linux SDK installer.
92107

@@ -115,18 +130,208 @@ Connections
115130

116131
* Power off the EVM and set up the boot mode switches to boot from USB DFU.
117132

118-
.. code-block:: text
133+
.. code-block:: text
119134
120-
SW2-11001100
121-
SW3-00000000
135+
SW2-11001100
136+
SW3-00000000
122137
123138
* Power on the board.
124139
* Optionally you can also connect host PC to board via UART to read the console logs.
125140

126141
How to use Snagfactory
127142
**********************
128143

129-
Comprehensive instructions for using the Snagfactory tool can be found here.
144+
Comprehensive instructions for installation of the Snagfactory tool can be found here.
130145

131146
* `Snagfactory doc <https://github.com/bootlin/snagboot/blob/main/docs/snagfactory.md>`__.
132147
* `Snagfactory config doc <https://github.com/bootlin/snagboot/blob/main/docs/snagfactory_config.md>`__.
148+
149+
150+
**SnagFactory GUI Tool Configuration and Device Flashing Procedure**
151+
152+
The tool currently supports MMC and MTD backends for flashing images.
153+
154+
.. note::
155+
156+
SnagFactory GUI tool is a prerequisite for this procedure.
157+
158+
The following steps outline the process for configuring and flashing a device by using
159+
the SnagFactory GUI tool.
160+
161+
.. figure:: /images/snagfactory.png
162+
:height: 500
163+
:width: 800
164+
165+
**Step 1: Launch SnagFactory GUI Tool**
166+
167+
* Launch the SnagFactory GUI tool to begin the configuration and device flashing process.
168+
169+
.. code-block:: console
170+
171+
$ snagfactory
172+
173+
**Step 2: Select Configuration File Option**
174+
175+
* Upon launch, the SnagFactory GUI tool will present the option to add a configuration file.
176+
Select the conf option to proceed with loading the configuration file.
177+
178+
**Step 3: Load YAML Configuration File**
179+
180+
* Load the YAML configuration file for the platform. This file has the necessary settings
181+
and parameters for the device flashing process.
182+
183+
**Step 4: Flash the Device**
184+
185+
* Once you load the YAML configuration file, the SnagFactory GUI tool will flash the device with
186+
the specified configuration.
187+
188+
189+
190+
The example configuration files for **emmc** and **ospi-nand** and **ospi-nor** are as follows.
191+
192+
For reference, the :file:`ospi-nor.yaml` file for **am62p** platform can be as follows:
193+
194+
.. code-block:: text
195+
196+
boards:
197+
0451:6165: am62p
198+
soc-models:
199+
am62p-firmware:
200+
tiboot3:
201+
path: "<path_to_boot_binaries>/tiboot3.bin"
202+
tispl:
203+
path: "<path_to_boot_binaries>/tispl.bin"
204+
u-boot:
205+
path: "<path_to_boot_binaries>/u-boot.img"
206+
am62p-tasks:
207+
- eraseblk-size: 0x40000
208+
fb-buffer-addr: 0x82000000
209+
fb-buffer-size: 0x7000000
210+
target-device: nor0
211+
- task: run
212+
args:
213+
- "oem_run:mtd list"
214+
- "oem_run:setenv mtdids nor0=nor0"
215+
- task: mtd-parts
216+
args:
217+
- name: ospi.tiboot3
218+
size: 0x80000
219+
- name: ospi.tispl
220+
size: 0x200000
221+
- name: ospi.u-boot
222+
size: 0x400000
223+
- task: flash
224+
args:
225+
- image: "<path_to_flash_binaries>/tiboot3.bin"
226+
part: ospi.tiboot3
227+
- image: "<path_to_flash_binaries>/tispl.bin"
228+
part: ospi.tispl
229+
- image: "<path_to_flash_binaries>/u-boot.img"
230+
part: ospi.u-boot
231+
232+
For reference, the :file:`ospi-nand.yaml` file for **am62xx-lp** platform can be as follows:
233+
234+
.. code-block:: text
235+
236+
boards:
237+
0451:6165: am625
238+
soc-models:
239+
am625-firmware:
240+
tiboot3:
241+
path: "<path_to_boot_binaries>/tiboot3.bin"
242+
tispl:
243+
path: "<path_to_boot_binaries>/tispl.bin"
244+
u-boot:
245+
path: "<path_to_boot_binaries>/u-boot.img"
246+
am625-tasks:
247+
- eraseblk-size: 0x40000
248+
fb-buffer-addr: 0x82000000
249+
fb-buffer-size: 0x7000000
250+
target-device: spi-nand0
251+
- task: run
252+
args:
253+
- "oem_run:mtd list"
254+
- "oem_run:setenv mtdids spi-nand0=spi-nand0"
255+
- task: mtd-parts
256+
args:
257+
- name: ospi_nand.tiboot3
258+
size: 0x80000
259+
- name: ospi_nand.tispl
260+
size: 0x200000
261+
- name: ospi_nand.u-boot
262+
size: 0x400000
263+
- name: ospi_nand.env
264+
size: 0x40000
265+
- name: ospi_nand.env.backup
266+
size: 0x40000
267+
- name: ospi_nand.rootfs
268+
size: 0x5fc0000
269+
start: 0x2000000
270+
- name: ospi_nand.phypattern
271+
start: 0x7fc0000
272+
size: 0x40000
273+
- task: flash
274+
args:
275+
- image: "<path_to_flash_binaries>/tiboot3.bin"
276+
part: ospi_nand.tiboot3
277+
- image: "<path_to_flash_binaries>/tispl.bin"
278+
part: ospi_nand.tispl
279+
- image: "<path_to_flash_binaries>/u-boot.img"
280+
part: ospi_nand.u-boot
281+
282+
For reference, the :file:`emmc.yaml` file for **am62p** platform can be as follows:
283+
284+
.. code-block:: text
285+
286+
boards:
287+
"0451:6165": "am62p"
288+
soc-models:
289+
am62p-firmware:
290+
tiboot3:
291+
path: "<path_to_boot_binaries>/tiboot3.bin"
292+
tispl:
293+
path: "<path_to_boot_binaries>/tispl.bin"
294+
u-boot:
295+
path: "<path_to_boot_binaries>/u-boot.img"
296+
am62p-tasks:
297+
- target-device: mmc0
298+
fb-buffer-addr: 0x82000000
299+
fb-buffer-size: 0x7000000
300+
- task: gpt
301+
args:
302+
- name: rootfs
303+
size: 1G
304+
- task: reset
305+
- task: flash
306+
args:
307+
- image: "<path_to_flash_binaries>/tiboot3.bin"
308+
image-offset: 0x0
309+
part: "hwpart 1"
310+
- image: "<path_to_flash_binaries>/tispl.bin"
311+
image-offset: 0x80000
312+
part: "hwpart 1"
313+
- image: "<path_to_flash_binaries>/u-boot.img"
314+
image-offset: 0x280000
315+
part: "hwpart 1"
316+
- image: "<path_to_flash_binaries>/rootfs.ext4"
317+
part: "rootfs"
318+
319+
**Snagboot Commandline Configuration and Device Flashing Procedure**
320+
321+
Snagrecover uses vendor-specific ROM code mechanisms to initialize external RAM and run U-Boot, without modifying any non-volatile memories.
322+
323+
.. code-block:: console
324+
325+
$ snagrecover -s am625 -F "{'tiboot3': {'path': 'tiboot3.bin'}}" -F "{'tispl': {'path': 'tispl.bin'}}" -F "{'u-boot': {'path': 'u-boot.img'}}"
326+
327+
* Comprehensive instructions for using snagrecover command line can be accessed at
328+
`Snagrecover command line <https://github.com/bootlin/snagboot/blob/main/docs/snagrecover.md>`__.
329+
330+
Snagflash communicates with U-Boot to flash system images to non-volatile memories, using either DFU, UMS or Fastboot.
331+
332+
.. code-block:: console
333+
334+
$ snagflash -P fastboot-uboot -p 0451:6165 -i
335+
336+
* Comprehensive instructions for using snagflash command line can be accessed at
337+
`Snagflash command line <https://github.com/bootlin/snagboot/blob/main/docs/snagflash.md>`__.

0 commit comments

Comments
 (0)