Commit Graph

519 Commits

Author SHA1 Message Date
Daniel Golle
818331231e Revert "build: use config.site generated by autoconf-lean, drop hardcoded sitefiles"
This reverts commit f439e29130.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-03-02 22:02:38 +08:00
Sebastian Kemper
a1c397085d build: prevent dupes in autotools.mk
autotools.mk does not have any protection currently that would prevent
it from being sourced multiple times. Note that both package.mk and
host-build.mk source autotools.mk. So any package Makefile that includes
both will cause hooks to be added twice (at least twice).

This is fixed by declaring a new variable, __autotools_inc, and only
continuing if this variable doesn't equal 1. The same is done by
rules.mk already.

Also, this commit does away with an ifneq that checks PKG_FIXUP (instead
of HOST_FIXUP) for patch-libtool before adding to the host pre-configure
hook. This does not make sense.

The second ifneq is amended. The current one manually does what the
define patch_libtool_host is already doing. It can just use the define.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2021-03-02 12:06:12 +08:00
Felix Fietkau
29219ea621 build: use config.site generated by autoconf-lean, drop hardcoded sitefiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-03-01 12:10:12 +08:00
David Bauer
faf18cc0c6 download: add mirror alias for Debian
Add an alias for Debian packages and download them from the Debian
mirror redirector.

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-27 12:11:33 +08:00
David Bauer
836d68c23f build: avoid generating JSON info on missing image
Previously, build would fail for targets containing devices with not
initramfs image (such as mpc85xx-p1010). Only generate the JSON image
info for the initramfs image when we have one to avoid breaking the
builds.

Fixes commit d3140d0529 ("build/json: generate json file for initramfs")

Signed-off-by: David Bauer <mail@david-bauer.net>
2021-02-25 12:09:21 +08:00
Rosen Penev
e650ee1be7 autotools.mk: fix gettext fixup
The update to gettext 0.21 broke packages that use autotools and
gettext because the sed line was failing with the new version. Fix with
a better sed expression.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-02-24 12:21:49 +08:00
Moritz Warning
b0472e8b7c build/json: generate json file for initramfs
The initramfs images are missing from the profiles.json files.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
[fix code by exporting device variables]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-22 12:01:56 +08:00
CN_SZTL
20254b2848
include: adjust VERSION_NUMBER for 18.06
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-21 15:47:21 +08:00
Michael Pratt
f88da95c24 toplevel.mk: remove legacy packages feed from 'make distclean'
package/openwrt-packages is left over
from what is now a legacy repository
and has no other reference in the build tree

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2021-02-21 12:09:37 +08:00
Felix Fietkau
2f46ef4d87
build: fix ABI version for PROVIDES symbols
GetABISuffix does not work for intra-package ABI version of provided symbols,
since ABIV_$(provided) is not set.
Fix ABI version by using $(ABIV_$(1)) directly

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-19 03:28:46 +08:00
CN_SZTL
e6bf8a2f00
include/version: set default distribution name to ImmortalWrt
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-18 19:07:14 +08:00
CN_SZTL
616ab0cab9
kernel: bump 4.19 to 4.19.176
No patches need to be refreshed.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-17 21:30:07 +08:00
R. Diez
d497974654 build: IS_TTY is now set according to GNU Make's MAKE_TERMOUT
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Fixes: FS#2086
The logic for IS_TTY was broken, because it was testing stdin
instead of stdout.
MAKE_TERMOUT was introduced in GNU Make version 4.1 (05 Oct 2014),
so it should be available everywhere nowadays.

Signed-off-by: R. Diez <rdiezmail-openwrt@yahoo.com>
2021-02-16 12:18:57 +08:00
Paul Spooren
fda82fb9f5 build/prereq: require make 4.1 or later
FS#2086 "IS_TTY in the makefile is broken" reports flawed detection of
stdout piping to a file. The issue describes how e.g. terminal color
codes and up in log files if running make like `make > log.txt`.

