On Sun, 20 Jun 2021 21:55:51 -0500 Samuel Holland <sam...@sholland.org> wrote:
(CC:ing Tom and Simon for the compatibility problem below) Hi, > 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: > - A64: Pine A64 Plus > - H5: Orange Pi Zero Plus > - H6: Pine H64 Model B > - H616: Orange Pi Zero 2 many thanks for sending this. In general this looks good (will do a more thorough review soon), just one thing that bothered me: This requires OpenSLL 1.1.x. There is nothing really wrong about this, but my (admittedly not the freshest) Slackware, but also long term distros like RHEL/CentOS (<=7), still come with 1.0.x (headers) only. I was wondering how important this is? I have the impression that embedded developers sometimes use old^Wstable systems, so some people might be bitten by it. I think in this case it will affect all user trying to build mkimage, regardless of the target platform? So I wanted to know what to do here? - Can we provide some kind of compatibility support? OpenSSL seems to provide something: https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes#Compatibility_Layer Haven't tested that fully yet, just downloading that tarball does not seem to cut it (or is missing files?). I guess one needs to copy&paste some code from the Wiki? - Shall we detect missing v1.1.x support (via #if OPENSSL_VERSION_NUMBER < 0x10100000L) and disable just sunxi_toc0 support in this case? Grateful for any opinions. Cheers, Andre > > Samuel Holland (4): > tools: Refactor mkimage linking with OpenSSL > tools: mkimage: Add Allwinner TOC0 support > sunxi: Support both SPL image types > sunxi: Support building a SPL as a TOC0 image > > arch/arm/Kconfig | 1 + > arch/arm/include/asm/arch-sunxi/spl.h | 2 - > arch/arm/mach-imx/mxs/Kconfig | 2 + > arch/arm/mach-mvebu/Kconfig | 1 + > arch/arm/mach-sunxi/Kconfig | 2 + > arch/arm/mach-sunxi/board.c | 20 +- > board/sunxi/Kconfig | 24 + > common/Kconfig.boot | 2 + > common/image.c | 1 + > include/image.h | 1 + > include/sunxi_image.h | 205 ++++++++ > scripts/Makefile.spl | 3 +- > scripts/config_whitelist.txt | 1 - > tools/Kconfig | 3 + > tools/Makefile | 23 +- > tools/mxsimage.c | 3 - > tools/sunxi_toc0.c | 710 ++++++++++++++++++++++++++ > 17 files changed, 976 insertions(+), 28 deletions(-) > create mode 100644 board/sunxi/Kconfig > create mode 100644 tools/sunxi_toc0.c >