summaryrefslogtreecommitdiff
path: root/v4l/scripts
AgeCommit message (Collapse)Author
2006-08-31Re-write make_makefile.pl, re-work v4l/MakefileTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> The make_makefile.pl script is re-written. The old one was nasty. This one will correctly handle Makefile lines that are continued with a backslash. It will also generate a dependency list of the Makefile used to create Makefile.media. This way if any change, Makefile.media will be automatically re-made by make. The whole business where make_makefile.pl would call make_kconfig.pl is removed. The underlying logic of the main Makefile is completely changed. Make has a feature where it will make sure any included files are up-to-date, and then restart itself if any were updated. We now take advantage of this feature. Detect when make is building only targets which do not need include files like .myconfig or Makefile.media, and don't include them in those cases. 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-30Add new script, analyze_build.pl, that analyzes the Makefile treeTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> This script will read a Linux Kernel style Makefile tree and produce an overview of the build process. It produces three lists which show to associations of: 1. Kconfig variables to kernel module(s) built 2. Kernel modules to source file(s) that make them 3. Kconfig variables to source file(s) built It can also check the Makefiles for various errors and warnings. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-08-24Add new script, check_config_defines.plTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> This script will check source files against the v4l-dvb and kernel Kconfig files, to make sure that all CONFIG_XXX defines mentioned in the source files have corresponding config options in the Kconfig files. Signed-off-by: Trent Piepho <xyzzy@speakeasy.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-08remove embedded videodev.h patch from makelinks.shMichael Krufky
From: Michael Krufky <mkrufky@linuxtv.org> This fixes the patch failure when using the "make kernel-links" build method. We no longer have to patch videodev.h to include compat.h for the in-kernel build using the v4l-dvb development repository, as the individual card drivers that need compat.h are already including it. Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2006-08-03merge from mainPatrick Boettcher
From: Patrick Boettcher <pb@linuxtv.org> merge from main Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
2006-08-02Look for module utilities in /sbin directoriesTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Normally programs like modinfo are in /sbin, and non-root users often don't have this in their path. Make the rmmod.pl script look in some extra directories like /sbin, /usr/sbin, etc. if it can't find the utilities in the path. Signed-off-by: Trent Piepho <xyzzy@speakeasy.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-02merge from mainPatrick Boettcher
From: Patrick Boettcher <pb@linuxtv.org> merge from main Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
2006-08-02Added cross-dependecy check at the end of compilation cycleMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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-29merge: from mainPatrick Boettcher
From: Patrick Boettcher <pb@linuxtv.org> merge: from main Signed-off-by: Patrick Boettcher <pb@linuxtv.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-07-15Make snapshot now working fine with hgMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> This will allow generating periodic snapshots of the tree. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-04sync with masterPatrick Boettcher
From: Patrick Boettcher <pb@linuxtv.org> sync with master Signed-off-by: Patrick Boettcher <pb@linuxtv.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-24Add blacklist capability to tuner.pl and remove TDA9887 from the cardlistMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> tda9887 is not really an independent tuner, but part of one. It shouldn't be ponted at a userlist. 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-22Have the commit auto-check code tell you when it does somethingMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> When the make commit checks for whitespace errors, it will save a copy of the changes it makes to $(TMP)/v4l_hg_whitespace. The prep_commit_msg.pl script will look for this file and include a note in the prepared commit message with diffstat output. The changes that scripts/cardlist might make are not included, but that can be added later. The prep_commit_msg.pl script is effectively totally re-written. This one will try some extra stuff to some up with the user's e-mail, such as looking in the ~/.hgrc file. The Makefile is changed so that temporary files created by make commit and make whitespace will honor the $TMP environment variable, if set. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-22Adjust filenames in the strip whitespace script outputMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> Before: --- Makefile +++ - 2006-06-20 22:16:36.320564000 -0700 Now: --- Makefile +++ Makefile patch handles both correctly, but diffstat will use the "+++" filename rather than the "---" filename, making diffstat output rather useless. Signed-off-by: Trent Piepho <xyzzy@speakeasy.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-21Fixes circular dependencies at building systemMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> There were a circular dependency at scripts/make_makefile.pl that were affecting mostly building with GNU make 3.81. Also, scripts/make_noconfig.pl is, in fact, building .myconfig file, so, better to name it as make_myconfig.pl. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-20Makefile.media were rewritten even when not required.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> make 3.81 were suffering some endless loop that might be caused by Makefile.media rewrites. After this patch, make_makefile will only write Makefile.media if needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-20Faster strip whitespace cleaning scriptMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> Faster script that doesn't use any temporary files. The old one would also miss cleaning four spaces in a row in places where it would clean one to eight spaces. Has two options: fast Only clean whitespace in files Hg thinks are modified or added. Used by make whitespace and much (about 100x) faster. manifest Clean all files controlled by Hg, using "hg manifest" The default with no options is the old behaviour, clean all files under the linux directory, except CVS files. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-19Improved to accept also patches from akpm.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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-17integer/hex/string options need to appear in .myconfigMauro Carvalho Chehab
From: Trent Piepho <xyzzy@speakeasy.org> integer/hex/string options were getting omitted from .myconfig, produced by make_noconfig.pl. They don't need to be there for the Makefile that includes .myconfig, it only uses the bool/tristate options. They need to be there for compat-config.h, which is generated from .myconfig and so will only have the #define statements for options that appear in .myconfig. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-13rmmod syntax works only on newer mod-utils packagesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> rmmod <file> doesn't work with rmmod version 3.2.2. This patch uses rmmod <module> instead. This should work with older mod-utils. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-12mailimport improved to accept "hg export" patchesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Now, script will detect "hg export" patches inside emails, removing non-pertinent headers, keeping only the original commit message and the patch. 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-08Make reload were not working. fixed.Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-08There were a cross-reference on cpia and cpia_pp/cpia_usbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Those cross-references were generating an error: *** Warning: "cpia_pp_init" [/home/v4l/master/v4l/cpia.ko] undefined! *** Warning: "cpia_usb/_init" [/home/v4l/master/v4l/cpia.ko] undefined! 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-08insmod.sh were replaced by a perl script (rmmod.pl)Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> insmod.sh were a hack, were somebody should check all dependencies for each module. Several dependencies were mising, and, to keep it updated for 178 modules is really hard. rmmod.pl is a "smart" script: it does: 1) Check, for each found module on v4l, the correct order for each module; 2) Check any dependencies for out-of-tree modules; 3) rmmod/insmod at the correct order; 4) It have a table with the suggested debug parameter for each module. 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-19merge: http://linuxtv.org/hg/~pb/v4l-dvbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.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>