diff --git a/package/qoriq-rcw/Config.in.host b/package/qoriq-rcw/Config.in.host index 1f69c0389c..08fc83acd0 100644 --- a/package/qoriq-rcw/Config.in.host +++ b/package/qoriq-rcw/Config.in.host @@ -25,4 +25,16 @@ config BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH included for use in the SDK or with post scripts but no RCW binary will not be generated. +config BR2_PACKAGE_HOST_QORIQ_RCW_INTREE + string "In-tree RCW name" + depends on !BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH + help + This option is used to specify the RCW binary file for board. + which is composed as platform/serdes_value/rcw_file: platform + is the platform name, serdes_value is the setting of the + Serdes, and rcw_file is the file name of RCW. For example: + "ls1028ardb/R_SQPP_0x85bb/rcw_1300_sdboot.bin" + + If this option is empty, no rcw file is used. + endif diff --git a/package/qoriq-rcw/qoriq-rcw.mk b/package/qoriq-rcw/qoriq-rcw.mk index bad4a451d3..93e660b1dd 100644 --- a/package/qoriq-rcw/qoriq-rcw.mk +++ b/package/qoriq-rcw/qoriq-rcw.mk @@ -13,8 +13,10 @@ QORIQ_RCW_LICENSE_FILES = LICENSE HOST_QORIQ_RCW_DEPENDENCIES = $(BR2_PYTHON3_HOST_DEPENDENCY) QORIQ_RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH)) +QORIQ_RCW_INTREE = $(call qstrip,$(BR2_PACKAGE_HOST_QORIQ_RCW_INTREE)) ifneq ($(QORIQ_RCW_FILES),) + QORIQ_RCW_INCLUDES = $(filter-out %.rcw,$(QORIQ_RCW_FILES)) # Get the name of the custom rcw file from the custom list QORIQ_RCW_PROJECT = $(notdir $(filter %.rcw,$(QORIQ_RCW_FILES))) @@ -54,6 +56,20 @@ endef define HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE $(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin endef + +else ifneq ($(QORIQ_RCW_INTREE),) + +QORIQ_RCW_PLATFORM = $(firstword $(subst /, ,$(QORIQ_RCW_INTREE))) +QORIQ_RCW_FILE_BIN = $(lastword $(subst /, ,$(QORIQ_RCW_INTREE))) + +define HOST_QORIQ_RCW_BUILD_CMDS + $(MAKE) -C $(@D)/$(QORIQ_RCW_PLATFORM) +endef + +define HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE + $(INSTALL) -D -m 0644 $(@D)/$(patsubst %.rcw,%.bin,$(QORIQ_RCW_INTREE)) \ + $(BINARIES_DIR)/PBL.bin +endef endif # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer