mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-23 21:43:30 +08:00
imx/post-image: Allow flashing u-boot-dtb.imx in the SD card
Add support for flashing the u-boot-dtb.imx binary in the SD card when a target selects BR2_TARGET_UBOOT_FORMAT_DTB_IMX. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
d0e8f4a50d
commit
52344e556f
@ -22,7 +22,7 @@ image sdcard.img {
|
||||
|
||||
partition u-boot {
|
||||
in-partition-table = "no"
|
||||
image = "u-boot.imx"
|
||||
image = "%UBOOTBIN%"
|
||||
offset = 1024
|
||||
}
|
||||
|
||||
|
@ -41,13 +41,24 @@ genimage_type()
|
||||
fi
|
||||
}
|
||||
|
||||
uboot_image()
|
||||
{
|
||||
if grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y$" ${BR2_CONFIG}; then
|
||||
echo "u-boot-dtb.imx"
|
||||
elif grep -Eq "^BR2_TARGET_UBOOT_FORMAT_IMX=y$" ${BR2_CONFIG}; then
|
||||
echo "u-boot.imx"
|
||||
fi
|
||||
}
|
||||
|
||||
main()
|
||||
{
|
||||
local FILES="$(dtb_list) $(linux_image)"
|
||||
local UBOOTBIN="$(uboot_image)"
|
||||
local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
|
||||
local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
|
||||
sed -e "s/%FILES%/${FILES}/" \
|
||||
-e "s/%UBOOTBIN%/${UBOOTBIN}/" \
|
||||
board/freescale/common/imx/$(genimage_type) > ${GENIMAGE_CFG}
|
||||
|
||||
rm -rf "${GENIMAGE_TMP}"
|
||||
|
Loading…
Reference in New Issue
Block a user