[PATCH 00/18] K3 HS Support along with fixes

The series focuses on fixes for various boards along with moving to standards and enabling the FIT_SIGNATURE for K3 Platforms towards the end.
Dependencies: https://lore.kernel.org/u-boot/20230712183453.7623-1-n-francis@ti.com/
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- Andrew Davis (4): environment: ti: Prefix ARM64 DTB names with directory environment: ti: Make get_fdt_mmc common configs: Enable setexpr command on TI devices arm: k3: Add regex/gsub command handling
Kamlesh Gurudasani (3): board: ti: am64x: am64x.env: set fdtfile env variable configs: k3: make consistent bootcmd across all k3 socs configs: am64: Fix booting of fitImage on AM64x
Manorit Chawdhry (11): arch: mach-k3: security: fix the check for authentication Kconfig: j721s2: Fix the scratchpad base mach-k3: common: correct the calculations for determining firewalls include: j7*_evm.h: Cleanups to be done configs: k3: Remove saved environments env: Make common bootcmd across all k3 devices include: armv7: Enable distroboot across all configs board: ti: keys: add .key and .crt for fit signature signing k3-*-binman: dts: Pack u-boot.dtb instead of soc specific dtb lib: Kconfig: k3: Enable SHA512 for fit signature Kconfig: Enable FIT_SIGNATURE if ARM64
arch/arm/Kconfig | 2 + arch/arm/dts/k3-am625-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am62a-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am64x-binman.dtsi | 2 +- arch/arm/dts/k3-am65x-binman.dtsi | 2 +- arch/arm/dts/k3-j7200-binman.dtsi | 2 +- arch/arm/dts/k3-j721e-binman.dtsi | 2 +- arch/arm/dts/k3-j721s2-binman.dtsi | 2 +- arch/arm/mach-k3/Kconfig | 2 +- arch/arm/mach-k3/common.c | 3 +- arch/arm/mach-k3/common.h | 2 +- arch/arm/mach-k3/security.c | 5 +- board/ti/am62ax/am62ax.env | 3 +- board/ti/am62x/am62x.env | 3 +- board/ti/am64x/am64x.env | 6 +- board/ti/am65x/am65x.env | 3 +- board/ti/j721e/j721e.env | 9 +- board/ti/j721s2/j721s2.env | 7 +- board/ti/keys/custMpk.crt | 33 ++++++ board/ti/keys/custMpk.key | 51 +++++++++ boot/Kconfig | 3 +- configs/am335x_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_qspi_defconfig | 1 - configs/am57xx_hs_evm_defconfig | 1 - configs/am57xx_hs_evm_usb_defconfig | 1 - configs/am62ax_evm_a53_defconfig | 1 + configs/am62x_evm_a53_defconfig | 3 +- configs/am64x_evm_a53_defconfig | 7 +- configs/am65x_evm_a53_defconfig | 1 - configs/am65x_hs_evm_a53_defconfig | 1 - configs/j7200_evm_a72_defconfig | 7 +- configs/j721e_evm_a72_defconfig | 7 +- configs/j721s2_evm_a72_defconfig | 6 +- doc/board/ti/k3.rst | 172 +++++++++++++++++++++++++++++ include/configs/am62ax_evm.h | 71 ------------ include/configs/am62x_evm.h | 27 ----- include/configs/j721e_evm.h | 32 ------ include/configs/j721s2_evm.h | 5 - include/configs/ti_armv7_common.h | 50 +++++++++ include/environment/ti/mmc.env | 5 +- include/environment/ti/ti_armv7_common.env | 11 +- lib/Kconfig | 1 + 43 files changed, 356 insertions(+), 202 deletions(-) --- base-commit: 26bd02c45a97f77cfb6afac4ee4f61fb9c5c7007 change-id: 20230713-b4-upstream-fit-image-support-9d3c113ebab7
Best regards,

Fix regression occurred during refactoring for the mentioned commit.
Fixes: bd6a24759374 ("arm: mach-k3: security: separate out validating binary logic")
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- arch/arm/mach-k3/security.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c index 02a2c12dbd6f..6038c9665ecb 100644 --- a/arch/arm/mach-k3/security.c +++ b/arch/arm/mach-k3/security.c @@ -91,8 +91,9 @@ void ti_secure_image_post_process(void **p_image, size_t *p_size) return; }
- if (get_device_type() != K3_DEVICE_TYPE_HS_SE && - get_device_type() != K3_DEVICE_TYPE_HS_FS) + if (get_device_type() == K3_DEVICE_TYPE_GP && + (get_device_type() != K3_DEVICE_TYPE_HS_SE && + !ti_secure_cert_detected(*p_image))) return;
/* Clean out image so it can be seen by system firmware */

On 7/14/23 12:52 AM, Manorit Chawdhry wrote:
Fix regression occurred during refactoring for the mentioned commit.
Fixes: bd6a24759374 ("arm: mach-k3: security: separate out validating binary logic")
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
arch/arm/mach-k3/security.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c index 02a2c12dbd6f..6038c9665ecb 100644 --- a/arch/arm/mach-k3/security.c +++ b/arch/arm/mach-k3/security.c @@ -91,8 +91,9 @@ void ti_secure_image_post_process(void **p_image, size_t *p_size) return; }
- if (get_device_type() != K3_DEVICE_TYPE_HS_SE &&
get_device_type() != K3_DEVICE_TYPE_HS_FS)
- if (get_device_type() == K3_DEVICE_TYPE_GP &&
(get_device_type() != K3_DEVICE_TYPE_HS_SE &&
Why check for both == GP and != HS-SE? Seems like this logic could still be buggy. Could you explain here exactly what you are trying to do here.
Andrew
!ti_secure_cert_detected(*p_image)))
return;
/* Clean out image so it can be seen by system firmware */

Hi Andrew,
On 09:22-20230714, Andrew Davis wrote:
On 7/14/23 12:52 AM, Manorit Chawdhry wrote:
Fix regression occurred during refactoring for the mentioned commit.
Fixes: bd6a24759374 ("arm: mach-k3: security: separate out validating binary logic")
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
arch/arm/mach-k3/security.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-k3/security.c b/arch/arm/mach-k3/security.c index 02a2c12dbd6f..6038c9665ecb 100644 --- a/arch/arm/mach-k3/security.c +++ b/arch/arm/mach-k3/security.c @@ -91,8 +91,9 @@ void ti_secure_image_post_process(void **p_image, size_t *p_size) return; }
- if (get_device_type() != K3_DEVICE_TYPE_HS_SE &&
get_device_type() != K3_DEVICE_TYPE_HS_FS)
- if (get_device_type() == K3_DEVICE_TYPE_GP &&
(get_device_type() != K3_DEVICE_TYPE_HS_SE &&
Why check for both == GP and != HS-SE? Seems like this logic could still be buggy. Could you explain here exactly what you are trying to do here.
Ah yes, this fix can become better now that I see as there are still some problems that don't become clear. So basically during the refactor two things were separated out from this function -
1. If we are booting signed binary on a GP device then strip off the headers and skip the authentication as it is not required on the GP device along with a print saying trying to boot signed binary on GP device.
2. If we are on an non-HS device that supports authentication like HS-FS or any other device, but we don't have the certificate then we can just skip the authentication as other devices don't have anything enforced and add a print saying that we are skipping authentication.
Though I don't think the 2nd point should've been part of the refactor and we only needed the first point to be moved in that function, letting the 2nd point moved actually causes confusion as we could still get the print saying that we are skipping authentication but still authenticate due to the buggy check that was there in this function and the whole check along with the print should be moved here now that I notice.
Will be fixing this in the next revision.
Thanks and regards, Manorit
Andrew
return; /* Clean out image so it can be seen by system firmware */!ti_secure_cert_detected(*p_image)))

On Fri, Jul 14, 2023 at 11:22:24AM +0530, Manorit Chawdhry wrote:
Fix regression occurred during refactoring for the mentioned commit.
Fixes: bd6a24759374 ("arm: mach-k3: security: separate out validating binary logic")
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
For the series, applied to u-boot/master, thanks!

Hi Manorit,
On 24/07/23 20:27, Tom Rini wrote:
On Fri, Jul 14, 2023 at 11:22:24AM +0530, Manorit Chawdhry wrote:
Fix regression occurred during refactoring for the mentioned commit.
Fixes: bd6a24759374 ("arm: mach-k3: security: separate out validating binary logic")
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
For the series, applied to u-boot/master, thanks!
This series got merged but it still has outstanding comments, I hope you will be sending fixes.
Thanks, Nikhil

Hi Nikhil,
On 10:53-20230725, Nikhil M Jain wrote:
Hi Manorit,
On 24/07/23 20:27, Tom Rini wrote:
On Fri, Jul 14, 2023 at 11:22:24AM +0530, Manorit Chawdhry wrote:
Fix regression occurred during refactoring for the mentioned commit.
Fixes: bd6a24759374 ("arm: mach-k3: security: separate out validating binary logic")
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
For the series, applied to u-boot/master, thanks!
This series got merged but it still has outstanding comments, I hope you will be sending fixes.
Yes, will be sending incremental fixes to these.
Regards, Manorit
Thanks, Nikhil

Fix the regression that occurred during the alignment of binman series merges along with these HS fixes that caused silent regression in this.
Fixes: 30a7ee87fd1a ("Kconfig: j721s2: Change K3_MCU_SCRATCHPAD_BASE to non firewalled region")
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- arch/arm/mach-k3/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig index bae0a827c29f..bf1c3c51a41c 100644 --- a/arch/arm/mach-k3/Kconfig +++ b/arch/arm/mach-k3/Kconfig @@ -52,7 +52,7 @@ config SYS_K3_MAX_DOWNLODABLE_IMAGE_SIZE config SYS_K3_MCU_SCRATCHPAD_BASE hex default 0x40280000 if SOC_K3_AM654 - default 0x40280000 if SOC_K3_J721S2 + default 0x41cff9fc if SOC_K3_J721S2 default 0x41cff9fc if SOC_K3_J721E help Describes the base address of MCU Scratchpad RAM.

From: Kamlesh Gurudasani kamlesh@ti.com
Set fdtfile env variable similar to other k3 socs.
Signed-off-by: Kamlesh Gurudasani kamlesh@ti.com Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- board/ti/am64x/am64x.env | 1 + 1 file changed, 1 insertion(+)
diff --git a/board/ti/am64x/am64x.env b/board/ti/am64x/am64x.env index c3960be38e32..2a1a1fa53a36 100644 --- a/board/ti/am64x/am64x.env +++ b/board/ti/am64x/am64x.env @@ -9,6 +9,7 @@ findfdt= setenv name_fdt k3-am642-sk.dtb; fi; if test $name_fdt = undefined; then echo WARNING: Could not determine device tree to use; fi; + setenv fdtfile ${name_fdt} name_kern=Image console=ttyS2,115200n8 args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 ${mtdparts}

On 14/07/23 11:22, Manorit Chawdhry wrote:
From: Kamlesh Gurudasanikamlesh@ti.com
Set fdtfile env variable similar to other k3 socs.
Signed-off-by: Kamlesh Gurudasanikamlesh@ti.com Signed-off-by: Manorit Chawdhrym-chawdhry@ti.com
board/ti/am64x/am64x.env | 1 + 1 file changed, 1 insertion(+)
Reviewed-by: Nikhil M Jain n-jain1@ti.com

