From patchwork Tue Sep 24 07:26:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: christian.braunersorensen@prevas.dk X-Patchwork-Id: 277361 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id B569B2C008F for ; Tue, 24 Sep 2013 17:27:13 +1000 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id 887C23F9C2 for ; Tue, 24 Sep 2013 09:27:12 +0200 (CEST) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by hugin.dotsrc.org (Postfix) with ESMTPS id 182BB3F9C2 for ; Tue, 24 Sep 2013 09:27:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=1339; q=dns/txt; s=ironport2; t=1380007631; x=1411543631; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xILzeCMdkTSa4vF3KsJ4X5AyUg5loRata2ReOA81Lrs=; b=d0H/J7BNQlJ67C+msl/xXlu1+TT1QnAWiElS+l7/yl3/YO+eVMbnttV9 nGe1nsInzRwxEzxJ1KLJNulzqsahYPet5dp+Z9irF5XyLzRksTEHRvN63 5Pv9CJkVNzkx9CnKC8XyLLQLYQjnMMg1RDWI9qq8hXRO2CmVj9LKA4B7n I=; X-IronPort-AV: E=Sophos;i="4.90,969,1371074400"; d="scan'208";a="3632441" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 24 Sep 2013 09:27:00 +0200 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.347.0; Tue, 24 Sep 2013 09:27:00 +0200 Received: by localhost (Postfix, from userid 30007) id 31BB3682C0C; Tue, 24 Sep 2013 07:27:00 +0000 (UTC) From: To: Subject: [PATCH 1/1] barebox: Add option of custom environment, and fix PROVIDES Date: Tue, 24 Sep 2013 07:26:59 +0000 Message-ID: X-Mailer: git-send-email 1.8.3.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Christian Sørensen If environment files are detected (config and init) in SRCDIR, ensure they are used by setting DEFAULT_ENVIRONMENT_PATH in .config Additionally, fix provides Signed-off-by: Christian Sørensen --- classes/barebox.oeclass | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/classes/barebox.oeclass b/classes/barebox.oeclass index f7c6ab6..4ce9f9e 100644 --- a/classes/barebox.oeclass +++ b/classes/barebox.oeclass @@ -50,6 +50,14 @@ do_configure() { else die "No default configuration available" fi + + if [ -f ${SRCDIR}/init ] && [ -f ${SRCDIR}/config ]; then + #Environment files detected. Ensure they are used + mkdir -p ${S}/customenv/bin + cp ${SRCDIR}/init ${S}/customenv/bin/ + cp ${SRCDIR}/config ${S}/customenv/ + sed -i -e 's/\(CONFIG_DEFAULT_ENVIRONMENT_PATH=\).*/\1"customenv"/' .config + fi } do_compile () { @@ -75,6 +83,9 @@ PACKAGES = "${PN} ${PN}-elf" FILES_${PN} = "${bootdir}/${BAREBOX_IMAGE_FILENAME}" FILES_${PN}-elf = "${bootdir}/${BAREBOX_IMAGE_BASE}" +PROVIDES_${PN} = "barebox" +PROVIDES_${PN}-elf = "barebox-elf" + addtask deploy before build after compile do_deploy[dirs] = "${IMAGE_DEPLOY_DIR} ${S}" REBUILD ?= "1"