This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: SDK8.4: configs: j721e_evm: Enable configs to store env in MMC FAT partition

Part Number: TDA4VM

Hi Keerthy,

Need clarification on two things.

1.

Reverting of a patch as mentioned in e2e.ti.com/.../dra829v-when-saving-under-uboot-reporting-error-issue

In SDK8.4 , CONFIG_ENV_IS_NOWHERE is not there in configs/j721e_evm_r5_defconfig and configs/j721e_evm_a72_defconfig

Following two additions are enough for saving env to eMMC ?

CONFIG_ENV_IS_IN_MMC=y

CONFIG_SYS_MMC_ENV_PART=1

2.

We were applying following patch for CONFIG_ENV_OFFSET_REDUND in SDK8.2 and SDK8.1 but SDK8.4 does not have CONFIG_ENV_OFFSET_REDUND and CONFIG_SYS_REDUNDAND_ENVIRONMENT configs in configs/j721e_evm_a72_defconfig

Do you foresee any changes that we need to do on our end  ?

--- a/configs/j721e_evm_a72_defconfig
+++ b/configs/j721e_evm_a72_defconfig
@@ -17,7 +17,7 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL_STACK_R_ADDR=0x82000000
-CONFIG_ENV_OFFSET_REDUND=0x7C0000
+CONFIG_ENV_OFFSET_REDUND=0x6A0000
CONFIG_SPL_FS_FAT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_SPL_SPI_FLASH_SUPPORT=y

Regards

