openwrt/staging/chunkeey.git
7 weeks agoapm821xx: switch to pending xhci-pci-renesas solution master
Christian Lamparter [Fri, 24 Jan 2020 20:02:04 +0000 (21:02 +0100)]
apm821xx: switch to pending xhci-pci-renesas solution

This patch replaces most of the out-of-tree xhci firmware
loader for the particular xhci chip from Renesas on the
WNDR4700's PCB.

What remains is a check in xhci-pci main driver which
guards against a 10 second delay during boot of the WNDR4700.
This is because the xhci-pci will still try to bud-in, but it
doesn't do anything useful, if the firmware isn't loaded, but
waste time and fail eventually:

[  375.481868] xhci_hcd 0000:45:00.0: xHCI Host Controller
[  375.487149] xhci_hcd 0000:45:00.0: new USB bus registered, assigned bus number 1
[  385.494590] xhci_hcd 0000:45:00.0: can't setup: -110
[  385.499558] xhci_hcd 0000:45:00.0: USB bus 1 deregistered
[  385.504963] xhci_hcd 0000:45:00.0: init 0000:45:00.0 fail, -110
[  385.510889] xhci_hcd: probe of 0000:45:00.0 failed with error -110

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoipq806x: add Support for ASRock G10
Christian Lamparter [Fri, 11 Oct 2019 22:49:15 +0000 (00:49 +0200)]
ipq806x: add Support for ASRock G10

The ASRock G10 is a 2.4/5 GHz band 11ac "Gaming" router,
based on Qualcomm IPQ8064.

Specifications:

SoC: Qualcomm IPQ8064
CPU: Dual-Core A15 @ (384 - 1,400 MHz, 2C2T)
DRAM: 512 MiB (~467 MiB available)
NAND: 128 MB (Micron MT29F1G08ABBEAH4)
WLAN0: 4T4R 5 GHz Wlan (QCA9980)
WLAN1: 4T4R 2.4 GHz Wlan (QCA9980)
ETH:    5x 10/100/1000 Mbps Ethernet (QCA8337)
INPUT:  Reset Button, WPS 2.4G and WPS 5G Button
LEDS:   1 mulicolor status LED
USB:    2x USB 3.0 Type-A
POWER:  12VDC/3A AC Adapter + dedicated Power Switch
UART:   Setting is 115200-8-N-1. 1x4 .1" unpopulated header
on the PCB (J6 - very tiny silkscreen next to TX).
        Pinout: 1. 3v3 (Square - best skipped!), 2. RX, 3. GND, 4. TX

WARNING: The serial port needs a TTL/RS-232 3.3v level converter!
 (Depending on the serial adapter RX and TX might need to
  be swappped).

Note about the IR-Remote:
There's a 8-Bit MCU (SONIX SN8F25E21SG) which is controlling the
IR-Remote and is fed by the IR-Photodiode. The SoC can talk to
the device via I2C. The vendor's GPL archive comes with the source
of the inteface driver for this as a (character driver), the main
control software is however a blob.

