* [PATCH 1/3] imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset
@ 2023-09-07 1:47 Fabio Estevam
2023-09-07 1:47 ` [PATCH 2/3] imx: hab: Improve the hab_auth_img_or_fail usage text Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Fabio Estevam @ 2023-09-07 1:47 UTC (permalink / raw)
To: sbabic; +Cc: uboot-imx, u-boot, Eduard Strehlau, Fabio Estevam
From: Eduard Strehlau <eduard@lionizers.com>
Since commit ea91031b2232 ("imx: hab: extend hab_auth_img to calculate
ivt_offset"), it is possible to call the hab_auth_img command without the
last ivt_offset argument.
Currently, calling hab_auth_img_or_fail without the last
ivt_offset parameter causes a failure and the command usage text is shown.
Fix this problem by adjusting the argc logic to allow
calling hab_auth_img_or_fail with only the address and size parameters.
This way, both hab_auth_img and hab_auth_img_or_fail have the same
behavior with respect to the allowed number of command parameters.
Signed-off-by: Eduard Strehlau <eduard@lionizers.com>
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
arch/arm/mach-imx/hab.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index 439cdaf07a7c..6cacca069d9f 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -659,7 +659,7 @@ static int do_authenticate_image_or_failover(struct cmd_tbl *cmdtp, int flag,
{
int ret = CMD_RET_FAILURE;
- if (argc != 4) {
+ if (argc < 3) {
ret = CMD_RET_USAGE;
goto error;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] imx: hab: Improve the hab_auth_img_or_fail usage text
2023-09-07 1:47 [PATCH 1/3] imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset Fabio Estevam
@ 2023-09-07 1:47 ` Fabio Estevam
2023-09-23 18:51 ` sbabic
2023-09-07 1:47 ` [PATCH 3/3] imx: hab: Explain that ivt_offset is optional Fabio Estevam
2023-09-23 18:51 ` [PATCH 1/3] imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset sbabic
2 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2023-09-07 1:47 UTC (permalink / raw)
To: sbabic; +Cc: uboot-imx, u-boot, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
Split the hab_auth_img_or_fail usage text in two sentences to make it
clearer.
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
arch/arm/mach-imx/hab.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index 6cacca069d9f..ea9c5d3c9fd4 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -712,7 +712,7 @@ U_BOOT_CMD(
U_BOOT_CMD(
hab_auth_img_or_fail, 4, 0,
do_authenticate_image_or_failover,
- "authenticate image via HAB on failure drop to USB BootROM mode",
+ "authenticate image via HAB. Switch to USB BootROM mode on failure",
"addr length ivt_offset\n"
"addr - image hex address\n"
"length - image hex length\n"
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] imx: hab: Improve the hab_auth_img_or_fail usage text
2023-09-07 1:47 ` [PATCH 2/3] imx: hab: Improve the hab_auth_img_or_fail usage text Fabio Estevam
@ 2023-09-23 18:51 ` sbabic
0 siblings, 0 replies; 6+ messages in thread
From: sbabic @ 2023-09-23 18:51 UTC (permalink / raw)
To: Fabio Estevam, u-boot
> From: Fabio Estevam <festevam@denx.de>
> Split the hab_auth_img_or_fail usage text in two sentences to make it
> clearer.
> Signed-off-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] imx: hab: Explain that ivt_offset is optional
2023-09-07 1:47 [PATCH 1/3] imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset Fabio Estevam
2023-09-07 1:47 ` [PATCH 2/3] imx: hab: Improve the hab_auth_img_or_fail usage text Fabio Estevam
@ 2023-09-07 1:47 ` Fabio Estevam
2023-09-23 18:52 ` sbabic
2023-09-23 18:51 ` [PATCH 1/3] imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset sbabic
2 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2023-09-07 1:47 UTC (permalink / raw)
To: sbabic; +Cc: uboot-imx, u-boot, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
The ivt_offset parameter is optional for both hab_auth_img_or_fail
and hab_auth_img commands.
Document it in their usage texts to make it clearer.
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
arch/arm/mach-imx/hab.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-imx/hab.c b/arch/arm/mach-imx/hab.c
index ea9c5d3c9fd4..41121d575734 100644
--- a/arch/arm/mach-imx/hab.c
+++ b/arch/arm/mach-imx/hab.c
@@ -700,7 +700,7 @@ U_BOOT_CMD(
"addr length ivt_offset\n"
"addr - image hex address\n"
"length - image hex length\n"
- "ivt_offset - hex offset of IVT in the image"
+ "ivt_offset - hex offset of IVT in the image (optional)"
);
U_BOOT_CMD(
@@ -716,7 +716,7 @@ U_BOOT_CMD(
"addr length ivt_offset\n"
"addr - image hex address\n"
"length - image hex length\n"
- "ivt_offset - hex offset of IVT in the image"
+ "ivt_offset - hex offset of IVT in the image (optional)"
);
U_BOOT_CMD(
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] imx: hab: Explain that ivt_offset is optional
2023-09-07 1:47 ` [PATCH 3/3] imx: hab: Explain that ivt_offset is optional Fabio Estevam
@ 2023-09-23 18:52 ` sbabic
0 siblings, 0 replies; 6+ messages in thread
From: sbabic @ 2023-09-23 18:52 UTC (permalink / raw)
To: Fabio Estevam, u-boot
> From: Fabio Estevam <festevam@denx.de>
> The ivt_offset parameter is optional for both hab_auth_img_or_fail
> and hab_auth_img commands.
> Document it in their usage texts to make it clearer.
> Signed-off-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset
2023-09-07 1:47 [PATCH 1/3] imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset Fabio Estevam
2023-09-07 1:47 ` [PATCH 2/3] imx: hab: Improve the hab_auth_img_or_fail usage text Fabio Estevam
2023-09-07 1:47 ` [PATCH 3/3] imx: hab: Explain that ivt_offset is optional Fabio Estevam
@ 2023-09-23 18:51 ` sbabic
2 siblings, 0 replies; 6+ messages in thread
From: sbabic @ 2023-09-23 18:51 UTC (permalink / raw)
To: Fabio Estevam, u-boot
> From: Eduard Strehlau <eduard@lionizers.com>
> Since commit ea91031b2232 ("imx: hab: extend hab_auth_img to calculate
> ivt_offset"), it is possible to call the hab_auth_img command without the
> last ivt_offset argument.
> Currently, calling hab_auth_img_or_fail without the last
> ivt_offset parameter causes a failure and the command usage text is shown.
> Fix this problem by adjusting the argc logic to allow
> calling hab_auth_img_or_fail with only the address and size parameters.
> This way, both hab_auth_img and hab_auth_img_or_fail have the same
> behavior with respect to the allowed number of command parameters.
>
> Signed-off-by: Eduard Strehlau <eduard@lionizers.com>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, 82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-09-23 18:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07 1:47 [PATCH 1/3] imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset Fabio Estevam
2023-09-07 1:47 ` [PATCH 2/3] imx: hab: Improve the hab_auth_img_or_fail usage text Fabio Estevam
2023-09-23 18:51 ` sbabic
2023-09-07 1:47 ` [PATCH 3/3] imx: hab: Explain that ivt_offset is optional Fabio Estevam
2023-09-23 18:52 ` sbabic
2023-09-23 18:51 ` [PATCH 1/3] imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset sbabic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox