All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mason <slash.tmp@free.fr>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: linux-media <linux-media@vger.kernel.org>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: Automatic device driver back-porting with media_build
Date: Fri, 18 Dec 2015 11:44:35 +0100	[thread overview]
Message-ID: <5673E393.8050309@free.fr> (raw)
In-Reply-To: <5672EAD6.2000706@free.fr>

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 ',


  parent reply	other threads:[~2015-12-18 10:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-17 12:13 Automatic device driver back-porting with media_build Mason
2015-12-17 12:55 ` Mauro Carvalho Chehab
2015-12-17 13:52   ` Mason
2015-12-17 14:08     ` Mauro Carvalho Chehab
2015-12-17 14:30       ` Mason
2015-12-17 14:55         ` Mauro Carvalho Chehab
2015-12-17 15:32           ` Mason
2015-12-17 16:09             ` Mauro Carvalho Chehab
2015-12-17 16:48               ` Mason
2015-12-18 10:37                 ` Mauro Carvalho Chehab
2015-12-18 11:01                   ` Mason
2015-12-17 17:03               ` Mason
2015-12-17 17:17                 ` Mason
2015-12-18 10:44                 ` Mason [this message]
2015-12-18 11:03                   ` Mauro Carvalho Chehab
2015-12-18 11:22                     ` Mauro Carvalho Chehab
2015-12-18 12:10                       ` Mason
2015-12-18 12:59                         ` Mason
2015-12-18 13:40                           ` Mason
2015-12-18 15:13                             ` Mason
2015-12-18 17:10           ` Mason
2015-12-18 19:42             ` Mason
2015-12-28 10:44   ` Mason
2015-12-28 12:21     ` Mason
2015-12-28 13:02       ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5673E393.8050309@free.fr \
    --to=slash.tmp@free.fr \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.