Commit Graph

600 Commits

Author SHA1 Message Date
Rosen Penev
e6bb10ac92 tools/meson: update to 0.60.1
change meson binary to use py extension. Fixes issue with meson's
symbolextractor using the host python instead of the system one.

We intentionally use a .py extension here so that meson launches
additional python scripts with the same build host python interpreter as
itself is running under (and not the host package one once it becomes
available)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-02-28 16:08:46 +08:00
Tianling Shen
3ade45c5fa
kernel: bump to 4.9.303, 4.14.268, 4.19.231
Added new Kconfig.

Manually rebased:
- generic/backport-4.19/716-v5.4-net-sfp-move-fwnode-parsing-into-sfp-bus-layer.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-02-25 05:03:08 +08:00
Petr Štetiar
f63af09f5b build: toplevel.mk: fix missing kconfig dependency tracking
Toplevel Make is not aware about changes in the `scripts/config/*conf`
targets and this is causing issues for during update to that part of
build tree, where one needs to handle this manually by either force
rebuilding the targets or running `make config-clean`. Fix this by
forcing the rebuild if necessary.

Fixes: #9297
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-02-24 11:37:07 +08:00
Tianling Shen
3d6248d855
kernel: bump to 4.9.297, 4.14.262, 4.19.225
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-01-25 19:40:05 +08:00
Tianling Shen
beae30302b
include/version: Update ImmortalWrt info
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-01-03 13:40:06 +08:00
Tianling Shen
9ac376921e
kernel: bump to 4.9.294, 4.14.259, 4.19.222
Resolve conflicted:
 - mvebu/513-arm64-dts-marvell-armada37xx-Add-emmc-sdio-pinctrl-d.patch

Remove upsteamed:
 - mvebu/524-PCI-aardvark-set-host-and-device-to-the-same-MAX-payload-size.patch
 - mvebu/527-PCI-aardvark-allow-to-specify-link-capability.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-12-25 03:54:06 +08:00
Oldřich Jedlička
1fbc7acc6d x86: added support to generate VHDX images
Added support to generate dynamic-sized VHDX images for Hyper-V.
Compile-tested on x86 and run-tested on Windows 10 21H2 (Hyper-V).

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2021-12-17 10:58:46 +08:00
Damien Mascord
a934057148 build: fix ldconfig executable error in python
The empty executable is causing problems with meson builds, due to the
error: OSError: [Errno 8] Exec format error: 'ldconfig'

This patch changes the empty ldconfig stub to symlink to /bin/true to
work around this issue.

Fixes: FS#4117
Fixes: 3bd31cc4d2 ("tools/meson: update to 0.60.0")

Signed-off-by: Damien Mascord <tusker@tusker.org>
Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> # Tested on Debian 11
Tested-By: Lucian Cristian <lucian.cristian@gmail.com>
Tested-By: Baptiste Jonglez <git@bitsofnetworks.org>
Cc: Rosen Penev <rosenp@gmail.com>
2021-12-09 23:53:05 +08:00
Rosen Penev
bb151a91ce tools/meson: update to 0.60.0
Add cmake support to meson. Otherwise only pkgconfig can be used.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-12-09 23:50:18 +08:00
Tianling Shen
097de3d38b
kernel: bump to 4.9.291, 4.14.256, 4.19.218
Upstreamed patches:
- ar71xx/patches-4.9/821-serial-core-add-support-for-boot-console-with-arbitr.patch
- ar71xx/patches-4.14/821-serial-core-add-support-for-boot-console-with-arbitr.patch
- ath79/patches-4.14/921-serial-core-add-support-for-boot-console-with-arbitr.patch

Manually rebased:
- generic/backport-4.14/273-batman-adv-Convert-packet.h-to-uapi-header.patch
- ipq806x/patches-4.14/0065-arm-override-compiler-flags.patch
- ipq806x/patches-4.19/0065-arm-override-compiler-flags.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-29 01:23:44 +08:00
Tianling Shen
75954bd23a
default-settings: split cnh variant into a separated pkg
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-29 01:11:22 +08:00
Tianling Shen
c3ca7d454b
kernel: bump to 4.9.290, 4.14.255, 4.19.217
Manually rebased:
- generic/pending-4.19/110-ehci_hcd_ignore_oc.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-18 20:27:23 +08:00
Tianling Shen
92c43b059b
target: add luci-lib-ipkg to default packages
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-11-17 00:07:15 +08:00
Eneas U de Queiroz
066d40393f build: allow package to be built for all variants
This allows a package to be rebuilt for all different VARIANTs.
To do so, set VARIANT=*.

The wpa-cli package is not getting built after changes made by
19aae94 [build: avoid rebuilds of unset VARIANT packages], because
wpa-cli is only built when compiling a variant that includes
supplicant support, and the first selected variant may not build it.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-11-16 13:18:49 +08:00
Eneas U de Queiroz
3c3cbd9214 build: kernel: avoid unnecessary package rebuilds
The $(LINUX_DIR)/.config timesptamp changes between runs of
make target/compile and make target/install (which builds the image).

Kernel-dependent packages and out of tree modules are built in between
those runs, and they check the .config timestamp to decide if they need
to be rebuilt.

Save the target/compile .config to use its timestamp if the file does
not change between runs.  That way the subsequent kernel packages are
not unnecessarily rebuilt when you run 'make' back to back.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-11-16 13:15:41 +08:00
Eneas U de Queiroz
7162cbb4b5 download: improve handling of invalid local files
4e19cbc553: [download: handle possibly invalid local tarballs] added a
FORCE rule to downloaded files, so that they will be always checked by
download.pl.

As a side-effect, check-compile will fail, forcing unnecessary package
rebuilds.
The check-compile.txt log shows (for libxml2 for example):
  Considering target file '.../dl/libxml2-2.9.12.tar.gz'.
    ...
    prerequisite 'FORCE' of target '.../dl/libxml2-2.9.12.tar.gz' does
    not exist.
    Must remake target '.../dl/libxml2-2.9.12.tar.gz'.
    ...
   Giving up on target file '...libxml2-2.9.12/.prepared_...'.
   Giving up on target file '...libxml2-2.9.12/.configured_...'.
   Giving up on target file '...libxml2-2.9.12/.built'.
   Giving up on target file '...stamp/.libxml2_installed'.
  Giving up on target file '.compile'.

Then the package is rebuilt even if it is not otherwise needed.

To fix this, instead of always forcing the download target to be remade,
check its hash first: if it matches, then the FORCE is not added.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2021-11-16 13:12:54 +08:00
Felix Fietkau
d0eae20238
build: add SUBDIR_MAKE_DEBUG variable to make it easier to debug package makefiles
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 94b0849c19)
2021-11-12 14:20:06 +08:00
Eneas U de Queiroz
8ae4d1d901
build: avoid rebuilds of unset VARIANT packages
If a Makefile defines some packages with VARIANT set, and others without
it, the latter will be built once for every different VARIANT set, each
build trumping the previous one.

Avoid rebuilds by only building unnamed variant packages when the first
variant is built.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 19aae949c6)
2021-11-12 14:19:51 +08:00
Tianling Shen
2352d1bfa9
kernel: bump to 4.9.288, 4.14.253, 4.19.214
Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-10-28 11:15:06 +08:00
Rosen Penev
6df9589d31 uclibc++: remove
No package here depends on it. Furthermore, uClibc++ is a fairly buggy
C++ library and seems to be relatively inactive upstream.

It also lacks proper support for modern C++11 features.

The main benefit of it is size: 66.6 KB	vs 287.3 KB on mips24kc. Static
linking and LTO can help bring the size down of packages that need it.

Added warning message to uclibc++.mk

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2021-10-26 23:50:42 +08:00
Felix Fietkau
573f489f8b include/cmake.mk: fix host builds with CMAKE_BINARY_SUBDIR
Use it in the same way as for target builds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2021-10-24 00:08:12 +08:00
Tianling Shen
9e56c46a39
kernel: bump to 4.9.287, 4.14.251, 4.19.212
Manually rebased:
- generic/backport-4.9/024-7-net-reorganize-struct-sock-for-better-data-locality.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-10-17 21:52:46 +08:00
Rosen Penev
d544c1b0d7 tools/meson: fix usage with SDK
The python path cannot be embedded in the meson binary as it changes
with the SDK.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-12 23:40:34 +08:00
Rosen Penev
b082f04ae3 tools/meson: update to 0.59.2
Update install procedure based on upstream feedback. Normally, meson is
to be installed with pip. But as pip is not mandated by the build
system, it cannot be used. Upstream provides a nice script to pack meson
automatically.