The background firewall calculations were wrong, fix that to determine both the background and foreground correctly.
Fixes: 8bfce2f9989f ("arm: mach-k3: common: reorder removal of firewalls")
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- arch/arm/mach-k3/common.c | 3 +-- arch/arm/mach-k3/common.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c index bda01527d3fb..1d262428008c 100644 --- a/arch/arm/mach-k3/common.c +++ b/arch/arm/mach-k3/common.c @@ -588,8 +588,7 @@ static void remove_fwl_regions(struct fwl_data fwl_data, size_t num_regions,
/* Don't disable the background regions */ if (region.control != 0 && - ((region.control & K3_FIREWALL_BACKGROUND_BIT) == - fwl_type)) { + ((region.control >> K3_FIREWALL_BACKGROUND_BIT) & 1) == fwl_type) { pr_debug("Attempting to disable firewall %5d (%25s)\n", region.fwl_id, fwl_data.name); region.control = 0; diff --git a/arch/arm/mach-k3/common.h b/arch/arm/mach-k3/common.h index 6cffbd444b83..9bd9ad6d1a0f 100644 --- a/arch/arm/mach-k3/common.h +++ b/arch/arm/mach-k3/common.h @@ -9,7 +9,7 @@ #include <asm/armv7_mpu.h> #include <asm/hardware.h>
-#define K3_FIREWALL_BACKGROUND_BIT BIT(8) +#define K3_FIREWALL_BACKGROUND_BIT (8)
struct fwl_data { const char *name;

Some miscellaneous cleanups for boards.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- include/configs/j721e_evm.h | 1 - include/configs/j721s2_evm.h | 2 -- 2 files changed, 3 deletions(-)
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index de92cd48fb7d..07926e4f0eea 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -58,6 +58,5 @@ /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h>
-/* MMC ENV related defines */
#endif /* __CONFIG_J721E_EVM_H */ diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h index 1e0da9f96c5e..8db87a4ee21d 100644 --- a/include/configs/j721s2_evm.h +++ b/include/configs/j721s2_evm.h @@ -29,6 +29,4 @@ /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h>
-/* MMC ENV related defines */ - #endif /* __CONFIG_J721S2_EVM_H */

Having saved environments usually causes inconsistencies while in development workflow. The saved environments conflict with the default ones that U-boot should be updating during 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. Environments can always be re-enabled locally if one does like them or needs them for some production environment. Optionally, Uenv.txt can also be used on some of the boot media.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- configs/am64x_evm_a53_defconfig | 4 +- configs/j7200_evm_a72_defconfig | 4 - configs/j721e_evm_a72_defconfig | 4 - configs/j721s2_evm_a72_defconfig | 3 - doc/board/ti/k3.rst | 172 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 173 insertions(+), 14 deletions(-)
diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index 6485ed108a90..123a70049aeb 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -14,7 +14,7 @@ CONFIG_TARGET_AM642_A53_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000 CONFIG_ENV_SIZE=0x20000 -CONFIG_ENV_OFFSET=0x680000 +CONFIG_SYS_SPI_U_BOOT_OFFS=0x300000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="k3-am642-evm" @@ -79,8 +79,6 @@ CONFIG_OF_LIST="k3-am642-evm k3-am642-sk" CONFIG_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y -CONFIG_ENV_IS_IN_MMC=y -CONFIG_SYS_MMC_ENV_PART=1 CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM=y CONFIG_SPL_DM_SEQ_ALIAS=y diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig index cc68a2121797..5fc46ec8c13e 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_evm_a72_defconfig @@ -12,7 +12,6 @@ CONFIG_TARGET_J7200_A72_EVM=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000 CONFIG_ENV_SIZE=0x20000 -CONFIG_ENV_OFFSET=0x680000 CONFIG_DM_GPIO=y CONFIG_SPL_DM_SPI=y CONFIG_DEFAULT_DEVICE_TREE="k3-j7200-common-proc-board" @@ -23,7 +22,6 @@ CONFIG_SPL_MMC=y CONFIG_SPL_SERIAL=y CONFIG_SPL_DRIVERS_MISC=y CONFIG_SPL_STACK_R_ADDR=0x82000000 -CONFIG_ENV_OFFSET_REDUND=0x6A0000 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_SPI_FLASH_SUPPORT=y @@ -90,8 +88,6 @@ 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_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 32ac47cbdb59..bf353aafefe4 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -91,11 +91,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 CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_DM=y diff --git a/configs/j721s2_evm_a72_defconfig b/configs/j721s2_evm_a72_defconfig index 37c1fdedc41e..5ce4eb5390c6 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_evm_a72_defconfig @@ -89,10 +89,7 @@ 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_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/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 214a22b1ae62..58e4ad2f6f29 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -240,3 +240,175 @@ wakeup and main domain and to boot to the U-Boot prompt
| `tispl.bin` | `u-boot.img` + + + +Fit Signature Signing +--------------------- + +K3 Platforms have fit signature signing enabled by default on their primary +platforms. Here we'll take an example for creating fit image for J721e platform +and the same can be extended to other platforms + +1. Describing FIT source + + .. code-block:: bash + + /dts-v1/; + + / { + description = "Kernel fitImage for j721e-hs-evm"; + #address-cells = <1>; + + images { + kernel-1 { + description = "Linux kernel"; + data = /incbin/("Image"); + type = "kernel"; + arch = "arm64"; + os = "linux"; + compression = "none"; + load = <0x80080000>; + entry = <0x80080000>; + hash-1 { + algo = "sha512"; + }; + + }; + fdt-ti_k3-j721e-common-proc-board.dtb { + description = "Flattened Device Tree blob"; + data = /incbin/("k3-j721e-common-proc-board.dtb"); + type = "flat_dt"; + arch = "arm64"; + compression = "none"; + load = <0x83000000>; + hash-1 { + algo = "sha512"; + }; + + }; + }; + + configurations { + default = "conf-ti_k3-j721e-common-proc-board.dtb"; + conf-ti_k3-j721e-common-proc-board.dtb { + description = "Linux kernel, FDT blob"; + fdt = "fdt-ti_k3-j721e-common-proc-board.dtb"; + kernel = "kernel-1"; + signature-1 { + algo = "sha512,rsa4096"; + key-name-hint = "custMpk"; + sign-images = "kernel", "fdt"; + }; + }; + }; + }; + + You would require to change the '/incbin/' lines to point to the respective + files in your local machine and the key-name-hint also needs to be changed + if you are using some other key other than the TI dummy key that we are + using for this example. + +2. Compile U-boot for the respective board + + .. code-block:: bash + + make O=build/a72 CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=arm + BL31=/path/to/bl31.bin TEE=/path/to/bl32.bin + BINMAN_INDIRS="/path/to/ti-linux-firmware" -j15 + + .. note:: + + The changes only affect a72 binaries so the example just builds that + +3. Sign the fit image and embed the dtb in uboot + + Now once the build is done, you'll have a dtb for your board that you'll + be passing to mkimage for signing the fitImage and embedding the key in + the u-boot dtb. + + .. code-block:: bash + + mkimage -r -f fitImage.its -k $UBOOT_PATH/board/ti/keys -K + $UBOOT_PATH/build/a72/dts/dt.dtb + + For signing a secondary platform, pass the -K parameter to that DTB + + .. code-block:: bash + + mkimage -f fitImage.its -k $UBOOT_PATH/board/ti/keys -K + $UBOOT_PATH/build/a72/arch/arm/dts/k3-j721e-sk.dtb + + .. note:: + + If changing `CONFIG_DEFAULT_DEVICE_TREE` to the secondary platform, + binman changes would also be required so that correct dtb gets packaged. + + .. code-block:: bash + + diff --git a/arch/arm/dts/k3-j721e-binman.dtsi b/arch/arm/dts/k3-j721e-binman.dtsi + index 673be646b1e3..752fa805fe8d 100644 + --- a/arch/arm/dts/k3-j721e-binman.dtsi + +++ b/arch/arm/dts/k3-j721e-binman.dtsi + @@ -299,8 +299,8 @@ + #define SPL_J721E_SK_DTB "spl/dts/k3-j721e-sk.dtb" + + #define UBOOT_NODTB "u-boot-nodtb.bin" + -#define J721E_EVM_DTB "u-boot.dtb" + -#define J721E_SK_DTB "arch/arm/dts/k3-j721e-sk.dtb" + +#define J721E_EVM_DTB "arch/arm/dts/k3-j721e-common-proc-board.dtb" + +#define J721E_SK_DTB "u-boot.dtb" + +5. Rebuilt u-boot + + This is required so that the modified dtb gets updated in u-boot.img + + .. code-block:: bash + + make O=build/a72 CROSS_COMPILE=aarch64-none-linux-gnu- ARCH=arm + BL31=/path/to/bl31.bin TEE=/path/to/bl32.bin + BINMAN_INDIRS="/path/to/ti-linux-firmware" -j15 + +6. (Optional) Enabled FIT_SIGNATURE_ENFORCED + + By default u-boot will boot up the fit image without any authentication as + such if the public key is not embedded properly, to check if the public key + nodes are proper you can enable FIT_SIGNATURE_ENFORCED that would not rely + on the dtb for anything else then the signature node for checking the fit + image, rest other things will be enforced such as the property of + required-keys. This is not an extensive check so do manual checks also + + This is by default enabled for devices with TI_SECURE_DEVICE enabled. + +.. note:: + + The devices now also have distroboot enabled so if the fit image doesn't + work then the fallback to normal distroboot will be there on hs devices, + this will need to be explicitly disabled by changing the boot_targets. + +Saving environment +------------------ + +SAVEENV is disabled by default and for the new flow uses Uenv.txt as the default +way for saving the environments. This has been done as Uenv.txt is more granular +then the saveenv command and can be used across various bootmodes too. + +**Writing to MMC/EMMC** + +.. code-block:: + + => env export -t $loadaddr <list of variables> + => fatwrite mmc ${mmcdev} ${loadaddr} ${bootenvfile} ${filesize} + +**Reading from MMC/EMMC** + +By default run envboot will read it from the MMC/EMMC partition ( based on +mmcdev) and set the environments. + +If manually needs to be done then the environment can be read from the +filesystem and then imported + +.. code-block:: + + => fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} + => env import -t ${loadaddr} ${filesize}

From: Andrew Davis afd@ti.com
In Linux the ARM64 DTSs are stored in vendor directories to help organize the files and prevent naming collisions. The deployed DTBs will mirror this and so the vendor prefix should be added to the variable used to locate these files.
Suggested-by: Ryan Eatmon reatmon@ti.com Signed-off-by: Andrew Davis afd@ti.com Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- board/ti/am62ax/am62ax.env | 2 +- board/ti/am62x/am62x.env | 2 +- board/ti/am64x/am64x.env | 4 ++-- board/ti/am65x/am65x.env | 2 +- board/ti/j721e/j721e.env | 8 ++++---- board/ti/j721s2/j721s2.env | 6 +++--- include/configs/am62ax_evm.h | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/board/ti/am62ax/am62ax.env b/board/ti/am62ax/am62ax.env index 8c1c26e9a249..95401756e20a 100644 --- a/board/ti/am62ax/am62ax.env +++ b/board/ti/am62ax/am62ax.env @@ -1,7 +1,7 @@ #include <environment/ti/ti_armv7_common.env> #include <environment/ti/mmc.env>
-default_device_tree=k3-am62a7-sk.dtb +default_device_tree=ti/k3-am62a7-sk.dtb findfdt= setenv name_fdt ${default_device_tree}; setenv fdtfile ${name_fdt} diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env index 5ac15fd24010..37af69199167 100644 --- a/board/ti/am62x/am62x.env +++ b/board/ti/am62x/am62x.env @@ -1,7 +1,7 @@ #include <environment/ti/ti_armv7_common.env> #include <environment/ti/mmc.env>
-default_device_tree=k3-am625-sk.dtb +default_device_tree=ti/k3-am625-sk.dtb findfdt= setenv name_fdt ${default_device_tree}; setenv fdtfile ${name_fdt} diff --git a/board/ti/am64x/am64x.env b/board/ti/am64x/am64x.env index 2a1a1fa53a36..4d27f16e8ca9 100644 --- a/board/ti/am64x/am64x.env +++ b/board/ti/am64x/am64x.env @@ -4,9 +4,9 @@
findfdt= if test $board_name = am64x_gpevm; then - setenv name_fdt k3-am642-evm.dtb; fi; + setenv name_fdt ti/k3-am642-evm.dtb; fi; if test $board_name = am64x_skevm; then - setenv name_fdt k3-am642-sk.dtb; fi; + setenv name_fdt ti/k3-am642-sk.dtb; fi; if test $name_fdt = undefined; then echo WARNING: Could not determine device tree to use; fi; setenv fdtfile ${name_fdt} diff --git a/board/ti/am65x/am65x.env b/board/ti/am65x/am65x.env index a048b47071f8..3c583b77fd1e 100644 --- a/board/ti/am65x/am65x.env +++ b/board/ti/am65x/am65x.env @@ -6,7 +6,7 @@ #endif
findfdt= - setenv name_fdt k3-am654-base-board.dtb; + setenv name_fdt ti/k3-am654-base-board.dtb; setenv fdtfile ${name_fdt} name_kern=Image console=ttyS2,115200n8 diff --git a/board/ti/j721e/j721e.env b/board/ti/j721e/j721e.env index c181741ca5b3..12b5610b3e47 100644 --- a/board/ti/j721e/j721e.env +++ b/board/ti/j721e/j721e.env @@ -7,15 +7,15 @@ #include <environment/ti/k3_rproc.env> #endif
-default_device_tree=k3-j721e-common-proc-board.dtb +default_device_tree=ti/k3-j721e-common-proc-board.dtb findfdt= setenv name_fdt ${default_device_tree}; if test $board_name = j721e; then - setenv name_fdt k3-j721e-common-proc-board.dtb; fi; + setenv name_fdt ti/k3-j721e-common-proc-board.dtb; fi; if test $board_name = j7200; then - setenv name_fdt k3-j7200-common-proc-board.dtb; fi; + setenv name_fdt ti/k3-j7200-common-proc-board.dtb; fi; if test $board_name = j721e-eaik || test $board_name = j721e-sk; then - setenv name_fdt k3-j721e-sk.dtb; fi; + setenv name_fdt ti/k3-j721e-sk.dtb; fi; setenv fdtfile ${name_fdt} name_kern=Image console=ttyS2,115200n8 diff --git a/board/ti/j721s2/j721s2.env b/board/ti/j721s2/j721s2.env index f4467770e40c..67953d3f5984 100644 --- a/board/ti/j721s2/j721s2.env +++ b/board/ti/j721s2/j721s2.env @@ -7,13 +7,13 @@ #include <environment/ti/k3_rproc.env> #endif
-default_device_tree=k3-j721s2-common-proc-board.dtb +default_device_tree=ti/k3-j721s2-common-proc-board.dtb findfdt= setenv name_fdt ${default_device_tree}; if test $board_name = j721s2; then \ - setenv name_fdt k3-j721s2-common-proc-board.dtb; fi; + setenv name_fdt ti/k3-j721s2-common-proc-board.dtb; fi; if test $board_name = am68-sk; then - setenv name_fdt k3-am68-sk-base-board.dtb; fi; + setenv name_fdt ti/k3-am68-sk-base-board.dtb; fi; setenv fdtfile ${name_fdt} name_kern=Image console=ttyS2,115200n8 diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h index d8ef2509a895..98751f261753 100644 --- a/include/configs/am62ax_evm.h +++ b/include/configs/am62ax_evm.h @@ -21,7 +21,7 @@
/* U-Boot general configuration */ #define EXTRA_ENV_AM62A7_BOARD_SETTINGS \ - "default_device_tree=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \ + "default_device_tree=ti/k3-am62a7-sk.dtb\0" \ "findfdt=" \ "setenv name_fdt ${default_device_tree};" \ "setenv fdtfile ${name_fdt}\0" \

On 14/07/23 11:22, Manorit Chawdhry wrote:
From: Andrew Davisafd@ti.com
In Linux the ARM64 DTSs are stored in vendor directories to help organize the files and prevent naming collisions. The deployed DTBs will mirror this and so the vendor prefix should be added to the variable used to locate these files.
Suggested-by: Ryan Eatmonreatmon@ti.com Signed-off-by: Andrew Davisafd@ti.com Signed-off-by: Manorit Chawdhrym-chawdhry@ti.com
board/ti/am62ax/am62ax.env | 2 +- board/ti/am62x/am62x.env | 2 +- board/ti/am64x/am64x.env | 4 ++-- board/ti/am65x/am65x.env | 2 +- board/ti/j721e/j721e.env | 8 ++++---- board/ti/j721s2/j721s2.env | 6 +++--- include/configs/am62ax_evm.h | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-)
Reviewed-by: Nikhil M Jain n-jain1@ti.com

From: Andrew Davis afd@ti.com
Since get_fdt_mmc is common, factor it out into mmc.env and remove it from each platform env file along with changing the directory path to reflect the standards. Use it in mmcloados but keep loadfdt defined in case it is still used by some external uEnv.txt script.
Signed-off-by: Andrew Davis afd@ti.com Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- board/ti/am62ax/am62ax.env | 1 - board/ti/am62x/am62x.env | 1 - board/ti/am64x/am64x.env | 1 - board/ti/am65x/am65x.env | 1 - board/ti/j721e/j721e.env | 1 - board/ti/j721s2/j721s2.env | 1 - include/environment/ti/mmc.env | 5 +++-- 7 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/board/ti/am62ax/am62ax.env b/board/ti/am62ax/am62ax.env index 95401756e20a..491ec973bbc6 100644 --- a/board/ti/am62ax/am62ax.env +++ b/board/ti/am62ax/am62ax.env @@ -17,7 +17,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env index 37af69199167..0901a8536da5 100644 --- a/board/ti/am62x/am62x.env +++ b/board/ti/am62x/am62x.env @@ -17,7 +17,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/board/ti/am64x/am64x.env b/board/ti/am64x/am64x.env index 4d27f16e8ca9..015f63a66c71 100644 --- a/board/ti/am64x/am64x.env +++ b/board/ti/am64x/am64x.env @@ -21,7 +21,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/board/ti/am65x/am65x.env b/board/ti/am65x/am65x.env index 3c583b77fd1e..d7130cc3f7df 100644 --- a/board/ti/am65x/am65x.env +++ b/board/ti/am65x/am65x.env @@ -20,7 +20,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/board/ti/j721e/j721e.env b/board/ti/j721e/j721e.env index 12b5610b3e47..23ce7e1af746 100644 --- a/board/ti/j721e/j721e.env +++ b/board/ti/j721e/j721e.env @@ -37,7 +37,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/board/ti/j721s2/j721s2.env b/board/ti/j721s2/j721s2.env index 67953d3f5984..9464fe499037 100644 --- a/board/ti/j721s2/j721s2.env +++ b/board/ti/j721s2/j721s2.env @@ -31,7 +31,6 @@ name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw #endif rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/include/environment/ti/mmc.env b/include/environment/ti/mmc.env index 5677d057d864..a052d288535e 100644 --- a/include/environment/ti/mmc.env +++ b/include/environment/ti/mmc.env @@ -13,7 +13,8 @@ importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize} loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} -loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} +loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile} +get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt} envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev}; @@ -32,7 +33,7 @@ envboot=mmc dev ${mmcdev}; fi; mmcloados= if test ${boot_fdt} = yes || test ${boot_fdt} = try; then - if run loadfdt; then + if run get_fdt_mmc; then bootz ${loadaddr} - ${fdtaddr}; else if test ${boot_fdt} = try; then

Hi Manorit,
On 14/07/23 11:22, Manorit Chawdhry wrote:
From: Andrew Davis afd@ti.com
Since get_fdt_mmc is common, factor it out into mmc.env and remove it from each platform env file along with changing the directory path to reflect the standards. Use it in mmcloados but keep loadfdt defined in case it is still used by some external uEnv.txt script.
Signed-off-by: Andrew Davis afd@ti.com Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
board/ti/am62ax/am62ax.env | 1 - board/ti/am62x/am62x.env | 1 - board/ti/am64x/am64x.env | 1 - board/ti/am65x/am65x.env | 1 - board/ti/j721e/j721e.env | 1 - board/ti/j721s2/j721s2.env | 1 - include/environment/ti/mmc.env | 5 +++-- 7 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/board/ti/am62ax/am62ax.env b/board/ti/am62ax/am62ax.env index 95401756e20a..491ec973bbc6 100644 --- a/board/ti/am62ax/am62ax.env +++ b/board/ti/am62ax/am62ax.env @@ -17,7 +17,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000;
get_overlay_mmc and init_mmc are also common, these can also be moved to mmc.env file.
diff --git a/board/ti/am62x/am62x.env b/board/ti/am62x/am62x.env index 37af69199167..0901a8536da5 100644 --- a/board/ti/am62x/am62x.env +++ b/board/ti/am62x/am62x.env @@ -17,7 +17,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/board/ti/am64x/am64x.env b/board/ti/am64x/am64x.env index 4d27f16e8ca9..015f63a66c71 100644 --- a/board/ti/am64x/am64x.env +++ b/board/ti/am64x/am64x.env @@ -21,7 +21,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/board/ti/am65x/am65x.env b/board/ti/am65x/am65x.env index 3c583b77fd1e..d7130cc3f7df 100644 --- a/board/ti/am65x/am65x.env +++ b/board/ti/am65x/am65x.env @@ -20,7 +20,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/board/ti/j721e/j721e.env b/board/ti/j721e/j721e.env index 12b5610b3e47..23ce7e1af746 100644 --- a/board/ti/j721e/j721e.env +++ b/board/ti/j721e/j721e.env @@ -37,7 +37,6 @@ bootpart=1:2 bootdir=/boot rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/board/ti/j721s2/j721s2.env b/board/ti/j721s2/j721s2.env index 67953d3f5984..9464fe499037 100644 --- a/board/ti/j721s2/j721s2.env +++ b/board/ti/j721s2/j721s2.env @@ -31,7 +31,6 @@ name_mcur5f0_0fw=/lib/firmware/j7-mcu-r5f0_0-fw #endif rd_spec=- init_mmc=run args_all args_mmc -get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt} get_overlay_mmc= fdt address ${fdtaddr}; fdt resize 0x100000; diff --git a/include/environment/ti/mmc.env b/include/environment/ti/mmc.env index 5677d057d864..a052d288535e 100644 --- a/include/environment/ti/mmc.env +++ b/include/environment/ti/mmc.env @@ -13,7 +13,8 @@ importbootenv=echo Importing environment from mmc${mmcdev} ...; env import -t ${loadaddr} ${filesize} loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenvfile} loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfile} -loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/${fdtfile} +loadfdt=load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/dtb/${fdtfile} +get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/dtb/${name_fdt} envboot=mmc dev ${mmcdev}; if mmc rescan; then echo SD/MMC found on device ${mmcdev}; @@ -32,7 +33,7 @@ envboot=mmc dev ${mmcdev}; fi; mmcloados= if test ${boot_fdt} = yes || test ${boot_fdt} = try; then
if run loadfdt; then
else if test ${boot_fdt} = try; thenif run get_fdt_mmc; then bootz ${loadaddr} - ${fdtaddr};
Thanks, Nikhil

From: Andrew Davis afd@ti.com
This is used when building the FIT image configuration string. Enable it for all FIT using TI platforms.
Signed-off-by: Andrew Davis afd@ti.com [ extend to other k3 boards ] Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- configs/am335x_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_qspi_defconfig | 1 - configs/am57xx_hs_evm_defconfig | 1 - configs/am57xx_hs_evm_usb_defconfig | 1 - configs/am65x_evm_a53_defconfig | 1 - configs/am65x_hs_evm_a53_defconfig | 1 - configs/j7200_evm_a72_defconfig | 1 - configs/j721e_evm_a72_defconfig | 1 - configs/j721s2_evm_a72_defconfig | 1 - 10 files changed, 10 deletions(-)
diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig index 1e93439f9474..a3a4ab361c31 100644 --- a/configs/am335x_hs_evm_defconfig +++ b/configs/am335x_hs_evm_defconfig @@ -37,7 +37,6 @@ CONFIG_SYS_BOOTM_LEN=0x1000000 CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 # CONFIG_CMD_FLASH is not set CONFIG_CMD_NAND=y -# CONFIG_CMD_SETEXPR is not set CONFIG_BOOTP_DNS2=y CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand.0" diff --git a/configs/am43xx_hs_evm_defconfig b/configs/am43xx_hs_evm_defconfig index 466b12e9ece8..01428ac7aa73 100644 --- a/configs/am43xx_hs_evm_defconfig +++ b/configs/am43xx_hs_evm_defconfig @@ -38,7 +38,6 @@ CONFIG_SYS_MAXARGS=64 CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 # CONFIG_CMD_FLASH is not set CONFIG_CMD_NAND=y -# CONFIG_CMD_SETEXPR is not set CONFIG_BOOTP_DNS2=y CONFIG_CMD_MTDPARTS=y CONFIG_MTDIDS_DEFAULT="nand0=nand.0" diff --git a/configs/am43xx_hs_evm_qspi_defconfig b/configs/am43xx_hs_evm_qspi_defconfig index ad6ce2b7d63d..54051ca0479f 100644 --- a/configs/am43xx_hs_evm_qspi_defconfig +++ b/configs/am43xx_hs_evm_qspi_defconfig @@ -31,7 +31,6 @@ CONFIG_CMD_I2C=y CONFIG_CMD_MMC=y CONFIG_CMD_SPI=y CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set CONFIG_BOOTP_DNS2=y CONFIG_CMD_EXT4_WRITE=y CONFIG_OF_CONTROL=y diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig index 1b038488b3ec..94ffce1a9986 100644 --- a/configs/am57xx_hs_evm_defconfig +++ b/configs/am57xx_hs_evm_defconfig @@ -49,7 +49,6 @@ CONFIG_CMD_ABOOTIMG=y CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 CONFIG_CMD_BCB=y # CONFIG_CMD_FLASH is not set -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_AB_SELECT=y CONFIG_BOOTP_DNS2=y # CONFIG_CMD_PMIC is not set diff --git a/configs/am57xx_hs_evm_usb_defconfig b/configs/am57xx_hs_evm_usb_defconfig index 39fdc0596ec2..404e714d4f0f 100644 --- a/configs/am57xx_hs_evm_usb_defconfig +++ b/configs/am57xx_hs_evm_usb_defconfig @@ -52,7 +52,6 @@ CONFIG_CMD_ABOOTIMG=y CONFIG_SYS_I2C_EEPROM_ADDR_LEN=2 CONFIG_CMD_BCB=y # CONFIG_CMD_FLASH is not set -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_AB_SELECT=y CONFIG_BOOTP_DNS2=y # CONFIG_CMD_PMIC is not set diff --git a/configs/am65x_evm_a53_defconfig b/configs/am65x_evm_a53_defconfig index c3a2f09d0f07..4301553af8d2 100644 --- a/configs/am65x_evm_a53_defconfig +++ b/configs/am65x_evm_a53_defconfig @@ -71,7 +71,6 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0" CONFIG_MTDPARTS_DEFAULT="mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),128k(ospi.env),128k(ospi.env.backup),1m(ospi.sysfw),-@8m(ospi.rootfs)" diff --git a/configs/am65x_hs_evm_a53_defconfig b/configs/am65x_hs_evm_a53_defconfig index e0277d4787fe..3f9626e45503 100644 --- a/configs/am65x_hs_evm_a53_defconfig +++ b/configs/am65x_hs_evm_a53_defconfig @@ -69,7 +69,6 @@ CONFIG_CMD_MMC=y CONFIG_CMD_PCI=y CONFIG_CMD_REMOTEPROC=y CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_TIME=y CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0" CONFIG_MTDPARTS_DEFAULT="mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),128k(ospi.env),128k(ospi.env.backup),1m(ospi.sysfw),-@8m(ospi.rootfs)" diff --git a/configs/j7200_evm_a72_defconfig b/configs/j7200_evm_a72_defconfig index 5fc46ec8c13e..0abc865cb5d5 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_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/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig index bf353aafefe4..825dbd865cd9 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 5ce4eb5390c6..13c1a0cdbe9b 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_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"

From: Andrew Davis afd@ti.com
The 'gsub' setexpr sub command is using when creating the FIT image configuration string on K3 devices. Enable this for K3.
Signed-off-by: Andrew Davis afd@ti.com Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 99264a64780c..3b9ab6d94101 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -798,6 +798,7 @@ config ARCH_K3 select SPL select SUPPORT_SPL select FIT + select REGEX
config ARCH_OMAP2PLUS bool "TI OMAP2+"

This is helpful to go forward with distro_bootcmd as default boot.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- include/environment/ti/ti_armv7_common.env | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/environment/ti/ti_armv7_common.env b/include/environment/ti/ti_armv7_common.env index 0c0929d86286..e87a41a6590b 100644 --- a/include/environment/ti/ti_armv7_common.env +++ b/include/environment/ti/ti_armv7_common.env @@ -22,4 +22,13 @@ get_overlaystring= done; get_fit_config=setexpr name_fit_config gsub / _ conf-${fdtfile} run_fit=run get_fit_config; bootm ${addr_fit}#${name_fit_config}${overlaystring} - +bootcmd_ti_mmc= + run findfdt; run init_${boot}; +#if CONFIG_CMD_REMOTEPROC + run main_cpsw0_qsgmii_phyinit; run boot_rprocs; +#endif + 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;

Since K3 devices are moving towards distroboot, remove duplicates and add it in common file to import from.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- include/configs/am62ax_evm.h | 71 --------------------------------------- include/configs/am62x_evm.h | 27 --------------- include/configs/j721e_evm.h | 31 ----------------- include/configs/j721s2_evm.h | 3 -- include/configs/ti_armv7_common.h | 50 +++++++++++++++++++++++++++ 5 files changed, 50 insertions(+), 132 deletions(-)
diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h index 98751f261753..3997ce558a45 100644 --- a/include/configs/am62ax_evm.h +++ b/include/configs/am62ax_evm.h @@ -15,77 +15,6 @@ /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000
-#define PARTS_DEFAULT \ - /* Linux partitions */ \ - "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" \ - -/* U-Boot general configuration */ -#define EXTRA_ENV_AM62A7_BOARD_SETTINGS \ - "default_device_tree=ti/k3-am62a7-sk.dtb\0" \ - "findfdt=" \ - "setenv name_fdt ${default_device_tree};" \ - "setenv fdtfile ${name_fdt}\0" \ - "name_kern=Image\0" \ - "console=ttyS2,115200n8\0" \ - "args_all=setenv optargs earlycon=ns16550a,mmio32,0x02800000 " \ - "${mtdparts}\0" \ - "run_kern=booti ${loadaddr} ${rd_spec} ${fdtaddr}\0" - -/* U-Boot MMC-specific configuration */ -#define EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \ - "boot=mmc\0" \ - "mmcdev=1\0" \ - "bootpart=1:2\0" \ - "bootdir=/boot\0" \ - "rd_spec=-\0" \ - "init_mmc=run args_all args_mmc\0" \ - "get_fdt_mmc=load mmc ${bootpart} ${fdtaddr} ${bootdir}/${name_fdt}\0" \ - "get_overlay_mmc=" \ - "fdt address ${fdtaddr};" \ - "fdt resize 0x100000;" \ - "for overlay in $name_overlays;" \ - "do;" \ - "load mmc ${bootpart} ${dtboaddr} ${bootdir}/${overlay} && " \ - "fdt apply ${dtboaddr};" \ - "done;\0" \ - "get_kern_mmc=load mmc ${bootpart} ${loadaddr} " \ - "${bootdir}/${name_kern}\0" \ - "get_fit_mmc=load mmc ${bootpart} ${addr_fit} " \ - "${bootdir}/${name_fit}\0" \ - "partitions=" PARTS_DEFAULT - -#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance) \ - DEFAULT_MMC_TI_ARGS \ - EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \ - "bootcmd_ti_mmc=" \ - "run findfdt; run envboot; run init_mmc;" \ - "if test ${boot_fit} -eq 1; then;" \ - "run get_fit_mmc; run get_overlaystring;" \ - "run run_fit;" \ - "else;" \ - "run get_kern_mmc; run get_fdt_mmc;" \ - "run get_overlay_mmc;" \ - "run run_kern;" \ - "fi;\0" - -#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \ - "ti_mmc " - -#if IS_ENABLED(CONFIG_CMD_MMC) - #define BOOT_TARGET_MMC(func) \ - func(TI_MMC, ti_mmc, na) -#else - #define BOOT_TARGET_MMC(func) -#endif /* IS_ENABLED(CONFIG_CMD_MMC) */ - -#define BOOT_TARGET_DEVICES(func) \ - BOOT_TARGET_MMC(func) - -#include <config_distro_bootcmd.h> - -/* Incorporate settings into the U-Boot environment */ -#define CFG_EXTRA_ENV_SETTINGS \ - BOOTENV
/* Now for the remaining common defines */ #include <configs/ti_armv7_common.h> diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h index 7bf07809b051..6b2a6ee0d0ca 100644 --- a/include/configs/am62x_evm.h +++ b/include/configs/am62x_evm.h @@ -15,33 +15,6 @@ /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000
-#ifdef CONFIG_CMD_MMC -#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) -#else -#define DISTRO_BOOT_DEV_MMC(func) -#endif - -#ifdef CONFIG_CMD_PXE -#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) -#else -#define DISTRO_BOOT_DEV_PXE(func) -#endif - -#ifdef CONFIG_CMD_DHCP -#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) -#else -#define DISTRO_BOOT_DEV_DHCP(func) -#endif - -#define BOOT_TARGET_DEVICES(func) \ - DISTRO_BOOT_DEV_MMC(func) \ - DISTRO_BOOT_DEV_PXE(func) \ - DISTRO_BOOT_DEV_DHCP(func) - -/* Incorporate settings into the U-Boot environment */ -#define CFG_EXTRA_ENV_SETTINGS \ - BOOTENV - /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h>
diff --git a/include/configs/j721e_evm.h b/include/configs/j721e_evm.h index 07926e4f0eea..ea39d1bf8241 100644 --- a/include/configs/j721e_evm.h +++ b/include/configs/j721e_evm.h @@ -24,37 +24,6 @@ #define CFG_SYS_UBOOT_BASE 0x50080000 #endif
-#if CONFIG_IS_ENABLED(CMD_PXE) -# define BOOT_TARGET_PXE(func) func(PXE, pxe, na) -#else -# define BOOT_TARGET_PXE(func) -#endif - -#if CONFIG_IS_ENABLED(CMD_DHCP) -# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) -#else -# define BOOT_TARGET_DHCP(func) -#endif - -#ifdef CONFIG_CMD_USB -# define BOOT_TARGET_USB(func) func(USB, usb, 0) -#else -# define BOOT_TARGET_USB(func) -#endif - -#define BOOT_TARGET_DEVICES(func) \ - BOOT_TARGET_USB(func) \ - func(MMC, mmc, 1) \ - func(MMC, mmc, 0) \ - BOOT_TARGET_PXE(func) \ - BOOT_TARGET_DHCP(func) - -#include <config_distro_bootcmd.h> - -/* Incorporate settings into the U-Boot environment */ -#define CFG_EXTRA_ENV_SETTINGS \ - BOOTENV - /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h>
diff --git a/include/configs/j721s2_evm.h b/include/configs/j721s2_evm.h index 8db87a4ee21d..692c6bb5e42b 100644 --- a/include/configs/j721s2_evm.h +++ b/include/configs/j721s2_evm.h @@ -23,9 +23,6 @@ #define CFG_SYS_UBOOT_BASE 0x50080000 #endif
-/* Incorporate settings into the U-Boot environment */ -#define CFG_EXTRA_ENV_SETTINGS - /* Now for the remaining common defines */ #include <configs/ti_armv7_common.h>
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 149a74d98e8a..dbbeff34ba82 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -154,4 +154,54 @@ #define NETARGS "" #endif
+#ifdef CONFIG_ARM64 +#ifdef CONFIG_DISTRO_DEFAULTS +#ifdef CONFIG_CMD_PXE +# define BOOT_TARGET_PXE(func) func(PXE, pxe, na) +#else +# define BOOT_TARGET_PXE(func) +#endif + +#ifdef CONFIG_CMD_DHCP +# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) +#else +# define BOOT_TARGET_DHCP(func) +#endif + +#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_MMC(func) \ + func(TI_MMC, ti_mmc, na) \ + func(MMC, mmc, 0) \ + func(MMC, mmc, 1) +#else +#define BOOT_TARGET_MMC(func) +#endif + +#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance) + +#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \ + "ti_mmc " + +#ifdef CONFIG_CMD_USB +# define BOOT_TARGET_USB(func) func(USB, usb, 0) +#else +# define BOOT_TARGET_USB(func) +#endif + +#define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_MMC(func) \ + BOOT_TARGET_USB(func) \ + BOOT_TARGET_PXE(func) \ + BOOT_TARGET_DHCP(func) + +#include <config_distro_bootcmd.h> + +/* Incorporate settings into the U-Boot environment */ +#define CFG_EXTRA_ENV_SETTINGS \ + BOOTENV + +#endif + +#endif /* CONFIG_ARM64 */ + #endif /* __CONFIG_TI_ARMV7_COMMON_H__ */

Hi Manorit,
On Thu, 13 Jul 2023 at 23:54, Manorit Chawdhry m-chawdhry@ti.com wrote:
Since K3 devices are moving towards distroboot, remove duplicates and add it in common file to import from.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
include/configs/am62ax_evm.h | 71 --------------------------------------- include/configs/am62x_evm.h | 27 --------------- include/configs/j721e_evm.h | 31 ----------------- include/configs/j721s2_evm.h | 3 -- include/configs/ti_armv7_common.h | 50 +++++++++++++++++++++++++++ 5 files changed, 50 insertions(+), 132 deletions(-)
Can you use standard boot instead?
[..]
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 149a74d98e8a..dbbeff34ba82 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -154,4 +154,54 @@ #define NETARGS "" #endif
+#ifdef CONFIG_ARM64 +#ifdef CONFIG_DISTRO_DEFAULTS +#ifdef CONFIG_CMD_PXE +# define BOOT_TARGET_PXE(func) func(PXE, pxe, na) +#else +# define BOOT_TARGET_PXE(func) +#endif
+#ifdef CONFIG_CMD_DHCP +# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) +#else +# define BOOT_TARGET_DHCP(func) +#endif
+#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_MMC(func) \
func(TI_MMC, ti_mmc, na) \
func(MMC, mmc, 0) \
func(MMC, mmc, 1)
+#else +#define BOOT_TARGET_MMC(func) +#endif
+#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance)
+#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \
"ti_mmc "
+#ifdef CONFIG_CMD_USB +# define BOOT_TARGET_USB(func) func(USB, usb, 0) +#else +# define BOOT_TARGET_USB(func) +#endif
+#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_MMC(func) \
BOOT_TARGET_USB(func) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
+#include <config_distro_bootcmd.h>
With standard boot you should be able to drop all of the above, since the normal order is mmc, usb, pxe, dhcp by default. But you can add a "boot_targets" env var if you like.
The one exception is TI_MMC. What is that, exactly?
+/* Incorporate settings into the U-Boot environment */ +#define CFG_EXTRA_ENV_SETTINGS \
BOOTENV
+#endif
+#endif /* CONFIG_ARM64 */
#endif /* __CONFIG_TI_ARMV7_COMMON_H__ */
-- 2.40.1
Regards, Simon

Hi Simon,
On 17:40-20230715, Simon Glass wrote:
Hi Manorit,
On Thu, 13 Jul 2023 at 23:54, Manorit Chawdhry m-chawdhry@ti.com wrote:
Since K3 devices are moving towards distroboot, remove duplicates and add it in common file to import from.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
include/configs/am62ax_evm.h | 71 --------------------------------------- include/configs/am62x_evm.h | 27 --------------- include/configs/j721e_evm.h | 31 ----------------- include/configs/j721s2_evm.h | 3 -- include/configs/ti_armv7_common.h | 50 +++++++++++++++++++++++++++ 5 files changed, 50 insertions(+), 132 deletions(-)
Can you use standard boot instead?
[..]
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h index 149a74d98e8a..dbbeff34ba82 100644 --- a/include/configs/ti_armv7_common.h +++ b/include/configs/ti_armv7_common.h @@ -154,4 +154,54 @@ #define NETARGS "" #endif
+#ifdef CONFIG_ARM64 +#ifdef CONFIG_DISTRO_DEFAULTS +#ifdef CONFIG_CMD_PXE +# define BOOT_TARGET_PXE(func) func(PXE, pxe, na) +#else +# define BOOT_TARGET_PXE(func) +#endif
+#ifdef CONFIG_CMD_DHCP +# define BOOT_TARGET_DHCP(func) func(DHCP, dhcp, na) +#else +# define BOOT_TARGET_DHCP(func) +#endif
+#ifdef CONFIG_CMD_MMC +#define BOOT_TARGET_MMC(func) \
func(TI_MMC, ti_mmc, na) \
func(MMC, mmc, 0) \
func(MMC, mmc, 1)
+#else +#define BOOT_TARGET_MMC(func) +#endif
+#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance)
+#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \
"ti_mmc "
+#ifdef CONFIG_CMD_USB +# define BOOT_TARGET_USB(func) func(USB, usb, 0) +#else +# define BOOT_TARGET_USB(func) +#endif
+#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_MMC(func) \
BOOT_TARGET_USB(func) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
+#include <config_distro_bootcmd.h>
With standard boot you should be able to drop all of the above, since the normal order is mmc, usb, pxe, dhcp by default. But you can add a "boot_targets" env var if you like.
The one exception is TI_MMC. What is that, exactly?
TI_MMC is our custom boot mechanism that we actually support as a part of our SDK, we had been using this in am62ax like the way I have done here, am not really sure why we hooked it into the distroboot if that is the question that you are asking, maybe Nishanth/Bryan can help with that as Bryan had done it for am62ax [0] but we do this boot mechanism for sure.
[0]: https://lore.kernel.org/u-boot/20221224011525.4696-5-bb@ti.com/
Regards, Manorit
+/* Incorporate settings into the U-Boot environment */ +#define CFG_EXTRA_ENV_SETTINGS \
BOOTENV
+#endif
+#endif /* CONFIG_ARM64 */
#endif /* __CONFIG_TI_ARMV7_COMMON_H__ */
-- 2.40.1
Regards, Simon

On 13:39-20230717, Manorit Chawdhry wrote:
[...]
+#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_MMC(func) \
BOOT_TARGET_USB(func) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
+#include <config_distro_bootcmd.h>
With standard boot you should be able to drop all of the above, since the normal order is mmc, usb, pxe, dhcp by default. But you can add a "boot_targets" env var if you like.
The one exception is TI_MMC. What is that, exactly?
TI_MMC is our custom boot mechanism that we actually support as a part of our SDK, we had been using this in am62ax like the way I have done here, am not really sure why we hooked it into the distroboot if that is the question that you are asking, maybe Nishanth/Bryan can help with that as Bryan had done it for am62ax [0] but we do this boot mechanism for sure.
2 cents: There is no reason for us to have our own TI_MMC option. we should just go standard_boot. all the SDK stuff really should be fixed if they dont work with standard_boot.

On July 17, 2023 thus sayeth Nishanth Menon:
On 13:39-20230717, Manorit Chawdhry wrote:
[...]
+#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_MMC(func) \
BOOT_TARGET_USB(func) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
+#include <config_distro_bootcmd.h>
With standard boot you should be able to drop all of the above, since the normal order is mmc, usb, pxe, dhcp by default. But you can add a "boot_targets" env var if you like.
The one exception is TI_MMC. What is that, exactly?
TI_MMC is our custom boot mechanism that we actually support as a part of our SDK, we had been using this in am62ax like the way I have done here, am not really sure why we hooked it into the distroboot if that is the question that you are asking, maybe Nishanth/Bryan can help with that as Bryan had done it for am62ax [0] but we do this boot mechanism for sure.
2 cents: There is no reason for us to have our own TI_MMC option. we should just go standard_boot. all the SDK stuff really should be fixed if they dont work with standard_boot.
I Agree. I put that in with the hopes we could just add a CFG_* or CONFIG_* option to compile our scripts out once we have everything in the SDK ready. But I agree with Nishanth, we should be looking at standard_boot now.
~Bryan

Hi,
On Mon, 17 Jul 2023 at 07:45, Nishanth Menon nm@ti.com wrote:
On 13:39-20230717, Manorit Chawdhry wrote:
[...]
+#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_MMC(func) \
BOOT_TARGET_USB(func) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
+#include <config_distro_bootcmd.h>
With standard boot you should be able to drop all of the above, since the normal order is mmc, usb, pxe, dhcp by default. But you can add a "boot_targets" env var if you like.
The one exception is TI_MMC. What is that, exactly?
TI_MMC is our custom boot mechanism that we actually support as a part of our SDK, we had been using this in am62ax like the way I have done here, am not really sure why we hooked it into the distroboot if that is the question that you are asking, maybe Nishanth/Bryan can help with that as Bryan had done it for am62ax [0] but we do this boot mechanism for sure.
2 cents: There is no reason for us to have our own TI_MMC option. we should just go standard_boot. all the SDK stuff really should be fixed if they dont work with standard_boot.
If for some reason you do need something special, it could be implemented as a new bootmeth, as has been done for ChromeOS.
Regards, Simon

Hi Simon,
On 16:04-20230718, Simon Glass wrote:
Hi,
On Mon, 17 Jul 2023 at 07:45, Nishanth Menon nm@ti.com wrote:
On 13:39-20230717, Manorit Chawdhry wrote:
[...]
+#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_MMC(func) \
BOOT_TARGET_USB(func) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
+#include <config_distro_bootcmd.h>
With standard boot you should be able to drop all of the above, since the normal order is mmc, usb, pxe, dhcp by default. But you can add a "boot_targets" env var if you like.
The one exception is TI_MMC. What is that, exactly?
TI_MMC is our custom boot mechanism that we actually support as a part of our SDK, we had been using this in am62ax like the way I have done here, am not really sure why we hooked it into the distroboot if that is the question that you are asking, maybe Nishanth/Bryan can help with that as Bryan had done it for am62ax [0] but we do this boot mechanism for sure.
2 cents: There is no reason for us to have our own TI_MMC option. we should just go standard_boot. all the SDK stuff really should be fixed if they dont work with standard_boot.
If for some reason you do need something special, it could be implemented as a new bootmeth, as has been done for ChromeOS.
Can you point me to the respective implementation file so that I can maybe have a look at it and see how we can do it for our platforms?
Regards, Manorit
Regards, Simon

Hi Manorit,
On Tue, 18 Jul 2023 at 22:46, Manorit Chawdhry m-chawdhry@ti.com wrote:
Hi Simon,
On 16:04-20230718, Simon Glass wrote:
Hi,
On Mon, 17 Jul 2023 at 07:45, Nishanth Menon nm@ti.com wrote:
On 13:39-20230717, Manorit Chawdhry wrote:
[...]
+#define BOOT_TARGET_DEVICES(func) \
BOOT_TARGET_MMC(func) \
BOOT_TARGET_USB(func) \
BOOT_TARGET_PXE(func) \
BOOT_TARGET_DHCP(func)
+#include <config_distro_bootcmd.h>
With standard boot you should be able to drop all of the above, since the normal order is mmc, usb, pxe, dhcp by default. But you can add a "boot_targets" env var if you like.
The one exception is TI_MMC. What is that, exactly?
TI_MMC is our custom boot mechanism that we actually support as a part of our SDK, we had been using this in am62ax like the way I have done here, am not really sure why we hooked it into the distroboot if that is the question that you are asking, maybe Nishanth/Bryan can help with that as Bryan had done it for am62ax [0] but we do this boot mechanism for sure.
2 cents: There is no reason for us to have our own TI_MMC option. we should just go standard_boot. all the SDK stuff really should be fixed if they dont work with standard_boot.
If for some reason you do need something special, it could be implemented as a new bootmeth, as has been done for ChromeOS.
Can you point me to the respective implementation file so that I can maybe have a look at it and see how we can do it for our platforms?
Yes, please see boot/bootmeth_uclass.c for the uclass and boot/bootmeth_*.c for the impls.
https://u-boot.readthedocs.io/en/latest/develop/bootstd.html#bootmeth
Regards, Simon

From: Kamlesh Gurudasani kamlesh@ti.com
Default to common bootcmd that is set across all k3 devices.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com Signed-off-by: Kamlesh Gurudasani kamlesh@ti.com --- configs/am62ax_evm_a53_defconfig | 1 + configs/am62x_evm_a53_defconfig | 3 +-- configs/am64x_evm_a53_defconfig | 2 +- configs/j7200_evm_a72_defconfig | 2 +- configs/j721e_evm_a72_defconfig | 2 +- configs/j721s2_evm_a72_defconfig | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig index 76ec5ed40463..773cf3a591c6 100644 --- a/configs/am62ax_evm_a53_defconfig +++ b/configs/am62ax_evm_a53_defconfig @@ -23,6 +23,7 @@ CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_DISTRO_DEFAULTS=y +CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_PAD_TO=0x0 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig index 7c3bc184cf73..de90663383ec 100644 --- a/configs/am62x_evm_a53_defconfig +++ b/configs/am62x_evm_a53_defconfig @@ -29,8 +29,7 @@ CONFIG_SPL_SPI=y 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_SPL_MAX_SIZE=0x58000 +CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x80c80000 CONFIG_SPL_BSS_MAX_SIZE=0x80000 diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index 123a70049aeb..f792b5859e94 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_SPI=y 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 run_kern" +CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" 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 0abc865cb5d5..c68d52537e54 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_evm_a72_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_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;" +CONFIG_BOOTCOMMAND="run envboot; 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 825dbd865cd9..525f150e91d9 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_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 envboot; 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 13c1a0cdbe9b..d59f3156d105 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_evm_a72_defconfig @@ -32,7 +32,7 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_SYSTEM_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 envboot; run distro_bootcmd;" CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y

Hi Manorit,
On 14/07/23 11:22, Manorit Chawdhry wrote:
From: Kamlesh Gurudasani kamlesh@ti.com
Default to common bootcmd that is set across all k3 devices.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com Signed-off-by: Kamlesh Gurudasani kamlesh@ti.com
configs/am62ax_evm_a53_defconfig | 1 + configs/am62x_evm_a53_defconfig | 3 +-- configs/am64x_evm_a53_defconfig | 2 +- configs/j7200_evm_a72_defconfig | 2 +- configs/j721e_evm_a72_defconfig | 2 +- configs/j721s2_evm_a72_defconfig | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig index 76ec5ed40463..773cf3a591c6 100644 --- a/configs/am62ax_evm_a53_defconfig +++ b/configs/am62ax_evm_a53_defconfig @@ -23,6 +23,7 @@ CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_DISTRO_DEFAULTS=y +CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_PAD_TO=0x0 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig index 7c3bc184cf73..de90663383ec 100644 --- a/configs/am62x_evm_a53_defconfig +++ b/configs/am62x_evm_a53_defconfig @@ -29,8 +29,7 @@ CONFIG_SPL_SPI=y 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_SPL_MAX_SIZE=0x58000
Please add this config back.
+CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x80c80000 CONFIG_SPL_BSS_MAX_SIZE=0x80000 diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index 123a70049aeb..f792b5859e94 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_SPI=y 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 run_kern" +CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" 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 0abc865cb5d5..c68d52537e54 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_evm_a72_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_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;" +CONFIG_BOOTCOMMAND="run envboot; 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 825dbd865cd9..525f150e91d9 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_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 envboot; 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 13c1a0cdbe9b..d59f3156d105 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_evm_a72_defconfig @@ -32,7 +32,7 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_SYSTEM_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 envboot; run distro_bootcmd;" CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
Thanks, Nikhil

Hi Manorit,
On 14/07/23 11:22, Manorit Chawdhry wrote:
From: Kamlesh Gurudasani kamlesh@ti.com
Default to common bootcmd that is set across all k3 devices.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com Signed-off-by: Kamlesh Gurudasani kamlesh@ti.com
configs/am62ax_evm_a53_defconfig | 1 + configs/am62x_evm_a53_defconfig | 3 +-- configs/am64x_evm_a53_defconfig | 2 +- configs/j7200_evm_a72_defconfig | 2 +- configs/j721e_evm_a72_defconfig | 2 +- configs/j721s2_evm_a72_defconfig | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig index 76ec5ed40463..773cf3a591c6 100644 --- a/configs/am62ax_evm_a53_defconfig +++ b/configs/am62ax_evm_a53_defconfig @@ -23,6 +23,7 @@ CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_DISTRO_DEFAULTS=y +CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_PAD_TO=0x0 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/configs/am62x_evm_a53_defconfig b/configs/am62x_evm_a53_defconfig index 7c3bc184cf73..de90663383ec 100644 --- a/configs/am62x_evm_a53_defconfig +++ b/configs/am62x_evm_a53_defconfig @@ -29,8 +29,7 @@ CONFIG_SPL_SPI=y 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_SPL_MAX_SIZE=0x58000
Please add this config back.
+CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" CONFIG_SPL_HAS_BSS_LINKER_SECTION=y CONFIG_SPL_BSS_START_ADDR=0x80c80000 CONFIG_SPL_BSS_MAX_SIZE=0x80000 diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index 123a70049aeb..f792b5859e94 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_SPI=y 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 run_kern" +CONFIG_BOOTCOMMAND="run envboot; run distro_bootcmd;" 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 0abc865cb5d5..c68d52537e54 100644 --- a/configs/j7200_evm_a72_defconfig +++ b/configs/j7200_evm_a72_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_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;" +CONFIG_BOOTCOMMAND="run envboot; 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 825dbd865cd9..525f150e91d9 100644 --- a/configs/j721e_evm_a72_defconfig +++ b/configs/j721e_evm_a72_defconfig @@ -33,7 +33,7 @@ CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_BOARD_SETUP=y CONFIG_OF_SYSTEM_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 envboot; 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 13c1a0cdbe9b..d59f3156d105 100644 --- a/configs/j721s2_evm_a72_defconfig +++ b/configs/j721s2_evm_a72_defconfig @@ -32,7 +32,7 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 CONFIG_OF_SYSTEM_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 envboot; run distro_bootcmd;" CONFIG_LOGLEVEL=7 CONFIG_SPL_MAX_SIZE=0xc0000 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
Thanks, Nikhil

Fit signature mechanism through the standards require the presence of .key and .crt in the folder with the same name, since we are using our custMpk only for the signing, update the format to that of standards to be compatible for packaging easily.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- board/ti/keys/custMpk.crt | 33 ++++++++++++++++++++++++++++++ board/ti/keys/custMpk.key | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+)
diff --git a/board/ti/keys/custMpk.crt b/board/ti/keys/custMpk.crt new file mode 100644 index 000000000000..01bd64aae577 --- /dev/null +++ b/board/ti/keys/custMpk.crt @@ -0,0 +1,33 @@ +-----BEGIN CERTIFICATE----- +MIIFwzCCA6sCFHKW0ueol0+vsilVaZyqKhppo9ryMA0GCSqGSIb3DQEBCwUAMIGd +MQswCQYDVQQGEwJVUzELMAkGA1UECAwCVFgxDzANBgNVBAcMBkRhbGxhczEnMCUG +A1UECgweVGV4YXMgSW5zdHJ1bWVudHMgSW5jb3Jwb3JhdGVkMRMwEQYDVQQLDApQ +cm9jZXNzb3JzMRMwEQYDVQQDDApUSSBTdXBwb3J0MR0wGwYJKoZIhvcNAQkBFg5z +dXBwb3J0QHRpLmNvbTAeFw0yMzA2MDEwNTIxMTZa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GbfBk3rq+KMUwbk5E29mSMmAJ9DNNozudgKkKq9w +RmcO1bXCEspFgNvNEkYAQCBvMOyH/nCyFu9QzOzN35XIzf0fI3jM6rueLxSXq3xO +7yHUZ3mzAZp6e1Qo6cuABAw1q6KqKYJCnJ3Nq6F42bmGp8mSD+2AuGV8cU+7Z3sh +k/ooFMCsulj1R5+TlKgEfqspQXbefEsvRW3n3ZD8bcQF0ytiX7XVmDMFVpQkTzps +92fjZ08Zcj7bCZQsFXXACIQkMiTiiMW6NwLFZDyq11/B1oe1bhjFUuqqUkHC/PKx +gdWRwluGRt+onFRD5/upXnugKT99j/hQ7sy80a64A1xoCcKVbwcHU7YBQG1vLk6D +idg0vI3gj7v+/jZEPkv/KrqAI6YuvpplkcHkEKuAUFAkozvVJ5pPK3K0xHBJGNMK +kJ9FMAakFj6jfZaR5Ay3ZuOAn5oPMwd6RaauNOzVpBll6DFOyw2rU6fbId/gi841 +drmBfM6ufue6ecslkp9zSOpPLXhjt2g9NRVKPE20CmRetVSDLcMFet7ZImbxqggw +yjDxA7oR+Px+o+xr+djcDlfj6500Rys6W1SNHe99HXOCcpQqivX0 +-----END CERTIFICATE----- diff --git a/board/ti/keys/custMpk.key b/board/ti/keys/custMpk.key new file mode 100644 index 000000000000..adba378c8008 --- /dev/null +++ b/board/ti/keys/custMpk.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKQIBAAKCAgEAvxSuSdh/ctNrI83rSA5l3CJN8g5PgvbttfLd23yR+m5Z/9X3 +tt4EHYrM0pXZ0eDEwfhQv/9IDJEiUJpMe4vzlgooJrOk2eCpVUEa+z5bJ2y/ysBx +ry9yIu5GASVirT7HBPaxGLYswBJuD+KbPuWmoKgGRQNBF04WH6l01oRO1nmnELgR +qQ6SHyXdf7Hy0bnyaNgzWUuCfXfM0Zz6I7T7WIjyzerVFvIsdS36YsPBCW7gBnDg +tQcJmWLZ1uTnbG3IggdQk/fi2O3RX+PQns+TVNlf3V3ON2Dx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bEaZQJjAwV+YPEwldny7F47xEM9JVz +EtKlAoIBAQDUt62u3GdGE/p5/ZgqWoDRTyDEDfmN9aYFbmbdEP80xQE7FrxMaZhz +K7laja6SWmUm40nQ/c45bQQp4uLtKHcxU15egX7YRBTLZl5o5IasZR79ebnEm2O8 +l9kEZeU1USf3mmWmP4GExOZCRfqaiYA6BbUCdJXTqKdXeWnkAssV8UrS3JFoJHpq +yo7OWGqefyQ8nRW6jO9SW7uaqtUD+7H6aF5XSk3YWvusfdBZrHNH+fM/hpnZovaL +Us7ogTDS/laA8PyK37jYfMVdQhmZoU1Iomt3zkUWK3gt/aWPpfAlQf4Jka4YspZB +tNiijefaZ1hPqsPs5Joyd/YAhdsfaHc1AoIBAQCn/9j6RRjRaw0ip756oad4AXHz +XBwVB2CrY96qT6Hj9Sq7tGgdskqGkOQkAivBLBizUdcWv0t1yenOsSgasQeMlvlh +B8md9cLvpKXPB3HM3rTDH/xNXe0TpVKLf7SXC8HfDyIweHwMW3QgO2DWrvI4BV/T +ckBatRNQ90HxkqGFhC/Mp529lQlyg3ifxPxJsvZOyPMUnrflAvsKQk5c2ZiQg3nZ +h7I2pjSYgCl+Ib52l8p9bf1kcrVGgPM+auzm496i0RPobFeDBoBvSoznJktHJ7+3 +NnZH+jLiZCODiQPGtQUi+T6eIZUIJF0YASpsCCtUzXCxwW3lYIDNy7UlMivF +-----END RSA PRIVATE KEY-----

