[tiU23.04 PATCH 0/4] HS booting cleanup

Test results http://lcpdresults.itg.ti.com/launcher/results/14057
Cc: u-boot@lists.denx.de To: Hari Nagalla hnagalla@ti.com To: Vignesh Raghavendra vigneshr@ti.com To: Bryan Brattlof bb@ti.com Cc: Udit Kumar u-kumar1@ti.com Cc: Praneeth Bajjuri praneeth@ti.com Cc: Neha Malcom Francis n-francis@ti.com
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- Manorit Chawdhry (4): configs: remove explicit not set of setexpr configs: keep the bootcmd consistent across jacinto configs: j7*: remove saved environments configs: enable signed fit booting across all k3 socs
boot/Kconfig | 3 +-- configs/am62ax_evm_a53_defconfig | 2 ++ configs/am62x_evm_a53_defconfig | 2 ++ configs/am64x_evm_a53_defconfig | 2 ++ configs/j7200_evm_a72_defconfig | 8 ++++---- configs/j721e_evm_a72_defconfig | 7 +++---- configs/j721s2_evm_a72_defconfig | 9 ++++----- configs/j784s4_evm_a72_defconfig | 5 ++--- 8 files changed, 20 insertions(+), 18 deletions(-) --- base-commit: c22f1ee591f84ab28c025d7aed9ee10c7f0154c1 change-id: 20230515-b4-internal-setexpr-fix-1876f8cff5e4
Best regards,

Keeping this line in defconfigs doesn't allow the Kconfig values to be reflected, remove these to enabled use of setexpr used for fit image booting.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- configs/j7200_evm_a72_defconfig | 1 - configs/j721e_evm_a72_defconfig | 1 - configs/j721s2_evm_a72_defconfig | 1 - 3 files changed, 3 deletions(-)
diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig index b60eccf75a35..19670b0da3c1 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_evm_a72_defconfig @@ -78,7 +78,6 @@ CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_UFS=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_CMD_EXT4_WRITE=y CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus" diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig index 645c5b45e9c5..1b0358a642c2 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -76,7 +76,6 @@ CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_UFS=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_CMD_EXT4_WRITE=y CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus" diff --git a/configs/j721s2_evm_a72_defconfig b/configs/j721s2_evm_a72_defconfig index 15ce93959de4..884e2f5fe38b 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_evm_a72_defconfig @@ -77,7 +77,6 @@ CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_UFS=y CONFIG_CMD_USB=y CONFIG_CMD_USB_MASS_STORAGE=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_CMD_EXT4_WRITE=y CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"

Since moving towards distroboot, we need a way to boot using the legacy methods too so keep the bootcmd consistent across devices to keep both the flows running.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- configs/j7200_evm_a72_defconfig | 2 +- configs/j721e_evm_a72_defconfig | 2 +- configs/j721s2_evm_a72_defconfig | 2 +- configs/j784s4_evm_a72_defconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig index 19670b0da3c1..3982e6a8b53e 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_evm_a72_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_DISTRO_DEFAULTS=y -CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;" +CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; run distro_bootcmd" CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig index 1b0358a642c2..32dc4366fa84 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -31,7 +31,7 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_DISTRO_DEFAULTS=y -CONFIG_BOOTCOMMAND="run findfdt; run distro_bootcmd; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;" +CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; run distro_bootcmd" CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/configs/j721s2_evm_a72_defconfig b/configs/j721s2_evm_a72_defconfig index 884e2f5fe38b..75b1ce761c94 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_evm_a72_defconfig @@ -31,7 +31,7 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_DISTRO_DEFAULTS=y -CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi;" +CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; run distro_bootcmd" CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/configs/j784s4_evm_a72_defconfig b/configs/j784s4_evm_a72_defconfig index 9c4bda4fac43..fd61c9f43123 100644 --- a/configs/j784s4_evm_a72_defconfig +++ b/configs/j784s4_evm_a72_defconfig @@ -34,7 +34,7 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 # CONFIG_USE_SPL_FIT_GENERATOR is not set CONFIG_OF_BOARD_SETUP=y -CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; setenv fdtfile ti/${name_fdt}; fi; run distro_bootcmd" +CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; run distro_bootcmd" CONFIG_FIT_SIGNATURE=y CONFIG_RSA=y CONFIG_LOGLEVEL=7

