On 17/12/2015 18:03, Mason wrote: > The media_build process prints: > > "Preparing to compile for kernel version 3.4.3913" > > In fact, the custom kernel's Makefile contains: > > VERSION = 3 > PATCHLEVEL = 4 > SUBLEVEL = 39 > EXTRAVERSION = 13 > NAME = Saber-toothed Squirrel > > Is it possible that the build process gets confused by the EXTRAVERSION field? Here's the problem: v4l/Makefile writes to KERNELRELEASE and v4l/.version -e 'printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",' \ -e ' $$version,$$level,$$sublevel,$$version,$$level,$$sublevel,$$extra);' \ $ cat v4l/.version VERSION=3 PATCHLEVEL:=4 SUBLEVEL:=39 KERNELRELEASE:=3.4.3913 SRCDIR:=/tmp/sandbox/custom-linux-3.4 Then $(MAKE) -C ../linux apply_patches calls patches_for_kernel.pl 3.4.3913 which computes kernel_version = 3 << 16 + 4 << 8 + 3913 = 0x031349 which is incorrectly interpreted as kernel 3.19.73 thus the correct patches are not applied. Trivial patch follows. Will test right away. Regards. diff --git a/v4l/Makefile b/v4l/Makefile index 1542092004fa..9147a98639b7 100644 --- a/v4l/Makefile +++ b/v4l/Makefile @@ -233,9 +233,9 @@ ifneq ($(DIR),) -e ' elsif (/^EXTRAVERSION\s*=\s*(\S+)\n/){ $$extra=$$1; }' \ -e ' elsif (/^KERNELSRC\s*:=\s*(\S.*)\n/ || /^MAKEARGS\s*:=\s*-C\s*(\S.*)\n/)' \ -e ' { $$o=$$d; $$d=$$1; goto S; }' \ -e '};' \ - -e 'printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s%s\n",' \ + -e 'printf ("VERSION=%s\nPATCHLEVEL:=%s\nSUBLEVEL:=%s\nKERNELRELEASE:=%s.%s.%s.%s\n",' \ -e ' $$version,$$level,$$sublevel,$$version,$$level,$$sublevel,$$extra);' \ -e 'print "OUTDIR:=$$o\n" if($$o);' \ -e 'print "SRCDIR:=$$d\n";' > $(obj)/.version @cat .version|grep KERNELRELEASE:|sed s,'KERNELRELEASE:=','Forcing compiling to version ', -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html