Commit Graph

849 Commits (1634461bd208f4bd108ea5c3d3f1cf9eb56d4a7e)

Author SHA1 Message Date
Sven Eckelmann 0b20490207 ipq40xx: add support for OpenMesh A62
* 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>
6 years ago
Valentin Spreckels 7a303fe5d1 scripts: add EVA ramboot script
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>
6 years ago
Sven Eckelmann 1b773a46c2 build: Allow to change the FIT config section name
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>
6 years ago
Matthias Schiffer 884c9575e1
scripts/metadata.pm: allow group-only Require-User specs
/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>
6 years ago
Alif M. Ahmad 02a1a8af95 build: cleanup leftover qconf files
``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>
6 years ago
Jo-Philipp Wich a9a43f3d79 build: bundle-libraries.sh: patch bundled ld.so
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>
6 years ago
Yousong Zhou aa66aa0c9a scripts/qemustart: more portable array operation
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>
6 years ago
Jo-Philipp Wich a405a93fa6 metadata: do not emit broken kconfig dependency statements
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>
6 years ago
Matthias Schiffer 06d51dbb9e
scripts/feeds: fix install of packages with different source/binary names
The logic for choice between source and binary packages was reversed.

Fixes: 52719c2b67 "metadata: scripts/feeds: distinguish between source
and binary packages, resolve virtual dependencies"
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Matthias Schiffer de0ccd3532
metadata: improve code readability by using (s)printf instead of string interpolation
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Matthias Schiffer 4bb54ed15e
build: remove obsolete "package feature" feature
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>
6 years ago
Matthias Schiffer 52719c2b67
metadata: scripts/feeds: distinguish between source and binary packages, 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>
6 years ago
Matthias Schiffer 47d6b05ad3
metadata: always resolve dependencies through provides list
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>
6 years ago
Matthias Schiffer 565de8b8a8
metadata: simplify generation of build depends from runtime depends
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>
6 years ago
Matthias Schiffer 5b479f7dcf
metadata: handle target build depends together with host build depends
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>
6 years ago
Matthias Schiffer 3abf663c22
build: remove package preconfig feature
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>
6 years ago
Matthias Schiffer 423ec18116
metadata: remove redundant fields from package hash
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Matthias Schiffer f0c702f124
metadata: replace %subdir hash with a path field in source packages
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>
6 years ago
Matthias Schiffer 504cb913eb
metadata: change pkg->{src} field to hold a reference
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>
6 years ago
Matthias Schiffer 47f292ff78
metadata: interate over source packages when generating Makefile
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>
6 years ago
Matthias Schiffer b2ab9c9d33
metadata: move 'builddepends' from binary to source packages
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Matthias Schiffer 39be6e7f19
metadata: move 'buildtypes' from binary to source packages
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>
6 years ago
Matthias Schiffer 19577582e4
metadata: make srcpackage extensible
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>
6 years ago
Matthias Schiffer 1a2b5eb7ac
metadata: remove 'base-files' special case
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>
6 years ago
Sven Eckelmann b02fa3336b om-fwupgradecfg-gen.sh: add support for the A42
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
6 years ago
Sven Eckelmann 1a384ac0b5 combined-ext-image.sh: generate image in temp dir
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>
6 years ago
Matthias Schiffer 0b28cc56d4
scripts/package-metadata.pl: remove broken detection of self-dependencies
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>
6 years ago
Jo-Philipp Wich f4b9d9d6f1 base-files: allow skipping of hash verification
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>
6 years ago
Zoltan HERPAI 7b5c989ab9 merge: targets: update image generation and targets
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years ago
Zoltan HERPAI 34bbbbf9c3 merge: base: update base-files and basic config
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years ago
Alif M. Ahmad b1501a684b scripts/config: add qconf files to .gitignore
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>
7 years ago
Alif M. Ahmad ff43c03c14 scripts/config: Add qconf target to Makefile
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>
7 years ago
Felix Fietkau 349bb6e663 scripts/config: add -DKBUILD_NO_NLS to CXXFLAGS
Preparation for adding C++ code which needs the same flag

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Alif M. Ahmad 96eb96c3f0 scripts/config: import qconf
Import qconf.cc, qconf.h, and images.c from linux kernel 4.9.13 archive.

Signed-off-by: Alif M. Ahmad <alive4ever@live.com>
7 years ago
Lorenzo Santina fd84ecda7d treewide: fix shellscript syntax errors/typos
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>
7 years ago
Baptiste Jonglez b30ba14e2a scripts/download.pl: fail loudly if provided hash is unsupported
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: eaa4eba10a ("scripts/download.pl: add SHA-256 support")

Signed-off-by: Baptiste Jonglez <git@bitsofnetworks.org>
7 years ago
Zoltan Gyarmati 0a761fe8ef scripts/dowload.pl: use glob to expand target dir
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>
7 years ago
Jo-Philipp Wich bf5d32af2a scripts/package-metadata.pl: inhibit compile deps on missing build types
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>
7 years ago
Jo-Philipp Wich 9e64874fb2 build: bundle-libraries.sh: do not override argv[0] in inner exec calls
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>
7 years ago
Daniel Engberg 99c4295126 scripts/download.pl: Adjust URLs
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>
7 years ago
Jo-Philipp Wich ef1cafa736 build: fix invocation of bundled ld.so in SDK and Imagebuilder
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>
7 years ago
Stijn Tintel 6a8cbc08c0 scripts/gen_image_generic.sh: drop NOGRUB variable
It's not used since commit 816a9b30f6.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Stijn Tintel a576ed5437 scripts/gen_image_generic.sh: move from x86/image
The script can also be useful for other targets.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Stijn Tintel c2a11bc8e4 scripts: make all scripts executable
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
7 years ago
Stijn Tintel cf96453ac9 scripts/openbsd.sh: remove script
Commit 6f5f328003 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>
7 years ago
Yousong Zhou 80d9ec5d3d scripts/package-metadata.pl: parse and validate field Require-User
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>
7 years ago
Felix Fietkau cbe0a7ecc0 scripts/download.pl: print the command used to download files
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Florian Fainelli 6704410b15 scripts: Probe external toolchains for libthread-db
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>
7 years ago
Florian Fainelli 08fb61d316 scripts: Probe external toolchains for libgomp
Now that libgomp can be a package, probe external toolchains for that
library.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
7 years ago
Bastian Köcher 5378c85677 build: remove absolute path to perl and replace with /usr/bin/env perl
Signed-off-by: Bastian Köcher <git@kchr.de>
7 years ago
Yousong Zhou 50fcfd4b65 scripts/qemustart: initial version
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>
7 years ago
Felix Fietkau 2fd1503378 scripts/download.pl: fix error message on hash mismatch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Hauke Mehrtens d5a770f2c1 scripts: only generate config from feature flag if fully match
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>
7 years ago
Michal Sojka b1f102b03e scripts/feeds: Reuse TOPDIR if defined in environment
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>
7 years ago
Felix Fietkau 663f2a0864 gen-dependencies.sh: fix handling variations in "file" output
On some systems, file adds ", with debug info" after "not stripped"

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau b9b681c067 rstrip.sh: fix handling variations in "file" output
On some systems, file adds ", with debug info" after "not stripped"

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Jo-Philipp Wich 3bfcd21e4b feeds: add option to force feed update despite modified files
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>
7 years ago
Felix Fietkau 9dcb921d90 build: add buildbot specific config option for setting defaults
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>
7 years ago
Sven Eckelmann 8cc4d1e27b scripts/om-fwupgradecfg-gen.sh: add support for the A60
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>
7 years ago
Felix Fietkau f55c29e4c7 build: remove libc version suffix from build/staging directories
Our supported libcs are ABI compatible across version upgrades

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Jo-Philipp Wich 68bef935d5 scripts: get_source_date_epoch.sh: fix mercurial support, add mtime fallback
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>
7 years ago
Magnus Kroken 289f2a8ce3 scripts/getver.sh: append short git hash based on upstream commit
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 a642a11fac,
introducing getver.sh.

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 74c09e714e download.pl: fix detecting download errors with curl
Avoid treating error pages as successfully downloaded content

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau cfd83555fc scripts/package-metadata.pl: fix overriding conditional dependencies with 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>
7 years ago
Jo-Philipp Wich 72d751cba9 build: rework library bundling
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>
7 years ago
Felix Fietkau 84bd74057f build: use mkhash to replace various quirky md5sum/openssl calls
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau dad48c6438 build: add a small standalone utility for calculating md5/sha256 hash
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>
7 years ago
Brian J. Murrell fc6b6f4583 download.pl: use curl in preference to wget
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>
7 years ago
Alberto Bursi c24172cad1 package/Makefile & ipkg-make-index.sh: add full package data list
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
b4aa3c899c
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>
7 years ago
Felix Fietkau 78a1b6e880 scripts/update-package-md5sum: remove file, it is obsoleted by make check FIXUP=1
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau d49059693b build: add FIXUP option for make check
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>
7 years ago
Felix Fietkau 651bc94df4 download.pl: check for existing file before the first download attempt
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>
7 years ago
Felix Fietkau b4aa3c899c ipkg-make-index.sh: drop a few non-essential fields
Saves some more space on the package index

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 34c2b3de66 ipkg-make-index.sh: drop md5sum from package index
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>
7 years ago
Jo-Philipp Wich a642a11fac scripts: getver.sh: append Git short hash to revision
Change getver.sh to append a short Git commit hash to the end of the artifical
revision number. This way we still have order- and comparable commit numbers
but also a direct relation to the Git commit.