Having saved environments usually causes inconsistencies while development workflow. The saved environments conflict with the default ones that uboot should be updating while development but that doesn't happen and the saved environments need to be reset during bootups to test the changes causing extra debugs.
Remove the saved environments as a default.
( Uenv.txt can be used optionally as a replacement for saved environments )
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- configs/j7200_evm_a72_defconfig | 3 +-- configs/j721e_evm_a72_defconfig | 2 -- configs/j721s2_evm_a72_defconfig | 4 +--- configs/j784s4_evm_a72_defconfig | 3 +-- 4 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig index 3982e6a8b53e..98dfbe6cac3a 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_evm_a72_defconfig @@ -89,8 +89,7 @@ CONFIG_OF_CONTROL=y CONFIG_SPL_OF_CONTROL=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_IS_NOWHERE=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig index 32dc4366fa84..b3a855c6ba22 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -90,9 +90,7 @@ CONFIG_OF_LIST="k3-j721e-common-proc-board k3-j721e-sk" CONFIG_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y -CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_NOWHERE=y -CONFIG_ENV_IS_IN_FAT=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" CONFIG_SYS_RELOC_GD_ENV_ADDR=y diff --git a/configs/j721s2_evm_a72_defconfig b/configs/j721s2_evm_a72_defconfig index 75b1ce761c94..4928f42af630 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_evm_a72_defconfig @@ -89,10 +89,8 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_LIST="k3-j721s2-common-proc-board k3-am68-sk-base-board" CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_FAT=y +CONFIG_ENV_IS_NOWHERE=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y -CONFIG_ENV_FAT_DEVICE_AND_PART="1:1" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM=y diff --git a/configs/j784s4_evm_a72_defconfig b/configs/j784s4_evm_a72_defconfig index fd61c9f43123..2f87d8c1be5b 100644 --- a/configs/j784s4_evm_a72_defconfig +++ b/configs/j784s4_evm_a72_defconfig @@ -94,8 +94,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_OF_LIST="k3-j784s4-evm" CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y -CONFIG_ENV_OVERWRITE=y -CONFIG_ENV_IS_IN_MMC=y +CONFIG_ENV_IS_NOWHERE=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RANDOM_ETHADDR=y