On 7/14/23 12:52 AM, Manorit Chawdhry wrote:
Fit signature mechanism through the standards require the presence of .key and .crt in the folder with the same name, since we are using our custMpk only for the signing, update the format to that of standards to be compatible for packaging easily.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
board/ti/keys/custMpk.crt | 33 ++++++++++++++++++++++++++++++ board/ti/keys/custMpk.key | 51 +++++++++++++++++++++++++++++++++++++++++++++++
The key file should be the same as board/ti/keys/custMpk.pem, right? If so why do we need this new name?
Also the crt contains information about the person signing the images, it should be generated at build time from a template, not provided here in binary format. Certs also have an expiration data, so this would become invalid at some point.
This whole series needs split up, the first half seems like mostly reasonable cleanups. But the second half I'm not so sure about and depends on the binman patches.
Andrew
2 files changed, 84 insertions(+)
diff --git a/board/ti/keys/custMpk.crt b/board/ti/keys/custMpk.crt new file mode 100644 index 000000000000..01bd64aae577 --- /dev/null +++ b/board/ti/keys/custMpk.crt @@ -0,0 +1,33 @@ +-----BEGIN CERTIFICATE----- +MIIFwzCCA6sCFHKW0ueol0+vsilVaZyqKhppo9ryMA0GCSqGSIb3DQEBCwUAMIGd +MQswCQYDVQQGEwJVUzELMAkGA1UECAwCVFgxDzANBgNVBAcMBkRhbGxhczEnMCUG +A1UECgweVGV4YXMgSW5zdHJ1bWVudHMgSW5jb3Jwb3JhdGVkMRMwEQYDVQQLDApQ +cm9jZXNzb3JzMRMwEQYDVQQDDApUSSBTdXBwb3J0MR0wGwYJKoZIhvcNAQkBFg5z +dXBwb3J0QHRpLmNvbTAeFw0yMzA2MDEwNTIxMTZaFw0zMzA1MjkwNTIxMTZaMIGd +MQswCQYDVQQGEwJVUzELMAkGA1UECAwCVFgxDzANBgNVBAcMBkRhbGxhczEnMCUG +A1UECgweVGV4YXMgSW5zdHJ1bWVudHMgSW5jb3Jwb3JhdGVkMRMwEQYDVQQLDApQ +cm9jZXNzb3JzMRMwEQYDVQQDDApUSSBTdXBwb3J0MR0wGwYJKoZIhvcNAQkBFg5z +dXBwb3J0QHRpLmNvbTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL8U +rknYf3LTayPN60gOZdwiTfIOT4L27bXy3dt8kfpuWf/V97beBB2KzNKV2dHgxMH4 +UL//SAyRIlCaTHuL85YKKCazpNngqVVBGvs+Wydsv8rAca8vciLuRgElYq0+xwT2 +sRi2LMASbg/imz7lpqCoBkUDQRdOFh+pdNaETtZ5pxC4EakOkh8l3X+x8tG58mjY +M1lLgn13zNGc+iO0+1iI8s3q1RbyLHUt+mLDwQlu4AZw4LUHCZli2dbk52xtyIIH +UJP34tjt0V/j0J7Pk1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ggw +yjDxA7oR+Px+o+xr+djcDlfj6500Rys6W1SNHe99HXOCcpQqivX0 +-----END CERTIFICATE----- diff --git a/board/ti/keys/custMpk.key b/board/ti/keys/custMpk.key new file mode 100644 index 000000000000..adba378c8008 --- /dev/null +++ b/board/ti/keys/custMpk.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKQIBAAKCAgEAvxSuSdh/ctNrI83rSA5l3CJN8g5PgvbttfLd23yR+m5Z/9X3 +tt4EHYrM0pXZ0eDEwfhQv/9IDJEiUJpMe4vzlgooJrOk2eCpVUEa+z5bJ2y/ysBx +ry9yIu5GASVirT7HBPaxGLYswBJuD+KbPuWmoKgGRQNBF04WH6l01oRO1nmnELgR +qQ6SHyXdf7Hy0bnyaNgzWUuCfXfM0Zz6I7T7WIjyzerVFvIsdS36YsPBCW7gBnDg +tQcJmWLZ1uTnbG3IggdQk/fi2O3RX+PQns+TVNlf3V3ON2DxqxSKBHtlp7p/30VF +fEuhW65OxpQ9jE6H0pQ8pPOf2vzyNnznDa1aQjfxKoHQbqGnZwMeh+0Au3NKaCgx +ooKaowTB6If/RX6qwZ/UOwXHg/0hcf69fzjJFhlSDuYDM40dHsk2HM1OnYIpiM2b +Kr5sX3uysjp5AGp99a0anR7NWCrPXvROgKs7T9341N40osQg2VkZLYUCXh9osUyN +uREG6S12tViMUKg3bmZ4b4MwRk00n7QYSrm7+nvFrtYyEISEbD+agDM1/E281W5g +VFDPfm2AlwT6jwsg/b2YK6E3vVn9SuxFoQmLF8lyFDO3BV4SXeJaHc4hVPbh6tVV +qifrTQnfGUCCLmaJF2XZbrPWOE6NYRbWdNTeFl9RGdVCuIPSyN5LqWmXto0CAwEA +AQKCAgAzkAwcJ0z1GnId/lJQZno8NhGckRoJuEKbR8dwlCP8VUz6Ca5H7Y9kvXDa +Hs/hn+rYgP6hYOz7XyrIX2rmJ/T6dxEwqGeC1+o59FConcIRWHpE5zuGT6JYJL5F +TuZa48bm4v8VMQvQZOjI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kqGFhC/Mp529lQlyg3ifxPxJsvZOyPMUnrflAvsKQk5c2ZiQg3nZ +h7I2pjSYgCl+Ib52l8p9bf1kcrVGgPM+auzm496i0RPobFeDBoBvSoznJktHJ7+3 +NnZH+jLiZCODiQPGtQUi+T6eIZUIJF0YASpsCCtUzXCxwW3lYIDNy7UlMivF +-----END RSA PRIVATE KEY-----

