Constructing a FlashLayout for implementing on eMMC only
I need som help about constructing a FlashLayout file for CubeProgrammer. I have a template of a FlashLayout for the STM32MP1 processor.
#opt Id Name Type Device Offset Binary
- 0x01 fsbl-boot Binary none 0x00000000 tf-a-usb.stm32
- 0x03 fip-boot FIP none 0x00000000 fip.bin
P 0x04 fsbl1 Binary mmc0 0x00004400 tf-a-sdcard.stm32
P 0x05 fsbl2 Binary mmc0 0x00044400 tf-a-sdcard.stm32
P 0x06 metadata1 FWU_MDATA mmc0 0x00084400 metadata.bin
P 0x07 metadata2 FWU_MDATA mmc0 0x000C4400 metadata.bin
P 0x08 fip-a FIP mmc0 0x00104400 fip.bin
PED 0x09 fip-b FIP mmc0 0x00504400 none
PED 0x09 u-boot-env ENV mmc0 0x00904400 none
P 0x10 bootfs System mmc0 0x00984400 bootfs.ext4
P 0x11 vendorfs FileSystem mmc0 0x04984400 vendorfs.ext4
P 0x12 rootfs FileSystem mmc0 0x05984400 rootfs.ext4
P 0x13 userfs FileSystem mmc0 0x33984400 userfs.ext4
I have installed the SDK and Sources inside CubeIDE. I have two questions in this thread:
1. If I want to flash my eMMC, which is connected to SDEMMC2 in CubeIDE. Should I then rename mmc0 to mmc2 inside the FlashLayout? I don't have a SD slot soldered to my custom board. My goal is just flashing the eMMC directly via USB and then boot from eMMC (BOOT pins = [0 1 0])
2. If I want to the create tf-a-usb.stm32 file. Is this the correct way to build it with.
make -f $PWD/../Makefile.sdk TF_A_DEVICETREE=stm32mpX-<project name>-mx TF_A_CONFIG=usb FIP_CONFIG=optee-emmc stm32
I'm reading the "HOW TO.txt" file: https://github.com/STMicroelectronics/meta-st-stm32mp/blob/mickledore/recipes-bsp/trusted-firmware-a/tf-a-stm32mp/README.HOW_TO.txt about building the tf-a. But it does not explain which command/parameter I should use to achieve a specific output file. Also, both u-boot and tf-a can produce a .bin file with the same name. So there are a lot of confusions here.
I my case, I don't have a SD-card slot and I want to boot from eMMC and flashing the eMMC with the USB.
Yes, I have read the Wiki(STM32MPU Developer Package - stm32mpu) many times. The good news that I can now build tf-a, linux, op-tee, u-boot in CubeIDE without errors.
