I have tried to read U-boot Environment from Userspace using fw_printenv command.
But it is showing below error:
# fw_printenv
Cannot read the environment, using the default
Cannot read default environment from file
Below is the fw_env.config file
# cat /etc/fw_env.config
/dev/mmcblk2 0x400000 0x4000
I am doing partition using the parted command.
Below EMMC partition information.
# parted /dev/mmcblk2 unit s print list
Model: MMC IX2932 (sd/mmc)
Disk /dev/mmcblk2: 61120512s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 2048s 489471s 487424s fat16 primary msftdata
2 489472s 2834431s 2344960s ext4 primary
3 2834432s 5177343s 2342912s ext4 primary
4 5177344s 61118463s 55941120s ext4 primary
Error: /dev/mmcblk2boot1: unrecognised disk label
Model: Generic SD/MMC Storage Card (sd/mmc)
Disk /dev/mmcblk2boot1: 8192s
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
Error: /dev/mmcblk2boot0: unrecognised disk label
Model: Generic SD/MMC Storage Card (sd/mmc)
Disk /dev/mmcblk2boot0: 8192s
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:
Below U-boot configuration.
CONFIG_ENV_SIZE=0x4000
CONFIG_ENV_OFFSET=0x400000
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_ENV_OFFSET_REDUND=0x404000
CONFIG_SYS_MMC_ENV_DEV=2
CONFIG_SYS_MMC_ENV_PART=0
CONFIG_CMD_SAVEENV=y
how to calculate the CONFIG_ENV_OFFSET?
Please let me know anything I am missing here.