Commit Graph

563 Commits

Author SHA1 Message Date
Daniel Golle
b3437ac7a3 images: squashfs: xattrs should not depend on buld host
Enable xattr for the generated squashfs only if needed for SELinux.
This eliminates warnings during boot on target when building
(non-SELinux) OpenWrt on SELinux-enabled hosts like Fedora.

Reported-by: fda77 <fda77@users.noreply.github.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-04 12:05:38 +08:00
Tianling Shen
1ac8417985
kernel: bump to 4.9.275, 4.14.239, 4.19.197
Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-07-17 00:05:32 +08:00
Tianling Shen
16dee56503
target: tweak default packages
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-06-22 13:16:25 +08:00
李国
9eddf65670
x86: generate EFI platform bootable images
Add EFI platform bootable images for x86 platforms. These images can
also boot from legacy BIOS platform.

EFI System Partition need to be fat12/fat16/fat32 (not need to load
filesystem drivers), so the first partition of EFI images are not ext4
filesystem any more.

GPT partition table has an alternate partition table, we did not
generate it. This may cause problems when use these images as qemu disk
(kernel can not find rootfs), we pad enough sectors will be ok.

Signed-off-by: 李国 <uxgood.org@gmail.com>
[part_magic_* refactoring, removed genisoimage checks]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit a6b7c3e672)
2021-06-17 20:13:41 +08:00
Paul Spooren
47bbca5ee3
x86: use qemu-image command from image-commands.mk
The `qemu-image` command converts images to the specified type and
reduces redundant code.

Adaption from Alexander Couzens <lynxis@fe80.eu> work[0].

[0]: https://git.openwrt.org/?p=openwrt/staging/lynxis.git;a=blob;f=target/linux/x86/image/Makefile;h=83b8140b7aefbe708fd09c9c61827e7e39bda8b4;hb=416cccf398e9589e3de386e05b61b1c46cace20d#l51

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 33cc7e763b)
2021-06-17 19:48:43 +08:00
Paul Spooren
a1dc0bafa9
x86: switch image generation to new code
This commit introduces few related changes which need to be done in
single commit to keep images buildable between git revisions. In result
it retains all previous image creation possibilities with slight name
change of generated images. Brief summary of the commit:

* Split up image generation recipe to smaller chunks to make it more
  generic and reusable.

* Make iso images x86 specific and drop their definition as root
  filesystem.

* Convert image creation process to generic code specified in image.mk.

* Make geode subtarget inherit features from the main target instead of
  redefining them.

* For subtargets create device definitions with basic packages set.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[rebased]
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-06-17 19:38:52 +08:00
Jo-Philipp Wich
9f80b7d5be build: ensure that dash isn't prepended twice to abi version suffix
The ABIV_$(pkgname) variable already is formatted so return it as-is from
the GetABISuffix macro and only filter through FormatABISuffix if we read
the raw ABI version value from a version stamp file.

This ensures that binary intra-package dependencies on ABI versioned
libraries are properly formatted.

Fixes: f6a03bff5b ("build: prepend ABI suffixes with a dash if package name ends with digit")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-15 23:13:36 +08:00
Jo-Philipp Wich
48307357af build: prepend ABI suffixes with a dash if package name ends with digit
Ensure that ABI suffixes are separated with a dash from the package name if
the name happens to end with a digit. This implementation detail got lost
during the recent refactoring of the ABI_VERSION handling in buildroot.

Fixes: c921650382 ("build: drop ABI version from metadata")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2021-06-15 23:13:08 +08:00
Rosen Penev
00cd20c4b2 prereq-build: diff requirement to GNU
tools/quilt requires GNU diffutils to compile. Failure can be simulated
by installing Alpine Linux without diffutils.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-13 12:02:48 +08:00
Felix Fietkau
f17acc7689 build: do not override DESTDIR for cmake ninja host builds
The full prefix is already passed to cmake

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-13 12:02:01 +08:00
Felix Fietkau
345cbe4ce2 build: use ninja for cmake packages by default
Speed goes from:

Executed in     178.08 secs     fish            external
usr time        20.16 mins      509.00 micros   20.16 mins
sys time        2.88 mins       39.00 micros    2.88 mins

To:

Executed in     175.90 secs     fish            external
usr time        20.19 mins      0.00 micros     20.19 mins
sys time        2.85 mins       497.00 micros   2.85 mins

Tested with "time make -j 12" on AMD Ryzen 3600

When building individual packages, the build time difference is often
significantly bigger than that.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-13 12:01:44 +08:00
Felix Fietkau
056b026135 build: add ninja build tool and make it available for cmake
ninja is faster at building cmake packages than make, and according to reports
also more reliable at handling parallel builds
This commit includes a patch that adds GNU make jobserver support, in order to
allow more precise control over the number of parallel tasks

