2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-12-19 14:37:33 +01:00
|
|
|
#
|
2013-05-26 14:08:26 +02:00
|
|
|
# firmware-imx
|
2012-12-19 14:37:33 +01:00
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-12-19 14:37:33 +01:00
|
|
|
|
2020-07-10 10:16:54 +02:00
|
|
|
FIRMWARE_IMX_VERSION = 8.8
|
2014-02-14 01:26:18 +01:00
|
|
|
FIRMWARE_IMX_SITE = $(FREESCALE_IMX_SITE)
|
2012-12-19 14:37:33 +01:00
|
|
|
FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin
|
2014-11-19 22:30:35 +01:00
|
|
|
|
2016-06-10 20:11:51 +02:00
|
|
|
FIRMWARE_IMX_LICENSE = NXP Semiconductor Software License Agreement
|
2015-09-11 11:39:40 +02:00
|
|
|
FIRMWARE_IMX_LICENSE_FILES = EULA COPYING
|
2012-12-19 14:37:33 +01:00
|
|
|
FIRMWARE_IMX_REDISTRIBUTE = NO
|
|
|
|
|
2020-07-10 14:00:45 +02:00
|
|
|
FIRMWARE_IMX_INSTALL_IMAGES = YES
|
|
|
|
|
|
|
|
FIRMWARE_IMX_PLATFORM_LOWER = $(shell echo $(BR2_PACKAGE_FREESCALE_IMX_PLATFORM) | tr A-Z a-z | head -c 5)
|
2012-12-19 14:37:33 +01:00
|
|
|
|
|
|
|
define FIRMWARE_IMX_EXTRACT_CMDS
|
2018-04-02 15:09:24 +02:00
|
|
|
$(call FREESCALE_IMX_EXTRACT_HELPER,$(FIRMWARE_IMX_DL_DIR)/$(FIRMWARE_IMX_SOURCE))
|
2012-12-19 14:37:33 +01:00
|
|
|
endef
|
|
|
|
|
2020-07-10 14:00:45 +02:00
|
|
|
#
|
|
|
|
# DDR firmware
|
|
|
|
#
|
2020-05-27 07:07:45 +02:00
|
|
|
|
2020-07-10 14:00:42 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_LPDDR4),y)
|
2018-04-12 14:35:22 +02:00
|
|
|
FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys
|
|
|
|
define FIRMWARE_IMX_PREPARE_LPDDR4_FW
|
|
|
|
$(TARGET_OBJCOPY) -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_$(1)_imem.bin \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_$(1)_imem_pad.bin
|
|
|
|
$(TARGET_OBJCOPY) -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_$(1)_dmem.bin \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_$(1)_dmem_pad.bin
|
|
|
|
cat $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_$(1)_imem_pad.bin \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_$(1)_dmem_pad.bin > \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_$(1)_fw.bin
|
|
|
|
endef
|
|
|
|
|
2020-07-10 14:00:45 +02:00
|
|
|
define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
|
2018-04-12 14:35:22 +02:00
|
|
|
# Create padded versions of lpddr4_pmu_* and generate lpddr4_pmu_train_fw.bin.
|
2018-12-27 17:08:05 +01:00
|
|
|
# lpddr4_pmu_train_fw.bin is needed when generating imx8-boot-sd.bin
|
2018-04-12 14:35:22 +02:00
|
|
|
# which is done in post-image script.
|
|
|
|
$(call FIRMWARE_IMX_PREPARE_LPDDR4_FW,1d)
|
|
|
|
$(call FIRMWARE_IMX_PREPARE_LPDDR4_FW,2d)
|
|
|
|
cat $(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_1d_fw.bin \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/lpddr4_pmu_train_2d_fw.bin > \
|
|
|
|
$(BINARIES_DIR)/lpddr4_pmu_train_fw.bin
|
2020-05-27 07:07:45 +02:00
|
|
|
ln -sf $(BINARIES_DIR)/lpddr4_pmu_train_fw.bin $(BINARIES_DIR)/ddr_fw.bin
|
|
|
|
endef
|
2020-07-10 14:00:45 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_DDR4),y)
|
2020-05-27 07:07:45 +02:00
|
|
|
FIRMWARE_IMX_DDRFW_DIR = $(@D)/firmware/ddr/synopsys
|
|
|
|
define FIRMWARE_IMX_PREPARE_DDR4_FW
|
|
|
|
$(TARGET_OBJCOPY) -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/ddr4_imem_$(1)_201810.bin \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/ddr4_imem_$(1)_201810_pad.bin
|
|
|
|
$(TARGET_OBJCOPY) -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/ddr4_dmem_$(1)_201810.bin \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/ddr4_dmem_$(1)_201810_pad.bin
|
|
|
|
cat $(FIRMWARE_IMX_DDRFW_DIR)/ddr4_imem_$(1)_201810_pad.bin \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/ddr4_dmem_$(1)_201810_pad.bin > \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/ddr4_$(1)_201810_fw.bin
|
|
|
|
endef
|
|
|
|
|
2020-07-10 14:00:45 +02:00
|
|
|
define FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW
|
2020-05-27 07:07:45 +02:00
|
|
|
# Create padded versions of ddr4_* and generate ddr4_fw.bin.
|
|
|
|
# ddr4_fw.bin is needed when generating imx8-boot-sd.bin
|
|
|
|
# which is done in post-image script.
|
|
|
|
$(call FIRMWARE_IMX_PREPARE_DDR4_FW,1d)
|
|
|
|
$(call FIRMWARE_IMX_PREPARE_DDR4_FW,2d)
|
|
|
|
cat $(FIRMWARE_IMX_DDRFW_DIR)/ddr4_1d_201810_fw.bin \
|
|
|
|
$(FIRMWARE_IMX_DDRFW_DIR)/ddr4_2d_201810_fw.bin > \
|
|
|
|
$(BINARIES_DIR)/ddr4_201810_fw.bin
|
|
|
|
ln -sf $(BINARIES_DIR)/ddr4_201810_fw.bin $(BINARIES_DIR)/ddr_fw.bin
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
2020-07-10 14:00:45 +02:00
|
|
|
#
|
|
|
|
# HDMI firmware
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_NEEDS_HDMI_FW),y)
|
|
|
|
define FIRMWARE_IMX_INSTALL_IMAGE_HDMI_FW
|
2018-04-12 14:35:22 +02:00
|
|
|
cp $(@D)/firmware/hdmi/cadence/signed_hdmi_imx8m.bin \
|
|
|
|
$(BINARIES_DIR)/signed_hdmi_imx8m.bin
|
|
|
|
endef
|
2020-05-27 07:07:45 +02:00
|
|
|
endif
|
|
|
|
|
2020-07-10 14:00:45 +02:00
|
|
|
#
|
|
|
|
# EPDC firmware
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_NEEDS_EPDC_FW),y)
|
|
|
|
define FIRMWARE_IMX_INSTALL_TARGET_EPDC_FW
|
2016-01-30 12:45:48 +01:00
|
|
|
mkdir -p $(TARGET_DIR)/lib/firmware/imx
|
|
|
|
cp -r $(@D)/firmware/epdc $(TARGET_DIR)/lib/firmware/imx
|
|
|
|
mv $(TARGET_DIR)/lib/firmware/imx/epdc/epdc_ED060XH2C1.fw.nonrestricted \
|
2016-03-09 22:30:30 +01:00
|
|
|
$(TARGET_DIR)/lib/firmware/imx/epdc/epdc_ED060XH2C1.fw
|
2012-12-19 14:37:33 +01:00
|
|
|
endef
|
2018-04-12 14:35:22 +02:00
|
|
|
endif
|
2012-12-19 14:37:33 +01:00
|
|
|
|
2020-07-10 14:00:45 +02:00
|
|
|
#
|
|
|
|
# SDMA firmware
|
|
|
|
#
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_FIRMWARE_IMX_NEEDS_SDMA_FW),y)
|
|
|
|
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 \
|
|
|
|
$(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
|
|
|
|
|
|
|
|
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 \
|
|
|
|
$(TARGET_DIR)/lib/firmware/imx/vpu/
|
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
define FIRMWARE_IMX_INSTALL_IMAGES_CMDS
|
|
|
|
$(FIRMWARE_IMX_INSTALL_IMAGE_DDR_FW)
|
|
|
|
$(FIRMWARE_IMX_INSTALL_IMAGE_HDMI_FW)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define FIRMWARE_IMX_INSTALL_TARGET_CMDS
|
|
|
|
$(FIRMWARE_IMX_INSTALL_TARGET_EPDC_FW)
|
|
|
|
$(FIRMWARE_IMX_INSTALL_TARGET_SDMA_FW)
|
|
|
|
$(FIRMWARE_IMX_INSTALL_TARGET_VPU_FW)
|
|
|
|
endef
|
|
|
|
|
2012-12-19 14:37:33 +01:00
|
|
|
$(eval $(generic-package))
|