From patchwork Fri Dec 18 10:44:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mason X-Patchwork-Id: 7881961 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 397F39F387 for ; Fri, 18 Dec 2015 10:44:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6240B2041B for ; Fri, 18 Dec 2015 10:44:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 451342043C for ; Fri, 18 Dec 2015 10:44:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751545AbbLRKop (ORCPT ); Fri, 18 Dec 2015 05:44:45 -0500 Received: from smtp2-g21.free.fr ([212.27.42.2]:24542 "EHLO smtp2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751403AbbLRKon (ORCPT ); Fri, 18 Dec 2015 05:44:43 -0500 Received: from [172.27.0.114] (unknown [83.142.147.193]) (Authenticated sender: slash.tmp) by smtp2-g21.free.fr (Postfix) with ESMTPSA id EE25E4B00E9; Fri, 18 Dec 2015 11:44:30 +0100 (CET) Subject: Re: Automatic device driver back-porting with media_build To: Mauro Carvalho Chehab Cc: linux-media , Hans Verkuil References: <5672A6F0.6070003@free.fr> <20151217105543.13599560@recife.lan> <5672BE15.9070006@free.fr> <20151217120830.0fc27f01@recife.lan> <5672C713.6090101@free.fr> <20151217125505.0abc4b40@recife.lan> <5672D5A6.8090505@free.fr> <20151217140943.7048811b@recife.lan> <5672EAD6.2000706@free.fr> From: Mason Message-ID: <5673E393.8050309@free.fr> Date: Fri, 18 Dec 2015 11:44:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: <5672EAD6.2000706@free.fr> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 ',