Commit Graph

2946 Commits

Author SHA1 Message Date
Adrian Schmutzler
e17529a3e3 Revert "build: process variable exports from toplevel.mk only once"
This reverts commit ef7c34c1d1.

The commit seems to break all buildbots with messages like:

/builder/shared-workdir/build/include/toplevel.mk:15:
  /builder/shared-workdir/build/include/toplevel-vars.mk: No such file or directory

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-16 22:58:44 +02:00
Felix Fietkau
14bad2001f build: prevent excessive re-evaluation of PKG_VERSION
version_abbrev uses $(shell) and the ?= is causing make to run the command
over and over again, causing a significant build slowdown

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-10-16 21:39:10 +02:00
Felix Fietkau
ef7c34c1d1 build: process variable exports from toplevel.mk only once
These run a lot of expensive shell calls, so redundant calls should be
avoided

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-10-16 21:39:09 +02:00
John Audia
0efec6a008 kernel: bump 5.4 to 5.4.71
All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711,
              lantiq/Easybox 904 xDSL
Run-tested:   ipq806x/R7800, lantiq/Easybox 904 xDSL

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add lantiq test reports]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-15 17:46:54 +02:00
Tony Ambardar
1b27591ddb malta: update MIPS64 ISA to R2
Usage of current R1 ISA is inconsistent with the MIPS32 subtarget, little
used and has limited utility for testing.

Many distros target a minimum R2 ISA. Debian MIPS 32-bit/64-bit ports all
use MIPS R2 ISA since Stretch, for example. Fedora's MIPS arch also targets
the R2 ISA for 32-bit/64-bit.

Widely used MIPS64 platforms like Octeon are based on the MIPS R2 ISA or
later, and benefit from having a compatible test platform in OpenWRT.

While Linux does support MIPS64 R1 targets, its usefulness for development
and testing is limited. As an example, the modern Linux eBPF JIT requires
a MIPS R2 ISA or later.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
[Refresh config and fix README]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-10-11 16:16:24 +02:00
John Audia
ab1bd57656 kernel: bump 5.4 to 5.4.70
All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2020-10-09 23:19:40 +02:00
Sven Roederer
ae12a747ca build, imagebuilder: Do not require compilers
The buildroot and SDK both require the compilers (gcc, g++) to be
installed on the host system, however the ImageBuilder uses precompiled
binaries.

This patch changes the prerequirements checks to skip the checking for
the compilers if running as ImageBuilder. A similar change has been
made for libncurses-dev in 4a1a58a3e2.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
Acked-by: Paul Spooren <mail@aparcar.org>
2020-10-09 01:48:47 +01:00
John Audia
d6a9a92e32 kernel: bump 5.4 to 5.4.69
Seemingly unneeded based on new upstream code so manually deleted:
 layerscape:
  820-usb-0007-usb-dwc3-gadget-increase-timeout-value-for-send-ep-c.patch

Manually merged:
 generic-hack:
  251-sound_kconfig.patch

All other modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711
Run-tested: ipq806x/R7800, lantiq/Easybox 904 xDSL

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add lantiq test report, minor commit message clarification]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-02 22:02:26 +02:00
Jo-Philipp Wich
257110c08a netfilter: ship nft_chain_nat on 5.1+ kernels
The former nft_chain_nat_ipv4 and nft_chain_nat_ipv6 modules have been merged
into a common nft_chain_nat module starting with Linux 5.1.

Ensure that this common module is shipped along with kmod-nft-nat on recent
kernels.

While we're at it, also apply version constraints to other nft modules that
have been merged into the core with newer kernels.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2815#comment8016
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-10-02 14:40:31 +02:00
Daniel Golle
26aa7952d5 image.mk: evaluate /etc/selinux/config to choose SELinux policy
Instead of hardcoding 'targeted' policy, evaluate /etc/selinux/config
in rootfs to choose according to which policy files in the rootfs got
to be labeled.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-09-29 01:48:27 +01:00
Paul Spooren
96d1dc5ebf policycoreutils: install to host/bin not hostpkg
By installing policycoreutils to host/bin it is also available within
the ImageBuilder and SDK, allowing to correctly label both filesystems
and packages.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-29 00:06:32 +01:00
John Audia
283cdb30ab kernel: bump 5.4 to 5.4.68
All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x, ath79/generic, bcm72xx/bcm2711
Run-tested: ipq806x (R7800)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2020-09-28 16:23:11 +02:00
Piotr Dymacz
1cab34dbae target.mk: enable iwinfo by default with any wpad variant
There are currently several variants of 'wpad' package but the 'iwinfo'
is included by default only if 'wpad', 'wpad-{basic*,mini}' or 'nas'
packages are included in {DEVICE,DEFAULT}_PACKAGES. Use 'wpad-*'
pattern to include 'iwinfo' with any 'wpad' variant.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
2020-09-28 01:28:37 +02:00
Daniel Golle
e8b34880f9 policycoreutils: fix host utils rpath and bin directory
'setfiles' and others should be installed to $(STAGING_DIR_HOSTPKG)/bin
rather than $(...)/sbin which isn't in PATH.
Also using -Wl,-rpath to set library search location instead of setting
LD_LIBRARY_PATH when calling setfiles in image.mk.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-09-27 17:22:01 +01:00
Christian Lamparter
fed1788689 scripts: mkits.sh make it possible to specify fdt@#
Some bootloaders are really keen on just one special
fdt in a multi-image fit image. This is a problem, because
currently this is fixed to "fdt@1".

This patch introduces a new device variable:
DEVICE_FDT_NUM that allows to specify the right
fdt number.

If the value is absent "1" will be chosen.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2020-09-25 19:32:33 +02:00
John Audia
3ea1b5b745 kernel: bump 5.4 to 5.4.67
All modifications made by update_kernel.sh

