if BR2_PACKAGE_FIRMWARE_IMX
-config BR2_PACKAGE_FIRMWARE_IMX_NEEDS_SDMA_FW
- bool
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
+config BR2_PACKAGE_FIRMWARE_IMX_SDMA_FW_NAME
+ string
+ default "imx25" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK
+ default "imx51" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51
+ default "imx53" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
+ default "imx6q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
+ default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7
+ default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
+ default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM
+ default "imx7d" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN
-config BR2_PACKAGE_FIRMWARE_IMX_NEEDS_VPU_FW
- bool
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
- default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
+config BR2_PACKAGE_FIRMWARE_IMX_VPU_FW_NAME
+ string
+ default "imx27" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS
+ default "imx51" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51
+ default "imx53" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53
+ default "imx6" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q
+ default "imx8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
+ default "imx8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
config BR2_PACKAGE_FIRMWARE_IMX_NEEDS_HDMI_FW
bool
FIRMWARE_IMX_INSTALL_IMAGES = YES
-FIRMWARE_IMX_PLATFORM_LOWER = $(shell echo $(BR2_PACKAGE_FREESCALE_IMX_PLATFORM) | tr A-Z a-z | head -c 5)
-
define FIRMWARE_IMX_EXTRACT_CMDS
$(call FREESCALE_IMX_EXTRACT_HELPER,$(FIRMWARE_IMX_DL_DIR)/$(FIRMWARE_IMX_SOURCE))
endef
# SDMA firmware
#
-ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_NEEDS_SDMA_FW),y)
+FIRMWARE_IMX_SDMA_FW_NAME = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_SDMA_FW_NAME))
+ifneq ($(FIRMWARE_IMX_SDMA_FW_NAME),)
define FIRMWARE_IMX_INSTALL_TARGET_SDMA_FW
mkdir -p $(TARGET_DIR)/lib/firmware/imx/sdma
- cp -r $(@D)/firmware/sdma/sdma-$(FIRMWARE_IMX_PLATFORM_LOWER)*.bin \
+ cp -r $(@D)/firmware/sdma/sdma-$(FIRMWARE_IMX_SDMA_FW_NAME)*.bin \
$(TARGET_DIR)/lib/firmware/imx/sdma/
endef
endif
# VPU firmware
#
-ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_NEEDS_VPU_FW),y)
-# special case for i.MX8X, which uses the same firmware as i.MX8
-ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y)
-FIRMWARE_IMX_VPU_PLATFORM = imx8
-else
-FIRMWARE_IMX_VPU_PLATFORM = $(FIRMWARE_IMX_PLATFORM_LOWER)
-endif
-
+FIRMWARE_IMX_VPU_FW_NAME = $(call qstrip,$(BR2_PACKAGE_FIRMWARE_IMX_VPU_FW_NAME))
+ifneq ($(FIRMWARE_IMX_VPU_FW_NAME),)
define FIRMWARE_IMX_INSTALL_TARGET_VPU_FW
mkdir -p $(TARGET_DIR)/lib/firmware/imx/vpu
- cp $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_PLATFORM)*.bin \
+ cp $(@D)/firmware/vpu/vpu_fw_$(FIRMWARE_IMX_VPU_FW_NAME)*.bin \
$(TARGET_DIR)/lib/firmware/imx/vpu/
endef
endif