Commit Graph

2733 Commits (c5497ebb1ce80a46c1508ba8a9a9c6c5461eedf3)

Author SHA1 Message Date
Petr Štetiar 74acc160a9 kernel-build: ignore runtime config options during reconfig
Don't put CC_HAS_ASM_GOTO, IS_GCC, IS_CLANG and GCC_VERSION runtime
config options into the kernel configs during reconfiguration as it
makes no sense, since these options should be set at runtime.

Fixes: FS#2588
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Kamil Wcislo 09c428ec6b
build: add PKG_SOURCE_URL_FILE support
It seems that there is a missing PKG_SOURCE_URL_FILE support.
This little fix adds the support for packages to change the name of the
downloaded file.

Sometimes it is desirable to change the downloaded archive file name, like
for mitigating name conflicts for different packages (some files on the server
could be named like, e.g. 2018-01-01.tar.gz) or for the cases that there is
no name for the file in the URL (e.g. http://someserver.com/download).

Signed-off-by: Kamil Wcislo <kamil.wcislo@lpnplant.io>
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
4 years ago
Koen Vandeputte e29500eb84 kernel: bump 4.19 to 4.19.85
Refreshed all patches.

Altered patches:
- 080-sata_support.patch

Remove upstreamed:
- 034-v4.20-MIPS-BCM47XX-Enable-USB-power-on-Netgear-WNDR3400v3.patch
- 001-4.21-01-BCM63XX-fix-switch-core-reset-on-BCM6368.patch
- 073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte db9e9e8382 kernel: bump 4.14 to 4.14.155
Refreshed all patches.

Altered patches:
- 707-dpaa-ethernet-support-layerscape.patch

Remove upstreamed:
- 034-v4.20-MIPS-BCM47XX-Enable-USB-power-on-Netgear-WNDR3400v3.patch
- 001-4.21-01-BCM63XX-fix-switch-core-reset-on-BCM6368.patch
- 073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
4 years ago
Koen Vandeputte 7533087565 kernel: bump 4.19 to 4.19.84
Refreshed all patches.

Altered patches:
- 950-0748-net-bcmgenet-Workaround-for-Pi-4B-network-issue.patch
- 950-0754-Revert-net-bcmgenet-Workaround-for-Pi-4B-network-iss.patch
- 902-debloat_proc.patch

Remove upstreamed:
- 150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch

New symbols:
X86_INTEL_MPX
X86_INTEL_MEMORY_PROTECTION_KEYS
X86_INTEL_TSX_MODE_OFF
X86_INTEL_TSX_MODE_ON
X86_INTEL_TSX_MODE_AUTO

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte d6aea46a50 kernel: bump 4.14 to 4.14.154
Refreshed all patches.

Altered patches:
- 902-debloat_proc.patch
- 040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch
- 807-usb-support-layerscape.patch
- 809-flexcan-support-layerscape.patch
- 816-pcie-support-layerscape.patch

Remove upstreamed:
- 150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch
- 303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch

New symbols:
X86_INTEL_MPX
X86_INTEL_MEMORY_PROTECTION_KEYS
X86_INTEL_TSX_MODE_OFF
X86_INTEL_TSX_MODE_ON
X86_INTEL_TSX_MODE_AUTO
SGL_ALLOC

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte d2ee922051 kernel: bump 4.9 to 4.9.202
Refreshed all patches.

Altered patches:
- 902-debloat_proc.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Thomas Weißschuh 2066ee09d9 build: prereq: add support for Python 3.8
Add support for Python 3.8 which was released Oct. 14, 2019.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
[added missing commit description, simplified version check]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar c001ace8bd build: prereq: simplify Python 3 version checks
We don't need to check if python3.5 binary is actually Python 3.5+.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar f962e021d4 kernel-build: fix kernel_menuconfig breakage by forcing YACC
Commit 965f341aa9 ("build: fix host menu config targets using
ncurses") has moved host's path with pkg-config (usually /usr/bin) at
the first place in PATH variable, which is now causing issues with bison
as BISON_PKGDATADIR points into STAGING_DIR_HOST, but the actual bison
used is the one under host PATH (usually /usr/bin/bison), leading to the
following strange failures:

 $ make target/linux/clean kernel_menuconfig V=sc

 export MAKEFLAGS= ;make -C /somewhere/linux-4.19.81 menuconfig
 make -f ./scripts/Makefile.build obj=scripts/kconfig menuconfig
  ...
  bison -oscripts/kconfig/zconf.tab.c -t -l scripts/kconfig/zconf.y
  staging_dir/host/bin/m4: cannot open `staging_dir/host/share/bison/bison.m4': No such file or directory
  staging_dir/host/bin/m4: cannot open `staging_dir/host/share/bison/c-skel.m4': No such file or directory
  ...
  gcc -Wp,-MD,scripts/kconfig/.zconf.tab.o.d <...snip...> -o scripts/kconfig/zconf.tab.o scripts/kconfig/zconf.tab.c
  gcc: error: scripts/kconfig/zconf.tab.c: No such file or directory
  gcc: fatal error: no input files

Fix this by forcing usage of bison under STAGING_DIR_HOST/bin via YACC
make variable.

Cc: Thomas Albers <thomas.gameiro@gmail.com>
Cc: Stijn Tintel <stijn@linux-ipv6.be>
Cc: Eneas U de Queiroz <cotequeiroz@gmail.com>
Tested-by: Ivan Revyakin <LovingFox@GMail.com>
Tested-by: Thomas Albers <thomas.gameiro@googlemail.com>
Ref: https://forum.openwrt.org/t/bpi-r64-kernel-4-19-kernel-menuconfig-error
Fixes: 965f341aa9 ("build: fix host menu config targets using ncurses")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Kevin Darbyshire-Bryant dfd8c45a98 build: image: posix compatibility cut v head
Replace 2 instances of non posix use of 'head' with posix compliant
'cut'.

'head -c n' cuts 'n' bytes from the passed string and happens to work on
Linux & Mac OS X even though '-c' is not posix.

'head --bytes n' does the same thing and happens to work on linux but
not on Mac OS X and is also not posix.

'cut -b1-8' cuts the first 8 bytes from the passed string and is posix
compliant, hence works on Linux & Mac OS X.

Our usage of 'head --bytes' was particularly unfortunate since it was
used to calculated the RootFS UUID passed to grub - the net result being
a non-functioning system waiting for the root file system to appear.

Thanks to karlp, ynezz & others for pointers on solving this.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years ago
Koen Vandeputte 6589de9af7 kernel: bump 4.19 to 4.19.82
Refreshed all patches.

Remove upstreamed:
- 950-0295-sc16is7xx-Fix-for-Unexpected-interrupt-8.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte ecfe552f99 kernel: bump 4.14 to 4.14.152
Refreshed all patches.

Altered patches:
- 301-arch-support-layerscape.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 015fefa8e7 kernel: bump 4.9 to 4.9.199
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Paul Spooren 98d1c7d834 build: image: add common and reproducible IMG_PART_SIGNATURE variable
x86, mvebu and tegra targets are currently using more or less same
SIGNATURE variable which provides unique partition ID/signature, so it
makes sense to refactor it out into common variable which could be
reused by all targets.  While at it, make the content of the variable
reproducible.

Ref: http://lists.infradead.org/pipermail/openwrt-devel/2019-March/016148.html
Signed-off-by: Paul Spooren <mail@aparcar.org>
Suggested-by: Jo-Philipp Wich <jo@mein.io>
[renamed to IMG_PARTSIGNATURE, reworked with epoch+vermagic hash]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Petr Štetiar 0fb23d67f0 build: image: fix build breakage of some images
Commit 881ed09ee6 ("build: create JSON files containing image info")
has removed the crucial empty new line from the image copy step
resulting in the following errors during make function expansion:

 GZ_SUFFIX :=
 bash: GZ_SUFFIX: command not found
 Makefile:86: recipe for target 'openwrt-ath79-generic-tplink_archer-c7-v5-squashfs-sysupgrade.bin' failed

Fixes: 881ed09ee6 ("build: create JSON files containing image info")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Yousong Zhou 66ebca7103 build: label kernel and rootfs ext4 volumes
UUID of ext4 volumes generated by make_ext4fs are determined by volume
label and it will all be 57f8f4bc-abf4-655f-bf67-946fc0f9f25b when label
is empty

Labeling them does not make them unique but tools like block command
from fstools have a better chance differentiating them

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
5 years ago
Koen Vandeputte df60a0852c kernel: bump 4.19 to 4.19.81
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 0e212220e9 kernel: bump 4.14 to 4.14.151
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte b314d14297 kernel: bump 4.9 to 4.9.198
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 4b2ab533d4 kernel: bump 4.19 to 4.19.80
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 0787b7247f kernel: bump 4.14 to 4.14.150
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 8390dde3f8 kernel: bump 4.9 to 4.9.197
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Rafał Miłecki d22c1755fc netfilter: fix NAT packaging with kernels 5.2+
It's related to the upstream kernel commit adf82accc5f5 ("netfilter:
x_tables: merge ip and ipv6 masquerade modules").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Sven Roederer b81cee86e6 build: have scripts/feeds honor all toplevel .mk-files of a feed
The luci and freifunk feed having a common Makefile included by the
individual packages. Currently a change to this file will be ignored
when running "scripts/feeds update".
When we are updating for a feed, add a dependency for all .mk files
in the root of it.

Signed-off-by: Sven Roederer <devel-sven@geroedel.de>
5 years ago
John Crispin f4aaee01fa Revert "build: separate signing logic"
This reverts commit 4a45e69d19.

This broke the buildbots

Signed-off-by: John Crispin <john@phrozen.org>
5 years ago
Andre Heider 02330a6556 build: call Host/Uninstall before wiping the host build dir
Uninstall targets may depend on build artefacts, like `make uninstall`
or `ninja uninstall`.

Signed-off-by: Andre Heider <a.heider@gmail.com>
5 years ago
Paul Spooren 4a45e69d19 build: separate signing logic
This separates the options for signature creation and verification

* SIGNED_PACKAGES create Packages.sig
* SIGNED_IMAGES add ucert signature to created images
* CHECK_SIGNATURE add verification capabilities to images
* INSTALL_LOCAL_KEY add local key-build to /etc/opkg/keys

Right now the buildbot.git contains some hacks to create images that
have signature verification capabilities while not storing private keys
on buildbot slaves. This commit allows to disable these steps for the
buildbots and only perform signing on the master.

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 years ago
Michal Cieslakiewicz f46a4a9293 image: add magic number option for append-uImage-fakehdr
'append-uImage-fakehdr' can now accept magic number as a second, optional
parameter (passed directly to 'mkimage' command with '-M' option). This
enables construction of proper Netgear-specific fake rootfs images
(required for flashing WNDR4300 for example).

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
5 years ago
Jo-Philipp Wich 9bb5dac593 build: fix seq host tool check
Problem found on alpine linux when trying to `./scripts/feeds update -a`,
which results in `Build dependency: Missing seq command`.

Ref: https://github.com/openwrt/openwrt/pull/1926
Suggested-by: imShara <shara@protonmail.com>
[reworded commit and turned faulty Sob into Suggested-by]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Koen Vandeputte e5445333f6 kernel: bump 4.19 to 4.19.79
Refreshed all patches.

Remove upstreamed (superseded):
- 950-0726-can-mcp251x-Allow-more-time-after-a-reset.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 1cfe412dd2 kernel: bump 4.14 to 4.14.149
Refreshed all patches.

Altered patches:
- 820-sec-support-layerscape.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Felix Fietkau 46a129194d build: adjust gcc/g++ version checks for newer apple compilers
Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Paul Spooren 4ed356fa71 kernel.mk: add KCFLAGS to make kmods reproducible
Some kmods (gpio-hotplug, wireguard) store the build path in the
compiled files and therefore make it harder to rebuild the official
binaries. As the same "iremap" function is used as for other binaries,
the change is compatible with gcc7 and 8.

Tested with both gcc7 and gcc8 resulting in build path independent
reproducible builds.

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 years ago
Koen Vandeputte 8184429b7b kernel: bump 4.19 to 4.19.78
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 4648533ca4 kernel: bump 4.14 to 4.14.148
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte f516ce3b10 kernel: bump 4.9 to 4.9.196
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 8e197c7af2 kernel: bump 4.19 to 4.19.77
Refreshed all patches.

Remove upstreamed:
- 110-ARM-zynq-Use-memcpy_toio-instead-of-memcpy.patch

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 9b04a7576b kernel: bump 4.14 to 4.14.147
Refreshed all patches.

Altered patches:
- 403-mtd_fix_cfi_cmdset_0002_status_check.patch (ar71xx)
- 403-mtd_fix_cfi_cmdset_0002_status_check.patch (ath79)

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 65fad9fec5 kernel: bump 4.9 to 4.9.195
Refreshed all patches.

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte 7449a39c0e kernel: bump 4.19 to 4.19.76
Refreshed all patches.

Altered patches:
- 403-mtd_fix_cfi_cmdset_0002_status_check.patch

Compile-tested on: ath79, cns3xxx, imx6
Runtime-tested on: cns3xxx, imx6

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Paul Spooren 4791afa734 kernel-defaults: ensure SOURCE_DATE_EPOCH on /init
This is a follow up of 8cb13f4e6d which sets the right timestamp for the
/init file in initramfs. The previous patch doesn't cover it as the
files appear to come from a later step during compilation.

CC: Alexander Couzens <lynxis@fe80.eu>

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 years ago
Felix Fietkau 5f8e587240 build: force disable stack validation during kernel build on non-linux systems
The check for libelf in the kernel build is not enough, because the code that
uses libelf for stack validation is completely non-portable, as it tries to
include asm/types.h and relies on kernel types in user space.

Until this is fixed properly, the only solution is to disable this on any non
Linux build host

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 years ago
Paul Spooren 881ed09ee6 build: create JSON files containing image info
The JSON info files contain details about the created firmware images
per device and are stored next to the created images.

The JSON files are stored as "$(IMAGE_PREFIX).json" and contain some
device/image meta data as well as a list of created firmware images.

An example of openwrt-ramips-rt305x-aztech_hw550-3g.json

    {
      "id": "aztech_hw550-3g",
      "image_prefix": "openwrt-ramips-rt305x-aztech_hw550-3g",
      "images": [
        {
          "name": "openwrt-ramips-rt305x-aztech_hw550-3g-squashfs-sysupgrade.bin",
          "sha256": "db2b34b0ec4a83d9bf612cf66fab0dc3722b191cb9bedf111e5627a4298baf20",
          "type": "sysupgrade"
        }
      ],
      "metadata_version": 1,
      "supported_devices": [
        "aztech,hw550-3g",
        "hw550-3g"
      ],
      "target": "ramips/rt305x",
      "titles": [
        {
          "model": "HW550-3G",
          "vendor": "Aztech"
        },
        {
          "model": "ALL0239-3G",
          "vendor": "Allnet"
        }
      ],
      "version_commit": "r10920+123-0cc87b3bac",
      "version_number": "SNAPSHOT"
    }

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 years ago
Petr Štetiar 965f341aa9 build: fix host menu config targets using ncurses
On a recent Gentoo Linux installation, invoking `make menuconfig`, `make
kernel_menuconfig` or `make kernel_nconfig` in the build system fails,
whereas for example `make menuconfig` in the kernel tree alone works as
expected.

This is happening because STAGING_PREFIX is not defined when kernel's
{menu,n}config target calls pkg-config from the toolchain/host and thus
pkg-config returns an empty value, and the fallback values in the kernel
config script are applied but those are off and the linking fails.

Solution is to use system's pkg-config for all ncurses based menu config
targets in order to provide proper compiler/linker flags.

Ref: FS#2423
Cc: Thomas Albers <thomas.gameiro@gmail.com>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
Tested-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Koen Vandeputte e39d1cf34f kernel: bump 4.19 to 4.19.75
Refreshed all patches.

Fixes:
- CVE-2019-14814
- CVE-2019-14815
- CVE-2019-14816
- CVE-2019-14821

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte b6686576b4 kernel: bump 4.14 to 4.14.146
Refreshed all patches.

Fixes:
- CVE-2019-14814
- CVE-2019-14815
- CVE-2019-14816
- CVE-2019-14821

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Koen Vandeputte b1ec16d3c2 kernel: bump 4.9 to 4.9.194
Refreshed all patches.

Fixes:
- CVE-2019-14814
- CVE-2019-14815
- CVE-2019-14816
- CVE-2019-14821

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago
Alexander Couzens 8cb13f4e6d
rootfs.mk: ensure all timestamp are set to SOURCE_DATE_EPOCH
Some tools doesn't support SOURCE_DATE_EPOCH (e.g. initramfs images).
Ensure all files of a root filesystem are set to SOURCE_DATE_EPOCH.
Make initramfs builds reproducible (for ramips).

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
5 years ago
Koen Vandeputte c5b10c8282 kernel: bump 4.19 to 4.19.74
Refreshed all patches.

Fixes:
- CVE-2019-15504

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years ago