Moved src/ to files/. No need to copy to BUILD_DIR.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-10-08 23:39:42 +08:00
Tianling Shen
10a0ee06ee
kernel: bump to 4.9.285, 4.14.249, 4.19.209
Manually rebased:
- generic/pending-4.19/800-bcma-get-SoC-device-struct-copy-its-DMA-params-to-th.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-10-07 14:56:30 +08:00
Paul Spooren
8af77773f4 build: fix which detection on Fedora & MacOS
Fix Fedora 34/35 issue where 'which' detection of 'which' wasn't working
because Fedora use alias and proc

Fixup of fca5ad55d2 prereq-build: fix `which` detection on Fedora

Reported-by: Jani Partanen <rtfm@iki.fi>
Suggest-by: Etienne Champetier <champetier.etienne@gmail.com>
Tested-by: Georgi Valkov <gvalkov@abv.bg>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-10-03 23:50:40 +08:00
Marcin Juszkiewicz
22290dc38d prereq-build: recognize Python 3.10
Fedora 35 contains Python 3.10 as default version. Make use of it.

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
[fix commit subject]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2021-09-29 23:37:36 +08:00
Rosen Penev
e06ab0c6b3 tools: add meson
meson is a next generation build system designed to have good defaults,
simpler build files, and fast compilation.

It is built upon python and uses ninja for compilation. The latter
provides fast by default (parallel) and problem free compilation.

There are over 40 packages already successfully using meson. The next
commit will convert pkgconf to use meson compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2021-09-18 23:53:55 +08:00
Paul Spooren
e9cb0a7753
build: store artifacts in JSON
Multiple profiles create artifacts, these should be stored in the JSON
file as well, allowing downstream tooling to show those files, too.

Artifacts don't have specific filesystems so only the fields `name`,
`type` and `sha256` are available.

Rename env variable names from IMAGE_ to FILE_ prefixes to reflect that
images, kernels and artifacts are added with the same command.

Signed-off-by: Paul Spooren <mail@aparcar.org>
(cherry picked from commit 5ef4608c02)
2021-09-17 04:49:04 +08:00
Adrian Schmutzler
7984a95946
treewide: rename IMAGE_PREFIX/IMAGE_NAME to DEVICE_IMG_*
We so far had two variables IMG_PREFIX and IMAGE_PREFIX with
different content. Since these names are obviously quite
confusing, this patch renames the latter to DEVICE_IMG_PREFIX,
as it's a device-dependent variable, while IMG_PREFIX is only
(sub)target-dependent.

For consistency, also rename IMAGE_NAME to DEVICE_IMG_NAME, as
that's a device-dependent variable as well.

Cc: Paul Spooren <mail@aparcar.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
(cherry picked from commit ef2cb8572b)
2021-09-17 04:48:26 +08:00
Tianling Shen
1ebbbbfec6
target: drop some default packages
Let users to decide build them or not.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-09-11 05:01:06 +08:00
Tianling Shen
0c22299647
kernel: bump to 4.9.282, 4.14.246, 4.19.206
Resolve conflicted:
- generic/backport-4.19/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-09-06 06:39:19 +08:00
klever1988
36184296ba
target.mk: remove unexists packages 2021-09-05 07:40:45 +08:00
Andre Heider
a5e9b97611 prereq-build: require python3-distutils
Debian and Ubuntu ship a python3-minimal package which does not include
the distutils module. This is not supported by upstream and can be
considered a broken python distribution.

In practice, many scripts depend on said module, and this is a reoccuring
pain point for building various OpenWrt packages.

Require and check for said module, enough time has been wasted on this.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2021-08-22 12:16:26 +08:00
Daniel Golle
cdea9c5d9d image: fix build with SELinux
The option '-xattr' for mksquashfs4 should be '-xattrs' which lead to
build failure with SELinux enabled. Add the missing 's'.

Fixes: 4baf47b9a8 ("images: squashfs: xattrs should not depend on buld host")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2021-08-19 12:10:37 +08:00
Tianling Shen
9bfc21a8d3
kernel: bump to 4.9.280, 4.14.244, 4.19.204
Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-08-17 19:38:52 +08:00
Tianling Shen
54c0966bb1
kernel: bump to 4.9.278, 4.14.242, 4.19.201
Resolve conflicted:
- generic/pending-4.14/690-net-add-support-for-threaded-NAPI-polling.patch
- generic/pending-4.19/690-net-add-support-for-threaded-NAPI-polling.patch

Refreshed all patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-08-06 22:23:34 +08:00
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