Re: newbie questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/31/2015 08:33 AM, Johannes Berg wrote:
> On Mon, 2015-08-31 at 08:21 -0500, Pierre-Louis Bossart wrote:
>>>
>>> The *to* version is never relevant. A given backport will compile
>>> against many different *to* versions.
>>
>> I guess I completely missed the concept. I was thinking that the 
>> gentree.py command would only port and adjust the delta between linux
>> -next and the version I wanted. Looks like the backport is really an 
>> add-on that will apply to multiple versions. Not sure I understand 
>> how successive changes in the tree are handled if there is a single 
>> backport.
> 
> Well, there's a single *from* version, as you say that was currently
> "next-20150731" (or that was the one you used). The backport git
> repository is maintained in lockstep with the *from* version (although
> there's usually quite a bit of wiggle room)
> 
> The result, the output of backports, will/should compile against any
> kernel starting from the earliest supported, all the way up to the
> *from* version, right now I think that's 3.0 until 4.1 or so. 

What I was really looking for is the --integrate option that does merge the backport into an existing tree.
This option is broken btw on newer kernels due to a change in the kernel Makefile in October 2014, the attached patch provides a correction (not sure how to use the right patch for the right kernel though).
-Pierre

Allow backports to be integrated into vmlinux with newer Makefiles

diff --git a/Makefile b/Makefile
index f5c8983..31c7cbf 100644
--- a/Makefile
+++ b/Makefile
@@ -555,6 +555,7 @@ scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
 	$(Q)$(MAKE) $(build)=$(@)
 
 # Objects we will link into vmlinux / subdirs we need to visit
+backports-y 	:= backports/
 init-y		:= init/
 drivers-y	:= drivers/ sound/ firmware/
 net-y		:= net/
@@ -887,11 +888,13 @@ core-y		+= kernel/ mm/ fs/ ipc/ security/ crypto/ block/
 
 vmlinux-dirs	:= $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
 		     $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
+		     $(backports-y) $(backports-m) \
 		     $(net-y) $(net-m) $(libs-y) $(libs-m)))
 
 vmlinux-alldirs	:= $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
-		     $(init-) $(core-) $(drivers-) $(net-) $(libs-))))
+		     $(init-) $(core-) $(drivers-) $(backports-) $(net-) $(libs-))))
 
+backports-y	:= $(patsubst %/, %/built-in.o, $(backports-y))
 init-y		:= $(patsubst %/, %/built-in.o, $(init-y))
 core-y		:= $(patsubst %/, %/built-in.o, $(core-y))
 drivers-y	:= $(patsubst %/, %/built-in.o, $(drivers-y))
@@ -902,7 +905,7 @@ libs-y		:= $(libs-y1) $(libs-y2)
 
 # Externally visible symbols (used by link-vmlinux.sh)
 export KBUILD_VMLINUX_INIT := $(head-y) $(init-y)
-export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y)
+export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) $(backports-y)
 export KBUILD_LDS          := arch/$(SRCARCH)/kernel/vmlinux.lds
 export LDFLAGS_vmlinux
 # used by scripts/pacmage/Makefile

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux