oweals/openwrt.git
5 years agoipq40xx: decouple mdio-ipq40xx and ar40xx
Christian Lamparter [Sat, 9 Mar 2019 15:19:26 +0000 (16:19 +0100)]
ipq40xx: decouple mdio-ipq40xx and ar40xx

This makes it possible to delete the ar40xx driver in the
future by just removing the file.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agoipq40xx: extend DT mdio node to be more accessible
Christian Lamparter [Fri, 8 Mar 2019 18:11:28 +0000 (19:11 +0100)]
ipq40xx: extend DT mdio node to be more accessible

The MDIO node will become more important in the future.
Hence, this patch adds DT labels to make the properties
inside the various subnodes more accessible.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
5 years agoat91: split up DEVICE_TITLE
Moritz Warning [Wed, 10 Jul 2019 21:31:42 +0000 (23:31 +0200)]
at91: split up DEVICE_TITLE

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agoapm821xx: split up DEVICE_TITLE
Moritz Warning [Sun, 14 Jul 2019 08:32:55 +0000 (10:32 +0200)]
apm821xx: split up DEVICE_TITLE

Splits up DEVICE_TITLE into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agoipq806x: split up DEVICE_TITLE
Moritz Warning [Wed, 10 Jul 2019 21:51:27 +0000 (23:51 +0200)]
ipq806x: split up DEVICE_TITLE

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agobcm53xx: split up DEVICE_TITLE
Moritz Warning [Wed, 10 Jul 2019 22:01:32 +0000 (00:01 +0200)]
bcm53xx: split up DEVICE_TITLE

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agogemini: split up DEVICE_TITLE
Moritz Warning [Wed, 10 Jul 2019 22:10:56 +0000 (00:10 +0200)]
gemini: split up DEVICE_TITLE

DEVICE_TITLE is split up into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agoocteon: split up DEVICE_TITLE
Moritz Warning [Sun, 14 Jul 2019 08:34:19 +0000 (10:34 +0200)]
octeon: split up DEVICE_TITLE

Splits up DEVICE_TITLE into DEVICE_VENDOR, DEVICE_MODEL and DEVICE_VARIANT.

Signed-off-by: Moritz Warning <moritzwarning@web.de>
5 years agobrcm2708: add bcm2711 subtarget (RPi 4B aarch64)
Álvaro Fernández Rojas [Fri, 2 Aug 2019 18:35:59 +0000 (20:35 +0200)]
brcm2708: add bcm2711 subtarget (RPi 4B aarch64)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm27xx-armstub: add new package
Álvaro Fernández Rojas [Fri, 2 Aug 2019 18:35:08 +0000 (20:35 +0200)]
brcm27xx-armstub: add new package

This package is needed for RPi 4B AARCH64 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708-gpu-fw: update to latest firmware
Álvaro Fernández Rojas [Fri, 2 Aug 2019 17:02:01 +0000 (19:02 +0200)]
brcm2708-gpu-fw: update to latest firmware

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708: remove linux 4.14 support
Álvaro Fernández Rojas [Fri, 2 Aug 2019 16:55:55 +0000 (18:55 +0200)]
brcm2708: remove linux 4.14 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agobrcm2708: update to latest patches from the RPi foundation
Álvaro Fernández Rojas [Wed, 31 Jul 2019 16:23:26 +0000 (18:23 +0200)]
brcm2708: update to latest patches from the RPi foundation

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
5 years agomediatek: add v4.19 support
John Crispin [Fri, 2 Aug 2019 08:33:28 +0000 (10:33 +0200)]
mediatek: add v4.19 support

Bump the target to v4.19. Add a patch with additional eth driver
fixes/features that MTK provided aswell as the driver for the new mt7530
switch.

Signed-off-by: John Crispin <john@phrozen.org>
5 years agoar71xx: fix HiveAP 121 PLL for 1000M
David Bauer [Tue, 30 Jul 2019 17:16:21 +0000 (19:16 +0200)]
ar71xx: fix HiveAP 121 PLL for 1000M

The Aerohive HiveAP 121 has the wrong PLL value set for Gigabit speeds,
leading to packet-loss. 10M and 100M work fine.

This commit sets the Gigabit Ethernet PLL value to the correct value,
fixing packet loss.

Confirmed with iperf and floodping.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoar71xx: really fix Mikrotik board detection
Koen Vandeputte [Thu, 1 Aug 2019 10:08:12 +0000 (12:08 +0200)]
ar71xx: really fix Mikrotik board detection

commit e09da0169a08 ("ar71xx: fix Mikrotik board detection")
was generated based on testing a rb-912 board, on which detection failed.

Testing on more hardware shows something fun:

machine : MikroTik RouterBOARD 922UAGS-5HPacD
machine : Mikrotik RouterBOARD 912UAG-5HPnD

Both lowercase and uppercase are used.
So ensure we support both now ..

Fixes: e09da0169a08 ("ar71xx: fix Mikrotik board detection")

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: fix typo in replaced symbol
Koen Vandeputte [Thu, 1 Aug 2019 08:22:33 +0000 (10:22 +0200)]
kernel: fix typo in replaced symbol

Looks like a copy/paste error ..

Fixes: a89b49bca4ec ("kernel: bump 4.19 to 4.19.62")

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoar71xx: fix nand init issues on some rb2011 devices
Koen Vandeputte [Wed, 27 Mar 2019 09:36:41 +0000 (10:36 +0100)]
ar71xx: fix nand init issues on some rb2011 devices

While flashing lots of RB2011 devices, I noticed that
some of them refused to boot properly, failing over the NAND parameters.

Checking in detail shows that some device seem to use another NAND flash
which only support standard 2048-byte pages, without 512-byte subpage support.

This commit disables usage of these small subpage completely.

Advantages:
- Both NAND's with(out) subpage support are working now
- The nand speed increases a bit (measured roughly 1%) in typical usecases

Disadvantages:
- The maximum storage capacity decreases by ~0.2%
as small changes can consume a full page (2048 bytes) now.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agotoolchain/musl: bump to version 1.1.23
Koen Vandeputte [Mon, 29 Jul 2019 10:08:37 +0000 (12:08 +0200)]
toolchain/musl: bump to version 1.1.23

new features:
- riscv64 port
- configure now allows customizing AR and RANLIB vars
- header-level support for new linux features in 5.1

major internal changes:
- removed extern __syscall; syscall header code is now fully self-contained

performance:
- new math library implementation for log/exp/pow
- aarch64 dynamic tlsdesc function is streamlined

compatibility & conformance:
- O_TTY_INIT is now defined
- sys/types.h no longer pollutes namespace with sys/sysmacros.h in any profile
- powerpc asm is now compatible with clang internal assembler

changes for new POSIX interpretations:
- fgetwc now sets stream error indicator on encoding errors
- fmemopen no longer rejects 0 size

bugs fixed:
- static TLS for shared libraries was allocated wrong on "Variant I" archs
- crash in dladdr reading through uninitialized pointer on non-match
- sigaltstack wrongly errored out on invalid ss_size when doing SS_DISABLE
- getdents function misbehaved with buffer length larger than INT_MAX
- set*id could deadlock after fork from multithreaded process

arch-specfic bugs fixed:
- s390x SO_PEERSEC definition was wrong
- passing of 64-bit syscall arguments was broken on microblaze
- posix_fadvise was broken on mips due to missing 7-arg syscall support
- vrregset_t layout and member naming was wrong on powerpc64

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.19 to 4.19.62
Koen Vandeputte [Mon, 29 Jul 2019 15:54:16 +0000 (17:54 +0200)]
kernel: bump 4.19 to 4.19.62

Refreshed all patches.

Remove upstreamed:
- 023-0013-crypto-crypto4xx-fix-AES-CTR-blocksize-value.patch
- 023-0014-crypto-crypto4xx-fix-blocksize-for-cfb-and-ofb.patch
- 023-0015-crypto-crypto4xx-block-ciphers-should-only-accept-co.patch
- 950-0252-staging-bcm2835_camera-Ensure-all-buffers-are-return.patch
- 950-0253-staging-bcm2835-camera-Remove-check-of-the-number-of.patch
- 950-0254-staging-bcm2835-camera-Handle-empty-EOS-buffers-whil.patch
- 950-0489-staging-mmal-vchiq-Replace-spinlock-protecting-conte.patch
- 0021-ARM-dts-gemini-Fix-up-DNS-313-compatible-string.patch
- 049-v4.20-mips-remove-superfluous-check-for-linux.patch
- 100-MIPS-fix-build-on-non-linux-hosts.patch
- 303-MIPS-Fix-bounds-check-virt_addr_valid.patch
- 0002-usb-dwc2-use-a-longer-AHB-idle-timeout-in-dwc2_core_.patch

Altered patches:
- 950-0267-staging-vc04_services-Split-vchiq-mmal-into-a-module.patch
- 700-net-add-qualcomm-mdio-and-phy.patch

Fixes:
- CVE-2019-3846

New symbol:
- AX88796B_PHY

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.14 to 4.14.134
Koen Vandeputte [Mon, 29 Jul 2019 14:05:04 +0000 (16:05 +0200)]
kernel: bump 4.14 to 4.14.134

Refreshed all patches.

Remove upstreamed:
- 049-v4.20-mips-remove-superfluous-check-for-linux.patch
- 303-MIPS-Fix-bounds-check-virt_addr_valid.patch

Fixes:
- CVE-2019-3846
- CVE-2019-3900

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agokernel: bump 4.9 to 4.9.186
Koen Vandeputte [Mon, 29 Jul 2019 12:50:17 +0000 (14:50 +0200)]
kernel: bump 4.9 to 4.9.186

Refreshed all patches.

Fixes:
- CVE-2019-3846

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

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoimx6: bump SDMA firmware to 3.5
Koen Vandeputte [Mon, 29 Jul 2019 13:15:02 +0000 (15:15 +0200)]
imx6: bump SDMA firmware to 3.5

- add uart rom script address in header of sdma firmware to support
  the uart driver of latest kernel working well while old firmware
  assume ram script used for uart driver as NXP internal legacy
  kernel.
- add multi-fifo SAI/PDM scripts.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agoath79: fix SOC version in compat string for A770
Piotr Dymacz [Sun, 28 Jul 2019 09:05:52 +0000 (11:05 +0200)]
ath79: fix SOC version in compat string for A770

YunCore A770 is based on QCA9531, not QCA9533.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years agouboot-envtools: ath79: add support for ALFA Network AP121F
Piotr Dymacz [Sun, 28 Jul 2019 09:02:22 +0000 (11:02 +0200)]
uboot-envtools: ath79: add support for ALFA Network AP121F

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years agouboot-envtools: ath79: fix indent and alphabetical order
Piotr Dymacz [Sun, 28 Jul 2019 09:00:52 +0000 (11:00 +0200)]
uboot-envtools: ath79: fix indent and alphabetical order

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years agoath79: add support for ALFA Network AP121F
Roger Pueyo Centelles [Thu, 4 Jul 2019 12:08:10 +0000 (14:08 +0200)]
ath79: add support for ALFA Network AP121F

This commit ports support for the ALFA Network AP121F, a pocket-size
router with 1 Ethernet and 2.4 GHz WiFi based on the AR9331 SoC, to the
ath79 target (it was already supported in ar71xx; see commit 0c6165d2
for more details).

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
[pepe2k@gmail.com: fixed GPIO polarity, included USB support, changed
DTS nodes order, moved WLAN LED trigger define to DTS, made U-Boot env
partition writable]
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
5 years agowireless-regdb: fix patch fuzz
Kevin Darbyshire-Bryant [Tue, 30 Jul 2019 07:36:32 +0000 (08:36 +0100)]
wireless-regdb: fix patch fuzz

Refresh patches to tidy up some fuzz warnings

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agotools/patch: apply upstream patch for CVE-2019-13636
Russell Senior [Mon, 29 Jul 2019 19:09:09 +0000 (12:09 -0700)]
tools/patch: apply upstream patch for CVE-2019-13636

In GNU patch through 2.7.6, the following of symlinks is mishandled in
certain cases other than input files. This affects inp.c and util.c.

https://nvd.nist.gov/vuln/detail/CVE-2019-13636

Signed-off-by: Russell Senior <russell@personaltelco.net>
5 years agoscripts/ubinize-image.sh: fix buildbot breakage
Petr Štetiar [Sat, 27 Jul 2019 05:47:10 +0000 (07:47 +0200)]
scripts/ubinize-image.sh: fix buildbot breakage

New Docker based buildslaves install just bare minimum of packages, thus
not having bsdmainutils package installed which provides `hexdump`
utility, leading to the following build breakage on buildbots:

 ubinize-image.sh: 12: /builder/scripts/ubinize-image.sh: hexdump: not found

So this patch simply replaces `hexdump` with `od` utility provided by
coreutils package, which should be likely available.

Co-authored-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agolantiq: use wpad-basic for boards with enough storage
Johann Neuhauser [Mon, 29 Jul 2019 17:44:17 +0000 (19:44 +0200)]
lantiq: use wpad-basic for boards with enough storage

This commit selects wpad-basic for the FRITZ!Box 7312 and 7412 as
wpad-mini is only selected on boards with small flash.

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
[add short description]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoath79: fix indent in TP-Link TL-WR842N v3 DTS file
Adrian Schmutzler [Sun, 28 Jul 2019 22:53:50 +0000 (00:53 +0200)]
ath79: fix indent in TP-Link TL-WR842N v3 DTS file

Convert leading spaces to tab to match rest of the file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agowireless-regdb: fix Makefile indentation
John Crispin [Mon, 29 Jul 2019 22:33:12 +0000 (00:33 +0200)]
wireless-regdb: fix Makefile indentation

Signed-off-by: John Crispin <john@phrozen.org>
5 years agoiptables: fix connmark savedscp build
Kevin Darbyshire-Bryant [Mon, 29 Jul 2019 19:23:13 +0000 (20:23 +0100)]
iptables: fix connmark savedscp build

Add <strings.h> for ffs() definition.

Reported-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agoRevert "kmod-sched-cake: drop out of tree package, use kernel version"
Kevin Darbyshire-Bryant [Mon, 29 Jul 2019 15:12:42 +0000 (16:12 +0100)]
Revert "kmod-sched-cake: drop out of tree package, use kernel version"

This reverts commit 5c094ff660fd8e750ed1c1f38719a45065e77348.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agoRevert "netsupport: move out sch_cake from kmod-sched"
Kevin Darbyshire-Bryant [Mon, 29 Jul 2019 15:11:39 +0000 (16:11 +0100)]
Revert "netsupport: move out sch_cake from kmod-sched"

This reverts commit b31f9190c3c9736f0f2a9fc810eba5b6f43a6b05.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agoar71xx: fix Mikrotik board detection
Koen Vandeputte [Mon, 29 Jul 2019 08:10:02 +0000 (10:10 +0200)]
ar71xx: fix Mikrotik board detection

Fix a typo in the machine type being extracted from /proc/cpuinfo
which causes all Mikrotik board to be undetected properly.

This lead to sysupgrade issues and probably some others too.

Fixes: acf2b6c8881b ("ar71xx: base-files: fix board detect on new MikroTik devices")

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
5 years agomac80211: brcm: improve brcmfmac debugging of firmware crashes
Rafał Miłecki [Sun, 28 Jul 2019 12:09:20 +0000 (14:09 +0200)]
mac80211: brcm: improve brcmfmac debugging of firmware crashes

This provides a complete console messages dump.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agomac80211: brcm: update brcmfmac 5.4 patches
Rafał Miłecki [Sun, 28 Jul 2019 11:52:47 +0000 (13:52 +0200)]
mac80211: brcm: update brcmfmac 5.4 patches

Use commits from wireless-drivers-next.git.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agotoolchain/fortify-headers: Update to 1.1
Kevin Darbyshire-Bryant [Fri, 26 Jul 2019 13:19:22 +0000 (14:19 +0100)]
toolchain/fortify-headers: Update to 1.1

Update fortify-headers to 1.1

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agotools/mklibs: update to 0.1.44 and convert to Python 3
Daniel Golle [Fri, 26 Jul 2019 21:45:47 +0000 (23:45 +0200)]
tools/mklibs: update to 0.1.44 and convert to Python 3

Since the switch to Python 3 build fails if CONFIG_USE_MKLIBS is set
("Strip unnecessary functions from libraries" in menuconfig) as
mklibs hasn't been converted to run on Python 3.

 * update to most recent upstream version which brings some
   reproducibility fixes
 * converted to Python 3 using 2to3
 * fixed mixed tab/spaces indentation
 * fixed use of string.* functions
 * some more minor fixes to make Python 3 happy

Fixes commit 19938c8de7 ("build: switch to Python 3")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 years agotfa-layerscape: fix create_pbl and byte_swap host build
Biwen Li [Fri, 26 Jul 2019 08:23:53 +0000 (16:23 +0800)]
tfa-layerscape: fix create_pbl and byte_swap host build

- make create_pbl and byte_swap as host tools

- fix a bug that maybe use the cross compiler
to compile create_pbl and byte_swap:

# -a option appends the image for Chassis 3 devices in case of non secure boot
aarch64-openwrt-linux-musl-gcc -Wall -Werror -pedantic -std=c99 -O2
 -DVERSION=v1.5(release):reboot-10604-ge9216b3336 -D_GNU_SOURCE -D_XOPEN_SOURCE=700
 -c -o create_pbl.o create_pbl.c
cc1: note: someone does not honour COPTS correctly, passed 0 times
  LD      create_pbl
/usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183)
/usr/bin/ld: create_pbl.o: Relocations in generic ELF (EM: 183)
create_pbl.o: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:43: recipe for target create_pbl failed
make[4]: *** [create_pbl] Error 1
plat/nxp/tools/pbl_ch2.mk:45: recipe for target pbl failed
make[3]: *** [pbl] Error 2

- add tfa- prefix to all tools in order to avoid future clashes with
  other toolnames

Signed-off-by: Biwen Li <biwen.li@nxp.com>
[added missing HOST_CFLAGS, added tfa- prefix to the tools]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoramips: add support for Fon FON2601
NOGUCHI Hiroshi [Thu, 25 Jul 2019 23:11:48 +0000 (08:11 +0900)]
ramips: add support for Fon FON2601

FON2601 is a wireless router.

Specification:
- SoC: Mediatek MT7620A (580MHz)
- RAM: 128 MiB
- ROM: 16 MiB SPI Flash
- Wireless:
   for 11b/g/n (upto 300 Mbps):  MT7620A built-in WMAC
   for 11a/n/ac (upto 867 Mbps): MT7662E
- Ethernet LAN: 1 port, upto 100 Mbps
- Ethernet WAN: 1 port, upto 1000 Mbps
- USB: 1 port (USB 2.0 host)
- LEDs: 4 (all can be controlled by SoC's GPIO)
- buttons: 1 (Displayed as "WPS" on enclosure)
- serial port: 57600n8
 pins: Vcc(3.3V), Rx, Tx, GND
(left to right, viewed from outside of board)

Installation (only available via UART):
  1. download sysupgrade binary image by wget command
  2. write sysupgrade binary image to Flash
     command is:
       mtd write sysupgrade.bin firmware
  3. reboot

Important Notice:
  Only one button is displayed as "WPS" on enclosure.
  However, it is configured as "reset" (factory resetting feature).

Signed-off-by: NOGUCHI Hiroshi <drvlabo@gmail.com>
[removed unrelated openwrt-keyring revert, missing -Wall for uimage_padhdr]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoautotools.mk: autoreconf: fix missing install-sh
Petr Štetiar [Tue, 4 Dec 2018 13:47:23 +0000 (14:47 +0100)]
autotools.mk: autoreconf: fix missing install-sh

I'm trying to create a package for libgpiod, which uses
AC_CONFIG_AUX_DIR macro, which is probably leading to the following
configure error:

 autoreconf: running: /openwrt.git/staging_dir/host/bin/libtoolize --force
 OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `autostuff'.
 OpenWrt-libtoolize: linking file `autostuff/ltmain.sh'
 OpenWrt-libtoolize: putting macros in `m4'.
 ...
 configure: error: cannot find install-sh, install.sh, or shtool in autostuff "."/autostuff

>From the build output it's clear, that libtoolize isn't installing
install-sh symlink, because libtoolize would install install-sh only if
it's being run with --install parameter. Corresponding part in
libtoolize:

 if $opt_install; then
   func_config_update config.guess \
     "$pkgdatadir/config" "$auxdir" pkgconfig_header
   func_config_update config.sub \
     "$pkgdatadir/config" "$auxdir" pkgconfig_header
   func_install_update install-sh \
     "$pkgdatadir/config" "$auxdir" pkgconfig_header
 fi
 func_ltmain_update ltmain.sh \
    "$pkgdatadir/config" "$auxdir" pkgconfig_header

Adding --install parameter to libtoolize fixes this build issue:

 autoreconf: running: /openwrt.git/staging_dir/host/bin/libtoolize --install --force
 OpenWrt-libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `autostuff'.
 OpenWrt-libtoolize: linking file `autostuff/config.guess'
 OpenWrt-libtoolize: linking file `autostuff/config.sub'
 OpenWrt-libtoolize: linking file `autostuff/install-sh'
 OpenWrt-libtoolize: linking file `autostuff/ltmain.sh'
 OpenWrt-libtoolize: putting macros in `m4'.

Cc: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agowireless-regdb: set PKGARCH:=all
Petr Štetiar [Thu, 25 Jul 2019 07:21:42 +0000 (09:21 +0200)]
wireless-regdb: set PKGARCH:=all

As it's an architecture-independent binary file.

Ref: https://github.com/openwrt/openwrt/pull/1521#issuecomment-514687053
Suggested-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agowireless-regdb: prefer python provided by make variable
Petr Štetiar [Mon, 18 Mar 2019 21:40:36 +0000 (21:40 +0000)]
wireless-regdb: prefer python provided by make variable

Usage of predefined make variables is preferred.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agowireless-regdb: update to 2019.06.03
Zachary Riedlshah [Wed, 5 Jun 2019 10:58:19 +0000 (22:58 +1200)]
wireless-regdb: update to 2019.06.03

Fixes build issues on a python3 host (issues with the print statement
formatting in the current build).

Includes 100-regdb-write-firmware-file-format-version-code-20.patch and
other fixes.

Closes bugs.openwrt.org/index.php?do=details&task_id=1605.

Uses the tarball as requested.

Signed-off-by: Zachary Riedlshah <git@zacharyrs.me>
5 years agobuild: cleanup possibly dangling Python 2 host symlink
Petr Štetiar [Wed, 20 Mar 2019 08:52:58 +0000 (09:52 +0100)]
build: cleanup possibly dangling Python 2 host symlink

When bumping buildroot to Python 3, we need to assure, that Python
symlink in staging bin directory points to Python >= 3.5 as well.

We can't rely completly just on SetupHostCommand as its executed only in
cases when the $(STAGING_DIR_HOST)/bin/python doesn't already exist, so
we need to remove it before running SetupHostCommand.

Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agobuild: switch to Python 3
Petr Štetiar [Tue, 19 Mar 2019 12:02:07 +0000 (13:02 +0100)]
build: switch to Python 3

This patch switches Python used in buildroot to Python 3 as Python 2.x
series is going to be EOL relatively soon[1].

 "Being the last of the Python 2.x series, 2.7 will have an extended
  period of maintenance. Specifically, 2.7 will receive bugfix support
  until January 1, 2020. After the last release, 2.7 will receive no
  support."

It seems like Python 3 is going to be needed in order to support Meson
build system which has gained some traction recently.

Build tested on following targets:

 ath79/generic
 imx6/generic
 ipq40xx/generic
 lantiq/xway
 layerscape/armv7 (broken)
 layerscape/armv8_32b (broken)
 layerscape/armv8_64b (broken)
 mvebu/cortexa72
 ramips/mt7621
 ramips/mt7620
 sunxi/cortexa7
 x86/64

Layerscape targets are unfortunately left broken as their ls-rcw
firmware package uses Python 2 and converting it to Python 3 would take
more then reasoanble amount of time (I've tried to fix it already) and
would be better fixed by someone who can even run test it.

Run tested on ath79 (Archer C7 v5), ipq40xx (nbg6617) and x86_64 (QEMU
and apu2).

1. https://www.python.org/dev/peps/pep-0373/

Ref: PR#1937
Cc: Yangbo Lu <yangbo.lu@nxp.com>
Cc: Mathew McBride <matt@traverse.com.au>
Acked-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agolayerscape: convert to python3 for rcw
Yangbo Lu [Wed, 19 Jun 2019 03:12:19 +0000 (11:12 +0800)]
layerscape: convert to python3 for rcw

Python 2.7 will not be maintained past 2020. Let's convert
to python3 for rcw. Also drop byte swapping since TF-A had
been already used which handled byte swapping instead.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
5 years agotools/scons: switch to Python 3
Petr Štetiar [Tue, 19 Mar 2019 12:34:26 +0000 (12:34 +0000)]
tools/scons: switch to Python 3

Build tested on ath79 with following packages from packages feed which
build depends on scons. None of them build anymore as it seems, that the
SConscripts are written for Python2.

 * packages/net/iotivity (KO, doesn't build even with latest 1.3.1 release)

   SyntaxError: invalid syntax
    File "/openwrt/build_dir/target-mips_24kc_musl/iotivity-1.2.1/build_common/SConscript", line 40
      print "\nError: Current system (%s) isn't supported\n" % host

   LookupError: unknown encoding: string_escape:
    File "/home/petr/testing/openwrt/build_dir/target-mips_24kc_musl/iotivity-1.3.1/SConstruct", line 28:
      SConscript('build_common/SConscript')

 * packages/net/smartsnmpd (KO, seems dead, no commit since 2015):

   SyntaxError: Missing parentheses in call to 'print'
    File "/openwrt/build_dir/target-mips_24kc_musl/smartsnmpd-2014-08-13/SConstruct", line 156
      print "Can't find liblua or liblua5.1!"

 * packages/utils/gpsd (KO, doesn't build even with latest 3.18.1 release):

   AttributeError: 'list' object has no attribute 'keys':
     File "/openwrt/build_dir/target-mips_24kc_musl/gpsd-3.18.1/SConstruct", line 1758:
       all_manpages = list(base_manpages.keys()) + list(python_manpages.keys())

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoscripts/jungo-image: convert to Python 3 with 2-to-3
Petr Štetiar [Tue, 19 Mar 2019 10:30:34 +0000 (10:30 +0000)]
scripts/jungo-image: convert to Python 3 with 2-to-3

Let's convert the script to Python 3.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoscripts/dl_github_archive.py: convert to Python 3 with 2-to-3
Petr Štetiar [Tue, 19 Mar 2019 10:29:40 +0000 (10:29 +0000)]
scripts/dl_github_archive.py: convert to Python 3 with 2-to-3

Let's convert the script to Python 3.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agotools/b43-tools/b43-fwsquash: convert to Python 3 with 2-to-3
Petr Štetiar [Tue, 19 Mar 2019 10:31:22 +0000 (10:31 +0000)]
tools/b43-tools/b43-fwsquash: convert to Python 3 with 2-to-3

Let's convert the script to Python 3.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoopenwrt-keyring: update to Git HEAD
Jo-Philipp Wich [Thu, 25 Jul 2019 17:39:51 +0000 (19:39 +0200)]
openwrt-keyring: update to Git HEAD

8080ef3 usign: add 19.07 release build pubkey
e24fe0d usign: use distro agnostic comments
251ded7 usign: fix filename of Stijn's usign key
14f0efc gpg: update snapshots public signing key
14f845b gpg: replace my public GPG key
4f735b8 gpg: add OpenWrt 19.07 signing key
228f8da gpg: add OpenWrt 18.06 v2 signing key
36057d9 gpg: update LEDE 17.01 public signing key
f2989ab Add my public GPG and usign key

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years agoath79: remove lines-initial-states property
David Bauer [Thu, 25 Jul 2019 15:25:34 +0000 (17:25 +0200)]
ath79: remove lines-initial-states property

The lines-initial-states property was an early attempt to set the latch
bit of the shift register on driver probe. It is not implemented in the
driver and was rejected upstream. The latch bit was always set by a GPIO
hog, so this property is safe to drop.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agoramips: drop an empty case in 02_network
Chuanhong Guo [Thu, 25 Jul 2019 14:17:51 +0000 (22:17 +0800)]
ramips: drop an empty case in 02_network

There's an empty case in 02_network introduced by last commit. Drop it.

Fixes: ee650ba46c ("ramips: remove needless setting of lan_mac to eth0 in 02_network")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years agoramips: remove needless setting of lan_mac to eth0 in 02_network
Adrian Schmutzler [Sun, 21 Jul 2019 00:05:53 +0000 (02:05 +0200)]
ramips: remove needless setting of lan_mac to eth0 in 02_network

This removes superfluous lines like
lan_mac=$(cat /sys/class/net/eth0/address)

Since lan_mac only sets the MAC address for eth0.1, these lines
can be safely removed as the address will be inherited from eth0
anyway.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: consistently use lower-case factory partition label
Adrian Schmutzler [Thu, 11 Jul 2019 21:39:10 +0000 (23:39 +0200)]
ramips: consistently use lower-case factory partition label

The vast majority of devices labels "factory" partition with lower
case. Convert the small fraction with capital letter to that and
merge another case in 02_network.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: consolidate MAC address cases in 02_network
Adrian Schmutzler [Thu, 11 Jul 2019 21:01:05 +0000 (23:01 +0200)]
ramips: consolidate MAC address cases in 02_network

This just merges some duplicate definitions and consolidates lines.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com> [merge duplicated
cases for phicomm k2p]

5 years agoramips: use kiB instead of B for IMAGE_SIZE
Adrian Schmutzler [Mon, 15 Jul 2019 12:55:40 +0000 (14:55 +0200)]
ramips: use kiB instead of B for IMAGE_SIZE

This cosmetical patch is just meant to make comparing/checking
IMAGE_SIZE values easier.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: remove ralink_default_fw_size_xxx variables
Adrian Schmutzler [Mon, 22 Jul 2019 16:09:57 +0000 (18:09 +0200)]
ramips: remove ralink_default_fw_size_xxx variables

There are frequent examples of the ralink_default_fw_size_xxx
variables being used to "roughly" set flash size without caring
about the actual size of the firmware partition.

To discourage this behavior, this patch removes the variables and
just sets IMAGE_SIZE by its numeric value for each target.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: remove default IMAGE_SIZE for ramips target
Adrian Schmutzler [Mon, 15 Jul 2019 12:55:37 +0000 (14:55 +0200)]
ramips: remove default IMAGE_SIZE for ramips target

Currently, ramips target defines 0x7b0000 as default IMAGE_SIZE
for all devices in ramips target, i.e. this will be set if a
device does not specify IMAGE_SIZE itself.

From 92 devices using that default due to a "missing" IMAGE_SIZE,
14 were incorrect by a small amount (i.e. still "8M" flash) and
12 were completely off ("16M", "4M", ...).

This patch thus removes the _default_ IMAGE_SIZE and defines
IMAGE_SIZE for each device individually. This should indicate to
people supporting new devices that this parameter has to be cared
about.

For the present code, this patch is cosmetical.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips/rt305x: fix IMAGE_SIZE for all devices
Adrian Schmutzler [Mon, 15 Jul 2019 12:55:34 +0000 (14:55 +0200)]
ramips/rt305x: fix IMAGE_SIZE for all devices

This fixes IMAGE_SIZE for all devices based on the partition size
given in DTS:

DEVICE                       *.MK    *.DTS     VERDICT
7links_px-4885-4m            (4M)    0x3b0000
7links_px-4885-8m            -       0x7b0000  default
8devices_carambola           -       0x7b0000  default
accton_wr6202                -       0x7b0000  default
airlive_air3gii              (4M)    0x3b0000
alfa-network_w502u           -       0x7b0000  default
allnet_all0256n-4m           (4M)    0x3b0000
allnet_all0256n-8m           -       0x7b0000  default
allnet_all5002               32448k  0x1fb0000
allnet_all5003               32448k  0x1fb0000
alphanetworks_asl26555-16m   15872k  0xf80000
alphanetworks_asl26555-8m    7744k   0x790000
arcwireless_freestation5     -       0x7b0000  default
argus_atp-52b                7808k   0x7a0000
asiarf_awapn2403             (4M)    0x3b0000
asiarf_awm002-evb-4m         (4M)    0x3b0000
asiarf_awm002-evb-8m         -       0x7b0000  default
asus_rt-g32-b1               (4M)    0x3b0000
asus_rt-n10-plus             (4M)    0x3b0000
asus_rt-n13u                 -       0x7b0000  default
asus_wl-330n                 (4M)    0x3b0000
asus_wl-330n3g               (4M)    0x3b0000
aximcom_mr-102n              -       0x790000  wrong
aztech_hw550-3g              -       0x7b0000  default
belkin_f5d8235-v2            7744k   0x790000
belkin_f7c027                7616k   0x770000
buffalo_whr-g300n            3801088 0x3a0000
dlink_dap-1350               7488k   0x750000
dlink_dcs-930                (4M)    0x3b0000
dlink_dcs-930l-b1            (4M)    0x3b0000
dlink_dir-300-b1             (4M)    0x3b0000
dlink_dir-300-b7             (4M)    0x7b0000  wrong
dlink_dir-320-b1             -       0x7b0000  default
dlink_dir-600-b1             (4M)    0x3b0000
dlink_dir-610-a1             (4M)    0x3b0000
dlink_dir-615-d              (4M)    0x3b0000
dlink_dir-615-h1             (4M)    0x3b0000
dlink_dir-620-a1             -       0x7b0000  default
dlink_dir-620-d1             -       0x7b0000  default
dlink_dwr-512-b              7800k   0x7e0000  wrong
easyacc_wizard-8800          -       0x7b0000  default
edimax_3g-6200n              3648k   0x390000
edimax_3g-6200nl             3648k   0x390000
engenius_esr-9753            (4M)    0x3b0000
fon_fonera-20n               -       0x7b0000  default
hame_mpr-a1                  (4M)    0x3b0000
hame_mpr-a2                  -       0x7b0000  default
hauppauge_broadway           7744k   0x790000
hilink_hlk-rm04              -       0x3b0000  wrong
hootoo_ht-tm02               -       0x7b0000  default
huawei_d105                  (4M)    0x3b0000
huawei_hg255d                15744k  0xf60000
intenso_memory2move          -       0x7b0000  default
jcg_jhr-n805r                (4M)    0x3b0000
jcg_jhr-n825r                (4M)    0x3b0000
jcg_jhr-n926r                (4M)    0x3b0000
mofinetwork_mofi3500-3gn     -       0x7b0000  default
netcore_nw718                3712k   0x3a0000
netgear_wnce2001             (4M)    0x350000  wrong
nexaira_bc2                  -       0x7b0000  default
nexx_wt1520-4m               (4M)    0x3b0000
nexx_wt1520-8m               -       0x7b0000  default
nixcore_x1-16m               16064k  0xfb0000
nixcore_x1-8m                7872k   0x7b0000
olimex_rt5350f-olinuxino     -       0x7b0000  default
olimex_rt5350f-olinuxino-evb -       0x7b0000  default
omnima_miniembplug           -       0x7b0000  default
omnima_miniembwifi           -       0x7b0000  default
petatel_psr-680w             (4M)    0x3b0000
planex_mzk-dp150n            (4M)    0x3b0000
planex_mzk-w300nh2           3648k   0x390000
planex_mzk-wdpr              -       0x680000  wrong
poray_ip2202                 -       0x7b0000  default
poray_m3                     (4M)    0x3b0000
poray_m4-4m                  (4M)    0x3b0000
poray_m4-8m                  -       0x7b0000  default
poray_x5                     -       0x7b0000  default
poray_x8                     -       0x7b0000  default
prolink_pwh2004              -       0x7b0000  default
ralink_v22rw-2x2             (4M)    0x3b0000
sitecom_wl-351               (4M)    0x3b0000
skyline_sl-r7205             (4M)    0x3b0000
sparklan_wcr-150gn           (4M)    0x3b0000
teltonika_rut5xx             -       0xfb0000  wrong
tenda_3g150b                 (4M)    0x3b0000
tenda_3g300m                 (4M)    0x3b0000
tenda_w150m                  (4M)    0x3b0000
tenda_w306r-v2               (4M)    0x3b0000
trendnet_tew-638apb-v2       (4M)    0x3b0000
trendnet_tew-714tru          -       0x7b0000  default
unbranded_a5-v11             (4M)    0x3b0000
unbranded_wr512-3gn-4m       (4M)    0x3b0000
unbranded_wr512-3gn-8m       -       0x7b0000  default
unbranded_xdx-rn502j         (4M)    0x3b0000
upvel_ur-326n4g              (4M)    0x3b0000
upvel_ur-336un               -       0x7b0000  default
vocore_vocore-16m            16064k  0xfb0000
vocore_vocore-8m             7872k   0x7b0000
wansview_ncs601w             -       0x7b0000  default
wiznet_wizfi630a             (16M)   0xfb0000
zorlik_zl5900v2              -       0x7b0000  default
zyxel_keenetic               (4M)    0x3b0000
zyxel_keenetic-start         (4M)    0x3b0000
zyxel_nbg-419n               (4M)    0x3b0000
zyxel_nbg-419n-v2            (8M)    0x7b0000

No verdict means that the device is correctly set.

Legend:
( ): Value is set via ralink_default_fw_size_xxM
[ ]: Value is derived from parent definition
 - : Value is not set and derived from default definition

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips/rt288x,rt3883: fix IMAGE_SIZE for all devices
Adrian Schmutzler [Mon, 15 Jul 2019 12:55:31 +0000 (14:55 +0200)]
ramips/rt288x,rt3883: fix IMAGE_SIZE for all devices

This fixes IMAGE_SIZE for all devices based on the partition size
given in DTS:

DEVICE                 *.MK    *.DTS      VERDICT
airlink101_ar670w      (4M)    0x3c0000   wrong
airlink101_ar725w      -       0x3B0000   wrong
asus_rt-n15            (4M)    0x3b0000
belkin_f5d8235-v1      7744k   0x7b0000   wrong
buffalo_wli-tx4-ag300n (4M)    0x3b0000
buffalo_wzr-agl300nh   (4M)    0x3b0000
dlink_dap-1522-a1      3801088 0x3a0000
ralink_v11st-fe        (4M)    0x003b0000

asus_rt-n56u           -       0x007b0000 default
belkin_f9k1109v1       7224k   0x7a0000   wrong
dlink_dir-645          -       0x7b0000   default
edimax_br-6475nd       7744k   0x00790000
loewe_wmdr-143n        -       0x7b0000   default
omnima_hpm             16064k  0x00fb0000
samsung_cy-swr1100     -       0x7b0000   default
sitecom_wlr-6000       7244k   0x713000
trendnet_tew-691gr     -       0x007b0000 default
trendnet_tew-692gr     -       0x007b0000 default

No verdict means that the device is correctly set.

Legend:
( ): Value is set via ralink_default_fw_size_xxM
[ ]: Value is derived from parent definition
 - : Value is not set and derived from default definition

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips/mt76x8: fix IMAGE_SIZE for all devices
Adrian Schmutzler [Mon, 15 Jul 2019 12:55:28 +0000 (14:55 +0200)]
ramips/mt76x8: fix IMAGE_SIZE for all devices

This fixes IMAGE_SIZE for all devices based on the partition size
given in DTS:

DEVICE                       *.MK   *.DTS     VERDICT
alfa-network_awusfree1       (8M)   0x7b0000
buffalo_wcr-1166ds           -      0x7c0000  wrong
cudy_wr1000                  (8M)   0x7b0000
d-team_pbr-d1                (16M)  0x0fb0000
duzun_dm06                   -      0x7b0000  default
glinet_gl-mt300n-v2          16064k 0xfb0000
glinet_vixmini               7872k  0x7b0000
hilink_hlk-7628n             (32M)  0x1fb0000
hiwifi_hc5661a               (16M)  0xf70000  wrong
hiwifi_hc5861b               15808k 0xf70000
mediatek_linkit-smart-7688   (32M)  0x1fb0000
mediatek_mt7628an-eval-board (4M)   0x7b0000  wrong
mercury_mac1200r-v2          -      0x7c0000  wrong
netgear_r6120                15744k 0xf60000
onion_omega2                 (16M)  0xfb0000
onion_omega2p                (32M)  0x1fb0000
rakwireless_rak633           -      0x7b0000  default
skylab_skw92a                16064k 0xfb0000
tama_w06                     15040k 0xeb0000
totolink_lr1200              7872k  0x7b0000
tplink_archer-c20-v4         7808k  0x7a0000
tplink_archer-c50-v3         7808k  0x7a0000
tplink_archer-c50-v4         7616k  0x770000
tplink_tl-mr3020-v3          7808k  0x7a0000
tplink_tl-mr3420-v5          7808k  0x7a0000
tplink_tl-wa801nd-v5         7808k  0x7a0000
tplink_tl-wr802n-v4          7808k  0x7a0000
tplink_tl-wr840n-v4          7808k  0x7a0000
tplink_tl-wr840n-v5          3904k  0x3d0000
tplink_tl-wr841n-v13         7808k  0x7a0000
tplink_tl-wr841n-v14         3968k  0x3e0000
tplink_tl-wr842n-v5          7808k  0x7a0000
tplink_tl-wr902ac-v3         7808k  0x7a0000
unielec_u7628-01-128m-16m    16064k 0xfb0000
vocore_vocore2               (16M)  0xfb0000
vocore_vocore2-lite          (16M)  0x7b0000  wrong
wavlink_wl-wn570ha1          (8M)   0x7b0000
wavlink_wl-wn575a3           (8M)   0x7b0000
widora_neo-16m               (16M)  0x0fb0000
widora_neo-32m               (32M)  0x1fb0000
wiznet_wizfi630s             (32M)  0x1fb0000
wrtnode_wrtnode2p            (16M)  0x1fb0000 wrong
wrtnode_wrtnode2r            (16M)  0x1fb0000 wrong
xiaomi_mir4a-100m            14976k 0xea0000
xiaomi_miwifi-nano           (16M)  0xfb0000
zbtlink_zbt-we1226           (8M)   0x7b0000
zyxel_keenetic-extra-ii      14912k 0xe90000

No verdict means that the device is correctly set.

Legend:
( ): Value is set via ralink_default_fw_size_xxM
[ ]: Value is derived from parent definition
 - : Value is not set and derived from default definition

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips/mt7621: fix IMAGE_SIZE for all devices
Adrian Schmutzler [Mon, 15 Jul 2019 12:55:24 +0000 (14:55 +0200)]
ramips/mt7621: fix IMAGE_SIZE for all devices

This fixes IMAGE_SIZE for all devices based on the partition size
given in DTS:

DEVICE                     *.MK     *.DTS     VERDICT
afoundry_ew1200            (16M)    0xfb0000
asiarf_ap7621-001          (16M)    0xfa0000  wrong
buffalo_wsr-1166dhp        (16M)    0xf90000  wrong
buffalo_wsr-600dhp         (16M)    0xfb0000
dlink_dir-860l-b1          (16M)    0xfb0000
d-team_newifi-d2           (32M)    0x1fb0000
d-team_pbr-m1              (16M)    0xfb0000
elecom_wrc-1167ghbk2-s     15488k   0xf20000
elecom_wrc-1900gst         11264k   0xb00000
elecom_wrc-2533gst         11264k   0xb00000
firefly_firewrt            (16M)    0xfb0000
gehua_ghl-r-001            (32M)    0x1fb0000
gnubee_gb-pc1              (32M)    0x1fb0000
gnubee_gb-pc2              (32M)    0x1fb0000
hiwifi_hc5962              (32M)    0x2000000 wrong (kernel + ubi)
iodata_wn-ax1167gr         15552k   0xf30000
iodata_wn-gx300gr          7798784  0x770000
lenovo_newifi-d1           (32M)    0x1fb0000
linksys_re6500             -        0x7b0000  default
mediatek_ap-mt7621a-v60    (8M)     0x7b0000
mediatek_mt7621-eval-board (4M)     0xec0000  wrong (rootfs)
mikrotik_rb750gr3          [16128k] 0xfc0000
mikrotik_rbm11g            [16128k] 0xFC0000
mikrotik_rbm33g            [16128k] 0xFC0000
mqmaker_witi-256m          (16M)    0xfb0000
mqmaker_witi-512m          (16M)    0xfb0000
mtc_wr1201                 16000k   0xfa0000
netgear_ex6150             14848k   0xe80000
netgear_r6220              28672k   0x1c00000
netgear_r6350              40960k   0x2800000
netgear_wndr3700-v5        15232k   0xee0000
netis_wf-2881              129280k  0x7E40000
phicomm_k2p                15744k   0xf60000
planex_vr500               66453504 0x3fb0000 wrong
samknows_whitebox-v8       (16M)    0xfb0000
storylink_sap-g3200u3      -        0x7b0000  default
telco-electronics_x1       16064k   0xfb0000
thunder_timecloud          -        0xfb0000  wrong
totolink_a7000r            16064k   0xfb0000
tplink_re350-v1            6016k    0x5e0000
ubiquiti_edgerouterx       -        0xfa00000 wrong (kernel1 + ubi)
ubiquiti_edgerouterx-sfp   -        0xfa00000 wrong (kernel1 + ubi)
unielec_u7621-06-256m-16m  16064k   0xfb0000
unielec_u7621-06-512m-64m  65216k   0x3fb0000
wevo_11acnas               (16M)    0xfb0000
wevo_w2914ns-v2            (16M)    0xfb0000
xiaomi_mir3g               32768k   0x7980000 wrong (kernel + ubi)
xiaomi_mir3p               (32M)    0xf980000 wrong (kernel + ubi)
xzwifi_creativebox-v1      (32M)    0x1fb0000
youhua_wr1200js            16064k   0xfb0000
youku_yk-l2                (16M)    0xfb0000
zbtlink_zbt-we1326         (16M)    0xfb0000
zbtlink_zbt-we3526         (16M)    0xfb0000
zbtlink_zbt-wg2626         (16M)    0xfb0000
zbtlink_zbt-wg3526-16m     (16M)    0xfb0000
zbtlink_zbt-wg3526-32m     (32M)    0x1fb0000

No verdict means that the device is correctly set.

Legend:
( ): Value is set via ralink_default_fw_size_xxM
[ ]: Value is derived from parent definition
 - : Value is not set and derived from default definition

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips/mt7620: fix IMAGE_SIZE for all devices
Adrian Schmutzler [Mon, 15 Jul 2019 12:55:19 +0000 (14:55 +0200)]
ramips/mt7620: fix IMAGE_SIZE for all devices

This fixes IMAGE_SIZE for all devices based on the partition size
given in DTS:

DEVICE                     *.MK     *.DTS      VERDICT
aigale_ai-br100            7936k    0x7c0000
alfa-network_ac1200rm      16064k   0xfb0000
alfa-network_tube-e4g      16064k   0xfb0000
asus_rp-n53                -        0x7b0000   default
asus_rt-ac51u              (16M)    0xfb0000
asus_rt-n12p               -        0xfb0000   wrong
asus_rt-n14u               -        0xfb0000   wrong
bdcom_wap2100-sk           15808k   0xf70000
buffalo_whr-1166d          15040k   0xfb0000   wrong
buffalo_whr-300hp2         6848k    0x7b0000   wrong
buffalo_whr-600d           6848k    0x7b0000   wrong
buffalo_wmr-300            -        0x7b0000   default
comfast_cf-wr800n          -        0x7b0000   default
dlink_dch-m225             6848k    0x6b0000
dlink_dir-510l             -        0xde0000   wrong
dlink_dir-810l             6720k    0x690000
dlink_dwr-116-a1           -        0x7e0000   wrong
dlink_dwr-118-a1           -        0xfe0000   wrong
dlink_dwr-118-a2           -        0xfe0000   wrong
dlink_dwr-921-c1           (16M)    0xfe0000   wrong
dlink_dwr-921-c3           [(16M)]  0xfe0000   wrong
dlink_dwr-922-e2           (16M)    0xfe0000   wrong
dovado_tiny-ac             -        0x7b0000   default
edimax_br-6478ac-v2        7616k    0x00790000 wrong
edimax_ew-7476rpc          7744k    0x00790000
edimax_ew-7478ac           7744k    0x00790000
edimax_ew-7478apc          7744k    0x00790000
elecom_wrh-300cr           (16M)    0xdf0000   wrong
glinet_gl-mt300a           (16M)    0xf80000   wrong
glinet_gl-mt300n           (16M)    0xf80000   wrong
glinet_gl-mt750            (16M)    0xf80000   wrong
head-weblink_hdrm200       16064k   0xfb0000
hiwifi_hc5661              15872k   0xf80000
hiwifi_hc5761              15872k   0xf80000
hiwifi_hc5861              15872k   0xf80000
hnet_c108                  16777216 0xfb0000   wrong
iodata_wn-ac1167gr         6864k    0x6b4000
iodata_wn-ac733gr3         6992k    0x6d4000
kimax_u25awf-h1            16064k   0xfb0000
kimax_u35wf                16064k   0xfb0000
kingston_mlw221            15744k   0xf60000
kingston_mlwg2             15744k   0xf60000
lava_lr-25g001             -        0xfe0000   wrong
lenovo_newifi-y1           (16M)    0xfb0000
lenovo_newifi-y1s          (16M)    0xfb0000
linksys_e1700              -        0x7b0000   default
microduino_microwrt        16128k   0xfc0000
netgear_ex2700             (4M)     0x3b0000
netgear_ex3700             7744k    0x790000
netgear_wn3000rp-v3        -        0x7b0000   default
nexx_wt3020-4m             (4M)     0x3b0000
nexx_wt3020-8m             -        0x7b0000   default
ohyeah_oy-0001             (16M)    0xfb0000
phicomm_k2g                7552k    0x760000
phicomm_psg1208            -        0x7b0000   default
phicomm_psg1218a           -        0x7b0000   default
phicomm_psg1218b           -        0x7b0000   default
planex_cs-qr10             -        0x7b0000   default
planex_db-wrt01            -        0x7b0000   default
planex_mzk-750dhp          -        0x7b0000   default
planex_mzk-ex300np         -        0x730000   wrong
planex_mzk-ex750np         -        0x730000   wrong
ralink_mt7620a-evb         -        0x7b0000   default
ralink_mt7620a-mt7530-evb  -        0x7b0000   default
ralink_mt7620a-mt7610e-evb -        0x7b0000   default
ralink_mt7620a-v22sg-evb   -        0x7f80000  wrong
ravpower_wd03              (8M)     0x7b0000
sanlinking_d240            (16M)    0xfb0000
sercomm_na930              20m      0x1400000
tplink_archer-c20i         -        0x7a0000   wrong
tplink_archer-c20-v1       -        0x7a0000   wrong
tplink_archer-c2-v1        -        0x7a0000   wrong
tplink_archer-c50-v1       -        0x7a0000   wrong
tplink_archer-mr200        -        0x7b0000   default
vonets_var11n-300          (4M)     0x3b0000
wrtnode_wrtnode            (16M)    0xfb0000
xiaomi_miwifi-mini         (16M)    0xf80000   wrong
youku_yk1                  (32M)    0x1fb0000
yukai_bocco                -        0x7b0000   default
zbtlink_we1026-5g-16m      16777216 0xfb0000   wrong
zbtlink_zbt-ape522ii       -        0xf80000   wrong
zbtlink_zbt-cpe102         -        0x760000   wrong
zbtlink_zbt-wa05           -        0x760000   wrong
zbtlink_zbt-we2026         -        0x760000   wrong
zbtlink_zbt-we826-16m      (16M)    0xfb0000
zbtlink_zbt-we826-32m      (32M)    0x1fb0000
zbtlink_zbt-we826-e        32448k   0x1fb0000
zbtlink_zbt-wr8305rt       -        0x7b0000   default
zte_q7                     -        0x7b0000   default
zyxel_keenetic-omni        -        0x7b0000   default
zyxel_keenetic-omni-ii     -        0x7b0000   default
zyxel_keenetic-viva        16064k   0xfb0000

No verdict means that the device is correctly set.

Legend:
( ): Value is set via ralink_default_fw_size_xxM
[ ]: Value is derived from parent definition
 - : Value is not set and derived from default definition

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: support IMAGE_SIZE in kiB for Build/trx
Adrian Schmutzler [Mon, 15 Jul 2019 12:55:14 +0000 (14:55 +0200)]
ramips: support IMAGE_SIZE in kiB for Build/trx

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: fix ralink_default_fw_size_16M
Adrian Schmutzler [Mon, 15 Jul 2019 12:55:02 +0000 (14:55 +0200)]
ramips: fix ralink_default_fw_size_16M

In ramips, there are the following predefined values for IMAGE_SIZE
ralink_default_fw_size_4M    3866624   3776k   0x3B0000
ralink_default_fw_size_8M    8060928   7872k   0x7B0000
ralink_default_fw_size_16M  16121856  15744k   0xF60000
ralink_default_fw_size_32M  33226752  32448k  0x1FB0000

Out of those, the "16M" value is obviously odd, as it provides more
room for the remaining partitions than the tree others.
Of the devices in all subtargets, there are actually > 50 that have
a firmware partition with 0xFB0000 size, while only 5 (!) have
0xF60000. From the former, many are set to
ralink_default_fw_size_16M anyway, although it is wrong at the
present point.

Consequently, it makes sense to change ralink_default_fw_size_16M
to 0xFB0000, and to update IMAGE_SIZE for the 5 devices with
0xF60000.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips/rt305x: fix firmware partition size for some 4MB devices
Adrian Schmutzler [Mon, 15 Jul 2019 12:29:53 +0000 (14:29 +0200)]
ramips/rt305x: fix firmware partition size for some 4MB devices

allnet_all0256n-4m, tenda_w150m and unbranded_wr512-3gn-4m have
their firmware partition set to reg = <0x50000 0x3c8000>.

However, based on the 4MB flash, the size should be 0x3b0000.

After some research in the target's history, it looks like the
changed size has been a mistake when transferring device
partitions from Makefile to DTS in 770b28f146f.

This patch changes the named three devices back to 0x3b0000.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
5 years agoramips: fix mac addresses used by Phicomm K2P
Chuanhong Guo [Thu, 25 Jul 2019 11:43:32 +0000 (19:43 +0800)]
ramips: fix mac addresses used by Phicomm K2P

Like most mt7621 boards, Phicomm K2P stores LAN/WAN mac addresses
at 0xe000/0xe006 of factory partition.
Phicomm uses lan_mac-1 as wan_mac, while our default case in 02_network
uses lan_mac+1.

Add a special case reading lan/wan mac address for Phicomm K2P.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 years agodnsmasq: improve insecure DS warning
Kevin Darbyshire-Bryant [Sat, 11 May 2019 15:17:45 +0000 (16:17 +0100)]
dnsmasq: improve insecure DS warning

Log the failing domain in the insecure DS warning.

Patch has been sent upstream.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agodnsmasq: backport latest patches
Kevin Darbyshire-Bryant [Sat, 9 Mar 2019 08:40:57 +0000 (08:40 +0000)]
dnsmasq: backport latest patches

Backport upstream patches pre 2.81rc for testing purposes.

Let's see what falls out!

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agoramips: add kmod-mt7615e to Phicomm K2P images
Roger Pueyo Centelles [Wed, 3 Jul 2019 13:39:03 +0000 (15:39 +0200)]
ramips: add kmod-mt7615e to Phicomm K2P images

Now that the mt76 driver supports the MT7615D chip found on these
devices, use it.

Also add the wpad-basic package.

Note: the driver supports operation on both the 2.4 GHz and the
      5 GHz bands, but not yet concurrently.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
5 years agokernel: netfilter add connmark savedscp support
Kevin Darbyshire-Bryant [Wed, 5 Jun 2019 17:31:47 +0000 (18:31 +0100)]
kernel: netfilter add connmark savedscp support

savedscp is a method of storing the DSCP of an ip packet into conntrack
mark.  In combination with a suitable tc filter action (conndscp but may
end up being integrated into connmark) DSCP values are able to be stored
on egress and restored on ingress across links that otherwise alter or
bleach DSCP.

This is useful for qdiscs such as CAKE which are able to shape according
to policies based on DSCP.

Ingress classification is traditionally a challenging task since
iptables rules haven't yet run and tc filter/eBPF programs are pre-NAT
lookups, hence are unable to see internal IPv4 addresses as used on the
typical home masquerading gateway.

The ingress problem is solved by the tc filter, but the tc people didn't
like the idea of tc setting conntrack mark values, though they are ok
with reading conntrack values and hence restoring DSCP from conntrack
marks.

x_tables CONNMARK with the new savedscp action solves the problem of
storing the DSCP to the conntrack mark.

It accepts 2 parameters.  The mark is a 32bit value with usually one 1
bit set.  This bit is set when savedscp saves the DSCP to the mark.
This is useful to implement a 'one shot'
iptables based classification where the 'complicated' iptables rules are
only run once to classify the connection on initial (egress) packet and
subsequent packets are all marked/restored with the same DSCP.  A mark
of zero disables the setting of a status bit/s.

The mask is a 32bit value of at least 6 contiguous bits and represents
the area where the DSCP will be stored.

e.g.

iptables -A QOS_MARK_eth0 -t mangle -j CONNMARK --savedscp-mark 0xfc000000/0x01000000

Would store the DSCP in the top 6 bits of the 32bit mark field, and use
the LSB of the top byte as the 'DSCP has been stored' marker.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agoiptables: add connmark savedscp support
Kevin Darbyshire-Bryant [Wed, 5 Jun 2019 17:31:04 +0000 (18:31 +0100)]
iptables: add connmark savedscp support

iptables: connmark - add savedscp option

Naive user space front end to xt_connmark 'savedscp' option.

e.g.

iptables -A QOS_MARK_eth0 -t mangle -j CONNMARK --savedscp-mark 0xfc000000/0x01000000

Will save DSCP into the top 6 bits and OR 0x01 (ie set) the least
significant bit of most significant byte.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agoRevert "build: allow simple build system customization with local.mk"
Petr Štetiar [Thu, 25 Jul 2019 07:45:03 +0000 (09:45 +0200)]
Revert "build: allow simple build system customization with local.mk"

This reverts commit fe928c7a81810fd84210a5e9594b7fa8ce1064ce as it seems
to introduce build breakage when local.mk doesn't exist.

 make --trace
 toplevel.mk:216: target 'local.mk' does not exist

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoar71xx: fix WLAN LED names for Archer C7
Tomislav Požega [Thu, 18 Jul 2019 19:37:39 +0000 (21:37 +0200)]
ar71xx: fix WLAN LED names for Archer C7

Update WLAN LED colour identifier for both interfaces on Archer C7

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
5 years agoar71xx: fix system LED names on Archer C5/C7
Tomislav Požega [Thu, 18 Jul 2019 15:59:37 +0000 (17:59 +0200)]
ar71xx: fix system LED names on Archer C5/C7

Move system LED board definitions of Archer C5/C7 to reflect
actual system LED colour used

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
5 years agoar71xx: Archer C7 v1 LED names and RFKILL fixes
Tomislav Požega [Thu, 18 Jul 2019 14:55:58 +0000 (14:55 +0000)]
ar71xx: Archer C7 v1 LED names and RFKILL fixes

All leds on these boards are green. v1 has RFKILL GPIO 23 for production
units (it had GPIO 13 only for test phase units, and these are rather
very rare to find). As for the previous attempt to fix this and revert
due to WDR boards have blue leds, it was wrong: WDR board does not use
common setup (false).

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
5 years agoar71xx: update qca-usb-quirks patch
Tomislav Požega [Fri, 19 Jul 2019 04:04:54 +0000 (06:04 +0200)]
ar71xx: update qca-usb-quirks patch

Base address for USB0 has changed from 0x18116c94 on AR934X
to 0x18116d94 on QCA9558. CP Typo remained for years here...

Signed-off-by: Tomislav Požega <pozega.tomislav@gmail.com>
5 years agotfa-layerscape: fix fiptool host build
Petr Štetiar [Wed, 24 Jul 2019 14:00:39 +0000 (14:00 +0000)]
tfa-layerscape: fix fiptool host build

fiptool is a host tool, used in a firmware generation pipeline, but it's
not treated as such, leading to the build breakage on the hosts which
don't have {Open,Libre}SSL dev package installed:

 In file included from fiptool.h:16:0,
                 from fiptool.c:19:
 fiptool_platform.h:18:27: fatal error: openssl/sha.h:
 No such file or directory
  #  include <openssl/sha.h>

So this patch promotes fiptool into the host tool with proper host
include and library paths under STAGING_DIR.

Ref: https://github.com/openwrt/openwrt/pull/2267
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agobuild: allow simple build system customization with local.mk
Petr Štetiar [Mon, 7 Jan 2019 00:57:01 +0000 (01:57 +0100)]
build: allow simple build system customization with local.mk

I tend to automate most of the boring and repetitive tasks like firmware
flashing, build config reconfiguration etc., so I always end up adding
`include local.mk` as a last line in my Makefile, where local.mk is
usually symlink to some other place, just to not accidentally delete it
during `git clean`.

Carrying this single uncommited modification along in the development
process is quite PITA, because it's causing problems during Git
workflow, while rebasing etc.

I hope, that I'm not alone using similar workflow, so I believe, that
this modification might be useful for others as well.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoath79: fix indent in 01_leds
Adrian Schmutzler [Wed, 24 Jul 2019 15:05:02 +0000 (17:05 +0200)]
ath79: fix indent in 01_leds

Change capitalization from spaces to tabs in order to match
the style of the file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
[fix capitalization in commit title, add short description]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agomt76: fix kernel Oops by updating to the latest version
Petr Štetiar [Mon, 22 Jul 2019 20:38:53 +0000 (22:38 +0200)]
mt76: fix kernel Oops by updating to the latest version

75656a4590a3 net: wireless: support of_get_mac_address new ERR_PTR error

Ref: https://github.com/openwrt/mt76/issues/299
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agoath79: add support for D-Link DIR-842 C2
Jackson Lim [Sat, 20 Jul 2019 07:37:12 +0000 (15:37 +0800)]
ath79: add support for D-Link DIR-842 C2

Hardware spec of DIR-842 C2:
SoC: QCA9563
DRAM: 128MB DDR2
Flash: 16MB SPI-NOR
Switch: QCA8337N
WiFi 5.8GHz: QCA9888
WiFi 2.4Ghz: QCA9563
USB: 2.0

Flash instructions:

1. Upgrade the factory.bin through the factory web interface or
   the u-boot failsafe interface.
   The firmware will boot up correctly for the first time.
   Do not power off the device after OpenWrt has booted.
   Otherwise the u-boot will enter failsafe mode as the checksum
   of the firmware has been changed.
2. Upgrade the sysupgrade.bin in OpenWrt.
   After upgrading completes the u-boot won't complain about the
   firmware checksum and it's OK to use now.
3. If you powered off the device before upgrading the sysupgrade.bin,
   just upgrade the factory.bin through the u-boot failsafe interface
   and then goto step 2.

Signed-off-by: Jackson Lim <jackcolentern@gmail.com>
[Reword reset-hog comment, fix formatting]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years agotools: libressl: fix compilation for non-glibc clib (FS#2400)
Hans Dedecker [Tue, 23 Jul 2019 12:47:56 +0000 (14:47 +0200)]
tools: libressl: fix compilation for non-glibc clib (FS#2400)

Fixes compilaton issue for non glibc clibs :

libtool: compile:  gcc -DPACKAGE_NAME=\"libressl\" -DPACKAGE_TARNAME=\"libressl\" -DPACKAGE_VERSION=\"2.9.2\" "-DPACKAGE_STRING=\"libressl 2.9.2\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libressl\" -DVERSION=\"2.9.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_SYMLINK=1 -DHAVE_ERR_H=1 -DHAVE_ASPRINTF=1 -DHAVE_MEMMEM=1 -DHAVE_STRLCAT=1 -DHAVE_STRLCPY=1 -DHAVE_STRNDUP=1 -DHAVE_STRNLEN=1 -DHAVE_STRSEP=1 -DHAVE_TIMEGM=1 -DHAVE_SYSLOG=1 -DHAVE_ACCEPT4=1 -DHAVE_PIPE2=1 -DHAVE_POLL=1 -DHAVE_SOCKETPAIR=1 -DHAVE_EXPLICIT_BZERO=1 -DHAVE_GETAUXVAL=1 -DHAVE_GETAUXVAL=1 -DHAVE_DL_ITERATE_PHDR=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_VA_COPY=1 -DHAS_GNU_WARNING_LONG=1 -DSIZEOF_TIME_T=8 -I. -I../include -I../include/compat -DLIBRESSL_INTERNAL -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -I../crypto/asn1 -I../crypto/bn -I../crypto/ec -I../crypto/ecdsa -I../crypto/evp -I../crypto/modes -I../crypto -I/builds/pantacor/pv-platforms/openwrt-base/openwrt/staging_dir/host/include -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_SOURCE -D_GNU_SOURCE -D__STRICT_ALIGNMENT -O2 -I/builds/pantacor/pv-platforms/openwrt-base/openwrt/staging_dir/host/include -fpic -Wall -std=gnu99 -fno-strict-aliasing -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DHAVE_GNU_STACK -Wno-pointer-sign -MT compat/getprogname_linux.lo -MD -MP -MF compat/.deps/getprogname_linux.Tpo -c compat/getprogname_linux.c -o compat/getprogname_linux.o
compat/getprogname_linux.c: In function 'getprogname':
compat/getprogname_linux.c:32:2: error: #error "Cannot emulate getprogname"
 #error "Cannot emulate getprogname"
  ^~~~~

Reported-by: Anibal Portero <anibal.portero@pantacor.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agoramips: enable Newifi D1 SD slot
DENG Qingfang [Mon, 22 Jul 2019 17:05:20 +0000 (01:05 +0800)]
ramips: enable Newifi D1 SD slot

Newifi D1 is shipped with an 8GB microSD card in its SD slot
Without SD driver users would not be able to use it unless manually installed

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
5 years agonetifd: update to latest git HEAD
Hans Dedecker [Mon, 22 Jul 2019 19:46:31 +0000 (21:46 +0200)]
netifd: update to latest git HEAD

899f168 system-linux: Coverity fixes

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agotools: libressl: fix build on MacOS
Kevin Darbyshire-Bryant [Mon, 22 Jul 2019 13:38:54 +0000 (14:38 +0100)]
tools: libressl: fix build on MacOS

Making all in tests
depbase=`echo handshake_table.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DPACKAGE_NAME=\"libressl\" -DPACKAGE_TARNAME=\"libressl\" -DPACKAGE_VERSION=\"2.9.2\" -DPACKAGE_STRING=\"libressl\ 2.9.2\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libressl\" -DVERSION=\"2.9.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_SYMLINK=1 -DHAVE_ERR_H=1 -DHAVE_READPASSPHRASE_H=1 -DHAVE_ASPRINTF=1 -DHAVE_MEMMEM=1 -DHAVE_READPASSPHRASE=1 -DHAVE_STRLCAT=1 -DHAVE_STRLCPY=1 -DHAVE_STRNDUP=1 -DHAVE_STRNLEN=1 -DHAVE_STRSEP=1 -DHAVE_TIMEGM=1 -DHAVE_GETPROGNAME=1 -DHAVE_SYSLOG=1 -DHAVE_POLL=1 -DHAVE_SOCKETPAIR=1 -DHAVE_ARC4RANDOM=1 -DHAVE_ARC4RANDOM_BUF=1 -DHAVE_ARC4RANDOM_UNIFORM=1 -DHAVE_TIMINGSAFE_BCMP=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_VA_COPY=1 -DHAVE___VA_COPY=1 -DSIZEOF_TIME_T=8 -I.  -I../include -I../include/compat -DLIBRESSL_INTERNAL -D__BEGIN_HIDDEN_DECLS= -D__END_HIDDEN_DECLS= -I ../crypto/modes -I ../crypto/asn1 -I ../ssl -I ../tls -I ../apps/openssl -I ../apps/openssl/compat -D_PATH_SSL_CA_FILE=\"../apps/openssl/cert.pem\" -I/Users/kevin/wrt/staging_dir/host/include  -D__STRICT_ALIGNMENT  -O2 -I/Users/kevin/wrt/staging_dir/host/include  -fpic -Wall -std=gnu99 -fno-strict-aliasing  -fno-strict-overflow -D_FORTIFY_SOURCE=2 -fstack-protector-strong  -Qunused-arguments -Wno-pointer-sign -MT handshake_table.o -MD -MP -MF $depbase.Tpo -c -o handshake_table.o handshake_table.c &&\
mv -f $depbase.Tpo $depbase.Po
make[4]: *** No rule to make target `/Users/kevin/wrt/build_dir/host/libressl-2.9.2/crypto/.libs/libcrypto_la-cpuid-macosx-x86_64.o', needed by `handshake_table'.  Stop.
make[3]: *** [all-recursive] Error 1

A similar error & clues from
https://gitlab.com/ymorin/buildroot/commit/e783d60473944f8b39f1def45d8d6b483a062158

"
LibreSSL 2.9.1 now has a test that requires libtls.a, however, when building a
shared library only build, the --disable-static flag is passed to libressl,
which prevents the building of libtls.a.

With libtls.a not being built, the following error occurs:
libressl-2.9.1/tls/.libs/libtls.a', needed by 'handshake_table'.  Stop.

There are three options to fix this:
1) Stick with autotools, and provide a patch that removes building anything in
   the tests folder.
