imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset
Subsystems (3)
Fabio Estevam
reviewerPATCH 1/3 imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset
From: Eduard Strehlau <[email protected]>
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.
--- arch/arm/mach-imx/hab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/hab.c +1 -1
@@ -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; }
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 2/3 imx: hab: Improve the hab_auth_img_or_fail usage text
From: Fabio Estevam <[email protected]>
Split the hab_auth_img_or_fail usage text in two sentences to make it clearer.
--- arch/arm/mach-imx/hab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-imx/hab.c +1 -1
@@ -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"
Signature · 1 line
2.34.1
Fabio Estevam
reviewerPATCH 3/3 imx: hab: Explain that ivt_offset is optional
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
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.
--- arch/arm/mach-imx/hab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-imx/hab.c +2 -2
@@ -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(
Signature · 1 line
2.34.1
PATCH 1/3 imx: hab: Allow hab_auth_img_or_fail to be called without ivt_offset
In reply to Fabio EstevamQuoted 11 lines
From: Eduard Strehlau <[email protected]>
Since commitea91031b2232("imx: hab: extendhab_auth_imgto calculateivt_offset"), it is possible to call thehab_auth_imgcommand without the lastivt_offsetargument.
Currently, callinghab_auth_img_or_failwithout the lastivt_offsetparameter causes a failure and the command usage text is shown. Fix this problem by adjusting the argc logic to allow
callinghab_auth_img_or_failwith only the address and size parameters. This way, bothhab_auth_imgandhab_auth_img_or_failhave the same behavior with respect to the allowed number of command parameters.
Quoted 2 lines
Signed-off-by Eduard Strehlau <[email protected]>Signed-off-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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: [email protected] =====================================================================
PATCH 2/3 imx: hab: Improve the hab_auth_img_or_fail usage text
In reply to Fabio EstevamQuoted 4 lines
From: Fabio Estevam <[email protected]>
Split thehab_auth_img_or_failusage text in two sentences to make it clearer.Signed-off-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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: [email protected] =====================================================================
PATCH 3/3 imx: hab: Explain that ivt_offset is optional
In reply to Fabio EstevamQuoted 5 lines
From: Fabio Estevam <[email protected]>
Theivt_offsetparameter is optional for bothhab_auth_img_or_failandhab_auth_imgcommands.
Document it in their usage texts to make it clearer.Signed-off-by Fabio Estevam <[email protected]>
Applied to u-boot-imx, master, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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: [email protected] =====================================================================