Added local directory as soure of kernel code
PATCH 1/1 Added local directory as soure of kernel code
In 'menuconfig' user can choose a local directory as source of Linux kernel code. Useful during kernel drivers or modules development.
Tested on three different development machines and different kernel sources.
--- linux/Config.in | 14 ++++++++++++++ linux/linux.mk | 3 +++ 2 files changed, 17 insertions(+)
linux/Config.in +14 -0
@@ -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
linux/linux.mk +3 -0
@@ -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
Signature · 1 line
1.7.9.5
PATCH 1/1 Added local directory as soure of kernel code
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.
--- linux/Config.in | 14 ++++++++++++++ linux/linux.mk | 3 +++ 2 files changed, 17 insertions(+)
linux/Config.in +14 -0
@@ -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
linux/linux.mk +3 -0
@@ -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
Signature · 1 line
1.7.9.5
PATCH 1/1 Added local directory as soure of kernel code
Rafal, All,
Quoted 3 lines · 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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Added local directory as soure of kernel code
Hi
Quoted 8 lines · Yann E. MORIN
Quoted 3 lines · 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_SRCDIRmechanism:$ 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
PATCH 1/1 Added local directory as soure of kernel code
In reply to Rafal FabichQuoted 6 lines · Rafal Fabich
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 <[email protected]>
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.
Quoted 36 lines
--- linux/Config.in | 14 ++++++++++++++ linux/linux.mk | 3 +++ 2 files changed, 17 insertions(+)linux/Config.in +12
-0@@ -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
linux/Config.in config BR2_LINUX_KERNEL_VERSION · line 97
Quoted 5 lines
linux/Config.in +2
-0@@ -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 forceLINUX_VERSION to "custom". So I would call it custom here as well.
Regards,
Arnout
Quoted 18 lines
linux/Config.in +0
-0# # Patch selectionlinux/linux.mk +3
-0@@ -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
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 Added local directory as soure of kernel code
Dear Arnout Vandecappelle,
Quoted 4 lines · Arnout Vandecappelle
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
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 Added local directory as soure of kernel code
In reply to Arnout VandecappelleHi All,
Quoted 9 lines · Arnout Vandecappelle
One comment below, though.
Quoted 1 line
+ default "local" if
BR2_LINUX_KERNEL_CUSTOM_LOCALThis is a bit confusing, because the 'local' site method will force
LINUX_VERSIONto "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
PATCH 1/1 Added local directory as soure of kernel code
Rafa?, All,
Quoted 7 lines · On Wednesday 13 February 2013 Rafa? Fabich wrote:
Quoted 6 lines · Arnout Vandecappelle
One comment below, though.
Quoted 1 line
+ default "local" if
BR2_LINUX_KERNEL_CUSTOM_LOCAL
Quoted 6 lines
Quoted 3 lines
This is a bit confusing, because the 'local' site method will force
LINUX_VERSIONto "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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Added local directory as soure of kernel code
In reply to Rafal FabichQuoted 6 lines · Rafal Fabich
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 <[email protected]>
Since we get this kind of patch very regularly, I think it's time we
commit it :-)
Quoted 59 lines
--- linux/Config.in | 14 ++++++++++++++ linux/linux.mk | 3 +++ 2 files changed, 17 insertions(+)linux/Config.in +14
-0@@ -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 selectionlinux/linux.mk +3
-0@@ -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
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 Added local directory as soure of kernel code
Quoted 7 lines · Arnout Vandecappelle
Since we get this kind of patch very regularly, I think it's time we commit
it :-)
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
PATCH 1/1 Added local directory as soure of kernel code
Quoted 6 lines · Rafa? Fabich
Quoted 4 lines · Arnout Vandecappelle
Since we get this kind of patch very regularly, I think it's time we commit
it :-)
Quoted 8 lines
Quoted 3 lines
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
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F