board/freescale: Introduce UBOOTBIN in spl genimage templates

For boards like imx7d-pico, u-boot.img changes to u-boot-dtb.img in
U-Boot v2019.07. Therefore, we need to pick u-boot.img or u-boot-dtb.img
depending on the board configuration.

Just like was done in commit 52344e556f for the generic genimage
template, replace the U-Boot file name with UBOOTBIN, which is set
according to the BR2_TARGET_UBOOT_FORMAT_* option. We also need to set
the correct value for this variable for the u-boot.img and
u-boot-dtb.img cases.

While we're at it, rename the partition from 'u-boot-img' to 'u-boot',
to stay consistent with the generic genimage template.

Signed-off-by: Joris Offouga <offougajoris@gmail.com>
[Arnout: correct u-boot.img condition, rework commit log]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Joris Offouga 2019-07-09 11:57:02 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent b65255ccc3
commit 4f9f3a0e96
3 changed files with 8 additions and 4 deletions

View File

@ -17,9 +17,9 @@ image sdcard.img {
offset = 1024
}
partition u-boot-img {
partition u-boot {
in-partition-table = "no"
image = "u-boot.img"
image = "%UBOOTBIN%"
offset = 69K
}

View File

@ -26,9 +26,9 @@ image sdcard.img {
offset = 1024
}
partition u-boot-img {
partition u-boot {
in-partition-table = "no"
image = "u-boot.img"
image = "%UBOOTBIN%"
offset = 69K
}

View File

@ -66,6 +66,10 @@ uboot_image()
echo "u-boot-dtb.imx"
elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_IMX=y$" ${BR2_CONFIG}; then
echo "u-boot.imx"
elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y$" ${BR2_CONFIG}; then
echo "u-boot-dtb.img"
elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMG=y$" ${BR2_CONFIG}; then
echo "u-boot.img"
fi
}