snagboot 3.0__tar.gz → 3.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. {snagboot-3.0/src/snagboot.egg-info → snagboot-3.0.1}/PKG-INFO +6 -3
  2. {snagboot-3.0 → snagboot-3.0.1}/README.md +5 -2
  3. {snagboot-3.0 → snagboot-3.0.1/src/snagboot.egg-info}/PKG-INFO +6 -3
  4. {snagboot-3.0 → snagboot-3.0.1}/src/snagboot.egg-info/SOURCES.txt +1 -0
  5. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/50-snagboot.rules +3 -1
  6. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/__init__.py +1 -1
  7. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/config.py +1 -0
  8. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/rom_container.py +43 -19
  9. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/zynqmp_fw.py +4 -0
  10. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/hid.py +20 -6
  11. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/imx_sdp.py +23 -3
  12. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/imx.py +9 -5
  13. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/supported_socs.yaml +2 -0
  14. snagboot-3.0.1/src/snagrecover/templates/imx95-dart-mx95.yaml +2 -0
  15. {snagboot-3.0 → snagboot-3.0.1}/LICENSE +0 -0
  16. {snagboot-3.0 → snagboot-3.0.1}/MANIFEST.in +0 -0
  17. {snagboot-3.0 → snagboot-3.0.1}/pyproject.toml +0 -0
  18. {snagboot-3.0 → snagboot-3.0.1}/setup.cfg +0 -0
  19. {snagboot-3.0 → snagboot-3.0.1}/src/snagboot.egg-info/dependency_links.txt +0 -0
  20. {snagboot-3.0 → snagboot-3.0.1}/src/snagboot.egg-info/entry_points.txt +0 -0
  21. {snagboot-3.0 → snagboot-3.0.1}/src/snagboot.egg-info/requires.txt +0 -0
  22. {snagboot-3.0 → snagboot-3.0.1}/src/snagboot.egg-info/top_level.txt +0 -0
  23. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/__init__.py +0 -0
  24. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/board.py +0 -0
  25. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/config.py +0 -0
  26. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/fastboot.py +0 -0
  27. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/gui-requirements.txt +0 -0
  28. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/gui.py +0 -0
  29. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagBoard.qml +0 -0
  30. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagBoardID.qml +0 -0
  31. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagBoardList.qml +0 -0
  32. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagConfigEntry.qml +0 -0
  33. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagConfigField.qml +0 -0
  34. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagConfigTab.qml +0 -0
  35. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagMainWindow.qml +0 -0
  36. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagPanelItem.qml +0 -0
  37. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagTabButton.qml +0 -0
  38. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/SnagUnpauseButton.qml +0 -0
  39. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/boards.png +0 -0
  40. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/lab_penguins.ico +0 -0
  41. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/lab_penguins.png +0 -0
  42. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/qmldir +0 -0
  43. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/qml/save.png +0 -0
  44. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/session.py +0 -0
  45. {snagboot-3.0 → snagboot-3.0.1}/src/snagfactory/utils.py +0 -0
  46. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/__init__.py +0 -0
  47. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/android_sparse_file/__init__.py +0 -0
  48. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/android_sparse_file/sparse.py +0 -0
  49. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/android_sparse_file/utils.py +0 -0
  50. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/bmaptools/BmapCopy.py +0 -0
  51. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/bmaptools/BmapCreate.py +0 -0
  52. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/bmaptools/BmapHelpers.py +0 -0
  53. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/bmaptools/Filemap.py +0 -0
  54. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/bmaptools/__init__.py +0 -0
  55. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/cli.py +0 -0
  56. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/dfu.py +0 -0
  57. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/fastboot.py +0 -0
  58. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/fastboot_uboot.py +0 -0
  59. {snagboot-3.0 → snagboot-3.0.1}/src/snagflash/ums.py +0 -0
  60. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/am335x_usb_setup.sh +0 -0
  61. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/cli.py +0 -0
  62. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/__init__.py +0 -0
  63. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/am335x_fw.py +0 -0
  64. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/amlogic_fw.py +0 -0
  65. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/bcm.py +0 -0
  66. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/fat.py +0 -0
  67. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/firmware.py +0 -0
  68. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/imx_fw.py +0 -0
  69. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/ivt.py +0 -0
  70. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/qcom_fw.py +0 -0
  71. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/sama5_fw.py +0 -0
  72. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/samba_applet.py +0 -0
  73. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/sunxi_fw/__init__.py +0 -0
  74. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/sunxi_fw/fel-to-spl-thunk.S +0 -0
  75. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/sunxi_fw/fel-to-spl-thunk.bin +0 -0
  76. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/sunxi_fw/mmu.py +0 -0
  77. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/sunxi_fw/soc_info.yaml +0 -0
  78. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/firmware/sunxi_fw/sunxi_fw.py +0 -0
  79. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/prompt.ps1 +0 -0
  80. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/__init__.py +0 -0
  81. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/amlogic.py +0 -0
  82. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/bcm.py +0 -0
  83. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/bootp.py +0 -0
  84. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/dfu.py +0 -0
  85. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/fastboot.py +0 -0
  86. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/fel.py +0 -0
  87. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/hab_constants.py +0 -0
  88. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/memory_ops.py +0 -0
  89. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/qcom_sahara.py +0 -0
  90. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/protocols/sambamon.py +0 -0
  91. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/__init__.py +0 -0
  92. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/am335x.py +0 -0
  93. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/am62lx.py +0 -0
  94. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/am6x.py +0 -0
  95. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/amlogic.py +0 -0
  96. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/bcm.py +0 -0
  97. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/keembay.py +0 -0
  98. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/qcom.py +0 -0
  99. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/rzn1.py +0 -0
  100. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/sama5.py +0 -0
  101. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/stm32_flashlayout.py +0 -0
  102. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/stm32mp.py +0 -0
  103. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/sunxi.py +0 -0
  104. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/recoveries/zynqmp.py +0 -0
  105. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/am335x-beaglebone-black.yaml +0 -0
  106. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/am62x-beagle-play.yaml +0 -0
  107. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/am62x-phyboard-lyra.yaml +0 -0
  108. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/am654x-evm.yaml +0 -0
  109. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/amlogic_G12x_SM1.yaml +0 -0
  110. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/amlogic_GXx_AXG.yaml +0 -0
  111. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/bcm2711.yaml +0 -0
  112. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/bcm2712.yaml +0 -0
  113. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/imx28-evk.yaml +0 -0
  114. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/imx6-colibri-imx6ull.yaml +0 -0
  115. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/imx6-var-som-mx6.yaml +0 -0
  116. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/imx7-colibri-imx7d.yaml +0 -0
  117. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/imx8-dart-mx8m-mini.yaml +0 -0
  118. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/imx8mp-phyboard-pollux.yaml +0 -0
  119. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/imx8qm-mek.yaml +0 -0
  120. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/imx91-phyboard-segin.yaml +0 -0
  121. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/imx93-evk.yaml +0 -0
  122. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/iq9075-evk.yaml +0 -0
  123. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/j721e-evm.yaml +0 -0
  124. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/keembay-generic.yaml +0 -0
  125. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/rzn1d-snarc.yaml +0 -0
  126. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/sama5-sama5d2xplained.yaml +0 -0
  127. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/sama5-sama5d3xplained.yaml +0 -0
  128. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/sama5-sama5d4xplained.yaml +0 -0
  129. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/stm32mp-stm32mp257f-ev1.yaml +0 -0
  130. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/stm32mp1-stm32mp135f-dk.yaml +0 -0
  131. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/stm32mp1-stm32mp157f-dk2.yaml +0 -0
  132. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/sunxi-orangepi-pc.yaml +0 -0
  133. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/templates/zynqmp-generic.yaml +0 -0
  134. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/usb.py +0 -0
  135. {snagboot-3.0 → snagboot-3.0.1}/src/snagrecover/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: snagboot
