Snagboot is an open-source cross-vendor recovery tool for embedded targets

Bootlin has just released the Snagboot open-source recovery tool for embedded platforms designed to work with multiple vendors, and currently STMicro STM32MP1, Microchip SAMA5, NXP i.MX6/7/8, Texas Instruments AM335x and AM62x, and Allwinner “sunxi” processors are supported.

Silicon vendors usually provide firmware flashing tools, some closed-source binaries, that only work with their hardware. So if you work on STM32MP1 you’d use STM32CubeProgrammer, while SAM-BA is the tool for Microchip processors, NXP i.MX SoC relies on UUU, and if you’ve ever worked on Allwinner processors you’re probably family with sunxi-fel. Bootlin aims to replace all those with the Snagboot recovery tool.

snagboot

The Python tool is comprised of two parts:

  • snagrecover using vendor-specific ROM code mechanisms to initialize external RAM and run the bootloader (typically U-Boot) without modifying any non-volatile memories.
  • snagflash communicates with the bootloader over USB to flash system images to non-volatile memories, using either DFU, USB Mass Storage, or fastboot.

You’ll find the source code on GitHub, but if you just want to install snagboot, you can do so with pip:


You’ll also need to add udev rules so that snagrecover has read and write access to the USB devices to the target SoCs:


snagrecover usage:


You can get a long list of supported SoCs using the command:


snagflash usage:


Bootlin welcomes contributions to add support for more targets.

Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK 5 ITX Rockchip RK3588 mini-ITX motherboard

4 Replies to “Snagboot is an open-source cross-vendor recovery tool for embedded targets”

  1. Interesting. I unbricked a few marvell boards in the past by uploading u-boot over the serial port to the RAM and using it to first boot the OS, then did it again to write it to the flash. I’m sure they’ll easily support it.

    1. snagboot already supports recovering TI AM335x over UART, so it should indeed not be too complicated to support the UART-based recovery of Marvell EBU platforms. Supporting Marvell platforms was on our list of possible platforms to support, but we couldn’t support them all 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...
Boardcon Rockchip RK3588S SBC with 8K, WiFI 6, 4G LTE, NVME SSD, HDMI 2.1...