@@ -18,37 +18,104 @@ enviroment.
1818Installing Snagfactory
1919**********************
2020
21+ Install using the SDK installer (recommended)
22+ =============================================
23+
24+ The Linux SDK installer includes a setup script that installs Snagboot and
25+ configures udev rules automatically.
26+
27+ .. code-block :: console
28+
29+ $ cd <sdk_install_dir>
30+ $ ./bin/setup-snagboot.sh
31+
32+ To also install the optional Snagfactory GUI:
33+
34+ .. code-block :: console
35+
36+ $ ./bin/setup-snagboot.sh --gui
37+
38+ The script installs Snagboot by using pip, sets up udev rules so USB access works
39+ without root, and verifies the installation. If pip installs the tools to
40+ ``~/.local/bin `` but that directory is not on ``PATH ``, add the following to ``~/.bashrc ``:
41+
42+ .. code-block :: console
43+
44+ $ export PATH="$HOME/.local/bin:$PATH"
45+
46+ Manual installation
47+ ===================
48+
49+ If the SDK installer is not available, install Snagboot directly by using pip:
50+
2151* Snagfactory tool is hosted here `Snagfactory <https://github.com/bootlin/snagboot >`__.
2252* More info about installation can be found in `Snagfactory Readme <https://github.com/bootlin/snagboot/blob/main/README.md >`__.
23- * Snagfactory also is available on pip.
2453
2554.. code-block :: console
2655
2756 $ python3 -m pip install --user snagboot
2857 $ python3 -m pip install --user snagboot[gui]
2958
59+ After installation, set up udev rules so USB access works without root:
60+
61+ .. code-block :: console
62+
63+ $ python3 -m snagrecover --udev | sudo tee /etc/udev/rules.d/80-snagboot.rules
64+ $ sudo udevadm control --reload-rules && sudo udevadm trigger
65+
3066 .. note ::
3167
32- At the time of 11.2 release, the corresponding Snagfactory version was v2.5.
68+ At the time of 12.01 release, the corresponding Snagfactory version was v2.5.
3369
3470.. ifconfig :: CONFIG_part_variant in ('AM62DX')
3571
3672 .. note ::
3773
3874 AM62DX support was added after v2.3. Refer this `commit <https://github.com/bootlin/snagboot/commit/d5a691b1916207ee674e99620c63cc3a6c3b3a28 >`__.
3975
40- *****************************************
41- Building bootloader binaries for Recovery
42- *****************************************
76+ *******************************************
77+ Build boot loader binaries for recovery
78+ *******************************************
79+
80+ For Snagrecover, boot loader images must support Device Firmware Upgrade (DFU) boot
81+ and fastboot download. The u-boot build requires the USB DFU fragment config to enable
82+ DFU boot. It also requires the additional fragment config
83+ :file: `am6x_a53_snagfactory.config `, that enables fastboot support in U-Boot and other
84+ required configs for snagfactory.
4385
44- For Snagrecover, bootloader images must support DFU boot and fastboot download.
45- In addition to USB DFU fragment config (which enables DFU boot) for the u-boot
46- build, an additional fragment config :file: `am6x_a53_snagfactory.config ` needs to be
47- used, which enables fastboot support in U-Boot and other required configs for
48- snagfactory.
86+ Build using the SDK installer (recommended)
87+ ===========================================
4988
50- To build bootloader images for recovery using SDK, following change is needed
51- in :file: `Rules.make ` file present in the top level of Linux SDK Installer.
89+ The Linux SDK installer includes a dedicated Makefile target that builds
90+ boot loader images with all the required DFU and Fastboot configuration
91+ fragments applied automatically.
92+
93+ From the top level of the Linux SDK installer:
94+
95+ .. code-block :: console
96+
97+ $ make u-boot-snagboot_clean
98+ $ make u-boot-snagboot
99+ $ make u-boot-snagboot_stage
100+
101+ The build places the staged boot loader images in
102+ :file: `board-support/built-images/snagboot/ `. The directory contains:
103+
104+ * :file: `tiboot3.bin ` (R5 Secondary Program Loader (SPL), or A53 SPL for AM62L)
105+ * :file: `tispl.bin ` (A53 SPL with DFU and fastboot support)
106+ * :file: `u-boot.img ` (U-Boot with fastboot support)
107+
108+ .. note ::
109+
110+ For AM62L, only the A53 build is needed. The ``u-boot-snagboot `` target
111+ handles this automatically.
112+
113+ Manual build
114+ ============
115+
116+ If the SDK installer is not available, apply the required config fragments
117+ manually by editing :file: `Rules.make ` in the top level of the Linux SDK and
118+ then running the standard u-boot build.
52119
53120.. ifconfig :: CONFIG_part_variant in ('AM62X')
54121
@@ -108,18 +175,15 @@ in :file:`Rules.make` file present in the top level of Linux SDK Installer.
108175
109176 UBOOT_MACHINE=am62lx_evm_defconfig am62x_a53_usbdfu.config am6x_a53_snagfactory.config
110177
111- Generate the bootloader images using top-level makefile by running following
112- commands on the terminal from the top-level of the Linux SDK installer.
178+ Then build using the top-level makefile:
113179
114180.. code-block :: console
115181
116182 $ make u-boot_clean
117183 $ make u-boot
118184 $ make u-boot_stage
119185
120- Save the bootloader binaries generated in a separate directory. These bootloader
121- images will be used for recovery and to start flashing the images. The bootloader
122- images after make can be found in :file: `board-support/built-images `.
186+ The boot loader images are placed in :file: `board-support/built-images `.
123187
124188For more details regarding USB DFU refer :ref: `usb-device-firmware-upgrade-label `.
125189
@@ -183,16 +247,37 @@ Connections
183247 SW3 - BOOTMODE[8:15] = 00000000
184248
185249 * Power on the board.
186- * Optionally you can also connect host PC to board via UART to read the console logs.
250+ * Optionally you can also connect host PC to board by using UART to read the console logs.
187251
188252How to use Snagfactory
189- **********************
253+ ======================
190254
191255Comprehensive instructions for installation of the Snagfactory tool are here:
192256
193257* `Snagfactory doc <https://github.com/bootlin/snagboot/blob/main/docs/snagfactory.md >`__.
194258* `Snagfactory config doc <https://github.com/bootlin/snagboot/blob/main/docs/snagfactory_config.md >`__.
195259
260+ YAML configuration files
261+ =========================
262+
263+ Ready-to-use YAML configuration files for all supported platforms are bundled
264+ with the SDK installer under:
265+
266+ .. code-block :: text
267+
268+ <sdk_install_dir>/bin/snagboot_flash/yaml/<board>/
269+
270+ The same configuration files are also available from the TI GitHub repository:
271+
272+ `snagfactory-configs <https://github.com/TexasInstruments/snagfactory-configs >`__
273+
274+ Before using a YAML file, replace the two path placeholders with actual paths
275+ to your binaries:
276+
277+ * ``<path_to_snagboot_binaries>/ `` — recovery boot loader images built with
278+ ``u-boot-snagboot `` (placed in :file: `board-support/built-images/snagboot/ `)
279+ * ``<path_to_flash_binaries>/ `` — production images to be written to the
280+ target non-volatile memory
196281
197282**SnagFactory GUI Tool Configuration and Device Flashing Procedure **
198283
@@ -217,22 +302,22 @@ the SnagFactory GUI tool.
217302
218303 $ snagfactory
219304
220- **Step 2: Select Configuration File Option **
305+ **Step 2: Select configuration file option **
221306
222307* Upon launch, the SnagFactory GUI tool will present the option to add a configuration file.
223308 Select the conf option to proceed with loading the configuration file.
224309
225- **Step 3: Load YAML Configuration File **
310+ **Step 3: Load YAML configuration file **
226311
227312* Load the YAML configuration file for the platform. This file has the necessary settings
228313 and parameters for the device flashing process.
229314
230- **Step 4: Flash the Device **
315+ **Step 4: Flash the device **
231316
232317* Once you load the YAML configuration file, the SnagFactory GUI tool will flash the device with
233318 the specified configuration.
234319
235- The following table outline the board names for snagfactory yaml configuration.
320+ The following table outlines the board names for snagfactory YAML configuration.
236321
237322.. list-table ::
238323 :header-rows: 1
@@ -276,11 +361,11 @@ For reference, the :file:`ospi-nor.yaml` file for **am62p** platform can be as f
276361 soc-models:
277362 am62p-firmware:
278363 tiboot3:
279- path: "<path_to_boot_binaries >/tiboot3.bin"
364+ path: "<path_to_snagboot_binaries >/tiboot3.bin"
280365 tispl:
281- path: "<path_to_boot_binaries >/tispl.bin"
366+ path: "<path_to_snagboot_binaries >/tispl.bin"
282367 u-boot:
283- path: "<path_to_boot_binaries >/u-boot.img"
368+ path: "<path_to_snagboot_binaries >/u-boot.img"
284369 am62p-tasks:
285370 - eraseblk-size: 0x40000
286371 fb-buffer-addr: 0x82000000
@@ -316,11 +401,11 @@ For reference, the :file:`ospi-nand.yaml` file for **am62xx-lp** platform can be
316401 soc-models:
317402 am625-firmware:
318403 tiboot3:
319- path: "<path_to_boot_binaries >/tiboot3.bin"
404+ path: "<path_to_snagboot_binaries >/tiboot3.bin"
320405 tispl:
321- path: "<path_to_boot_binaries >/tispl.bin"
406+ path: "<path_to_snagboot_binaries >/tispl.bin"
322407 u-boot:
323- path: "<path_to_boot_binaries >/u-boot.img"
408+ path: "<path_to_snagboot_binaries >/u-boot.img"
324409 am625-tasks:
325410 - eraseblk-size: 0x40000
326411 fb-buffer-addr: 0x82000000
@@ -357,7 +442,7 @@ For reference, the :file:`ospi-nand.yaml` file for **am62xx-lp** platform can be
357442 - image: "<path_to_flash_binaries>/u-boot.img"
358443 part: ospi_nand.u-boot
359444
360- For reference, the :file: `emmc.yaml ` file for **am62p ** platform can be as follows:
445+ For reference, the :file: `emmc.yaml ` file for **am62p ** platform can be as follows:
361446
362447.. code-block :: text
363448
@@ -366,11 +451,11 @@ For reference, the :file:`emmc.yaml` file for **am62p** platform can be as foll
366451 soc-models:
367452 am62p-firmware:
368453 tiboot3:
369- path: "<path_to_boot_binaries >/tiboot3.bin"
454+ path: "<path_to_snagboot_binaries >/tiboot3.bin"
370455 tispl:
371- path: "<path_to_boot_binaries >/tispl.bin"
456+ path: "<path_to_snagboot_binaries >/tispl.bin"
372457 u-boot:
373- path: "<path_to_boot_binaries >/u-boot.img"
458+ path: "<path_to_snagboot_binaries >/u-boot.img"
374459 am62p-tasks:
375460 - target-device: mmc0
376461 fb-buffer-addr: 0x82000000
@@ -394,7 +479,7 @@ For reference, the :file:`emmc.yaml` file for **am62p** platform can be as foll
394479 - image: "<path_to_flash_binaries>/rootfs.ext4"
395480 part: "rootfs"
396481
397- For reference, the :file: `emmc.yaml ` file for **am62l ** platform can be as follows:
482+ For reference, the :file: `emmc.yaml ` file for **am62l ** platform can be as follows:
398483
399484.. code-block :: text
400485
@@ -404,11 +489,11 @@ For reference, the :file:`emmc.yaml` file for **am62l** platform can be as foll
404489 soc-models:
405490 am62l3-firmware:
406491 tiboot3:
407- path: "<path_to_boot_binaries >/tiboot3.bin"
492+ path: "<path_to_snagboot_binaries >/tiboot3.bin"
408493 tispl:
409- path: "<path_to_boot_binaries >/tispl.bin"
494+ path: "<path_to_snagboot_binaries >/tispl.bin"
410495 u-boot:
411- path: "<path_to_boot_binaries >/u-boot.img"
496+ path: "<path_to_snagboot_binaries >/u-boot.img"
412497
413498 am62l3-tasks:
414499 - target-device: mmc0
@@ -438,7 +523,7 @@ For reference, the :file:`emmc.yaml` file for **am62l** platform can be as foll
438523
439524 For eMMC boot configuration, refer :ref: `emmc_boot_config `
440525
441- **Snagboot Command -line Configuration and Device Flashing Procedure **
526+ **Snagboot command -line configuration and device flashing procedure **
442527
443528Snagrecover uses vendor-specific ROM code mechanisms to initialize external RAM and run U-Boot, without modifying any non-volatile memories.
444529
0 commit comments