Hi,
i have just setup a raspberry pi compute module with U-Boot as bootloader and everything works fine.
But now i am trying to set my uboot environment variables from Linux, to have the possibility to switch between two filesystems. I am using the following partition table:
$this->bbcode_second_pass_code('', '
/dev/mmcblk0p1 fat32 boot (kernel,start.elf,u-boot.bin,uboot.env,...)
/dev/mmcblk0p2 ext4 rootfs1
/dev/mmcblk0p3 ext4 rootfs2
/dev/mmcblk0p4 fat32 data
')
As you can see, uboot is successfully saving the env variables to the first fat partition. From the bootloader menu i also can print, setenv and save all variables.
when i saveenv:
$this->bbcode_second_pass_code('', '
U-Boot> saveenv
Saving Environment to FAT...
writing uboot.env
FAT: Misaligned buffer address (1bb42d78)
done
')
when i mount my boot partition i can see the uboot.env file.
my uboot config about environment :
$this->bbcode_second_pass_code('', '
/* Environment */
#define CONFIG_ENV_SIZE SZ_16K
#define CONFIG_ENV_IS_IN_FAT
#define FAT_ENV_INTERFACE "mmc"
#define FAT_ENV_DEVICE_AND_PART "0:1"
#define FAT_ENV_FILE "uboot.env"
#define CONFIG_FAT_WRITE
#define CONFIG_ENV_VARS_UBOOT_CONFIG
#define CONFIG_SYS_LOAD_ADDR 0x1000000
#define CONFIG_CONSOLE_MUX
#define CONFIG_SYS_CONSOLE_IS_IN_ENV
#define CONFIG_PREBOOT "usb start"
')
My question is now, is there a possibility to get access to the uboot.env from linux?
Cause i have no idea what i should tell my fw_env.config where to find the uboot.env.
How can i find out the physical adress of my .env file?
Hope someone can help me.
best regards Logi