public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH v4 0/4] sunxi: TOC0 image type support
@ 2021-10-20  2:44 Samuel Holland
  2021-10-20  2:44 ` [PATCH v4 1/4] tools: Separate image types which depend on OpenSSL Samuel Holland
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Samuel Holland @ 2021-10-20  2:44 UTC (permalink / raw)
  To: u-boot, Jagan Teki, Andre Przywara
  Cc: Alex G ., Pali Rohár, Samuel Holland, Artem Lapkin,
	Priyanka Jain, Sughosh Ganu

This series adds support for the TOC0 image format used by the Allwinner
secure boot ROM (SBROM). This series has been tested on the following
SoCs/boards, with the eFuse burnt to enable secure mode:
 - A50: Ainol Q88 Tablet
 - A64: Pine A64 Plus
 - H5: Orange Pi Zero Plus
 - H6: Pine H64 Model B
 - H616: Orange Pi Zero 2

This time I also tested it on boards that are not switched to secure
mode (with A64, H3, and H5).

Due to both series changing Makefile.spl, the last patch depends on:
https://patchwork.ozlabs.org/project/uboot/list/?series=267136

Since this series no longer selects TOOLS_LIBCRYPTO anywhere, building
certain platforms/options may fail with an error like the following if
TOOLS_LIBCRYPTO is disabled:

    MKIMAGE spl/sunxi-spl.bin
  ./tools/mkimage: unsupported type Allwinner TOC0 Boot Image
  make[1]: *** [scripts/Makefile.spl:426: spl/sunxi-spl.bin] Error 1
  make: *** [Makefile:1982: spl/u-boot-spl] Error 2

Hopefully this is clear enough.

Changes in v4:
 - Do not select TOOLS_LIBCRYPTO anywhere

Changes in v3:
 - Selected TOOLS_LIBCRYPTO on all platforms that use kwbimage (as best
   as I can tell, using the suggestions from Pali Rohár)
 - Removed TOOLS_LIBCRYPTO selection for sunxi, since most boards
   do not need it
 - Added __packed to all new "ABI" structs
 - Added entry to MAINTAINERS for sunxi tools
 - Fixed offset of magic passed to memcmp
 - Refactored functions to not return pointers (fixes ambiguous NULL)

Changes in v2:
 - Refactored the first patch on top of TOOLS_LIBCRYPTO
 - Moved certificate and key item structures out of sunxi_image.h
 - Renamed "main" and "item" variables for clarity
 - Improved error messages, and added a hint about key generation
 - Added a comment explaining the purpose of the various key files
 - Mentioned testing this code on A50 in the commit message
 - Moved SPL header signature checks out of sunxi_image.h
 - Refactored SPL header signature checks to use fewer casts
 - Rebase on top of Icenowy's RISC-V support series
 - Rename Kconfig symbols to include the full image type name

Samuel Holland (4):
  tools: Separate image types which depend on OpenSSL
  tools: mkimage: Add Allwinner TOC0 support
  sunxi: Support SPL in both eGON and TOC0 images
  sunxi: Support building a SPL as a TOC0 image

 MAINTAINERS                           |   1 +
 arch/arm/include/asm/arch-sunxi/spl.h |   2 -
 arch/arm/mach-sunxi/Kconfig           |   2 +
 arch/arm/mach-sunxi/board.c           |  34 +-
 board/sunxi/Kconfig                   |  24 +
 common/image.c                        |   1 +
 include/image.h                       |   1 +
 include/sunxi_image.h                 |  37 ++
 scripts/Makefile.spl                  |   5 +-
 scripts/config_whitelist.txt          |   1 -
 tools/Makefile                        |  20 +-
 tools/mxsimage.c                      |   3 -
 tools/sunxi_toc0.c                    | 907 ++++++++++++++++++++++++++
 13 files changed, 1011 insertions(+), 27 deletions(-)
 create mode 100644 board/sunxi/Kconfig
 create mode 100644 tools/sunxi_toc0.c

-- 
2.32.0


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2021-10-28 15:45 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-20  2:44 [PATCH v4 0/4] sunxi: TOC0 image type support Samuel Holland
2021-10-20  2:44 ` [PATCH v4 1/4] tools: Separate image types which depend on OpenSSL Samuel Holland
2021-10-20  7:29   ` Pali Rohár
2021-10-20 13:29     ` Andre Przywara
2021-10-20 13:47       ` Pali Rohár
2021-10-20 14:14         ` Samuel Holland
2021-10-21 12:33           ` Marek Behún
2021-10-21 13:00           ` Marek Behún
2021-10-21 13:01             ` Pali Rohár
2021-10-22  1:25             ` Samuel Holland
2021-10-22 10:09             ` Heinrich Schuchardt
2021-10-22 14:59               ` Marek Behún
2021-10-22 15:09                 ` Tom Rini
2021-10-22 15:56                   ` Andre Przywara
2021-10-22 16:22                     ` Tom Rini
2021-10-22 16:47                       ` Vagrant Cascadian
2021-10-22 17:11                         ` Pali Rohár
2021-10-22 17:20                         ` Andre Przywara
2021-10-22 19:46                           ` Vagrant Cascadian
2021-10-27 17:11                             ` Tom Rini
2021-10-27 20:11                               ` Peter Robinson
2021-10-28 15:44                   ` Matthias Brugger
2021-10-20  2:44 ` [PATCH v4 2/4] tools: mkimage: Add Allwinner TOC0 support Samuel Holland
2021-10-20 23:49   ` Andre Przywara
2021-10-20  2:44 ` [PATCH v4 3/4] sunxi: Support SPL in both eGON and TOC0 images Samuel Holland
2021-10-20 23:49   ` Andre Przywara
2021-10-20  2:44 ` [PATCH v4 4/4] sunxi: Support building a SPL as a TOC0 image Samuel Holland
2021-10-20 23:50   ` Andre Przywara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox