Skip to contentSkip to conversation

sunxi: a64: Add verified-boot support

PATCH New Jagan Teki 2 participants 3 messages Nov 7, 2017 – Nov 8, 2017

Subsystems (3)
lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 1/1 sunxi: a64: Add verified-boot support

Enable verified-boot support for sunxi a64, tested the same in orangepi boards.

---
 arch/arm/mach-sunxi/Kconfig    | 2 ++
 include/configs/sunxi-common.h | 2 ++
 2 files changed, 4 insertions(+)
arch/arm/mach-sunxi/Kconfig +2 -0
index 09cfec6..cf6b264 100644
@@ -178,6 +178,8 @@ config MACH_SUN50I
 	select SUNXI_DRAM_DW
 	select SUNXI_DRAM_DW_32BIT
 	select FIT
+	select FIT_SIGNATURE
+	select FIT_VERBOSE
 	select SPL_LOAD_FIT
 
 config MACH_SUN50I_H5
include/configs/sunxi-common.h +2 -0
index 4207398..921eb4f 100644
@@ -34,6 +34,8 @@
 
 #ifdef CONFIG_ARM64
 #define CONFIG_BUILD_TARGET "u-boot.itb"
+/* Extend size of kernel image for uncompression */
+#define CONFIG_SYS_BOOTM_LEN	(60 * 1024 * 1024)
 #endif
 
 /* Serial & console */
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 sunxi: a64: Add verified-boot support

Hi,

Quoted 4 lines · Jagan Teki

Enable verified-boot support for sunxi a64, tested the same in orangepi boards.

How was it tested? Can you write some documentation for it?

Quoted 10 lines
---
 arch/arm/mach-sunxi/Kconfig    | 2 ++
 include/configs/sunxi-common.h | 2 ++
 2 files changed, 4 insertions(+)
arch/arm/mach-sunxi/Kconfig +0 -0
index 09cfec6..cf6b264 100644

arch/arm/mach-sunxi/Kconfig config MACH_SUN50I · line 181

Quoted 4 lines
arch/arm/mach-sunxi/Kconfig +1 -0
@@ -178,6 +178,8 @@ config MACH_SUN50I
 	select SUNXI_DRAM_DW
 	select SUNXI_DRAM_DW_32BIT
 	select FIT
+	select FIT_SIGNATURE

I'd rather not select it, given the recent issues with the binary size, and the fact that this has been tested only on one, quite recent, SoC so far.

How about an imply? or a default y?

arch/arm/mach-sunxi/Kconfig config MACH_SUN50I · line 182

Quoted 1 line
arch/arm/mach-sunxi/Kconfig +1 -0
+	select FIT_VERBOSE

Why do you need this?

include/configs/sunxi-common.h line 38

Quoted 13 lines
arch/arm/mach-sunxi/Kconfig +0 -0
 	select SPL_LOAD_FIT
 
 config MACH_SUN50I_H5
include/configs/sunxi-common.h +2 -0
index 4207398..921eb4f 100644
@@ -34,6 +34,8 @@
 
 #ifdef CONFIG_ARM64
 #define CONFIG_BUILD_TARGET "u-boot.itb"
+/* Extend size of kernel image for uncompression */
+#define CONFIG_SYS_BOOTM_LEN	(60 * 1024 * 1024)

I thought the arm64 kernels were uncompressed?

That should probably be in a separate patch anyway.

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171108/f6d2a43b/attachment.sig>
author
#2 lore raw

PATCH 1/1 sunxi: a64: Add verified-boot support

Quoted 9 lines · Maxime Ripard

Hi,

Quoted 4 lines · Jagan Teki

Enable verified-boot support for sunxi a64, tested the same in orangepi boards.

How was it tested? Can you write some documentation for it?

Thought of adding the same, will add in next version.

Quoted 20 lines
Quoted 11 lines
---
 arch/arm/mach-sunxi/Kconfig    | 2 ++
 include/configs/sunxi-common.h | 2 ++
 2 files changed, 4 insertions(+)
arch/arm/mach-sunxi/Kconfig +0 -0
index 09cfec6..cf6b264 100644

arch/arm/mach-sunxi/Kconfig config MACH_SUN50I · line 181

Quoted 4 lines
arch/arm/mach-sunxi/Kconfig +1 -0
@@ -178,6 +178,8 @@ config MACH_SUN50I
      select SUNXI_DRAM_DW
      select SUNXI_DRAM_DW_32BIT
      select FIT
+     select FIT_SIGNATURE

I'd rather not select it, given the recent issues with the binary size, and the fact that this has been tested only on one, quite recent, SoC so far.

Quoted 5 lines

How about an imply? or a default y?

arch/arm/mach-sunxi/Kconfig config MACH_SUN50I · line 182

Quoted 1 line
arch/arm/mach-sunxi/Kconfig +1 -0
+     select FIT_VERBOSE

Why do you need this?

I usually used this(even with other SOC) for debug messages if FIT image fail to load.

Quoted 10 lines
Quoted 10 lines
arch/arm/mach-sunxi/Kconfig +0 -0
      select SPL_LOAD_FIT
 
 config MACH_SUN50I_H5
include/configs/sunxi-common.h +0 -0
index 4207398..921eb4f 100644
@@ -34,6 +34,8 @@
 
Quoted 6 lines

include/configs/sunxi-common.h line 38

Quoted 4 lines
include/configs/sunxi-common.h +2 -0
 #ifdef CONFIG_ARM64
 #define CONFIG_BUILD_TARGET "u-boot.itb"
+/* Extend size of kernel image for uncompression */
+#define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024)

I thought the arm64 kernels were uncompressed?

I've tested with Image.gz

Quoted 2 lines

That should probably be in a separate patch anyway.

Yes, will send in it another patch.

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.