Skip to content

Commit 890f4e6

Browse files
committed
snagrecover: bcm: add documentation
Add recovery documentation for Broadcom SoCs bcm 2711|2712. Signed-off-by: François Foltete <[email protected]>
1 parent b70c77c commit 890f4e6

File tree

3 files changed

+52
-1
lines changed

3 files changed

+52
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ISP, UUU, and sunxi-fel. Snagboot is made of two separate parts:
1616
</p>
1717

1818
The currently supported SoC families are ST STM32MP1/2, Microchip SAMA5, NXP
19-
i.MX6/7/8/93, TI AM335x, Allwinner SUNXI, TI AM62x, TI AM64x, TI AM62Lx, Xilinx ZynqMP, and Intel Keembay. Please check
19+
i.MX6/7/8/93, TI AM335x, Allwinner SUNXI, TI AM62x, TI AM64x, TI AM62Lx, Xilinx ZynqMP, and Intel Keembay, Broadcom BCM. Please check
2020
[supported_socs.yaml](https://github.com/bootlin/snagboot/blob/main/src/snagrecover/supported_socs.yaml) or run `snagrecover
2121
--list-socs` for a more precise list of supported SoCs.
2222

docs/board_setup.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,3 +151,7 @@ sudo am335x_usb_setup.sh -c
151151
**Note:** If for some reason, the am335x_usb_setup.sh script exits without
152152
cleaning up the network namespace and polling subprocess, you can run the above
153153
command to remove them.
154+
155+
## Broadcom BCM
156+
157+
Set up your board in "USB device boot mode", connect the board to the USB device port, power the board if necessary. A new USB device should appear on your host system.

docs/fw_binaries.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,3 +305,50 @@ configuration:
305305
- For EVM boards: `fip-evm.bin`
306306
- For M2 boards: `fip-m2.bin`
307307
- For HDDL2 boards: `fip-hddl2.bin`
308+
309+
310+
## For Broadcom BCM devices
311+
312+
[example](../src/snagrecover/templates/bcm2711.yaml)
313+
314+
In the case of Raspberry Pi, most firmwares can be found in their GitHub repositories [github.com/raspberrypi](https://github.com/raspberrypi/)
315+
along with a [genimage.cfg](https://github.com/raspberrypi/buildroot/blob/mass-storage-gadget64/board/raspberrypi64-mass-storage-gadget/genimage.cfg) file wich can be taken as a reference for building the DOS partition image using the [genimage](https://github.com/pengutronix/genimage) tool.
316+
317+
318+
**bootfiles:** tar archive containing the FSBL and some of the firmwares required by the FSBL to boot U-Boot. Firmwares can optionally be located inside of a subfolder, named 2711|2712 for bcm2711|bcm2712 respectively.
319+
- bootcode\<n>.bin: the FSBL, which act as USB client requesting firmware to load. For bootcode, \<n> is 4|5 for bcm2711|bcm2712 respectively.
320+
- mcb.bin: RAM init
321+
- memsys\<nn>.bin: more RAM inits
322+
- bootmain: the loader for the disk image
323+
324+
In the case of Raspberry Pi, a ready made bootfiles can be found [here](https://github.com/raspberrypi/usbboot/commit/798ea2ef893bfa11fe3dba0e088cbc9b862184a1).
325+
326+
configuration:
327+
* path
328+
329+
330+
**boot:** DOS partition image with the first partition bootable with a FAT filesystem containing:
331+
- \<board>.dtb: the compiled device tree
332+
- \<board>.dtbo: the device tree overlays
333+
- config.txt: a file which specifies to `start<n>.elf` to boot U-Boot proper instead of Linux (`kernel=u-boot.bin`) and to start in 64 bits mode (`arm_64bit=1`)
334+
- cmdline.txt: linux kernel command line, as we don't boot linux you can keep it empty.
335+
- start\<n>.elf: the SSBL
336+
- fixup\<n>.dat: the SSBL linker file (found in pair with start\<n>.elf)
337+
- U-Boot proper (`u-boot.bin`)
338+
339+
This DOS partition image can be generated using the `genimage` tool. In the case of Raspberry Pi, [ready made images already exists](https://github.com/raspberrypi/usbboot/blob/master/mass-storage-gadget64/boot.img), however they do not contain a U-Boot but a Linux. You can use them if you provide U-Boot in **u-boot**. In that case, Snagrecover will create a temporary copy of it and do what is necessary to boot U-Boot instead of Linux.
340+
341+
configuration:
342+
* path
343+
344+
345+
**config:** config text file with parameter to setup the board to boot from RAM (`boot_ramdisk=1`)
346+
347+
configuration:
348+
* path
349+
350+
351+
**u-boot:** (optional) U-Boot proper. You can use this option if you want Snagrecover to modify **boot** firmware to add U-Boot to it (eg you are using a ready made **boot** firmware from RPi). If your **boot** firmware already contains a U-Boot and you want to use it, you can skip this option.
352+
353+
configuration:
354+
* path

0 commit comments

Comments
 (0)