Browse Source

smegw01: Fix inverted CONFIG_SYS_BOOT_LOCKED logic

CONFIG_SYS_BOOT_LOCKED means that a restricted boot environment will
be used. In this case, hab_auth_img_or_fail should be called to prevent
U-Boot to continue running when the fitImage authentication fails.

Fix the logic accordingly.

Additionally, select CONFIG_SYS_BOOT_LOCKED by default.

Signed-off-by: Eduard Strehlau <eduard@lionizers.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Eduard Strehlau 8 months ago
parent
commit
fa5bde3760
2 changed files with 3 additions and 3 deletions
  1. 2 2
      board/storopack/smegw01/smegw01.env
  2. 1 1
      configs/smegw01_defconfig

+ 2 - 2
board/storopack/smegw01/smegw01.env

@@ -67,9 +67,9 @@ mmcboot=
 		run altbootcmd;
 	fi;
 #ifdef CONFIG_SYS_BOOT_LOCKED
-	hab_auth_img ${fileaddr} ${filesize};
-#else
 	hab_auth_img_or_fail ${fileaddr} ${filesize};
+#else
+	hab_auth_img ${fileaddr} ${filesize};
 #endif
 	run mmcargs;
 	if bootm; then

+ 1 - 1
configs/smegw01_defconfig

@@ -7,7 +7,7 @@ CONFIG_ENV_OFFSET=0x100000
 CONFIG_DM_GPIO=y
 CONFIG_DEFAULT_DEVICE_TREE="imx7d-smegw01"
 CONFIG_TARGET_SMEGW01=y
-# CONFIG_SYS_BOOT_LOCKED is not set
+CONFIG_SYS_BOOT_LOCKED=y
 CONFIG_ENV_OFFSET_REDUND=0x110000
 CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
 # CONFIG_ARMV7_VIRT is not set