> Users of the git tree clone option would probably know exactly > which OpenWrt patch they want to carry in their local kernel copy.
It actually alleviates the problem of having a shared kernel across multiple Linux distributions; each Linux distribution will need to apply its specific set of patches. One way to do that is like you said: having distributions specific git trees and regularly rebase them on top of the distribution agnostic kernel. This will work but as your kernel and openwrt moves separately, it will require to be synchronized on both side: kernel tree will have to regularly get rebased, and the openwrt patches will have to be kept in sync with the openwrt.git content. Pulling a generic kernel from GIT and applying the OpenWrt specific patches on top of it at build time may be seen as an easier mechanism; it avoids having to maintain a separate git tree. > Assuming we have that option, it seems to me like the 'git status' output of > the cloned tree would be practically unusable. Yes, it is. If you use the kernel located in build_dir/* as a development tree, that's a problem; it should definitely be an option. But in an organization where the kernel development independently from OpenWrt, that lets you pull the latest kernel TOT quite easily, still by having all the OpenWrt drivers & mechanisms. -----Original Message----- From: f.faine...@gmail.com [mailto:f.faine...@gmail.com] On Behalf Of Florian Fainelli Sent: Friday, April 25, 2014 9:52 AM To: Olivari, Mathieu Cc: OpenWrt Development List Subject: Re: [OpenWrt-Devel] [PATCH 4/4] include: Allow OpenWrt patch application on git kernel 2014-04-24 20:43 GMT-07:00 Mathieu Olivari <math...@qca.qualcomm.com>: > By default, OpenWrt doesn't patch the kernel if it's downloaded from a > git tree. This option will allow OpenWrt to download the kernel from > GIT but still allow the user to apply some patches, when enabled. > > It can be very convenient when working on some standard kernel > maintained in Git, shared by multiple Linux distributions, but we > still want to take advantages of all the OpenWrt patches. I have mixed feelings about this option. Users of the git tree clone option would probably know exactly which OpenWrt patch they want to carry in their local kernel copy. Assuming we have that option, it seems to me like the 'git status' output of the cloned tree would be practically unusable. The only good side of this, is that it sorts of allows you to get automatic updates of patches from OpenWrt instead of following their individual development... > > Signed-off-by: Mathieu Olivari <math...@qca.qualcomm.com> > --- > config/Config-devel.in | 12 ++++++++++++ > include/kernel-defaults.mk | 5 +++++ > 2 files changed, 17 insertions(+) > > diff --git a/config/Config-devel.in b/config/Config-devel.in index > 0931175..7549ed9 100644 > --- a/config/Config-devel.in > +++ b/config/Config-devel.in > @@ -80,6 +80,18 @@ menuconfig DEVEL > In this instance, the --branch option of git clone will be > used. > If unused, the clone's repository HEAD will be checked-out. > > + config KERNEL_GIT_PATCH_APPLY > + bool "Apply OpenWrt patches on git kernel" if DEVEL > + depends on (KERNEL_GIT_CLONE_URI != "") > + default n > + help > + By default OpenWrt will apply the OpenWrt specific kernel > + patches only if the kernel was downloaded as a regular > tarball > + and then uncompressed. If the pulled from GIT or from a > local > + directory, the OpenWrt patches will not be applied. > + Use this option if you want to apply these patches even on > Git > + pulled kernel. > + > config BUILD_LOG > bool "Enable log files during build process" if DEVEL > help > diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk > index f1f5a81..db978c5 100644 > --- a/include/kernel-defaults.mk > +++ b/include/kernel-defaults.mk > @@ -42,6 +42,10 @@ ifneq ($(strip $(CONFIG_KERNEL_GIT_BRANCH)),"") > KERNEL_GIT_OPTS+=--branch $(CONFIG_KERNEL_GIT_BRANCH) endif > > +ifneq ($(KERNEL_GIT_PATCH_APPLY),y) > + Kernel/Patch/Git:=$(Kernel/Patch) > +endif > + > ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") > ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"") > define Kernel/Prepare/Default > @@ -52,6 +56,7 @@ ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") > else > define Kernel/Prepare/Default > git clone $(KERNEL_GIT_OPTS) $(CONFIG_KERNEL_GIT_CLONE_URI) > $(LINUX_DIR) > + $(Kernel/Patch/Git) > endef > endif > else > -- > 1.7.10.4 > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel -- Florian _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel