The configuration files for the MC firmware binary are distributed through a separate repository on GitHub, and need a different package. They are licensed differently than the firmware itself, and unlike the firmware, they are customizable. There are two ways for a board to use this package - similar to qoriq-rcw. If it is an NXP reference board or if the example files otherwise work fine with it, it is recommended to set the _INTREE variables to select a pre-existing DPL and DPC. Otherwise, if it is a custom board, the best solution is to just provide the DPL and DPC dts files in board/, and set the _CUSTOM_PATH variables to point to them. There are also two ways to deploy to the target. Traditionally in NXP BSPs, U-Boot loads the MC firmware, DPL and DPC from given offsets in the storage medium (outside of the filesystem). But this is not hardcoded and it doesn't have to be the case - the mcinitcmd U-Boot environment variable is freely customizable. What can also be done, and is done for the LX2160A-RDB, is to deploy multiple DPL and DPC files (all the files available for a board) to a folder of the rootfs, and just have two symlinks: dpl.dtb and dpc.dtb which point to the currently active files. This makes easier the processes of upgrading, downgrading and keeping multiple file versions. Nonetheless, the "traditional" method of deploying to the target is also possible. The selected DPL and DPC files are deployed to the "images" folder and are freely usable with genimage or other post-image scripts. Signed-off-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
45 lines
1.6 KiB
Makefile
45 lines
1.6 KiB
Makefile
################################################################################
|
|
#
|
|
# qoriq-mc-utils
|
|
#
|
|
################################################################################
|
|
|
|
QORIQ_MC_UTILS_VERSION = 10.39.0
|
|
QORIQ_MC_UTILS_SITE = $(call github,nxp-qoriq,mc-utils,mc_release_$(QORIQ_MC_UTILS_VERSION))
|
|
QORIQ_MC_UTILS_LICENSE = BSD-3-Clause
|
|
QORIQ_MC_UTILS_INSTALL_IMAGES = YES
|
|
QORIQ_MC_UTILS_DEPENDENCIES = host-dtc
|
|
|
|
QORIQ_MC_UTILS_DPC_FILES = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPC_CUSTOM_PATH))
|
|
QORIQ_MC_UTILS_DPC_INTREE = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPC_INTREE))
|
|
QORIQ_MC_UTILS_DPL_FILES = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPL_CUSTOM_PATH))
|
|
QORIQ_MC_UTILS_DPL_INTREE = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_DPL_INTREE))
|
|
QORIQ_MC_UTILS_INSTALL_PATH = $(call qstrip,$(BR2_PACKAGE_QORIQ_MC_UTILS_TARGET_INSTALL_PATH))
|
|
|
|
ifeq ($(QORIQ_MC_UTILS_TARGET_INSTALL_PATH),)
|
|
QORIQ_MC_UTILS_INSTALL_TARGET = NO
|
|
endif
|
|
|
|
define QORIQ_MC_UTILS_INSTALL_FILES
|
|
$(foreach file, $(QORIQ_MC_UTILS_DPC_FILES) $(QORIQ_MC_UTILS_DPL_FILES), \
|
|
PATH=$(BR_PATH) dtc -I dts -O dtb $(file).dts -o $(1)/$(notdir $(file)).dtb
|
|
)
|
|
$(foreach file, $(QORIQ_MC_UTILS_DPC_INTREE) $(QORIQ_MC_UTILS_DPL_INTREE), \
|
|
$(INSTALL) -D $(@D)/config/$(file).dtb $(1)/$(notdir $(file)).dtb
|
|
)
|
|
endef
|
|
|
|
define QORIQ_MC_UTILS_BUILD_CMDS
|
|
PATH=$(BR_PATH) $(MAKE) -C $(@D)/config/
|
|
endef
|
|
|
|
define QORIQ_MC_UTILS_INSTALL_IMAGES_CMDS
|
|
$(call QORIQ_MC_UTILS_INSTALL_FILES,$(BINARIES_DIR))
|
|
endef
|
|
|
|
define QORIQ_MC_UTILS_INSTALL_TARGET_CMDS
|
|
$(call QORIQ_MC_UTILS_INSTALL_FILES,$(TARGET_DIR)/$(QORIQ_MC_UTILS_INSTALL_PATH))
|
|
endef
|
|
|
|
$(eval $(generic-package))
|