"saveenv" on BeagleY-AI U-boot

Hello everyone,

I am trying to enable the saveenv feature on BeagleY-AI U-Boot, however it is not available. I modified the following u-boot configs to tr to make it work:

# CONFIG_ENV_IS_NOWHERE is not set
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_OFFSET=0x100000
CONFIG_ENV_SIZE=0x40000
CONFIG_SUPPORT_EMMC_BOOT=y
CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_SYS_MMC_ENV_PART=1

However now I am facing the following issue:

 => saveenv

Saving Environment to MMC... MMC partition switch failed

MMC partition switch failed

Failed (1) 

Is there any known issue or modifications I should do to make this work?

Thanks,
Hiago.

There is no eMMC on BeagleY-AI, you need to configure U-Boot to save directly to a file in the fat partition…

Thanks @RobertCNelson, I will check then the necessary configs for u-boot and come back if this solves this question.

Regards,
Hiago.

This will get you in the ball part.. (for another board, and an older u-boot)

CONFIG_ENV_IS_IN_FAT=y
CONFIG_ENV_FAT_INTERFACE="mmc"
CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
CONFIG_ENV_FAT_FILE="/boot/uboot.env"

Regards,

1 Like

Thanks @RobertCNelson, the following configs were added to make it work on the BeagleY-AI:

# CONFIG_ENV_IS_NOWHERE is not set
CONFIG_ENV_FAT_DEVICE_AND_PART="1:1"
CONFIG_ENV_IS_IN_FAT=y
CONFIG_SPL_ENV_IS_NOWHERE=y
CONFIG_SYS_MMC_ENV_DEV=1
CONFIG_SYS_MMC_ENV_PART=1

Regards,
Hiago.