|
@@ -34,6 +34,8 @@ genimage_type()
|
|
{
|
|
{
|
|
if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
|
|
if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
|
|
echo "genimage.cfg.template_imx8"
|
|
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
|
|
elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
|
|
echo "genimage.cfg.template_spl"
|
|
echo "genimage.cfg.template_spl"
|
|
else
|
|
else
|
|
@@ -41,6 +43,15 @@ genimage_type()
|
|
fi
|
|
fi
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+imx_offset()
|
|
|
|
+{
|
|
|
|
+ if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
|
|
|
|
+ echo "33K"
|
|
|
|
+ else
|
|
|
|
+ echo "32K"
|
|
|
|
+ fi
|
|
|
|
+}
|
|
|
|
+
|
|
uboot_image()
|
|
uboot_image()
|
|
{
|
|
{
|
|
if grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y$" ${BR2_CONFIG}; then
|
|
if grep -Eq "^BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y$" ${BR2_CONFIG}; then
|
|
@@ -53,11 +64,13 @@ uboot_image()
|
|
main()
|
|
main()
|
|
{
|
|
{
|
|
local FILES="$(dtb_list) $(linux_image)"
|
|
local FILES="$(dtb_list) $(linux_image)"
|
|
|
|
+ local IMXOFFSET="$(imx_offset)"
|
|
local UBOOTBIN="$(uboot_image)"
|
|
local UBOOTBIN="$(uboot_image)"
|
|
local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
|
|
local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
|
|
local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
|
local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
|
|
|
|
|
sed -e "s/%FILES%/${FILES}/" \
|
|
sed -e "s/%FILES%/${FILES}/" \
|
|
|
|
+ -e "s/%IMXOFFSET%/${IMXOFFSET}/" \
|
|
-e "s/%UBOOTBIN%/${UBOOTBIN}/" \
|
|
-e "s/%UBOOTBIN%/${UBOOTBIN}/" \
|
|
board/freescale/common/imx/$(genimage_type) > ${GENIMAGE_CFG}
|
|
board/freescale/common/imx/$(genimage_type) > ${GENIMAGE_CFG}
|
|
|
|
|