summaryrefslogtreecommitdiff
path: root/v4l/scripts/make_kconfig.pl
AgeCommit message (Collapse)Author
2007-05-29Merge from masterHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2007-05-21build: work around problem with VIDEO_HELPER_CHIPS_AUTOTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> A number of drivers depend on "!VIDEO_HELPER_CHIPS_AUTO", so when VHCA is on, they are disabled. Make the allyesconfig default be VHCA off so these drivers will be enabled with allyesconfig. Even though these drivers are disabled when VHCA is on, it is still possible to enable them via a "select", at which point a driver will be on even though its dependencies are not met. Which seems like it doesn't follow the specification. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-05-21build: Update make_kconfig to support depends on in menusTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> A backported kernel patch added a "depends on" clause to a menu, which wasn't yet handled. Everything in a menu gains implicitly gains a copy of the menu's dependencies We handle this the same way as if/endif is handled. It may not work properly if someone makes a nonsense file like: menu "foo" if X endmenu endif Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-05-03build: Handle string optionsTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Deal with string options and the default values. There is only one string option, and it's disabled, but someone could always add more. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-05-03build: Update build scripts to handle menuconfig/if/endifTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Update make_myconfig.pl and make_kconfig.pl to handle menuconfig options the same way as config options. Update make_kconfig.pl to process if/endif directives. All config options inside an if/endif block gain a dependency on the 'if' expression. Make the script a little more efficient by not trying to match a line after it has already found a match for it. This helped to enhance debug mode, so that it will print lines which were not understood rather than silently skipping them. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-10-02Check for Kernel OSS includes for aci.cTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> aci.c needs some OSS include files from the kernel to compile. Typical kernel-headers packages don't have these include files, and so aci.c fails to compile. Have make_kconfig.pl check for the headers, and disable aci if they aren't there. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-09-03Minor change to make_kconfig.pl Kconfig parsing codeTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Skip the parsing code that only make sense inside a Kconfig menu block when not in a menu block. Mostly to get rid of Perl warnings. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-09-01Stop sourcing Kconfig.sound, it would show up twiceTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Since Kconfig.sound is processed by make_kconfig.pl like all the other Kconfig files, it was getting put into v4l/Kconfig twice. Once from a source directive v4l/Kconfig and again when it was processed by the script. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-09-01Fix bug in build system dependency evaluatorTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> A subtle bug in the code that changed Kconfig depends expressions into Perl expressions would keep changes to Kconfig variables from propagating. The subroutine was supposed to change a _copy_ of the expression from Kconfig to Perl syntax, but was changing the expression itself. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-08-31New dependency tracking system for make_kconfig.plTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Restructure make_kconfig.pl and clean the code up some more. The dependency tracking code is rewritten. This version converts the "depends on" and "select X if" lines into Perl expressions, which are then evaluated. This way all complex expressions are handled correctly. Dependencies are tracked recursively until all are found. "select" lines with an "if" clause are handled correctly; the selected variable is only required when the "if" clause is true. Another improvement is that hex/string/int variables that don't have their dependencies met will not appear in the .config file. They aren't supposed to. make_kconfig will fail with an error message if MODULES is turned off in the Kernel's config, as building out of tree makes no sense in that situation. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-08-31Create dependencies for Kconfig fileTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Add the ability to the make_kconfig.pl script to create a file named ".kconfig.dep" which can be included in a Makefile and defines the dependencies of the v4l/Kconfig file. That is, all the individual Kconfig files that were used to make it. Added a rule to v4l/Makefile to remake Kconfig when needed, and include .kconfig.deps to get Kconfig's dependencies. Adjust the config targets so that they depend on Kconfig, rather than including the commands to create Kconfig in the config targets' scripts. The config targets no longer depend on .version, as they don't need it themselves. Rather, it's Kconfig that needs .version, so it's made one of Kconfig's dependencies. Add Kconfig as a dependency to .myconfig, it should be there since the make_myconfig.pl script uses Kconfig. Now if you change any of the Kconfig files, the v4l/Kconfig file will automatically get remade. This will in turn cause .myconfig to be re-made, and any new options will appear in .myconfig (turned off). Ideally this should trigger some kind of oldconfig system to update .config. Fix the .version rule so that instead of re-creating .version every time, it is only created when it didn't already exist. Since Kconfig depends on .version, it was getting re-created every time too. If .version existed, it would just get re-created to the same thing anyway. Stop echoing the echo srcdir command itself and don't echo anything if SRCDIR is blank. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-08-31New code to read kernel config in make_kconfig.plTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> New code to read the Kernel's (or v4l-dvb's) '.config' file. This replaces the code that used to read the config.h/autoconf.h file. In 2.6.18 the autoconf.h file no longer mentions options set to 'n' at all, while .config has a comment line for each disabled option. Reading .config is easier and gives us a list of the disabled options. Restructure the code for reading '.version' too. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-08-31With aci.h at the tree, the test is not requiredMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Still keeping the warning message for kernel-readers only. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-31Allow compilation of the audio driversMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Now, make will compile also the audio drivers at the tree. By default, they will not be installed. A new option were added to install those files: make sound-install Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-31Added audio-related stuff used on a few multimedia boardsMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Those files are not part of V4L stuff. However, they are or dependent of V4L apis or used on some video boards. After this patch, it will be possible to compile and test they against changes at V4L API or drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-31Fix a bug at the building systemMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> "select" were overriding "depends on". A workaround were previously been applied. This patch removes the workaround and fixes the issue. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-23"select" Kconfig were wrongly being processedMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-23Make easier to debug: just uncommenting my $debug=1Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-02merge: from mchehabMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-02Removed obsolet manual add for MODULESMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> The building system now auto-generates this dependency, as tristate, while those options were manually generating it as boolean, generating a warning. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-01Quick fix to make building work againTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Instead of reading linux/config.h, read linux/autoconf.h to get the kernel's configuration. The former file has been obsoleted. In Kconfig 'select' lines, ignore the 'if' clause if one exists. This is not a permanent solution to correctly parse and evaluate Kconfig files. That is much harder, this will get building working again now. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-07-15Change to kernel version checking code in make_kconfig.plTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The code to compare kernel versions was wrong, it would think 2.7.1 was older than 2.6.10 because 1 < 10. Fixed. Changed code to not require all options to be defined in versions.txt. It was necessary before only because of the way make_myconfig.pl worked, but that script has changed. Driver sub-options can be omitted from versions.txt, unless they somehow need a newer kernel than the driver itself. In fact, most of the drivers themselves could be removed from versions.txt, and only put in if there is an actual reason. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-06-26Merge: from master.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2006-06-26Added some error messages to the scriptMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-22Improved message when only kernel headers are foundMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-21building system fix: miropcm20 depends on sound/oss/aci.hMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Most V4L/DVB hg tree users are just compiling using kernel headers. This is bad, due to: 1) the lack of support for make *config 2) the kernel itself have unknown patches from the distros Anyway, it is useful to provide they some support. This patch provides a "hack" for such users, by checking if the sound/oss/aci.h file is present under kernel tree. If not, it will disable miropcm20 and print a warning about the usage of a kernel-headers only package. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-21Option disabling should be recursive. Fixing it.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-21Some improvements at the building systemMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Building system now looks kernel config.h and autoconf.h files, seeking for the compiled options at kernel. If something is missing, it will disable compilation for that driver, printing a warning message. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-19hex defaults in Kconfig sometimes have "0x", sometimes don'tMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> A check of the current Linux 2.6 kernel reveals that the default values for hex options sometimes have the form "0x1f0" and sometimes "1f0", with the former being more common. Adjust the make_kconfig.pl script so it can understand both. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-17Hex handling is different from intMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Kernel handling of hex type passes those values prefixed with 0x to the modules. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-12Hex option defaults weren't handled correct in make_kconfigMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> The regex for int and hex option defaults was only correct for int options, it didn't handle hex characters. The kernel version code was outputing "default n" lines for disabled hex and int options, it should only be done for boolean and tristate options. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-08Handles also hexa fields on KconfigMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> The same threatment to integer can also be applied Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-08Improve v4l configuration scripts, handle versions.txt differentlyMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> This mainly changes the way make_kconfig.pl handles config options that require a newer kernel, as defined by versions.txt. Currently it outputs a blank config stanza defining the variable and setting it to 'n'. These show up as mysterious un-named grayed out options in xconfig, or just don't appear at all in menuconfig. The new method outputs an extra config stanza to the top of v4l/Kconfig, VIDEO_KERNEL_VERSION. This boolean variable defaults to 'n', and if enabled, allows selecting drivers that are listed as needing a newer kernel. Config options that need a newer kernel still apear in v4l/Kconfig with their names and help text, but they now have an additional dependency on VIDEO_KERNEL_VERSION, and an extra bit in the help text warning that they need a newer kernel. They will appear greyed out in xconfig, but will still have their proper names and help text. If the user turns VIDEO_KERNEL_VERSION on, then they can be enabled. The kernel version in versions.txt tends to be somewhat conservative. The default v4l/.config file generated by make_kconfig.pl will have these options set to no, instead of yes/module as it did before. make_noconfig.pl will no longer look at versions.txt, or deal with kernel version detection. It will get a list of all config options by reading v4l/Kconfig, and produce .myconfig by setting all bool/tristate options to their value from v4l/.config, or 'n' if not listed. A few bugs have been fixed, and the regexs adjusted. They were making a few mistakes before, or were otherwise flawed. The scripts do more error checking that the files they parse conform to the expected syntax. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvaho Chehab <mchehab@infradead.org>
2006-05-19Have make_kconfig.pl output int config vars with their default valueMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> A few drivers have integer config variables defined in their Kconfig file which must be set for them to compile. make_kconfig.pl would just ignore int variables and not put them into .config at all. This change will put them into .config set to their default values. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-17Removed a broken code inside make_kconfigMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> This code were not working, and were obsoleted by the while just bellow, that checks only for tristate and boolean parameters. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-05-17Fix compilation for Miropcm20 and CinergyMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Miropcm compilation were assuming to compile under linux/drivers/media/video, but this is not true when compiling in-tree. Also, make allyesconfig were making "y" to an advanced configuration for Cinergy. gentree.pl also updated. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-27Compilation for DVB_AV7110_FIRMWARE seems to be weirdMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Some systems use a previous config information to generate a default config. This seems to cause troubles on some systems. This patch fixes compilation for AV7110 firmware inside V4L/DVB tree. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-26Some vars were not initializated by the script. fixed.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> This avoids warnings when running make *config Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-25Improves V4L/DVB in-tree buildingMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Now, make_kconfig.sh will check for boolean/tristate config vars and handle it properly. Also, make allyesconfig/allmodconfig will use make_kconfig.sh to generate .myconfig instead of conf -m. This way, make all will not require priviledges at kernel tree. write access to kernel tree is still required for make menuconfig/ make xconfig/make qconfig. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-04-07Big changes at v4l-dvb make internal workingMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Previously, tree building were based on Make.config. This file contained all compiling stuff. Also, v4l/Makefile contained all drivers that should be copiled, replicating the rules of all other Makefiles under linux. Now, make will rely on linux/*/Makefile to compile the modules. This approach allows usage of Kconfig files, allowing partial compilations. Newer makefile commands introduced: make allmodconfig - Selects all stuff to be compiled as module; make config - Selects packages via text interface; make xconfig - Selects packages via qt interface; make gconfig - selects packages via gtk interface. for config, xconfig and gconfig to be used, those scripts needs to be previously compiled at kernel. So, user needs to use those commands previously at kernel tree. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-26Some cleanups at make xconfigMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Now, it doesn't depend on kernel Kconfig stuff: - It generates a Kconfig.kern based on unsolved dependencies. - It assumes that all needed dependencies were compiled as module. Only Multimedia tree is showed to the user. To work, user should have runned xconfig before at the normal kernel tree. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-03-01Added make qconfig option to allow testing v4l/dvb menusMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> - make qconfig option were added. - This will generate a menu with v4l/dvb Kconfig menus at the beginning of the menus and the kernel menus at the end. Kernel menus shoudn't be touched. - .config is then generated after quiting. - Curently, .config is not used by Makefile proccess but it is a good candidate to be a replacement of Make.config file. With a good .config file, compilation should be faster. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>