Build system: x86_64
Build-tested: ipq806x, lantiq/xrx200 and ath79/generic
Run-tested: ipq806x (R7800), lantiq (Easybox 904 xDSL)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add test on lantiq]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-24 18:53:23 +02:00
John Audia
770a9c6787 kernel: bump 5.4 to 5.4.66
All modifications made by update_kernel.sh/no manual intervention needed

Run-tested: ipq806x (R7800), ath79 (Archer C7v5), x86/64

No dmesg regressions, everything appears functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add run test from PR]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-19 12:41:29 +02:00
Jo-Philipp Wich
0b82ebaccb Revert "build: create tmp/userids file"
This reverts commit 34cc2c9a99.

The reverted shell code is a very poor reimplementation of the existing
package-metadata.pl usergroup subcommand and the resulting file is not
used anymore, so drop this code.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-09-14 17:11:06 +02:00
Jo-Philipp Wich
7a29e24dbb build: dump effective user/group id mapping to file
This file can be subsequently used to resolve symbolic user or group names
to their numeric IDs when packing ipk archives.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-09-14 17:01:44 +02:00
Paul Spooren
34cc2c9a99 build: create tmp/userids file
Multiple packages contain a USERID variable defining required user and
group for the package to run. With the recent addition of
"PKG_FILE_MODES" it is possible to define user and group of specific
files, replacing (possibly insecure) post-inst scripts. These modes are
set during build time and put directly into the packages.

To allow user and group names rather than the numeric values, a mapping
like `/etc/passwd` is required by the `ipkg-build` script, mapping names
defined in "PKG_FILE_MODES" to a numeric value, as the build system does
not create any users during build.

This commit adds a single line to the `prepare-tmpinfo` target, so that
everytime the feeds are updated the *passwd like* content of
`./tmp/userids` is updated.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-09-14 10:54:52 +01:00
John Audia
17e64b9447 kernel: bump 5.4 to 5.4.65
All modifications made by update_kernel.sh/no manual intervention needed

Build-tested: x86_64
Run-tested: ipq806x (R7800)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
2020-09-12 23:39:25 +02:00
John Audia
bee76f1bfa kernel: bump 5.4 to 5.4.64
Remove upstreamed patches:
 generic-backport
  701-v5.5-net-core-use-listified-Rx-for-GRO_NORMAL-in-napi_gro.patch

Manually merged:
 mediatek/patches-5.4
  0603-net-dsa-mt7530-Extend-device-data-ready-for-adding-a.patch

All other modifications made by update_kernel.sh

Build-tested: ipq806x, lantiq/xrx200, mvebu, x86/64
Run-tested: ipq806x (R7800), mvebu (mamba, rango),
  lantiq/xrx200 (Easybox 904 xDSL), x86/64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[add community build/run tests to commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-12 01:28:50 +02:00
Sebastian Kemper
f58d323534 build: allow file modes per binary package
Currently the global variable PKG_FILE_MODES is used for all ipkg
creations. This works for Makefiles which output a single package, or
variants of a single package.

But if a Makefile outputs multiple packages that each contain different
files, setting PKG_FILE_MODES causes build failure when any of the files
in the variable do not exist in the folder that is currently being
packaged.

Example:

/openwrt/staging_dir/host/bin/fakeroot -l /openwrt/staging_dir/host/lib/libfakeroot.so -f /openwrt/staging_dir/host/bin/faked /openwrt/scripts/ipkg-build -m "/usr/lib/mariadb/plugin/auth_pam_tool_dir:root:376:0750" /openwrt/build_dir/target-mips_24kc_musl/mariadb-10.4.13/ipkg-mips_24kc/mariadb-server-plugin-disks /openwrt/bin/packages/mips_24kc/packages
+chown: cannot access '/openwrt/build_dir/target-mips_24kc_musl/mariadb-10.4.13/ipkg-mips_24kc/mariadb-server-plugin-disks//usr/lib/mariadb/plugin/auth_pam_tool_dir': No such file or directory

This commit changes the file mode handling a bit. The file mode can now
be set either globally via PKG_FILE_MODES (no behavior change) or on a
per-package basis via FILE_MODES. This way specific file modes can be
used for any particular package.

This behavior is already used for other OpenWrt variables, hence it is
familiar:

PKG_MAINTAINER vs MAINTAINER
PKG_SOURCE_SUBDIR vs SUBDIR
PKG_LICENSE vs LICENSE
...

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2020-09-09 14:13:59 +01:00
John Audia
2c2fcbd2e0 kernel: bump 5.4 to 5.4.63
Manually merged:
 hack-5.4
  230-openwrt_lzma_options.patch
 bcm27xx
  950-0283-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch
 x86
  011-tune_lzma_options.patch

Remove upstreamed patches in collaboration with Ansuel Smith:
 ipq806x
  093-1-v5.8-ipq806x-PCI-qcom-Add-missing-ipq806x-clocks-in-PCIe-driver.patch
  093-2-v5.8-ipq806x-PCI-qcom-Change-duplicate-PCI-reset-to-phy-reset.patch
  093-3-v5.8-ipq806x-PCI-qcom-Add-missing-reset-for-ipq806x.patch

All other modifications made by update_kernel.sh

Build-tested: bcm27xx/bcm2708, ipq806x, x86/64
Run-tested: ipq806x (R7800), x86/64

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[update commit message/tested]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-06 19:55:19 +02:00
Felix Fietkau
7716a43092 build: fix extreme build system slowdown caused by SOURCE_DATE_EPOCH changes
Adding inline shell invocations in per-target variables causes them to be
executed over and over again, which causes a significant slowdown.
Fix this by evaluating it only once per package directory

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-09-05 11:26:57 +02:00
Adrian Schmutzler
6362a04725 kernel: remove obsolete kernel version switches for 4.14
This removes switches dependent on kernel version 4.14 as well as
several packages/modules selected only for that version.

This also removes sched-cake-virtual, which is not required anymore
now that we have only one variant of cake.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-02 16:29:23 +02:00
Adrian Schmutzler
95acc4fe0e kernel: remove support for kernel 4.14
No target uses kernel 4.14 anymore.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-09-02 16:29:23 +02:00
Daniel Golle
729a75c3b2 build: unbreak fakeroot in SDK
Using fakeroot without passing the paths to libfakeroot.sh and faked
causes havoc. Use the $(FAKEROOT) Make variable which includes them.

Fixes: 353ce2e521 ("build: ipkg-build use fakeroot with PKG_FILE_MODES")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2020-09-01 04:10:41 +01:00
Paul Spooren
c1875d1ebb build: switch VERSION_REPO to HTTPS
The variable VERSION_REPO is used by opkg to download package(list)s.
Now that the default installation support encrypted HTTP opkg should
make use of it.

Suggested-by: Petr Štetiar <ynezz@true.cz>
Suggested-by: Baptiste Jonglez <baptiste@bitsofnetworks.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Baptiste Jonglez <baptiste@bitsofnetworks.org>
2020-08-31 11:26:10 +01:00
Paul Spooren
cc5bdcd055 build: sort default packages and split by newlines
The line of default packages became very long and it is easier to read
one package per line, therefore split it by newlines and sort it
alphabetically.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-31 11:26:10 +01:00
Paul Spooren
e79df3516d build: add libustream and certs to default pkgs
To allow HTTPS usage on a router it requires both certificates
(ca-bundle) and a fitting libustream library (libustream-wolfssl)

By adding both, uclient-fetch and wget can connect to encrypted HTTP.

This allows opkg to update package lists in a more secure fashion.

Suggested-by: Petr Štetiar <ynezz@true.cz>
Suggested-by: Baptiste Jonglez <baptiste@bitsofnetworks.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-31 11:26:10 +01:00
Paul Spooren
62d5ec7306 build: store SourceDateEpoch in manifest
The usage of granular `SOURCE_DATE_EPOCH` for packages is an
incrementing integer which could be useful for downstream tooling,
therefore add it to the packages manifest.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-31 11:18:06 +01:00
Paul Spooren
fd29f2bcd9 build: store granular timestamps in packages
With the new `SOURCE` argument of `get_source_date_epoch` it is possible
to set package timestamps based on actual package changes rather thane
$TOPDIR changes.

This commit adds a new variable PKG_SOURCE_DATE_EPOCH which is used by
the `ipkg` build script. As a fallback the existing SOURCE_DATE_EPOCH is
used or as last resort the current time.

The redundant checks for `.git/` and `.svn/` are removed.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-31 11:18:06 +01:00
Paul Spooren
353ce2e521 build: ipkg-build use fakeroot with PKG_FILE_MODES
The `ipkg-build` script converts a folder into a `opkg` installable
package. Until now it would use root:root for all packages and try to
preserve file modes.

This has the two drawbacks of packages want to add non-root files or add
SUID files, like the `sudo` package does.

To give more flexibility regarding file modes and avoid init script
hacks, a new variable called `PKG_FILE_MODES`. The variable contains a
list of files modes in the format `path:owner:group:mode`.

An example for the `sudo` package below:

```
PKG_FILE_MODES:=\
        /usr/bin/sudo:root:root:4755 \
        /etc/sudoers:root:root:0440
```

The `ipkg-build` now runs within a fakeroot environment to set any mode
and directly store it in the resulting `ipk` package archive.

Both options `-o` and `-g` are no longer required due to the introduction
of the more flexible `-m` options, which takes the `PKG_FILE_MODES` as
input.

Lastly the option `-c` is removed as it's unused within the script.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-08-31 11:13:12 +01:00
Thomas Petazzoni
aee58d52ce build: add support for SELinux to include/image.mk
This allows the build process to prepare a squashfs filesystem for use
with SELinux.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[rebase, add commit message]
Signed-off-by: W. Michael Petullo <mike@flyn.org>
2020-08-31 01:15:41 +01:00
John Audia
05b8e84362 kernel: bump 5.4 to 5.4.61
Manually merged:
  backport-5.4
     011-kbuild-export-SUBARCH.patch
  layerscape
    701-net-0262-net-dsa-ocelot-add-tagger-for-Ocelot-Felix-switches.patch

All other modifications made by update_kernel.sh

Build-tested: x86/64, lantiq/xrx200, ramips/mt7621
Run-tested: ipq806x (R7800), lantiq/xrx200, x86/64, ramips (RT-AC57U)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
[minor commit message adjustments]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-30 19:44:47 +02:00
Jeffery To
f8b775e287 cmake: Disable use of package registries
CMake provides a user package registry (stored in ~/.cmake/packages) and
a system package registry (not available on non-Windows platforms).

The "export(PACKAGE)" command may store information in the user package
registry, and the "find_package()" command may search both user and
system package registries for information.

This sets various variables to disable the use of these package
registries (both saving and retrieval of package information).

This also sets deprecated variables that perform similar functions, in
case external toolchains include older versions of CMake.

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
2020-08-24 18:53:59 +02:00
Adrian Schmutzler
36aa27189a kernel: bump 5.4 to 5.4.60
Deleted upstream patches:
  generic:
    041-genirq-affinity-Make-affinity-setting-if-activated-o.patch
  ipq806x:
    093-5-v5.8-ipq806x-PCI-qcom-Define-some-PARF-params-needed-for-ipq8064-SoC.patch
    093-6-v5.8-ipq806x-PCI-qcom-Add-support-for-tx-term-offset-for-rev-2_1_0.patch

Merged manually:
  ipq806x:
    093-4-v5.8-ipq806x-PCI-qcom-Use-bulk-clk-api-and-assert-on-error.patch
  layerscape:
    804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch

Build-tested: ath79/generic, ipq806x, layerscape/armv7, layerscape/armv8_64b
Run-tested: ipq806x (R7800)

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-24 17:33:58 +02:00
Adrian Schmutzler
83b1e40561 kernel: bump 5.4 to 5.4.59
Removed since added upstream:
  bcm27xx:
    950-0428-staging-vchiq_arm-Add-a-matching-unregister-call.patch
  lantiq:
    0800-spi-lantiq-ssc-Fix-warning-by-using-WQ_MEM_RECLAI.patch

Manually adjusted patches:
  layerscape:
    801-audio-0005-Revert-ASoC-fsl_sai-Add-support-for-SAI-new-version.patch

Build-tested: ath79/generic, ramips, lantiq/xrx200, lantiq/xway,
   mvebu/cortexa9, sunxi/a53
Run-tested: ipq806x (R7800), layerscape (LS1012A-FRDM, LS1046A-RDB)

Building on layerscape is only possible with workaround from PR #3179.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-By: John Audia <graysky@archlinux.us> [ipq806x]
Tested-by: Pawel Dembicki <paweldembicki@gmail.com> [layerscape]
2020-08-20 14:19:39 +02:00
John Audia
da98603597 kernel: bump 5.4 to 5.4.58
This PR is a blend of several kernel bumps authored by ldir taken from his
staging tree w/ some further adjustments made by me and update_kernel.sh

Summary:
Deleted upstreamed patches:
  generic:
    742-v5.5-net-sfp-add-support-for-module-quirks.patch
    743-v5.5-net-sfp-add-some-quirks-for-GPON-modules.patch
  bcm63xx:
    022-v5.8-mtd-rawnand-brcmnand-correctly-verify-erased-pages.patch
    024-v5.8-mtd-rawnand-brcmnand-fix-CS0-layout.patch
  mediatek:
    0402-net-ethernet-mtk_eth_soc-Always-call-mtk_gmac0_rgmii.patch

Deleted patches applied differently upstream:
  generic:
    641-sch_cake-fix-IP-protocol-handling-in-the-presence-of.patch

Manually merged patches:
  generic:
    395-v5.8-net-sch_cake-Take-advantage-of-skb-hash-where-appropriate.patch
  bcm27xx:
    950-0132-lan78xx-Debounce-link-events-to-minimize-poll-storm.patch
  layerscape:
    701-net-0231-enetc-Use-DT-protocol-information-to-set-up-the-port.patch

Build system: x86_64
Build-tested: ath79/generic, bcm27xx/bcm2708, bcm27xx/bcm2711,
  imx6, mvebu/cortexa9, sunxi/a53
Run-tested: Netgear R7800 (ipq806x)

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
Tested-By: Lucian Cristian <Lucian.cristian@gmail.com> [mvebu]
Tested-By: Curtis Deptuck <curtdept@me.com> [x86/64]
[do not remove 395-v5.8-net-sch_cake-Take-advantage-... patch,
adjust and refresh patches, adjust commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-By: John Audia <graysky@archlinux.us> [ipq806x]
2020-08-18 18:14:54 +02:00
Adrian Schmutzler
751486b31f build: fix README.md reference after rename
The README file is displayed on "make help", but updating the
command has been overlooked during the README -> README.md
rename.

Fix it.

Fixes: d0113711a3 ("README: port to 21st century")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-12 14:03:17 +02:00
Paul Spooren
1fdf6b745c treewide: replace which with command -v
Fix shellcheck SC2230
> which is non-standard. Use builtin 'command -v' instead.

Using `command -v` is POSIX compliant while `which` is not.  Also to
mention, `command -v` is a shell builtin whereas `which` is a separate
busybox applet.

Once applied to everything concerning OpenWrt we can disable the busybox
feature `which` and save 3.8kB.

Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Paul Spooren <mail@aparcar.org>
[also replace cases in zram-swap]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-12 11:08:05 +02:00
Hauke Mehrtens
2f3d7abccd kernel: Update kernel 4.14 to version 4.14.193
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-10 19:34:37 +02:00
Hauke Mehrtens
fdac05b741 kernel: Update kernel 4.19 to version 4.19.138
Compile and run tested on lantiq/xrx200

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-08-10 19:34:37 +02:00
Adrian Schmutzler
fbd4214bb0 build: improve message for incompatible image on "legacy" devices
It has been reported that the current message displayed during
upgrade with compat_version change is misleading for "legacy"
devices, i.e. those without the "new" fwtool. This is partially
caused by the fact that we need to exploit the supported_devices
string to get some message text displayed for these devices.

This patch modifies the message to make it more helpful and
include additional information, e.g.

  Device linksys,wrt3200acm not supported by this image
  Supported devices: linksys,wrt3200acm linksys-whateverelse - Image
  version mismatch: image 1.1, device 1.0. Please wipe config during
  upgrade (force required) or reinstall. Reason: Config cannot be
  migrated from swconfig to DSA

Note that the line breaks (except the one before Supported devices)
are added manually here, I hesitate to hack \n into the
supported_devices as well. The "Reason:" will only be displayed if
DEVICE_COMPAT_MESSAGE is set for the device, otherwise
"Please check documentation ..." will be shown instead.

While at it, also rearrange the code in image-commands.mk to
make lines shorter and remove the double filter-out command.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-08 16:13:51 +02:00
Petr Štetiar
c487cf8e94 hostapd: add wpad-basic-wolfssl variant
Add package which provides size optimized wpad with support for just
WPA-PSK, SAE (WPA3-Personal), 802.11r and 802.11w.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
[adapt to recent changes, add dependency for WPA_WOLFSSL config]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-07 12:02:19 +02:00
Felix Fietkau
6c29604438 build: set up host command for egrep
It is used for the kernel build and uses GNU specific features

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2020-08-06 13:17:13 +02:00
Adrian Schmutzler
1d9542c50e build: image: return sizes if check-size fails
Instead of just printing a warning that an image is too big, also
print both actual size and limit in the string:

WARNING: Image file somename.bin is too big: 2096101 > 1048576

Since the kernel size is checked via the same function (if
KERNEL_SIZE is specified), this will also apply to the kernel
image size check.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-03 10:40:32 +02:00
Adrian Schmutzler
93d37fad86 build: image: drop unused check-kernel-size recipe
The recipe check-kernel-size is not used in the entire tree. Instead,
we already check the size of the kernel image in Device/Build/kernel
in image.mk via check-size function if KERNEL_SIZE is defined.

Therefore, drop the function. Using it would be redundant anyway.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-08-02 15:54:43 +02:00
Adrian Schmutzler
02d6ac1060 base-files: fwtool: make compat_version backward compatible
So far, the compatibility mechanism only works if both device and
image are already updated to the new routines. This patch extends
the sysupgrade metadata and fwtool_check_image() to account for
"older" images as well:

The basic mechanism for older devices to check for image compatibility
is the supported_devices entry. This can be exploited by putting
a custom message into this variable of the metadata, so older FW
will produce a mismatch and print the message as it thinks it's the
list of supported devices. So, we have two cases:

device 1.0, image 1.0:
  The metadata will just contain supported_devices as before.

device 1.0, image 1.1:
  The metadata will contain:

  "new_supported_devices":["device_string1", "device_string2", ...],
  "supported_devices":["Image version 1.1 incompatible to device: ..."]

  If the device is "legacy", i.e. does not have the updated fwtool.sh,
  it will just fail with image check and print the content of
  supported_devices. If DEVICE_COMPAT_MESSAGE is set, this will be
  printed on old devices as well through the same mechanism. Otherwise
  a generic "Please check documentation ..." is appended.

  Upgrade can still be performed with -F like when
  SUPPORTED_DEVICES has been removed to prevent bricking.

  If the device has updated fwtool.sh (but is 1.0), it will just use
  the new_supported_devices instead, and work as intended (flashing
  with -n will work, flashing without will print the appropriate
  warning).

This mechanism should provide a fair tradeoff between simplicity
and functionality.

Since we touched a lot of fields in metadata, this also bumps
metadata_version to 1.1.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-31 11:40:15 +02:00
Adrian Schmutzler
6867d86e08 build: add DEVICE_COMPAT_VERSION and DEVICE_COMPAT_MESSAGE
We regularly encounter the situation that devices are subject to
changes that will make them incompatible to previous versions.
Removing SUPPORTED_DEVICES will not really be helpful in most of these
cases, as this only helps after a rename.

To solve this situation, this patchset introduces a compatibility
version for devices. It will be implemented via a per-device
Make variable DEVICE_COMPAT_VERSION, which will be set to 1.0
globally by default and then can be overwritten as needed.

Furthermore, a variable DEVICE_COMPAT_MESSAGE is added, where
a message to be displayed during sysupgrade may be specified
optionally.

This patch only implements the build variables and adds them
to the sysupgrade metadata, the evaluation will be addressed
in a subsequent patch.

To set it, one would just need to add the following to a device node:

define Device/somedevice
  ...
  DEVICE_COMPAT_VERSION := 1.1
  DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
endef

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-31 11:40:15 +02:00
Adrian Schmutzler
1d5260cf72 build: add option to mark devices as BROKEN
By specifying "BROKEN := 1" or "BROKEN := y" for a device, it will be
hidden (and deselected) by default. By that, it provides a stronger
option to "disable" a device beyond just using DEFAULT := n.

To make these devices visible, just enable the BROKEN option in
developer settings as already implemented for targets and packages.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-30 21:49:07 +02:00
John Audia
b6443367d8 kernel: bump 5.4 to 5.4.52
update_kernel.sh refreshed all patches, no human interaction was needed

Build system: x86_64
Run-tested: Netgear R7800 (ipq806x)

Signed-off-by: John Audia <graysky@archlinux.us>
2020-07-17 11:00:33 +02:00
Roman Yeryomin
2ca084ccaa 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>
2020-07-11 15:19:53 +02:00
Eneas U de Queiroz
11192484fa build: reduce number of files passed to ipk-remove
Instead of using xargs to pass a huge number of files to
script/ipkg-remove, which will usually pick only one, use a more
restrictive wildcard so that, currently, at the most 325 files are
examined, instead of up to over 2,300.  The 325-file package is python,
which is picking up python3* ipks.  It is about to be removed.
Runner-up is ddns-scripts with 7 files.

This makes a second run of make package/luci/compile go from
real 16.40s; user 17.42s; sys 2.73s
to
real 10.71s; user 9.51s; sys 1.27s

There is a caveat though: if one were to remove the ABI_VERSION of a
package that ends in a digit [0-9], then the old package ipk will not be
removed from the bin directory by make package/abc2/clean.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-07-11 13:33:28 +02:00
Eneas U de Queiroz
78d1f3ac61 build: call ipkg-remove using xargs if #args>=512
The wildcard call to clean up luci package (luci*) can pick up over
2,300 files when the full tree is built. Running make package/luci/clean
or a second run of make package/luci/compile would fail with an
'Argument list too long' error.

To avoid that, a maybe_use_xargs function was created that runs the
command straight as usual if the number of arguments is < 512, or saves
the list in a temporary file and feeds it to xargs otherwise.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-07-11 13:33:28 +02:00
Eneas U de Queiroz
40acc13ca7 build: package-ipkg: avoid calling wildcard twice
Instead of calling $(wildcard) to check if the removal list is empty,
then calling it again to actually remove the files, define a function so
that the arguments are expanded only once when it gets called.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-07-11 13:33:28 +02:00
John Audia
039fd27173 kernel: bump 5.4 to 5.4.51
update via update_kernel.sh -v -u 5.4

Removed upstreamed patches:
 350-MIPS-Add-missing-EHB-in-mtc0-mfc0-sequence-for-DSPen.patch

Script refreshed patches:
 902-debloat_proc.patch
 904-debloat_dma_buf.patch

Attempted merge conflict in following patches:
 0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch

Build system: x86_64
Build tested: ipq806x (Netgear R7800)

Signed-off-by: John Audia <graysky@archlinux.us>
[fixed sha256sum of the tarball]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-07-11 13:33:28 +02:00
Rosen Penev
691bf54369 target.mk: change i386 CPU type to pentium-mmx
f4f8f4a180 broke ffmpeg compilation with x86

The reason is that ffmpeg's x86 assembly requires at least MMX, which the
pentium CPU_TYPE was preventing.

Fixes ffmpeg compilation on x86_legacy and x86_geode.

Ref: https://github.com/openwrt/openwrt/pull/3061
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-08 22:54:34 +02:00
Sergio E. Nemirowski
645b1ec3e2 build: add 'make kernel_xconfig' command
This adds the kernel_xconfig make target.

Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
2020-07-08 16:07:05 +02:00
Sergio E. Nemirowski
8fb0b15efd build: add nconfig
Add support for make target nconfig (ncurses)

Reviewed-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Sergio E. Nemirowski <sergio@outerface.net>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-07-07 19:47:24 +02:00
David Bauer
cf6f01c0e6 build: conditionally enable testing-kernel feature
Only enable the testing-kernel feature for the target when the testing
kernel version does not match the stable kernel version.

This way, the option for building the testing kernel in the build config
menu is only exposed when there's a testing kernel available.

Signed-off-by: David Bauer <mail@david-bauer.net>
Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-07-07 10:32:09 +02:00
Hauke Mehrtens
68d9cb8214 kernel: Update kernel 5.4 to version 5.4.50
Run tested: ath79, ipq40xx
Build tested: ath79, ipq40xx

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-04 21:12:42 +02:00
Hauke Mehrtens
6062d85892 kernel: Update kernel 4.19 to version 4.19.131
Fixes:
- CVE-2020-10757

The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was
backported which needed some adaptations to other code.

Run tested: ath79
Build tested: ath79

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-04 21:12:42 +02:00
Hauke Mehrtens
ce958dd88a kernel: Update kernel 4.14 to version 4.14.187
Fixes:
- CVE-2020-10757

The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was
backported which needed some adaptations to other code.

Build tested: ramips

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2020-07-04 21:12:42 +02:00
Paul Spooren
263f7e5bbd build: store default/device packages in JSON
With this commit the `profiles.json` contain both the target specific
`default_packages` as well as the device specific `device_packages` as a
array of strings.

This information is required for downstream projects like the various
web-based interactive firmware generators.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-06-30 23:21:10 +01:00
Petr Štetiar
e44e60b290 kernel: bump 5.4 to 5.4.48
Resolved merge conflict in the following patches:

 layerscape: 701-net-0213-dpaa2-eth-Add-CEETM-qdisc-support.patch
 ramips: 0013-owrt-hack-fix-mt7688-cache-issue.patch

Refreshed patches, removed upstreamed patch:

 bcm63xx: 020-v5.8-mtd-rawnand-brcmnand-fix-hamming-oob-layout.patch

Run tested: qemu-x86-64
Build tested: x86/64

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-06-22 12:51:22 +02:00
Ian Cooper
b933f9cf0c toolchain: remove gcc libssp and use libc variant
Removes the standalone implementation of stack smashing protection
in gcc's libssp in favour of the native implementation available
in glibc and uclibc. Musl libc already uses its native ssp, so this
patch does not affect musl-based toolchains.

Stack smashing protection configuration options are now uniform
across all supported libc variants.

This also makes kernel-level stack smashing protection available
for x86_64 and i386 builds using non-musl libc.

Signed-off-by: Ian Cooper <iancooper@hotmail.com>
2020-06-17 23:57:07 +02:00
Petr Štetiar
90f930e0c2 kernel: bump 5.4 to 5.4.46
Refreshed patches.

Run tested: qemu-x86-64, wrt3200acm
Build tested: x86/64, imx6, mvebu/cortexa9, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-06-16 23:36:26 +02:00
Petr Štetiar
e5aa498acb kernel: bump 5.4 to 5.4.45
Fixes CVE-2020-10757 via upstream commit df4988aa1c96 ("mm: Fix mremap
not considering huge pmd devmap").

Resolved merge conflict in the following patches:

 bcm27xx: 950-0128-gpiolib-Don-t-prevent-IRQ-usage-of-output-GPIOs.patch

Refreshed patches, removed upstreamed patch:

 generic: 751-v5.8-net-dsa-mt7530-set-CPU-port-to-fallback-mode.patch
 generic: 754-v5.7-net-dsa-mt7530-fix-roaming-from-DSA-user-ports.patch

Run tested: qemu-x86-64
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-06-09 16:59:33 +02:00
Paul Spooren
4a1a58a3e2 build, imagebuilder: Do not require libncurses-dev
The buildroot and SDK both require `libncurses-dev` to be installed on
the system, however the ImageBuilder uses precompiled binaries.

This patch changes the prerequirements checks to skip the
`libncurses-dev` part if running as ImageBuilder.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2020-06-03 16:49:28 +02:00
Rosen Penev
dc467eac38 prereq-build: test for perl's Data::Dumper
Required for installation of autoconf:

make[5]: Entering directory `/openwrt/build_dir/host/autoconf-2.69'
Making all in bin
make[6]: Entering directory `/openwrt/build_dir/host/autoconf-2.69/bin'
autom4te_perllibdir='..'/lib AUTOM4TE_CFG='../lib/autom4te.cfg'
../bin/autom4te -B '..'/lib -B '..'/lib         --language M4sh --cache
 '' --melt ./autoconf.as -o autoconf.in

Can't locate Data/Dumper.pm in @INC (@INC contains: ../lib
/usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
../lib/Autom4te/C4che.pm line 33.
BEGIN failed--compilation aborted at ../lib/Autom4te/C4che.pm line 33.
Compilation failed in require at ../bin/autom4te line 40.
BEGIN failed--compilation aborted at ../bin/autom4te line 40.
make[6]: *** [autoconf.in] Error 2

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-06-03 16:49:28 +02:00
Adrian Schmutzler
057e5f6ede treewide: provide consistent basic DEVICE_TYPE
While the effective "default" based on frequent use is "router", the
DEVICE_TYPE variable actually provides a "basic" configuration without
selecting any additional packages.

This is currently set up with the identifier "bootloader", which seems
to be not used at all. However, the only targets not using "router" or
"nas" are actually archs38 and arc770, which use their own value
"developerboard" for DEVICE_TYPE which seems to have been invented when
these targets where added. The latter is not implemented in target.mk,
though, and will fall back to the "basic" set of packages then.

So, to clean this up and make it more readable, let's just define a
DEVICE_TYPE "basic" and use it for the aforementioned cases.

Cc: Christian Lamparter <chunkeey@gmail.com>
Cc: Sungbo Eo <mans0n@gorani.run>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-06-03 15:41:09 +02:00
Petr Štetiar
392c64d8fd kernel: bump 5.4 to 5.4.43
Refreshed patches, removed upstreamed patch:

 bcm27xx: 950-0642-component-Silence-bind-error-on-EPROBE_DEFER.patch

Run tested: qemu-x86-64
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-06-02 17:46:51 +02:00
Matthias Schiffer
4bd7990488
build: compress kernel debuginfo using zstd
zstd with its default settings (compression level -3) compresses better
than bzip2 -9 (which is the default setting), and is an order of magnitude
faster.

I made the following measurements for the most common compression tools
(all standard Debian Buster versions, default flags unless noted
otherwise), using the debug information of a large x86-64 kernel with
ALL_KMODS:

* kernel-debug.tar: 376M
* kernel-debug.tar.gz: 101M, compressed in ~12s
* kernel-debug.tar.bz2: 91M, compressed in ~15s
* kernel-debug.tar.xz: 57M, compressed in ~101s
* kernel-debug.tar.zst: 86M, compressed in ~1s

With zstd, there is still some room for improvement by increasing the
compression, but the slight increase in compression ratio
(22.83% -> 19.46%) does not justify the significant increase in
compression time (about 5 times on my machine) in my opinion.

Note that multithreaded compression (-T argument) does not affect
reproducibility with zstd.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2020-05-31 11:03:31 +02:00
Matthias Schiffer
4696112ea2
build: add zstd support to pack/unpack functions
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2020-05-31 11:03:30 +02:00
Eneas U de Queiroz
db6c1214e0 build: add option to treat recursive deps as error
Running make with RECURSIVE_DEP_IS_ERROR=1 will cause a hard failure
when a recursive dependency is detected.  This is useful to apply
stricter Ci tests, for example.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-05-20 17:03:45 +02:00
Eneas U de Queiroz
f827f947ae build: show make output in scripts/config when V=s
This should make debugging build errors in scripts/config a bit easier.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-05-20 17:03:45 +02:00
Petr Štetiar
1b2fefb244 kernel: bump 5.4 to 5.4.42
Refreshed patches, removed upstreamed patch:

 generic/pending: 001-v5.4-pinctrl-qcom-fix-wrong-write-in-update_dual_edge.patch.patch

Run tested: qemu-x86-64
Build tested: x86/64, ath79/nand, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-05-20 15:26:22 +02:00
Koen Vandeputte
eb17ee294c kernel: bump 5.4 to 5.4.41
Refreshed all patches.

Compile-tested on: imx6
Runtime-tested on: imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-05-14 13:33:40 +02:00
Koen Vandeputte
d503492857 kernel: bump 4.19 to 4.19.123
Refreshed all patches.

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-05-14 13:33:40 +02:00
Koen Vandeputte
0fed36dd48 kernel: bump 5.4 to 5.4.40
Refreshed all patches.

Compile-tested on: imx6
Runtime-tested on: imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-05-12 12:36:28 +02:00
Koen Vandeputte
7dd2d7289a kernel: bump 4.19 to 4.19.122
Refreshed all patches.

Remove upstreamed:
- 551-loop-Better-discard-support-for-block-devices.patch

Fixed:
- CVE-2020-11884
- CVE-2020-12114
- CVE-2019-3016
- CVE-2020-11669

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-05-12 12:36:28 +02:00
Koen Vandeputte
ef2d5a2ab4 kernel: bump 4.14 to 4.14.180
Refreshed all patches.

Fixes:
- CVE-2020-12114
- CVE-2020-11669

Compile-tested on: pistachio
Runtime-tested on: none

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-05-12 12:36:28 +02:00
Petr Štetiar
d1d2c0b557 kernel: bump 5.4 to 5.4.39
Refreshed patches.

Run tested: qemu-x86-64
Build tested: x86/64, imx6, sunxi/a53, layerscape/armv7+armv8_64b

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-05-07 12:53:06 +02:00
Florian Eckert
4d86e2ce06 buildsystem: add CPE information to ipkg packages and manifest files
Common Platform Enumeration (CPE) is a structured naming scheme for
information technology systems, software, and packages.

This information already exists in some makefiles. In order for the
information to be processed further, it should also be added to the
manifest file and the control file of ipkg packages.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2020-05-05 22:07:59 +02:00
Petr Štetiar
73de205c57 kernel: bump 5.4 to 5.4.38
Refreshed patches.

Run tested: qemu-x86-64, apalis
Build tested: x86/64, ipq40xx, ath79, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-05-04 21:09:12 +02:00
Petr Štetiar
5ea3ea154f kernel: bump 5.4 to 5.4.36
Refreshed patches, removed upstreamed patch:

 generic/hack: 551-loop-Better-discard-support-for-block-devices.patch

Added generic config symbol `ARM64_ERRATUM_1542419` due to Fixes:
f2791551cedb ("arm64: errata: Hide CTR_EL0.DIC on systems affected by
Neoverse-N1 #1542419").

Run tested: qemu-x86-64, apalis, nbg6617
Build tested: x86/64, imx6, ipq40xx, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-04-30 00:52:04 +02:00
Kevin Darbyshire-Bryant
35a8657a40 build: prereq: change minimum make version to 3.82
undefine was added in make 3.82 which is now some 10 years ago, some
make scripts are beginning to use 'undefine'

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2020-04-29 14:26:23 +01:00
Lucian Cristian
60712bd536 u-boot.mk: switch download to https
ftp can cause problems on some networks switch primary download location
to https and add another mirror

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
2020-04-26 21:20:47 +02:00
Petr Štetiar
ef5d37ba5e kernel: bump 5.4 to 5.4.35
Refreshed one patch.

Run tested: qemu-x86-64
Build tested: x86/64, imx6, sunxi/a53, rockchip/armv8

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-04-25 13:22:28 +02:00
Petr Štetiar
faf668be35 kernel: bump 5.4 to 5.4.34
Refreshed patches.

Run tested: qemu-x86-64, apalis, a64-olinuxino
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-04-21 22:16:33 +02:00
DENG Qingfang
29a458b0ca kernel: netfilter.mk: fix kmod-ipt-nat6 installation on 5.4
xt_MASQUERADE.ko is picked up by both kmod-ipt-nat and kmod-ipt-nat6, causing
conflict
As kmod-ipt-nat6 already depends on kmod-ipt-nat, remove xt_MASQUERADE from it

Fixes: FS#2924
Fixes: 0fad8af851 ("kernel: Include xt_MASQUERADE for kernel 5.2 and later")
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
2020-04-20 15:07:17 +02:00
Petr Štetiar
23916bca61 kernel: bump 5.4 to 5.4.33
Refreshed patches, removed upstreamed patches:

 oxnas: 001-irqchip-versatile-fpga-Handle-chained-IRQs-properly.patch
 oxnas: 002-irqchip-versatile-fpga-Apply-clear-mask-earlier.patch

Run tested: qemu-x86-64, apalis
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-04-17 15:18:12 +02:00
Koen Vandeputte
3c3825436e kernel: bump 4.19 to 4.19.115
Refreshed all patches.

Remove upstreamed:
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8647
- CVE-2020-8648 (potentially)
- CVE-2020-8649

Compile-tested on: cns3xxx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-04-16 13:23:11 +02:00
Koen Vandeputte
e31d158c4d kernel: bump 4.14 to 4.14.176
Refreshed all patches.

Remove upstreamed:
- 0001-net-thunderx-workaround-BGX-TX-Underflow-issue.patch
- 600-ipv6-addrconf-call-ipv6_mc_up-for-non-Ethernet-inter.patch
- 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

Fixes:
- CVE-2020-8648 (potentially)
- CVE-2020-8647
- CVE-2020-8649

Compile-tested on: cns3xxx, octeontx
Runtime-tested on: cns3xxx

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2020-04-16 13:23:11 +02:00
Petr Štetiar
0bea89a1d0 kernel: bump 5.4 to 5.4.32
Refreshed patches, removed upstreamed patches:

 generic: 746-stable-net-dsa-mt7530-fix-null-pointer-dereferencing-in-por.patch

Run tested: qemu-x86-64, apalis
Build tested: x86/64, imx6, sunxi/a53

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2020-04-14 21:58:16 +02:00
Jo-Philipp Wich
6c16d64b2a Revert "build: add option to warn on recursive dependency"
This reverts commit 3204430e38.

Reverting this commit in preparation for reverting
dcf3e63a35 ("build: scripts/config - update to kconfig-v5.6") which
introduces various unaddressed build breakages.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2020-04-12 00:10:30 +02:00
Eneas U de Queiroz
3204430e38 build: add option to warn on recursive dependency
This addes the option to treat recursive dependencies as warnings
instead of errors, by running make with WARN_RECURSIVE_DEP=1.

Note that the script/config targets will not get rebuilt when you add or
remove WARN_RECURSIVE_DEP while running make.  One must run
'make config-clean' before building config with a different setting.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-04-09 12:51:10 +02:00
Eneas U de Queiroz
8636a17214 build: simplify building *config targets
Instead of passing pkg-config location through a variable when building
qconf (make xconfig), prepend its parent directory to the PATH, as it is
being done for other conf targets.

Use a Makefile pattern rule to group all 'scripts/config/%onf'
(currently conf, mconf, qconf) targets in a single rule.  Add -O2 to
CFLAGS when building them as well.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2020-04-09 12:51:10 +02:00