diff --git a/DEVELOPERS b/DEVELOPERS
index cdd44be37c..81e144ead5 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -878,6 +878,9 @@ F:	package/tinydtls/
 F:	package/tinymembench/
 F:	package/whois/
 
+N:	Fabrice Goucem <fabrice.goucem@nxp.com>
+F:	package/freescale-imx/imx-m4-firmware/
+
 N:	Falco Hyfing <hyfinglists@gmail.com>
 F:	package/python-pymodbus/
 
diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
index 19d8fffb63..f9851c2d3b 100755
--- a/board/freescale/common/imx/post-image.sh
+++ b/board/freescale/common/imx/post-image.sh
@@ -30,6 +30,18 @@ linux_image()
 	fi
 }
 
+#
+# m4_image prints all available M4 firmware file names for the genimage
+# configuration file
+#
+m4_image()
+{
+	if grep -Eq "^BR2_PACKAGE_IMX_M4_FIRMWARE=y$" ${BR2_CONFIG}; then
+		echo -n ", "
+		for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n "$(basename $f), "; done
+	fi
+}
+
 genimage_type()
 {
 	if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
@@ -75,7 +87,7 @@ uboot_image()
 
 main()
 {
-	local FILES="$(dtb_list) $(linux_image)"
+	local FILES="$(dtb_list) $(linux_image) $(m4_image)"
 	local IMXOFFSET="$(imx_offset)"
 	local UBOOTBIN="$(uboot_image)"
 	local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)"
diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in
index f010aab87b..76694bc788 100644
--- a/package/freescale-imx/Config.in
+++ b/package/freescale-imx/Config.in
@@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
 		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
 
+config BR2_PACKAGE_FREESCALE_IMX_HAS_M4
+	bool
+	default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \
+		BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
+
 source "package/freescale-imx/imx-alsa-plugins/Config.in"
 source "package/freescale-imx/imx-codec/Config.in"
 source "package/freescale-imx/imx-kobs/Config.in"
 source "package/freescale-imx/imx-lib/Config.in"
+source "package/freescale-imx/imx-m4-firmware/Config.in"
 source "package/freescale-imx/imx-m4fwloader/Config.in"
 source "package/freescale-imx/imx-parser/Config.in"
 source "package/freescale-imx/imx-uuc/Config.in"
diff --git a/package/freescale-imx/imx-m4-firmware/Config.in b/package/freescale-imx/imx-m4-firmware/Config.in
new file mode 100644
index 0000000000..2c318e5dfc
--- /dev/null
+++ b/package/freescale-imx/imx-m4-firmware/Config.in
@@ -0,0 +1,11 @@
+comment "imx-m4-firmware needs an i.MX platform with Cortex-M4"
+	depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_M4
+
+config BR2_PACKAGE_IMX_M4_FIRMWARE
+	bool "imx-m4-firmware"
+	depends on BR2_PACKAGE_FREESCALE_IMX_HAS_M4
+	help
+	  Cortex-M4 firmware blobs for the Freescale i.MX SoCs.
+
+	  This library is provided by Freescale as-is and doesn't have
+	  an upstream.
diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash
new file mode 100644
index 0000000000..fdc2c23c9f
--- /dev/null
+++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash
@@ -0,0 +1,7 @@
+# locally computed
+sha256  cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254  imx7d-sabresd-m4-freertos-1.0.1.bin
+sha256  4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3  imx8mm-m4-demo-2.5.0.bin
+sha256  fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8  imx8mq-m4-demo-2.3.0.bin
+sha256  4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c  imx8qx-m4-demo-2.5.0.bin
+
+# no hash for license file as it is different for each package listed above
diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk
new file mode 100644
index 0000000000..435592afc0
--- /dev/null
+++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk
@@ -0,0 +1,61 @@
+################################################################################
+#
+# imx-m4-firmware
+#
+################################################################################
+
+IMX_M4_FIRMWARE_SITE = $(FREESCALE_IMX_SITE)
+
+IMX_M4_FIRMWARE_LICENSE = NXP Semiconductor Software License Agreement
+IMX_M4_FIRMWARE_LICENSE_FILES = COPYING
+IMX_M4_FIRMWARE_REDISTRIBUTE = NO
+
+define IMX_M4_FIRMWARE_EXTRACT_CMDS
+	$(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_M4_FIRMWARE_DL_DIR)/$(IMX_M4_FIRMWARE_SOURCE))
+endef
+
+# Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting
+
+ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y)
+IMX_M4_FIRMWARE_VERSION = 1.0.1
+IMX_M4_FIRMWARE_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_FIRMWARE_VERSION).bin
+IMX_M4_FIRMWARE_INSTALL_IMAGES = YES
+define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS
+	cp $(@D)/imx7d_sabresd_m4_TCM_helloworld.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_helloworld.bin
+	cp $(@D)/imx7d_sabresd_m4_TCM_mcctty.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_mcctty.bin
+	cp $(@D)/imx7d_sabresd_m4_TCM_Pingpang.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_Pingpang.bin
+endef
+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y)
+IMX_M4_FIRMWARE_VERSION = 2.5.0
+IMX_M4_FIRMWARE_SOURCE = imx8qx-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin
+IMX_M4_FIRMWARE_INSTALL_IMAGES = YES
+define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS
+	cp $(@D)/imx8qx_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_hello_world.bin
+	cp $(@D)/imx8qx_m4_TCM_power_mode_switch.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_power_mode_switch.bin
+	cp $(@D)/imx8qx_m4_TCM_rear_view_camera.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rear_view_camera.bin
+	cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin
+	cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin
+	cp $(@D)/imx8qx_m4_TCM_srtm_demo.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_srtm_demo.bin
+endef
+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y)
+IMX_M4_FIRMWARE_VERSION = 2.3.0
+IMX_M4_FIRMWARE_SOURCE = imx8mq-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin
+IMX_M4_FIRMWARE_INSTALL_IMAGES = YES
+define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS
+	cp $(@D)/imx8mq_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_hello_world.bin
+	cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin
+	cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin
+endef
+else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM),y)
+IMX_M4_FIRMWARE_VERSION = 2.5.0
+IMX_M4_FIRMWARE_SOURCE = imx8mm-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin
+IMX_M4_FIRMWARE_INSTALL_IMAGES = YES
+define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS
+	cp $(@D)/imx8mm_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_hello_world.bin
+	cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin
+	cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin
+	cp $(@D)/imx8mm_m4_TCM_sai_low_power_audio.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_sai_low_power_audio.bin
+endef
+endif
+
+$(eval $(generic-package))