The proposed solution uses the make variable "MAKE_TERMOUT", which was
introduced in make 4.1. All major distributions seem to updated to 4.1
or later, so this ideally dosen't break anything.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-16 12:18:37 +08:00
Felix Fietkau
5d1944e039 build: fix getting ABI version for binary packages from the same source package
We can't rely on the .version file being created yet, so use package variables
to get it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 12:15:02 +08:00
Felix Fietkau
1f95174a91 build: filter out own packages on package version check
This was accidentally dropped in 27a4a71c24
("metadata: handle ABI version rebuild tracking for transient dependencies")

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 12:14:37 +08:00
Felix Fietkau
148309f281 build: only overwrite ABI version for provided packages when base version changed
Should avoid some spurious rebuilds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 12:13:39 +08:00
Felix Fietkau
67004d8112 Mostly revert "build: add support for fixing up library soname"
This reverts commit b12288fa69.
The patchelf approach is too fragile, and the only users of this have been
converted to make patching unnecessary
Leave the abi_version_str variable in place in rules.mk

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 12:13:08 +08:00
Felix Fietkau
f8029f47b9 build: add support for patching libtool to include ABI version in soname
Use the version from PKG_ABI_VERSION

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-16 12:12:06 +08:00
Felix Fietkau
8c6c7565ac build: drop ABI version from metadata
Preparation for supporting dynamic ABI versions that depend on the runtime
configuration. Read the suffix from the staging dir pkginfo version files.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-15 12:17:04 +08:00
Felix Fietkau
e27f09d11f build: add support for fixing up library soname
This makes it possible to declare a package ABI_VERSION independent from the
upstream soname by setting PKG_ABI_VERSION in the package makefile.
The library filename is fixed up for files installed to packages and to the
staging dir. References to the original from executables within the same
package are also fixed up

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-15 12:16:15 +08:00
Felix Fietkau
e50f133cf5 build: fix ABI version rebuild dependency
A stray comma was being appended to the last package version dependency,
causing it to be missed for ABI version checks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-02-15 12:15:51 +08:00
CN_SZTL
7ed8a3dc50
kernel: bump to 4.9.257, 4.14.221, 4.19.175
Resolve conflicted:
 - layerscape/patches-4.14/302-dts-support-layerscape.patch

Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-10 19:37:50 +08:00
Paul Spooren
0bc6a69776 treewide: unify OpenWrt hosted source via @OPENWRT
Multiple sources are hosted on OpenWrts source server only. The source
URLs to point to the server vary based on different epochs in OpenWrts
history.

Replace all by @OPENWRT which is an "empty" mirror, therefore using the
fallback servers sources.cdn.openwrt.org and sources.openwrt.org.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-02-08 12:11:32 +08:00
AmadeusGhost
80d3967771 kernel: rollback 4.9 to 4.9.255
"4.9.256" completely broken the compilation.
2021-02-07 21:36:19 +08:00
CN_SZTL
77a136fc74
kernel: bump to 4.9.256, 4.14.219, 4.19.173
Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-02-07 02:20:09 +08:00
Paul Spooren
430f572960 build: use SPDX license tags
The license folder is a core part of OpenWrt and all GPL-2.0 licensed.
Use SPDX license tags to allow machines to check licenses.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[rebase, keep some Copyright lines, sharpen commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2021-02-06 12:07:10 +08:00
Adrian Schmutzler
75697c9c12
treewide: provide global default for SUPPORTED_DEVICES
The majority of our targets provide a default value for the variable
SUPPORTED_DEVICES, which is used in images to check against the
compatible on a running device:

  SUPPORTED_DEVICES := $(subst _,$(comma),$(1))

At the moment, this is implemented in the Device/Default block of
the individual targets or even subtargets. However, since we
standardized device names and compatible in the recent past, almost
all targets are following the same scheme now:

  device/image name:  vendor_model
  compatible:         vendor,model

The equal redundant definitions are a symptom of this process.

Consequently, this patch moves the definition to image.mk making it
a global default. For the few targets not using the scheme above,
SUPPORTED_DEVICES will be defined to a different value in
Device/Default anyway, overwriting the default. In other words:
This change is supposed to be cosmetic.

This can be used as a global measure to get the current compatible
with: $(firstword $(SUPPORTED_DEVICES))
(Though this is not precisely an achievement of this commit.)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-29 22:47:58 +08:00
Adrian Schmutzler
5a2cbf522c
base-files: remove execute bit and shebang from functions.sh
/lib/functions.sh was executable for no obvious reason and its
execute property was even checked in package-ipkg.mk just to
source it afterwards.

Remove the execute bit and shebang as this is clearly a library.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-29 22:36:08 +08:00
CN_SZTL
61d995d4c3
kernel: bump 4.19 to 4.19.171
Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-29 03:28:54 +08:00
CN_SZTL
b01af9983b
kernel: bump to 4.9.253, 4.14.217, 4.19.170
Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-24 02:47:59 +08:00
CN_SZTL
cba1985b07
kernel: bump to 4.9.252, 4.14.216, 4.19.169
Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-23 21:36:40 +08:00
CN_SZTL
a560911888
kernel: bump to 4.9.250, 4.14.214, 4.19.166
Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-10 00:12:43 +08:00
CN_SZTL
5193287842
kernel: bump 4.19 to 4.19.165
Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2021-01-07 13:52:47 +08:00
Sven Wegener
eeb1b68ebb
build: use ccache -C for cleaning the cache
This keeps the configuration, like the size of the cache, and the
statistics intact. Move the removal of the cache directory to the
distclean target, but only delete the .ccache directory inside of our
build tree, as we should not mess with a user-configured external ccache
directory this destructively.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2021-01-07 09:57:24 +08:00
Kevin Darbyshire-Bryant
1146051a20 build: drop clang wrapper
clang's gcc emulation does the right thing with -print-file-name now,
drop the wrapper

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-01-06 17:28:08 +08:00
Petr Štetiar
1ba328bf73 build: replace which with Bash command built-in
`which` utility is not shipped by default for example on recent Arch
Linux and then any steps relying on its presence fails, like for example
following Python3 prereq build check:

 $ python3 --version
 Python 3.9.1

 $ make
 /bin/sh: line 1: which: command not found
 /bin/sh: line 1: which: command not found
 /bin/sh: line 1: which: command not found
 ...
 Checking 'python3'... failed.
 ...

Fix this by switching to Bash builtin `command` which should provide
same functionality.

Fixes: FS#3525
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-01-05 17:18:46 +08:00
Sven Wegener
c83f7ff51b
build: drop ccache variables from specific targets
With commit 2ca084cc ("build: improve ccache support") these variables
are being set globally and we don't need them for specific targets.

Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
2021-01-02 12:08:22 +08:00
Roman Yeryomin
d0b8cc7732
build: improve ccache support
Set CCACHE_DIR to $(TOPDIR)/.ccache and CCACHE_BASEDIR to $(TOPDIR).
This allows to do clean and dirclean. Cache hit rate for test build
after dirclean is ~65%.
If CCACHE is enabled stats are printed out at the end of building process.
CCACHE_DIR config variable allows to override default, which could be useful
when sharing cache with many builds.
cacheclean make target allows to clean the cache.

Changes from v1:
- remove ccache directory using CCACHE_DIR variable
- remove ccache leftovers from sdk and toolchain make files
- introduce CONFIG_CCACHE_DIR variable
- introduce cacheclean make target

Signed-off-by: Roman Yeryomin <roman@advem.lv>
2021-01-02 12:08:17 +08:00
Rui Salvaterra
84d6e2884a
kernel-build: fix STRIP_KERNEL_EXPORTS for 64-bit kernels
While parsing the nm output, we need to account for the fact that 64-bit kernels
have 64-bit wide addresses. While at it, replace the grep | sed combo with a
single awk invocation and a stronger regex.

Fixes: 2ef0acc5fc "kernel-build: fix
STRIP_KERNEL_EXPORTS for recent kernels"

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2021-01-02 12:01:41 +08:00
Paul Spooren
edf785406d
build/prereq: merge ifndef IB block together
Multiple prereq checks are only required within the build system but not
for the ImageBuilder. These checks are excluded by using ifndef IB.

This commit merges the three ifndef IB blocks together.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-01-02 11:56:30 +08:00
CN_SZTL
74969cab15
kernel: bump to 4.9.249, 4.14.213, 4.19.164
Remove upstreamed:
 - generic/pending-4.14/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch
 - generic/pending-4.9/499-mtd-parser-cmdline-Fix-parsing-of-part-names-with-co.patch
 - ipq806x/patches-4.14/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch
 - ipq806x/patches-4.19/0071-2-PCI-qcom-Fixed-IPQ806x-PCIE-reset-changes.patch

Resolve conflicted:
 - generic/pending-4.19/611-netfilter_match_bypass_default_table.patch
 - ipq40xx/patches-4.19/995-ipq40xx-unlock-cpu-frequency.patch

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2020-12-31 20:59:32 +08:00
Hirokazu MORIKAWA
4ec538d951 include/cmake.mk: Fix the bug in ccache support
Fix the bug in ccache support due to this change.
bfc433efd4

The new cmake uses this for the wrapper.
https://cmake.org/cmake/help/v3.19/prop_tgt/LANG_COMPILER_LAUNCHER.html

Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
2020-12-22 11:38:53 +08:00
CN_SZTL
07c5ef44a4
kernel: bump to 4.9.248, 4.14.212, 4.19.163
Remove upstreamed:
 - target/linux/generic/backport-4.14/315-v5.10-usbnet-ipeth-fix-connectivity-with-ios-14.patch
 - target/linux/generic/backport-4.19/315-v5.10-usbnet-ipeth-fix-connectivity-with-ios-14.patch
 - target/linux/generic/backport-4.9/315-v5.10-usbnet-ipeth-fix-connectivity-with-ios-14.patch

Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2020-12-19 21:11:50 +08:00
Paul Spooren
0be03639d9
build/json: add filesystem information
Some images are created using different filesystems, most popular
squashfs and ext4. To allow downstream projects to distinguesh between
those, add the `filesystem` information to created json files.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-12-19 18:04:46 +08:00
Rosen Penev
3afdd9e89f libcxx[abi]: remove
This is a neat project, but offers no benefit to OpenWrt. The initial
reason for it was to be a replacement for libstdcpp as it is smaller
and lacks compatibility for C++98. Unfortunately, compiling several
packages with it results in larger ipk sizes.

While not a member of the packages feed, this will be moved to
packages-abandoned to keep it somewhere.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-12-12 11:33:11 +08:00
John Beckett
264f85cc4c build: find_md5 list with mod time and sorted
It was observed that the MD5 would not change after source files had been
modified, looking deeper into the build process it was discovered that
find_md5 build function makes a list of the files being built and then
passes the list to a summing utility on stdin.  The resultant MD5 is of
the file list, not the contents of the files.

The MD5 would change if the ordering of the list changed, or items were
removed or deleted.

The proposed fix is to add the modification time after the filename and
then sort the list to prevent find returning files in a different order
falsely re-triggering a rebuild. The MD5 will now change when a file is
modified or files are added/removed from the list.

Using 'T@' to show time in epoch for timezone independent behaviour.

Signed-off-by: John Beckett <john.beckett@net2edge.com>
2020-12-08 11:39:50 +08:00
Stijn Tintel
ff03f2a749 build: require rsync
It seems to be required to build toolchain/kernel-headers.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2020-12-08 11:39:28 +08:00
Paul Spooren
5c696f8af4 build: reduce cleanup binary calls in rootfs.mk
Both `find` and `rm` only need to be called once for folders and files.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-12-08 11:31:45 +08:00
CN_SZTL
6c69b7539e
kernel: bump to kernel 4.9.247, 4.14.210, 4.19.161
Resolve conflicted:
 - generic/pending-4.14/607-tcp_bbr-adapt-cwnd-based-on-ack-aggregation-estimation.patch
 - layerscape/patches-4.14/804-i2c-support-layerscape.patch
 - ramips/patches-4.14/0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch

Refreshed all patches.

Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
2020-12-06 00:24:09 +08:00