@@ -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*****************************************
3441Building 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
91106commands on the terminal from the top-level of the Linux SDK installer.
92107
@@ -115,18 +130,206 @@ 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
126141How 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 are 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+ The example configuration files for **emmc ** and **ospi-nand ** and **ospi-nor ** are as follows.
189+
190+ For reference, the :file: `ospi-nor.yaml ` file for **am62p ** platform can be as follows:
191+
192+ .. code-block :: text
193+
194+ boards:
195+ 0451:6165: am62p
196+ soc-models:
197+ am62p-firmware:
198+ tiboot3:
199+ path: "<path_to_boot_binaries>/tiboot3.bin"
200+ tispl:
201+ path: "<path_to_boot_binaries>/tispl.bin"
202+ u-boot:
203+ path: "<path_to_boot_binaries>/u-boot.img"
204+ am62p-tasks:
205+ - eraseblk-size: 0x40000
206+ fb-buffer-addr: 0x82000000
207+ fb-buffer-size: 0x7000000
208+ target-device: nor0
209+ - task: run
210+ args:
211+ - "oem_run:mtd list"
212+ - "oem_run:setenv mtdids nor0=nor0"
213+ - task: mtd-parts
214+ args:
215+ - name: ospi.tiboot3
216+ size: 0x80000
217+ - name: ospi.tispl
218+ size: 0x200000
219+ - name: ospi.u-boot
220+ size: 0x400000
221+ - task: flash
222+ args:
223+ - image: "<path_to_flash_binaries>/tiboot3.bin"
224+ part: ospi.tiboot3
225+ - image: "<path_to_flash_binaries>/tispl.bin"
226+ part: ospi.tispl
227+ - image: "<path_to_flash_binaries>/u-boot.img"
228+ part: ospi.u-boot
229+
230+ For reference, the :file: `ospi-nand.yaml ` file for **am62xx-lp ** platform can be as follows:
231+
232+ .. code-block :: text
233+
234+ boards:
235+ 0451:6165: am625
236+ soc-models:
237+ am625-firmware:
238+ tiboot3:
239+ path: "<path_to_boot_binaries>/tiboot3.bin"
240+ tispl:
241+ path: "<path_to_boot_binaries>/tispl.bin"
242+ u-boot:
243+ path: "<path_to_boot_binaries>/u-boot.img"
244+ am625-tasks:
245+ - eraseblk-size: 0x40000
246+ fb-buffer-addr: 0x82000000
247+ fb-buffer-size: 0x7000000
248+ target-device: spi-nand0
249+ - task: run
250+ args:
251+ - "oem_run:mtd list"
252+ - "oem_run:setenv mtdids spi-nand0=spi-nand0"
253+ - task: mtd-parts
254+ args:
255+ - name: ospi_nand.tiboot3
256+ size: 0x80000
257+ - name: ospi_nand.tispl
258+ size: 0x200000
259+ - name: ospi_nand.u-boot
260+ size: 0x400000
261+ - name: ospi_nand.env
262+ size: 0x40000
263+ - name: ospi_nand.env.backup
264+ size: 0x40000
265+ - name: ospi_nand.rootfs
266+ size: 0x5fc0000
267+ start: 0x2000000
268+ - name: ospi_nand.phypattern
269+ start: 0x7fc0000
270+ size: 0x40000
271+ - task: flash
272+ args:
273+ - image: "<path_to_flash_binaries>/tiboot3.bin"
274+ part: ospi_nand.tiboot3
275+ - image: "<path_to_flash_binaries>/tispl.bin"
276+ part: ospi_nand.tispl
277+ - image: "<path_to_flash_binaries>/u-boot.img"
278+ part: ospi_nand.u-boot
279+
280+ For reference, the :file: `emmc.yaml ` file for **am62p ** platform can be as follows:
281+
282+ .. code-block :: text
283+
284+ boards:
285+ "0451:6165": "am62p"
286+ soc-models:
287+ am62p-firmware:
288+ tiboot3:
289+ path: "<path_to_boot_binaries>/tiboot3.bin"
290+ tispl:
291+ path: "<path_to_boot_binaries>/tispl.bin"
292+ u-boot:
293+ path: "<path_to_boot_binaries>/u-boot.img"
294+ am62p-tasks:
295+ - target-device: mmc0
296+ fb-buffer-addr: 0x82000000
297+ fb-buffer-size: 0x7000000
298+ - task: gpt
299+ args:
300+ - name: rootfs
301+ size: 1G
302+ - task: reset
303+ - task: flash
304+ args:
305+ - image: "<path_to_flash_binaries>/tiboot3.bin"
306+ image-offset: 0x0
307+ part: "hwpart 1"
308+ - image: "<path_to_flash_binaries>/tispl.bin"
309+ image-offset: 0x80000
310+ part: "hwpart 1"
311+ - image: "<path_to_flash_binaries>/u-boot.img"
312+ image-offset: 0x280000
313+ part: "hwpart 1"
314+ - image: "<path_to_flash_binaries>/rootfs.ext4"
315+ part: "rootfs"
316+
317+ **Snagboot Command-line Configuration and Device Flashing Procedure **
318+
319+ Snagrecover uses vendor-specific ROM code mechanisms to initialize external RAM and run U-Boot, without modifying any non-volatile memories.
320+
321+ .. code-block :: console
322+
323+ $ snagrecover -s am625 -F "{'tiboot3': {'path': 'tiboot3.bin'}}" -F "{'tispl': {'path': 'tispl.bin'}}" -F "{'u-boot': {'path': 'u-boot.img'}}"
324+
325+ * Comprehensive instructions for using snagrecover command line are here:
326+ `Snagrecover command line <https://github.com/bootlin/snagboot/blob/main/docs/snagrecover.md >`__.
327+
328+ Snagflash communicates with U-Boot to flash system images to non-volatile memories, using either DFU, UMS or Fastboot.
329+
330+ .. code-block :: console
331+
332+ $ snagflash -P fastboot-uboot -p 0451:6165 -i
333+
334+ * Comprehensive instructions for using snagflash command line are here:
335+ `Snagflash command line <https://github.com/bootlin/snagboot/blob/main/docs/snagflash.md >`__.
0 commit comments