On 09:32-20230714, Andrew Davis wrote:
On 7/14/23 12:52 AM, Manorit Chawdhry wrote:
Fit signature mechanism through the standards require the presence of .key and .crt in the folder with the same name, since we are using our custMpk only for the signing, update the format to that of standards to be compatible for packaging easily.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
board/ti/keys/custMpk.crt | 33 ++++++++++++++++++++++++++++++ board/ti/keys/custMpk.key | 51 +++++++++++++++++++++++++++++++++++++++++++++++
The key file should be the same as board/ti/keys/custMpk.pem, right? If so why do we need this new name?
Also the crt contains information about the person signing the images, it should be generated at build time from a template, not provided here in binary format. Certs also have an expiration data, so this would become invalid at some point.
Yeah, I agree to that, we had to do this initially as there was no other way of packaging it through Yocto but it is better that we clean all this up and keep U-boot as it should be and Yocto part be handled separately. Yocto can generate the cert and the keys as it requires itself so we don't require this patch anymore and will be dropping it so that Yocto can clean that when required to integrate this.
This whole series needs split up, the first half seems like mostly reasonable cleanups. But the second half I'm not so sure about and depends on the binman patches.
I am thinking of keeping the FIT_SIGNATURE series on hold as I believe binman is having some changes in that, I can re-roll the other part of the series later, wasn't expecting a lot of changes in binman so had posted this also but will wait till it stabilizes.
Manorit
Andrew
2 files changed, 84 insertions(+)
diff --git a/board/ti/keys/custMpk.crt b/board/ti/keys/custMpk.crt new file mode 100644 index 000000000000..01bd64aae577 --- /dev/null +++ b/board/ti/keys/custMpk.crt @@ -0,0 +1,33 @@ +-----BEGIN CERTIFICATE----- +MIIFwzCCA6sCFHKW0ueol0+vsilVaZyqKhppo9ryMA0GCSqGSIb3DQEBCwUAMIGd +MQswCQYDVQQGEwJVUzELMAkGA1UECAwCVFg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z/UrsRaEJixfJchQztwVeEl3iWh3OIVT24erVVaon600J3xlAgi5miRdl +2W6z1jhOjWEW1nTU3hZfURnVQriD0sjeS6lpl7aNAgMBAAEwDQYJKoZIhvcNAQEL +BQADggIBAHy+h1FQKedFTJWgqGJkTwtcym5LyXD6ig8LyhJpVEbXmqK7ZKY2F2hB +PqVbfCZNogszIvl8q3ykz+tcGbfBk3rq+KMUwbk5E29mSMmAJ9DNNozudgKkKq9w +RmcO1bXCEspFgNvNEkYAQCBvMOyH/nCyFu9QzOzN35XIzf0fI3jM6rueLxSXq3xO +7yHUZ3mzAZp6e1Qo6cuABAw1q6KqKYJCnJ3Nq6F42bmGp8mSD+2AuGV8cU+7Z3sh +k/ooFMCsulj1R5+TlKgEfqspQXbefEsvRW3n3ZD8bcQF0ytiX7XVmDMFVpQkTzps +92fjZ08Zcj7bCZQsFXXACIQkMiTiiMW6NwLFZDyq11/B1oe1bhjFUuqqUkHC/PKx +gdWRwluGRt+onFRD5/upXnugKT99j/hQ7sy80a64A1xoCcKVbwcHU7YBQG1vLk6D +idg0vI3gj7v+/jZEPkv/KrqAI6YuvpplkcHkEKuAUFAkozvVJ5pPK3K0xHBJGNMK +kJ9FMAakFj6jfZaR5Ay3ZuOAn5oPMwd6RaauNOzVpBll6DFOyw2rU6fbId/gi841 +drmBfM6ufue6ecslkp9zSOpPLXhjt2g9NRVKPE20CmRetVSDLcMFet7ZImbxqggw +yjDxA7oR+Px+o+xr+djcDlfj6500Rys6W1SNHe99HXOCcpQqivX0 +-----END CERTIFICATE----- diff --git a/board/ti/keys/custMpk.key b/board/ti/keys/custMpk.key new file mode 100644 index 000000000000..adba378c8008 --- /dev/null +++ b/board/ti/keys/custMpk.key @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKQIBAAKCAgEAvxSuSdh/ctNrI83rSA5l3CJN8g5PgvbttfLd23yR+m5Z/9X3 +tt4EHYrM0pXZ0eDEwfhQv/9IDJEiUJpMe4vzlgooJr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2TlJJcxYULMCIVvhy60PR0zG29E9biqBPhJjKUvhEcQK +e3LxcXyq6fdHXphFajLUxLbuTl+kTgBRFoBnclFGbsubh5PTsA3J+p+fQLZNPPar +veg4l82cZykQYU8pGkUaI3sUMYd3+zd7sqRP5JHs9pMGPRmY4YW2CsAIWIn5UZNB +ARMDP76vKKn8cyUgMuxb+9pU/OVLN2NPs4bEaZQJjAwV+YPEwldny7F47xEM9JVz +EtKlAoIBAQDUt62u3GdGE/p5/ZgqWoDRTyDEDfmN9aYFbmbdEP80xQE7FrxMaZhz +K7laja6SWmUm40nQ/c45bQQp4uLtKHcxU15egX7YRBTLZl5o5IasZR79ebnEm2O8 +l9kEZeU1USf3mmWmP4GExOZCRfqaiYA6BbUCdJXTqKdXeWnkAssV8UrS3JFoJHpq +yo7OWGqefyQ8nRW6jO9SW7uaqtUD+7H6aF5XSk3YWvusfdBZrHNH+fM/hpnZovaL +Us7ogTDS/laA8PyK37jYfMVdQhmZoU1Iomt3zkUWK3gt/aWPpfAlQf4Jka4YspZB +tNiijefaZ1hPqsPs5Joyd/YAhdsfaHc1AoIBAQCn/9j6RRjRaw0ip756oad4AXHz +XBwVB2CrY96qT6Hj9Sq7tGgdskqGkOQkAivBLBizUdcWv0t1yenOsSgasQeMlvlh +B8md9cLvpKXPB3HM3rTDH/xNXe0TpVKLf7SXC8HfDyIweHwMW3QgO2DWrvI4BV/T +ckBatRNQ90HxkqGFhC/Mp529lQlyg3ifxPxJsvZOyPMUnrflAvsKQk5c2ZiQg3nZ +h7I2pjSYgCl+Ib52l8p9bf1kcrVGgPM+auzm496i0RPobFeDBoBvSoznJktHJ7+3 +NnZH+jLiZCODiQPGtQUi+T6eIZUIJF0YASpsCCtUzXCxwW3lYIDNy7UlMivF +-----END RSA PRIVATE KEY-----

