aboutsummaryrefslogtreecommitdiff
path: root/board/freescale/common/imx/post-image.sh
diff options
context:
space:
mode:
Diffstat (limited to 'board/freescale/common/imx/post-image.sh')
-rwxr-xr-xboard/freescale/common/imx/post-image.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
index 6590beda3e..12a5bea73b 100755
--- a/board/freescale/common/imx/post-image.sh
+++ b/board/freescale/common/imx/post-image.sh
@@ -34,6 +34,8 @@ genimage_type()
{
if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
echo "genimage.cfg.template_imx8"
+ elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then
+ echo "genimage.cfg.template_imx8"
elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
echo "genimage.cfg.template_spl"
else
@@ -41,6 +43,15 @@ genimage_type()
fi
}
+imx_offset()
+{
+ if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
+ echo "33K"
+ else
+ echo "32K"
+ fi
+}
+
uboot_image()
{
if grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y$" ${BR2_CONFIG}; then
@@ -53,11 +64,13 @@ uboot_image()
main()
{
local FILES="$(dtb_list) $(linux_image)"
+ local IMXOFFSET="$(imx_offset)"
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/%IMXOFFSET%/${IMXOFFSET}/" \
-e "s/%UBOOTBIN%/${UBOOTBIN}/" \
board/freescale/common/imx/$(genimage_type) > ${GENIMAGE_CFG}