2) Pass --enable-static to LIBRESSL_CONF_OPTS
3) Change the package type to cmake, as a cmake build does not have this issue."

It appears we cannot change to cmake because cmake has a dependency on
an ssl library.

Take option 1 and do not build the tests.

Also take the opportunity to remove man page building as well.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
5 years agobase-files: drop support for the platform_nand_pre_upgrade()
Rafał Miłecki [Wed, 17 Jul 2019 09:32:55 +0000 (11:32 +0200)]
base-files: drop support for the platform_nand_pre_upgrade()

No target uses it anymore. All code from that callback was moved into
the platform_do_upgrade().

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agotreewide: sysupgrade: get rid of platform_nand_pre_upgrade()
Rafał Miłecki [Wed, 17 Jul 2019 09:32:54 +0000 (11:32 +0200)]
treewide: sysupgrade: get rid of platform_nand_pre_upgrade()

1) nand_do_upgrade() is always called by a target code
2) nand_do_upgrade() starts with calling platform_nand_pre_upgrade()

It means there is no need for the platform_nand_pre_upgrade() callback
at all. All code that was present there could bo moved & simplly called
by a target right before the nand_do_upgrade().

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agolayerscape: sysupgrade: get rid of platform_pre_upgrade()
Rafał Miłecki [Wed, 17 Jul 2019 06:02:05 +0000 (08:02 +0200)]
layerscape: sysupgrade: get rid of platform_pre_upgrade()

