aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* build: add buildbot specific config option for setting defaultsFelix Fietkau2017-02-141-1/+4
| | | | | | | | | | This can be used to tweak the buildbot behavior without having to change buildbot's configuration. It will also allow us to add more aggressive clean steps (e.g. on toolchain changes), which would break developers' workflows if enable by default. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts/om-fwupgradecfg-gen.sh: add support for the A60Sven Eckelmann2017-02-141-2/+2
| | | | Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
* build: remove libc version suffix from build/staging directoriesFelix Fietkau2017-02-071-2/+2
| | | | | | Our supported libcs are ABI compatible across version upgrades Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts: get_source_date_epoch.sh: fix mercurial support, add mtime fallbackJo-Philipp Wich2017-02-021-2/+7
| | | | | | | | | | Add a fallback case to get_source_date_epoch.sh which reports the modification time of the script itself in case there is no SCM information available, e.g. when downloading .tar.gz or .zip tarballs produced by Github. Also fix the mercurial case while we're at it. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* scripts/getver.sh: append short git hash based on upstream commitMagnus Kroken2017-02-011-1/+2
| | | | | | | | | | | The short git hash suffix printed by getver.sh is taken from the latest local commit, change this to use the hash from latest upstream commit if available. This is considered the intended behavior based on commit message a642a11faca87e2a7bddc1fadb54253e2fc26e84, introducing getver.sh. Signed-off-by: Magnus Kroken <mkroken@gmail.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
* download.pl: fix detecting download errors with curlFelix Fietkau2017-01-311-1/+1
| | | | | | Avoid treating error pages as successfully downloaded content Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts/package-metadata.pl: fix overriding conditional dependencies with ↵Felix Fietkau2017-01-111-0/+2
| | | | | | | | | | | conditional select Conditional dependencies use the '(!cond) || dep' syntax, whereas conditional select uses 'dep if cond'. Add an extra check to suppress emitting a conditional if an equal conditional select already exists. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: rework library bundlingJo-Philipp Wich2017-01-101-27/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework the bundle-libraries.sh implementation to use a more robust approach for executing host binaries through the shipped ELF loader and libraries. The previous approach relied on symlinks pointing to a wrapper script which caused various issues, especially with multicall binaries as the original argv[0] name was not preserved through the ld.so invocation. Another down- side was the fact that the actual binaries got moved into another directory which caused executables to fail looking up resources with paths relative to the executable location. The new library wrapper implements the following improvements: - Instead of symlinks pointing to a common wrapper, each ELF executable is now replaced by a unqiue shell script which retains the original program name getting called - Instead of letting ld.so invoke the ELF executable directly, launch the final ELF binary through a helper program which fixes up the argv[0] argument for the target program - Support sharing a common location for the bundled libraries instead of having one copy in each directory containing wrapped binaries Finally modify the SDK build to wrap the staging_dir and toolchain binaries which allows to use the SDK on systems with a different glibc version. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* build: use mkhash to replace various quirky md5sum/openssl callsFelix Fietkau2017-01-055-14/+10
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add a small standalone utility for calculating md5/sha256 hashFelix Fietkau2017-01-051-0/+827
| | | | | | | | This will be used to simplify the build system code for checking hashes. Instead of using various variants of md5sum / openssl, use one simple utility for all of them Signed-off-by: Felix Fietkau <nbd@nbd.name>
* download.pl: use curl in preference to wgetBrian J. Murrell2017-01-031-4/+22
| | | | | | | | | | | | | | | Because wget doesn't know how to do Negotiate authentication with a proxy and curl does, use curl if it's present. The user is expected to have a ~/.curlrc that sets the options necessary for any proxy authentication. A ~/.curlrc is completely optional however and curl will work in exactly the same manner as wget without one. Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca> [Jo-Philipp Wich: Rework code to detect curl usability by checking --version, Use vararg style open() to bypass the shell when downloading, Use Text::ParseWords to decompose env vars into arguments] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* package/Makefile & ipkg-make-index.sh: add full package data listAlberto Bursi2016-12-261-1/+1
| | | | | | | | | | | | | | | | | | | The external script used to generate the package lists for the LEDE wiki's table of packages [1] and package indexes [2] requires a "Source:" field in the package lists to find package makefiles. The package makefiles are used to read the package's Category and Submenu. The "Source:" field was removed in commit b4aa3c899cbf1f81cd8a1ea197481ac84a9d646e to reduce package list sizes and lessen opkg issues in low ram devices. Add a separate package list file with full data to be used by the wiki's script. It's called Packages.manifest and isn't compressed as it's not necessary. 1. https://lede-project.org/packages/start 2. https://lede-project.org/packages/index/start Signed-off-by: Alberto Bursi <alberto.bursi@outlook.it>
* scripts/update-package-md5sum: remove file, it is obsoleted by make check ↵Felix Fietkau2016-12-171-38/+0
| | | | | | FIXUP=1 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add FIXUP option for make checkFelix Fietkau2016-12-171-0/+135
| | | | | | | | This will attempt to automatically fix common mistakes like using MD5 instead of SHA256, using the MD5SUM variable instead of HASH, or even a missing mirror file hash. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* download.pl: check for existing file before the first download attemptFelix Fietkau2016-12-161-2/+1
| | | | | | | | | | | | In the build system, flock will prevent multiple concurrent downloads for the same file. However, if one download request for the same file is waiting for another one to finish, it will result in downloading the same file twice consecutively. Prevent this issue by exiting immediately if the file has already been downloaded Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipkg-make-index.sh: drop a few non-essential fieldsFelix Fietkau2016-12-141-1/+1
| | | | | | Saves some more space on the package index Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ipkg-make-index.sh: drop md5sum from package indexFelix Fietkau2016-12-141-3/+0
| | | | | | | We have switched opkg to sha256 a long time ago, and shrinking package lists is useful for systems that are running low on RAM Signed-off-by: Felix Fietkau <nbd@nbd.name>