summaryrefslogtreecommitdiffstats
path: root/support/scripts
Commit message (Collapse)AuthorAgeFilesLines
* support/script/cpan: improve Makefile generationFrancois Perrad2014-06-291-4/+7
| | | | | | | | | | - remove trailing space after perl when it's the only dependency - license: substitution of perl name by BR name - add a tabulation before source Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-build-time: support python3Vivien Didelot2014-06-291-3/+3
| | | | | | | | | This patch is the result of 2to3. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-depends: remove unnecessary redirect of stderrArnout Vandecappelle2014-06-291-2/+2
| | | | | | | | | | It hides any error messages reported by make. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: Samuel Martin <s.martin49@gmail.com> Tested-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-depends: support calling from recursive makeArnout Vandecappelle2014-06-291-2/+2
| | | | | | | | | | | | | | | | | The graph-depends script calls make. If the outer make was called recursively, or if it was called with '-C <somedir>', then the environment will contain "MAKEFLAGS=w --". Therefore, the recursive make prints 'Entering' and 'Leaving' messages, which clobbers the output for dot. To avoid this, add "--no-print-directory" to the recursive make arguments. Since we require GNU make 3.81, we can be sure that this option is available. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/script/scancpan: populates Config.in with homepageFrancois Perrad2014-06-221-2/+4
| | | | | | Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-depends.py: support python3Arnout Vandecappelle2014-06-221-12/+12
| | | | | | | | | | | | | This patch is the result of 2to3. In addition, universal_newlines=True is added to the Popen calls. In python3, this makes sure that the output is decoded so that we get a string instead of a buffer object. Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graphs/depends: do not draw transitive dependencies by defaultYann E. MORIN2014-06-131-1/+1
| | | | | | | | | | | | | | The transitive dependencies make the graphs barely readable for large configs, with a large number of packages. So, just switch to not drawing the transitive dependencies by default. By popular demand... ;-) [Peter: reword] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc; Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* filesystems: also chown symlinksYann E. MORIN2014-06-091-1/+1
| | | | | | | | | | | | | | | | Currently, the symlinks in the generated filesystems will have the UID of the user running the build, because 'chown' does not change the ownership of symlinks, by default. Although the implications are limited, some may not want that UID to leak in the generated filesystems. So, use 'chown -h' so even symlinks get properly chowned. Reported-by: Angelo Dureghello <angelo@barix.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: generate a list of virtual packagesYann E. MORIN2014-06-081-1/+83
| | | | | | | | | | | | | | | | | | | | | | | Generate an asciidoc table that can be included in the manual, that lists the existing virtual packages, the corresponding symbols, and their providers (and sub-options thereof). The core of this change is the addition of a new formatter for virtual packages. This formatter is a bit tricky, as it has to catter for a bunch of corner cases: - provider is not a package, but is sub-options of a package - such a sub-option may be itself 'select'-ed by one or more other sub-options - legacy packages should not be considered as a provider Those cases are real: - sub-options of mesa3d provide EGL or GLES - selected sub-options of mesa3d provide GL - udev is a legacy package, but it provides udev Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: introduce a symbol formatter to generate package listsYann E. MORIN2014-06-081-29/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, we can generate two different tables of packages: - a single-column table with the symbols' prompts, - a two-column table with the symbols' prompts and locations in the menuconfig. For virtual packages, this is not enough, since we will have to display more columns, with different content: - the virtual package name (but such symbols do not have a prompt) - the symbol name - the providers for the virtual package So, instead of having a single function that knows how to generate any table, introduce a formatter function that is passed as argument to, and called by format_asciidoc_table(). Such formatter functions are responsible for providing: - the layout of the table (number of columns, column arrangement), - the formatted header line, - a formatted line for a symbol. What the formatter should ouput depends on its arguments: - if none are passed, the layout is returned, - if the header label is passed, it returns the formatted header line, - otherwise, it returns the formatted line for a symbol. Two formatter functions are introduced in this changeset, to replace the current 'sub_menu' feature: - _format_symbol_prompt() to display a one-column table with only the symbols' prompts, - _format_symbol_prompt_location() to display a two-column table with the symbols' prompts and locations. This will help us to later introduce a new formatter to generate a table for virtual packages. [Thanks to Samuel for his pythonistic help!] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: who's responsible to decide what is a packageYann E. MORIN2014-06-081-4/+4
| | | | | | | | | | | | | | | | | | | | | When generating the package lists, the responsibility to decide what is actually a package symbol is currently split between the _is_package(), the get_symbol_subset() and the format_asciidoc_table() functions. The two latter functions check that an item is really a symbol, and that is has a prompt. While this is currently correct for real packages, this will no longer be the case when we also generate a list of virtual packages, since they do not have a prompt. Move the responsibility to verify that a symbol is indeed a package symbol to _is_package(), so it's all in one place, and makes it easier to change for virtual packages. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: do not display virtual packages in generated listsYann E. MORIN2014-06-081-2/+19
| | | | | | | | | | | | | | | | | If a package has both a 'real' and a 'virtual' definition, consider it is a virtual package and do not display it in the generated package list. This is the case for jpeg and cryptodev, that are virtual packages, but also real (but empty) packages used to provide a prompt to enable/disable a choice to select an implementation. In this case, we do not want to list the virtual packages, but only their implementations. So, consider packages that are both real and virtual as virtual packages. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Acked-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: prepare handling virtual packages in generated listsYann E. MORIN2014-06-081-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prepare to tell apart real packages from virtual packages. Currently, the code implicitly recognises only real packages, and discards virtual packages, because of the heuristic used to recognise whether a symbol is a package: - for real package: - symbols : BR2_PACKAGE_FOO - .mk files: foo.mk - for virtual packages: - symbols : BR2_PACKAGE_HAS_FOO - .mk files: foo.mk The current heuristic is to check for each symbol if a corresponding .mk file exists, by stripping 'BR2_PACKAGE_' from the beginning of the symbol, converting the result to lowercase, and checking if a .mk file exists. So, as a side effect, it completely misses the virtual packages [*], which is pretty nice since we get a list with only real packages that the user can indeed select and see in the menuconfig. [*] Except for 'cryptodev' and 'jpeg' which are both virtual packages and normal packages. Except they are not normal packages, they are used to display a choice of the implementation to use. This case will be fixed in follow-up patches. Since we'll soon need to also output the table of virtual packages, we need to teach the _is_package() function to recognise them as well. This patch is the first step into that direction: it introduces a new function _is_real_package() that is just a wrapper to _is_package(), which gains a new parameter, being the type of packages to filter on. No behavioural change is made in this patch, it is just a preparatory patch. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: document args to _is_package() in gen-manual-listsYann E. MORIN2014-06-081-0/+2
| | | | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Acked-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/scripts: prepare expanding the packages listsYann E. MORIN2014-06-081-1/+10
| | | | | | | | | | | | Move to a function the code generating the package name from a symbol's name, to avoid code duplication. This is not used currently, but will be in a subsequent patch. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Samuel Martin <s.martin49@gmail.com> Acked-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-depends: rename the mode constantsYann E. MORIN2014-06-081-12/+8
| | | | | | | | | | | | This is ugly, since Python does not have enum constructs, so by moving the 'type' of the constant ('MODE' here) to the beginning, we get an artificial 'namespace' for the constants. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-depends: document the 'transitive' variableYann E. MORIN2014-06-081-0/+3
| | | | | | | | | | | Although unnecessary (we already have initialisation via the parser), initialise the 'transitive' option, and document it at the same time. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-depends: add option to set the coloursYann E. MORIN2014-06-081-3/+20
| | | | | | Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Francois Perrad <fperrad@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-depends: handle the depth argument in a more pythonic wayYann E. MORIN2014-06-081-4/+5
| | | | | | | | | | | | Add some comment as well, enhance help text. [thanks to Samuel for the hints to make it even more pythonic] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graphs-depends: merge redundant-dependencies eliminationYann E. MORIN2014-06-081-37/+9
| | | | | | | | | | | | | | | | | | | Merge the redundant-dependencies elimination into the newly introduced transitive-dependencies elimination. This makes the code cleaner and much shorter, because: - the ('all',pkg) redundant dependency is in fact a transitive dependency, and we now have code to deal with that - the (pkg,'toolchain') dependency is easy enough to deal with that having a separate function for that is overkill Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graphs: add option to remove transitive dependencies in dependency graphYann E. MORIN2014-06-081-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, all the dependencies of a package are drawn on the dependency graph, including transitive dependencies (e.g. A->B->C and A->C). For very big graphs, with lots of packages with lots of dependencies, the dependency graph can be very dense, and transitive dependencies are cluttering the graph. In some cases, only getting the "build-order" dependencies is enough (e.g. to see what impact a package rebuild would have). Add a new environment variable to disable drawing transitive dependencies. Basically, it would turn this graph: pkg1 ---> pkg2 ---> pkg3 -------------------. |\__________/ \ \ |\____________________ \ \ | \ \ \ `-> pkg4 ---> pkg5 ---> pkg6 ---> pkg7 ---> pkg8 \__________/ into that graph: pkg1 ---> pkg2 ---> pkg3 -----------. | \ `-> pkg4 ---> pkg5 ---> pkg6 ---> pkg7 ---> pkg8 [Thanks to Samuel for the parser hints] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-depends: refactor with more colorsFrancois Perrad2014-06-081-7/+14
| | | | | | | | | Do not use the same colors for toolchain, host and target packages. Signed-off-by: Francois Perrad <francois.perrad@gadz.org> [yann.morin.1998@free.fr rephrase commit log] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* Merge branch 'next'Peter Korsgaard2014-06-011-5/+5
|\ | | | | | | | | | | | | Conflicts: package/gdb/Config.in.host Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
| * scancpan: sort dependenciesFrancois Perrad2014-05-181-5/+5
| | | | | | | | | | | | | | in order to avoid spurious diff when updating packages Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* | pkg-stats: fix whitespacesFabio Porcedda2014-05-151-5/+5
| | | | | | | | | | | | | | | | | | | | | | Remove some spaces before tabs and add the empty line at end of file. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Cc: Luca Ceresoli <luca@lucaceresoli.net> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* | pkg-stats: add luarocks perl python virtual infrastructuresFabio Porcedda2014-05-151-0/+71
|/ | | | | | | | | | | | Recognize the recently added infrastructures: luarocks, perl, python, virtual. Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com> Cc: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net> Cc: Luca Ceresoli <luca@lucaceresoli.net> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/graphs: fix comparisons agains NoneYann E. MORIN2014-04-142-7/+7
| | | | | | | | | | | | | As Samuel said: In Python, None is a singleton, and it is recommended to use "is" or "is not" for testing them [1]. [1] http://legacy.python.org/dev/peps/pep-0008/#programming-recommendations Reported-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graphs: make graphs with lots of packages nicer to look atYann E. MORIN2014-04-141-6/+11
| | | | | | | | | | | Some magic numbers obtained with trial-and-error and successive iterations, to eventually get a nice graph. [Thomas: remove excessive spaces in expressions.] Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/graph-depends: don't show toolchain dependency for all packagesYann E. MORIN2014-04-141-2/+5
| | | | | | | | | | | | | Al packages depend on 'toolchain'. Currently, 'graph-depends' graphs this dependency. The resulting graph is thus cluttered with less-than-useful information. Instead, do not graph the 'toolchain' dependency for any package, save for the fake 'all' package. The graph is now a bit more readable. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/graph-depends: add option to limit the depth of the graphYann E. MORIN2014-04-141-12/+37
| | | | | | | | | | | | | | | | Currently, the complete dependency chain of a package is used to generate the dependency graph. When this dependency chain is long, the generated graph becomes almost unreadable. However, it is often sufficient to get the first few levels of dependency of a package. Add a new variable BR2_GRAPH_DEPTH, that the user can set to limit the depth of the dependency list. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/graph-depends: use argparse to parse argv[]Yann E. MORIN2014-04-141-10/+13
| | | | | | | | | | | | | | | Currently, we are using a crude, ad-hoc parsing of argv[]. This is a limiting factor to adding new options. Use argparse instead, and introduce a single argument for now: --package, -p PACKAGE In the (near) future, we'll be able to add more option arguments, such as depth-limiting for big graphs. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/check-kernel-headers: fix old custom toolchains without -print-sysrootYann E. MORIN2014-04-091-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Old toolchains, with old gcc that do not support -print-sysroot, break the kernel-headers version check script: it fails to find the sysroot of the toolchain, and thus ends up including the host's linux/version.h. Most of the time, this will break early, since the host's kernel headers will not match the toolchain settings. But it can happen that the check is succesful, although the configuration of the toolchain is wrong: - the custom toolchain has kernel headers vX.Y - the user selected vX.Z (Z!=Y) - the host has headers vX.Y In this case, the check passes OK, but the build of some packages later on will break (which is exactly what those _AT_LEAST_XXX options were added to avoid). Fix that by passing the sysroot to the check script, instead of the cross compiler. We get the sysroot as thus: - for custom toolchains, we use the macro toolchain_find_sysroot. We can do that, because we already have a complete sysroot with libc.a at that time. - for internal toolchain using a custom kernel headers version, we just use $(STAGING_DIR). We can't use the macro as for custom toolchains above, because at the time we install the kernel headers, we do not yet have a complete sysroot with a libc.a. But we can just use $(STAGING_DIR), since we're only interested in the kernel headers. For all other types of toolchains, we already have the _AT_LEAST_XXX options properly set, so we need not add a check in this case. Fixes: http://autobuild.buildroot.net/results/f33/f331a6eff0b0b93c73af52db3a6b43e4e598577e/ http://autobuild.buildroot.net/results/a57/a5797c025bec50c10efdcff74945aab4021d05e4/ [...] [Thanks to Thomas for pointing out the toolchain_find_sysroot macro!] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support/check-kernel-headers: use mktemp instead of hand-crafted temp fileYann E. MORIN2014-04-061-1/+1
| | | | | | | | | | Instead of creating a temporary files with a dubious scheme, use mktemp, which purpose is exactly that: creating temporary files Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain: print actual version of kernel headers when checkingYann E. MORIN2014-04-061-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we introduced the _AT_LEAST_XXX for the kernel headers, people using pre-built custom toolchain now have to specify the version of the kernel headers their custom toolchain uses. So, when we detect that there is a mismatch between the selection in the menuconfig, and the actual version of the headers, we currently only bail out with a terse message "Incorrect selection of kernel headers". This could be confusing some, and getting the version of the headers used by the toolchain is not trivial (well, it's very easy, but not trivial.) This patch changes the way we report the error by moving the message into the test-code, and by printing the expected and actual versions of the kernel headers. BUT! To get this pretty error message, we need to run the test-program, so we can not use the cross-toolchain, we have to use the native one. BUT! The native one has its own linux/version.h header, so we can not simply include it. So, we ask the cross-compiler where its default sysroot is, and use that to then force-feed the cross linux/version.h to the native toolchain. [Thomas: augment commit log with a message provided by Yann, fix coding style to not have spaces after opening parenthesis and before closing parenthesis, reformatted the message "Incorrect selection..." to make it fit on one line.] Reported-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Maxime Hadjinlian <maxime.hadjinlian@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support/mkusers: fix warnings when adding a new userYann E. MORIN2014-04-051-3/+9
| | | | | | | | | | | | | | | | | | | When adding a new user (or a new group), we would get warnings, like: [...]/support/scripts/mkusers: line 145: [: too many arguments This is because we're checking if a UID (or a GID) is already defined, and/or is different from the requested one, both checks in the same test. Of course, if a UID (or a GID) is not defined, it does not have a value, so we can not compare it to an integer. Fix that by splitting the test in two, so the second is only executed if the first is sucessful. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* script/scancpan: add -host & -target optionsFrancois Perrad2014-04-041-6/+18
| | | | | Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* support: fix typo in mkusersPhilip Paeps2014-03-051-1/+1
| | | | | | | | This fixes the spurious "[: too many arguments" errors from mkusers. Signed-off-by: Philip Paeps <philip@paeps.cx> Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* toolchain/external: check kernel headers version for custom toolchainYann E. MORIN2014-03-011-0/+21
| | | | | | | | | | | | | | | | | | Ensure the kernel headers version used in the custom external toolchain, or the manually-specified kernel headers version, matches exactly the one selected by the user. We do not care about the patch-level, since headers are not supposed to change between patchlevels. This applies only to kernels >= 3.0, but those are actually the ones we do care about; we treat all 2.6.x kernels as being a single version, since we do not support any 2.6 kernels for packages with kernel-dependant features. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* scancpan: a new scriptFrancois Perrad2014-02-231-0/+741
| | | | | | | | | which creates Perl/CPAN package files [Peter: strip trailing spaces] Signed-off-by: Francois Perrad <francois.perrad@gadz.org> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* infra: replace BUILDROOT_CONFIG with BR2_CONFIGArnout Vandecappelle2014-02-091-2/+2
| | | | | | | | | | | | | | | To make the naming consistent (all user-visible options should be prefixed with BR2_). An entry is added to Makefile.legacy to warn users who have set BUILDROOT_CONFIG but not BR2_CONFIG. Still export BUILDROOT_CONFIG but pointing to some phony value, to make sure that scripts that still use it fail in a predictable way. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Tested-by: Jérémy Rosen <jeremy.rosen@openwide.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* apply-patches.sh: make scan_patchdir work recursivelyThomas De Schampheleire2014-02-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | scan_patchdir is called recursively. For this to work properly, the variable path which is set to $1 at the very beginning must be local not global. A test case is to set BR2_GLOBAL_PATCH_DIR to 'mypatches' and having the following tree in the buildroot root: $ find mypatches/ mypatches/ mypatches/busybox mypatches/busybox/subdir.patch mypatches/busybox/subdir.patch/busybox-0001-abc.patch mypatches/busybox/busybox-0002-def.patch mypatches/busybox/asubdir.patch mypatches/busybox/asubdir.patch/busybox-0003-xyz.patch When running 'make busybox-dirclean busybox-patch' originally, you'd get: Applying busybox-0003-xyz.patch using patch: Applying busybox-0002-def.patch using patch: Error: missing patch file mypatches/busybox/asubdir.patch/busybox-0002-def.patch While with this fix: Applying busybox-0003-xyz.patch using patch: Applying busybox-0002-def.patch using patch: Applying busybox-0001-abc.patch using patch: This fixes bug #6434 (https://bugs.busybox.net/show_bug.cgi?id=6434) Signed-off-by: Daniel Mentz <daniel@exxm.de> [Thomas: update commit message with test case] Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* scripts: xorg-release: handle case when version needs downgradeNicolas Dechesne2014-02-041-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | the initial implementation assumes that when a version found in buildroot is different from the one in the X11 release, it requires an upgrade. even though this is most likely the case, it could be a downgrade too, and it's probably worth highlighting such cases when it (rarely) happens. LooseVersion from distutils is doing the low level job of sorting version numbers represented in strings... [Thomas & Thomas: - do not count packages more recent in Buildroot than in the latest X.org release as to be downgraded. If we have more recent version, it's generally for a good reason, so we want to keep them as is. Such packages are counted as "nothing to do", but for information, we indicate that there are "More recent" - also remove the "nothing to do" action indicator. It used to be a simple dash, which was not really useful. ] Signed-off-by: Nicolas Dechesne <ndec13@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* deprecated handling: introduce BR2_DEPRECATED_SINCE_xxxx_xxThomas De Schampheleire2014-01-101-1/+3
| | | | | | | | | | | | | | | | | | | | | In order to keep better track of when a feature got deprecated, and hence when it can be removed, a new set of symbols BR2_DEPRECATED_SINCE_xxxx_xx is introduced. These symbols are automatically selected when BR2_DEPRECATED is selected, and thus are transparent to the user. A deprecated feature will no longer depend on BR2_DEPRECATED directly, but rather on the appropriate BR2_DEPRECATED_SINCE_xxxx_xx. If that symbol does not yet exist, it has to be created in Config.in. When removing a deprecated feature, one should also check whether this was the last feature using the BR2_DEPRECATED_SINCE_xxxx_xx symbol, in which case the latter can be removed from Config.in. A followup patch will make sure the overview is added to the list of deprecated features in the manual, so that a buildroot core developer can easily determine which features to remove in a given development cycle. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* graphs: support generating png graphsYann E. MORIN2013-12-291-2/+1
| | | | | | | | | | | | | | PDF files can not be easily embedded in other documents (eg. ODT, or HTML). Add support for generating PNG graphs, by setting the GRAPH_OUT=pdf|png on the command line: make GRAPH_OUT=png graph-build graph-depends The default is still to generate PDF graphs. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* graph-build-time: generate graphs based on timing dataThomas Petazzoni2013-12-291-0/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This script generates graphs of packages build time, from the timing data generated by Buildroot in the $(O)/build-time.log file. Example usage: ./support/scripts/graph-build-time \ --type=histogram --input=$(O)/build-time.log --output=foobar.pdf Three graph types are available : * histogram, which creates an histogram of the build time for each package, decomposed by each step (extract, patch, configure, etc.). The order in which the packages are shown is configurable: by package name, by build order, or by duration order. See the --order option. * pie-packages, which creates a pie chart of the build time of each package (without decomposition in steps). Packages that contributed to less than 1% of the overall build time are all grouped together in an "Other" entry. * pie-steps, which creates a pie chart of the time spent globally on each step (extract, patch, configure, etc...) The default is to generate an histogram ordered by package name. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [yann.morin.1998@free.fr: adapt to the format of the step-hooks build-time.log, add sort order by name, default to name-ordered histogram, use our colours for pie-charts, add alternate color-scheme, add short-options, add --input/-i] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
* manual: fix manual generation in preparation for BR2_EXTERNAL supportSamuel Martin2013-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes an issue that occurs during the manual build process which will occur when BR2_EXTERNAL is introduced. During the package list generation, the python script using kconfiglib module reads and parses the Config.in files. So, symbols, including environment variables, got expanded and/or resolved. In kconfiglib.py, this patch fixes the regex that did not allow to use numbers in the environment variable names, so '$BR2_EXTERNAL' got wrongly expanded like it was '${BR}2_EXTERNAL': <snip> >>> Updating the manual lists... Traceback (most recent call last): File "/opt/buildroot/master/support/scripts/gen-manual-lists.py", line 375, in <module> buildroot = Buildroot() File "/opt/buildroot/master/support/scripts/gen-manual-lists.py", line 216, in __init__ self.root_config)) File "/opt/buildroot/master/support/scripts/kconfiglib.py", line 214, in __init__ self.top_block = self._parse_file(filename, None, None, None) File "/opt/src/buildroot/master/support/scripts/kconfiglib.py", line 919, in _parse_file return self._parse_block(line_feeder, None, parent, deps, visible_if_deps, res) File "/opt/buildroot/master/support/scripts/kconfiglib.py", line 1114, in _parse_block self.base_dir)) IOError: /opt/buildroot/master/Config.in:490: sourced file "$BR2_EXTERNAL/Config.in" (expands to "2_EXTERNAL/Config.in") not found. Perhaps base_dir (argument to Config.__init__(), currently "/opt/buildroot/master") is set to the wrong value. docs/manual/manual.mk:2: recipe for target 'manual-update-lists' failed make: *** [manual-update-lists] Error 1 </snip> Reported-by: Ryan Barnett <rjbarnet@rockwellcollins.com> Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: Ryan Barnett <rjbarnet@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* manual: do not generate .pyc filesYann E. MORIN2013-12-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Python saves a pre-compiled support/scripts/kconfiglib.pyc file side-to-side with the corresponding .py file. This does not work if the Buildroot source tree is read-only (but this is not an error for Python, which keep going OK). But this may cause issues for out-of-tree builds in case the same Buildroot source tree is shared by many builds. Also, 'make clean' currently does not clean this file, and out-of-tree builds can remove it either, at the risk of causing issues for other out-of-tree builds running at the same time. Just tell Python not to generate .pyc files: - call the script via python, don't use the sha-bang - thus, make the script non-executable, and remove the sha-bang Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Arnout Vandecappelle <arnout@mind.be> Cc: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support: fix typo in mkusersSamuel Martin2013-12-041-2/+2
| | | | | | | This patch fixes typos in the 'encode_password' function calls. Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* Makefile: fix out-of-tree builds with multiple targets with 'all'Yann E. MORIN2013-11-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | For out-of-tree builds, this use-case fails to build: $ make clean all This is because 'all' is filtered-out in the Makefile wrapper, since the wrapper itself has a 'all' target. The 'all' target is just the usual naming for the default target in a Makefile. In fact, the first target is the default one, so we can name it whatever we want. Rename the Makefile wrapper 'all' target to avoid name-clashing. Fixes #6644. Reported-by: Ryan Barnett <rjbarnet@rockwellcollins.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ryan Barnett <rjbarnet@rockwellcollins.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Ryan Barnett <rjbarnet@rockwellcollins.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
* support: trivial fixes (typos and minor rewording) in gen-manual-lists.pySamuel Martin2013-11-011-8/+7
| | | | | | | | | | [Thomas: added Thomas DS Acked-by, given at http://patchwork.ozlabs.org/patch/284719/, and made the additional typo fixes suggested by Thomas DS.] Signed-off-by: Samuel Martin <s.martin49@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
OpenPOWER on IntegriCloud