Message ID | 1360310725-6463-2-git-send-email-rafal.fabich@gmail.com |
---|---|
State | Superseded |
Headers | show |
Rafal, All, On Friday 08 February 2013 Rafal Fabich wrote: > In 'menuconfig' user can choose the local directory as a source of Linux > kernel code. > Useful during kernel drivers or modules development. Why not using the _OVERRIDE_SRCDIR mechanism: $ export LINUX_OVERRIDE_SRCDIR=/path/to/your/kernel/tree Regards, Yann E. MORIN.
Hi On Sun, Feb 10, 2013 at 9:50 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote: > On Friday 08 February 2013 Rafal Fabich wrote: > > In 'menuconfig' user can choose the local directory as a source of Linux > > kernel code. > > Useful during kernel drivers or modules development. > > Why not using the _OVERRIDE_SRCDIR mechanism: > $ export LINUX_OVERRIDE_SRCDIR=/path/to/your/kernel/tree > Good question. Well, I added this to menuconfig because there is the place where kernel source is configured. So, if it is possible to set a custom tarball, then why not setting the local directory as well? Correct me if I am wrong, but this would keep all in one place. Anyway, I think it is good to have another method. Best regards, Rafal
On 08/02/13 09:05, Rafal Fabich wrote: > In 'menuconfig' user can choose the local directory as a source of Linux kernel code. > Useful during kernel drivers or modules development. > > Tested on three different development machines and different kernel sources. > > Signed-off-by: Rafal Fabich <rafal.fabich@gmail.com> Looks like this is asked for over and over again, so I think it is really worth adding this option. I think this was in fact briefly discussed at the BR Developer Days but I didn't write it down in the report... Between this patch and Richard Braun's, I think this one is closer to how it should be. One comment below, though. > --- > linux/Config.in | 14 ++++++++++++++ > linux/linux.mk | 3 +++ > 2 files changed, 17 insertions(+) > > diff --git a/linux/Config.in b/linux/Config.in > index 3c50acc..d88d920 100644 > --- a/linux/Config.in > +++ b/linux/Config.in > @@ -52,6 +52,11 @@ 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 +79,13 @@ 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,8 @@ 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 "local" if BR2_LINUX_KERNEL_CUSTOM_LOCAL > + This is a bit confusing, because the 'local' site method will force LINUX_VERSION to "custom". So I would call it custom here as well. Regards, Arnout > > # > # Patch selection > diff --git a/linux/linux.mk b/linux/linux.mk > index 91a9f50..3f2d460 100644 > --- a/linux/linux.mk > +++ b/linux/linux.mk > @@ -15,6 +15,9 @@ LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) > else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) > LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL)) > LINUX_SITE_METHOD = git > +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_LOCAL),y) > +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH)) > +LINUX_SITE_METHOD = local > else > LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 > # In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order >
Dear Arnout Vandecappelle, On Tue, 12 Feb 2013 18:15:38 +0100, Arnout Vandecappelle wrote: > Looks like this is asked for over and over again, so I think it is > really worth adding this option. I think this was in fact briefly > discussed at the BR Developer Days but I didn't write it down in the > report... I think that I managed to be convinced that for packages for which we already support a way of configuring the source location (from Git, from a custom tarball, etc.), it makes sense to also offer an option to set a local location, even if technically it is redundant with what <foo>_OVERRIDE_SRCDIR is doing. So I agree with the approach, as long as we limit it to a few key packages like the Linux kernel and bootloaders. Best regards, Thomas
Hi All, On Tue, Feb 12, 2013 at 6:15 PM, Arnout Vandecappelle <arnout@mind.be> wrote: > > One comment below, though. > >> + default "local" if BR2_LINUX_KERNEL_CUSTOM_LOCAL > > > This is a bit confusing, because the 'local' site method will force > LINUX_VERSION to "custom". So I would call it custom here as well. > I would like to send a new version of this patch, should I create a new thread or use this one? Best regards, Rafal Fabich
Rafał, All, On Wednesday 13 February 2013 Rafał Fabich wrote: > On Tue, Feb 12, 2013 at 6:15 PM, Arnout Vandecappelle <arnout@mind.be> wrote: > > > > One comment below, though. > > > >> + default "local" if BR2_LINUX_KERNEL_CUSTOM_LOCAL > > > > > > This is a bit confusing, because the 'local' site method will force > > LINUX_VERSION to "custom". So I would call it custom here as well. > > > > I would like to send a new version of this patch, should I create a > new thread or use this one? Create a new thread. Also, specify in the subject that this is version 2 of your patch, eg.: [PATH v2] Add local directory as soure of kernel code ('git send-email' helps you do that easily.) And add the changes to your patch commit, after a line starting with three dashes (git interpret this as an end-of-commit-log' separator: ---8<--- linux: add option to use local directory as kernel source Add the option to use a local directory as the source for building the Linux kernel, which can be usefull during kernel development. --- Changes v1 -> v2 - fixed foo bar (Reviewer) - added baz buz ---8<--- This way, it is easy for the reviewer what to look at, and for the maintainer as it knws a previous patch with the same subject is not to be applied. Regards, Yann E. MORIN.
On 08/02/13 09:05, Rafal Fabich wrote: > In 'menuconfig' user can choose the local directory as a source of Linux kernel code. > Useful during kernel drivers or modules development. > > Tested on three different development machines and different kernel sources. > > Signed-off-by: Rafal Fabich <rafal.fabich@gmail.com> Since we get this kind of patch very regularly, I think it's time we commit it :-) Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > --- > linux/Config.in | 14 ++++++++++++++ > linux/linux.mk | 3 +++ > 2 files changed, 17 insertions(+) > > diff --git a/linux/Config.in b/linux/Config.in > index 3c50acc..d88d920 100644 > --- a/linux/Config.in > +++ b/linux/Config.in > @@ -52,6 +52,11 @@ 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 +79,13 @@ 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,8 @@ 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 "local" if BR2_LINUX_KERNEL_CUSTOM_LOCAL > + > > # > # Patch selection > diff --git a/linux/linux.mk b/linux/linux.mk > index 91a9f50..3f2d460 100644 > --- a/linux/linux.mk > +++ b/linux/linux.mk > @@ -15,6 +15,9 @@ LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) > else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) > LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL)) > LINUX_SITE_METHOD = git > +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_LOCAL),y) > +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH)) > +LINUX_SITE_METHOD = local > else > LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 > # In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order >
On Thu, Feb 21, 2013 at 7:28 PM, Arnout Vandecappelle <arnout@mind.be> wrote: > > Since we get this kind of patch very regularly, I think it's time we commit > it :-) > > Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> > > Great! Thanks :-) By the way, there was a second version of this patch ( [Buildroot][PATCH v2] Added local directory as soure of kernel code ) Which one will you commit? Best regards, Rafal Fabich
On 22/02/13 07:06, Rafał Fabich wrote: > On Thu, Feb 21, 2013 at 7:28 PM, Arnout Vandecappelle <arnout@mind.be> wrote: > >> >> Since we get this kind of patch very regularly, I think it's time we commit >> it :-) >> >> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> >> >> > > Great! Thanks :-) > By the way, there was a second version of this patch ( > [Buildroot][PATCH v2] Added local directory as soure of kernel code ) > Which one will you commit? Argh, I should have acked the v2 of course... I just noticed that ack sitting in my drafts folder, and I blindly assumed it was OK to send. I'll take a look at the v2. Regards, Arnout
diff --git a/linux/Config.in b/linux/Config.in index 3c50acc..d88d920 100644 --- a/linux/Config.in +++ b/linux/Config.in @@ -52,6 +52,11 @@ 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 +79,13 @@ 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,8 @@ 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 "local" if BR2_LINUX_KERNEL_CUSTOM_LOCAL + # # Patch selection diff --git a/linux/linux.mk b/linux/linux.mk index 91a9f50..3f2d460 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -15,6 +15,9 @@ LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL)) LINUX_SITE_METHOD = git +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_LOCAL),y) +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH)) +LINUX_SITE_METHOD = local else LINUX_SOURCE = linux-$(LINUX_VERSION).tar.bz2 # In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order
In 'menuconfig' user can choose the local directory as a source of Linux kernel code. Useful during kernel drivers or modules development. Tested on three different development machines and different kernel sources. Signed-off-by: Rafal Fabich <rafal.fabich@gmail.com> --- linux/Config.in | 14 ++++++++++++++ linux/linux.mk | 3 +++ 2 files changed, 17 insertions(+)