package/imx-mkimage: add support for i.MX8 and i.MX8X
authorAndré Hentschel <andre.hentschel@zf.com>
Mon, 18 Feb 2019 20:48:05 +0000 (21:48 +0100)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 23 Feb 2019 14:59:37 +0000 (15:59 +0100)
Signed-off-by: André Hentschel <andre.hentschel@zf.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/imx-mkimage/imx-mkimage.mk

index ac22c974acb081425db0d0d35a9f1182504179c1..06d3157dc17d12d8ff84c50fbc72d65e0431f015 100644 (file)
@@ -11,15 +11,23 @@ IMX_MKIMAGE_LICENSE = GPL-2.0+
 IMX_MKIMAGE_LICENSE_FILES = iMX8dv/COPYING
 HOST_IMX_MKIMAGE_DEPENDENCIES = host-zlib
 
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y)
+# i.MX8M needs a different binary
 define HOST_IMX_MKIMAGE_BUILD_CMDS
-       # Currently this only supports iMX8M. When more hardware is available
-       # this needs to be selectable based on iMX8-version (iMX8M,iMXQ etc).
        $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)/iMX8M -f soc.mak mkimage_imx8
 endef
-
 define HOST_IMX_MKIMAGE_INSTALL_CMDS
        $(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8
        $(INSTALL) -D -m 755 $(@D)/iMX8M/mkimage_fit_atf.sh $(HOST_DIR)/bin/mkimage_fit_atf.sh
 endef
+else
+# i.MX8 and i.MX8X
+define HOST_IMX_MKIMAGE_BUILD_CMDS
+       $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) MKIMG=mkimage_imx8 mkimage_imx8
+endef
+define HOST_IMX_MKIMAGE_INSTALL_CMDS
+       $(INSTALL) -D -m 755 $(@D)/mkimage_imx8 $(HOST_DIR)/bin/mkimage_imx8
+endef
+endif
 
 $(eval $(host-generic-package))