include: Allow git kernel branch selection
authorJohn Crispin <john@openwrt.org>
Mon, 2 Jun 2014 12:45:22 +0000 (12:45 +0000)
committerJohn Crispin <john@openwrt.org>
Mon, 2 Jun 2014 12:45:22 +0000 (12:45 +0000)
This allows the selection of a specific branch in the menuconfig
when using a kernel downloaded from GIT.

Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>
SVN-Revision: 40946

config/Config-devel.in
include/kernel-defaults.mk

index fd57bcbccd2773026da577b0abc683bbdc989634..09311751b42bf984b43554f9e8a3aa48d86e618c 100644 (file)
@@ -62,6 +62,24 @@ menuconfig DEVEL
                  This will create a git clone of the kernel in your build
                  directory.
 
+       config KERNEL_GIT_LOCAL_REPOSITORY
+               string "Enter path to local reference repository" if DEVEL
+               depends on (KERNEL_GIT_CLONE_URI != "")
+               default ""
+               help
+                 Enter a full pathname to a local reference git repository.
+                 In this instance, the --refererence option of git clone will
+                 be used thus creating a quick local clone of your repo.
+
+       config KERNEL_GIT_BRANCH
+               string "Enter git branch to clone" if DEVEL
+               depends on (KERNEL_GIT_CLONE_URI != "")
+               default ""
+               help
+                 Enter the branch name to checkout after cloning the git repository.
+                 In this instance, the --branch option of git clone will be used.
+                 If unused, the clone's repository HEAD will be checked-out.
+
        config BUILD_LOG
                bool "Enable log files during build process" if DEVEL
                help
index fd75a3f79ffe542854a691e0a52629d3da7f3f88..f1f5a81313d8222cb423947ed27cb4bdc2b8e3ce 100644 (file)
@@ -38,6 +38,10 @@ ifneq ($(strip $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY)),"")
   KERNEL_GIT_OPTS+=--reference $(CONFIG_KERNEL_GIT_LOCAL_REPOSITORY)
 endif
 
+ifneq ($(strip $(CONFIG_KERNEL_GIT_BRANCH)),"")
+  KERNEL_GIT_OPTS+=--branch $(CONFIG_KERNEL_GIT_BRANCH)
+endif
+
 ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
   ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
     define Kernel/Prepare/Default