The new output format will look like "r2400+2-882472e" for dirty trees or like
"r2402-882472e" for clean ones.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Mathias Kresin 59261cbf38 docs: remove all refrences in Makefiles/scripts
The SDK Makefile still trys to copy the docs folder which was removed
with 882f4d2d63. This causes an SDK build
error.

All other removals are just cleanup.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Rafał Miłecki bf3d92f0cd scripts/getver.sh: treat all commits as local if can't find upstream
If something goes wrong and script can't find upstream revision it will
return something like:
r2220
which looks like a valid upstream revision 2220. We cant' distinguish it
from e.g. 2200 upstream commits and 20 local ones.

The new format still provides revision number but also points clearly
that is may be not the upstream one:
r0+2220

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin < john@phrozen.org>
8 years ago
Rafał Miłecki 0a6439154a scripts/feeds: use git rev-parse for getting revision
It provides simpler output so we don't need extra head and cut commands.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki 4f7947dab8 scripts/feeds: display "X" as revision of uninitialized feeds
So far we were displaying "local" which could be misinterpreted. It
wasn't possible e.g. to say if src-link feed was initialized or not.
Hopefully "X" makes (a bit) more sense.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Rafał Miłecki a2944a0c09 scripts/feeds: use 10 chars for feed name column width
It's always hard to find a reasonable width that will make everyone
happy. This one at least makes "telephony" (one of default feeds) name
fit the column and hopefully isn't too big.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 years ago
Jo-Philipp Wich 12d15fa8a5 scripts/package-metadata.pl: honour DEFAULT_VARIANT
So far, package-metadata.pl always considered the first provider of a virtual
package to be the default variant which might deviate from what buildroot
considers to be the default.

Change the Kconfig dependency / select code generation for virtual package
providers to consider the DEFAULT_VARIANT to be the primary provider and only
fall back to the first provider if no default variant was explicitely tagged.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich f64360c7ca scripts/package-metadata.pl: fix handling of virtual (PROVIDES) depends
Currently the code emitting dependencies for provide candidates is overwriting
the specification calculated by the previous conditional dependency handling
code, rendering dependencies on virtual PROVIDES packages in conjunction with
conditional dependencies unusable.

Instead of overwriting, append the PROVIDES dependency spec in order to fix
using DEPENDS on virtual provider packages in conjunction with conditions.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Daniel Engberg 6f5f328003 scripts/freebsd.sh: Remove script
This is outdated and bad practice,  general dependencies should be documented and leave the rest up to the user.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Karl Palsson c511795f47 scripts: case insensitive sort device names
When selecting devices from the Target Devices menu, the brand choices
of naming makes it confusing to find particular devices by name, as the
sorting is case sensitve.  AirTight came after ALFA, and devolo and
jjPlus both came after Zyxel.

This does _not_ apply to the Target Profile list, as that includes
"Default - all profiles" inside the profile list.

Signed-off-by: Karl Palsson <karlp@etactica.com>
8 years ago
Karl Palsson 5dc56b4123 scripts: add help text for some generated KConfigs
TARGET_MULTI_PROFILE and TARGET_PER_DEVICE_ROOTFS get some help text to
try and clarify their behaviour.

Signed-off-by: Karl Palsson <karlp@etactica.com>
8 years ago
Zefir Kurtisi cf458de382 scripts: fix build warning when overriding packages
If core packages are overridden, CONFIG_OVERRIDE_PKGS is set
based on the scan order of packages, which eventually causes
that config value to be modified on each build and with
that causes the build process to warn for configuration
being out of sync.

This commit changes the CONFIG_OVERRIDE_PKGS to be sorted
and prevents that false warning.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
8 years ago
Mathias Kresin 82b8eaa89f scripts/diffconfig.sh: fix output if TARGET_PER_DEVICE_ROOTFS is set
diffconfig show packages selected as dependencies of
TARGET_PER_DEVICE_ROOTFS as individual selected.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Matthias Schiffer e916579340
image: allow specifying additional packages for device-specific rootfs
Add a new option to each device in multi-profile mode, allowing to provide
a list of packages to add or remove. In case of added packages, the user
must take care that these are selected to be built.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Matthias Schiffer 6177b649ca
scripts/package-metadata.pl: fix generation of dependencies on virtual packages
Dependencies on purely virtual packages (satisfied by PROVIDES) that were
not using "selects" ("+" flag) would be prepended with the prefix
"PACKAGE_" twice, breaking the first alternative.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
8 years ago
Felix Fietkau a84a74f618 scripts/ubinize-image.sh: add support for adding custom partitions
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jo-Philipp Wich 3a3424981c scripts: ipkg-build: do not require git or svn
Move the "which svn" and "which git" calls next to the timestamp commands
using those tools to not prematurely fail on systems where svn or git are
not present.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Matteo Croce 1645abffea kernel: add plan 9 fs package
9pfs is used by kvm to share files between host and guest,
add proper config option to enable it.