3
- Version: 3.0
3
+ Version: 3.0.1
4
4
  Summary: Generic recovery and reflashing tool for embedded platforms
5
5
  Author-email: Romain Gantois <romain.gantois@bootlin.com>
6
6
  License-Expression: GPL-2.0-only
@@ -29,6 +29,8 @@ Dynamic: license-file
29
29
 
30
30
  # Snagboot
31
31
 
32
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/14233/badge)](https://www.bestpractices.dev/projects/14233)
33
+
32
34
  Snagboot intends to be an open-source and generic replacement to the
33
35
  vendor-specific, sometimes proprietary, tools used to recover and/or reflash
34
36
  embedded platforms. Examples of such tools include STM32CubeProgrammer, SAM-BA
@@ -51,8 +53,8 @@ Snagboot currently supports the following families of System-On-Chips (SoCs):
51
53
  * [Allwinner sunxi](https://linux-sunxi.org/) A10, A10S, A13, A20, A23, A31, A33, A63, A64, A80, A83T, AF1C100S, H2+, R8, R16, R40, R329, R528, T113-S3, V3S, V5S, V536, V831, V853
52
54
  * [STMicroelectronics](http://st.com/) [STM32MP1](https://www.st.com/en/microcontrollers-microprocessors/stm32mp1-series.html) and [STM32MP2](https://www.st.com/en/microcontrollers-microprocessors/stm32mp2-series.html)
53
55
  * [Microchip](https://www.microchip.com/) [SAMA5](https://www.microchip.com/en-us/products/microprocessors/32-bit-mpus/sama5)
54
- * [NXP](https://www.nxp.com/) [i.MX6](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-6-processors:IMX6X_SERIES), [i.MX7](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-7-processors:IMX7-SERIES), [i.MX8](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors:IMX8-SERIES), [i.MX91](https://www.nxp.com/products/i.MX91), [i.MX93](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors/i-mx-93-applications-processor-family-arm-cortex-a55-ml-acceleration-power-efficient-mpu:i.MX93)
55
- * [Texas Instruments](https://www.ti.com) [AM335x](https://www.ti.com/product/AM3358), [AM62x](https://www.ti.com/product/AM625), [AM62Lx](https://www.ti.com/product/AM62L), [AM64x](https://www.ti.com/product/AM6442), [AM654x](https://www.ti.com/product/AM6548)
56
+ * [NXP](https://www.nxp.com/) [i.MX6](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-6-processors:IMX6X_SERIES), [i.MX7](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-7-processors:IMX7-SERIES), [i.MX8](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors:IMX8-SERIES), [i.MX91](https://www.nxp.com/products/i.MX91), [i.MX93](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors/i-mx-93-applications-processor-family-arm-cortex-a55-ml-acceleration-power-efficient-mpu:i.MX93), [i.MX95](https://www.nxp.com/products/i.MX95)
57
+ * [Texas Instruments](https://www.ti.com) [AM335x](https://www.ti.com/product/AM3358), [AM62x](https://www.ti.com/product/AM625), [AM62Lx](https://www.ti.com/product/AM62L), [AM64x](https://www.ti.com/product/AM6442), [AM654x](https://www.ti.com/product/AM6548), [DRA821U](https://www.ti.com/product/DRA821U), [TDA4VM](https://www.ti.com/product/TDA4VM), [AM67](https://www.ti.com/product/AM67), [AM68](https://www.ti.com/product/AM68), [AM69](https://www.ti.com/product/AM69)
56
58
  * [Xilinx/AMD](https://www.amd.com/) [Zynq UltraScale+ MPSoC](https://www.amd.com/en/products/adaptive-socs-and-fpgas/soc/zynq-ultrascale-plus-mpsoc.html)
57
59
  * [Intel](https://www.intel.com/) Keembay
58
60
  * [Broadcom](https://www.broadcom.com/) BCM2711 and BCM2712, used in [Raspberry Pi 4 & 5](https://www.raspberrypi.com/documentation/computers/processors.html)
@@ -64,4 +66,5 @@ Please check [supported_socs.yaml](https://github.com/bootlin/snagboot/blob/main
64
66
  or run `snagrecover --list-socs` for a more precise list of supported SoCs.
65
67
 
66
68
  Documentation: https://snagboot.readthedocs.io
69
+ To report a security vulnerability: [SECURITY.md](https://github.com/bootlin/snagboot/blob/main/SECURITY.md)
67
70
 
@@ -1,5 +1,7 @@
1
1
  # Snagboot
2
2
 
3
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/14233/badge)](https://www.bestpractices.dev/projects/14233)
4
+
3
5
  Snagboot intends to be an open-source and generic replacement to the
4
6
  vendor-specific, sometimes proprietary, tools used to recover and/or reflash
5
7
  embedded platforms. Examples of such tools include STM32CubeProgrammer, SAM-BA
@@ -22,8 +24,8 @@ Snagboot currently supports the following families of System-On-Chips (SoCs):
22
24
  * [Allwinner sunxi](https://linux-sunxi.org/) A10, A10S, A13, A20, A23, A31, A33, A63, A64, A80, A83T, AF1C100S, H2+, R8, R16, R40, R329, R528, T113-S3, V3S, V5S, V536, V831, V853
23
25
  * [STMicroelectronics](http://st.com/) [STM32MP1](https://www.st.com/en/microcontrollers-microprocessors/stm32mp1-series.html) and [STM32MP2](https://www.st.com/en/microcontrollers-microprocessors/stm32mp2-series.html)
24
26
  * [Microchip](https://www.microchip.com/) [SAMA5](https://www.microchip.com/en-us/products/microprocessors/32-bit-mpus/sama5)
25
- * [NXP](https://www.nxp.com/) [i.MX6](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-6-processors:IMX6X_SERIES), [i.MX7](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-7-processors:IMX7-SERIES), [i.MX8](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors:IMX8-SERIES), [i.MX91](https://www.nxp.com/products/i.MX91), [i.MX93](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors/i-mx-93-applications-processor-family-arm-cortex-a55-ml-acceleration-power-efficient-mpu:i.MX93)
26
- * [Texas Instruments](https://www.ti.com) [AM335x](https://www.ti.com/product/AM3358), [AM62x](https://www.ti.com/product/AM625), [AM62Lx](https://www.ti.com/product/AM62L), [AM64x](https://www.ti.com/product/AM6442), [AM654x](https://www.ti.com/product/AM6548)
27
+ * [NXP](https://www.nxp.com/) [i.MX6](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-6-processors:IMX6X_SERIES), [i.MX7](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-7-processors:IMX7-SERIES), [i.MX8](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors:IMX8-SERIES), [i.MX91](https://www.nxp.com/products/i.MX91), [i.MX93](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors/i-mx-93-applications-processor-family-arm-cortex-a55-ml-acceleration-power-efficient-mpu:i.MX93), [i.MX95](https://www.nxp.com/products/i.MX95)
28
+ * [Texas Instruments](https://www.ti.com) [AM335x](https://www.ti.com/product/AM3358), [AM62x](https://www.ti.com/product/AM625), [AM62Lx](https://www.ti.com/product/AM62L), [AM64x](https://www.ti.com/product/AM6442), [AM654x](https://www.ti.com/product/AM6548), [DRA821U](https://www.ti.com/product/DRA821U), [TDA4VM](https://www.ti.com/product/TDA4VM), [AM67](https://www.ti.com/product/AM67), [AM68](https://www.ti.com/product/AM68), [AM69](https://www.ti.com/product/AM69)
27
29
  * [Xilinx/AMD](https://www.amd.com/) [Zynq UltraScale+ MPSoC](https://www.amd.com/en/products/adaptive-socs-and-fpgas/soc/zynq-ultrascale-plus-mpsoc.html)
28
30
  * [Intel](https://www.intel.com/) Keembay
29
31
  * [Broadcom](https://www.broadcom.com/) BCM2711 and BCM2712, used in [Raspberry Pi 4 & 5](https://www.raspberrypi.com/documentation/computers/processors.html)
@@ -35,4 +37,5 @@ Please check [supported_socs.yaml](https://github.com/bootlin/snagboot/blob/main
35
37
  or run `snagrecover --list-socs` for a more precise list of supported SoCs.
36
38
 
37
39
  Documentation: https://snagboot.readthedocs.io
40
+ To report a security vulnerability: [SECURITY.md](https://github.com/bootlin/snagboot/blob/main/SECURITY.md)
38
41
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: snagboot
3
- Version: 3.0
3
+ Version: 3.0.1
4
4
  Summary: Generic recovery and reflashing tool for embedded platforms
5
5
  Author-email: Romain Gantois <romain.gantois@bootlin.com>
6
6
  License-Expression: GPL-2.0-only
@@ -29,6 +29,8 @@ Dynamic: license-file
29
29
 
30
30
  # Snagboot
31
31
 
32
+ [![OpenSSF Best Practices](https://www.bestpractices.dev/projects/14233/badge)](https://www.bestpractices.dev/projects/14233)
33
+
32
34
  Snagboot intends to be an open-source and generic replacement to the
33
35
  vendor-specific, sometimes proprietary, tools used to recover and/or reflash
34
36
  embedded platforms. Examples of such tools include STM32CubeProgrammer, SAM-BA
@@ -51,8 +53,8 @@ Snagboot currently supports the following families of System-On-Chips (SoCs):
51
53
  * [Allwinner sunxi](https://linux-sunxi.org/) A10, A10S, A13, A20, A23, A31, A33, A63, A64, A80, A83T, AF1C100S, H2+, R8, R16, R40, R329, R528, T113-S3, V3S, V5S, V536, V831, V853
52
54
  * [STMicroelectronics](http://st.com/) [STM32MP1](https://www.st.com/en/microcontrollers-microprocessors/stm32mp1-series.html) and [STM32MP2](https://www.st.com/en/microcontrollers-microprocessors/stm32mp2-series.html)
53
55
  * [Microchip](https://www.microchip.com/) [SAMA5](https://www.microchip.com/en-us/products/microprocessors/32-bit-mpus/sama5)
54
- * [NXP](https://www.nxp.com/) [i.MX6](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-6-processors:IMX6X_SERIES), [i.MX7](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-7-processors:IMX7-SERIES), [i.MX8](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors:IMX8-SERIES), [i.MX91](https://www.nxp.com/products/i.MX91), [i.MX93](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors/i-mx-93-applications-processor-family-arm-cortex-a55-ml-acceleration-power-efficient-mpu:i.MX93)
55
- * [Texas Instruments](https://www.ti.com) [AM335x](https://www.ti.com/product/AM3358), [AM62x](https://www.ti.com/product/AM625), [AM62Lx](https://www.ti.com/product/AM62L), [AM64x](https://www.ti.com/product/AM6442), [AM654x](https://www.ti.com/product/AM6548)
56
+ * [NXP](https://www.nxp.com/) [i.MX6](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-6-processors:IMX6X_SERIES), [i.MX7](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-7-processors:IMX7-SERIES), [i.MX8](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-8-applications-processors:IMX8-SERIES), [i.MX91](https://www.nxp.com/products/i.MX91), [i.MX93](https://www.nxp.com/products/processors-and-microcontrollers/arm-processors/i-mx-applications-processors/i-mx-9-processors/i-mx-93-applications-processor-family-arm-cortex-a55-ml-acceleration-power-efficient-mpu:i.MX93), [i.MX95](https://www.nxp.com/products/i.MX95)
57
+ * [Texas Instruments](https://www.ti.com) [AM335x](https://www.ti.com/product/AM3358), [AM62x](https://www.ti.com/product/AM625), [AM62Lx](https://www.ti.com/product/AM62L), [AM64x](https://www.ti.com/product/AM6442), [AM654x](https://www.ti.com/product/AM6548), [DRA821U](https://www.ti.com/product/DRA821U), [TDA4VM](https://www.ti.com/product/TDA4VM), [AM67](https://www.ti.com/product/AM67), [AM68](https://www.ti.com/product/AM68), [AM69](https://www.ti.com/product/AM69)
56
58
  * [Xilinx/AMD](https://www.amd.com/) [Zynq UltraScale+ MPSoC](https://www.amd.com/en/products/adaptive-socs-and-fpgas/soc/zynq-ultrascale-plus-mpsoc.html)
57
59
  * [Intel](https://www.intel.com/) Keembay
58
60
  * [Broadcom](https://www.broadcom.com/) BCM2711 and BCM2712, used in [Raspberry Pi 4 & 5](https://www.raspberrypi.com/documentation/computers/processors.html)
@@ -64,4 +66,5 @@ Please check [supported_socs.yaml](https://github.com/bootlin/snagboot/blob/main
64
66
  or run `snagrecover --list-socs` for a more precise list of supported SoCs.
65
67
 
66
68
  Documentation: https://snagboot.readthedocs.io
69
+ To report a security vulnerability: [SECURITY.md](https://github.com/bootlin/snagboot/blob/main/SECURITY.md)
67
70
 
@@ -118,6 +118,7 @@ src/snagrecover/templates/imx8mp-phyboard-pollux.yaml
118
118
  src/snagrecover/templates/imx8qm-mek.yaml
119
119
  src/snagrecover/templates/imx91-phyboard-segin.yaml
120
120
  src/snagrecover/templates/imx93-evk.yaml
121
+ src/snagrecover/templates/imx95-dart-mx95.yaml
121
122
  src/snagrecover/templates/iq9075-evk.yaml
122
123
  src/snagrecover/templates/j721e-evm.yaml
123
124
  src/snagrecover/templates/keembay-generic.yaml
@@ -34,6 +34,7 @@ SUBSYSTEM=="hidraw", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct
34
34
  SUBSYSTEM=="hidraw", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0151", MODE="0660", TAG+="uaccess"
35
35
  SUBSYSTEM=="hidraw", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0152", MODE="0660", TAG+="uaccess"
36
36
  SUBSYSTEM=="hidraw", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0159", MODE="0660", TAG+="uaccess"
37
+ SUBSYSTEM=="hidraw", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="015d", MODE="0660", TAG+="uaccess"
37
38
  SUBSYSTEM=="hidraw", SUBSYSTEMS=="usb", ATTRS{idVendor}=="3016", ATTRS{idProduct}=="0100", MODE="0660", TAG+="uaccess"
38
39
 
39
40
  #NXP i.MX rules for libusb backend
@@ -66,6 +67,7 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="b4a4", MODE="0660"
66
67
  SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0151", MODE="0660", TAG+="uaccess"
67
68
  SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0152", MODE="0660", TAG+="uaccess"
68
69
  SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="0159", MODE="0660", TAG+="uaccess"
70
+ SUBSYSTEM=="usb", ATTRS{idVendor}=="1fc9", ATTRS{idProduct}=="015d", MODE="0660", TAG+="uaccess"
69
71
  SUBSYSTEM=="usb", ATTRS{idVendor}=="3016", ATTRS{idProduct}=="0100", MODE="0660", TAG+="uaccess"
70
72
 
71
73
  #Allwinner SUNXI rules
@@ -74,7 +76,7 @@ SUBSYSTEM=="usb", ATTRS{idVendor}=="1f3a", ATTRS{idProduct}=="efe8", MODE="0660"
74
76
  #TI rules
75
77
  SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="6168", MODE="0660", TAG+="uaccess"
76
78
  SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="6165", MODE="0660", TAG+="uaccess"
77
- SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="6164", MODE="0660", TAG+="uaccess
79
+ SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="6164", MODE="0660", TAG+="uaccess"
78
80
  SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="6163", MODE="0660", TAG+="uaccess"
79
81
  SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="6162", MODE="0660", TAG+="uaccess"
80
82
  SUBSYSTEM=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="6141", MODE="0660", TAG+="uaccess"
@@ -5,4 +5,4 @@ this would cause an import loop
5
5
  """
6
6
 
7
7
  # Global version string for Snagboot
8
- __version__ = "3.0"
8
+ __version__ = "3.0.1"
@@ -80,6 +80,7 @@ default_usb_ids = {
80
80
  "imx865": "1fc9:0146",
81
81
  "imx91": "1fc9:0159",
82
82
  "imx93": "1fc9:014e",
83
+ "imx95": "1fc9:015d",
83
84
  "imx7d": "15a2:0076",
84
85
  "imx7s": "15a2:0076",
85
86
  "imx6q": "15a2:0054",
@@ -51,12 +51,24 @@ from math import ceil
51
51
  from snagrecover.config import recovery_config
52
52
 
53
53
  CONTAINER_HDR_ALIGNMENT = 0x400
54
+ CONTAINER_HDR_ALIGNMENT_V2 = 0x4000
54
55
  CONTAINER_TAG = 0x87
56
+ V2X_CONTAINER_TAG = 0x82
55
57
  V2X_BOOTIMG_FLAG = 0x0B
56
58
 
57
59
  ROM_CONTAINER_STRUCT_SIZE = 16
58
60
  ROM_BOOTIMG_STRUCT_SIZE = 128
59
61
 
62
+ # offsets of the fields we read in the container header struct
63
+ CONTAINER_VERSION_OFFSET = 0
64
+ CONTAINER_TAG_OFFSET = 3
65
+ CONTAINER_NUM_IMAGES_OFFSET = 11
66
+
67
+ # offsets and type mask of the fields we read in a boot image struct
68
+ BOOTIMG_IMAGE_SIZE_OFFSET = 4
69
+ BOOTIMG_FLAGS_OFFSET = 24
70
+ BOOTIMG_FLAGS_TYPE_MASK = 0x0F
71
+
60
72
 
61
73
  def get_container_size(boot_blob: bytes) -> int:
62
74
  """
@@ -66,33 +78,45 @@ def get_container_size(boot_blob: bytes) -> int:
66
78
  soc_model = recovery_config["soc_model"]
67
79
  if soc_model in ["imx815", "imx865", "imx91", "imx93"]:
68
80
  return len(boot_blob)
69
- rom_container_tag = boot_blob[CONTAINER_HDR_ALIGNMENT + 3]
70
- if rom_container_tag != CONTAINER_TAG:
71
- return len(boot_blob)
72
81
 
73
- cont_index = 1
74
- romimg_offset = CONTAINER_HDR_ALIGNMENT + ROM_BOOTIMG_STRUCT_SIZE
75
- romimg_flags = int.from_bytes(
76
- boot_blob[romimg_offset + 24 : romimg_offset + 28], "little"
77
- )
78
- if romimg_flags & 0x0F == V2X_BOOTIMG_FLAG:
79
- # skip V2X container
80
- cont_index = 2
81
- rom_container_tag = boot_blob[2 * CONTAINER_HDR_ALIGNMENT + 3]
82
- if rom_container_tag != CONTAINER_TAG:
82
+ if (
83
+ boot_blob[CONTAINER_TAG_OFFSET] == CONTAINER_TAG
84
+ and boot_blob[CONTAINER_VERSION_OFFSET] >= 2
85
+ ):
86
+ # version >= 2 containers (e.g. i.MX95) use a larger alignment and a dedicated V2X tag
87
+ align = CONTAINER_HDR_ALIGNMENT_V2
88
+ cont_index = 1
89
+ if boot_blob[align + CONTAINER_TAG_OFFSET] == V2X_CONTAINER_TAG:
90
+ # skip V2X container
91
+ cont_index = 2
92
+ else:
93
+ align = CONTAINER_HDR_ALIGNMENT
94
+ if boot_blob[align + CONTAINER_TAG_OFFSET] != CONTAINER_TAG:
83
95
  return len(boot_blob)
84
- container_offset = cont_index * CONTAINER_HDR_ALIGNMENT
85
- num_images = int(boot_blob[container_offset + 11])
96
+ cont_index = 1
97
+ romimg_offset = align + ROM_BOOTIMG_STRUCT_SIZE
98
+ flags_pos = romimg_offset + BOOTIMG_FLAGS_OFFSET
99
+ romimg_flags = int.from_bytes(boot_blob[flags_pos : flags_pos + 4], "little")
100
+ if romimg_flags & BOOTIMG_FLAGS_TYPE_MASK == V2X_BOOTIMG_FLAG:
101
+ # skip V2X container
102
+ cont_index = 2
103
+ if boot_blob[cont_index * align + CONTAINER_TAG_OFFSET] != CONTAINER_TAG:
104
+ return len(boot_blob)
105
+
106
+ container_offset = cont_index * align
107
+ if boot_blob[container_offset + CONTAINER_TAG_OFFSET] != CONTAINER_TAG:
108
+ return len(boot_blob)
109
+ num_images = int(boot_blob[container_offset + CONTAINER_NUM_IMAGES_OFFSET])
86
110
  romimg_offset = (
87
111
  container_offset
88
112
  + ROM_CONTAINER_STRUCT_SIZE
89
113
  + (num_images - 1) * ROM_BOOTIMG_STRUCT_SIZE
90
114
  )
115
+ # a boot image struct starts with its image offset and size fields
91
116
  img_offset = int.from_bytes(boot_blob[romimg_offset : romimg_offset + 4], "little")
92
- img_size = int.from_bytes(
93
- boot_blob[romimg_offset + 4 : romimg_offset + 8], "little"
94
- )
95
- container_size = img_offset + img_size + cont_index * CONTAINER_HDR_ALIGNMENT
117
+ size_pos = romimg_offset + BOOTIMG_IMAGE_SIZE_OFFSET
118
+ img_size = int.from_bytes(boot_blob[size_pos : size_pos + 4], "little")
119
+ container_size = img_offset + img_size + container_offset
96
120
  # round container size up
97
121
  container_size = (
98
122
  ceil(container_size / (1.0 * CONTAINER_HDR_ALIGNMENT)) * CONTAINER_HDR_ALIGNMENT
@@ -100,6 +100,10 @@ def drop_images(boot_bin: bytearray, keep_images):
100
100
 
101
101
  img_table_offset = find_img_table(boot_bin)
102
102
  img_table = ZynqMPImageTable.read(boot_bin, img_table_offset)
103
+ if img_table.auth_cert != 0:
104
+ raise ValueError(
105
+ "Cannot extract FSBL stage from a signed image, provide a custom FSBL image"
106
+ )
103
107
 
104
108
  kept_images = []
105
109
  next_image = 4 * img_table.image_hdr
@@ -28,6 +28,7 @@ HID features are required.
28
28
  from snagrecover.utils import prettify_usb_addr
29
29
  import glob
30
30
  import usb
31
+ import errno
31
32
  import os
32
33
  import platform
33
34
  import select
@@ -111,7 +112,7 @@ class HIDDevice:
111
112
 
112
113
  return hidraw_path
113
114
 
114
- def __init__(self, usb_dev: usb.core.Device):
115
+ def __init__(self, usb_dev: usb.core.Device, prefer_libusb: bool = False):
115
116
  pretty_addr = prettify_usb_addr((usb_dev.bus, usb_dev.port_numbers))
116
117
  if not is_hid(usb_dev):
117
118
  raise IOError(f"Device {pretty_addr}, is USB but not HID!")
@@ -135,9 +136,11 @@ class HIDDevice:
135
136
  )
136
137
  self.usb_dev.set_configuration(self.main_cfg.bConfigurationValue)
137
138
 
138
- if platform.system() == "Linux" and self.usb_dev.is_kernel_driver_active(
139
- self.main_intf.bInterfaceNumber
140
- ):
139
+ kernel_driver_active = platform.system() == "Linux" and (
140
+ self.usb_dev.is_kernel_driver_active(self.main_intf.bInterfaceNumber)
141
+ )
142
+
143
+ if kernel_driver_active and not prefer_libusb:
141
144
  # The kernel driver in question should be usbhid
142
145
  hidraw_path = self.get_hidraw_device()
143
146
  if hidraw_path is None:
@@ -151,6 +154,9 @@ class HIDDevice:
151
154
  logger.info(f"HID device {pretty_addr} has hidraw dev {hidraw_path}")
152
155
 
153
156
  else:
157
+ if kernel_driver_active:
158
+ self.usb_dev.detach_kernel_driver(self.main_intf.bInterfaceNumber)
159
+
154
160
  # This case is for systems which don't
155
161
  # have usbhid loaded for some reason.
156
162
  # It is also suitable for Windows. if
@@ -230,7 +236,15 @@ class HIDDevice:
230
236
  if self.hidraw:
231
237
  self.hidraw.close()
232
238
  else:
233
- usb.util.release_interface(self.usb_dev, self.main_intf.bInterfaceNumber)
239
+ try:
240
+ usb.util.release_interface(
241
+ self.usb_dev, self.main_intf.bInterfaceNumber
242
+ )
243
+ except usb.USBError as err:
244
+ # the device may already be gone (re-enumerated after jumping to firmware)
245
+ # and don't silently ignore any other errors
246
+ if err.errno != errno.ENODEV:
247
+ raise
234
248
 
235
249
  def hidraw_read(self, length: int, timeout: int):
236
250
  r, w, e = select.select([self.hidraw], [], [], timeout)
@@ -244,7 +258,7 @@ class HIDDevice:
244
258
  def libusb_write(self, data: bytes):
245
259
  # Use Interrupt OUT endpoint if available
246
260
  if self.intr_out:
247
- return self.usb_dev.write(self.intr_out, data)
261
+ return self.usb_dev.write(self.intr_out, data, timeout=5000)
248
262
 
249
263
  report_id = data[0]
250
264
  self.set_report(report_id, data)
@@ -362,7 +362,15 @@ class SDPCommand:
362
362
  """
363
363
  logger.info(f"SDPS write with parameters size:0x{size:x} offset:0x00")
364
364
  soc_model = recovery_config["soc_model"]
365
- if soc_model not in ["imx8qm", "imx8qxp", "imx815", "imx865", "imx91", "imx93"]:
365
+ if soc_model not in [
366
+ "imx8qm",
367
+ "imx8qxp",
368
+ "imx815",
369
+ "imx865",
370
+ "imx91",
371
+ "imx93",
372
+ "imx95",
373
+ ]:
366
374
  # only some mpu models require a preliminary command before the report 2
367
375
  # transfer
368
376
  packet1_arr = bytearray(b"\x01") # report 1
@@ -376,14 +384,26 @@ class SDPCommand:
376
384
  packet1_arr += b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" # reserved
377
385
  packet1 = bytes(packet1_arr)
378
386
  self.dev.write(packet1)
379
- if soc_model in ["imx815", "imx865", "imx91", "imx93"]:
387
+ if soc_model in ["imx815", "imx865", "imx91", "imx93", "imx95"]:
380
388
  transfer_size = 1020
381
389
  else:
382
390
  transfer_size = 1024
383
391
 
392
+ sent = 0
384
393
  for chunk in utils.dnload_iter(blob[0:size], transfer_size):
385
394
  packet2 = b"\x02" + chunk
386
- self.dev.write(packet2)
395
+ try:
396
+ self.dev.write(packet2)
397
+ except USBError:
398
+ # i.MX95's ROM re-enumerates once it has the first container, aborting the last transfer
399
+ if sent >= size - transfer_size:
400
+ logger.debug(
401
+ f"Device re-enumerated after {sent}/{size} bytes, "
402
+ "assuming first stage was accepted"
403
+ )
404
+ break
405
+ raise
406
+ sent += len(chunk)
387
407
  """
388
408
  self.check_hab()
389
409
  complete_status = self.dev.read(64, timeout=5)[:4]
@@ -74,6 +74,7 @@ sdps_socs = [
74
74
  "imx865",
75
75
  "imx91",
76
76
  "imx93",
77
+ "imx95",
77
78
  ]
78
79
 
79
80
  # SoCs that use raw bulk endpoints rather than HID
@@ -145,18 +146,21 @@ def main():
145
146
  soc_model = recovery_config["soc_model"]
146
147
  usb_dev = get_usb(recovery_config["usb_path"])
147
148
 
149
+ # i.MX95 needs the libusb backend to reach its interrupt OUT endpoint
150
+ prefer_libusb = soc_model == "imx95"
151
+
148
152
  if soc_model in raw_bulk_ep_socs:
149
153
  sdp_cmd = SDPCommand(build_raw_ep_dev(usb_dev))
150
154
  else:
151
- sdp_cmd = SDPCommand(HIDDevice(usb_dev))
155
+ sdp_cmd = SDPCommand(HIDDevice(usb_dev, prefer_libusb=prefer_libusb))
152
156
 
153
157
  rom_path = (usb_dev.bus, usb_dev.port_numbers)
154
158
  rom_devnum = usb_dev.address
155
159
 
156
160
  if soc_model in sdps_socs:
157
161
  run_firmware(sdp_cmd, "flash-bin", "spl-sdps")
158
- # On some SoCs (e.g.: i.MX8QM) we can have a second stage based on SPDV
159
- if soc_model not in ["imx8qm", "imx8qxp"]:
162
+ # On some SoCs (e.g.: i.MX8QM, i.MX95) we can have a second stage based on SPDV
163
+ if soc_model not in ["imx8qm", "imx8qxp", "imx95"]:
160
164
  return None
161
165
  elif "u-boot-with-dcd" in recovery_config["firmware"]:
162
166
  run_firmware(sdp_cmd, "u-boot-with-dcd")
@@ -185,10 +189,10 @@ def main():
185
189
  if usb_dev is None:
186
190
  access_error("SPL USB HID", f"{prettify_usb_addr(rom_path)}")
187
191
 
188
- sdp_cmd = SDPCommand(HIDDevice(usb_dev))
192
+ sdp_cmd = SDPCommand(HIDDevice(usb_dev, prefer_libusb=prefer_libusb))
189
193
  # MX8 boot images are more complicated to generate so we allow everything to be
190
194
  # packaged in a single blob
191
- if "imx8" in soc_model:
195
+ if "imx8" in soc_model or soc_model == "imx95":
192
196
  if not dev_uses_sdpv(usb_dev):
193
197
  raise Exception(
194
198
  "Error: The installed SPL version does not support autofinding U-Boot"
@@ -58,6 +58,8 @@ tested:
58
58
  family: imx
59
59
  imx93:
60
60
  family: imx
61
+ imx95:
62
+ family: imx
61
63
  keembay:
62
64
  family: keembay
63
65
  r8:
@@ -0,0 +1,2 @@
1
+ flash-bin:
2
+ path: imx-boot
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes