Commit Graph

82 Commits (9601d94138de66e4fc9f55a08dfb348cdfcc3181)

Author SHA1 Message Date
Jo-Philipp Wich d3ddf6631e build: remove GNU time dependency
Replace the GNU time program invocation with a simple Perl script reporting
the timing values. Since we require Perl anyway for the build system, we can
as well use that instead of requiring a random GNU utility rarely installed
by default.

Fixes: ff6e62b288 ("build: log time taken by each packages/steps")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Jo-Philipp Wich a6f4c7bce8 build: prereq-build.mk: fix gcc/g++ SetupHostCommand invocation
A missing comma caused the first command option to be considered part of
the error message.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
6 years ago
Matthias Schiffer b123921a92
include/prereq-build.mk: explicitly check for -f flag when using busybox time
On Debian, busybox does have a time applet, but it does not support the -f
flag. Catch this in prereq check to give users to proper error message.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Andy Boyett 591780615b build: add busybox support to `time` prereq-check
Busybox time supports the GNU time '-f' syntax used by the build time
logging implemented in ff6e62b288, however the prerequisite check added
only works with GNU time installed as `time` or `gtime`.

As busybox is a multicall binary, the name of the symlink setup by
SetupHostCommand also must be changed from `gtime` to `time` to fix the
value of argv[0]. This causes a number of shells (including bash) to use
their builtin impelementation of time, so the sole invocation has been
changed to use `env time` to use the value found on the $PATH.

Signed-off-by: Andy Boyett <agb@agb.io>
6 years ago
Etienne Champetier ff6e62b288 build: log time taken by each packages/steps
The idea is to easily get the list of packages taking the most time to build,
and see if we can improve them

v1: Use SetupHostCommand as recommended by John
v2: add space after 'time:', remove useless /usr/bin/time from SetupHostCommand

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
6 years ago
Hauke Mehrtens 8dcd941d8b tools/zlib: move zlib build to tools
This allows us to link the other tools against our libz and we do not
need the system zlib any more.

Only the static linked library is copied to the staging directory so we
have a statically linked library on all systems and not only on Linux.
This also adds the new dependencies of the packages which are depending
on zlib.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
6 years ago
Hauke Mehrtens d6d3db0543 build: Improve GCC version detection
This now makes sure that the beginning of the version number gets checked
and "4.4.5" will not match was a supported version.
GCC 8 and GCC 9 are now marked as supported, but we probably have to fix
some problems for them.

Closes: FS#1433
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 years ago
Zoltan HERPAI d2c06eb075 merge: etc: update remaining files
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
6 years ago
Justin Kilpatrick 8ee2d3f718 build: accept gcc/g++ without minor version
Build dependency: Please install the GNU C Compiler (gcc) 4.8 or later cc
  -dumpversion | grep -E '(4\.[8-9]|5\.[0-9]|6\.[0-9]|7\.[0-9])'
Build dependency: Please install the GNU C++ Compiler (g++) 4.8 or later
  g++ -dumpversion | grep -E '(4\.[8-9]|5\.[0-9]|6\.[0-9]|7\.[0-9])'

Prerequisite check failed. Use FORCE=1 to override.

On my Fedora 26 machine gcc and g++ -dumpversion returns a whole number
'7' failing the regex introduced in commit:

b78de6207f

This change makes minor versions optional in the build dependency regex
for gcc and g++ whenever any minor version would be accepted and the
whole number version is sufficient as a dependency check. For versions
4.* a minor version is still required.

Signed-off-by: Justin Kilpatrick <jkilpatr@redhat.com>
7 years ago
Daniel Engberg b78de6207f toolchain: Test for supported versions of GCC
Only test for supported versions of GCC
The version bump requirement for GCC is because gdb doesn't build with older
versions.

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
7 years ago
Felix Fietkau aab0b0704a build: fix high cpu usage / hang in prereq-build.mk
host-build.mk should not be included for prereq

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 9467ce42da build: get rid of host.mk
Defined required host related variables in toplevel.mk instead

Signed-off-by: Felix Fietkau <nbd@nbd.name>
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
Felix Fietkau f6e6341d89 tools: build libressl on all systems
Useful for having a more consistent build environment and finding API
issues faster

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Jo-Philipp Wich b81fc29123 include: prereq-build.mk: improve gcp check
Adjust the check for gcp (GNU copy command) to rule out false positives
with "Goffi's CoPier" a python copy command.

Fixes FS#218.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 7694c5cf0e include: remove XZ host prereq
We build XZ as part of tools/, so no need to require it to be available
on the host system.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Daniel Engberg ed768ae4b2 include/prereq-build.mk: Add xz-utils to make prereq
Add xz-utils to make prereq

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
8 years ago
Jo-Philipp Wich be6f836841 include: relax umask check
For now we only want to ensure that the group permission mask is permissive
enough to not clobber required permissions on the rootfs, so allow less
strict masks as well.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Jo-Philipp Wich 5f80315634 include: add umask prereq check
When building LEDE with umask values other than 022, the resulting packages
will embed improper permissions, which may lead to random errors or non-
functional scripts on the target.

In order to make users aware of this problem, add a build-prereq check to
assert a correct umask setting before starting the build.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
Hauke Mehrtens 1448501558 build: do not depend on svn any more
LEDE does not need svn to build any more, remove the prerequisite check.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
8 years ago
Waldemar Brodkorb f7fb6e49f2 build: allow to build LEDE on latest MacOS X
Latest Xcode doesn't include openssl anymore. To compile
mkimage from u-boot source you need SSL headers on your host.
This patch provides libressl host package for any Darwin
compilation. Unfortunately openssl from MacPorts can not be
used, as the installed headers in /opt/local are breaking
GDB compilation. Tested with a RB532 image build and resulting
kernel booted on a device via TFTP.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [fixes, dependencies]
8 years ago
John Crispin fa69553900 branding: add LEDE branding
Signed-off-by: John Crispin <blogic@openwrt.org>
8 years ago
Felix Fietkau 4c80909fa1 prereq: stop relying on man pages and grep for --recursive on the git-submodule script directly (fixes #21968)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48934
8 years ago
Felix Fietkau 8211221190 build: fix git prereq check to forcibly disable man pagers on the --help check
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48927
8 years ago
Felix Fietkau 887e39150f build: fix git prereq check to not rely on being in a git directory (#21968)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48926
8 years ago
Felix Fietkau 59121fdd69 buildroot: improve git submodule handling for packages
Move the `--recursive` switch from `git clone` to `git submodule`
so that submodules are cloned for upstream branches where the
PKG_SOURCE_VERSION commit-ish has a different .gitmodules
configuration than the repository default.

This is, for example, required when the master branch for a source
package does not use submodules, but its topic branch for OpenWRT
does.

This changes the buildroot dependency from git-1.6.2 to git 1.7.12.2,
which was released September 2012.

Signed-off-by: Darik Horn <dajhorn@vanadac.com>
Signed-off-by: Karl Palsson <karlp@tweak.net.au>

SVN-Revision: 48830
8 years ago
Felix Fietkau 1f826e8992 Support LibreSSL as provider of openssl
The build scripts check for openssl by grepping the string "OpenSSL" in
the output of openssl version command. LibreSSL fails this test as it
outputs something like "LibreSSL 2.2.4". This patch fix the
prereq-bulid.mk file so that it accepts LibreSSL as openssl provider as
well.

Signed-off-by: Marek Behun <kabel@blackhole.sk>

SVN-Revision: 48267
8 years ago
Felix Fietkau 9e670fcf9d build: use host cflags/ldflags for openssl prereq check
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47138
9 years ago
Jo-Philipp Wich 9e5db437f2 prereq-build: test availability of Perl Thread::Queue module
This is needed for building automake.

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

SVN-Revision: 47069
9 years ago
Jo-Philipp Wich 90daa0d361 prereq-build: test for static zlib availability
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 46976
9 years ago
Luka Perkov 7002f6326e include: remove trailing whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 45127
9 years ago
Felix Fietkau 834417623d build: accept apple llvm as fallback for gcc/g++
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 44298
9 years ago
Jo-Philipp Wich 13a0f0d621 include: fix prereq tests for perl and file (#18911)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44296
9 years ago
Jo-Philipp Wich 330fcd48e5 include: rework git prereq test to not require 'man'
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44292
9 years ago
Jo-Philipp Wich 971ec0283c include: remove static tool linking support
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 44286
9 years ago
Jo-Philipp Wich 5dadc89b3a include: set shell to "sh" for prereq tests
Bash is not guaranteed to be present, e.g. on a fresh FreeBSD install
so perform prereq tests with /bin/sh.

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

SVN-Revision: 44275
9 years ago
Jo-Philipp Wich 9886084b94 include: prereq-build.mk: use TestHostCommand and SetupHostCommand
Also move tests from tools/Makefile and include/host.mk here to have all tests
in a central place.

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

SVN-Revision: 44271
9 years ago
Felix Fietkau 549f7d0366 prereq-build: rename the openssl check to libssl, add back the old check - it is required after all
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42999
10 years ago
Felix Fietkau 35b34b20d4 prereq-build: replace the openssl command check with a check for headers
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42995
10 years ago
Felix Fietkau a6f734ed99 build: clarify the file prereq check message
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40569
10 years ago
Felix Fietkau 8306b55862 build: add a prereq check for file (#15692)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 40568
10 years ago
Steven Barth cbdd346b11 Add package signing infrastructure
Add package signing key and certificate configuration options to the
"Image configuration" submenu. If enabled, the Packages.gz list will
be signed as file Packages.sig. The passphrase for the signing key can
be sourced from a file or entered by the user. The signing certificate
is automatically added to the firmware image if opkg-smime is selected.

Signed-off-by: Evan Hunt <each@isc.org>
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 38284
11 years ago
Florian Fainelli 05741a0331 Revert "prereq-build: check for "bc" (#13767)"
Makes all buildbot builds fail; until we get the right software
installed, revert this changeset.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37122
11 years ago
Florian Fainelli b9831690e4 prereq-build: check for "bc" (#13767)
bc is required by the kernel to compute timeconsts files, add bc to the
list of prereq to build OpenWrt.

Signed-off-by: Florian Fainelli <florian@openwrt.org>

SVN-Revision: 37108
11 years ago
Felix Fietkau 1f77bfff96 build: BSD compile fixes
following patch allows to build images for Qemu ARM on
OpenBSD 5.2 amd64 and FreeBSD 9.1 amd64.

Mostly small pieces of code changes to get things right on the
specific platform.

Updated the README to describe better, which tools on the host
are required. Added some kind of prepare scripts to install needed
tools on BSD via packages.

Signed-off-by: Waldemar Brodkorb <mail@waldemar-brodkorb.de>

SVN-Revision: 35900
11 years ago
Jo-Philipp Wich 095fe8743b prereq-build.mk: do not perform static linking tests on Darwin
SVN-Revision: 33139
12 years ago
Jo-Philipp Wich 67edc7ec63 add remaining missing build prereq checks
SVN-Revision: 33122
12 years ago
Jo-Philipp Wich a996cc1444 add a build preeq check for glibc-static
SVN-Revision: 33121
12 years ago
Felix Fietkau 7b11052092 prereq-build: flex is built in tools/ - do not require it to be installed on the host
SVN-Revision: 32116
12 years ago