Signed-off-by: Matteo Croce <matteo.croce@canonical.com>
8 years ago
Felix Fietkau 9bfa6971ae scripts/config: properly handle select on symbols with unmet direct dependencies
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 2d7e602381 scripts/config: sync with latest linux upstream
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Hauke Mehrtens 34bffe5806 scripts: fix remote-gdb with CONFIG_BUILD_SUFFIX
Fix the scripts/remote-gdb script when CONFIG_BUILD_SUFFIX is set.
CONFIG_BUILD_SUFFIX extends the name of the folder build_dir/target*

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 years ago
Jo-Philipp Wich db49dd894e build: rename sysupgrade-nand to sysupgrade-tar
Now that the "sysupgrade-nand" step is used by non-NAND targets as well,
rename it to "sysupgrade-tar" to make it more generic.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau f4ce133ccf build: add option to enable all profiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 76341cfc5f build: add support for per-device rootfs based on device profile packges
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jonas Gorski efdd3bf5fb scripts/getver.sh: fix older git versions from printing stuff to stdout
Older git versions seem output the original argument to stdout if there
is no upstream, presumably because they try to do things with it
internally. This can be prevented by passing --verify to it, which
should be safe on newer git versions.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Felix Fietkau 7ed215437c scripts/getver.sh: stop relying on the reboot tag
It may not be present when cloning a staging tree or another fork

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jonas Gorski 6f86d2e2ab scripts/getver.sh: fix one more wc -l call
The revision to hash conversion was missed when fixing up the script.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski 4eb5aad667 scripts/getver.sh: try to get branch/upstream automatically
Instead of assuming master is the current branch and origin the right
upstream, try to get both dynamically. If the current branch is not
tracking any upstream, use the origin of the master branch.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Felix Fietkau c19381dfca scripts/getver.sh: fix revision number on BSD/MacOS
Strip leading whitespace from wc -l output

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Jonas Gorski f1765277ba scripts/getver.sh: avoid use of git rev-list --count
This is not a valid option in older git version, used in e.g. RHEL6.

Reported-by: Steven Haigh <netwiz@crc.id.au>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski 15b88df87f scripts/getver.sh: improve revision output
Change the revision output to r<upstream-revision>+<local commits> so
it is easier to get the base revision (and see if there are local
commits).

Example:
$ ./scripts/getver.sh
r794+3
$

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski 1001b5d77c scripts/getver.sh: allow conversion between git hash and revision
Add code allowing easy conversion between git commit ids and revisions.

Example:

$ ./scripts/getver.sh
r792
$ ./scripts/getver.sh r123
b7fc892eb5
$ ./scrpts/getver.sh b7fc892eb5
r123

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Jonas Gorski 575be9d182 scripts/getver.sh: simplify revision calculation
Use git rev-list --count to get the revision number.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Felix Fietkau d8dbd33eba scripts/package-metadata.pl: fix kmod pakage dependencies within the SDK
Instead of ignoring all metadata for package/kernel/linux, process it
and only suppress emitting config data to tmp/.config-package.in

This ensures that packages that select kmod-* packages can inherit their
depdendencies.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau b80dfe4cde scripts/diffconfig.sh: fix handing of CONFIG_TARGET_MULTI_PROFILE
Fixes FS#43

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Sergey Sergeev 17ee6bb8f3 tools: add kernel2minor utility for Mikrotik devices
This patch adds support of Mikrotik yaffs2 filesystem image for kernel file
and tools/kernel2minor package.
We neede this to boot kernel through RouterBoot on new Mikrotik NOR flash devices.

Signed-off-by: Sergey Sergeev <adron@yapic.net>
8 years ago
Daniel Dickinson 34527688fc scripts/feeds: Prevent .config autocreation
When using scripts/feeds upgrade the .config needs to be
updated but the code to do so was also autocreating a
.config if one didn't exist.  This is counter-productive
when you have not yet used menuconfig (or other config targets)
because things like selecting or deselecting CONFIG_ALL
(to build all package by default) only works if the
package selection has not already been done via an
existing .config selection.

