openwrt/staging/robimarko.git
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>
4 years agoath79: fix MAC addresses for ethernet on ZyXEL NBG6716
Adrian Schmutzler [Tue, 7 Apr 2020 10:31:48 +0000 (12:31 +0200)]
ath79: fix MAC addresses for ethernet on ZyXEL NBG6716

MAC addresses of the ethernet devices (eth0 & eth1) are randomly set at
boot time by the ag71xx driver, because it is currently not possible to
retrieve MAC addresses in ASCII format within the DTS file.
This commit works around this behaviour by setting the MAC addresses
during the preinit phase.

The same has been implemented recently for the Siemens WS-AP3610 in
d2b8ccb1c04d ("ath79: add support for Siemens WS-AP3610").

MAC assignment in vendor firmware is as follows:

use   vendor   address     OpenWrt
2g    wifi0    ethaddr     -> wlan1
5g    wifi1    ethaddr +1  -> wlan0
lan   eth1     ethaddr +2  -> eth0
wan   eth0     ethaddr +3  -> eth1

ethaddr is retrieved by $(mtd_get_mac_ascii u-boot-env ethaddr)

Note that both Wifi and ethernet indexing is swapped in OpenWrt
compared to vendor firmware.

Suggested-by: Guillaume Lefebvre <guillaume@zelig.ch>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Tested-by: Kevin Gagnon <kevin_gagnon@videotron.ca>
4 years agoramips: add support for D-Link DWR-960
Pawel Dembicki [Thu, 19 Apr 2018 07:20:58 +0000 (09:20 +0200)]
ramips: add support for D-Link DWR-960

The DWR-960 Wireless Router is based on the MT7620A SoC.

Specification:

- MediaTek MT7620A (580 Mhz)
- 128 MB of RAM
- 16 MB of FLASH
- 1x 802.11bgn radio
- 1x 802.11ac radio (MT7610 mpcie card)
- 4x 10/100 Mbps Ethernet (1 WAN and 3 LAN)
- 1x 10/100/1000 Mbps Ethernet (1 LAN) (AR8035)
- 2x internal, non-detachable antennas (Wifi 2.4G)
- 3x external, detachable antennas (2x LTE, 1x Wifi 5G)
- 1x LTE modem
- UART (J4) header on PCB (57600 8n1)
- 9x LED, 2x button
- JBOOT bootloader

Known issues:
- Flash is extremely slow.

Installation:
Apply factory image via http web-gui or JBOOT recovery page

How to revert to OEM firmware:
- push the reset button and turn on the power. Wait until LED start
  blinking (~10sec.)
- upload original factory image via JBOOT http (IP: 192.168.123.254)

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agopackages: mt76: add 14c3:7610 pci id to list
Pawel Dembicki [Wed, 25 Mar 2020 06:08:37 +0000 (07:08 +0100)]
packages: mt76: add 14c3:7610 pci id to list

This commit add patch with 14c3:7610 pci id addition.

It was sent upstream.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[bumped PKG_RELEASE]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
4 years agoramips: mt7620: add rgmii delays support
Pawel Dembicki [Tue, 24 Mar 2020 05:23:49 +0000 (06:23 +0100)]
ramips: mt7620: add rgmii delays support

At this moment mt7620 ethernet driver doesn't support rgmii delays
configuration. SoC MT7620 have bits 2 and 3 in GPC1 an GPC2 to configure
delays for rx and tx rgmii interface.

This patch adds rx/tx rgmii delay configuration from dts.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agogeneric: backport Wistron Neweb D19Q1 patches
Pawel Dembicki [Thu, 19 Apr 2018 07:08:38 +0000 (09:08 +0200)]
generic: backport Wistron Neweb D19Q1 patches

Backport patches which adds suport for the Wistron Neweb D19Q1 3G/4G modem,
used in D-Link DWR-960.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4 years agoramips: mt7621: harmonize naming scheme for Mikrotik
Adrian Schmutzler [Tue, 7 Apr 2020 08:34:33 +0000 (10:34 +0200)]
ramips: mt7621: harmonize naming scheme for Mikrotik

So far, image/device/board names for Mikrotik devices in mt7621 have
been used quite inconsistently.

This patch harmonizes the naming scheme by applying the same style
as used lately in ath79, i.e. using "RouterBOARD" as separate word
in the model name (instead of RB prefix for the number) and deriving
the board/device name from that (= make lower case and replace spaces
by hyphens).

This style has already been used for most the model/DEVICE_MODEL
variables in mt7621, so this is essentially just adjusting the remaining
variables to that.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoramips: mt7621: reenable rbm11g
Tobias Schramm [Wed, 8 Apr 2020 10:47:15 +0000 (12:47 +0200)]
ramips: mt7621: reenable rbm11g

I have a rbm11g and can confirm that the LAN port is indeed
switch port 0.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
4 years agoramips: mt7621: add label mac address to rbm11g
Tobias Schramm [Wed, 8 Apr 2020 10:47:14 +0000 (12:47 +0200)]
ramips: mt7621: add label mac address to rbm11g

The rbm11g has a label with printed on mac address similar to the
rbm33g.

Signed-off-by: Tobias Schramm <t.schramm@manjaro.org>
4 years agoiproute2: add kmod-netlink-diag for ss
Rosen Penev [Tue, 7 Apr 2020 02:15:59 +0000 (19:15 -0700)]
iproute2: add kmod-netlink-diag for ss

Allows proper usage of the ss tool. Otherwise, several errors and bad
data gets thrown:

Cannot open netlink socket: Protocol not supported
Cannot open netlink socket: Protocol not supported
Cannot open netlink socket: Protocol not supported
Cannot open netlink socket: Protocol not supported
Cannot open netlink socket: Protocol not supported
Cannot open netlink socket: Protocol not supported
Cannot open netlink socket: Protocol not supported

Originally reported here: https://github.com/openwrt/packages/issues/8232

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agokmod: add netlink-diag package
Rosen Penev [Tue, 7 Apr 2020 02:15:58 +0000 (19:15 -0700)]
kmod: add netlink-diag package

This is used by the ss utility from iproute2.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agoramips: add support for Buffalo WSR-2533DHPL
INAGAKI Hiroshi [Sat, 23 Mar 2019 13:45:42 +0000 (22:45 +0900)]
ramips: add support for Buffalo WSR-2533DHPL

Buffalo WSR-2533DHPL is a 2.4/5 GHz band 11ac router, based on MediaTek
MT7621A.

Specification:

- SoC : MediaTek MT7621A
- RAM : DDR3 128 MiB
- Flash : SPI-NOR 16 MiB
- WLAN : 2.4/5 GHz 4T4R (2x MediaTek MT7615N)
- Ethernet : 10/100/1000 Mbps
  - Switch : MediaTek MT7530 (SoC)
- LED/keys : 8x/6x (3x buttons, 2x slide-switches)
- UART : through-hole on PCB
  - J4: 3.3V, GND, TX, RX from triangle-mark
  - 57600n8
- Power : 12VDC 1.5A

Flash instruction using initramfs image:

1. prepare the TFTP server with the initramfs image renamed to
   "linux.trx-recovery" and IP address "192.168.11.2"
2. press the "AOSS" button while powering on the WSR-2533DHPL
3. after 10 seconds, release the "AOSS" button, WSR-2533DHPL downloads
   the initramfs image and boot with it automatically
4. on the initramfs image, download the sysupgrade image to the device
   and perform sysupgrade with it
5. wait ~120 seconds to complete flashing

Switch position overview:

- slide-switch1 (2x positions)
  - "AUTO"
  - "MANUAL" (not connected to gpio)

- slide-switch2 (3x positions)
  - "ROUTER"
  - "AP" (not connected to gpio)
  - "WB"

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[add note on switches, fix group->groups for state_default]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agobcm53xx: add support for Luxul FullMAC WiFi devices
Dan Haab [Mon, 6 Apr 2020 23:14:39 +0000 (16:14 -0700)]
bcm53xx: add support for Luxul FullMAC WiFi devices

This prepares support for models XAP-1610 and XWR-3150. Flashing
requires using Luxul firmware version:
1) 8.1.0 or newer for XAP-1610
2) 6.4.0 or newer for XWR-3150
and uploading firmware using "Firmware Update" web UI page.

Signed-off-by: Dan Haab <dan.haab@legrand.com>
4 years agoath79: add support for Comfast CF-EW72
Chris Morgan [Wed, 11 Mar 2020 21:00:42 +0000 (16:00 -0500)]
ath79: add support for Comfast CF-EW72

Specifications:
Qualcomm/Atheros QCA9531 + QCA9886
2x 10/100 Mbps Ethernet, with 48v PoE
2T2R 2.4 GHz, 802.11b/g/n
2T2R 5 GHz, 802.11a/n/ac
128MB RAM
16MB SPI Flash
4x LED (Always On Power, LAN, WAN, WLAN)

Flashing Instructions:
Original firmware is based on OpenWRT, so flashing the sysupgrade image on
the factory firmware is sufficient.

Tested: Reset button, WAN LED, LAN LED, Power LED (always on, not much
to test), WLAN LED (one LED only for 2 interfaces, by default it gets
assigned to the first interface), MAC addresses (match factory firmware).
My LAN factory MAC address ends in F2.

use stock_mac art_loc
lan :f2 0x0
wan :f3 0x1002
5g :f4 0x6
2g :f5 0x5006

Since MAC address flash locations do not really match their use in vendor
firmware (e.g. address from 5 GHz calibration data is assigned to 2.4 GHz
WiFi), just calculate the MAC addresses with an offset based on 0x0 address.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
[add MAC address comment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agoppp: update to version 2.4.8.git-2020-03-21
Hans Dedecker [Sun, 5 Apr 2020 20:26:33 +0000 (22:26 +0200)]
ppp: update to version 2.4.8.git-2020-03-21

Use upstream latest git HEAD as it allows to remove the patches
700-radius-Prevent-buffer-overflow-in-rc_mksid,
701-pppd-Fix-bounds-check-in-EAP-code and
702-pppd-Ignore-received-EAP-messages-when-not-doing-EAP and
take in other fixes.

41a7323 pppd: Fixed spelling 'unkown' => 'unknown' (#141)
6b014be pppd: Print version information to stdout instead of stderr (#133)
cba2736 pppd: Add RFC1990 (Multilink) to the See Also section of the man page
f2f9554 pppd: Add mppe.h to the list of headers to install if MPPE is defined
ae54fcf pppd: Obfuscate password argument string
8d45443 pppd: Ignore received EAP messages when not doing EAP
8d7970b pppd: Fix bounds check in EAP code
858976b radius: Prevent buffer overflow in rc_mksid()

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
4 years agotools/cmake: update to 3.17.0
Rosen Penev [Sun, 5 Apr 2020 22:38:32 +0000 (15:38 -0700)]
tools/cmake: update to 3.17.0

Remove libressl patches; they are no longer needed as LibreSSl adde
support

Replace qt tests patch with one that disables all of them.

Refresh remaining one.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years agoramips: harmonize Netgear R6120 DT LED node names
Alex Lewontin [Fri, 21 Feb 2020 20:57:44 +0000 (15:57 -0500)]
ramips: harmonize Netgear R6120 DT LED node names

This changes the node names for the LEDs in the Netgear R6120
device-tree file to provide consistency with other devices.

Signed-off-by: Alex Lewontin <alex.c.lewontin@gmail.com>
[improve commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agokernel: netdev: add missing config for mlx5 driver
Tan Zien [Sun, 5 Apr 2020 03:15:44 +0000 (11:15 +0800)]
kernel: netdev: add missing config for mlx5 driver

The mlk5 kmod lacks all necessary build symbols
for kernel 4.14 (again).

Add missing symbols to avoid build failure on these targets.

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
[rewrite commit message - reorder symbols]
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoath79: add support for TP-Link TL-MR3420 v3
Lim Guo Wei [Sat, 4 Apr 2020 19:52:26 +0000 (03:52 +0800)]
ath79: add support for TP-Link TL-MR3420 v3

This adds support for the TP-Link TL-MR3420 v3, a later revision of the
v2 with an external gpiochip similar to TP-Link Archer C7 v4.

Specifications:

SOC: Qualcomm Atheros QCA9531
CPU: 650MHz
Flash: 4 MiB
RAM: 32 MiB
WLAN: Qualcomm Atheros QCA9531 bgn 2T2R 2.4 GHz
Ethernet: 5 ports (100M)

Flashing instructions:

- Flash factory image from OEM WebUI:
  openwrt-ath79-tiny-tplink_tl-mr3420-v3-squashfs-factory.bin
- Sysupgrade from ath79 image:
  openwrt-ath79-tiny-tplink_tl-mr3420-v3-squashfs-sysupgrade.bin

Signed-off-by: Lim Guo Wei <limguowei@gmail.com>
[remove SUPPORTED devices, some typo adjustments, fix WAN MAC
address, fix sorting in 01_leds]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years agodnsmasq: bump to 2.81rc5
Kevin Darbyshire-Bryant [Sun, 5 Apr 2020 16:22:20 +0000 (17:22 +0100)]
dnsmasq: bump to 2.81rc5

Bump to 2.81rc5 and re-work ipset-remove-old-kernel-support.

More runtime kernel version checking is done in 2.81rc5 in various parts
of the code, so expand the ipset patch' scope to inlude those new areas
and rename to something a bit more generic.:wq

Upstream changes from rc4

532246f Tweak to DNSSEC logging.
8caf3d7 Fix rare problem allocating frec for DNSSEC.
d162bee Allow overriding of ubus service name.
b43585c Fix nameserver list in auth mode.
3f60ecd Fixed resource leak on ubus_init failure.
0506a5e Handle old kernels that don't do NETLINK_NO_ENOBUFS.
e7ee1aa Extend stop-dns-rebind to reject IPv6 LL and ULA addresses. We also reject the loopback address if rebind-localhost-ok is NOT set.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoipq806x: remove support for kernel 4.14
Adrian Schmutzler [Wed, 1 Apr 2020 19:54:58 +0000 (21:54 +0200)]
ipq806x: remove support for kernel 4.14

This target has been on kernel 4.19 for several months [1] and
already uses kernel 5.4 as testing kernel. Therefore, it should
not be necessary to keep support for kernel 4.14 as well.

[1] 2a82e0e1ca0f ("ipq806x: switch to 4.19 kernel version")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Acked-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ipq8065/nbg6817]
4 years agoramips: add DTS triggers to USB LEDs for F9K1109v1
Kip Porterfield [Fri, 3 Apr 2020 21:59:23 +0000 (21:59 +0000)]
ramips: add DTS triggers to USB LEDs for F9K1109v1

Alter DTS for Belkin F9K1109v1 to trigger USB leds from the echi/ochi
ports.

Signed-off-by: Kip Porterfield <kip.porterfield@gmail.com>
4 years agomediatek: set v5.4 as default
John Crispin [Sun, 5 Apr 2020 14:10:38 +0000 (16:10 +0200)]
mediatek: set v5.4 as default

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomediatek: add hw flow table offloading
John Crispin [Fri, 3 Apr 2020 15:51:59 +0000 (17:51 +0200)]
mediatek: add hw flow table offloading

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomediatek: add support for rtl8367c
John Crispin [Fri, 3 Apr 2020 15:42:44 +0000 (17:42 +0200)]
mediatek: add support for rtl8367c

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomediatek: drop v4.14 support
John Crispin [Fri, 3 Apr 2020 09:54:12 +0000 (11:54 +0200)]
mediatek: drop v4.14 support

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomediatek: more v5.4 fixes
John Crispin [Fri, 3 Apr 2020 09:52:35 +0000 (11:52 +0200)]
mediatek: more v5.4 fixes

These are all backports and/or on their way upstream.

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomediatek: consolidate partition names and settings
John Crispin [Fri, 3 Apr 2020 09:49:42 +0000 (11:49 +0200)]
mediatek: consolidate partition names and settings

Signed-off-by: John Crispin <john@phrozen.org>
4 years agomediatek: fix elecom board name
John Crispin [Fri, 3 Apr 2020 09:18:26 +0000 (11:18 +0200)]
mediatek: fix elecom board name

menuconfig was showing the the company name twice.

Signed-off-by: John Crispin <john@phrozen.org>
4 years agogeneric: fix flow table hw offload
John Crispin [Mon, 6 Apr 2020 05:04:38 +0000 (07:04 +0200)]
generic: fix flow table hw offload

Make the driver work with recent upstream changes.

Signed-off-by: John Crispin <john@phrozen.org>
4 years agonetifd: fix 14_migrate-dhcp-release script
Peter Stadler [Fri, 27 Mar 2020 12:36:08 +0000 (13:36 +0100)]
netifd: fix 14_migrate-dhcp-release script

prepend 'uci' to 'commit network'

Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
4 years agoramips: fix path for dma-ralink and mtk-hsdma
Chuanhong Guo [Sun, 5 Apr 2020 07:52:49 +0000 (15:52 +0800)]
ramips: fix path for dma-ralink and mtk-hsdma

These two drivers were available in drivers/staging in 5.4.
Fix driver paths for them.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agodropbear: backport add ip address to exit without auth messages
Kevin Darbyshire-Bryant [Mon, 30 Sep 2019 09:41:28 +0000 (10:41 +0100)]
dropbear: backport add ip address to exit without auth messages

201e359 Handle early exit when addrstring isn't set
fa4c464 Improve address logging on early exit messages (#83)

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agohostapd: Move hostapd variants to WirelessAPD menu
Kevin Darbyshire-Bryant [Sat, 4 Apr 2020 11:42:13 +0000 (12:42 +0100)]
hostapd: Move hostapd variants to WirelessAPD menu

It seemed very confusing when trying to select the different variants of
hostapd which are somewhat scattered about under the menu 'Network'.
Moving all hostapd variants under a common submenu helps avoid
confusion.

Inspired-by: Kevin Mahoney <kevin.mahoney@zenotec.net>
[Fixup badly formatted patch, change menu name]
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoumdns: update to the version 2020-04-05
Kevin Darbyshire-Bryant [Sun, 5 Apr 2020 08:14:43 +0000 (09:14 +0100)]
umdns: update to the version 2020-04-05

ab7a39a umdns: fix unused error
45c4953 dns: explicitly endian-convert all fields in header and question

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoRevert "generic: 5.4: Add 4B_OPCODES flag to w25q256"
Chuanhong Guo [Sat, 4 Apr 2020 13:23:50 +0000 (21:23 +0800)]
Revert "generic: 5.4: Add 4B_OPCODES flag to w25q256"

This reverts commit d7f21940bcaf70ba404d354c7fa6519c1717d00a.

Winbond W25Q256FV and W25Q256JV both uses 0xef4019 as JEDEC ID,
but only the latter has proper 4B_OPCODES support.
W25Q256FV has all 4B read instructions but it lacks a 4B page program
instruction, causing the entire flash to be read-only.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agokernel: Fix miss config and module for mlx driver
Tan Zien [Sat, 4 Apr 2020 04:02:40 +0000 (12:02 +0800)]
kernel: Fix miss config and module for mlx driver

Missing config symbols could lead to build failures on kernel
4.14/4.19.

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
[rephrase commit message - reorder symbols]
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years agoumdns: suppress address-of-packed-member warning
Kevin Darbyshire-Bryant [Sat, 4 Apr 2020 08:20:08 +0000 (09:20 +0100)]
umdns: suppress address-of-packed-member warning

gcc 8 & 9 appear to be more picky with regards access alignment to
packed structures, leading to this warning in dns.c:

dns.c:261:2: error: converting a packed ‘struct dns_question’ pointer
(alignment 1) to a ‘uint16_t’ {aka ‘short unsigned int’} pointer
(alignment 2) may result in an unaligned pointer value
[-Werror=address-of-packed-member]

261 |  uint16_t *swap = (uint16_t *) q;

Work around what I think is a false positive by turning the warning off.
Not ideal, but not quite as not ideal as build failure.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agotreewide: convert sed -r to posix -E
Kevin Darbyshire-Bryant [Thu, 2 Apr 2020 18:30:17 +0000 (19:30 +0100)]
treewide: convert sed -r to posix -E

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
4 years agoath79: improve mikrotik-caldata.sh
Thibaut VARÈNE [Wed, 18 Mar 2020 09:35:26 +0000 (10:35 +0100)]
ath79: improve mikrotik-caldata.sh

Reduce unnecessary flash wear and be tidy:
- Run the extraction only if necessary
- Extract temporary file to /tmp
- cleanup after execution

Tested-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
4 years agokernel: rtl8367b: use id as a bit offset for BYPASS_LINE_RATE
INAGAKI Hiroshi [Mon, 30 Mar 2020 06:19:50 +0000 (15:19 +0900)]
kernel: rtl8367b: use id as a bit offset for BYPASS_LINE_RATE

In RTL8367B (RTL8367RB/RTL8367R-VB), the driver in GPL tars of the
devices with this switch directly uses the ID of external interface
as a bit offset.

We should use the same way.

ref (RTL8367B):
  - ASUS RT-N56U
  - TP-Link Archer C2 v1

ref (RTL8367):
  - TP-Link TL-WR2543ND v1

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agokernel: rtl8367b: fix DEBUG register address for extif2
INAGAKI Hiroshi [Sat, 28 Mar 2020 10:31:23 +0000 (19:31 +0900)]
kernel: rtl8367b: fix DEBUG register address for extif2

RTL8367B_CHIP_DEBUG1_REG (0x1304) is for external interface 1. For
external interface 2, use RTL8367B_CHIP_DEBUG2_REG (0x13e2) instead.

Fixes: 9801d61c4a ("kernel: rtl8367b: add configuration for extif2")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
4 years agoramips: mt7621: bringup dsa master on preinit
Chuanhong Guo [Sat, 4 Apr 2020 08:30:16 +0000 (16:30 +0800)]
ramips: mt7621: bringup dsa master on preinit

DSA requires master netdev to be up before any of its slave ports.
Bring it up during preinit so that the first lan port can be used
on failsafe.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: mt7621: disable image for mikrotik_rbm11g
Chuanhong Guo [Sat, 4 Apr 2020 07:20:46 +0000 (15:20 +0800)]
ramips: mt7621: disable image for mikrotik_rbm11g

It's unknown which switch port is used on mikrotik_rbm11g.
Disable this image until someone with actual device fixes this problem.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: remove set_preinit_iface script
Chuanhong Guo [Sat, 4 Apr 2020 04:44:28 +0000 (12:44 +0800)]
ramips: remove set_preinit_iface script

This script isn't suitable for mt7621 anymore due to switching to DSA
and it needs a different preinit script.
Generic preinit logic in package/base-files has the ability to parse
board.json and pick preinit iface accordingly. Just remove this script
instead of moving it into subtargets.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agogeneric: mt7530: fix null pointer dereferencing in port5 setup
DENG Qingfang [Sat, 4 Apr 2020 04:10:32 +0000 (12:10 +0800)]
generic: mt7530: fix null pointer dereferencing in port5 setup

The 2nd gmac of mediatek soc ethernet may not be connected to a PHY
and a phy-handle isn't always available.
Unfortunately, mt7530 dsa driver assumes that the 2nd gmac is always
connected to switch port 5 and setup mt7530 according to phy address
of 2nd gmac node, causing null pointer dereferencing when phy-handle
isn't defined in dts.
This commit fix this setup code by checking return value of
of_parse_phandle before using it.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agogeneric: backport support for MT7530 DSA port mirroring
DENG Qingfang [Fri, 3 Apr 2020 14:57:15 +0000 (22:57 +0800)]
generic: backport support for MT7530 DSA port mirroring

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: correct MTC WR1201 LAN ports names
René van Dorst [Wed, 1 Apr 2020 08:01:20 +0000 (10:01 +0200)]
ramips: correct MTC WR1201 LAN ports names

LAN ports of MTC WR1201 are reversed, so correct their names

Signed-off-by: René van Dorst <opensource@vdorst.com>
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: add new NAND driver
DENG Qingfang [Wed, 1 Apr 2020 03:19:12 +0000 (11:19 +0800)]
ramips: mt7621: add new NAND driver

Add new NAND driver for MT7621

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: drop obsolete mx25l25635f dts hack
DENG Qingfang [Thu, 26 Mar 2020 15:14:05 +0000 (23:14 +0800)]
ramips: mt7621: drop obsolete mx25l25635f dts hack

5.4 kernel has fixed this issue, so the hack is no longer needed.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoRevert "ramips: mt7621: disable images for gehua_ghl-r-001"
DENG Qingfang [Wed, 1 Apr 2020 08:42:08 +0000 (16:42 +0800)]
Revert "ramips: mt7621: disable images for gehua_ghl-r-001"

This reverts commit 28080d54d217fb4ab112e079f69462fee695dbf8.
Support for MX25L25635F flash is fixed upstream

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: move swconfig to subtargets except for MT7621
DENG Qingfang [Thu, 26 Mar 2020 14:00:48 +0000 (22:00 +0800)]
ramips: move swconfig to subtargets except for MT7621

As MT7621 does not use swconfig anymore, move the package swconfig to
other subtargets.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: introduce 'soc_device' initialization
DENG Qingfang [Tue, 24 Mar 2020 12:09:10 +0000 (20:09 +0800)]
ramips: mt7621: introduce 'soc_device' initialization

mt7621 SoC has its own 'ralink_soc_info' structure with some
information about the soc itself. Pcie controller and pcie phy
drivers for this soc which are still in staging git tree make uses
of 'soc_device_attribute' looking for revision 'E2' in order to
know if reset lines are or not inverted. This way of doing things
seems to be necessary in order to make things clean and properly.
Hence, introduce this 'soc_device' to be able to properly use those
attributes in drivers. Also set 'data' pointer points to the struct
'ralink_soc_info' to be able to export also current soc information
using this mechanism.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: fix MikroTik 750Gr3 LAN ports names
DENG Qingfang [Thu, 19 Mar 2020 16:26:08 +0000 (00:26 +0800)]
ramips: fix MikroTik 750Gr3 LAN ports names

They are labeled as LAN2..LAN5 instead of LAN1..LAN4

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: use SoC I2C instead of bitbanged for Ubiquiti ER-X-SFP
DENG Qingfang [Thu, 19 Mar 2020 11:43:39 +0000 (19:43 +0800)]
ramips: use SoC I2C instead of bitbanged for Ubiquiti ER-X-SFP

The original idea of bitbanged I2C is to use i2c-gpio-custom
Since i2c-gpio-custom is no longer available on 5.4, use SoC I2C instead

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: fix Ubiquiti ER-X ports names and MAC addresses
DENG Qingfang [Thu, 19 Mar 2020 11:33:27 +0000 (19:33 +0800)]
ramips: mt7621: fix Ubiquiti ER-X ports names and MAC addresses

The name of each user port should be eth0..4, instead of lan1..4
and there is no WAN port. Rename them to match the official firmware.
To avoid conflict with the master port (gmac0), rename it to "dsa".

The official firmware assigns MAC address in this way:
eth0 = label mac
eth1 = label mac + 1
...
eth4 = label mac + 4

Since we have switched to DSA, it's possible to use different MAC for each port.

Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: net-label support
DENG Qingfang [Tue, 10 Mar 2020 17:33:40 +0000 (01:33 +0800)]
ramips: mt7621: net-label support

Add support for renaming ethernet interfaces in DTS

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: switch kernel version to 5.4
DENG Qingfang [Sun, 1 Mar 2020 09:17:49 +0000 (17:17 +0800)]
ramips: mt7621: switch kernel version to 5.4

After all dts and config changes, 4.14 no longer works on mt7621.
Switch it to 5.4 directly.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: change default ramips_setup_interfaces configuration
DENG Qingfang [Wed, 18 Mar 2020 17:10:50 +0000 (01:10 +0800)]
ramips: mt7621: change default ramips_setup_interfaces configuration

Most of MT7621 boards have LAN1~4 and WAN, so make this as the default

Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621 remove unused pinctrl groups in dts
DENG Qingfang [Sat, 4 Apr 2020 06:52:12 +0000 (14:52 +0800)]
ramips: mt7621 remove unused pinctrl groups in dts

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
[split commit, remove leftover uart3->gpio setup]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: mt7621: update dts/defconfig for DSA
DENG Qingfang [Wed, 18 Mar 2020 15:38:58 +0000 (23:38 +0800)]
ramips: mt7621: update dts/defconfig for DSA

update dts and network/LED configuration for DSA driver.
sysupgrade from images prior to this commit with config preserved
will cause broken ethernet setup.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Acked-by: Jo-Philipp Wich <jo@mein.io>
[split commit]
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
4 years agoramips: mt7621: backport GPIO driver fix
DENG Qingfang [Tue, 17 Mar 2020 12:54:34 +0000 (20:54 +0800)]
ramips: mt7621: backport GPIO driver fix

Backport 2 patches from linux-next to fix mt7621 GPIO driver

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: update PCIe node in dtsi
DENG Qingfang [Wed, 1 Apr 2020 15:14:33 +0000 (23:14 +0800)]
ramips: mt7621: update PCIe node in dtsi

Update PCIe node in dtsi to match the new driver

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: backport PCIe driver fixes from staging-test
DENG Qingfang [Wed, 11 Mar 2020 13:05:41 +0000 (21:05 +0800)]
ramips: mt7621: backport PCIe driver fixes from staging-test

Backport mt7621-pci/mt7621-pci-phy fixes from staging-test

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: update pinctrl nodes
DENG Qingfang [Fri, 13 Mar 2020 13:27:03 +0000 (21:27 +0800)]
ramips: mt7621: update pinctrl nodes

Upstream GPIO driver uses "groups" "function" properties

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: convert GPIO dts refs
DENG Qingfang [Tue, 3 Mar 2020 21:22:24 +0000 (05:22 +0800)]
ramips: mt7621: convert GPIO dts refs

The upstream driver does not use &gpio0..2 banks notation anymore,
so convert them to &gpio

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: replace gpio/eth nodes in mt7621.dtsi
DENG Qingfang [Sun, 1 Mar 2020 09:14:44 +0000 (17:14 +0800)]
ramips: mt7621: replace gpio/eth nodes in mt7621.dtsi

There's different gpio and ethernet drivers upstream for mt7621.
Update these two nodes to match upstream dt bindings.

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mt7621: refresh kernel config
DENG Qingfang [Sun, 1 Mar 2020 09:11:06 +0000 (17:11 +0800)]
ramips: mt7621: refresh kernel config

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: refresh patches
DENG Qingfang [Sun, 1 Mar 2020 09:06:45 +0000 (17:06 +0800)]
ramips: refresh patches

Removed upstreamed/solved elsewhere upstream:
- 0001-MIPS-ralink-Add-rt3352-SPI_CS1-pinmux.patch
- 0002-MIPS-pci-rt2880-set-pci-controller-of_node.patch
- 0004-MIPS-ralink-add-MT7621-pcie-driver.patch
- 0009-PCI-MIPS-enable-PCIe-on-MT7688.patch
- 0025-pinctrl-ralink-add-pinctrl-driver.patch
- 0028-GPIO-ralink-add-mt7621-gpio-controller.patch
- 0043-spi-add-mt7621-support.patch
- 0045-i2c-add-mt7621-driver.patch
- 0047-DMA-ralink-add-rt2880-dma-engine.patch
- 0053-mtd-spi-nor-add-w25q256-3b-mode-switch.patch
- 0054-mtd-spi-nor-w25q256-respect-default-mode.patch
- 0099-pci-mt7620.patch
- 304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch

Removed because of the new NAND driver:
- 0038-Revert-mtd-nand-Remove-unused-chip-write_page-hook.patch
- 0039-mtd-add-mt7621-nand-support.patch
- 0040-nand-hack.patch

Remove patch that no longer applies (needs rework):
- 0034-NET-multi-phy-support.patch

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: mtk-mmc: set correct DMA mask
DENG Qingfang [Fri, 17 Jan 2020 08:04:14 +0000 (16:04 +0800)]
ramips: mtk-mmc: set correct DMA mask

Since commit f8c55dc ("MIPS: use generic dma noncoherent ops for
simple noncoherent platforms") changed MIPS dma handling, the mmc
driver fails because it doesn't have a dma mask is set.

So set the correct dma mask.

Signed-off-by: NeilBrown <neil@brown.name>
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
4 years agoramips: move MTK MMC driver to files directory
DENG Qingfang [Sun, 1 Mar 2020 09:02:06 +0000 (17:02 +0800)]
ramips: move MTK MMC driver to files directory

Move MTK MMC driver from "files-4.14" to "files" so kernel 5.4
can use it

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>