Enable parallel build by default for packages using ninja

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-06-13 11:59:14 +08:00
Felix Fietkau
301c9ea4ed u-boot: support verbose build
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-06-13 11:57:51 +08:00
Tianling Shen
afd4f84321
kernel: bump to 4.9.272, 4.14.236, 4.19.194
Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-06-11 00:48:28 +08:00
Paul Spooren
f86e21f3ea build/json: fix DEVICE_PACKAGES
The variable was missing in the definition of DEFAULT_DEVICE_VARS which
caused it to contain wrong values, messing up the resulting JSON files.

This patch adds the variable DEVICE_PACKAGES to DEFAULT_DEVICE_VARS.

Suggested-by: Baptiste Jonglez <git@bitsofnetworks.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-06-03 12:08:07 +08:00
Tianling Shen
8b3da8c24d
kernel: bump to 4.9.270, 4.14.234, 4.19.192
Backported latest BBR fixes for kernel 4.14 and 4.19.

No patch needs to be refreshed.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-28 20:06:13 +08:00
Tianling Shen
4c7cf87e6b
kernel: bump to 4.9.269, 4.14.233, 4.19.191
Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-25 01:20:11 +08:00
Karl Palsson
323e1ecdb9 prereq-build: g++ formatting and consistency fixes
Remove \n that mangles output, and fix inconsistent version name check.

Example before:

Build dependency: Please install the GNU C++ Compiler (g++) 6 or later
Build dependency: \nPlease reinstall the GNU C++ Compiler (4.8 or later) - it appears to be broken
Build dependency: Please install ncurses. (Missing libncurses.so or ncurses.h)

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
2021-05-23 23:22:56 +08:00
Andre Heider
a5a2740d7c
build: prereq: drop support for Python 3.5
The final Python 3.5 release was 3.5.10 in September 2020 [0].
This release series is now End-of-Life (EOL).

The only LTS distribution that still only ships Python 3.5 is Ubuntu 16.04,
which will be EOL in April 2021 [1].

The meson build system bumped their python requirement to 3.6 for the 0.57.0
release. This patch ensures that OpenWrt can update meson while still
relying on the host python.

[0] https://www.python.org/dev/peps/pep-0478/#id4
[1] https://ubuntu.com/about/release-cycle
[2] https://mesonbuild.com/Release-notes-for-0-57-0.html#minimum-required-python-version-updated-to-36

Signed-off-by: Andre Heider <a.heider@gmail.com>
[python3.6+ in README.md]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-13 22:51:22 +08:00
Leonardo Mörlein
2a821d862c
build: introduce $(MKHASH)
Before this commit, it was assumed that mkhash is in the PATH. While
this was fine for the normal build workflow, this led to some issues if

    make TOPDIR="$(pwd)" -C "$pkgdir" compile

was called manually. In most of the cases, I just saw warnings like this:

    make: Entering directory '/home/.../package/gluon-status-page'
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    bash: line 1: mkhash: command not found
    [...]

While these were only warnings and the package still compiled sucessfully,
I also observed that some package even fail to build because of this.

After applying this commit, the variable $(MKHASH) is introduced. This
variable points to $(STAGING_DIR_HOST)/bin/mkhash, which is always the
correct path.

Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-13 22:49:42 +08:00
François Chavant
8e196a6299 build: kernel2minor: work around path length limit
When building for MikroTik devices the kernel2minor tool will sometimes
fail with:

  Can't get lstat from kernel file!: No such file or directory.

This is because kernel2minor expects paths no longer than 250 chars.
To work around this the include/image-commands.mk has been modified
to copy the kernel to a temporary file (/tmp/tmp.XXXXXXXXXX) before
calling kernel2minor.

Signed-off-by: François Chavant <francois@chavant.info>
2021-05-12 23:28:46 +08:00
Bas Mevissen
0c2eccb0b2 Extend checks on build prerequisites for building OpenWRT core
OpenWRT requires a number of Perl modules to be installed. It wasn't checking on all of them.
This patch adds checks for Perl FindBin, File::Copy, File::Compare and Thread::Queue modules.

Failing to install these, will have the build break at some point. By adding these to the
prereq-build.mk script, they are checked on forehand.

Tested on a Fedora 33 and 34 (beta) that was freshly installed. Fedora appears to
break up Perl modules into small packages that need to be installed for the build to succeed.

