aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* metadata: do not emit broken kconfig dependency statementsJo-Philipp Wich2018-01-141-1/+1
| | | | | | | | Prevent emitting broken dependency statements when resolving references to non existing packages to an empty provider list. Fixes: 47d6b05ad3 ("metadata: always resolve dependencies through provides list") Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* scripts/feeds: fix install of packages with different source/binary namesMatthias Schiffer2018-01-141-1/+1
| | | | | | | | The logic for choice between source and binary packages was reversed. Fixes: 52719c2b67af "metadata: scripts/feeds: distinguish between source and binary packages, resolve virtual dependencies" Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: improve code readability by using (s)printf instead of string ↵Matthias Schiffer2018-01-131-13/+13
| | | | | | interpolation Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* build: remove obsolete "package feature" featureMatthias Schiffer2018-01-132-48/+1
| | | | | | | | Package "features" seem to be unused for some time. In any case, custom Config.in snippets and package PROVIDES are a much more flexible way to express similar options. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: scripts/feeds: distinguish between source and binary packages, ↵Matthias Schiffer2018-01-132-70/+112
| | | | | | | | | | resolve virtual dependencies Properly resolve build depends to source packages and runtime depends to binary packages. Dependencies on virtual packages are resolved to the first provider now. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: always resolve dependencies through provides listMatthias Schiffer2018-01-133-46/+35
| | | | | | | | | | | Instead of adding virtual packages to the normal package list, keep a separate list for provides, make each package provide itself, and resolve all dependencies through this list. This allows to use PROVIDES to replace existing packages. Fixes FS#837. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: simplify generation of build depends from runtime dependsMatthias Schiffer2018-01-131-71/+41
| | | | | | | | | | | Runtime depends cannot have a buildtype suffix, and they never refer to source package names. In addition, this adds warnings about unsatisfiable dependencies. Furthermore, this change fixes the generation of conditional build dependencies for virtual packages provided by different source packages. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: handle target build depends together with host build dependsMatthias Schiffer2018-01-131-32/+28
| | | | | | | | | | | | | | Target build depends are similar to host build depends in that they refer to source packages rather than binary packages. Therefore, it makes sense to handle them together, rather than putting them in a list together with runtime depends and trying to figure out if the entries refer to source or to binary packages afterwards. This does lead to PKG_BUILD_DEPENDS entries referring to binary package names not working anymore, which requires some fixes in the package repositories. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* build: remove package preconfig featureMatthias Schiffer2018-01-132-55/+1
| | | | | | | This feature has been unused for years, and its scope is too limited to be actually useful. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: remove redundant fields from package hashMatthias Schiffer2018-01-133-8/+9
| | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: replace %subdir hash with a path field in source packagesMatthias Schiffer2018-01-132-22/+15
| | | | | | | Every single reference to subdir was concatenated with the source package name, so it makes sense to store the concatenated value instead. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: change pkg->{src} field to hold a referenceMatthias Schiffer2018-01-133-35/+34
| | | | | | | | We often want to access fields of a source packages through pkg->{src}. Allow accessing them directly instead of resolving the source hash through srcpackages. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: interate over source packages when generating MakefileMatthias Schiffer2018-01-132-26/+36
| | | | | | | | | | | | All build dependencies are between source packages. Interating over source rather than binary packages simplifies parts of the code and prepares further improvement. As a side effect, this changes the implicit default variant of a few packages (the first defined is used now instead of the lexicographically first). Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: move 'builddepends' from binary to source packagesMatthias Schiffer2018-01-133-21/+21
| | | | Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: move 'buildtypes' from binary to source packagesMatthias Schiffer2018-01-132-8/+9
| | | | | | | Build types are a property of source rather than binary packages. This is a preparation for followup cleanup. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: make srcpackage extensibleMatthias Schiffer2018-01-133-4/+6
| | | | | | | Turn the srcpackage values into hashes to allow storing more information than just binary package names. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* metadata: remove 'base-files' special caseMatthias Schiffer2018-01-131-1/+1
| | | | | | | Nothing explicitly depends on base-files, and even if it would, it would not cause any problems. Remove the unused special case. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* om-fwupgradecfg-gen.sh: add support for the A42Sven Eckelmann2018-01-131-4/+18
| | | | Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* combined-ext-image.sh: generate image in temp dirSven Eckelmann2018-01-131-6/+23
| | | | | | | | | | | | | The new build commands operate on the input image and use it again as output image. This conflicts with the way combined-ext-image.sh was operating. It required that input and output files are different files and and that it can write freely to the output file. This can be avoided when all intermediate build steps by combined-ext-image.sh are done in a temporary directory. The output file is then only overwritten in the last step. Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* scripts/package-metadata.pl: remove broken detection of self-dependenciesMatthias Schiffer2018-01-041-5/+0
| | | | | | | | | | | | | A self-dependency is not an error worth a warning; rather, it is very common: whenever there are dependencies between different binary packages originating from the same source package, such dependencies occur. Not actually generating dependency rules is correct, but already handled a few lines below. A typo prevented this redundant rule from working, which is the reason the warning was not actually printed. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* base-files: allow skipping of hash verificationJo-Philipp Wich2017-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | When calling a download target, hash verification is now completely skipped if we set PKG_HASH=skip. This allows to easily bump package version: $ make package/<mypackage>/download PKG_HASH=skip V=s $ make package/<mypackage>/check FIXUP=1 V=s This will download the new version of the package, and then automatically update PKG_HASH with the hash of the new version. Of course, it is still the responsibility of the packager to ensure that the new tarball is legitimate, because it is downloaded from a possibly untrusted source. Fixes: b30ba14e ("scripts/download.pl: fail loudly if provided hash is unsupported") Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org> Signed-off-by: Jo-Philipp Wich <jo@mein.io> Acked-by: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: John Crispin <john@phrozen.org>
* merge: targets: update image generation and targetsZoltan HERPAI2017-12-082-7/+7
| | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* merge: base: update base-files and basic configZoltan HERPAI2017-12-082-2/+2
| | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* scripts/config: add qconf files to .gitignoreAlif M. Ahmad2017-11-021-0/+6
| | | | | | | | | This commit adds qconf related files to .gitignore. The files to be tracked are qconf.cc, qconf.h, and images.c. The files to be ignored are qconf*.o, qconf*, qconf.moc, and .tmp_qtcheck. Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
* scripts/config: Add qconf target to MakefileAlif M. Ahmad2017-11-021-0/+56
| | | | | | | | | | qconf is kconfig UI utilizing QT toolkit. This makes it possible to use graphical interface interaction to configure LEDE build target. This commit adds qconf target to ./script/config/Makefile to be used by toplevel ``make xconfig`` later. Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
* scripts/config: add -DKBUILD_NO_NLS to CXXFLAGSFelix Fietkau2017-11-021-0/+1
| | | | | | Preparation for adding C++ code which needs the same flag Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts/config: import qconfAlif M. Ahmad2017-11-023-0/+2526
| | | | | | Import qconf.cc, qconf.h, and images.c from linux kernel 4.9.13 archive. Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
* treewide: fix shellscript syntax errors/typosLorenzo Santina2017-09-131-1/+1
| | | | | | | | | Fix multiple syntax errors in shelscripts (of packages only) These errors were causing many conditions to not working properly Signed-off-by: Lorenzo Santina <lorenzo.santina@edu.unito.it> [increase PKG_RELEASE, drop command substitution from directip.sh] Signed-off-by: Mathias Kresin <dev@kresin.em>
* scripts/download.pl: fail loudly if provided hash is unsupportedBaptiste Jonglez2017-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, if the provided hash is unsupported (length different from 32 or 64 bytes), we happily download the requested file without any kind of checksum verification. This is quite dangerous and may provide a false sense of security, because a single typo in the hash (e.g. one character deleted by mistake) may skip checksum verification entirely. Instead, fail immediately if we don't support the provided hash. In particular, if an external package repository decides to change the hash algorithm one day, we will now fail loudly instead of skipping checksum verification without complaints. Note: if some users of scripts/download.pl knowingly provide an empty hash because they don't need checksum verification, this change will break them. This does not seem to be the case currently, but if this feature is ever needed, an option should be added to download.pl instead of relying on the hash being empty. Fixes: eaa4eba10a89 ("scripts/download.pl: add SHA-256 support") Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
* scripts/dowload.pl: use glob to expand target dirZoltan Gyarmati2017-08-301-1/+1
| | | | | | | | | | | | | | If CONFIG_DOWNLOAD_FOLDER is set to for example "~/dl", the download script fails to create the .hash and .dl files with the following errors: Cannot create file ~/dl/dropbear-2017.75.tar.bz2.dl: No such file or directory sh: 1: cannot create ~/dl/dropbear-2017.75.tar.bz2.hash: Directory nonexistent If the tarball already exists in the ~/dl dir, it's properly found and used, so this issue only affects the download.pl script. This patch calls glob() on the target dir parameter, which will expand `~`. Signed-off-by: Zoltan Gyarmati <mr.zoltan.gyarmati@gmail.com>
* scripts/package-metadata.pl: inhibit compile deps on missing build typesJo-Philipp Wich2017-07-271-6/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a package declares a PKG_BUILD_DEPENDENCY or HOST_BUILD_DEPENDENCY on a not existing build type, the metadata script will emit a reference to an unresolvable build target in tmp/.packagedeps, causing the make process to fail hard in a way not catchable by the IGNORE_ERRORS mechanism. In a situation where a package "test-a" declares a build dependency "PKG_BUILD_DEPENDS:=test-b/host" while the Makefile of "test-b" does not implement a HostBuild, make fails with an unrecoverable error in the form: make[1]: Entering directory '...' make[1]: *** No rule to make target 'package/test-b/host/compile', needed by 'package/test-a/compile'. Stop. make[1]: Leaving directory '...' .../toplevel.mk:200: recipe for target 'package/test-a/compile' failed make: *** [package/test-a/compile] Error 2 Extend the metadata generation script to catch such unresolved references and emit a visable warning upon detection. After this change, the script will emit a warning similar to: WARNING: Makefile "package/test-a/Makefile" has a build dependency on "test-b/host" but "package/test-b/Makefile" does not implement a "host" build type Fixes a global build cluster outage which occured after the "python-cffi" feed package removed its HostBuild which the "python-cryptography" package build-depended on. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: bundle-libraries.sh: do not override argv[0] in inner exec callsJo-Philipp Wich2017-07-241-1/+3
| | | | | | | | | | | Only mangle argv[0] of the first executed process and leave the argument vector of subsequent invocations as-is to allow child programs to properly discover resources relative to their binary locations. Fixes "cc1" discovery when executing the host gcc through the bundled "ccache" executable. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* scripts/download.pl: Adjust URLsDaniel Engberg2017-07-211-5/+5
| | | | | | | | | | | | Internet2 isn't considered a trusted issuer meaning that https links to rit.edu will fail. The host mirror.csclub.uwaterloo.ca has a trusted SSL cert and peering is good so it can replace rit.edu without performance issues. Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net> [Jo-Philipp Wich: rewrapped commit message] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: fix invocation of bundled ld.so in SDK and ImagebuilderJo-Philipp Wich2017-07-211-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 72d751cba9 "build: rework library bundling" introduced a new helper binary "runas" whose sole purpose was mangling the argv vector passed to the actual called ELF image so that the renamed executable could obtain the proper name from argv[0]. This approach, however totally defeated the purpose of calling bundled ELF executables through the shipped ld.so loader since the execv() invocation performed by "runas" would cause the kernel the interprete the final program image through the system ELF loader again. To solve the problem, use an alternative approach of shipping a shared object "runas.so" which uses an ELF ".init_array" function pointer to obtain the argv[] vector of the to-be-executed main() function and mangle it in-place. The actual argv[0] value to use is communicated out-of-band using an environment variable "RUNAS_ARG0" by the shell wrapper script. The wrapper script also takes care of setting LD_PRELOAD to instruct the shipped ELF loader to preload the actual ELF program image with the "runas.so" helper library. Fixes FS#909. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* scripts/gen_image_generic.sh: drop NOGRUB variableStijn Tintel2017-07-141-2/+0
| | | | | | It's not used since commit 816a9b30f683b8376423ff029d40e0e4a2701026. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* scripts/gen_image_generic.sh: move from x86/imageStijn Tintel2017-07-141-0/+37
| | | | | | The script can also be useful for other targets. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* scripts: make all scripts executableStijn Tintel2017-07-142-0/+0
| | | | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* scripts/openbsd.sh: remove scriptStijn Tintel2017-07-141-24/+0
| | | | | | | | Commit 6f5f328003128c95af2ffb3876eeadb473c463a0 removed freebsd.sh because it was outdated and bad practice. Let's be consistent and remove openbsd.sh as well. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* scripts/package-metadata.pl: parse and validate field Require-UserYousong Zhou2017-06-182-1/+83
| | | | | | | | | | | | | The script will now detect uid/gid collision and can generate a table of current allocation ./scripts/package-metadata.pl usergroup tmp/.packageinfo \ | sort -k 1,1r -k 3,3n \ | column -t This should ensure that no collision will happen for each single build Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* scripts/download.pl: print the command used to download filesFelix Fietkau2017-05-251-0/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts: Probe external toolchains for libthread-dbFlorian Fainelli2017-05-111-0/+1
| | | | | | | libthread-db is a package that can be configured for external toolchains, so let's have the script probe for it. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
* scripts: Probe external toolchains for libgompFlorian Fainelli2017-05-111-1/+2
| | | | | | | Now that libgomp can be a package, probe external toolchains for that library. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
* build: remove absolute path to perl and replace with /usr/bin/env perlBastian Köcher2017-05-024-4/+7
| | | | Signed-off-by: Bastian Köcher <git@kchr.de>
* scripts/qemustart: initial versionYousong Zhou2017-04-231-0/+281
| | | | | | | | The script can be used to quickly spin up QEMU virtual machines with lan and wan network. Please read the initial part of the script for instructions about how to configure host machine Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* scripts/download.pl: fix error message on hash mismatchFelix Fietkau2017-04-041-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts: only generate config from feature flag if fully matchHauke Mehrtens2017-03-201-31/+31
| | | | | | | | | Without this change the code checked if the string was contained in the feature option and not if the string matches the complete word. This only removes the nand option from the omap24xx target, the other changes are only removing options which were added twice. Signed-off-by: Hauke Mehrtens <hauke.mehrtens@intel.com>
* scripts/feeds: Reuse TOPDIR if defined in environmentMichal Sojka2017-02-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The feeds script sets value of TOPDIR in a way that is inconsistent with how toplevel Makefile sets it. The inconsistency manifests when I use a "build directory" with symlinks to LEDE source (see below). When make is invoked in such a directory, make's TOPDIR variable is set to that directory, whereas scripts/feeds sets TOPDIR to the top of LEDE source, which results in creating feeds directory inside the LEDE source instead of in the build directory. This patch changes the script so that it reuses the TOPDIR value form the environment if it exists. The result is that 'make package/symlinks' correctly fetches feeds to the build directory instead in the source. I use the following commands to create the build directory: ln -s $SRC/config config ln -s $SRC/Config.in Config.in ln -s $SRC/feeds.conf.default feeds.conf.default ln -s $SRC/include include ln -s $SRC/Makefile Makefile mkdir package ln -s $SRC/package/base-files package/base-files ln -s $SRC/package/boot package/boot ln -s $SRC/package/devel package/devel ln -s $SRC/package/firmware package/firmware ln -s $SRC/package/kernel package/kernel ln -s $SRC/package/libs package/libs ln -s $SRC/package/Makefile package/Makefile ln -s $SRC/package/network package/network ln -s $SRC/package/system package/system ln -s $SRC/package/utils package/utils ln -s $SRC/rules.mk rules.mk ln -s $SRC/scripts scripts ln -s $SRC/target target ln -s $SRC/toolchain toolchain ln -s $SRC/tools tools This allows me to easily test changes in LEDE on multiple targets. Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
* gen-dependencies.sh: fix handling variations in "file" outputFelix Fietkau2017-02-191-1/+1
| | | | | | On some systems, file adds ", with debug info" after "not stripped" Signed-off-by: Felix Fietkau <nbd@nbd.name>
* rstrip.sh: fix handling variations in "file" outputFelix Fietkau2017-02-191-1/+1
| | | | | | On some systems, file adds ", with debug info" after "not stripped" Signed-off-by: Felix Fietkau <nbd@nbd.name>
* feeds: add option to force feed update despite modified filesJo-Philipp Wich2017-02-151-9/+26
| | | | | | | | Implement a new flag "-f" for the feeds update command which causes the script to fall back to a more agressive git update strategy in case there are locally modified files in the feeds directory. Signed-off-by: Jo-Philipp Wich <jo@mein.io>