diff options
Diffstat (limited to 'board/freescale/common/imx/post-image.sh')
-rwxr-xr-x | board/freescale/common/imx/post-image.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index 264c8a4bcb..6590beda3e 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -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}" |