From patchwork Mon Feb 25 16:10:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jared Bents X-Patchwork-Id: 1047850 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rockwellcollins.com Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 447Rl12dQKz9s4V for ; Tue, 26 Feb 2019 03:11:08 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CCE2120780; Mon, 25 Feb 2019 16:11:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZaaOwxPV2zzU; Mon, 25 Feb 2019 16:11:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 3E87B227A0; Mon, 25 Feb 2019 16:11:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id B0F5F1BF3D7 for ; Mon, 25 Feb 2019 16:10:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A35B6850A8 for ; Mon, 25 Feb 2019 16:10:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uEOlSPr4ZgTF for ; Mon, 25 Feb 2019 16:10:56 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from ch3vs01.rockwellcollins.com (ch3vs01.rockwellcollins.com [205.175.226.27]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 67B69850AD for ; Mon, 25 Feb 2019 16:10:50 +0000 (UTC) Received: from ofwch3n02.rockwellcollins.com (HELO crulimr02.rockwellcollins.com) ([205.175.226.14]) by ch3vs01.rockwellcollins.com with ESMTP; 25 Feb 2019 10:10:49 -0600 X-Received: from bacon.rockwellcollins.com (unknown [192.168.6.146]) by crulimr02.rockwellcollins.com (Postfix) with ESMTP id 18CD160215; Mon, 25 Feb 2019 10:10:49 -0600 (CST) From: jared.bents@rockwellcollins.com To: buildroot@buildroot.org Date: Mon, 25 Feb 2019 10:10:46 -0600 Message-Id: <20190225161046.2345-1-jared.bents@rockwellcollins.com> X-Mailer: git-send-email 2.18.0 Subject: [Buildroot] [PATCH v2 1/1] package/rcw: Optional RCW Generation 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: thomas.petazzoni@bootlin.com, Jared Bents MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Jared Bents Update to add an optional RCW generation using BR2_PACKAGE_HOST_RCW_CUSTOM_PATH with no modification to the RCW package source. --- [v1 -> v2]: * Removed host-python dependency * Updated help for BR2_PACKAGE_HOST_RCW_CUSTOM_PATH * Added error for number of .rcw not equal to 1 * Removed symlinks * Split large install command into different commands * Resolved utils/check-package warnings Signed-off-by: Jared Bents --- package/rcw/Config.in.host | 16 ++++++++++++++++ package/rcw/rcw.mk | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/package/rcw/Config.in.host b/package/rcw/Config.in.host index ba40f76de9..34f211a8ff 100644 --- a/package/rcw/Config.in.host +++ b/package/rcw/Config.in.host @@ -10,3 +10,19 @@ config BR2_PACKAGE_HOST_RCW then use this toolset and examples. https://source.codeaurora.org/external/qoriq/qoriq-components/rcw/ + +if BR2_PACKAGE_HOST_RCW + +config BR2_PACKAGE_HOST_RCW_CUSTOM_PATH + string "RCW Source file paths" + help + Space-separated list of .rcw and .rcwi files, that will be + used to generate a RCW binary. The entire list of .rcwi files + used by the .rcw file must be specified. There must be a + single .rcw file in the list. + + This is optional. If left empty, the RCW package will be + included for use in the SDK or with post scripts but the + binary will not be generated. + +endif diff --git a/package/rcw/rcw.mk b/package/rcw/rcw.mk index f4570b9bde..1b7a73f6e5 100644 --- a/package/rcw/rcw.mk +++ b/package/rcw/rcw.mk @@ -10,11 +10,43 @@ RCW_SITE_METHOD = git RCW_LICENSE = BSD-3-Clause RCW_LICENSE_FILES = LICENSE +# The name of the file to be deliveried in the BINARIES_DIR +RCW_DELIVERY_FILE = PBL.bin + +# Get the name of the custom rcw file from the custom list +RCW_PROJECT = $(filter %.rcw,$(notdir $(call qstrip,$(BR2_PACKAGE_HOST_RCW_CUSTOM_PATH)))) + +# Error if there is more than one .rcw file +ifneq ($(RCW_PROJECT),) +ifneq ($(words $(RCW_PROJECT)),1) +$(error BR2_PACKAGE_HOST_RCW_CUSTOM_PATH) +endif +endif + +ifneq ($(RCW_PROJECT),) +define HOST_RCW_ADD_CUSTOM_RCW_FILES + mkdir -p $(@D)/custom_board/rcw + cp -f $(filter %.rcwi,$(call qstrip,$(BR2_PACKAGE_HOST_RCW_CUSTOM_PATH))) $(@D)/custom_board + cp -f $(filter %.rcw,$(call qstrip,$(BR2_PACKAGE_HOST_RCW_CUSTOM_PATH))) $(@D)/custom_board/rcw +endef +HOST_RCW_POST_PATCH_HOOKS += HOST_RCW_ADD_CUSTOM_RCW_FILES + +define HOST_RCW_BUILD_CMDS + python $(@D)/rcw.py -i $(@D)/custom_board/rcw/$(RCW_PROJECT) -I $(@D)/custom_board -o $(@D)/$(RCW_DELIVERY_FILE) +endef + +define HOST_RCW_INSTALL_DELIVERY_FILE + $(INSTALL) -D -m 0644 $(@D)/$(RCW_DELIVERY_FILE) $(BINARIES_DIR)/$(RCW_DELIVERY_FILE) +endef +endif + # Copy source files and script into $(HOST_DIR)/share/rcw/ so a developer # could use a post image or SDK to build/install PBL files. define HOST_RCW_INSTALL_CMDS mkdir -p $(HOST_DIR)/share/rcw cp -a $(@D)/* $(HOST_DIR)/share/rcw + $(HOST_RCW_INSTALL_DELIVERY_FILE) + find $(HOST_DIR)/share/rcw -name "*.bin" -delete endef $(eval $(host-generic-package))