Skip to content

Commit 7545cf1

Browse files
committed
fix(snagboot): update snagboot documentation.
add the comprehensive procedure for using snagboot along with sample configurations. Signed-off-by: sadik <[email protected]>
1 parent 9b76f07 commit 7545cf1

File tree

2 files changed

+213
-3
lines changed

2 files changed

+213
-3
lines changed

source/images/snagfactory.png

220 KB
Loading

source/linux/Foundational_Components/Tools/Flash_via_Fastboot.rst

Lines changed: 213 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,18 @@ Installing Snagfactory
2424

2525
.. 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

@@ -126,7 +141,202 @@ Connections
126141
How to use Snagfactory
127142
**********************
128143

129-
Comprehensive instructions for using the Snagfactory tool can be found here.
144+
Comprehensive instructions for installing 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 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 initiate 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 contains the necessary settings
181+
and parameters for the device flashing process.
182+
183+
**Step 4: Flash the Device**
184+
185+
* Once the YAML configuration file is loaded, 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 **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 **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 **emmc.yaml** file for **am62p** platform can be as follows:
283+
284+
.. code-block:: text
285+
286+
boards:
287+
"0451:6165": "am62p"
288+
289+
soc-models:
290+
am62p-firmware:
291+
tiboot3:
292+
path: "<path_to_boot_binaries>/tiboot3.bin"
293+
tispl:
294+
path: "<path_to_boot_binaries>/tispl.bin"
295+
u-boot:
296+
path: "<path_to_boot_binaries>/u-boot.img"
297+
298+
am62p-tasks:
299+
- target-device: mmc0
300+
fb-buffer-addr: 0x82000000
301+
fb-buffer-size: 0x7000000
302+
303+
- task: gpt
304+
args:
305+
- name: rootfs
306+
size: 1G
307+
308+
- task: reset
309+
310+
- task: flash
311+
args:
312+
- image: "<path_to_flash_binaries>/tiboot3.bin"
313+
image-offset: 0x0
314+
part: "hwpart 1"
315+
- image: "<path_to_flash_binaries>/tispl.bin"
316+
image-offset: 0x80000
317+
part: "hwpart 1"
318+
- image: "<path_to_flash_binaries>/u-boot.img"
319+
image-offset: 0x280000
320+
part: "hwpart 1"
321+
- image: "<path_to_flash_binaries>/rootfs.ext4"
322+
part: "rootfs"
323+
324+
**SnagFactory Commandline Configuration and Device Flashing Procedure**
325+
326+
Snagrecover uses vendor-specific ROM code mechanisms to initialize external RAM and run U-Boot, without modifying any non-volatile memories.
327+
328+
.. code-block:: console
329+
330+
$ snagrecover -s am625 -F "{'tiboot3': {'path': 'tiboot3.bin'}}" -F "{'tispl': {'path': 'tispl.bin'}}" -F "{'u-boot': {'path': 'u-boot.img'}}"
331+
332+
* Comprehensive instructions for using snagrecover command line can be accessed at
333+
`Snagrecover command line <https://github.com/bootlin/snagboot/blob/main/docs/snagrecover.md>`__.
334+
335+
Snagflash communicates with U-Boot to flash system images to non-volatile memories, using either DFU, UMS or Fastboot.
336+
337+
.. code-block:: console
338+
339+
$ snagflash -P fastboot-uboot -p 0451:6165 -i
340+
341+
* Comprehensive instructions for using snagflash command line can be accessed at
342+
`Snagflash command line <https://github.com/bootlin/snagboot/blob/main/docs/snagflash.md>`__.

0 commit comments

Comments
 (0)