2
1
Эх сурвалжийг харах

package/qoriq-rcw: add in-tree rcw source support

The qoriq-rcw repository contains the RCW source for a lot of
development boards already. Add a new option
BR2_PACKAGE_HOST_QORIQ_RCW_INTREE to use one of these rather than a
custom one.

Signed-off-by: Jerry Huang <jerry.huang@nxp.com>
[Arnout:
 - rename the option to _RCW_INTREE;
 - update commit message, documentation, and internal variables
   accordingly;
 - reorganise condition tree so it becomes a little simpler;
 - add patsubst so the source can be specified as either %.rcw or %.bin;
 - always install it as PBL.bin, to be consistent with the custom
   option.
]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Jerry Huang 5 жил өмнө
parent
commit
d167f7006e

+ 12 - 0
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
 	  included for use in the SDK or with post scripts but no
 	  RCW binary will not be generated.
 	  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
 endif

+ 16 - 0
package/qoriq-rcw/qoriq-rcw.mk

@@ -13,8 +13,10 @@ QORIQ_RCW_LICENSE_FILES = LICENSE
 HOST_QORIQ_RCW_DEPENDENCIES = $(BR2_PYTHON3_HOST_DEPENDENCY)
 HOST_QORIQ_RCW_DEPENDENCIES = $(BR2_PYTHON3_HOST_DEPENDENCY)
 
 
 QORIQ_RCW_FILES = $(call qstrip,$(BR2_PACKAGE_HOST_QORIQ_RCW_CUSTOM_PATH))
 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),)
 ifneq ($(QORIQ_RCW_FILES),)
+
 QORIQ_RCW_INCLUDES = $(filter-out %.rcw,$(QORIQ_RCW_FILES))
 QORIQ_RCW_INCLUDES = $(filter-out %.rcw,$(QORIQ_RCW_FILES))
 # Get the name of the custom rcw file from the custom list
 # Get the name of the custom rcw file from the custom list
 QORIQ_RCW_PROJECT = $(notdir $(filter %.rcw,$(QORIQ_RCW_FILES)))
 QORIQ_RCW_PROJECT = $(notdir $(filter %.rcw,$(QORIQ_RCW_FILES)))
@@ -54,6 +56,20 @@ endef
 define HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE
 define HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE
 	$(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
 	$(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin
 endef
 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
 endif
 
 
 # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer
 # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer