openwrt/staging/blocktrron.git
4 years agoath79: add read support using spi-mem
Luiz Angelo Daros de Luca [Tue, 11 Feb 2020 19:25:36 +0000 (16:25 -0300)]
ath79: add read support using spi-mem

Reimplements read optimization on top of spi-mem. Similar to
what 461-spi-ath79-add-fast-flash-read.patch used to do with
the dropped flash read interface.

It accelerate only fast-read op reading flash directly from
memory mapped region. 'm25p,fast-read' must be set in order
to use the new spi-mem.

It improved read speed up to 3x on old devices (tplink,tl-wr2543-v1)
while no speed improvement was noticed on newer devices like
(tplink,archer-c7-v2).

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
4 years agonetifd: fix jail ifdown and jails without jail_ifname
Daniel Golle [Mon, 13 Apr 2020 23:53:28 +0000 (00:53 +0100)]
netifd: fix jail ifdown and jails without jail_ifname

The previous commit introduced a regression for netns jails without
jail_ifname set. Fix that.

Fixes: 4e4f7c6d2d ("netifd: network namespace jail improvements")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agonetifd: network namespace jail improvements
Daniel Golle [Mon, 13 Apr 2020 23:20:42 +0000 (00:20 +0100)]
netifd: network namespace jail improvements

 aaaca2e interface: allocate and free memory for jail name
 d93126d interface: allow renaming interface when moving to jail netns

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agomac80211: adapt for single-instance wpad
Daniel Golle [Mon, 6 Apr 2020 23:00:11 +0000 (00:00 +0100)]
mac80211: adapt for single-instance wpad

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agohostapd: reduce to a single instance per service
Daniel Golle [Mon, 6 Apr 2020 22:58:40 +0000 (23:58 +0100)]
hostapd: reduce to a single instance per service

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agox86: add nforce eth to default packages
Alberto Bursi [Fri, 10 Apr 2020 20:45:19 +0000 (22:45 +0200)]
x86: add nforce eth to default packages

forcedeth is necessary to use the integrated
ethernet controller of Nvidia nForce chipset.

There are PC motherboards with this chipset
from 2001 that run 32bit Athlon XP CPUs and
more modern ones up to 2009 that can run Intel
and AMD 64bit processors, so add this to
all non-geode x86 targets.

Signed-off-by: Alberto Bursi <bobafetthotmail@gmail.com>
4 years agomvebu: drop armada-37xx PCI aardvark patches
Tomasz Maciej Nowak [Thu, 12 Mar 2020 18:03:34 +0000 (19:03 +0100)]
mvebu: drop armada-37xx PCI aardvark patches

These patches were necessarry for Atheros and some Intel WiFi cards.
After short testing, the current upstream driver state is enough for
these WiFi cards to work. If there are still some issues with other
devices, the patches could be easily restored.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agomvebu: refresh config
DENG Qingfang [Wed, 4 Mar 2020 12:46:33 +0000 (20:46 +0800)]
mvebu: refresh config

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agomvebu: refresh patches
DENG Qingfang [Wed, 4 Mar 2020 12:46:28 +0000 (20:46 +0800)]
mvebu: refresh patches

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agomvebu: set kernel testing version to 5.4
DENG Qingfang [Wed, 4 Mar 2020 12:46:23 +0000 (20:46 +0800)]
mvebu: set kernel testing version to 5.4

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agomvebu: copy files and patches to 5.4
DENG Qingfang [Wed, 4 Mar 2020 12:46:10 +0000 (20:46 +0800)]
mvebu: copy files and patches to 5.4

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agomvebu: add support for Buffalo LinkStation LS421DE
Daniel González Cabanelas [Tue, 7 Apr 2020 12:35:26 +0000 (14:35 +0200)]
mvebu: add support for Buffalo LinkStation LS421DE

Buffalo LinkStation LS421DE is a dual bay NAS, based on Marvell Armada 370

Hardware:
   SoC:         Marvell Armada 88F6707-A1
   CPU:         Cortex-A9 1200 MHz, 1 core
   Flash:       SPI-NOR 1 MiB, NAND 512 MiB
   RAM:         DDR3 512 MiB
   Ethernet:    1x 10/100/1000 Mbps
   USB:         1x 2.0, 1x 3.0
   SATA:        2x 3.0 Gbps
   LEDs/Input : 5x / 2x (1x button, 1x slide-switch)
   RTC:         Ricoh RS5C372A, I2C, no battery

Flash instruction (UART+TFTP):
  1. Downgrade the OEM firmware to 1.34 version (BUFFALO_BOOTVER=0.13)
  2. Remove any hard drive from inside the bays.
  3. Boot the Openwrt initramfs image using the U-Boot serial console:
         tftpboot 0x1200000 buffalo_ls421de-initramfs-kernel.bin
         bootm 0x1200000
  4. Flash the sysupgrade image using the Openwrt console:
         sysupgrade -n buffalo_ls421de-squashfs-sysupgrade.bin
  5. Wait until it finish, the device will reboot with Openwrt installed
     on the NAND flash.

Note:
  - Device shuting down doesn't work, even if the power slide switch is
    used. We must first, via MDIO, set the unused LED2 at the ethernet
    phy0 to off state. Reboot works ok.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Reviewed-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
4 years agotoolchain/gcc: remove uclibc hack
Rosen Penev [Wed, 25 Mar 2020 01:29:51 +0000 (18:29 -0700)]
toolchain/gcc: remove uclibc hack

This was introduced with 014d3b98b96872d020ffccf0358ba60967b3f1c0 , which
is almost 10 years old. uClibc-ng does not suffer from this problem.

Note that this hack prevents libstdc++ from using C++11 math functions.

Tested by removing all of the mpd patches designed to fix this and
compiling.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agoelfutils: update to 0.179
Rosen Penev [Mon, 6 Apr 2020 02:02:38 +0000 (19:02 -0700)]
elfutils: update to 0.179

Removed sys/cdefs usage. The header is deprecated.

Removed canonicalize_file_name define. It's already fixed upstream.

Added --disable-debuginfod. Seems to be needed.

Modified patch 005 to build more stuff. It was failing before. It still
only builds libraries.

Modified patch 100 to use strerror under non-glibc. It is used under
glibc as strerror is not thread safe. It is under musl and uClibc-ng.
strerror_l is not available under uClibc-ng.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agohostapd: backport usleep patch
Rosen Penev [Tue, 7 Apr 2020 02:17:59 +0000 (19:17 -0700)]
hostapd: backport usleep patch

Optionally fixes compilation with uClibc-ng.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agokernel: remove non-existant symbols
Aleksander Jan Bajkowski [Tue, 18 Feb 2020 18:39:49 +0000 (19:39 +0100)]
kernel: remove non-existant symbols

These symbols exist only in older kernels and can be removed.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years agowpa_supplicant: disable CONFIG_WRITE functionality
Kirill Lukonin [Tue, 24 Mar 2020 18:59:56 +0000 (23:59 +0500)]
wpa_supplicant: disable CONFIG_WRITE functionality

CONFIG_WRITE functionality is not used and could be removed.
Looks helpful for devices with small flash because wpad is also affected.

Little testing shows that about 6 KB could be saved.

Signed-off-by: Kirill Lukonin <klukonin@gmail.com>
4 years agomwlwifi: Update the 88W8964's firmware to 9.3.2.12 and fix backports version detection
Jose Olivera [Thu, 6 Feb 2020 16:06:31 +0000 (00:06 +0800)]
mwlwifi: Update the 88W8964's firmware to 9.3.2.12 and fix backports version detection

Updates the 88W8964 firmware used in the Linksys WRT3200ACM and WRT32X
[v9.3.2.6 -> v9.3.2.12]

Removes 0c43219 ("mwlwifi: Fix loading with backports v5.3")
as it has been merged upstream.

Unfortunately, there is a bug wherein Kaloz's repo, the version
detection mechanism for fixing vendor commands doesn't work.

It pulls in the Linux kernel version, which as of this time is
"4.14.y" or "4.19.y"

However, the proper behaviour is that it should pull in the mac80211
backports version which as of now is "5.4.27"

The included patch works around this using a backports define found
only on versions >5.3, "VENDOR_CMD_RAW_DATA".

Signed-off-by: Jose Olivera <oliverajeo@gmail.com>
4 years agokernel: hwmon: add dme1737 driver
Lucian Cristian [Thu, 2 Apr 2020 11:17:00 +0000 (14:17 +0300)]
kernel: hwmon: add dme1737 driver

SMSC DME1737, SCH3112, SCH3114, SCH3116, SCH5027 monitoring support

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
4 years agoath79: fix USB port LED assignment for ZyXEL NBG6716
Adrian Schmutzler [Sun, 12 Apr 2020 19:57:41 +0000 (21:57 +0200)]
ath79: fix USB port LED assignment for ZyXEL NBG6716

The USB LED assignment to internal ports was swapped.

Fix it.

We also explicitly checked that the LED label numbers match those
on the device.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoath79: fix wmac initialization for Zyxel NBG6716
Guillaume Lefebvre [Fri, 20 Dec 2019 23:21:32 +0000 (00:21 +0100)]
ath79: fix wmac initialization for Zyxel NBG6716

2.4 GHz Wifi on ath79 is set up in 10-ath9k-eeprom, but in ar71xx
it was done with ath79_register_wmac.

Thus, the following errors are observed on the device:
ath: phy1: Unable to initialize hardware; initialization status: -5
ath9k 18100000.wmac: failed to initialize device
ath9k: probe of 18100000.wmac failed with error -5

This patch changes the ath79 support to properly use wmac as well.
This will also require fixing the MAC address in a different way.

Signed-off-by: Guillaume Lefebvre <guillaume@zelig.ch>
[several adjustments to 10-fix-wifi-mac, use correct MAC address,
rewrite commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agocypress-firmware: update to v5.4.18-2020_0402
Álvaro Fernández Rojas [Mon, 13 Apr 2020 08:14:48 +0000 (10:14 +0200)]
cypress-firmware: update to v5.4.18-2020_0402

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
4 years agoramips: fix whitespace in 990_NET-no-auto-carrier-support.patch
Chuanhong Guo [Mon, 13 Apr 2020 03:49:16 +0000 (11:49 +0800)]
ramips: fix whitespace in 990_NET-no-auto-carrier-support.patch

Fixes: 6fcba5eec3 ("ramips: port 0034-NET-multi-phy-support.patch to 5.4")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: ralink-eth: fix leftover dma dev argument
Chuanhong Guo [Mon, 13 Apr 2020 03:32:50 +0000 (11:32 +0800)]
ramips: ralink-eth: fix leftover dma dev argument

Fixes: 05dee5833a ("ramips: ralink-eth: fix device struct passed to dma functions")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agobase-files: don't ship local build key when on buildbot
Daniel Golle [Sun, 12 Apr 2020 19:28:49 +0000 (20:28 +0100)]
base-files: don't ship local build key when on buildbot

Including the local build key in /etc/opkg/keys isn't feasible when
building on the buildbot: The included key collides with its copy
already in openwrt-keyring which breaks the ImageBuilder.
Not including a locally generated key also makes the base-files package
more reproducible.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agobcm63xx: disable all devices with <= 4MiB flash and <= 32 MiB RAM
Jonas Gorski [Fri, 28 Feb 2020 11:00:29 +0000 (12:00 +0100)]
bcm63xx: disable all devices with <= 4MiB flash and <= 32 MiB RAM

Device with 4 MiB flash and 32 MiB RAM won't be able to run OpenWrt in
a sufficient manner without tweaks, so don't build images for them by
default.

This includes all BCM6338, BCM6345 and BCM6348 "generic" devices,
as there are no supported devices of these with more than that.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
4 years agoramips: replace pinctrl property names
Chuanhong Guo [Sun, 12 Apr 2020 12:58:29 +0000 (20:58 +0800)]
ramips: replace pinctrl property names

Upstream pinctrl driver in drivers/staging uses
groups/function/ralink,num-gpios instead of
ralink,group/ralink,function/ralink,nr-gpio
Replace these properties in dts as well as the pinctrl driver in
patches-4.14.
This commit is created using:
sed -i 's/ralink,group/groups/g'
sed -i 's/ralink,function/function/g'
sed -i 's/ralink,nr-gpio/ralink,num-gpios/g'

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: explicitly disable built-in switch when needed
Chuanhong Guo [Fri, 10 Apr 2020 04:32:42 +0000 (12:32 +0800)]
ramips: explicitly disable built-in switch when needed

previously we rely on the failsafe setup in preinit scripts to disable
built-in switch implicitly for single-port devices. This doesn't work
anymore due to preinit script removal.
this patch explicitly disable built-in switch for needed devices.

Fixes: a8d62a4eb1 ("ramips: remove set_preinit_iface script")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agobase-files: preinit: also config switch when no port roles defined
Chuanhong Guo [Fri, 10 Apr 2020 04:07:25 +0000 (12:07 +0800)]
base-files: preinit: also config switch when no port roles defined

current preinit code in base-files doesn't config switch when there are
no port roles defined. But this kind of configuration exists on single
port devices where switch vlan is simply disabled.
configure reset and enable_vlan property when a switch node exist.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: add 5.4 as testing kernel
Chuanhong Guo [Thu, 9 Apr 2020 12:59:27 +0000 (20:59 +0800)]
ramips: add 5.4 as testing kernel

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: mt76x8: switch to kernel 5.4
Chuanhong Guo [Thu, 9 Apr 2020 07:30:56 +0000 (15:30 +0800)]
ramips: mt76x8: switch to kernel 5.4

4.14 doesn't work anymore due to gpio dt binding changes. Switch mt76x8
to 5.4 directly.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: disable images for 4M devices
Chuanhong Guo [Thu, 9 Apr 2020 10:40:01 +0000 (18:40 +0800)]
ramips: disable images for 4M devices

default initramfs for 5.4 kernel is larger than 4M, causing build error
for oversized initramfs image.
disable these images because we have no mechanism for ignoring initramfs
errors and the squashfs image will be larger than initramfs anyway.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: ralink-eth: add support for 5.4 kernel
Chuanhong Guo [Thu, 9 Apr 2020 09:59:09 +0000 (17:59 +0800)]
ramips: ralink-eth: add support for 5.4 kernel

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: mt7628: update dts for upstream gpio-mt7621 driver
Chuanhong Guo [Thu, 9 Apr 2020 09:10:03 +0000 (17:10 +0800)]
ramips: mt7628: update dts for upstream gpio-mt7621 driver

upstream driver merged 3 separated gpio banks into one gpio node.
and gpioX Y in our local driver should be replaced with gpio X*32+Y.

This patch is created using the following sed command:
sed -i -r 's/(.*)gpio([0-9]) ([0-9]+)(.*)/echo "\1gpio $((\2*32+\3))\4"/ge'

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: refresh kernel config for 5.4
Chuanhong Guo [Thu, 9 Apr 2020 09:03:32 +0000 (17:03 +0800)]
ramips: refresh kernel config for 5.4

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: copy kernel config for 5.4
Chuanhong Guo [Thu, 9 Apr 2020 08:58:17 +0000 (16:58 +0800)]
ramips: copy kernel config for 5.4

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: port 0034-NET-multi-phy-support.patch to 5.4
Chuanhong Guo [Thu, 9 Apr 2020 07:50:21 +0000 (15:50 +0800)]
ramips: port 0034-NET-multi-phy-support.patch to 5.4

This hack is needed for old ethernet driver:
On mt7620, we have two exposed RGMII ports that connects to builtin
switch. However, swconfig has no way to interact with phy subsystem.
As a result, we have to register both PHYs to ethernet mac instead
and this patch prevents main ethernet interface from going down due
to phy link changes.
Also rename the patch for its actual purpose.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: ralink-eth: fix device struct passed to dma functions
Chuanhong Guo [Mon, 9 Sep 2019 06:52:39 +0000 (14:52 +0800)]
ramips: ralink-eth: fix device struct passed to dma functions

dma functions needs the struct from platform_device instead of
the one for ethernet interface.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: move and rename out-of-tree mtk eth driver
Chuanhong Guo [Thu, 9 Apr 2020 06:09:48 +0000 (14:09 +0800)]
ramips: move and rename out-of-tree mtk eth driver

move the driver into shared 'files' directory and rename all symbols
from mediatek/mtk to ralink.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: increase spi frequency for newifi d1/d2
Chuanhong Guo [Mon, 6 Apr 2020 11:07:27 +0000 (19:07 +0800)]
ramips: increase spi frequency for newifi d1/d2

increase spi frequency for both devices to 45MHz.
while at it, also remove m25p,fast-read for newifi d1 as it's only
needed when spi clock is higher than 50MHz.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: enable broken-flash-reset for some 32M flash boards
Chuanhong Guo [Mon, 6 Apr 2020 10:33:30 +0000 (18:33 +0800)]
ramips: enable broken-flash-reset for some 32M flash boards

These are boards known to start on 3-byte address mode, which requires
broken-flash-reset if 4B_OPCODES isn't supported by the flash.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agogeneric: spi-nor: rework broken-flash-reset
Chuanhong Guo [Mon, 6 Apr 2020 10:28:10 +0000 (18:28 +0800)]
generic: spi-nor: rework broken-flash-reset

Instead of resetting flash to 3B address on remove hook, this
implementation only enters 4B mode when needed, which prevents more
unexpected reboot stuck. This implementation makes it only break when
a kernel panic happens during flash operation on 16M+ areas.
Also silent broken-flash-reset warning. We are not dealing with vendors
and it's unpleasant for users to see that unnecessary and long WARN_ON
print.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agodnsmasq: bump to v2.81
Kevin Darbyshire-Bryant [Sun, 12 Apr 2020 07:55:26 +0000 (08:55 +0100)]
dnsmasq: bump to v2.81

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agobase-files: source functions.sh in /lib/functions/system.sh
Adrian Schmutzler [Fri, 13 Mar 2020 15:56:53 +0000 (16:56 +0100)]
base-files: source functions.sh in /lib/functions/system.sh

The file /lib/functions/system.sh depends on find_mtd_index() and
find_mtd_part() located in /lib/function.sh, so let's source that
file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobase-files: do not source system.sh in functions.sh
Adrian Schmutzler [Fri, 13 Mar 2020 15:05:43 +0000 (16:05 +0100)]
base-files: do not source system.sh in functions.sh

The default_postinst() function in /lib/functions.sh sources
/lib/functions/system.sh before cycling through uci-defaults files.

This creates a pseudo-cyclic dependency as system.sh also uses
functions that are located in functions.sh. Despite that, there
is actually only one uci-defaults file in the entire repo that needs
system.sh, and this one contains an explicit source for system.sh
anyway.

Consequently, this patch removes the sourcing of system.sh in
functions.sh. There are no relevant uses in packages, routing and
luci repositories.
This may require adjustments for downstream, though.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agocns3xx: remove support for kernel 4.14
Adrian Schmutzler [Wed, 1 Apr 2020 22:29:21 +0000 (00:29 +0200)]
cns3xx: remove support for kernel 4.14

This target has been on kernel 4.19 for nine months now [1], and
has had testing support for even longer [2].
This should be long enough to drop support for kernel 4.14.

[1] 545bfbc3a922 ("cns3xxx: switch to kernel 4.19")
[2] c6bebe1a9496 ("cns3xxx: add support for kernel 4.19")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: mt7621: tidy up names for Ubiquiti devices
Adrian Schmutzler [Tue, 7 Apr 2020 08:47:18 +0000 (10:47 +0200)]
ramips: mt7621: tidy up names for Ubiquiti devices

The "proper" vendor prefix for Ubiquiti is "ubnt", this is used in
all targets except ramips and also recommended by the kernel.

This patch adjusts the various board/image/device name variables
accordingly. Since we touch it anyway, this also adds the space
in "EdgeRouter X" as a hyphen to those variables to really make
them consistent with the model name.

While at it, create a real shared definition for the devices in
image/mt7621.mk instead of deriving one device from another.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: remove support for kernel 4.19
Adrian Schmutzler [Fri, 3 Apr 2020 19:06:20 +0000 (21:06 +0200)]
bcm63xx: remove support for kernel 4.19

Since stable kernel for this target is still 4.14, kernel 4.19
has never been used much (and actually was broken for some devices).

So, since we bump testing kernel to 5.4, there is no real need to
keep 4.19 and have an additional version to care about.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: use kernel 5.4 as testing kernel
Adrian Schmutzler [Fri, 3 Apr 2020 13:47:47 +0000 (15:47 +0200)]
bcm63xx: use kernel 5.4 as testing kernel

This uses 5.4 as testing kernel. Since 4.19 has not seen broad
testing yet, just keep 4.14 as stable kernel until 5.4 is ready.

Tested on Comtrend AR-5387un (Thanks to @Noltari).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: 5.4: fix compilation for changed driver_find_device
Adrian Schmutzler [Fri, 3 Apr 2020 18:53:56 +0000 (20:53 +0200)]
bcm63xx: 5.4: fix compilation for changed driver_find_device

In kernel patch 92ce7e83b4e5 ("driver_find_device: Unify the match
function with class_find_device()") the arguments of functions used
with driver_find_device are adjusted. Do the same for our local
user.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: 5.4: add removed helper syscon_regmap_lookup_by_pdevname
Adrian Schmutzler [Fri, 3 Apr 2020 18:21:20 +0000 (20:21 +0200)]
bcm63xx: 5.4: add removed helper syscon_regmap_lookup_by_pdevname

The helper syscon_regmap_lookup_by_pdevname has been removed in kernel patch
29d14b668d2f ("mfd: Remove unused helper syscon_regmap_lookup_by_pdevname")
due to lack of users.

However, we use this function in our local pinctrl drivers for BCM6358 and
BCM6368. Thus, we have to add it locally.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: prevent fall-through in kernel patches for 5.4
Adrian Schmutzler [Fri, 3 Apr 2020 15:48:43 +0000 (17:48 +0200)]
bcm63xx: prevent fall-through in kernel patches for 5.4

In kernel 5.4 -Werror=implicit-fallthrough is treated as error:

arch/mips/bcm63xx/cpu.c: In function 'detect_cpu_clock':
arch/mips/bcm63xx/cpu.c:158:2: error: this statement may fall through [-Werror=implicit-fallthrough=]
  {
  ^
arch/mips/bcm63xx/cpu.c:179:2: note: here
  case BCM6328_CPU_ID:
  ^~~~
cc1: all warnings being treated as errors

This can be fixed by adding "Fall through" as a comment where intended,
and has to be fixed by returning a proper default otherwise.

In case of the default clock frequency for BCM6318 we fixed this by
returning the default value taken from BCM6328 and BCM6362.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobroadcom-wl: fix compilation with kernel 5.4
Adrian Schmutzler [Fri, 3 Apr 2020 15:16:35 +0000 (17:16 +0200)]
broadcom-wl: fix compilation with kernel 5.4

This adds two fixes for compilation with kernel 5.4:

1. dev_open from include/linux/netdevice.h needs a second parameter
   since kernel 5.0:
   00f54e68924e ("net: core: dev: Add extack argument to dev_open()")
2. get_ds() macro definition has been dropped since kernel 5.1:
   736706bee329 ("get rid of legacy 'get_ds()' function")
   Since get_ds() has been just a macro before, replace it in
   the driver instead of creating a version switch.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: fix missing watchdog core dependency
Adrian Schmutzler [Fri, 3 Apr 2020 14:41:02 +0000 (16:41 +0200)]
bcm63xx: fix missing watchdog core dependency

This patch follows the other patches that added the watchdog
core to various (armvirt, malta, ath79, ...) targets that
have been hit by the following build error:

Package kmod-hwmon-sch5627 is missing dependencies for the following libraries:
watchdog.ko

In theory, we could have just added the CONFIG_WATCHDOG_CORE=y
to the Kconfig variable of kmod-hwmon-sch5627's package definition.
This would have forced the watchdog core to be builtin and less
architectures would need to be updated. But we might as well follow
through here.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: update config for kernel 5.4
Adrian Schmutzler [Fri, 3 Apr 2020 13:36:03 +0000 (15:36 +0200)]
bcm63xx: update config for kernel 5.4

Update config with make kernel_oldconfig.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: refresh patches for kernel 5.4
Adrian Schmutzler [Fri, 3 Apr 2020 13:28:10 +0000 (15:28 +0200)]
bcm63xx: refresh patches for kernel 5.4

Refresh patches to make them apply to kernel 5.4.

The removed patches have been merged upstream.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm63xx: copy files to kernel 5.4
Adrian Schmutzler [Fri, 3 Apr 2020 10:26:23 +0000 (12:26 +0200)]
bcm63xx: copy files to kernel 5.4

Copy config and patches to kernel 5.4.
make kernel_oldconfig has been run on 4.19 beforehand.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobroadcom-wl: fix compilation with kernel >= 4.15
Adrian Schmutzler [Thu, 2 Apr 2020 17:52:00 +0000 (19:52 +0200)]
broadcom-wl: fix compilation with kernel >= 4.15

Since kernel 4.15, init_timer is not available anymore, and has been
replaced by timer_setup. The fixes compilation of wl_linuc.c, which
returned the following errors beforehand (line-wrapped manually):

.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c: In function 'wl_init_timer':
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2576:2: error: implicit
declaration of function 'init_timer'; did you mean 'init_timers'?
[-Werror=implicit-function-declaration]
  init_timer(&t->timer);
  ^~~~~~~~~~
  init_timers
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2577:10: error:
'struct timer_list' has no member named 'data'
  t->timer.data = (ulong) t;
          ^
.../broadcom-wl-5.10.56.27.3/driver/wl_linux.c:2578:20: error: assignment
to 'void (*)(struct timer_list *)' from incompatible pointer type
'void (*)(ulong)' {aka 'void (*)(long unsigned int)'}
[-Werror=incompatible-pointer-types]
  t->timer.function = wl_timer;

This should fix build of several devices on bcm63xx with testing
kernel (4.19).

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: add support for I-O DATA WN-AX2033GR
Yanase Yuki [Thu, 6 Feb 2020 03:00:47 +0000 (12:00 +0900)]
ramips: add support for I-O DATA WN-AX2033GR

I-O DATA WN-AX2033GR is roughly the same as I-O DATA
WN-AX1167GR2. The difference is Wi-Fi feature.

Specification
=============
- SoC: MediaTek MT7621A
- RAM: DDR3 128 MiB
- Flash Memory: NAND 128 MiB (Spansion S34ML01G200TF100)
- Wi-Fi: MediaTek MT7603E
- Wi-Fi: MediaTek MT7615
- Ethernet: 5x 10 Mbps / 100 Mbps / 1000 Mbps (1x WAN, 4x LAN)
- LED: 2x green LED
- Input: 2x tactile switch, 1x slide switch
- Serial console: 57600bps, PCB through hole J5 (Vcc, TX, RX, NC, GND)
- Power: DC 12V

This device only supports channel 1-13 and 36-140.
Thus, narrower frequency limits compared to other devices are required
for limiting wi-fi frequency correctly.
Without this, non-supported frequencies are activated.

Flash instructions
==================
1. Open the router management page (192.168.0.1).
2. Update router firmware using "initramfs-kernel.bin".
3. After updating, run sysupgrade with "sysupgrade.bin".

Recovery instructions
=====================
WN-AX2033GR contains Zyxel Z-LOADER
1. Setup TFTP server (IP address: 10.10.10.3).
2. Put official firmware into TFTP server directory (distribution site:
   https://www.iodata.jp/lib/software/w/2068.htm)
3. Connect WX-AX2033GR Ethernet port and computer that runs TFTP server.
4. Connect to serial console.
5. Interrupt booting by Esc key.
6. Flash firmware using "ATNR 1,[firmware filename]" command.

Signed-off-by: Yanase Yuki <dev@zpc.sakura.ne.jp>
[adjust for kernel 5.4, add recovery instructions/frequency comment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoRevert "build: scripts/config - update to kconfig-v5.6"
Jo-Philipp Wich [Sat, 11 Apr 2020 22:09:52 +0000 (00:09 +0200)]
Revert "build: scripts/config - update to kconfig-v5.6"

This reverts commit dcf3e63a35d05e7e5103819c0f17195bfafe9baa.

The kconfig update requires further testing and refinement until it can
remain in tree. Main problems are:

 - Recursive deps are now fatal instead of a warning
 - Previously legal syntax now leads to hard failures
 - It fails all package builds since multiple days

The updated kconfig implementation needs to cope with the current status
quo in the various package feeds before we can reconsider it for master.

It is not desirable that single broken packages can hard-fail the entire
build pipeline.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoRevert "build: add option to warn on recursive dependency"
Jo-Philipp Wich [Sat, 11 Apr 2020 22:09:46 +0000 (00:09 +0200)]
Revert "build: add option to warn on recursive dependency"

This reverts commit 3204430e38f1a2ba7fda9471720a2a1042adf5e0.

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

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoRevert "build: config: allow bool to select a module pkg"
Jo-Philipp Wich [Sat, 11 Apr 2020 22:09:41 +0000 (00:09 +0200)]
Revert "build: config: allow bool to select a module pkg"

This reverts commit 8514b6b42c17d7cf887fc826596534698e89e3f8.

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

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agogeneric: drop 616-net_optimize_xfrm_calls.patch
Jo-Philipp Wich [Tue, 31 Mar 2020 07:54:58 +0000 (09:54 +0200)]
generic: drop 616-net_optimize_xfrm_calls.patch

The conditional check introduced by this patch may trigger a NULL pointer
dereference in case the result of dev_net() is NULL.

Since the purpose of this patch is neither sufficiently explained and since
this patch apparently has never been submitted upstream despite it being in
the pending-* patch directory, I propose to drop it without replacement.

If the performance implications of dropping this patch are found to be
significiant, it should be reintroduced with proper description and
benchmark results.

Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2943
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
4 years agoiproute2: update to 5.6.0
Hans Dedecker [Fri, 10 Apr 2020 19:03:28 +0000 (21:03 +0200)]
iproute2: update to 5.6.0

Update iproute2 to latest stable 5.6.0; for the changes see https://lwn.net/Articles/816778/

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agoRevert ".gitignore: ignore more scripts/config output"
Kevin Darbyshire-Bryant [Sat, 11 Apr 2020 18:53:28 +0000 (19:53 +0100)]
Revert ".gitignore: ignore more scripts/config output"

This reverts commit c39d01596a8acbdfa5d1ccb98ba0624383a7190a.

It turns out the extra files were from an old config and are not
re/created by the new config.  Apologies for the noise.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agobuild: config: allow bool to select a module pkg
Eneas U de Queiroz [Fri, 10 Apr 2020 00:39:17 +0000 (21:39 -0300)]
build: config: allow bool to select a module pkg

kconfig-v5.6 disallowed a bool symbol to select another symbol that
'depends on m' (i.e. can be only 'm' on 'n').  It is, in fact, an unmet
dependency to have set to 'y'.  However, openwrt depends on the previous
behavior, to be able to build a package that can be a module or built-in
depending on a bool config.  This restores the previous behavior.

Ref: https://forum.openwrt.org/t/wireless-fails-on-snapshot-r12900-kernel-5-4-on-c2600-ipq806x
Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [added forum ref]
4 years agoipq40xx: add support for Cell C RTL30VW
Pawel Dembicki [Mon, 9 Mar 2020 20:16:43 +0000 (21:16 +0100)]
ipq40xx: add support for Cell C RTL30VW

Cell C RTL30VW is a LTE router with tho gigabit ethernets and integrated
QMI mPCIE modem.

This is stripped version of ASKEY RTL0030VW.

Hardware:

Specification:
-CPU: IPQ4019
-RAM: 256MB
-Flash: NAND 128MB + NOR 16MB
-WiFi: Integrated bgn/ac
-LTE: mPCIe card (Modem chipset MDM9230)
-LAN: 2 Gigabit Ports
-USB: 2x USB2.0
-Serial console: RJ-45 115200 8n1
-Unsupported VoIP

Known issues:

None so far.

Instruction install:

There are two methods: Factory web-gui and serial + tftp.

Web-gui:
1. Apply factory image via stock web-gui.

Serial + initramfs:
1. Rename OpenWrt initramfs image to "image"
2. Connect serial console (115200,8n1)
3. Set IP to different than 192.168.1.11, but 24 bit mask, eg. 192.168.1.4.

4. U-Boot commands:
sf probe && sf read 0x80000000 0x180000 0x10000
setenv serverip 192.168.1.4
set fdt_high 0x85000000
tftpboot 0x84000000 image
bootm 0x84000000

5. Install sysupgrade image via "sysupgrade -n"

Back to stock:

All is needed is swap 0x4c byte in mtd8 from 0 to 1 or 1 to 0,
do firstboot and factory reset with OFW:

1. read mtd8:
dd if=/dev/mtd8 of=/tmp/mtd8
2. go to tmp:
cd /tmp/
3. write first part of partition:
dd if=mtd8 of=mtd8.new bs=1 count=76
4. check which layout uses bootloader:
cat /proc/mtd
5a. If first are kernel_1 and rootfs_1 write 0:
echo -n -e '\x00' >> mtd8.new
5b. If first are kernel and rootfs write 1:
echo -n -e '\x01' >> mtd8.new
6. fill with rest of data:
dd if=mtd8 bs=1 skip=77 >> mtd8.new
7. CHECK IF mtd8.new HAVE CHANGED ONLY ONE BYTE! e.g with:
hexdump mtd8.new
8. write new mtd8 to flash:
mtd write mtd8.new /dev/mtd8
9. do firstboot
10.reboot
11. Do back to factory defaults in OFW GUI.

Based on work: Cezary Jackiewicz <cezary@eko.one.pl>

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agoipq40xx: add support for MobiPromo CM520-79F
DENG Qingfang [Tue, 14 Jan 2020 14:22:59 +0000 (22:22 +0800)]
ipq40xx: add support for MobiPromo CM520-79F

MobiPromo CM520-79F is an AC1300 dual band router based on IPQ4019

Specification:

SoC/Wireless: QCA IPQ4019
RAM: 512MiB
Flash: 128MiB SLC NAND
Ethernet PHY: QCA8075
Ethernet ports: 1x WAN, 2x LAN
LEDs: 7 LEDs
      2 (USB, CAN) are GPIO
      other 5 (2.4G, 5G, LAN1, LAN2, WAN) are connected to a shift register
Button: Reset

Flash instruction:
Disassemble the router, connect UART pins like this:
 GND TX    RX
  [x x . . x .]
  [. . . . . .]

(QCA8075 and IPQ4019 below)
Baud-rate: 115200

Set up TFTP server: IP 192.168.1.188/24
Power on the router and interrupt the booting with UART console
env backup (in case you want to go back to stock and need it there):
printenv
(Copy the output to somewhere save)
Set bootenv:
setenv set_ubi 'set mtdids nand0=nand0; set mtdparts mtdparts=nand0:0x7480000@0xb80000(fs); ubi part fs'
setenv bootkernel 'ubi read 0x84000000 kernel; bootm 0x84000000#config@1'
setenv cm520_boot 'run set_ubi; run bootkernel'
setenv bootcmd 'run cm520_boot'
setenv bootargs
saveenv
Boot initramfs from TFTP:
tftpboot openwrt-ipq40xx-generic-mobipromo_cm520-79f-initramfs-fit-zImage.itb
bootm
After initramfs image is booted, backup rootfs partition in case of reverting to stock image
cat /dev/mtd12 > /tmp/mtd12.bin
Then fetch it via SCP

Upload nand-factory.ubi to /tmp via SCP, then run
mtd erase rootfs
mtd write /tmp/*nand-factory.ubi rootfs
reboot

To revert to stock image, restore default bootenv in uboot UART console
setenv bootcmd 'bootipq'
printenv
use the saved dump you did back when you installed OpenWrt to verify that
there are no other differences from back in the day.
saveenv
upload the backed up mtd12.bin and run
tftpboot mtd12.bin
nand erase 0xb80000 0x7480000
nand write 0x84000000 0xb80000 0x7480000
The BOOTCONFIG may have been configured to boot from alternate partition (rootfs_1) instead
In case of this, set it back to rootfs:
cd /tmp
cat /dev/mtd7 > mtd7.bin
echo -ne '\x0b' | dd of=mtd7.bin conv=notrunc bs=1 count=1 seek=4
for i in 28 48 68 108; do
dd if=/dev/zero of=mtd7.bin conv=notrunc bs=1 count=1 seek=$i
done
mtd write mtd7.bin BOOTCONFIG
mtd write mtd7.bin BOOTCONFIG1

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[renamed volume to ubi to support autoboot,
as per David Lam's test in PR#2432]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agoapm821xx: use the real default HZ value from upstream
Christian Lamparter [Sun, 29 Mar 2020 19:07:37 +0000 (21:07 +0200)]
apm821xx: use the real default HZ value from upstream

With the "real HZ" debate out of the way, let's actually
use the apm821xx's default upstream config file at
arch/powerpc/configs/44x/bluestone_defconfig. From what
I can tell, it sets NO_HZ (well, this platform was for
NAS, so this is a bit unexpected) and remove any specific
HZ_$VALUE symbol.

Sadly, Daniel Engberg didn't run any before/after netperf
tests, because it would have been such a slam dunk across
the boards. In case of the apm821xx the tcp tx/rx
performance improved ~14% (from 600Mbps to 700Mps).
This now causes the emac to drop frames too, so let's see
if this is causes more problems or not.

This patch includes a refresh of the configuration too.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
4 years agokmod-sched: add act_police
Kevin Darbyshire-Bryant [Thu, 9 Apr 2020 08:19:13 +0000 (09:19 +0100)]
kmod-sched: add act_police

"Whoop whoop, sound of da police"

Add an ingress capable traffic policer module configurable with tc.

From the man page:

The police action allows to limit bandwidth of traffic matched by the
filter it is attached to. Basically there are two different algorithms
available to measure the packet rate: The first one uses an internal
dual token bucket and is configured using the rate, burst, mtu,
peakrate, overhead and linklayer parameters. The second one uses an
in-kernel sampling mechanism. It can be fine-tuned using the estimator
filter parameter.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years ago.gitignore: ignore more scripts/config output
Kevin Darbyshire-Bryant [Thu, 9 Apr 2020 14:22:23 +0000 (15:22 +0100)]
.gitignore: ignore more scripts/config output

dcf3e63a35 added a newer kconfig version which produces a bit more local
code output, add that output to the ignore list

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agotools/e2fsprogs: fix build under macos
Kevin Darbyshire-Bryant [Fri, 10 Apr 2020 10:37:26 +0000 (11:37 +0100)]
tools/e2fsprogs: fix build under macos

macos doesn't define a loff_t type, the native off_t type being 64bit
anyway.

Persuade e2fsprogs to accept off_t instead on macos

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoramips: mt7620: fix missplaced line in 01_leds
Pawel Dembicki [Fri, 10 Apr 2020 06:56:37 +0000 (08:56 +0200)]
ramips: mt7620: fix missplaced line in 01_leds

This patch adds missed line in 01_leds and fix error:

"/bin/board_detect: /etc/board.d/01_leds: line 93:
syntax error: unexpected ")" (expecting ";;")"

Fixes: c948a47 ("ramips: add support for D-Link DWR-960")
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agotools/mm-macros: Update to 1.0.0
Daniel Engberg [Sun, 5 Apr 2020 18:54:28 +0000 (20:54 +0200)]
tools/mm-macros: Update to 1.0.0

Update mm-macros to 1.0.0

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
4 years agotools/xz: Update to 5.2.5
Daniel Engberg [Sun, 5 Apr 2020 18:44:02 +0000 (20:44 +0200)]
tools/xz: Update to 5.2.5

Update xz to 5.2.5
Disable NLS support to be consistent with other tools such as bison, e2fsprogs
and sed.
Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
4 years agotools/mtools: Update to 4.0.24
Daniel Engberg [Sun, 5 Apr 2020 18:50:32 +0000 (20:50 +0200)]
tools/mtools: Update to 4.0.24

Update mtools to 4.0.24

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
4 years agotools/findutils: Update to 4.7.0
Daniel Engberg [Sun, 5 Apr 2020 19:48:18 +0000 (21:48 +0200)]
tools/findutils: Update to 4.7.0

Update findutils to 4.7.0
Remove patches
Enable pthreads
Disable NLS support to be consistent with other tools such as bison, e2fsprogs
and sed.
Disable selinux support to be consistent with other tools such as sed and tar
Disable rpath as we don't need hardcoded paths

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
4 years agotools/e2fsprogs: Update to 1.45.6
Daniel Engberg [Sun, 5 Apr 2020 19:53:47 +0000 (21:53 +0200)]
tools/e2fsprogs: Update to 1.45.6

Update e2fsprogs to 1.45.6

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
4 years agoe2fsprogs: Update to 1.45.6
Daniel Engberg [Sun, 5 Apr 2020 20:29:34 +0000 (22:29 +0200)]
e2fsprogs: Update to 1.45.6

Update e2fsprogs to 1.45.6

Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
4 years agoexfat-utils: add exFAT File System utilities package
Daniel Golle [Thu, 9 Apr 2020 14:11:44 +0000 (15:11 +0100)]
exfat-utils: add exFAT File System utilities package

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoprocd: bump to latest HEAD
Daniel Golle [Fri, 13 Mar 2020 14:08:49 +0000 (15:08 +0100)]
procd: bump to latest HEAD

 2188d81 jail: add support for launching extroot containers
 6f3dbd2 jail: add support for userns and cgroupsns
 28a06e5 jail: add support for (ram-)overlayfs

Add handling for extroot, overlaydir and tmpoverlaysize as well as
jail flags for userns and cgroupsns to OpenWrt's shell script to
allow their use in init scripts.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agox86: add genisoimage and xorrisofs as alternatives to mkisofs
李国 [Tue, 7 Apr 2020 09:12:29 +0000 (09:12 +0000)]
x86: add genisoimage and xorrisofs as alternatives to mkisofs

Some system not have mkisofs, but have genisoimage or
xorrisofs. They have compatable options for mkisofs,
so let them as alternatives to mkisofs.

Signed-off-by: 李国 <uxgood.org@gmail.com>
4 years agox86: fix grub-bios-setup fail during sysupgrade
李国 [Tue, 7 Apr 2020 09:11:46 +0000 (09:11 +0000)]
x86: fix grub-bios-setup fail during sysupgrade

grub-bios-setup requires two images (boot.img and core.img),
but they are missing. This make an error during sysupgrade:
Upgrading bootloader on /dev/sda...
grub-bios-setup: error: cannot open `/tmp/boot/boot/grub/boot.img': No
such file or directory.

Signed-off-by: 李国 <uxgood.org@gmail.com>
4 years agoipq40xx: re-add LEDS_LP5523 for the ASUS Lyra MAP-AC2200
Stefan Lippers-Hollmann [Tue, 7 Apr 2020 21:43:34 +0000 (23:43 +0200)]
ipq40xx: re-add LEDS_LP5523 for the ASUS Lyra MAP-AC2200

This symbol had been enabled in the initial device support submission
for kernel 4.14, but apparently got lost during the v4.19 port.

The ASUS Lyra MAP-AC2200 has a single (very bright) rgb LED, which is
controlled by the TI/National LP5523/55231 LED driver chip. It is left
enabled in a pulsating infinite rainbow loop by the bootloader,
expecting it to be reconfigured (disabled by default) after the boot
process has finished and is also required to indicate failsafe/
firstboot conditions.

Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
4 years agobuild: add option to warn on recursive dependency
Eneas U de Queiroz [Tue, 7 Apr 2020 20:07:24 +0000 (17:07 -0300)]
build: add option to warn on recursive dependency

This addes the option to treat recursive dependencies as warnings
instead of errors, by running make with WARN_RECURSIVE_DEP=1.

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

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agobuild: scripts/config - update to kconfig-v5.6
Eneas U de Queiroz [Tue, 7 Apr 2020 20:07:23 +0000 (17:07 -0300)]
build: scripts/config - update to kconfig-v5.6

Major changes include:
 - Much more readable reverse dependencies separated in groups
 - Improved recursive dependency report
 - More readable .config files: add comments to signal end of menus
 - More warnings for incorrect Config.in entries, such as a 'choice'
   default not contained in the 'choice'
 - Hability to properly display pseudographics with non-latin locales
 - Recursive dependencies are now treated as errors - this should make
   it harder for them to creep in.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agobuild: simplify building *config targets
Eneas U de Queiroz [Tue, 7 Apr 2020 20:07:22 +0000 (17:07 -0300)]
build: simplify building *config targets

Instead of passing pkg-config location through a variable when building
qconf (make xconfig), prepend its parent directory to the PATH, as it is
being done for other conf targets.

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

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agobuild: define RTC_SUPPORT as a bool
Eneas U de Queiroz [Tue, 7 Apr 2020 20:07:21 +0000 (17:07 -0300)]
build: define RTC_SUPPORT as a bool

Currently, RTC_SUPPORT is defined as a tristate, with 'depends on m',
which is supposed to only let it be set to 'm' or 'n'.  However,
scripts/target-metadata.pl will 'select' it, or setting it to 'y', which
defeats it's 'depends on m' restriction.  The users of the symbol are
not expecting it to be necessarily 'm' either, so we can safely use it
as bool.

Newer versions of Linux 'conf' will issue a warning when it detects such
unmet dependencies, and will set it to 'n' instead of 'y', as the
current version does.  In all cases, 'm' is never used.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agobusybox: quote 'source' filenames in Config.in
Eneas U de Queiroz [Tue, 7 Apr 2020 20:07:20 +0000 (17:07 -0300)]
busybox: quote 'source' filenames in Config.in

Newer versions of the kconfig program requires quoting the arguments of
the 'source' directive.  These are the last ones not using them.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agokernel: add @IPV6 dependency to ipv6 modules
Eneas U de Queiroz [Tue, 7 Apr 2020 20:07:19 +0000 (17:07 -0300)]
kernel: add @IPV6 dependency to ipv6 modules

IPv6 modules should all depend on @IPV6, to avoid circular dependencies
problems, especially if they select a module that depends on IPV6 as
well.  In theory, if a package A depends on IPV6, any package doing
'select A' (DEPENDS+= A) should also depend on IPV6; otherwise selecting
A will fail.  Sometimes the build system is forgiving this, but
eventually, and unexpectedly, it may blow up on some other commit.

Alternatively one can conditionally add IPv6 dependencies only if
CONFIG_IPV6 is selected: (DEPENDS+= +IPV6:package6).

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
4 years agobuild: move symvers files to kernel build dir
Felix Fietkau [Thu, 9 Apr 2020 07:41:16 +0000 (09:41 +0200)]
build: move symvers files to kernel build dir

The symvers files of older kernel versions are incompatible with the ones
from 5.4, so changing the kernel version without running make clean was
causing build failures in kernel module packages.
Fix this by moving the directory, ensuring that symvers files get thrown
away with a kernel version change

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agobuild: fix kernel_menuconfig on macOS with newer kernel versions
Felix Fietkau [Tue, 7 Apr 2020 12:26:42 +0000 (14:26 +0200)]
build: fix kernel_menuconfig on macOS with newer kernel versions

Account for upstream build system changes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
4 years agoath79: add support for Comfast CF-WR752AC v1
Roman Hampel [Fri, 20 Mar 2020 16:32:30 +0000 (17:32 +0100)]
ath79: add support for Comfast CF-WR752AC v1

Specifications:

- Qualcomm QCA9531 + QCA9886
- dual band, antenna 2*3dBi
- Output power 50mW (17dBm)
- 1x 10/100 Mbps LAN RJ45
- 128 MB RAM / 16 MB FLASH (w25q128)
- 3 LEDs (red/green/blue)
  incorporated in
  "color wheel reset switch"
- UART 115200 8N1

Flashing instructions:

 The U-boot bootloader contains a recovery HTTP server
 to upload the  firmware. Push the reset button while powering the
 device on and keep it pressed for ~10 seconds. The device's LEDs will
 blink several times and the recovery page will be at
 http://192.168.1.1; use it to upload the sysupgrade image.

 Alternatively, the original firmware is based on OpenWrt so a
 sysupgrade image can be installed via the stock web GUI. Settings from
 the original firmware will be saved and restored on the new one, so a
 factory reset will be needed. To do so, once the new firmware is flashed,
 enter into failsafe mode by pressing the reset button several times during
 the boot process, until it starts flashing. Once in failsafe mode, perform
 a factory reset as usual.

LED-Info:

 The LEDs on the Comfast stock fw have a very proprietary behaviour,
 corresponding to the user selected working mode (AP, ROUTER or REPEATER).
 In the first two cases, only blue is used for status and LAN signaling. When
 using the latter, blue is always off (except for sysupgrade), either red
 signals bad rssi on master-link, or green good. Since the default working
 mode of OpenWrt resembles that of a router/AP, the default behavior is
 implemented accordingly.

MAC addresses (art partition):

location  address (example)    use in vendor firmware
0x0       xx:xx:xx:xx:xc:f8 -> eth0
0x6       xx:xx:xx:xx:xc:fa -> wlan5g (+2)
0x1002    xx:xx:xx:xx:xc:f9 -> not used
0x5006    xx:xx:xx:xx:xc:fb -> not used
---       xx:xx:xx:xx:xd:02 -> wlan2g (+10)

The same strange situation has already been observed and documented
for COMFAST CF-E560AC.

Signed-off-by: Roman Hampel <rhamp@arcor.de>
Co-developed-by: Joao Albuquerque <joaohccalbu@gmail.com>
Signed-off-by: Joao Albuquerque <joaohccalbu@gmail.com>
[adjust and extend commit message, rebase, minor DTS adjustments,
add correct MAC address for wmac, change RSSI LED names and behavior]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: bump 5.4 to 5.4.31
Petr Štetiar [Tue, 7 Apr 2020 08:08:16 +0000 (10:08 +0200)]
kernel: bump 5.4 to 5.4.31

Refreshed patches, removed upstreamed patches:

 oxnas:   003-ARM-dts-oxnas-Fix-clear-mask-property.patch
 generic: 184-USB-serial-option-add-Wistron-Neweb-D19Q1.patch

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

Tested-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> [apu2]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years agokernel: generic: 5.4: fix mips command line parameter patch
Bjørn Mork [Sat, 4 Apr 2020 11:04:51 +0000 (13:04 +0200)]
kernel: generic: 5.4: fix mips command line parameter patch

Fixing a build error when CONFIG_KERNEL_KEXEC is enabled:

make[5]: Entering directory '/home/bjorn/tmp/tmp-lede/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/linux-5.4.28'
  CALL    scripts/checksyscalls.sh
  CALL    scripts/atomic/check-atomics.sh
  CHK     include/generated/compile.h
  CC      arch/mips/kernel/machine_kexec.o
arch/mips/kernel/machine_kexec.c: In function 'kexec_nonboot_cpu_jump':
arch/mips/kernel/machine_kexec.c:268:27: error: 'relocate_new_kernel_size' undeclared (first use in this function); did you mean 'kexec_relocate_new_kernel_end'?
      reboot_code_buffer + relocate_new_kernel_size);
                           ^~~~~~~~~~~~~~~~~~~~~~~~
                           kexec_relocate_new_kernel_end
arch/mips/kernel/machine_kexec.c:268:27: note: each undeclared identifier is reported only once for each function it appears in
arch/mips/kernel/machine_kexec.c: In function 'kexec_reboot':
arch/mips/kernel/machine_kexec.c:306:27: error: 'relocate_new_kernel_size' undeclared (first use in this function); did you mean 'kexec_relocate_new_kernel_end'?
      reboot_code_buffer + relocate_new_kernel_size);
                           ^~~~~~~~~~~~~~~~~~~~~~~~
                           kexec_relocate_new_kernel_end
make[7]: *** [scripts/Makefile.build:266: arch/mips/kernel/machine_kexec.o] Error 1

Signed-off-by: Bjørn Mork <bjorn@mork.no>
4 years agogemini: Refine package list
Linus Walleij [Mon, 30 Mar 2020 21:28:11 +0000 (23:28 +0200)]
gemini: Refine package list

The NAS packages for Gemini doesn't even include the
block-mount package. Augment the list to be based off
the DEFAULT_PACKAGES.nas to make sure we extend on the
essentials.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
4 years agolinux-atm: Include linux/sockios.h for SIOCGSTAMP
Norbert van Bolhuis [Fri, 3 Apr 2020 16:12:46 +0000 (18:12 +0200)]
linux-atm: Include linux/sockios.h for SIOCGSTAMP

Since linux kernel commit 0768e17073dc527ccd18ed5f96ce85f9985e9115
(2019-04-19) the asm-generic/sockios.h header no longer defines
SIOCGSTAMP. Instead it provides only SIOCGSTAMP_OLD.

The linux/sockios.h header now defines SIOCGSTAMP using either
SIOCGSTAMP_OLD or SIOCGSTAMP_NEW as appropriate. This linux only
header file is not included so we get a build failure.

Signed-off-by: Norbert van Bolhuis <nvbolhuis@aimvalley.nl>
4 years agoipq806x: switch to 5.4 kernel
Ansuel Smith [Sat, 4 Apr 2020 18:41:02 +0000 (20:41 +0200)]
ipq806x: switch to 5.4 kernel

ipq806x has been tested for a lot and lots of people reported good results.
Switch the main kernel to 5.4 following the other targets.

Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq8065, NBG6817]
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
4 years agobase-files: add enabled commands to service rc.common
Florian Eckert [Tue, 7 Apr 2020 12:03:50 +0000 (14:03 +0200)]
base-files: add enabled commands to service rc.common

Add missing enbaled command help output.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
4 years agoramips: use full 8MB flash on ZyXEL Keenetic
Alexey Dobrovolsky [Wed, 8 Apr 2020 18:43:36 +0000 (21:43 +0300)]
ramips: use full 8MB flash on ZyXEL Keenetic

ZyXEL Keenetic has 8MB flash, but OpenWrt uses only 4MB.
This commit fixes the problem.

WikiDevi page [1] says that ZyXEL Keenetic has FLA1: 8 MiB, there is
an article with specs [2] (in Russian).

[1] https://wikidevi.wi-cat.ru/ZyXEL_Keenetic
[2] https://3dnews.ru/608774/page-2.html

Fixes: FS#2487
Fixes: a7cbf59e0e04 ("ramips: add new device ZyXEL Keenetic as kn")
Signed-off-by: Alexey Dobrovolsky <dobrovolskiy.alexey@gmail.com>