Part Number: SK-AM64
Hello
I'm using TMDS64GPEVM board. Revision PRC101B. I want to load U-Boot uEnv.txt from mtd parition. Regarding to this topic: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1070402/sk-am64-start-u-boot-from-ospi-with-the-sk-am64-starter-kit/3968228?fbclid=IwAR2BOQTS5gh2fgKw2Rw1P6O8ys0c-vF-1FOLDxzjk4aHq5XJ5VVq7q1twJ8#3968228
I set U-Boot config options:
CONFIG_ENV_IS_IN_FAT=n
CONFIG_ENV_IS_IN_UBI=y
CONFIG_ENV_UBI_PART="uboot_env_ubi"
CONFIG_ENV_UBI_VOLUME="uboot_env_vol"
Next I generated ubi image which consist of two paritions:
[uboot_env_ubi]
mode=ubi
image=uboot_env_ubi.ubifs
vol_id=0
vol_type=static
vol_name=uboot_env_vol
vol_size=16MiB
[rootfs]
mode=ubi
image=rootfs.ubifs
vol_id=1
vol_type=dynamic
vol_name=rootfs
vol_size=36MiB
In U-Boot prompt mtd list show me:
* nor0
- type: NOR flash
- block size: 0x40000 bytes
- min I/O: 0x10 bytes
- 0x000000000000-0x000004000000 : "nor0"
- 0x000000000000-0x000000100000 : "ospi.tiboot3"
- 0x000000100000-0x000000300000 : "ospi.tispl"
- 0x000000300000-0x000000700000 : "ospi.u-boot"
- 0x000000700000-0x000000740000 : "ospi.env"
- 0x000000740000-0x000000780000 : "ospi.env.backup"
- 0x000000800000-0x000003fc0000 : "ospi.rootfs"
- 0x000003f40000-0x000003f80000 : "ospi.phypattern"
So I choose to load put my .ubi image on address 0x000000800000-0x000003fc0000 : "ospi.rootfs"
sf erase 0x800000 0x37c0000
tftp ${loadaddr} rootfs.ubi
sf update $loadaddr 0x800000 $filesize
Then I run U-Boot command:
setenv mtdparts 'mtdparts=fc40000.spi.0:1m(ospi.tiboot3),2m(ospi.tispl),4m(ospi.u-boot),256k(ospi.env),256k(ospi.env.backup),57088k@8m(ospi.rootfs),256k@0x3fc0000(ospi.phypattern)';setenv mtdids 'nor0=fc40000.spi.0';run findfdt;run args_all;setenv bootargs console=${console} ${optargs} root=ubi0:rootfs rw ubi.mtd=ospi.rootfs rootfstype=ubifs rootwait=1;sf probe;ubi part ospi.rootfs;ubifsmount ubi0:rootfs;ubifsload ${loadaddr} /boot/Image;ubifsload ${fdtaddr} /boot/${fdtfile};run run_kern
But when U-Boot fail to load environment. It prints message:
Loading Environment from UBI... env_buf [32 bytes] too small for value of "mtdids"
env_buf [32 bytes] too small for value of "mtdids"
Could not find a valid device for fc40000.spi.0
env_buf [32 bytes] too small for value of "mtdids"
Could not find a valid device for omap2-nand.0
Partition uboot_env_ubi not found!
So my questions are:
1. Where U-Boot search partiton uboot_env_ubi? On which mtd device? How can I force U-Boot to looks for my partition on ospi.rootfs mtd device?
2. What exactly means "env_buf [32 bytes] too small for value of "mtdids""? Is there any possibility to increase env_buf without patching the code?
Thanks
BR
Jakub