cancel
Showing results for 
Search instead for 
Did you mean: 

Custom u-boot environment

dhk112
Associate II

Hello everyone,

I am trying to migrate a project for the STM32MP151C from dunfell to kirkstone.

The versions of the main components I am using are the following:

Component

Version

tf-a-stm32mp

v2.6-stm32mp-r2.2

optee-os-stm32mp

v3.16.0-stm32mp-r2.2

u-boot-stm32mp

v2021.10-stm32mp-r2.2

linux-stm32mp

v5.15.145-stm32mp-r2.2

 

The project intends to have a custom u-boot environment. For this a patch is applied to modify CONFIG_EXTRA_ENV_SETTINGS in stm32mp15_common.h, like this:

#define FOO_USBFLASH_BOOTFS "foo_usbflash_bootfs=" \
	"load usb 0:1 ${loadaddr} foo-image-bootfs-foo-core-stm32mp151c-foo.ext4;" \
	"mmc write ${loadaddr} 2400 20000;" \
	"mmc write ${loadaddr} 22400 20000;\0"


#define CONFIG_EXTRA_ENV_SETTINGS \
	STM32MP_MEM_LAYOUT \
	STM32MP_BOOTCMD \
	STM32MP_PARTS_DEFAULT \
	BOOTENV \
	FOO_USBFLASH_BOOTFS \
	STM32MP_EXTRA \
	STM32MP_BOARD_EXTRA_ENV

This approach worked perfectly fine in the old version of the project, but now when the system boots into u-boot I see that the custom u-boot environment is not present anymore.

I use the following flashlayout:

#Opt	Id	Name	Type	IP	Offset	Binary
-	0x01	fsbl-boot	Binary	none	0x0	arm-trusted-firmware/tf-a-stm32mp151c-foo-uart.stm32
-	0x03	fip-boot	FIP	none	0x0	fip/fip-stm32mp151c-foo-optee.bin
P	0x04	fsbl	Binary	mmc0	boot1	arm-trusted-firmware/tf-a-stm32mp151c-foo-emmc.stm32
P	0x05	fsbl2	Binary	mmc0	boot2	arm-trusted-firmware/tf-a-stm32mp151c-foo-emmc.stm32
P	0x06	metadata1	Binary	mmc0	0x00080000	arm-trusted-firmware/metadata.bin
P	0x07	metadata2	Binary	mmc0	0x00100000	arm-trusted-firmware/metadata.bin
P	0x08	fip-a	FIP	mmc0	0x00180000	fip/fip-stm32mp151c-foo-optee.bin
P	0x09	fip-b	FIP	mmc0	0x00580000	fip/fip-stm32mp151c-foo-optee.bin
PED	0x0A	u-boot-env	Binary	mmc0	0x00980000	none
P	0x10	boot1	System	mmc0	0x00A00000	pseudo.ext4
P	0x11	boot2	System	mmc0	0x04A00000	pseudo.ext4
P	0x12	super1	FileSystem	mmc0	0x08A00000	pseudo.ext4
P	0x13	super2	FileSystem	mmc0	0x66600000	pseudo.ext4
P	0x14	data	FileSystem	mmc0	0xC4200000	pseudo.ext4

What additional settings are needed for my custom u-boot environment to work?

 

0 REPLIES 0