From patchwork Tue Jun 5 19:22:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 163152 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 37EC6B6F13 for ; Wed, 6 Jun 2012 05:25:19 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id E928B10BADB; Tue, 5 Jun 2012 19:25:17 +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 2veYttI0gg0Y; Tue, 5 Jun 2012 19:25:09 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E8430100075; Tue, 5 Jun 2012 19:24:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CF0268F753 for ; Tue, 5 Jun 2012 19:24:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C995C8AA2B for ; Tue, 5 Jun 2012 19:24:30 +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 qYsxTWuy19i7 for ; Tue, 5 Jun 2012 19:24:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ey0-f171.google.com (mail-ey0-f171.google.com [209.85.215.171]) by whitealder.osuosl.org (Postfix) with ESMTPS id 82E968A63C for ; Tue, 5 Jun 2012 19:24:27 +0000 (UTC) Received: by eaaa12 with SMTP id a12so2612407eaa.16 for ; Tue, 05 Jun 2012 12:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:content-transfer-encoding:subject :x-mercurial-node:message-id:in-reply-to:references:user-agent:date :from:to:cc; bh=oebzX8PEREyTu8jLGA53oDp8vx+h0wq0Qhm7wrIuEd0=; b=cY1AXd6Yogex8LgcXAqxhUAXfTvd6xMpfx+gOMAx/jC5cnqdbtwPzgpuYqWQXyaQ6D CNwFhQqF9hN9j2ByFY7MqbWiatCYzHqVhwN92FJb9dwIxkpX5taSKcizjU/HrttllUws B9VVrAz/SwDE6cJy9FOj0AZPaOnQMtW5fc8NexwzbKOzH8+udtGNaMiBcacPc1H9/Idu gNXCb0xmt+Gb3td2JzQ5O1staDMBuc10JcVU9byuxa3F2DLfn2oqx3qrItnbmBQq/0nY sAcW8A5jpV4ptecEj2gMzR7YxovdM03X/Z407xRQitFwXidZxWCQhgbJFJcdhnNl1IVm K59w== Received: by 10.14.99.196 with SMTP id x44mr8142354eef.31.1338924264993; Tue, 05 Jun 2012 12:24:24 -0700 (PDT) Received: from [127.0.1.1] (d54C62A5A.access.telenet.be. [84.198.42.90]) by mx.google.com with ESMTPS id u7sm9314236eeb.7.2012.06.05.12.24.23 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 05 Jun 2012 12:24:24 -0700 (PDT) MIME-Version: 1.0 X-Mercurial-Node: 53cf1d5cf813cd69b9e0b97c28ae8c8658f35c5a Message-Id: <53cf1d5cf813cd69b9e0.1338924136@beantl019720> In-Reply-To: References: User-Agent: Mercurial-patchbomb/2.0.2 Date: Tue, 05 Jun 2012 21:22:16 +0200 From: Thomas De Schampheleire To: buildroot@busybox.net Subject: [Buildroot] [PATCH 5 of 6] toolchain-external: allow downloading a custom toolchain X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This patch adds the possibility to download a custom external toolchain, in addition to the existing support of preinstalled custom external toolchains. With the modified configuration, the user is presented with the following options: - Toolchain type: Buildroot toolchain | External toolchain | Ct-ng toolchain In case of External toolchain: - Toolchain: the CodeSourcery toolchains | Custom toolchain - Toolchain origin: Toolchain to be downloaded and installed | Pre-installed toolchain In case of Toolchain to be downloaded, the user is presented with: - Toolchain URL In case of Pre-installed toolchain, the users sees: - Toolchain Path For CodeSourcery toolchains, the toolchain URL field is not used (the URLs are directly coded in ext-tool.mk). Signed-off-by: Thomas De Schampheleire --- This feature was proposed previously [1] with some comments by Thomas Petazzoni. At that time, the proposed split was to have 'custom pre- installed toolchain' and 'custom downloadable toolchain' sit alongside the CodeSourcery ones, as such providing a clear distinction between pre-installed and downloaded custom toolchains. However, during implementation I felt that this structure makes the code more complex than it needs to be and so I choose for an alternative solution that IMO still creates a clear distinction. Any comments are of course welcome. [1] http://lists.busybox.net/pipermail/buildroot/2011-September/045912.html toolchain/toolchain-external/Config.in | 29 ++++++++++++++++++++++------- toolchain/toolchain-external/ext-tool.mk | 6 ++++++ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in --- a/toolchain/toolchain-external/Config.in +++ b/toolchain/toolchain-external/Config.in @@ -492,22 +492,37 @@ config BR2_TOOLCHAIN_EXTERNAL_CUSTOM endchoice +choice + prompt "Toolchain origin" + config BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD - bool "Download toolchain automatically" - default y - depends on !BR2_TOOLCHAIN_EXTERNAL_CUSTOM + bool "Toolchain to be downloaded and installed" help - When enabled, Buildroot will automatically download and - install the selected external toolchain. When disabled, - Buildroot will use a pre-installed toolchain. + Select this option if you want Buildroot to download and install the + toolchain. If you have selected a custom toolchain, specify the URL + in BR2_TOOLCHAIN_EXTERNAL_URL. + +config BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED + bool "Pre-installed toolchain" + help + Select this option if you want to use a pre-installed toolchain. + Specify the path to this toolchain in BR2_TOOLCHAIN_EXTERNAL_PATH. + +endchoice config BR2_TOOLCHAIN_EXTERNAL_PATH string "Toolchain path" default "/path/to/toolchain/usr" - depends on !BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + depends on BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED help Path to where the external toolchain is installed. +config BR2_TOOLCHAIN_EXTERNAL_URL + string "Toolchain URL" + depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM && BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + help + URL of the custom toolchain tarball to download and install. + config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX string "Toolchain prefix" depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM diff --git a/toolchain/toolchain-external/ext-tool.mk b/toolchain/toolchain-external/ext-tool.mk --- a/toolchain/toolchain-external/ext-tool.mk +++ b/toolchain/toolchain-external/ext-tool.mk @@ -252,11 +252,17 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_XILI TOOLCHAIN_EXTERNAL_SITE=http://git.xilinx.com/?p=xldk/microblaze_v2.0.git;a=blob;h=71e031ae990e063a5718f90d30cf97ad85e2f565;hb=569081301f0f1d8d3b24335a364e8ff1774190d4;f= TOOLCHAIN_EXTERNAL_SOURCE=microblaze-unknown-linux-gnu.tgz else +# Custom toolchain +TOOLCHAIN_EXTERNAL_SITE=$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) +TOOLCHAIN_EXTERNAL_SOURCE=$(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) + # A value must be set (even if unused), otherwise the # $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_SOURCE) rule would override the main # $(DL_DIR) rule +ifeq (,$(TOOLCHAIN_EXTERNAL_SOURCE)) TOOLCHAIN_EXTERNAL_SOURCE=none endif +endif # Special handling for Blackfin toolchain, because of the split in two # tarballs, and the organization of tarball contents. The tarballs