aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
Commit message (Collapse)AuthorAgeFilesLines
* fixup-makefile.pl: fixup when PKG_SOURCE is defined elsewhereYousong Zhou2018-12-181-1/+1
| | | | | Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com> (backported from eb6759cc786b9a5fe1425364fc54212a425ff0be)
* scripts: Replace obsolete POSIX tmpnam in slugimage.pl with File::Temp functionTed Hess2018-12-181-4/+4
| | | | | Signed-off-by: Ted Hess <thess@kitschensync.net> (backported from 7590c3c58f5e9d580c86da10473d1d29a2f081c9)
* script: ipkg-build: honour $SOURCE_DATE_EPOCHJo-Philipp Wich2018-11-081-1/+5
| | | | | | | | | | | | When the SOURCE_DATE_EPOCH environment variable is set, use it to override the timestamps of .ipk archive contents. This ensures that .ipk archives built in environments without SCM metadata (mainly the SDK) are reproducible between different runs. Ref: https://github.com/openwrt/packages/issues/6954 Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit d157a76c67bcb821d3ec8dcd4312390ef129a95a)
* scripts: bundle-libraries: fix logic flawJo-Philipp Wich2018-08-301-7/+6
| | | | | | | | | | | | Previous refactoring of the script moved the LDSO detection into a file-not-exists condition, causing onyl the very first executable to get bundled. Solve the problem by unconditionally checking for LDSO again. Fixes: 9030a78a71 ("scripts: bundle-libraries: prevent loading host locales") Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 5ebcd32997b6d10abcd29c8795a598fdcaf4521d)
* scripts: bundle-libraries: prevent loading host locales (FS#1803)Jo-Philipp Wich2018-08-301-5/+21
| | | | | | | | | | | | | | Binary patch the bundled glibc library to inhibit loading of host locale archives in order to avoid triggering internal libc assertions when invoking shipped, bundled executables. The problem has been solved with upstream Glibc commit 0062ace229 ("Gracefully handle incompatible locale data") but we still need to deal with older Glibc binaries for some time to come. Fixes FS#1803 Signed-off-by: Jo-Philipp Wich <jo@mein.io> (cherry picked from commit 9030a78a716b0a2eeed4510d4a314393262255c2)
* include/feeds.mk: rework generation of opkg distfeeds.confMatthias Schiffer2018-07-121-2/+3
| | | | | | | | Allow enabling/commenting/disabling each feed individually by using a tristate config symbol. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit 16035a7dd370671670693af9ae63368ee4dd731f)
* scripts/feeds: add src-dummy methodMatthias Schiffer2018-07-121-1/+6
| | | | | | | | | | The src-dummy method does not actually obtain any feed, but it can be used to insert addtional entries into the opkg distfeeds.conf. This is useful to make package feeds available to users without requiring the corresponding source feeds to be available during build. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit 6bdd5d8459cca7ceb93c841cccf61dc7ce830092)
* build: fix target metadata scan dependenciesFelix Fietkau2018-07-031-2/+2
| | | | | | | Move SCAN_DEPS to scan.mk to eliminate redundancy with scripts/feeds Add image/*.mk to SCAN_DEPS for targets to pick up newly added devices Signed-off-by: Felix Fietkau <nbd@nbd.name>
* env: only use color diffs on terminalsPhilip Prindeville2018-05-051-1/+1
| | | | | | | | When sending script/env diff's output to a file or pipeline, you don't want escape characters for ANSI color sequences fouling the byte stream. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* download.pl: Change OpenWrt mirrors to HTTPS.Rosen Penev2018-05-011-4/+4
| | | | | | These have supported HTTPS for quite a while. I have not seen any obvious breakage. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* download.pl: Change SourceForge address to HTTPS.Rosen Penev2018-05-011-1/+1
| | | | | | | | SourceForge has supported HTTPS for its downloads for a long time now. I have not been able to see any failures resulting from this change. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* scripts/feeds: add support for git feeds with submodulesFelix Fietkau2018-04-271-0/+6
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* scripts: bundle-libraries: fix build on OS X (FS#1493)Jo-Philipp Wich2018-04-261-0/+4
| | | | | | | | This allegedly fixes compilation of the library bundler preload library on Apple OS X. The resulting executables have not been runtime tested due to a lack of suitable test hardware. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* ipq40xx: add support for OpenMesh A62Sven Eckelmann2018-04-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * QCA IPQ4019 * 256 MB of RAM * 32 MB of SPI NOR flash (s25fl256s1) - 2x 15 MB available; but one of the 15 MB regions is the recovery image * 2T2R 2.4 GHz - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=20,variant=OM-A62 * 2T2R 5 GHz (channel 36-64) - QCA9888 hw2.0 (PCI) - requires special BDF in QCA9888/hw2.0/board-2.bin bus=pci,bmi-chip-id=0,bmi-board-id=16,variant=OM-A62 * 2T2R 5 GHz (channel 100-165) - QCA4019 hw1.0 (SoC) - requires special BDF in QCA4019/hw1.0/board-2.bin with bus=ahb,bmi-chip-id=0,bmi-board-id=21,variant=OM-A62 * multi-color LED (controlled via red/green/blue GPIOs) * 1x button (reset; kmod-input-gpio-keys compatible) * external watchdog - triggered GPIO * 1x USB (xHCI) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * 2x gigabit ethernet - phy@mdio3: + Label: Ethernet 1 + gmac0 (ethaddr) in original firmware + 802.3at POE+ - phy@mdio4: + Label: Ethernet 2 + gmac1 (eth1addr) in original firmware + 18-24V passive POE (mode B) * powered only via POE The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the factory image to the u-boot when the device boots up. The initramfs image can be started using setenv bootargs 'loglevel=8 earlycon=msm_serial_dm,0x78af000 console=ttyMSM0,115200 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(0:custom),64k(0:KEYS),15552k(inactive),15552k(inactive2)' tftpboot 0x84000000 openwrt-ipq40xx-openmesh_a62-initramfs-fit-uImage.itb set fdt_high 0x85000000 bootm 0x84000000 Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
* scripts: add EVA ramboot scriptValentin Spreckels2018-03-181-0/+37
| | | | | | | | | | | | Use the EVA bootloader to load a small linux system into the ram and boot it from there: ./scripts/flashing/eva_ramboot.py 192.168.178.1 path/to/initramfs-kernel.bin Signed-off-by: Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.DE> Acked-by: John Crispin <john@phrozen.org> [reworded commit message] Signed-off-by: Mathias Kresin <dev@kresin.me>
* build: Allow to change the FIT config section nameSven Eckelmann2018-03-171-4/+6
| | | | | | | | Some devices only boot when a special config is found in the image and completely ignore the default entry during the selection. These devices can now use the variable DEVICE_DTS_CONFIG in their device image definition. Signed-off-by: Sven Eckelmann <sven@narfation.org>
* scripts/metadata.pm: allow group-only Require-User specsMatthias Schiffer2018-02-261-2/+4
| | | | | | | | /lib/functions.sh can deal with Require-User specifications that only contain a group, but no user. Adjust metadata.pm to allow such specifications as well. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* build: cleanup leftover qconf filesAlif M. Ahmad2018-02-131-1/+1
| | | | | | | | | | ``make xconfig`` toplevel target will invoke ``make qconf`` inside ./scripts/config directory, which results a ``qconf`` executable. This commit removes leftover ``qconf`` executable during ``make config-clean``. Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
* build: bundle-libraries.sh: patch bundled ld.soJo-Philipp Wich2018-02-021-0/+13
| | | | | | | | | | | Remove references to /etc/, /lib/ and /usr/ from the bundled ld.so interpreter using simple binary patching. This is needed to prevent loading host system libraries such as libnss_compat.so.2 on foreign systems, which may result in ld.so inconsistency assertions. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* scripts/qemustart: more portable array operationYousong Zhou2018-01-311-4/+4
| | | | | | | | | | | | | | | | | | The following commands output 1,2,1,1 cmd0='a=("${a[@]}" 'a'); echo "${#a}"' cmd1='a+=('a'); echo "${#a}"' bash -c "$cmd0"; zsh -c "$cmd0" bash -c "$cmd1"; zsh -c "$cmd1" The following outputs 0,1,0,0 cmd2='f() { echo "$#"; }; f "${a[@]}"' cmd3="a=(); $cmd2" bash -c "$cmd2"; zsh -c "$cmd2" bash -c "$cmd3"; zsh -c "$cmd3" Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* 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>