Signed-off-by: Daniel Dickinson <lede@daniel.thecshore.com>
8 years ago
Jo-Philipp Wich df18b3756f scripts: feeds: fix version detection for Make >= 4.2.1
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
John Crispin 30acacb0af config: add a small_flash feature
this causes KALLSYMS to be off by default

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Jo-Philipp Wich 24a7ccb056 treewide: replace jow@openwrt.org with jo@mein.io
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Felix Fietkau 7eeb254cc4 treewide: replace nbd@openwrt.org with nbd@nbd.name
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau f8ebbbc568 build: implement support for selecting multiple device profiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 9ae952cf8c build: split scripts/metadata.pl into target-metadata.pl and package-metadata.pl
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Daniel Engberg 8372a7f922 download.pl: Rework URLs
Provide HTTPS URL when possible, try to keep 8 mirrors per entry and spread
over several locations of the world. Since most active contributors are in
US/CA and/or EU prioritize mirrors that are within those regions if possible.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Petr Štetiar e0b241bb48 scripts/download.pl: Use CDN for kernel downloads
More info at https://www.kernel.org/introducing-fastly-cdn.html

Signed-off-by: Petr Štetiar <ynezz@true.cz>
8 years ago
Daniel Dickinson c19b7aaac5 script/symlink-tree.sh: Fix missing config dir
Apparently symlink-tree has not been used in quite some time as it
fails to symlink the always required config dir

Also, if we pulled from git but .git is missing we get
many error messages on the symlinked tree without this
patch (which symlinks .git, if present)

Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
8 years ago
Felix Fietkau f4c4d501e4 build: remove profile kernel/build system config override support
It has been unused for years

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Syrone Wong e8bc0834e7 scripts/ipkg-build: fix deprecated GZIP environment variable warning
According to gzip 1.7 release note:

The GZIP environment variable is now obsolescent; gzip now warns if
it is used, and rejects attempts to use dangerous options or operands.
You can use an alias or script instead.

Fix this warning by using pipe instead

