Custom compiled U-BOOT fail to boot from eMMC with ext4: ** Unrecognized filesystem type **
I have custom complied U-BOOT according this wiki page:
It was build succesfully to support QSPI flash. Now I want to unify it with eMCC, so wand to use same custom compiled TF-A, U-BOOT for both QSPI and eMMC.
After TF-A and U-BOOT (with FIP) build I have successfully downloaded all of them to target board using standard FlashLayout file but after trying to boot eMMC found following message in console:
Hit any key to stop autoboot: 0
Boot over mmc0!
switch to partitions #0, OK
mmc0(part 0) is current device
** Unrecognized filesystem type **
Accoring to mmc part it has correct PT:
STM32MP> mmc part
Partition Map for MMC device 0 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000400 0x000023ff "fip"
attrs: 0x0000000000000000
type: 8da63339-0007-60c0-c436-083ac8230908
guid: 2b0cfe67-d6dd-4c69-a5f4-6aa612222be5
2 0x00002400 0x000223ff "boot"
attrs: 0x0000000000000004
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
type: linux
guid: 2fca1102-25c7-4251-be14-fa2f44bac9c3
3 0x00022400 0x0002a3ff "vendorfs"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
type: linux
guid: c66dbb14-a7b9-4159-a5be-e8a6d390a494
4 0x0002a400 0x0019f3ff "rootfs"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
type: linux
guid: e91c4e10-16e6-4c0e-bd0e-77becf4a3582
5 0x0019f400 0x0072bbff "userfs"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
type: linux
guid: 3310aa04-c53f-4693-aa00-08cf60cbb12d
STM32MP>
I've spent some time and discovered, that ext4 fs is disabled by default and can be enabled with CONFIG_FS_EXT4=1 in command line. I use this command to comile:
make -f ../Makefile.sdk DEVICE_TREE=stm32mp157a-stm32mp151-dk1-mx DEPLOYDIR=$FIP_DEPLOYDIR_ROOT/u-boot FIP_CONFIG="trusted" CONFIG_FS_EXT4=1 FIP_BL32_CONF="tfa," all
But there is error diring compile time:
arm-ostl-linux-gnueabi-ld.bfd: fs/built-in.o:(.data.fstypes+0x50): undefined reference to `ext4fs_probe'
arm-ostl-linux-gnueabi-ld.bfd: fs/built-in.o:(.data.fstypes+0x54): undefined reference to `ext4fs_ls'
arm-ostl-linux-gnueabi-ld.bfd: fs/built-in.o:(.data.fstypes+0x58): undefined reference to `ext4fs_exists'
arm-ostl-linux-gnueabi-ld.bfd: fs/built-in.o:(.data.fstypes+0x5c): undefined reference to `ext4fs_size'
arm-ostl-linux-gnueabi-ld.bfd: fs/built-in.o:(.data.fstypes+0x60): undefined reference to `ext4_read_file'
arm-ostl-linux-gnueabi-ld.bfd: fs/built-in.o:(.data.fstypes+0x64): undefined reference to `ext4_write_file'
arm-ostl-linux-gnueabi-ld.bfd: fs/built-in.o:(.data.fstypes+0x68): undefined reference to `ext4fs_close'
arm-ostl-linux-gnueabi-ld.bfd: fs/built-in.o:(.data.fstypes+0x6c): undefined reference to `ext4fs_uuid'
arm-ostl-linux-gnueabi-ld.bfd: fs/built-in.o:(.data.fstypes+0x84): undefined reference to `ext4fs_create_link'
Could you please give me a way how to enable ext4 support in custome U-BOOT?
I also noticed following things:
- We need to issue command make stm32mp15_trusted_defconfig
.config file will be created in u-boot src root
But after issuing make command above there is strange mastake that U-BOOT src root is not clean and reccommendating to run make mrproper that will remove .config created with make stm32mp15_trusted_defconfig:
Using /home/screep/Distribution-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-03-31/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-2020.10.r1-r0/u-boot-stm32mp-2020.10.r1 as source for U-Boot
/home/screep/Distribution-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-03-31/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-2020.10.r1-r0/u-boot-stm32mp-2020.10.r1 is not clean, please run 'make mrproper'
in the '/home/screep/Distribution-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-03-31/sources/arm-ostl-linux-gnueabi/u-boot-stm32mp-2020.10.r1-r0/u-boot-stm32mp-2020.10.r1' directory.
If I remove CONFIG_FS_EXT4=1 option and rum make mrproper u-boot builds succesfully.
Could you please give a hint to me how to correctly enable ext4 fs in custom u-boot?
Thank you in advance
Looking forward for your reply
- than