Mahipal

  • Mahipal,

    I will check on both of the above and get back in couple of days.

    Regards,

    Keerthy

  • Mahipal,

    commit e3e91c9d3a7f2568dd152b506490003b4755e76a
    Author: Bryan Brattlof <bb@ti.com>
    Date:   Wed Apr 27 11:29:32 2022 -0500

        configs: am64x: j721e: enable saving env settings

    The above commit in U-Boot has removed the CONFIG_ENV_IS_NOWHERE.

    CONFIG_ENV_IS_IN_MMC=y

    CONFIG_SYS_MMC_ENV_PART=1


    Should be enough.

    For:

    We were applying following patch for CONFIG_ENV_OFFSET_REDUND in SDK8.2 and SDK8.1 but SDK8.4 does not have CONFIG_ENV_OFFSET_REDUND and CONFIG_SYS_REDUNDAND_ENVIRONMENT configs in configs/j721e_evm_a72_defconfig

    commit 8c44dbf16583ec5fb6959d7a3ad50a26d0085f61
    Author: Bryan Brattlof <bb@ti.com>
    Date:   Wed Apr 27 11:29:31 2022 -0500

        configs: am64x: j721e: savedefconfig resync

    diff --git a/configs/j721e_evm_a72_defconfig b/configs/j721e_evm_a72_defconfig
    index 24bfd5c561..8204bab3a1 100644
    --- a/configs/j721e_evm_a72_defconfig
    +++ b/configs/j721e_evm_a72_defconfig
    @@ -8,7 +8,6 @@ CONFIG_NR_DRAM_BANKS=2
     CONFIG_SOC_K3_J721E=y
     CONFIG_TARGET_J721E_A72_EVM=y
     CONFIG_ENV_SIZE=0x20000
    -CONFIG_ENV_OFFSET=0x680000
     CONFIG_SYS_SPI_U_BOOT_OFFS=0x280000
     CONFIG_DM_GPIO=y
     CONFIG_SPL_DM_SPI=y
    @@ -17,7 +16,6 @@ CONFIG_SPL_MMC_SUPPORT=y
     CONFIG_SPL_SERIAL_SUPPORT=y
     CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
     CONFIG_SPL_STACK_R_ADDR=0x82000000
    -CONFIG_ENV_OFFSET_REDUND=0x7C0000
     CONFIG_SPL_FS_FAT=y
     CONFIG_SPL_LIBDISK_SUPPORT=y
     CONFIG_SPL_SPI_FLASH_SUPPORT=y
    @@ -72,6 +70,7 @@ CONFIG_CMD_EXT4_WRITE=y
     CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"
     CONFIG_MTDPARTS_DEFAULT="mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),1m(ospi.sysfw),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);47034000.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),1m(hbmc.sysfw),-@8m(hbmc.rootfs)"
     CONFIG_CMD_UBI=y
    +CONFIG_MMC_SPEED_MODE_SET=y
     # CONFIG_ISO_PARTITION is not set
     # CONFIG_SPL_EFI_PARTITION is not set
     CONFIG_OF_CONTROL=y
    @@ -80,11 +79,10 @@ CONFIG_OF_LIST="k3-j721e-common-proc-board k3-j721e-tps65917-proc-board k3-j721e
     CONFIG_SPL_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
     CONFIG_ENV_OVERWRITE=y
     CONFIG_DM_GPIO=y
     CONFIG_SPL_DM_SPI=y
    @@ -17,7 +16,6 @@ CONFIG_SPL_MMC_SUPPORT=y
     CONFIG_SPL_SERIAL_SUPPORT=y
     CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
     CONFIG_SPL_STACK_R_ADDR=0x82000000
    -CONFIG_ENV_OFFSET_REDUND=0x7C0000
     CONFIG_SPL_FS_FAT=y
     CONFIG_SPL_LIBDISK_SUPPORT=y
     CONFIG_SPL_SPI_FLASH_SUPPORT=y
    @@ -72,6 +70,7 @@ CONFIG_CMD_EXT4_WRITE=y
     CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"
     CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
     CONFIG_SPL_STACK_R_ADDR=0x82000000
    -CONFIG_ENV_OFFSET_REDUND=0x7C0000
     CONFIG_SPL_FS_FAT=y
     CONFIG_SPL_LIBDISK_SUPPORT=y
     CONFIG_SPL_SPI_FLASH_SUPPORT=y
    @@ -72,6 +70,7 @@ CONFIG_CMD_EXT4_WRITE=y
     CONFIG_MTDIDS_DEFAULT="nor0=47040000.spi.0,nor0=47034000.hyperbus"
     CONFIG_MTDPARTS_DEFAULT="mtdparts=47040000.spi.0:512k(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),1m(ospi.sysfw),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k(ospi.phypattern);4703400
    0.hyperbus:512k(hbmc.tiboot3),2m(hbmc.tispl),4m(hbmc.u-boot),256k(hbmc.env),1m(hbmc.sysfw),-@8m(hbmc.rootfs)"
     CONFIG_CMD_UBI=y
    +CONFIG_MMC_SPEED_MODE_SET=y
     # CONFIG_ISO_PARTITION is not set
     # CONFIG_SPL_EFI_PARTITION is not set
     CONFIG_OF_CONTROL=y
    @@ -80,11 +79,10 @@ CONFIG_OF_LIST="k3-j721e-common-proc-board k3-j721e-tps65917-proc-board k3-j721e
     CONFIG_SPL_MULTI_DTB_FIT=y
     CONFIG_SPL_MULTI_DTB_FIT_NO_COMPRESSION=y
     CONFIG_ENV_OVERWRITE=y
    -CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
    -CONFIG_SYS_RELOC_GD_ENV_ADDR=y
     CONFIG_ENV_IS_NOWHERE=y
     CONFIG_ENV_IS_IN_FAT=y
     CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
    +CONFIG_SYS_RELOC_GD_ENV_ADDR=y
     CONFIG_NET_RANDOM_ETHADDR=y
     CONFIG_DM=y
     CONFIG_SPL_DM=y
    @@ -202,4 +200,3 @@ CONFIG_UFS=y
     CONFIG_CADENCE_UFS=y
     CONFIG_TI_J721E_UFS=y
     CONFIG_OF_LIBFDT_OVERLAY=y
    -CONFIG_MMC_SPEED_MODE_SET=y

    You will have to revert the above changes related to redundant env.

    Regards,
    Keerthy

  • Hi Keerthy,

    I understand that the first one is good with following two additions for saving env to eMMC.

    CONFIG_ENV_IS_IN_MMC=y

    CONFIG_SYS_MMC_ENV_PART=1

    Your answer for second question is kind of confusing,

    1. are we supposed to have redundant env ? If so, then I will have to revert the commit 8c44dbf16583ec5fb6959d7a3ad50a26d0085f61 which means add configs CONFIG_ENV_OFFSET, CONFIG_ENV_OFFSET_REDUND, CONFIG_SYS_REDUNDAND_ENVIRONMENT, CONFIG_SYS_RELOC_GD_ENV_ADDR, CONFIG_MMC_SPEED_MODE_SET. 

    2. Or there is no need of redundant env that's why theose configs are removed in sdk8.4, so there is no need to add redundant env configs ?

  • 1. are we supposed to have redundant env ? If so, then I will have to revert the commit 8c44dbf16583ec5fb6959d7a3ad50a26d0085f61 which means add configs CONFIG_ENV_OFFSET, CONFIG_ENV_OFFSET_REDUND, CONFIG_SYS_REDUNDAND_ENVIRONMENT, CONFIG_SYS_RELOC_GD_ENV_ADDR, CONFIG_MMC_SPEED_MODE_SET. 

    2. Or there is no need of redundant env that's why theose configs are removed in sdk8.4, so there is no need to add redundant env configs ?

    The latest SDK has removed the redundant environment & the environment is saved by default to FAT partition.

    As long as you are not using the redundant env you can use the default SDK as is.

    Best Regards,
    Keerthy