Signed-off-by: Bas Mevissen <abuse@basmevissen.nl>
2021-05-09 00:38:09 +08:00
Tianling Shen
5f0f4cb2b0
target: update wget pkg name
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-05-07 17:24:17 +08:00
Tianling Shen
339d6fc2e8
kernel: bump to 4.9.267, 4.14.231, 4.19.188
Remove upstreamed:
- generic/pending-4.14/840-can-flexcan-flexcan_chip_freeze-fix-chip-freeze-for-.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-26 21:31:32 +08:00
Tianling Shen
a5e28e4678
kernel: bump to 4.9.265, 4.14.229, 4.19.185
Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-10 17:30:47 +08:00
Tianling Shen
0c6e721a78
kernel: bump to 4.9.264, 4.14.228, 4.19.184
Resolve conflicted:
- generic/pending-4.19/611-netfilter_match_bypass_default_table.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-04-04 20:08:14 +08:00
Tianling Shen
4a24bd4db0
kernel: bump to 4.9.262, 4.14.227, 4.19.183
Resolve conflicted:
- layerscape/patches-4.14/809-flexcan-support-layerscape.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-27 01:15:23 +08:00
Kevin Darbyshire-Bryant
ee6fbafecf build: add GNU install to prerequisites
The recent removal of usbutils from core and replacement by hwdata in
packages has exposed hwdata's requirement for certain GNU options on
'install' (-T)  Other packages (sqm-scripts) have openwrt specific
makefile sections to avoid GNU options but I suspect this is going to
get harder in the future.

Add GNU install as a prerequisite and link into
$STAGING_DIR/host/etc/bin as per similar GNU utils

This resolves an issue building under MacOS which would otherwise use a
non-GNU options aware version of 'install'

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2021-03-25 23:38:59 +08:00
Tianling Shen
49e3204f02
Revert "treewide: add mirrors for GitHub Codeload"
This reverts commit 9796619efc.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 16:58:11 +08:00
Tianling Shen
66a13ba4b4
Revert "treewide: add mirrors for GitHub Archives"
This reverts commit 19980fd5b9.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 16:58:11 +08:00
Tianling Shen
fa4d6e9e0b
Revert "Package ctcgfw: use package-immortalwrt.mk"
This reverts commit 36c9fc3bda.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-23 09:26:08 +08:00
Tianling Shen
36c9fc3bda
Package ctcgfw: use package-immortalwrt.mk
Moved all duplicate parts to a single .mk file

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 21:56:03 +08:00
Tianling Shen
cf0bd81aff
netfilter: drop kmod-ipt-cgroup
This was included in ipt-extra already.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 17:05:47 +08:00
Supriya Mane
65658c5903
x86/64: Iptables seems to lack support for cgroup v2
FS#3574
Adding cgroup support enables adding rules on processes
to limit resources in terms of iptable policies

Signed-off-by: Supriya Mane <sm.supriya@globaledgesoft.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-22 17:05:32 +08:00
Tianling Shen
19980fd5b9
treewide: add mirrors for GitHub Archives
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-15 15:01:44 +08:00
Tianling Shen
9796619efc
treewide: add mirrors for GitHub Codeload
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-15 14:17:10 +08:00
Paul Spooren
806c61ab14 include: store ABIVersion in Packages index
With the existence of ABI versions there is no clean way to determine
the package name without an attached ABI version. The Packages index is
stored on device to know what packages are installed.

The ABIVersion was recently removed in c921650382 "build: drop ABI
version from metadata", while ABI versions still exists. This becomes a
problem if a user tries to export installed packages via `ubus call
rpcd-sys packagelist` which would return package names including the ABI
version. Trying to find these packages in a later release with changes
ABI version is impossible.

This commits adds the `ABIVersion` field again. Knowing both the
combined (SourceName + ABIVersion) and the `ABIVersion` it is possible
to calculate the package `SourceName` without storing it in the
on-device package list.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-03-11 12:00:56 +08:00
Tianling Shen
8f96a896fe
include/target: move specific cflags to own Makefile
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-08 20:18:52 +08:00
Tianling Shen
755dc0ffd7
target/aarch64: append crypto optimization to cflags
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-07 20:43:25 +08:00
Petr Štetiar
705644ed13 build: add which command to build requirements
`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
 ...
 Checking 'python3'... failed.

So make `which` utility host build requirement.

References: PR#3820 FS#3525
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-03-04 12:13:26 +08:00
Clemens Fruhwirth
50d91eb47e Revert "build: replace which with Bash command built-in"
This reverts commit c7aec47e5e.

The original commit replaces 'which' with 'command'. Sadly most of
them are not equivalent and for 'which -a', there is no easy
replacements that would not reimplement PATH parsing logic. Hence
revert. Keeping a dependency on which is absolutely fine.

Signed-off-by: Clemens Fruhwirth <clemens@endorphin.org>
2021-03-04 12:10:58 +08:00
Petr Štetiar
914e3b8917 build: fix checks for GCC11
Fedora 34 already uses GCC11.

Reported-by: Marcin Juszkiewicz <marcin-openwrt@juszkiewicz.com.pl>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-03-04 12:10:35 +08:00
Petr Štetiar
01799fe209 build: make GCC version 6+ minimal host build requirement
Currently minimal GNU supported GCC version is 7 (from May 2, 2017),
buildbots are using default GCC version 6 on Debian 9 (old stable),
current Debian stable has GCC version 8.3.0.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2021-03-04 12:10:11 +08:00
Tianling Shen
05131fd251
kernel: bump to 4.9.258, 4.14.222, 4.19.177
Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-03 00:40:01 +08:00
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