Re: Automatic device driver back-porting with media_build

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

 



Em Fri, 18 Dec 2015 11:44:35 +0100
Mason <slash.tmp@xxxxxxx> escreveu:

> 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);' \

Hmm... that doesn't sound right on upstream Kernels.

For example, the extra version on the media_build current Kernel is:

Makefile:EXTRAVERSION = -rc2

So, I guess we'll need a different regex, like:

         -e '    elsif (/^EXTRAVERSION\s*=\s*(\d+)\n/){ $$extra=".$$1"; }' \
         -e '    elsif (/^EXTRAVERSION\s*=\s*(\S+)\n/){ $$extra=$$1; }' \

Regards,
Mauro
--
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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux