[linux-dvb] Errors compiling from hg snapshot

Mauro Carvalho Chehab mchehab at infradead.org
Thu Jun 1 16:46:59 CEST 2006

Em Qua, 2006-05-31 às 18:09 -0700, Trent Piepho escreveu:
> On Wed, 31 May 2006, Michael Krufky wrote:
> > On 5/31/06, Trent Piepho <xyzzy at speakeasy.org> wrote:
> > > On Wed, 31 May 2006, hermann pitton wrote:
> > > > Am Mittwoch, den 31.05.2006, 10:51 +0100 schrieb Gavin Hamill:
> > > > > I don't have any radio cards - can I just disable this part of the
> > > > > compile completely? If so, what do I need to comment out in the
> > > > > Makefiles? :)
> > > > >
> > > Isn't it just a matter of using make xconfig or make gconfig or make
> > > menuconfig to select the drivers to build, and then not selecting
> > > micro PCM 20?  Or just edit v4l/.myconfig by and and set the MIRO
> > > variables to 'n'?
In fact, if you don't select miro pcm20 at make
menuconfig/xconfig/gconfig, it will update both .config and .myconfig
files, allowing you to compile kernel without support for those boards
with just
> > The problem is that the build system inside the mercurial repository
> > is not honoring kconfig "depends on" clauses.  The micopcm20 radio
> > driver should automatically be disabled in these cases where OSS has
> > been stripped from the kernel.
> It's nice for developers to be able to build all modules, to test changes,
> without having to create a custom kernel with support for everything.  It
> would be nice if this was still possible.
Yes, that's true. 

Also: to process kernel dependencies, you may use make
menuconfig/xconfig/gconfig. One point to be observed is: to process the
real kernel .config + V4L stuff would be complicated, since it would be
distro dependent, since it will depend on where are the .config file to
be applied. This is generally under /boot/config-x.y.z, but not always.
Also, if you use to compile with another kernel (using make build), what
config should be used?

> > We know "depends on" functionality is broken... I wonder if "selects"
> > is broken too?
> I think it's not so much a bug, but the script has a different goal.
Before the scripts, it were just compiling all modules that were at the
tree. With those stuff, now you can unselect a driver if desired/needed.
> The script to look at is make_kconfig.pl.  It goes through the v4l-dvb Kconfig
> files, looking at all the options.  It does not look at the kernel's Kconfig
> files at all, not does it look at the kernel's .config file.
Yes, for the reason above.
> It generates v4l/Kconfig, which is sort of a concatanation of all the v4l-dvb
> Kconfig files.
> Then it makes v4l/Kconfig.kern, which is a subsitute for the kernel's Kconfig
> files.  It provides default values for all the variables that v4l-dvb Kconfig
> depends on that come from elsewhere (ie.  the kernel).
If make *config don't find a description for all vars, it will provide
an empty menu. So, those dependent values should be somewere. Since we
don't know what config should be used (due to the reasons above), it
defaults all modules to m, and all booleans to y (except for a few
special cases). This warrants that make allmodconfig will compile all
supported drivers for that version.

> So it does honor the Miro PCM 20 "depends on" information.  It just honors it
> by turning it on.  This is useful to developers, so that they can build
> everything even when they don't have the hardware.
Yes. With this, we can check if a change at a core stuff didn't broke a
> Not as useful to
> non-developers, who may only want to build drivers that their current kernel
> can actually use.
For users, make *config will be more helpful, allowing to compile just
the required stuff.
> make_kconfig.pl will use the v4l/versions.txt file to turn off drivers that
> need a newer kernel than they are getting built against.  These drivers'
> Kconfig stanzas will not appear in v4l/Kconfig, instead a placeholder will be
> inserted that is set to off.  However, the variable will still appear in
> v4l/.config set to on.  Probably shouldn't do that.
In fact, .config is not used at makefile, just .myconfig, so, it does't
> After make_kconfig.pl is run, the oddly named make_noconfig.pl is run.
we should rename it ;) The basic point here is that .config file is ok
for the 'y' or 'm' values, but, for 'n' answers, it will just comment
that value, but, if we don't mark it as 'n', building may use kernel's
config stuff (I had this problem on one distro). So, .myconfig marks all
stuff to "no". That's why it have this weird name ;)
> It takes the .config file and produces a .myconfig that is suitable for including
> into a Makefile.  It also reads v4l/versions.txt and turns off variables that
> are not supported.  This is why make_kconfig.pl can get away with leaving
> those variables on.
At the time i wrote the patch, I seeked for other means to turn off
unsupported drivers. This method seemed to me the best one, since
doesn't require to much effort to implement. It would be better if we
could do some tests at compilation time, with some stuff like #if
kernel<2.6.xx, but this won't work.
> > I hope this explanation helps somebody to construct a fix to be merged
> > into the repository. (hint, hint)
The explanation is ok. Maybe you may convert it into a BUILD file, so
that we can include it at the repository :)
> I haven't had so much luck with my changes to the build system getting merged.
I think I've commited some proposed changes by you.


More information about the linux-dvb mailing list