We are moving towards the standard fit signature booting that requires the following configs to be enabled, enable them in all k3 socs to allow signed fit booting.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- boot/Kconfig | 3 +-- configs/am62ax_evm_a53_defconfig | 2 ++ configs/am62x_evm_a53_defconfig | 2 ++ configs/am64x_evm_a53_defconfig | 2 ++ configs/j7200_evm_a72_defconfig | 2 ++ configs/j721e_evm_a72_defconfig | 2 ++ configs/j721s2_evm_a72_defconfig | 2 ++ 7 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/boot/Kconfig b/boot/Kconfig index b23959900cc6..359cd516e951 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -125,8 +125,7 @@ config FIT_BEST_MATCH config FIT_IMAGE_POST_PROCESS bool "Enable post-processing of FIT artifacts after loading by U-Boot" depends on FIT - depends on TI_SECURE_DEVICE || SOCFPGA_SECURE_VAB_AUTH - default y if TI_SECURE_DEVICE && !FIT_SIGNATURE + depends on SOCFPGA_SECURE_VAB_AUTH help Allows doing any sort of manipulation to blobs after they got extracted from FIT images like stripping off headers or modifying the size of the diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig index 10c9d5268c84..b09acf436d57 100644 --- a/configs/am62ax_evm_a53_defconfig +++ b/configs/am62ax_evm_a53_defconfig @@ -41,6 +41,8 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y +CONFIG_FIT_SIGNATURE=y +CONFIG_RSA=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y CONFIG_REGMAP=y diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig index 604df4729217..f4769b72f8cd 100644 --- a/configs/am62x_evm_a53_defconfig +++ b/configs/am62x_evm_a53_defconfig @@ -29,6 +29,8 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; setenv fdtfile ti/${name_fdt}; run distro_bootcmd" +CONFIG_FIT_SIGNATURE=y +CONFIG_RSA=y CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x80a00000 diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index e5812a2aa4a5..dd4212878997 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -35,6 +35,8 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run run_kern" +CONFIG_FIT_SIGNATURE=y +CONFIG_RSA=y CONFIG_BOARD_LATE_INIT=y CONFIG_SPL_MAX_SIZE=0x180000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig index 98dfbe6cac3a..699cdbe170b3 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_evm_a72_defconfig @@ -34,6 +34,8 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; run distro_bootcmd" +CONFIG_FIT_SIGNATURE=y +CONFIG_RSA=y CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig index b3a855c6ba22..d9c988381b5d 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -32,6 +32,8 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run main_cpsw0_qsgmii_phyinit; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; run distro_bootcmd" +CONFIG_FIT_SIGNATURE=y +CONFIG_RSA=y CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/configs/j721s2_evm_a72_defconfig b/configs/j721s2_evm_a72_defconfig index 4928f42af630..10c4f7662e40 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_evm_a72_defconfig @@ -32,6 +32,8 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_DISTRO_DEFAULTS=y CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run boot_rprocs; if test ${boot_fit} -eq 1; then run get_fit_${boot}; run get_overlaystring; run run_fit; else; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern; fi; run distro_bootcmd" +CONFIG_FIT_SIGNATURE=y +CONFIG_RSA=y CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y

Kindly ignore the series
Regards,
Manorit
________________________________ From: Chawdhry, Manorit Sent: Wednesday, May 17, 2023 10:31:42 AM To: Nagalla, Hari; Raghavendra, Vignesh; Brattlof, Bryan Cc: Chawdhry, Manorit; u-boot@lists.denx.de; Kumar, Udit; Bajjuri, Praneeth; Francis, Neha Subject: [tiU23.04 PATCH 0/4] HS booting cleanup
Test results http://lcpdresults.itg.ti.com/launcher/results/14057
Cc: u-boot@lists.denx.de To: Hari Nagalla hnagalla@ti.com To: Vignesh Raghavendra vigneshr@ti.com To: Bryan Brattlof bb@ti.com Cc: Udit Kumar u-kumar1@ti.com Cc: Praneeth Bajjuri praneeth@ti.com Cc: Neha Malcom Francis n-francis@ti.com
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- Manorit Chawdhry (4): configs: remove explicit not set of setexpr configs: keep the bootcmd consistent across jacinto configs: j7*: remove saved environments configs: enable signed fit booting across all k3 socs
boot/Kconfig | 3 +-- configs/am62ax_evm_a53_defconfig | 2 ++ configs/am62x_evm_a53_defconfig | 2 ++ configs/am64x_evm_a53_defconfig | 2 ++ configs/j7200_evm_a72_defconfig | 8 ++++---- configs/j721e_evm_a72_defconfig | 7 +++---- configs/j721s2_evm_a72_defconfig | 9 ++++----- configs/j784s4_evm_a72_defconfig | 5 ++--- 8 files changed, 20 insertions(+), 18 deletions(-) --- base-commit: c22f1ee591f84ab28c025d7aed9ee10c7f0154c1 change-id: 20230515-b4-internal-setexpr-fix-1876f8cff5e4
Best regards, -- Manorit Chawdhry m-chawdhry@ti.com
participants (2)
-
Chawdhry, Manorit
-
Manorit Chawdhry