From patchwork Mon Feb 3 00:05:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Hadjinlian X-Patchwork-Id: 316047 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 90E552C0098 for ; Mon, 3 Feb 2014 11:06:03 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B1B7B8AE81; Mon, 3 Feb 2014 00:06:02 +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 oajxVvPtCcC4; Mon, 3 Feb 2014 00:06:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id AD9D28BB8D; Mon, 3 Feb 2014 00:06:01 +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 554331C245D for ; Mon, 3 Feb 2014 00:06:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5536F8BBCA for ; Mon, 3 Feb 2014 00:06:00 +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 RxfVwSD9x-S6 for ; Mon, 3 Feb 2014 00:05:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ea0-f175.google.com (mail-ea0-f175.google.com [209.85.215.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3B6338AE81 for ; Mon, 3 Feb 2014 00:05:58 +0000 (UTC) Received: by mail-ea0-f175.google.com with SMTP id z10so3368273ead.6 for ; Sun, 02 Feb 2014 16:05:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=3Wb9Sy5TEUuPieJHuMz+g679eNAe3aueZ/lVRw4xz9o=; b=Wc4g84udynFLOGIgaqtXAi+7AFQ3cQYe/XCo6khpmPT1dsvA7rf89GeK//eQnQ/MYH 0dbYSIQkI2c800hIXF/M4hW13PxRsa4+HuUwIEvxmnqlhey63RnEBryolOqpdnSmFQJi //i9KM9rvE78oGVuzHhJ48GW8Ts7Il8JqqYQ7SZhWU4yEBFFV1Jzt12OOgl1lmcX/l06 fWMJ0yHNyGr9MS/Z8WDV3Gbco1x3g3+nyT/QwMY2lhYL5/ckdE4mudR0jxIXTp9GHOLr y4EB5mtLISUGaRF42b596Zw0L5b/xsexzwoBhLBmUBS3O5VAY+DATBEDmHXegW2aCtJ+ Hmog== X-Received: by 10.14.127.200 with SMTP id d48mr719714eei.9.1391385956732; Sun, 02 Feb 2014 16:05:56 -0800 (PST) Received: from localhost ([91.183.82.202]) by mx.google.com with ESMTPSA id d43sm68000115eep.18.2014.02.02.16.05.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 02 Feb 2014 16:05:55 -0800 (PST) From: Maxime Hadjinlian To: buildroot@busybox.net Date: Mon, 3 Feb 2014 01:05:55 +0100 Message-Id: <1391385955-13166-1-git-send-email-maxime.hadjinlian@gmail.com> X-Mailer: git-send-email 1.8.5.3 Subject: [Buildroot] [PATCH v2] uboot-tools: Allow users to use uboot's sources 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: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net If the user has specified a custom U-Boot repository, he may also want to use it for U-Boot tools. This could be usefull in two identified use case: - User want the same version for U-Boot tools and U-Boot - User has modified U-Boot tools in his U-Boot repository Signed-off-by: Maxime Hadjinlian --- Changes v1 -> v2: - Add a choice option (Suggested by Luca Ceresoli) - Add an if/then/else structure (Suggested by Luca Ceresoli) - Take UBOOT_LICENSE and UBOOT_LICENCE_FILES into account (Suggested by Arnout Vandecappelle) --- package/uboot-tools/Config.in | 18 ++++++++++++++++++ package/uboot-tools/uboot-tools.mk | 17 +++++++++++++++-- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in index 7c8f17c..29580dd 100644 --- a/package/uboot-tools/Config.in +++ b/package/uboot-tools/Config.in @@ -7,6 +7,24 @@ config BR2_PACKAGE_UBOOT_TOOLS if BR2_PACKAGE_UBOOT_TOOLS +if BR2_TARGET_UBOOT + +choice + prompt "version" + default BR2_PACKAGE_UBOOT_TOOLS_LATEST_VERSION + help + Select the specific uboot-tools version you want to use + +config BR2_PACKAGE_UBOOT_TOOLS_LATEST_VERSION + bool "Use latest upstream version" + +config BR2_PACKAGE_UBOOT_TOOLS_USE_UBOOT_VERSION + bool "Use the same version as the uboot package" + +endchoice + +endif + config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE bool "mkimage" help diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk index 398ce8b..71c64ee 100644 --- a/package/uboot-tools/uboot-tools.mk +++ b/package/uboot-tools/uboot-tools.mk @@ -4,11 +4,24 @@ # ################################################################################ +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_USE_UBOOT_VERSION),y) +# We have to use the BR2_TARGET_UBOOT_VERSION because of the order of inclusion +# of the mk files. +UBOOT_TOOLS_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION)) +UBOOT_TOOLS_SOURCE = $(UBOOT_SOURCE) +UBOOT_TOOLS_SITE = $(UBOOT_SITE) +ifneq ($(UBOOT_SITE_METHOD),) +UBOOT_TOOL_SITE_METHOD = $(UBOOT_SITE_METHOD) +endif +UBOOT_TOOLS_LICENSE = $(UBOOT_LICENSE) +UBOOT_TOOLS_LICENSE_FILES = $(UBOOT_LICENSE_FILES) +else UBOOT_TOOLS_VERSION = 2014.01 -UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2 -UBOOT_TOOLS_SITE = ftp://ftp.denx.de/pub/u-boot +UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2 +UBOOT_TOOLS_SITE = ftp://ftp.denx.de/pub/u-boot UBOOT_TOOLS_LICENSE = GPLv2+ UBOOT_TOOLS_LICENSE_FILES = Licenses/gpl-2.0.txt +endif define UBOOT_TOOLS_BUILD_CMDS $(MAKE) -C $(@D) \