Signed-off-by: Syrone Wong <wong.syrone@gmail.com>
8 years ago
Felix Fietkau 0d10ada19c scripts/metadata.pl: add support for generating profile make code for the image builder
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 111285e742 download.pl: use http://sources.lede-project.org as download mirror
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 4a31037a34 build: avoid including profiles/*.mk
Generate the active profile name in menuconfig context

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 91799d5198 metadata.pl: fix target profile sorting check
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 1189af85fd metadata.pl: add support for forcing sorting of profiles
Used to mix device profiles (specified in the image makefile) with
regular target profiles.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 6ddca3a361 target.mk: remove the unused Target-Path field
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 4a3348ef09 metadata.pl: add support for selecting packages available only via PROVIDES
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
John Crispin 797fb8a302 scripts: add "r" to revision
343c3be454 accidentially removed the "r"

Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Iblis Lin d9a0a8c78f scripts: avoid hard-coded paths in scripts
Signed-off-by: Iblis Lin <e196819@hotmail.com>
8 years ago
Jo-Philipp Wich 941fc5e8c8 global: introduce ALL_NONSHARED symbol
Introduce a new symbol ALL_NONSHARED which selects all non-sharable packages
by default. This option is mainly intented for buildbot setups to build the
target dependant software subset only.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich bf4bfd8ccc scripts: remove "Package-Subdir" metadata handling
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 9a04a80677 scripts: metadata: use the new "Repository" field
Switch to the new "Repository" metadata field to populate tmp/.packagesubdirs

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 7322cca9fa scripts: metadata: add CONFIG_TARGET_SUBTARGET symbol
Add a new string symbol "CONFIG_TARGET_SUBTARGET" which contains the name of
the chosen subtarget or "generic" if there are no subtargets available.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Álvaro Fernández Rojas 694f060550 download: add @GITHUB download facility
Define a new alias (@GITHUB) for downloading raw files from github repos.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
8 years ago
John Crispin fa69553900 branding: add LEDE branding
Signed-off-by: John Crispin <blogic@openwrt.org>
8 years ago
John Crispin 343c3be454 scripts/getver.sh: generate revision relative to the reboot tag
Signed-off-by: John Crispin <blogic@openwrt.org>
8 years ago
Vasilis Tsiligiannis b09848cd25 scripts/getver.sh: Use 'git-rev-parse' to detect if tree lies in Git repository
Path to the Git repository directory can be overriden by using the '$GIT_DIR'
environment variable. This patch improves detection of Git repository by using
'git-rev-parse', which respects '$GIT_DIR' environment variable, instead of just
checking the existence of '.git' directory.

Signed-off-by: Vasilis Tsiligiannis <acinonyx@openwrt.gr>

SVN-Revision: 49165
8 years ago
John Crispin a910a2cdc7 scripts/om-fwupgradecfg-gen.sh: add support for the OM5P-AC
Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49143
8 years ago
John Crispin 8583cbe26a scripts/om-fwupgradecfg-gen.sh: Generate sha256sum for uboot verification
Future Open Mesh u-boot versions are changing the check of the image files
(vmlinux, rootfs) from md5 to sha256. Having both in them should be enough
to ensure backward and forward compatibility.

Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>

SVN-Revision: 49140
8 years ago
John Crispin 5c408ede6c download: add @GITHUB download facility
Define a new alias (@GITHUB) for downloading raw github repository files

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

SVN-Revision: 49138
8 years ago
Felix Fietkau 9a94538272 scripts/download.pl: fix sha256 hash command (#21931)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48809
8 years ago
Felix Fietkau 86625a148a scripts/strip-kmod.sh: remove a few extra sections to slightly reduce kernel module size
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48608
8 years ago
Jo-Philipp Wich 78e5e56201 scripts: fix GNU data invocation
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48594
8 years ago
Felix Fietkau 18ba1305d5 scripts/get_source_date_epoch.sh: for SVN use a variant that is compatible with older versions
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48593
8 years ago
Felix Fietkau 64ec9dc2a1 scripts/portable_date.sh: fix parsing of date strings on non-GNU systems
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48592
8 years ago
Felix Fietkau be6acba4dc build system: have tar use $SOURCE_DATE_EPOCH for --mtime
The --mtime argument to 'tar' sets the modification time for all files within
the archive, which determines the timestamp files will get when they are
extracted. In this case, rootfs and other tarballs will get mtimes which
correspond to the last commit timestamp of the build system, as reported by
git/subversion.

This is a step towards reproducible image builds.

Signed-off-by: bryan newbold <bnewbold@robocracy.org>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48586
8 years ago
Felix Fietkau 82522dbaee build: introduce SOURCE_DATE_EPOCH variable
SOURCE_DATE_EPOCH is the date of the last modified file using git/svn
as date source.
See https://reproducible-builds.org/specs/source-date-epoch/

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48584
8 years ago
Felix Fietkau 2f14514a12 add scripts/portable_date: wrapper around date for bsd/linux
date -r $unix_timestamp on bsd is equal to date -d @$unix_timestamp on
linux. To support reproducible builds and not loosing every timestamp
it's required to convert a unix timestamp into human readable timestamp

./scripts/portable_date $unix_timstamp +%T

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>

SVN-Revision: 48583
8 years ago
Jo-Philipp Wich 0333da8943 include: group kmod ipk files into a "kernel" subdirectory
This is useful to just use the kmods from an official build while supplying
base packages from a custom feed or the other way around; for just overriding
the kmods with a local repo while using official repos for the rest.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 48475
8 years ago
Felix Fietkau 883b5b8191 build: add @APACHE download facility
The Apache Software Foundation offers diverse download mirros.

For packaging Apache software a new alias @APACHE is defined.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

SVN-Revision: 48270
8 years ago
Felix Fietkau 526f470c5f download.pl: fix openssl sha256 digest output
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48259
8 years ago
Felix Fietkau eaa4eba10a scripts/download.pl: add SHA-256 support
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48253
8 years ago
Felix Fietkau 3d8c8cf3bb scripts/metadata.pl: add support for ignoring source packages when generating metadata
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48170
8 years ago
Felix Fietkau 4eaeee7151 scripts/download.pl: cleanup GNOME source location definitions
Cleanup the @GNOME source download location definitions:
* remove dead and stale mirrors
* adjust to changes at directory structure
* add one new working mirror

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>

SVN-Revision: 47825
8 years ago
Felix Fietkau 9b68fe961b build: add support for choosing a different url filename part than the output file
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47591
9 years ago
Felix Fietkau edd87061ec scripts/diffconfig.sh: reduce config output with CONFIG_BUSYBOX_CUSTOM
Use similar approach as r47461 to reduce output for busybox config.

Since r39435 CONFIG_BUSYBOX_CUSTOM=y has caused the addition of
all ~260 busybox config options to the diffconfig output even if
only one option has been changed.

This patch eliminates the unchanged busybox config options from the output
and leaves only the actually modified options.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>

SVN-Revision: 47463
9 years ago
Felix Fietkau 9c611eccbf scripts/diffconfig.sh: reduce config output with CONFIG_ALL_KMODS
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47461
9 years ago
Felix Fietkau b0d9e64464 scripts/config: fix handling of CONFDEFAULT on oldconfig
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47372
9 years ago
Felix Fietkau 2fa7541613 update config.guess & config.sub
These are from today's master branch of:
http://git.savannah.gnu.org/gitweb/?p=config.git;a=tree

In particular it adds support for ARC architecture plus some more
improvements and fixes.

This patch is built-tested against NetGear WNDR3800.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Imre Kaloz <kaloz@openwrt.org>

SVN-Revision: 47360
9 years ago
John Crispin 0aeb0ae938 scripts/checkpatch.pl: Fix deprecation warnings
In perl version v5.22, use of unescaped opening braces is deprecated

Signed-off-by: Javier Domingo Cansino <javierdo1@gmail.com>

SVN-Revision: 47342
9 years ago
Felix Fietkau 3bbb927728 build: Allow kernel modules to set build ID debug symbol
This change adds support for specifying a build ID for kernel modules.
This is done by setting PKG_BUILD_ID to a hexadecimal string, which will
then be passed to the kernel linker. In addition, when this flag is set,
the build ID debug symbol (.note.gnu.build-id) will not be stripped from
the kernel module. This symbol is exported in sysfs by the kernel (if
the kernel is compiled with CONFIG_KALLSYMS) and so can be used to
uniquely identify a version of a kernel module in a running kernel. This
is useful for keeping track of different versions of a module when doing
experiments and development.

Modules that specify the build ID will be ~100 bytes larger (depending
on the length of the build ID specified). There is no size difference
for kernel modules that do not set this variable.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>

SVN-Revision: 47290
9 years ago
Michael Büsch 325a69486e dl_cleanup: Fix linux blacklist
SVN-Revision: 47157
9 years ago
Michael Büsch 9644e33c65 dl_cleanup: Port to Python 3
SVN-Revision: 47156
9 years ago
John Crispin 3d5cdf7094 scripts/om-fwupgradecfg-gen.sh: add support for the MR1750
Signed-off-by: Sven Eckelmann <sven@open-mesh.com>

SVN-Revision: 46928
9 years ago
John Crispin 5798dfb846 scripts/om-fwupgradecfg-gen.sh: Fix u-boot image md5sum check
The u-boot on Open Mesh devices checks the whole transfered image against a
md5sum. This is stored inside the option filemd5sum inside the
fwupgrade.cfg. The bootloader will not check it when this setting is
missing and could therefore write invalid images to the flash.

Signed-off-by: Sven Eckelmann <sven@open-mesh.com>

SVN-Revision: 46925
9 years ago
Hauke Mehrtens accc5e3693 script: downlaod: change mirror for kernel.org
kernel.org now suggests a different mirror address. this one also
support IPv6 connections and was faster for me.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 46875
9 years ago
Felix Fietkau 1a2fd4f869 ipkg-build: add ogargs to outer tar/ipk
prevent name:uid leaks of build system

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46863
9 years ago
Felix Fietkau 4baec2468a include/image.mk: make tar reproducible
several packages reported different file order between builds
make binutils, kmod-sched reproducible

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46859
9 years ago
Jonas Gorski a164be8ebe build: add a build step for generic sysupgrade nand image
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46784
9 years ago
Felix Fietkau 13a095085e scripts/patch-kernel.sh: remove -E flag to preserve empty files touched by patches
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46723
9 years ago
Jonas Gorski 0d54d44349 scripts/feeds: allow export of feeds with static revisions
Add a switch to scripts/feeds that allows listing the feeds with their
currently checked out revisions in feeds.conf compatible format.

This allows providing a feeds.conf for public builds to make replication
of the build easier.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46706
9 years ago
Jonas Gorski ddc6d047b7 scripts: add tool for generating redboot scripts
This tool avoids generating the redboot script directly from Makefile, which
can get really complicated when adapting image/Makefile to the new IB system.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 46488
9 years ago
Felix Fietkau 7f359e52ce scripts/ipkg-build: fix a build regression introduced in r46360 (fixes #20082)
go to the $TOPDIR directory before trying to extract a git/svn timestamp

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 46383
9 years ago
Jo-Philipp Wich c5fbcf59e0 scripts/feeds: return error status from feed update
This patch is a modified version of the patch being discussed at here:
https://patchwork.ozlabs.org/patch/471303/
from Martin Strbacka <martin.strbacka@nic.cz>

My version modifies scripts/feeds so that an error with one of the feeds just
raises the error flag, but script continues and tries to update the other
feeds. After all feeds have been updated, the script returns 1 if at least
one feed failed, and 0 on success with all feeds. The user can then utilise
the status in his build script, if he wants.

signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>

SVN-Revision: 46374
9 years ago
John Crispin 3eff7927ce scripts: fix 64bit uclibc external toolchain detection
according to gcc, UCLIBC_DYNAMIC_LINKER64

Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de>

SVN-Revision: 46362
9 years ago
John Crispin 3846bb9ac9 ipkg-build: use deterministic timestamps in ipk tarballs
As a follow-up to r46026, this commit sets the modification
times of files inside the tarballs to deterministic values.
It uses the date of the last git or svn commit and falls
back to the old behavior if those are not available.

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 46360
9 years ago
Steven Barth 37c015fe25 scripts/feeds: print the source of packages installed
Can be helpful in diagnosing unexpected package overlaps between
feeds/core.

Signed-off-by: Karl Palsson <karlp@remake.is>

SVN-Revision: 46255
9 years ago
Steven Barth b6d0061fec scripts/feeds: observe -p flag for preferential feeds
lookup_target was trampling the $feed variable, resulting in the -p flag
no longer preferentially installing from the named feed.

Make sure to use a local variable for this instead.

Signed-off-by: Karl Palsson <karlp@remake.is>

SVN-Revision: 46120
9 years ago
Felix Fietkau 949d7e30e4 ipkg-build: suppress timestamps in gzip headers
When creating control.tar.gz, data.tar.gz and $package.ipk
tar compresses them with default gzip options.
This includes build timestamps in their gzip headers.
By setting the GZIP env variable to -n, gzip no longer embeds
them, which is a step towards reproducibility.

See also [1] for more detailed motivations.

[1]: https://wiki.debian.org/ReproducibleBuilds/About

Signed-off-by: Reiner Herrmann <reiner@reiner-h.de>

SVN-Revision: 46026
9 years ago
Jo-Philipp Wich 045966d4e9 scripts: add srecimage.pl, a script to convert binaries to SREC format
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45808
9 years ago
Jonas Gorski ff6f66c192 scripts/arm-magic.sh: make the generated kernels also include $IMG_PREFIX
In r45785 ixp4xx was changed to use a common image prefix also for
kernels, but the script creating them was not updated to generate the
expected filenames.
Fix this by letting arm-magic.sh respect $IMG_PREFIX for the output
kernel file names as well.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 45803
9 years ago
Felix Fietkau 7de4c92804 scripts/feeds: fix typo in copied code
do_install_target copied code from do_install_package, but didn't
replace all text.

Signed-off-by: Karl Palsson <karlp@remake.is>

SVN-Revision: 45784
9 years ago
Jo-Philipp Wich 4d96170c32 scripts: ensure that ipkg-make-index.sh exits successfully
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45771
9 years ago
Felix Fietkau ecb14f4a5d build: allow creating empty package feeds
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45757
9 years ago
John Crispin 803ebd2725 scripts/feeds: Delete package/feeds folder in the clean procedure to prevent dangling links.
Hello,

if you run:
./scripts/feeds clean
It removes ./feeds folder but not ./package/feeds/ which is full of dangling links then. This patch fixes it.

Best Regards,
Martin Strbačka

Signed-off-by: Martin Strbacka <martin.strbacka@nic.cz>

SVN-Revision: 45738
9 years ago
Felix Fietkau 08436887fb scripts/feeds: add support for optionally using a full clone of git repositories
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45668
9 years ago
Felix Fietkau a37814faa7 build: make device-tree arg optional in mkits.sh
mkits.sh help currently shows dtb file as optional, but generates an
invalid its file when this option is unspecified.

We're fixing this problem by removing the use of the sed command and
just including variables instead.

Signed-off-by: Mathieu Olivari <mathieu@qca.qualcomm.com>

SVN-Revision: 45659
9 years ago
Jo-Philipp Wich f2277a967d env: allow passing a commit message on save
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 45592
9 years ago
Felix Fietkau d2030482b3 scripts/ipkg: remove file, it is obsolete
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45130
9 years ago
Felix Fietkau 55c5d10ca9 tools: replace ipkg-utils with a reduced ipkg-build variant in scripts/
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45129
9 years ago
Felix Fietkau 2900f6984f scripts/metadata.pl: do not emit ARCH selection for a target if it has subtargets
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45112
9 years ago
Jonas Gorski 9dc137397f buildroot: make it easier to build all kmods
Split out kmods from ALL to make it easier to create local builds that
are compatible kmod-wise with releases.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44830
9 years ago
Felix Fietkau 4b1165d5c7 scripts/feeds: add support for uninstalling targets
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44782
9 years ago
Felix Fietkau 2484f3a86a scripts/feeds: add support for installing targets
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44781
9 years ago
Felix Fietkau 797b0459c4 scripts/metadata.pm: save target makefile names
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44780
9 years ago
Felix Fietkau b7ebb19b02 scripts/feeds: get rid of redundant feed cache copy
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44779
9 years ago
Felix Fietkau 0efcb02c9d scripts/feeds: remove useless install_method abstraction
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44778
9 years ago
Felix Fietkau b6ac0d799c scripts/feeds: add support for searching for targets
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44777
9 years ago