FIT signature requires the updates to u-boot.dtb and the DTB that we pack don't get updates with the changes of the signature node.
Pack u-boot.dtb as the default DTB so that the signature node changes can be reflected in them.
(Note, this is only packaging the primary platform and the secondary platform will require manual changes for the FIT signature enablement)
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com [ add additional boards that were missing ] Signed-off-by: Kamlesh Gurudasani kamlesh@ti.com --- arch/arm/dts/k3-am625-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am62a-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am64x-binman.dtsi | 2 +- arch/arm/dts/k3-am65x-binman.dtsi | 2 +- arch/arm/dts/k3-j7200-binman.dtsi | 2 +- arch/arm/dts/k3-j721e-binman.dtsi | 2 +- arch/arm/dts/k3-j721s2-binman.dtsi | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/arm/dts/k3-am625-sk-binman.dtsi b/arch/arm/dts/k3-am625-sk-binman.dtsi index c5bd9e48d060..8efba572addb 100644 --- a/arch/arm/dts/k3-am625-sk-binman.dtsi +++ b/arch/arm/dts/k3-am625-sk-binman.dtsi @@ -145,7 +145,7 @@ #define SPL_AM625_SK_DTB "spl/dts/k3-am625-sk.dtb"
#define UBOOT_NODTB "u-boot-nodtb.bin" -#define AM625_SK_DTB "arch/arm/dts/k3-am625-sk.dtb" +#define AM625_SK_DTB "u-boot.dtb"
&binman { ti-dm { diff --git a/arch/arm/dts/k3-am62a-sk-binman.dtsi b/arch/arm/dts/k3-am62a-sk-binman.dtsi index abbac8f08481..eb1f7a929fa9 100644 --- a/arch/arm/dts/k3-am62a-sk-binman.dtsi +++ b/arch/arm/dts/k3-am62a-sk-binman.dtsi @@ -148,7 +148,7 @@ #define SPL_AM62A7_SK_DTB "spl/dts/k3-am62a7-sk.dtb"
#define UBOOT_NODTB "u-boot-nodtb.bin" -#define AM62A7_SK_DTB "arch/arm/dts/k3-am62a7-sk.dtb" +#define AM62A7_SK_DTB "u-boot.dtb"
&binman { ti-dm { diff --git a/arch/arm/dts/k3-am64x-binman.dtsi b/arch/arm/dts/k3-am64x-binman.dtsi index e6ca2457b47d..24f562aafd79 100644 --- a/arch/arm/dts/k3-am64x-binman.dtsi +++ b/arch/arm/dts/k3-am64x-binman.dtsi @@ -123,7 +123,7 @@ #define SPL_AM642_SK_DTB "spl/dts/k3-am642-sk.dtb"
#define UBOOT_NODTB "u-boot-nodtb.bin" -#define AM642_EVM_DTB "arch/arm/dts/k3-am642-evm.dtb" +#define AM642_EVM_DTB "u-boot.dtb" #define AM642_SK_DTB "arch/arm/dts/k3-am642-sk.dtb"
&binman { diff --git a/arch/arm/dts/k3-am65x-binman.dtsi b/arch/arm/dts/k3-am65x-binman.dtsi index 6535b9fec2cc..90ea220a2f6c 100644 --- a/arch/arm/dts/k3-am65x-binman.dtsi +++ b/arch/arm/dts/k3-am65x-binman.dtsi @@ -210,7 +210,7 @@ #define SPL_AM654_EVM_DTB "spl/dts/k3-am654-base-board.dtb"
#define UBOOT_NODTB "u-boot-nodtb.bin" -#define AM654_EVM_DTB "arch/arm/dts/k3-am654-base-board.dtb" +#define AM654_EVM_DTB "u-boot.dtb"
&binman { ti-spl { diff --git a/arch/arm/dts/k3-j7200-binman.dtsi b/arch/arm/dts/k3-j7200-binman.dtsi index 61bf5769701b..2a1be4a9e09d 100644 --- a/arch/arm/dts/k3-j7200-binman.dtsi +++ b/arch/arm/dts/k3-j7200-binman.dtsi @@ -184,7 +184,7 @@ #define SPL_J7200_EVM_DTB "spl/dts/k3-j7200-common-proc-board.dtb"
#define UBOOT_NODTB "u-boot-nodtb.bin" -#define J7200_EVM_DTB "arch/arm/dts/k3-j7200-common-proc-board.dtb" +#define J7200_EVM_DTB "u-boot.dtb"
&binman { ti-dm { diff --git a/arch/arm/dts/k3-j721e-binman.dtsi b/arch/arm/dts/k3-j721e-binman.dtsi index 0455deb6ca8a..48a21e838b06 100644 --- a/arch/arm/dts/k3-j721e-binman.dtsi +++ b/arch/arm/dts/k3-j721e-binman.dtsi @@ -299,7 +299,7 @@ #define SPL_J721E_SK_DTB "spl/dts/k3-j721e-sk.dtb"
#define UBOOT_NODTB "u-boot-nodtb.bin" -#define J721E_EVM_DTB "arch/arm/dts/k3-j721e-common-proc-board.dtb" +#define J721E_EVM_DTB "u-boot.dtb" #define J721E_SK_DTB "arch/arm/dts/k3-j721e-sk.dtb"
&binman { diff --git a/arch/arm/dts/k3-j721s2-binman.dtsi b/arch/arm/dts/k3-j721s2-binman.dtsi index 7fd7ba8e5d79..6a157ff0ee3d 100644 --- a/arch/arm/dts/k3-j721s2-binman.dtsi +++ b/arch/arm/dts/k3-j721s2-binman.dtsi @@ -146,7 +146,7 @@ #define SPL_AM68_SK_DTB "spl/dts/k3-am68-sk-base-board.dtb"
#define UBOOT_NODTB "u-boot-nodtb.bin" -#define J721S2_EVM_DTB "arch/arm/dts/k3-j721s2-common-proc-board.dtb" +#define J721S2_EVM_DTB "u-boot.dtb" #define AM68_SK_DTB "arch/arm/dts/k3-am68-sk-base-board.dtb"
&binman {

On Thu, 13 Jul 2023 at 23:55, Manorit Chawdhry m-chawdhry@ti.com wrote:
FIT signature requires the updates to u-boot.dtb and the DTB that we pack don't get updates with the changes of the signature node.
Pack u-boot.dtb as the default DTB so that the signature node changes can be reflected in them.
(Note, this is only packaging the primary platform and the secondary platform will require manual changes for the FIT signature enablement)
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com [ add additional boards that were missing ] Signed-off-by: Kamlesh Gurudasani kamlesh@ti.com
arch/arm/dts/k3-am625-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am62a-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am64x-binman.dtsi | 2 +- arch/arm/dts/k3-am65x-binman.dtsi | 2 +- arch/arm/dts/k3-j7200-binman.dtsi | 2 +- arch/arm/dts/k3-j721e-binman.dtsi | 2 +- arch/arm/dts/k3-j721s2-binman.dtsi | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org

We are using our custMpk for signing that is a 4096 bit key, 4096 bit rsa key requires a SHA512 hashing algorithm to be enabled as per the source. Even though it is not mandated but this is how it works and is tested.
Enables SHA512 if fit signature is enabled on K3 platforms.
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- lib/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/lib/Kconfig b/lib/Kconfig index c8b3ec1ec9c3..3926652db639 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -508,6 +508,7 @@ config SHA256
config SHA512 bool "Enable SHA512 support" + default y if TI_SECURE_DEVICE && FIT_SIGNATURE help This option enables support of hashing using SHA512 algorithm. The hash is calculated in software.

Enabling FIT_SIGNATURE required the old authentication method to be disabled so disable this for K3 SOCs and enable FIT_SIGNATURE for K3 Platforms.
Signed-off-by: Kamlesh Gurudasani kamlesh@ti.com [ cleanup the patch ] Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- arch/arm/Kconfig | 1 + boot/Kconfig | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3b9ab6d94101..851eef8a1314 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -799,6 +799,7 @@ config ARCH_K3 select SUPPORT_SPL select FIT select REGEX + select FIT_SIGNATURE if ARM64
config ARCH_OMAP2PLUS bool "TI OMAP2+" diff --git a/boot/Kconfig b/boot/Kconfig index a643a3d12863..5ca4499d9c5a 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 + 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

From: Kamlesh Gurudasani kamlesh@ti.com
Do not limit the maximum size of the buffer that is used to decompress the OS image in to, this causes issue while inflating the image, if image size is greater than the buffer. Remove CONFIG_SYS_BOOTM_LEN
Signed-off-by: Kamlesh Gurudasani kamlesh@ti.com Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com --- configs/am64x_evm_a53_defconfig | 1 - 1 file changed, 1 deletion(-)
diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig index f792b5859e94..5fdaafb983d4 100644 --- a/configs/am64x_evm_a53_defconfig +++ b/configs/am64x_evm_a53_defconfig @@ -62,7 +62,6 @@ CONFIG_SPL_SPI_LOAD=y CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000 CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_SYS_MAXARGS=64 -CONFIG_SYS_BOOTM_LEN=0x800000 CONFIG_CMD_ASKENV=y CONFIG_CMD_DFU=y CONFIG_CMD_DM=y

On 14.07.23 07:52, Manorit Chawdhry wrote:
The series focuses on fixes for various boards along with moving to standards and enabling the FIT_SIGNATURE for K3 Platforms towards the end.
Dependencies: https://lore.kernel.org/u-boot/20230712183453.7623-1-n-francis@ti.com/
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
Andrew Davis (4): environment: ti: Prefix ARM64 DTB names with directory environment: ti: Make get_fdt_mmc common configs: Enable setexpr command on TI devices arm: k3: Add regex/gsub command handling
Kamlesh Gurudasani (3): board: ti: am64x: am64x.env: set fdtfile env variable configs: k3: make consistent bootcmd across all k3 socs configs: am64: Fix booting of fitImage on AM64x
Manorit Chawdhry (11): arch: mach-k3: security: fix the check for authentication Kconfig: j721s2: Fix the scratchpad base mach-k3: common: correct the calculations for determining firewalls include: j7*_evm.h: Cleanups to be done configs: k3: Remove saved environments env: Make common bootcmd across all k3 devices include: armv7: Enable distroboot across all configs board: ti: keys: add .key and .crt for fit signature signing k3-*-binman: dts: Pack u-boot.dtb instead of soc specific dtb lib: Kconfig: k3: Enable SHA512 for fit signature Kconfig: Enable FIT_SIGNATURE if ARM64
arch/arm/Kconfig | 2 + arch/arm/dts/k3-am625-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am62a-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am64x-binman.dtsi | 2 +- arch/arm/dts/k3-am65x-binman.dtsi | 2 +- arch/arm/dts/k3-j7200-binman.dtsi | 2 +- arch/arm/dts/k3-j721e-binman.dtsi | 2 +- arch/arm/dts/k3-j721s2-binman.dtsi | 2 +- arch/arm/mach-k3/Kconfig | 2 +- arch/arm/mach-k3/common.c | 3 +- arch/arm/mach-k3/common.h | 2 +- arch/arm/mach-k3/security.c | 5 +- board/ti/am62ax/am62ax.env | 3 +- board/ti/am62x/am62x.env | 3 +- board/ti/am64x/am64x.env | 6 +- board/ti/am65x/am65x.env | 3 +- board/ti/j721e/j721e.env | 9 +- board/ti/j721s2/j721s2.env | 7 +- board/ti/keys/custMpk.crt | 33 ++++++ board/ti/keys/custMpk.key | 51 +++++++++ boot/Kconfig | 3 +- configs/am335x_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_qspi_defconfig | 1 - configs/am57xx_hs_evm_defconfig | 1 - configs/am57xx_hs_evm_usb_defconfig | 1 - configs/am62ax_evm_a53_defconfig | 1 + configs/am62x_evm_a53_defconfig | 3 +- configs/am64x_evm_a53_defconfig | 7 +- configs/am65x_evm_a53_defconfig | 1 - configs/am65x_hs_evm_a53_defconfig | 1 - configs/j7200_evm_a72_defconfig | 7 +- configs/j721e_evm_a72_defconfig | 7 +- configs/j721s2_evm_a72_defconfig | 6 +- doc/board/ti/k3.rst | 172 +++++++++++++++++++++++++++++ include/configs/am62ax_evm.h | 71 ------------ include/configs/am62x_evm.h | 27 ----- include/configs/j721e_evm.h | 32 ------ include/configs/j721s2_evm.h | 5 - include/configs/ti_armv7_common.h | 50 +++++++++ include/environment/ti/mmc.env | 5 +- include/environment/ti/ti_armv7_common.env | 11 +- lib/Kconfig | 1 + 43 files changed, 356 insertions(+), 202 deletions(-)
base-commit: 26bd02c45a97f77cfb6afac4ee4f61fb9c5c7007 change-id: 20230713-b4-upstream-fit-image-support-9d3c113ebab7
Best regards,
This series (at least) completely broke IOT2050 booting, specifically by dictating EVM-specific settings on our non-EVM board. Still trying to understand all problems and how to resolve them, either on board level or via making the side-effects optional. Due to that, our own patches missed rc1 :(.
Jan

Hi Jan,
On 08:42-20230726, Jan Kiszka wrote:
On 14.07.23 07:52, Manorit Chawdhry wrote:
The series focuses on fixes for various boards along with moving to standards and enabling the FIT_SIGNATURE for K3 Platforms towards the end.
Dependencies: https://lore.kernel.org/u-boot/20230712183453.7623-1-n-francis@ti.com/
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
Andrew Davis (4): environment: ti: Prefix ARM64 DTB names with directory environment: ti: Make get_fdt_mmc common configs: Enable setexpr command on TI devices arm: k3: Add regex/gsub command handling
Kamlesh Gurudasani (3): board: ti: am64x: am64x.env: set fdtfile env variable configs: k3: make consistent bootcmd across all k3 socs configs: am64: Fix booting of fitImage on AM64x
Manorit Chawdhry (11): arch: mach-k3: security: fix the check for authentication Kconfig: j721s2: Fix the scratchpad base mach-k3: common: correct the calculations for determining firewalls include: j7*_evm.h: Cleanups to be done configs: k3: Remove saved environments env: Make common bootcmd across all k3 devices include: armv7: Enable distroboot across all configs board: ti: keys: add .key and .crt for fit signature signing k3-*-binman: dts: Pack u-boot.dtb instead of soc specific dtb lib: Kconfig: k3: Enable SHA512 for fit signature Kconfig: Enable FIT_SIGNATURE if ARM64
arch/arm/Kconfig | 2 + arch/arm/dts/k3-am625-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am62a-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am64x-binman.dtsi | 2 +- arch/arm/dts/k3-am65x-binman.dtsi | 2 +- arch/arm/dts/k3-j7200-binman.dtsi | 2 +- arch/arm/dts/k3-j721e-binman.dtsi | 2 +- arch/arm/dts/k3-j721s2-binman.dtsi | 2 +- arch/arm/mach-k3/Kconfig | 2 +- arch/arm/mach-k3/common.c | 3 +- arch/arm/mach-k3/common.h | 2 +- arch/arm/mach-k3/security.c | 5 +- board/ti/am62ax/am62ax.env | 3 +- board/ti/am62x/am62x.env | 3 +- board/ti/am64x/am64x.env | 6 +- board/ti/am65x/am65x.env | 3 +- board/ti/j721e/j721e.env | 9 +- board/ti/j721s2/j721s2.env | 7 +- board/ti/keys/custMpk.crt | 33 ++++++ board/ti/keys/custMpk.key | 51 +++++++++ boot/Kconfig | 3 +- configs/am335x_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_qspi_defconfig | 1 - configs/am57xx_hs_evm_defconfig | 1 - configs/am57xx_hs_evm_usb_defconfig | 1 - configs/am62ax_evm_a53_defconfig | 1 + configs/am62x_evm_a53_defconfig | 3 +- configs/am64x_evm_a53_defconfig | 7 +- configs/am65x_evm_a53_defconfig | 1 - configs/am65x_hs_evm_a53_defconfig | 1 - configs/j7200_evm_a72_defconfig | 7 +- configs/j721e_evm_a72_defconfig | 7 +- configs/j721s2_evm_a72_defconfig | 6 +- doc/board/ti/k3.rst | 172 +++++++++++++++++++++++++++++ include/configs/am62ax_evm.h | 71 ------------ include/configs/am62x_evm.h | 27 ----- include/configs/j721e_evm.h | 32 ------ include/configs/j721s2_evm.h | 5 - include/configs/ti_armv7_common.h | 50 +++++++++ include/environment/ti/mmc.env | 5 +- include/environment/ti/ti_armv7_common.env | 11 +- lib/Kconfig | 1 + 43 files changed, 356 insertions(+), 202 deletions(-)
base-commit: 26bd02c45a97f77cfb6afac4ee4f61fb9c5c7007 change-id: 20230713-b4-upstream-fit-image-support-9d3c113ebab7
Best regards,
This series (at least) completely broke IOT2050 booting, specifically by dictating EVM-specific settings on our non-EVM board. Still trying to understand all problems and how to resolve them, either on board level or via making the side-effects optional. Due to that, our own patches missed rc1 :(.
Sorry for the inconvenience caused, I have no idea what led to such things but yes, the series wasn't ready to be merged although I have sent incremental fixes for some of the necessary stuff but do let me know the breakage reasons and I will try to address them as soon as possible if I can.
Regards, Manorit
Jan
-- Siemens AG, Technology Linux Expert Center

On 12:17-20230726, Manorit Chawdhry wrote:
Hi Jan,
On 08:42-20230726, Jan Kiszka wrote:
On 14.07.23 07:52, Manorit Chawdhry wrote:
The series focuses on fixes for various boards along with moving to standards and enabling the FIT_SIGNATURE for K3 Platforms towards the end.
Dependencies: https://lore.kernel.org/u-boot/20230712183453.7623-1-n-francis@ti.com/
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
Andrew Davis (4): environment: ti: Prefix ARM64 DTB names with directory environment: ti: Make get_fdt_mmc common configs: Enable setexpr command on TI devices arm: k3: Add regex/gsub command handling
Kamlesh Gurudasani (3): board: ti: am64x: am64x.env: set fdtfile env variable configs: k3: make consistent bootcmd across all k3 socs configs: am64: Fix booting of fitImage on AM64x
Manorit Chawdhry (11): arch: mach-k3: security: fix the check for authentication Kconfig: j721s2: Fix the scratchpad base mach-k3: common: correct the calculations for determining firewalls include: j7*_evm.h: Cleanups to be done configs: k3: Remove saved environments env: Make common bootcmd across all k3 devices include: armv7: Enable distroboot across all configs board: ti: keys: add .key and .crt for fit signature signing k3-*-binman: dts: Pack u-boot.dtb instead of soc specific dtb lib: Kconfig: k3: Enable SHA512 for fit signature Kconfig: Enable FIT_SIGNATURE if ARM64
arch/arm/Kconfig | 2 + arch/arm/dts/k3-am625-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am62a-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am64x-binman.dtsi | 2 +- arch/arm/dts/k3-am65x-binman.dtsi | 2 +- arch/arm/dts/k3-j7200-binman.dtsi | 2 +- arch/arm/dts/k3-j721e-binman.dtsi | 2 +- arch/arm/dts/k3-j721s2-binman.dtsi | 2 +- arch/arm/mach-k3/Kconfig | 2 +- arch/arm/mach-k3/common.c | 3 +- arch/arm/mach-k3/common.h | 2 +- arch/arm/mach-k3/security.c | 5 +- board/ti/am62ax/am62ax.env | 3 +- board/ti/am62x/am62x.env | 3 +- board/ti/am64x/am64x.env | 6 +- board/ti/am65x/am65x.env | 3 +- board/ti/j721e/j721e.env | 9 +- board/ti/j721s2/j721s2.env | 7 +- board/ti/keys/custMpk.crt | 33 ++++++ board/ti/keys/custMpk.key | 51 +++++++++ boot/Kconfig | 3 +- configs/am335x_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_qspi_defconfig | 1 - configs/am57xx_hs_evm_defconfig | 1 - configs/am57xx_hs_evm_usb_defconfig | 1 - configs/am62ax_evm_a53_defconfig | 1 + configs/am62x_evm_a53_defconfig | 3 +- configs/am64x_evm_a53_defconfig | 7 +- configs/am65x_evm_a53_defconfig | 1 - configs/am65x_hs_evm_a53_defconfig | 1 - configs/j7200_evm_a72_defconfig | 7 +- configs/j721e_evm_a72_defconfig | 7 +- configs/j721s2_evm_a72_defconfig | 6 +- doc/board/ti/k3.rst | 172 +++++++++++++++++++++++++++++ include/configs/am62ax_evm.h | 71 ------------ include/configs/am62x_evm.h | 27 ----- include/configs/j721e_evm.h | 32 ------ include/configs/j721s2_evm.h | 5 - include/configs/ti_armv7_common.h | 50 +++++++++ include/environment/ti/mmc.env | 5 +- include/environment/ti/ti_armv7_common.env | 11 +- lib/Kconfig | 1 + 43 files changed, 356 insertions(+), 202 deletions(-)
base-commit: 26bd02c45a97f77cfb6afac4ee4f61fb9c5c7007 change-id: 20230713-b4-upstream-fit-image-support-9d3c113ebab7
Best regards,
This series (at least) completely broke IOT2050 booting, specifically by dictating EVM-specific settings on our non-EVM board. Still trying to understand all problems and how to resolve them, either on board level or via making the side-effects optional. Due to that, our own patches missed rc1 :(.
Sorry for the inconvenience caused, I have no idea what led to such things but yes, the series wasn't ready to be merged although I have sent incremental fixes for some of the necessary stuff but do let me know the breakage reasons and I will try to address them as soon as possible if I can.
Also, could you elaborate on the place of failure? There are certain possibilities coming to my mind for the breakage, please see if those are the ones that maybe you can look at w.r.t the failures that you've seen.
The series removes the saved environment settings that might have been there in your boards due to which the possibility of failure could occur, have a look at [0].
The series changes binman nodes for packing u-boot.dtb in u-boot.img, am not sure if this can affect you guys but have a look at [1].
The directory paths are being changed for the respective kernel and dtb, have a look at [2].
We've migrated to the FIT_SIGNATURE standard completely so things have changed w.r.t that and we are enabling it by default in K3 Platforms so have a look at [3]. The configuration nodes and other things have also changed along with it.
Am assuming that the BOOTCMD change shouldn't affect you guys as you might be having custom BOOTCMD maybe but if that is not the case then the default bootcmd that we have is not a part of the distroboot and we run our legacy boot method in the beginning of it that is defined in commit [4].
These all changes had been a part of LTS migration that we had internally so I do understand that it can break certain things but maybe I can make it easier for you guys to pin point the cause of failure so letting you know of all the things that have changed in the series without you trying to dig down into each and every commit.
[0]: https://lore.kernel.org/u-boot/20230726064659.gzdbinr4hreujz3k@ula0497581/T/... [1]: https://lore.kernel.org/u-boot/20230726064659.gzdbinr4hreujz3k@ula0497581/T/... [2]: https://lore.kernel.org/u-boot/20230726064659.gzdbinr4hreujz3k@ula0497581/T/... [3]: https://lore.kernel.org/u-boot/20230726064659.gzdbinr4hreujz3k@ula0497581/T/... [4]: https://lore.kernel.org/u-boot/20230726064659.gzdbinr4hreujz3k@ula0497581/T/...
Regards, Manorit
Jan
-- Siemens AG, Technology Linux Expert Center

On 26.07.23 09:25, Manorit Chawdhry wrote:
On 12:17-20230726, Manorit Chawdhry wrote:
Hi Jan,
On 08:42-20230726, Jan Kiszka wrote:
On 14.07.23 07:52, Manorit Chawdhry wrote:
The series focuses on fixes for various boards along with moving to standards and enabling the FIT_SIGNATURE for K3 Platforms towards the end.
Dependencies: https://lore.kernel.org/u-boot/20230712183453.7623-1-n-francis@ti.com/
Signed-off-by: Manorit Chawdhry m-chawdhry@ti.com
Andrew Davis (4): environment: ti: Prefix ARM64 DTB names with directory environment: ti: Make get_fdt_mmc common configs: Enable setexpr command on TI devices arm: k3: Add regex/gsub command handling
Kamlesh Gurudasani (3): board: ti: am64x: am64x.env: set fdtfile env variable configs: k3: make consistent bootcmd across all k3 socs configs: am64: Fix booting of fitImage on AM64x
Manorit Chawdhry (11): arch: mach-k3: security: fix the check for authentication Kconfig: j721s2: Fix the scratchpad base mach-k3: common: correct the calculations for determining firewalls include: j7*_evm.h: Cleanups to be done configs: k3: Remove saved environments env: Make common bootcmd across all k3 devices include: armv7: Enable distroboot across all configs board: ti: keys: add .key and .crt for fit signature signing k3-*-binman: dts: Pack u-boot.dtb instead of soc specific dtb lib: Kconfig: k3: Enable SHA512 for fit signature Kconfig: Enable FIT_SIGNATURE if ARM64
arch/arm/Kconfig | 2 + arch/arm/dts/k3-am625-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am62a-sk-binman.dtsi | 2 +- arch/arm/dts/k3-am64x-binman.dtsi | 2 +- arch/arm/dts/k3-am65x-binman.dtsi | 2 +- arch/arm/dts/k3-j7200-binman.dtsi | 2 +- arch/arm/dts/k3-j721e-binman.dtsi | 2 +- arch/arm/dts/k3-j721s2-binman.dtsi | 2 +- arch/arm/mach-k3/Kconfig | 2 +- arch/arm/mach-k3/common.c | 3 +- arch/arm/mach-k3/common.h | 2 +- arch/arm/mach-k3/security.c | 5 +- board/ti/am62ax/am62ax.env | 3 +- board/ti/am62x/am62x.env | 3 +- board/ti/am64x/am64x.env | 6 +- board/ti/am65x/am65x.env | 3 +- board/ti/j721e/j721e.env | 9 +- board/ti/j721s2/j721s2.env | 7 +- board/ti/keys/custMpk.crt | 33 ++++++ board/ti/keys/custMpk.key | 51 +++++++++ boot/Kconfig | 3 +- configs/am335x_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_defconfig | 1 - configs/am43xx_hs_evm_qspi_defconfig | 1 - configs/am57xx_hs_evm_defconfig | 1 - configs/am57xx_hs_evm_usb_defconfig | 1 - configs/am62ax_evm_a53_defconfig | 1 + configs/am62x_evm_a53_defconfig | 3 +- configs/am64x_evm_a53_defconfig | 7 +- configs/am65x_evm_a53_defconfig | 1 - configs/am65x_hs_evm_a53_defconfig | 1 - configs/j7200_evm_a72_defconfig | 7 +- configs/j721e_evm_a72_defconfig | 7 +- configs/j721s2_evm_a72_defconfig | 6 +- doc/board/ti/k3.rst | 172 +++++++++++++++++++++++++++++ include/configs/am62ax_evm.h | 71 ------------ include/configs/am62x_evm.h | 27 ----- include/configs/j721e_evm.h | 32 ------ include/configs/j721s2_evm.h | 5 - include/configs/ti_armv7_common.h | 50 +++++++++ include/environment/ti/mmc.env | 5 +- include/environment/ti/ti_armv7_common.env | 11 +- lib/Kconfig | 1 + 43 files changed, 356 insertions(+), 202 deletions(-)
base-commit: 26bd02c45a97f77cfb6afac4ee4f61fb9c5c7007 change-id: 20230713-b4-upstream-fit-image-support-9d3c113ebab7
Best regards,
This series (at least) completely broke IOT2050 booting, specifically by dictating EVM-specific settings on our non-EVM board. Still trying to understand all problems and how to resolve them, either on board level or via making the side-effects optional. Due to that, our own patches missed rc1 :(.
Sorry for the inconvenience caused, I have no idea what led to such things but yes, the series wasn't ready to be merged although I have sent incremental fixes for some of the necessary stuff but do let me know the breakage reasons and I will try to address them as soon as possible if I can.
Also, could you elaborate on the place of failure? There are certain possibilities coming to my mind for the breakage, please see if those are the ones that maybe you can look at w.r.t the failures that you've seen.
The series removes the saved environment settings that might have been there in your boards due to which the possibility of failure could occur, have a look at [0].
The series changes binman nodes for packing u-boot.dtb in u-boot.img, am not sure if this can affect you guys but have a look at [1].
The directory paths are being changed for the respective kernel and dtb, have a look at [2].
We've migrated to the FIT_SIGNATURE standard completely so things have changed w.r.t that and we are enabling it by default in K3 Platforms so have a look at [3]. The configuration nodes and other things have also changed along with it.
Am assuming that the BOOTCMD change shouldn't affect you guys as you might be having custom BOOTCMD maybe but if that is not the case then the default bootcmd that we have is not a part of the distroboot and we run our legacy boot method in the beginning of it that is defined in commit [4].
These all changes had been a part of LTS migration that we had internally so I do understand that it can break certain things but maybe I can make it easier for you guys to pin point the cause of failure so letting you know of all the things that have changed in the series without you trying to dig down into each and every commit.
It seems, this helps, at least non-secure boot configuration works again (secure to be tested):
diff --git a/board/siemens/iot2050/iot2050.env b/board/siemens/iot2050/iot2050.env index 02958798b49..7fd836e6285 100644 --- a/board/siemens/iot2050/iot2050.env +++ b/board/siemens/iot2050/iot2050.env @@ -6,6 +6,8 @@ * Jan Kiszka jan.kiszka@siemens.com */
+#include <environment/ti/ti_armv7_common.env> + usb_pgood_delay=900
watchdog_timeout_ms=CONFIG_WATCHDOG_TIMEOUT_MSECS diff --git a/include/configs/iot2050.h b/include/configs/iot2050.h index 2177e0dfe38..4968722d18f 100644 --- a/include/configs/iot2050.h +++ b/include/configs/iot2050.h @@ -15,6 +15,17 @@
#include <configs/ti_armv7_common.h>
+/* + * This defines all MMC devices, even if the basic variant has no mmc1. + * The non-supported device will be removed from the boot targets during + * runtime, when that board was detected. + */ +#undef BOOT_TARGET_DEVICES +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 1) \ + func(MMC, mmc, 0) \ + BOOT_TARGET_USB(func) + #ifdef CONFIG_ENV_WRITEABLE_LIST #define CFG_ENV_FLAGS_LIST_STATIC \ "board_uuid:sw,board_name:sw,board_serial:sw,board_a5e:sw," \
Jan
participants (8)
-
Andrew Davis
-
Bryan Brattlof
-
Jan Kiszka
-
Manorit Chawdhry
-
Nikhil M Jain
-
Nishanth Menon
-
Simon Glass
-
Tom Rini