1) RAMFS_COPY_BIN and RAMFS_COPY_DATA can be defined at top of the file
   like it's done for all other targets.
2) fw_printenv.lock can be created one step later in the
   platform_do_upgrade(). It seems to be working well on many other
   targets.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agocurl: update to 7.65.3
Hans Dedecker [Sun, 21 Jul 2019 21:25:15 +0000 (23:25 +0200)]
curl: update to 7.65.3

For changes in 7.65.3; see https://curl.haxx.se/changes.html#7_65_3

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
5 years agomac80211: brcm: backport first set of 5.4 brcmfmac changes
Rafał Miłecki [Sun, 21 Jul 2019 09:23:32 +0000 (11:23 +0200)]
mac80211: brcm: backport first set of 5.4 brcmfmac changes

This doesn't include 9ff8614a3dbe ("brcmfmac: use separate Kconfig file
for brcmfmac") due to a few conflicts with backports changes.

An important change is:
[PATCH 2/7] brcmfmac: change the order of things in brcmf_detach()
which fixes a rmmod crash in the brcmf_txfinalize().

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years agotools: libressl: update to 2.9.2 version
Roman Yeryomin [Thu, 18 Jul 2019 16:35:50 +0000 (19:35 +0300)]
tools: libressl: update to 2.9.2 version

To keep in sync with OpenSSL 1.1.x branch version options.

Signed-off-by: Roman Yeryomin <roman@advem.lv>
5 years agofirmware-utils: mkfwimage: fix build failure on macOS with gcc 9
Petr Štetiar [Fri, 19 Jul 2019 21:04:23 +0000 (23:04 +0200)]
firmware-utils: mkfwimage: fix build failure on macOS with gcc 9

Fixes following errors:

 src/mkfwimage.c:279:8: error: format specifies type 'long' but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
                      d->stats.st_size,
                     ^~~~~~~~~~~~~~~~
 src/mkfwimage.c:280:8: error: format specifies type 'long' but the argument has type 'long long' [-Werror,-Wformat]
                      d->partition_length - d->stats.st_size);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 src/mkfwimage.c:378:6: error: format specifies type 'unsigned long' but the argument has type 'long long' [-Werror,-Wformat]
                      d->stats.st_size - d->partition_length);
                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reported-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agofirmware-utils: mkfwimage: fix more errors reported by gcc-6/7/9
Petr Štetiar [Fri, 19 Jul 2019 19:34:16 +0000 (21:34 +0200)]
firmware-utils: mkfwimage: fix more errors reported by gcc-6/7/9

src/mkfwimage.c:276:8: error: format '%lld' expects argument of type 'long long int', but argument 4 has type '__off_t' {aka 'const long int'} [-Werror=format=]
src/fw.h:71:36: error: format '%llu' expects argument of type 'long long unsigned int', but argument 6 has type '__off_t' {aka 'long int'} [-Werror=format=]
    inlined from 'main' at src/mkfwimage.c:543:12:
/string_fortified.h:106:10: error: '__builtin_strncpy' output truncated before terminating nul copying 4 bytes from a string of the same length [-Werror=stringop-truncation]
    inlined from 'write_part' at src/mkfwimage.c:235:2,
string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]
    inlined from 'main' at src/mkfwimage.c:477:5:
string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 256 equals destination size [-Werror=stringop-truncation]
    inlined from 'main' at src/mkfwimage.c:496:5:
string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
    inlined from 'main' at src/mkfwimage.c:481:5:
string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation]
    inlined from 'main' at src/mkfwimage.c:485:5:
string_fortified.h:106:10: error: '__builtin_strncpy' specified bound 16 equals destination size [-Werror=stringop-truncation]

Runtested on ath79 and UBNT Bullet M XW.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years agofirmware-utils: mkfwimage: fix more errors
Kevin Darbyshire-Bryant [Fri, 19 Jul 2019 15:54:17 +0000 (16:54 +0100)]
firmware-utils: mkfwimage: fix more errors

Fix 4 errors reported by gcc 9

3 mismatched format type errors
1 unused variable error

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>