From patchwork Fri Feb 7 08:38:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changming Huang X-Patchwork-Id: 1234787 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=nxp.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48DTL72LKNz9sPJ for ; Fri, 7 Feb 2020 19:41:35 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 637DA87D5E; Fri, 7 Feb 2020 08:41:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZYdfkXytVpVg; Fri, 7 Feb 2020 08:41:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 90CD787D9E; Fri, 7 Feb 2020 08:41:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9B3B21BF5AC for ; Fri, 7 Feb 2020 08:41:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 94FA2866A7 for ; Fri, 7 Feb 2020 08:41:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KxomPfBN3tE7 for ; Fri, 7 Feb 2020 08:41:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by whitealder.osuosl.org (Postfix) with ESMTPS id 1610A86B6B for ; Fri, 7 Feb 2020 08:41:24 +0000 (UTC) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 7396F1A0D76; Fri, 7 Feb 2020 09:41:22 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8F4F51A1667; Fri, 7 Feb 2020 09:41:18 +0100 (CET) Received: from localhost.localdomain (mega.ap.freescale.net [10.192.208.232]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 7FFC8402F3; Fri, 7 Feb 2020 16:41:10 +0800 (SGT) From: Changming Huang To: buildroot@busybox.net Date: Fri, 7 Feb 2020 16:38:52 +0800 Message-Id: <20200207083857.28058-4-jerry.huang@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200207083857.28058-1-jerry.huang@nxp.com> References: <20200207083857.28058-1-jerry.huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [Buildroot] [PATCH v5 4/9] package/qoriq-rcw: add target rcw binary support X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: geomatsi@gmail.com, Jerry Huang , michael@walle.cc, thomas.petazzoni@bootlin.com, heiko.thiery@gmail.com, matthew.weber@collins.com MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Jerry Huang For NXP QorIQ (PowerPC and Layerscape) platform, we need to specify the RCW file and build it to binary. Introduce BR2_PACKAGE_HOST_QORIQ_RCW_BIN to specify the RCW binary file. Signed-off-by: Jerry Huang --- changes since v4: no changes. changes since v3: no changes. changes since v2: 1. modify the patch descrition. 2. more detail for BR2_PACKAGE_HOST_QORIQ_RCW_BIN. 3. remove two options not used in this patch. 4. add the condition detection in makefile for QorIQ RCW. changes since v1: 1. add option BR2_PACKAGE_HOST_RCW_ATF for ATF. --- package/nxp/qoriq-rcw/Config.in.host | 12 ++++++++++++ package/nxp/qoriq-rcw/qoriq-rcw.mk | 15 +++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/package/nxp/qoriq-rcw/Config.in.host b/package/nxp/qoriq-rcw/Config.in.host index 8f78a40908..9bf55894e8 100644 --- a/package/nxp/qoriq-rcw/Config.in.host +++ b/package/nxp/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_BIN + string "Custom RCW" + 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 with platform/serdes_value/rcw_file, platform + is the platform name, serdes_value is the setting of the Serdes, + 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/nxp/qoriq-rcw/qoriq-rcw.mk b/package/nxp/qoriq-rcw/qoriq-rcw.mk index 7a0494adc6..bbd085f277 100644 --- a/package/nxp/qoriq-rcw/qoriq-rcw.mk +++ b/package/nxp/qoriq-rcw/qoriq-rcw.mk @@ -37,6 +37,21 @@ endef define HOST_QORIQ_RCW_INSTALL_DELIVERY_FILE $(INSTALL) -D -m 0644 $(@D)/PBL.bin $(BINARIES_DIR)/PBL.bin endef +else +QORIQ_RCW_PATH_FILE_BIN = $(call qstrip,$(BR2_PACKAGE_HOST_QORIQ_RCW_BIN)) + +ifneq ($(QORIQ_RCW_PATH_FILE_BIN),) +QORIQ_RCW_PLATFORM = $(firstword $(subst /, ,$(QORIQ_RCW_PATH_FILE_BIN))) +QORIQ_RCW_FILE_BIN = $(lastword $(subst /, ,$(QORIQ_RCW_PATH_FILE_BIN))) + +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)/$(QORIQ_RCW_PATH_FILE_BIN) $(BINARIES_DIR)/$(QORIQ_RCW_FILE_BIN) +endef +endif endif # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer