11-28-2018 09:50 AM
I might have found a bug in Petalinux concerning the automatic creation of the u-boot config and wanted to report it here:
Among others, Petalinux automatically generates the the entries for "CONFIG_ENV_FAT_DEVICE_AND_PART", "CONFIG_ENV_FAT_FILE" and "CONFIG_ENV_FAT_INTERFACE" depending on settings in the petalinux-config menuconfig.
For an example depending on the "Subsystem AUTO Hardware Settings -> SD/SDIO -> Primary SD/SDIO" setting CONFIG_ENV_FAT_DEVICE_AND_PART is either set to "0:auto" (for psu_sd0) or "1:auto" (for psu_sd1). This is perfect, the only problem is, that the configs do not have the right syntax, since the "" are missing.
Here is what petalinux generates in project-spec/meta-plnx-generated/recipes-bsp/u-boot/configs/config.cfg:
CONFIG_ENV_FAT_DEVICE_AND_PART=0:auto CONFIG_ENV_FAT_FILE=uboot.env CONFIG_ENV_FAT_INTERFACE=mmc
And here is how it should look like:
CONFIG_ENV_FAT_DEVICE_AND_PART="0:auto" CONFIG_ENV_FAT_FILE="uboot.env" CONFIG_ENV_FAT_INTERFACE="mmc"
The problem is, that without the "" the autoconfig of u-boot does not accept the values, and uses its defaults. This means even if you configure psu_sd1 as the primary SD interface, u-boot will still load the environment from the "0:auto" FAT interface.
At the moment I am fixing this by correctly redefining CONFIG_ENV_FAT_DEVICE_AND_PART in /project-spec/meta-user/recipes-bsp/u-boot/files/u-boot.cfg, but it would be nice if this could be fixed in the upcoming Petalinux versions.
11-28-2018 01:40 PM
Thanks for bringing this up. We will investigate on this and keep posted If this is fixed in 2018.3 internal builds else will file CR to fix in upcoming release.
01-02-2019 07:21 AM
Any news on this?
I have just tried a build with Petalinux 2018.3 and the issue is still present there.