Installation Instructions:
This requires a TFTP-Server and disassembly of the G10 Router and
some soldering to gain access to the serial/UART which is needed
for booting and flashing (as well as debricking or reverting back
to stock).

 0. Power off the router and disconnect it.
 1. Open up the case
    Remove the phillips screws hidden behind each of the two
    rubber feet on the bottom of the device. They are located on
    the opposite side of the sticker on the bottom.

    Next, remove the HDMI-Dongle from its slot and remove the
    third and last phillips screw inside the HDMI-Dongle compartment.

    Then use a slim, preferably dull kitchen knife to pry apart the
    two plastic clips at the top (Tip: You can see these clips from
    inside the HDMI-Dongle compartment. The big LED lightpipe on
    the top makes for an excellent entry point, be careful though to
    not stab through. The PCB with the LEDs is directly beneath.

    Once the plastic clips are loose, you can apply your "force"
    and pry open up the remaining clips (they are sturdy).

 2. Solder/Connect the UART
    Any common USB<->UART converter with RX,GND and TX will do.
    See Warning above. Don't connect a straight RS232 or 5V one!
    This can kill your SoC and/or the power-rail of the board.

 3. Connect G10 via Ethernet-cable to your network and prepare your PC
    Download the initramfs image and rename it to g10.bin
    Setup a TFTP-Server on your PC (listening on 192.168.1.2) and
    place the g10.bin into the TFTP server's root directory.

 4. Start the G10 by toggling the power button and enter UBoot Prompt

    Watch the bootlog and hit a key once it says "Hit any key to stop autoboot:"

 5. Prepare UBoot environment for OpenWrt image

    Enter the following into the (IPQ)# shell

    # setenv mtdids nand0=nand0
    # setenv mtdparts mtdparts=nand0:48m@0x1340000(ubi)
    # setenv bootargs console=ttyMSM0,115200n8
    # setenv loadkernel 'ubi read 44000000 kernel && bootm'
    # setenv bootmain 'ubi part ubi && run loadkernel'
    # setenv bootwrt 'run bootmain || dhcp'
    # setenv bootcmd 'run bootwrt'
    # saveenv

    The 'saveenv' will commit the changes to the flash (permanently).

    If there's a need to revert back to the stock firmware,
    these changes will make them work again:

    # setenv bootargs console=ttyHSL1,115200n8
    # setenv bootcmd bootipq
    # saveenv

 6. Boot the temporary ramdisk image

    # setenv ipaddr 192.168.1.1
    # setenv serverip 192.168.1.2
    # tftpboot 44000000 g10.bin
    # bootm

 7. Wait for your router's status LED to stop blinking rapidly
    and just glow a steady green.

 8. Connect via your PC to the OpenWrt running in RAM

    The default IPv4-Address of your router will be 192.168.1.1.
    Download the G10's sysupgrade.bin and rename it to
    openwrt-sysupgrade.bin which then you need to copy to your
    router's temporary directory (/tmp)

    # scp openwrt-sysupgrade.bin root@192.168.1.1:/tmp

    use ssh from your PC into your router as root.

    # ssh root@192.168.1.1

    Now is the last time you can make a backup of the original
    "kernel", "ubi_rootfs" and "ubi_rootfs_data" volumes and
    copy them over to your PC.

    to do the final install do:

    # sysupgade -v openwrt-sysupgrade.bin

    - This will will automatically reboot the router -

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agolibnetfilter_conntrack: update to libnetfilter_conntrack-1.0.7-8-g4f0dae9
Christian Lamparter [Sun, 18 Aug 2019 00:28:48 +0000 (02:28 +0200)]
libnetfilter_conntrack: update to libnetfilter_conntrack-1.0.7-8-g4f0dae9

Update libnetfilter_conntrack to commit 4f0dae9239bda9a0844e4103bfa082ca0a5711b1

git log --pretty=oneline --abbrev-commit 3ccae9f5..4f0dae92

4f0dae9 conntrack: support for IPS_OFFLOAD
33ba110 conntrack: api: use libmnl API to build the netlink headers
f014449 src: replace old libnfnetlink builder
c1c0f16 src: replace old libnfnetlink parser
a2fa46c expect: add missing handling for CTA_EXPECT_* attributes
9ddc436 src: introduce abi_breakage()
9c0ed46 Rename 'qa' directory to 'tests'
e0d8a7c qa: test_api: skip synproxy attributes in comparator

Created with the help of the make-package-update-commit.sh script.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agotools: libtool: update to 2.4.2
Christian Lamparter [Fri, 1 Mar 2019 15:48:27 +0000 (16:48 +0100)]
tools: libtool: update to 2.4.2

This patch refreshes the patches and fixes an error
message generated by compiling the host version of libjson-c:

|libtool: Version mismatch error.  This is libtool 2.4.2, but the
|libtool: definition of this LT_INIT comes from libtool 2.4.
|libtool: You should recreate aclocal.m4 with macros from libtool 2.4.2
|libtool: and run autoconf again.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agophytool: add phytool utility
Christian Lamparter [Sun, 3 Mar 2019 17:33:25 +0000 (18:33 +0100)]
phytool: add phytool utility

From the README.md:

phytool is a Linux MDIO register access utility.

Usage:

phytool read  IFACE/ADDR/REG
phytool write IFACE/ADDR/REG <0-0xffff>
phytool print IFACE/ADDR[/REG]

where

ADDR := C22 | C45
C22  := <0-0x1f>
C45  := <0-0x1f>:<0-0x1f>
REG  := <0-0x1f>

Note: Not all MDIO drivers support the port:device
      Clause 45 address format.

The read and write commands are simple register level accessors.
The print command will pretty-print a register. When using the
print command, the register is optional. If left out, the most
common registers will be shown.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoipq40xx: RT-AC58U: "easy install" factory.trx
Christian Lamparter [Sat, 30 Mar 2019 20:07:40 +0000 (21:07 +0100)]
ipq40xx: RT-AC58U: "easy install" factory.trx

This patch adds a image-builder compatible factory install
image that can be flashed directly through both the WebUI or u-boot.

Installation Instructions for the -factory.trx image:
- For the web-console you just upload the .trx file.
  1. login into your router
  2. Select "Administration" under "Advanced Settings".
  3. Select the "Firmware Upgrade" tab
  4. Click on the "Choose File" button and select the
     firmware file.
     (If the web-interface doesn't accept the file try
      renaming it to: FW_RT-AC58U_3.1.1.1.trx)

  5. Hit "Upload" Button

- Place the -factory.trx file into your TFTP-server's
  root-directory and rename it to RT-AC58U.trx. Connect the serial
  cable and power up the router. In the serial console boot menu prompt
  you have to press the 2-key to choose:
   "2: Load System code then write to Flash via TFTP."
  and then follow the instruction on the serial console.

After the image is written to the NAND, the router will automatically
reboot into a modified u-boot that flashes the packed image before
it reboots one more time into the new OpenWrt installation.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoscripts: add SPDX-License-Identifier check to checkpatch.pl
Christian Lamparter [Sat, 30 Mar 2019 10:05:30 +0000 (11:05 +0100)]
scripts: add SPDX-License-Identifier check to checkpatch.pl

This patch backports the current Linux kernel's SPDX-License-Identifier
check routines from the checkpatch.pl script to OpenWrt's current
checkpatch.pl.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agobuild: import LICENSES from linux
Christian Lamparter [Sat, 30 Mar 2019 09:59:25 +0000 (10:59 +0100)]
build: import LICENSES from linux

This patch copies the LICENSES directory from the
linux kernel source. The directory name and content
will be used for checkpatch.pl to verify the license
of new submissions.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoipq40xx: convert Cisco Meraki MR33 to DSA
Christian Lamparter [Sat, 9 Mar 2019 10:08:27 +0000 (11:08 +0100)]
ipq40xx: convert Cisco Meraki MR33 to DSA

This patch converts the Cisco Meraki MR33 to use ipqess + qca8k's DSA.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoipq40xx: convert ASUS RT-AC58U to DSA
Christian Lamparter [Sat, 9 Mar 2019 17:08:27 +0000 (18:08 +0100)]
ipq40xx: convert ASUS RT-AC58U to DSA

This patch converts the ASUS RT-AC58U to ipqess ethernet + qca8k's DSA.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoipq40xx: include ipq40xx-ized qca8k version
Christian Lamparter [Fri, 8 Mar 2019 20:17:19 +0000 (21:17 +0100)]
ipq40xx: include ipq40xx-ized qca8k version

There are still several todos left. Chief amongst which:
 - integrating into qca8k_mmio
 - split out whatever could be sent upstream
 - implement some sort of "mdio offset"?
 - testing and performance evaluations

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoipq40xx: fix NPE related to bogus use of fixed phy
Christian Lamparter [Sat, 9 Mar 2019 19:13:17 +0000 (20:13 +0100)]
ipq40xx: fix NPE related to bogus use of fixed phy

This patch fixes a not-fully-debugged NPE that occures because
a fixed-phy is told to resume, which it obviously can't.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoipq40xx: add ipqess ethernet driver
Christian Lamparter [Sat, 9 Mar 2019 18:33:57 +0000 (19:33 +0100)]
ipq40xx: add ipqess ethernet driver

This driver from John Crispin is poised to replace the current
essedma driver that drives the ethernet MAC on the IPQ40XX platform.
<https://forum.openwrt.org/t/ipq40xx-target-single-nic-devices/7292/16>

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoipq40xx: add resets for individual MAC1-5 and PSGMII
Christian Lamparter [Fri, 8 Mar 2019 16:11:28 +0000 (17:11 +0100)]
ipq40xx: add resets for individual MAC1-5 and PSGMII

This patch is based on a patch by:
Ram Chandra Jangir <rjangir@codeaurora.org>
<http://lists.openwrt.org/pipermail/openwrt-devel/2017-April/007106.html>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoapm821xx: MBL: MR24: fetch IP address over dhcp by default
Christian Lamparter [Mon, 11 Feb 2019 16:30:07 +0000 (17:30 +0100)]
apm821xx: MBL: MR24: fetch IP address over dhcp by default

This patch changes the default network configuration
to fetch the IP addresses over dhcp instead of being
statically assigned.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agobrcm2708: fetch IP address over dhcp by default
Christian Lamparter [Mon, 11 Feb 2019 16:26:36 +0000 (17:26 +0100)]
brcm2708: fetch IP address over dhcp by default

This patch changes the default network configuration
to fetch the IP addresses over dhcp instead of being
statically assigned.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agogemini: generate squashfs hdd image for DNS313
Christian Lamparter [Sun, 10 Feb 2019 13:57:31 +0000 (14:57 +0100)]
gemini: generate squashfs hdd image for DNS313

This patch adds a squashfs + overlay (f2fs / ext4)
option for the DNS313.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agoipq8064: ipq8064-mdio + dsa test
Christian Lamparter [Sun, 3 Feb 2019 23:05:20 +0000 (00:05 +0100)]
ipq8064: ipq8064-mdio + dsa test

7 weeks agoapm821xx: wndr4700: mx60: convert to DSA
Christian Lamparter [Mon, 14 Jan 2019 19:16:36 +0000 (20:16 +0100)]
apm821xx: wndr4700: mx60: convert to DSA

This patch converts both the wndr4700 and mx60 to use a patched
qca8k driver to drive DSA.

Both have to be converted since the old AR8216 phy/swconfig
driver had to be disabled as otherwise it would conflict with
the dsa driver since swconfig utilizes the phy framework.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks agomtd: Fail when verify fails
Michal Hrusecky [Thu, 25 Oct 2018 10:53:02 +0000 (12:53 +0200)]
mtd: Fail when verify fails

Return non-zero exit code when mtd verify fails.

Signed-off-by: Michal Hrusecky <michal.hrusecky@nic.cz>
7 weeks agoipq806x: R7800: mtd-mac-address test
Christian Lamparter [Sat, 15 Dec 2018 09:56:14 +0000 (10:56 +0100)]
ipq806x: R7800: mtd-mac-address test

7 weeks agogeneric: backport ASKEY WWHC050 LTE modem patches
Pawel Dembicki [Wed, 18 Mar 2020 06:17:23 +0000 (07:17 +0100)]
generic: backport ASKEY WWHC050 LTE modem patches

Backport patches which adds support for the ASKEY WWHC050 3G/4G modem,
used in Cell C RTL30VW.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks 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>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks 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>
7 weeks 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: switch to NO_HZ
(And remove the HZ_* symbols so they don't clash/confuse).
This patch includes a refresh of the configuration too.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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]
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks agoramips: copy patches and kernel config to 5.4
DENG Qingfang [Sun, 1 Mar 2020 09:01:09 +0000 (17:01 +0800)]
ramips: copy patches and kernel config to 5.4

Copy patches and kernel config to 5.4 for ramips

Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
7 weeks agobcm53xx: refactor board.d code in 02_network
Rafał Miłecki [Fri, 3 Apr 2020 13:55:01 +0000 (15:55 +0200)]
bcm53xx: refactor board.d code in 02_network

1. Use functions for cleaner code
2. Always execute WAN interface generic code

Before this change WAN interface code wasn't executed on all devices due
to an early "exit 0".

Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 weeks agokernel: add module for Mellanox mlx Network Driver
Tan Zien [Sun, 5 Jan 2020 21:16:43 +0000 (05:16 +0800)]
kernel: add module for Mellanox mlx Network Driver

add module to support Mellanox Connect-X card
mlx4 supports ConnectX-3 series and previous cards
mlx5 supports Connect-IB/ConnectX-4 series and later cards

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
7 weeks agoimx6: bootscript: use partition UUID for rootfs if possible
Tim Harvey [Wed, 1 Apr 2020 17:23:12 +0000 (10:23 -0700)]
imx6: bootscript: use partition UUID for rootfs if possible

Specifying root filesystem by device is non-deterministic for several
reasons:
 - USB device unmeration order is not garunteeed for USB storage devs
 - MMC devs ordering is determined by the instance of the MMC host
   controller including non-storage SDIO devices which can throw off
   numbering depending on kernel versions.

It is recommended to use partition UUID

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 weeks agoocteontx: switch to kernel 5.4
Tim Harvey [Wed, 1 Apr 2020 17:24:12 +0000 (10:24 -0700)]
octeontx: switch to kernel 5.4

5.4 is stable on Gateworks Newport GW610x/GW620x/GW630x/GW640x

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
7 weeks agobuild: refactor JSON info files to `profiles.json`
Paul Spooren [Thu, 12 Mar 2020 22:55:41 +0000 (12:55 -1000)]
build: refactor JSON info files to `profiles.json`

JSON info files contain machine readable information of built profiles
and resulting images. These files were added in commit 881ed09ee6e2
("build: create JSON files containing image info").

They are useful for firmware wizards and script checking for
reproducibility.

Currently all JSON files are stored next to the built images, resulting
in up to 168 individual files for the ath79/generic target.

This patch refactors the JSON creation to store individual per image
(not per profile) files in $(BUILD_DIR)/json_info_files and create an
single overview file called `profiles.json` in the target directory.

Storing per image files and not per profile solves the problem of
parallel file writes. If a profiles sysupgrade and factory image are
finished at the same time both processes would write to the same JSON
file, resulting in randomly broken outputs.

Some target like x86/64 do not use the image code yet, resulting in
missing JSON files. If no JSON info files were created, no
`profiles.json` files is created as it would be empty anyway.

As before, this creation is enabled by default only if `BUILDBOT` is set.

Tested via buildroot & ImageBuilder on ath79/generic, imx6 and x86/64.

Signed-off-by: Paul Spooren <mail@aparcar.org>
[json_info_files dir handling in Make, if case refactoring]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
7 weeks agogrub2: fix build when ASLR enabled
Kevin Darbyshire-Bryant [Wed, 1 Apr 2020 21:44:37 +0000 (22:44 +0100)]
grub2: fix build when ASLR enabled

Disable ASLR and filter '-fno-plt' from CFLAGS: solves building when
ASLR enabled by basically disabling ASLR.

Solves errors similar to:
relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
or
module missing GLOBAL_OFFSET_TABLE

Suggested-by: 李国 <uxgood.org@gmail.com>
Acked-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
8 weeks agokmod-sched-cake: switch to in-tree cake for 4.19+
Kevin Darbyshire-Bryant [Mon, 29 Jul 2019 15:54:02 +0000 (16:54 +0100)]
kmod-sched-cake: switch to in-tree cake for 4.19+

Use in tree version of cake for kernels 4.19+ and backport features from
later kernel versions to 4.19.

Unfortunately PROVIDES dependency handling produces bogus circular
dependency warnings so whilst this package and kmod-sched-cake-oot
should be able to PROVIDE kmod-sched-cake this doesn't work.

Instead, remove the PROVIDES option and modify package sqm-scripts to
depend on the correct module independently.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
8 weeks agokmod-sched-cake: rename to kmod-sched-cake-oot
Kevin Darbyshire-Bryant [Mon, 30 Mar 2020 17:52:09 +0000 (18:52 +0100)]
kmod-sched-cake: rename to kmod-sched-cake-oot

In preparation for dropping the out of tree cake module and using
in tree cake from upstream, rename the package to kmod-sched-cake-oot
(out of tree)

Initially add a PROVIDES kmod-sched-cake so that package dependencies
can be satisfied.

Ultimately this package will be removed when linux 4.14 is removed.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
8 weeks agowireguard: bump to 1.0.20200401
Jason A. Donenfeld [Wed, 1 Apr 2020 20:08:42 +0000 (14:08 -0600)]
wireguard: bump to 1.0.20200401

Recent backports to 5.5 and 5.4 broke our compat layer. This release is
to keep things running with the latest upstream stable kernels.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
8 weeks agomac80211: rt2x00: prune more unnecessary exports
Daniel Golle [Mon, 30 Mar 2020 22:35:04 +0000 (23:35 +0100)]
mac80211: rt2x00: prune more unnecessary exports

The calibration patches for MT7620 unnecessarily export symbols and
populate never accessed function pointers. Remove all that and make
functions static as the only place where each of those functions is
called is within rt2800lib.c.
Also make code more readable by fixing indentation, removing
unnecessary parantheses and simplifying some instructions using
shorthands here and there.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
8 weeks agojansson: convert to cmake
Kevin Darbyshire-Bryant [Tue, 31 Mar 2020 12:01:18 +0000 (13:01 +0100)]
jansson: convert to cmake

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
8 weeks agoopenssl: bump to 1.1.1f
Eneas U de Queiroz [Tue, 31 Mar 2020 20:51:45 +0000 (17:51 -0300)]
openssl: bump to 1.1.1f

There were two changes between 1.1.1e and 1.1.1f:
- a change in BN prime generation to avoid possible fingerprinting of
  newly generated RSA modules
- the patch reversing EOF detection we had already applied.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>