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 12:01:28 +0100	[thread overview]
Message-ID: <5673E788.5060002@free.fr> (raw)
In-Reply-To: <20151218083711.69d59233@recife.lan>

On 18/12/2015 11:37, Mauro Carvalho Chehab wrote:
> Em Thu, 17 Dec 2015 17:48:57 +0100
> Mason <slash.tmp@free.fr> escreveu:
> 
>> On 17/12/2015 17:09, Mauro Carvalho Chehab wrote:
>>> Em Thu, 17 Dec 2015 16:32:54 +0100
>>> Mason <slash.tmp@free.fr> escreveu:
>>>
>>>> I wanted to fix the NEED_WRITEL_RELAXED warning, but I don't know Perl.
>>>>
>>>> v4l/scripts/make_config_compat.pl
>>>>
>>>> check_files_for_func("writel_relaxed", "NEED_WRITEL_RELAXED", "include/asm-generic/io.h");
>>>> incorrectly outputs
>>>> #define NEED_WRITEL_RELAXED 1
>>>>
>>>>
>>>> In file included from <command-line>:0:0:
>>>> /tmp/sandbox/media_build/v4l/compat.h:1568:0: warning: "writel_relaxed" redefined
>>>>  #define writel_relaxed writel
>>>>  ^
>>>> In file included from include/linux/scatterlist.h:10:0,
>>>>                  from /tmp/sandbox/media_build/v4l/compat.h:1255,
>>>>                  from <command-line>:0:
>>>> /tmp/sandbox/custom-linux-3.4/arch/arm/include/asm/io.h:235:0: note: this is the location of the previous definition
>>>>  #define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \
>>>>  ^
>>>>
>>>> Shouldn't the script examine arch/$ARCH/include/asm/io.h instead of
>>>> include/asm-generic/io.h ? (Or perhaps both?)
>>>>
>>>> Does make_config_compat.pl know about ARCH?
>>>
>>> No to both. When you do a "make init" on the Kernel repository, it
>>> will evaluate the ARCH vars.
>>>
>>> This is also needed for the media build to work, as it needs to
>>> check what CONFIG vars are enabled on the targeted Kernel.
>>
>> I downloaded the vanilla version of my custom kernel: linux-3.4.39.tar.xz
>>
>> Even then, NEED_WRITEL_RELAXED is incorrectly defined.
> 
> did you run a:
> 	make allmodconfig
> 	make init
> 
> for the vanilla version? Without that, the symlinks won't appear.

/tmp/sandbox/linux-3.4.39$ make allmodconfig
scripts/kconfig/conf --allmodconfig Kconfig
#
# configuration written to .config
#
/tmp/sandbox/linux-3.4.39$ make menuconfig
scripts/kconfig/mconf Kconfig
.config:25:warning: symbol value '' invalid for PHYS_OFFSET
#
# configuration written to .config
#


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

/tmp/sandbox/linux-3.4.39$ make init
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/arm/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CC scripts/mod/empty.o
MKELF scripts/mod/elfconfig.h
HOSTCC scripts/mod/file2alias.o
HOSTCC scripts/mod/modpost.o
HOSTCC scripts/mod/sumversion.o
HOSTLD scripts/mod/modpost
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
CC init/main.o
CHK include/generated/compile.h
UPD include/generated/compile.h
CC init/version.o
CC init/do_mounts.o
CC init/do_mounts_initrd.o
LD init/mounts.o
CC init/initramfs.o
CC init/calibrate.o
LD init/built-in.o

cd ../media_build/linux
make tar DIR=/tmp/sandbox/media_tree
make untar
cd ..
make release DIR=/tmp/sandbox/linux-3.4.39
make

make -C ../linux apply_patches
make[2]: Entering directory `/tmp/sandbox/media_build/linux'
Patches for 3.4.39. already applied.
make[2]: Leaving directory `/tmp/sandbox/media_build/linux'
make -C /tmp/sandbox/linux-3.4.39 SUBDIRS=/tmp/sandbox/media_build/v4l  modules
make[2]: Entering directory `/tmp/sandbox/linux-3.4.39'
  CC [M]  /tmp/sandbox/media_build/v4l/altera-lpt.o
In file included from <command-line>:0:0:
/tmp/sandbox/media_build/v4l/compat.h:1568:0: warning: "writel_relaxed" redefined
 #define writel_relaxed writel
 ^
In file included from include/linux/scatterlist.h:10:0,
                 from /tmp/sandbox/media_build/v4l/compat.h:1255,
                 from <command-line>:0:
/tmp/sandbox/linux-3.4.39/arch/arm/include/asm/io.h:235:0: note: this is the location of the previous definition
 #define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \
 ^

$ grep -rn NEED_WRITEL_RELAXED
v4l/compat.h:1567:#ifdef NEED_WRITEL_RELAXED
v4l/scripts/make_config_compat.pl:667:	check_files_for_func("writel_relaxed", "NEED_WRITEL_RELAXED", "include/asm-generic/io.h");
v4l/config-compat.h:1888:#define NEED_WRITEL_RELAXED 1




  reply	other threads:[~2015-12-18 11:01 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 [this message]
2015-12-17 17:03               ` Mason
2015-12-17 17:17                 ` Mason
2015-12-18 10:44                 ` Mason
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=5673E788.5060002@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.