From patchwork Thu Feb 14 09:14:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafal Fabich X-Patchwork-Id: 220402 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 0943C2C0094 for ; Thu, 14 Feb 2013 20:15:42 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id F2276101697; Thu, 14 Feb 2013 09:15:27 +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 vrjdn9BjRCrg; Thu, 14 Feb 2013 09:15:23 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0EFA7FFE5A; Thu, 14 Feb 2013 09:15:21 +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 ED75C8F783 for ; Thu, 14 Feb 2013 09:15:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 71DF289B1D for ; Thu, 14 Feb 2013 09:15:32 +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 3Kzga0rwQQLs for ; Thu, 14 Feb 2013 09:15:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by whitealder.osuosl.org (Postfix) with ESMTPS id EB90E8144E for ; Thu, 14 Feb 2013 09:14:45 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id n3so1602162lbo.20 for ; Thu, 14 Feb 2013 01:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=N9uSeJvo143Dulo5PXE0nz4dwfTRebrHrmia7Ks0Dbs=; b=O1olU4/Jj3OqvmD1ppUgNHHXxGU8XrGW43bec94qnTlKkH/g8mQA8cpULglrYZ8mow znmvTOEDFtsFkz9KnN3tTNBN30X1wbrMrT9CbJX+psRxuwOmzBgJ5LZ1YVtxC5opQRIO AoswQ3rLkN7OSAqblIF+XQYG33lo+/0Pv8t8LdLsV5z8C28D4xca4MFuz5xII8ipMpQM MLKhRGeSNANnz1X1Mr46rnNwDngxblBLdkbFwzLLjArsoE6ZeW0idYyAwO47M7hr2bXH dnsdclGwXXwHp4ggSNg/Qazcoeye3sRmLBJBBHJXUV8Fr1BwP2aQhotpONbSGnHqcI2F A+iw== X-Received: by 10.152.105.38 with SMTP id gj6mr22934653lab.25.1360833283724; Thu, 14 Feb 2013 01:14:43 -0800 (PST) Received: from user-virtual-machine.espotel.espotel.fi (espotel-1.technologpark.net. [78.9.98.210]) by mx.google.com with ESMTPS id pz15sm27248581lab.3.2013.02.14.01.14.40 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 14 Feb 2013 01:14:42 -0800 (PST) From: Rafal Fabich To: buildroot@busybox.net Date: Thu, 14 Feb 2013 10:14:13 +0100 Message-Id: <1360833253-26809-1-git-send-email-rafal.fabich@gmail.com> X-Mailer: git-send-email 1.7.9.5 Subject: [Buildroot] [PATCH v2] Added local directory as soure of kernel code 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 Add the option to use a local directory as the source for building the Linux kernel, which can be useful during kernel development. Signed-off-by: Rafal Fabich Acked-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: Arnout Vandecappelle (Essensium/Mind) --- Changes v1 -> v2 after comments from Arnout Vandecappelle - default setting of BR2_LINUX_KERNEL_VERSION changed to "custom" - removed ifeq ($(LINUX_VERSION),custom) condition from linux.mk for better consistency --- linux/Config.in | 13 +++++++++++++ linux/linux.mk | 5 ++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/linux/Config.in b/linux/Config.in index 3c50acc..53e81ba 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -52,6 +52,12 @@ config BR2_LINUX_KERNEL_CUSTOM_GIT This option allows Buildroot to get the Linux kernel source code from a Git repository. +config BR2_LINUX_KERNEL_CUSTOM_LOCAL + bool "Local directory" + help + This option allows Buildroot to get the Linux kernel source + code from a local directory. + endchoice config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE @@ -74,6 +80,12 @@ config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION Git revision to use in the format used by git rev-parse, E.G. a sha id, a tag, branch, .. +config BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH + string "Path to the local directory" + depends on BR2_LINUX_KERNEL_CUSTOM_LOCAL + help + Path to the local directory with the Linux kernel source code. + config BR2_LINUX_KERNEL_VERSION string default "3.7.6" if BR2_LINUX_KERNEL_3_7 @@ -81,6 +93,7 @@ config BR2_LINUX_KERNEL_VERSION default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE if BR2_LINUX_KERNEL_CUSTOM_VERSION default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL default $BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION if BR2_LINUX_KERNEL_CUSTOM_GIT + default "custom" if BR2_LINUX_KERNEL_CUSTOM_LOCAL # # Patch selection diff --git a/linux/linux.mk b/linux/linux.mk index 91a9f50..494911b 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -8,10 +8,13 @@ LINUX_LICENSE = GPLv2 LINUX_LICENSE_FILES = COPYING # Compute LINUX_SOURCE and LINUX_SITE from the configuration -ifeq ($(LINUX_VERSION),custom) +ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL))) LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_LOCAL),y) +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH)) +LINUX_SITE_METHOD = local else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL)) LINUX_SITE_METHOD = git