openwrt/staging/chunkeey.git
2 years agohostapd: add support for enabling FILS on AP and client interfaces
Felix Fietkau [Tue, 7 Dec 2021 13:47:40 +0000 (14:47 +0100)]
hostapd: add support for enabling FILS on AP and client interfaces

This is only supported with WPA-enterprise

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agohostapd: enable FILS support in the full config and add build feature discovery
Felix Fietkau [Tue, 7 Dec 2021 10:06:16 +0000 (11:06 +0100)]
hostapd: enable FILS support in the full config and add build feature discovery

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agotools/mkimage: fix build on MacOS arm64
Sergey V. Lobanov [Thu, 2 Dec 2021 16:02:23 +0000 (19:02 +0300)]
tools/mkimage: fix build on MacOS arm64

Fixed -no-pie compilation warning on MacOS
Fixed errors related to using absolute addressing on MacOS arm64

Based on upstream patch from Jessica Clarke and suggestions from Ronny Kotzschmar

Link to original patch and discussion:
https://github.com/u-boot/u-boot/commit/3b142045e8a7f0ab17b6099e9226296af45967d0

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2 years agoramips: add support for Zbtlink ZBT-WG1602
Sergey Ryazanov [Tue, 16 Nov 2021 10:10:25 +0000 (13:10 +0300)]
ramips: add support for Zbtlink ZBT-WG1602

Zbtlink ZBT-WG1602 is a Wi-Fi router intendent to use with WWAN
(UMTS/LTE/3G/4G) modems. The router board offsers a couple of miniPCIe
slots with USB and SIM only and another one pure miniPCIe slot as well
as five Gigabit Ethernet ports (4xLAN + WAN).

Specification:

* SoC: MT7621A
* RAM: 256/512 MiB
* Flash: 16/32 MiB (SPI NOR)
* external watchdog (looks like Torexsemi XC6131B)
* Eth: 10/100/1000 Mbps Ethernet x5 ports (4xLAN + WAN)
* WLAN 2GHz: MT7603EN (.11n, MIMO 2x2)
* WLAN 5GHz: MT7612EN (.11ac, MIMO 2x2)
* WLAN Ants: detachable x2, shared by 2GHz & 5GHz radios
* miniPCIe: 2x slots with USB&SIM + 1x slot with regular PCIe bus
* WWAN Ants: detachable x4
* External storage: microSD (SDXC) slot
* USB: 2.0 Type-A port
* LED: 11 (5 per Eth phy, 3 SoC controlled, 2 WLAN 2/5 controlled, 1
       power indicator)
* Button: 1 (reset)
* UART: console (115200 baud)
* Power: DC jack (12 V / 2.5 A)

Additional HW information:

* SoC USB port #1 is shared by internal miniPCIe slot and external
  Type-A USB port, USB D+/D- lines are toggled between ports using a
  GPIO controlled DPDT switch.
* Power of the USB enabled miniPCIe slots can be individually controlled
  using dedicated GPIO lines.
* Vendor firmware feeds the external watchdog with 1s pulses. GPIO
  watchdog driver is able to either generate a 1us pulses or toggle the
  output line. 1us is not enough for the external watchod timer, so
  the line toggling driver mode is utilized.

Installation:

Vendor's firmware is OpenWrt (LEDE) based, so the sysupgrade image can
be directly used to install OpenWrt. Firmware must be upgraded using the
'force' and 'do not save configuration' command line options (or
correspondig web interface checkboxes) since the vendor firmware is from
the pre-DSA era.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2 years agoath79: add support for TP-Link EAP225 v1
Sander Vanheule [Mon, 22 Nov 2021 19:59:06 +0000 (20:59 +0100)]
ath79: add support for TP-Link EAP225 v1

TP-Link EAP225 v1 is an AC1200 (802.11ac Wave-1) ceiling mount access point.

Device specifications:
* SoC: QCA9563 @ 775MHz
* RAM: 128MiB DDR2
* Flash: 16MiB SPI-NOR
* Wireless 2.4GHz (SoC): b/g/n, 2x2
* Wireless 5Ghz (QCA9882): a/n/ac, 2x2
* Ethernet (AR8033): 1× 1GbE, 802.3at PoE

Flashing instructions:
* Ensure the device is upgraded to firmware v1.4.0
* Exploit the user management page in the web interface to start telnetd
  by changing the username to `;/usr/sbin/telnetd -l/bin/sh&`.
* Immediately change the malformed username back to something valid
  (e.g. 'admin') to make ssh work again.
* Use the root shell via telnet to make /tmp world writeable (chmod 777)
* Extract /usr/bin/uclited from the device via ssh and apply the binary
  patch listed below. The patch is required to prevent `uclited -u` in
  the last step from crashing.
* Copy the patched uclited binary back to the device at /tmp/uclited
  (via ssh)
* Upload the factory image to /tmp/upgrade.bin (via ssh)
* Run `chmod +x /tmp/uclited && /tmp/uclited -u` to install OpenWrt.

uclited patching:
    --- xxd uclited
    +++ xxd uclited-patched
    @@ -53811,7 +53811,7 @@
     000d2330: 8c44 0000 0320 f809 0000 0000 8fbc 0010  .D... ..........
     000d2340: 8fa6 0a4c 02c0 2821 8f82 87c4 0000 0000  ...L..(!........
    -000d2350: 8c44 0000 0c13 461c 27a7 0018 8fbc 0010  .D....F.'.......
    +000d2350: 8c44 0000 2402 0000 0000 0000 8fbc 0010  .D..$...........
     000d2360: 1040 001d 0000 1821 8f99 8378 3c04 0058  .@.....!...x<..X
     000d2370: 3c05 0056 2484 ad68 24a5 9f00 0320 f809  <..V$..h$.... ..

To make sure the correct file is patched, the following MD5 checksums
should match the unpatched and patched files:
    4bd74183c23859c897ed77e8566b84de  uclited
    4107104024a2e0aeaf6395ed30adccae  uclited-patched

Debricking:
* Serial port can be soldered on unpopulated 4-pin header
  (1: TXD, 2: RXD, 3: GND, 4: VCC)
    * Bridge unpopulated resistors running from pins 1 (TXD) and 2 (RXD).
      Do NOT bridge the pull-down for pin 2, running parallel to the
      header.
    * Use 3.3V, 115200 baud, 8n1
* Interrupt bootloader by holding CTRL+B during boot
* tftp initramfs to flash via the LuCI web interface
    setenv ipaddr 192.168.1.1 # default, change as required
    setenv serverip 192.168.1.10 # default, change as required
    tftp 0x80800000 initramfs.bin
    bootelf $fileaddr

Tested by forum user KernelMaker.

Link: https://forum.openwrt.org/t/eap225-v1-firmware/87116
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agorealtek: sort the port list numerically
Bjørn Mork [Mon, 29 Nov 2021 13:18:14 +0000 (14:18 +0100)]
realtek: sort the port list numerically

Mac adresses are assigned in the order given by the port list.  The
interfaces are also brought up in this order.  This target supports
devices with up to 52 ports.  Sorting these alphabetically is very
confusing, and assigning mac addresses in alphabetic order does not
match stock firmware behaviour.

Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2 years agorealtek: update watchdog timer patch
Sander Vanheule [Wed, 1 Dec 2021 21:08:23 +0000 (22:08 +0100)]
realtek: update watchdog timer patch

The Realtek Otto watchdog timer driver was accepted upstream, and is
queued for 5.17. Update the patch's file name, and replace by the final
version.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agox86: added support to generate VHDX images
Oldřich Jedlička [Sat, 9 Jan 2021 21:23:09 +0000 (22:23 +0100)]
x86: added support to generate VHDX images

Added support to generate dynamic-sized VHDX images for Hyper-V.
Compile-tested on x86 and run-tested on Windows 10 21H2 (Hyper-V).

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2 years agotools/meson: update to 0.60.1
Rosen Penev [Mon, 22 Nov 2021 08:51:08 +0000 (00:51 -0800)]
tools/meson: update to 0.60.1

change meson binary to use py extension. Fixes issue with meson's
symbolextractor using the host python instead of the system one.

We intentionally use a .py extension here so that meson launches
additional python scripts with the same build host python interpreter as
itself is running under (and not the host package one once it becomes
available)

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years agokernel: add kmod-video-gspca-sq930x
Josef Schlehofer [Fri, 25 Jun 2021 09:31:23 +0000 (11:31 +0200)]
kernel: add kmod-video-gspca-sq930x

This module adds support for USB WebCams, which uses SQ930X chip [1].

[1] https://cateee.net/lkddb/web-lkddb/USB_GSPCA_SQ930X.html

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2 years agokernel: btrfs: enable ACL
Josef Schlehofer [Thu, 16 May 2019 15:23:12 +0000 (17:23 +0200)]
kernel: btrfs: enable ACL

By default CONFIG_BTRFS_FS_POSIX_ACL is disabled, it should be enabled
only when you enable CONFIG_FS_POSIX_ACL.

Right now, when you enable CONFIG_FS_POSIX_ACL it will enable
CONFIG_BTRFS_FS_POSIX_ACL, but it will be disabled once you install
kmod-btrfs. This should prevent it.

Btrfs has enabled by default ACL for mount option.

More details:
https://cateee.net/lkddb/web-lkddb/BTRFS_FS_POSIX_ACL.html
https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs(5)

Signed-off-by: Josef Schlehofer <josef.schlehofer@nic.cz>
2 years agoipq806x: revert SDC clock changes for NBG6817 MMC
Shane Synan [Fri, 3 Dec 2021 20:46:36 +0000 (15:46 -0500)]
ipq806x: revert SDC clock changes for NBG6817 MMC

Revert the SDC "CLK_SET_RATE_GATE" changes to the SDC clock regulator
structures.

See https://elinux.org/images/b/b8/Elc2013_Clement.pdf
> if ((clk->flags & CLK_SET_RATE_GATE) && clk->prepare_count) {
>
> For this particular clock, setting its rate is possible only if the
> clock is ungated (not yet prepared)

This fixes the MMC failing to initialize on newer ZyXEL NBG6817
hardware revisions with Kingston MMC.  Older revisions should
hopefully be unaffected.

Check MMC hardware details with:
cd /sys/block/mmcblk0/device/ && \
  tail -v cid date name manfid fwrev hwrev oemid rev

Known problematic MMC names (broken before this commit):
* M62704 (dated 12/2018) via myself
* M62704 (dated 11/2018) via Drake Stefani

Known unaffected MMC names (already working without this commit):
* S10004 (dated 12/2015) via slh

Without enabling dynamic debugging, this error manifests in the kernel
hardware serial console as the following:

[    2.746605] mmc0: error -110 whilst initialising MMC card
[…trimmed other messages…]
[    2.877832] Waiting for root device /dev/mmcblk0p5...

Enabling Linux dynamic kernel debugging provides additional messages.
For guidance, see the Linux kernel documentation:
https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html

First, enable dynamic debugging in OpenWRT's configuration:

1.  Run "make menuconfig"

2.  Select "Global build settings --->"

3.  Select "Kernel build options --->"

4.  Enable "Compile the kernel with dynamic printk" via spacebar

5.  Save and exit (arrow key to "Exit" until prompted to save, save)

Alternatively, set "CONFIG_KERNEL_DYNAMIC_DEBUG=y" in your .config.

Then, turn on dynamic debugging at boot:

Modify bootargs in
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
to add…

bootargs = "[…existing bootargs…] dyndbg=\"file drivers/mmc/* +p\" dynamic_debug.verbose=1 loglevel=8";

For example:
  chosen {
- bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1";
+ bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1 dyndbg=\"file drivers/mmc/* +p\" dynamic_debug.verbose=1 loglevel=8";
  append-rootblock = "root=/dev/mmcblk0p";

Then, compile and flash the resulting build.  If you are testing
before this commit on newer MMC hardware, be prepared to recover!

NOTE: If you have hardware serial console access, you don't need to
use TFTP recovery to change the active boot partition.

Reboot to working alternative partition via serial console:

1.  Connect to hardware serial console
    * See https://openwrt.org/toh/zyxel/nbg6817#serial

2.  Interrupt boot at "Hit any key to stop autoboot:"

3.  Run "ATSE NBG6817"

4.  Copy the result (e.g. "001976FE4B04")
    * Changes with **every boot** - can't reuse this

5.  On your local system, run
    "./zyxel-uboot-password-tool.sh <copied value here>"
    * Example: "./zyxel-uboot-password-tool.sh 001976FE4B04"

6.  Run the command provided by the password tool
    * Example: "ATEN 1,910F129B"
    * Changes with **every boot** - can't reuse this

7.  Run "ATGU"
    * You now have full u-boot shell until next boot - unlocking is
       not remembered

8.  Run either "run boot_mmc" (for booting partition set "FF") or
    "run boot_mmc_1" (for booting partition set "01")
    * These commands are not affected by dual-boot partition flags

NOTE: This will NOT set the dual-boot partition flag.  You'll need to
fix that manually.  The "nbg6817-dualboot" script may help:
https://github.com/pkgadd/nbg6817/blob/master/nbg6817-dualboot

zyxel-uboot-password-tool.sh - sourced from
commit 459c8c9ef816156107e297964d088ddee2b4eef5:

ror32() {
  echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) ))
}

v="0x$1"
a="0x${v:2:6}"
b=$(( a + 0x10F0A563))
c=$(( 0x${v:12:14} & 7 ))
p=$(( $(ror32 $b $c) ^ a ))
printf "ATEN 1,%X\n" $p

Kernel serial console log BEFORE commit with dynamic debug enabled:
[…trimmed…]
[    3.171343] mmci-pl18x 12400000.sdcc: designer ID = 0x51
[    3.171397] mmci-pl18x 12400000.sdcc: revision = 0x0
[    3.175811] mmci-pl18x 12400000.sdcc: clocking block at 96000000 Hz
[    3.181134] mmci-pl18x 12400000.sdcc: No vqmmc regulator found
[    3.186788] mmci-pl18x 12400000.sdcc: mmc0: PL180 manf 51 rev0 at 0x12400000 irq 41,0 (pio)
[    3.192902] mmci-pl18x 12400000.sdcc: DMA channels RX dma1chan1, TX dma1chan2
[    3.215609] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[    3.227532] mmci-pl18x 12400000.sdcc: Initial signal voltage of 3.3v
[    3.247518] mmc0: clock 52000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[…trimmed…]
[    3.997725] mmc0: req done (CMD2): -110: 00000000 00000000 00000000 00000000
[    4.003631] mmci-pl18x 12400000.sdcc: irq0 (data+cmd) 00000000
[    4.003659] mmc0: error -110 whilst initialising MMC card
[    4.016481] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0

Notice how the initial clock is 52 MHz, which is incorrect - MMC
requires negotiation to enable higher speeds.

Kernel serial console log AFTER commit with dynamic debug enabled:
[…trimmed…]
[    3.168996] mmci-pl18x 12400000.sdcc: designer ID = 0x51
[    3.169051] mmci-pl18x 12400000.sdcc: revision = 0x0
[    3.173492] mmci-pl18x 12400000.sdcc: clocking block at 96000000 Hz
[    3.178808] mmci-pl18x 12400000.sdcc: No vqmmc regulator found
[    3.184702] mmci-pl18x 12400000.sdcc: mmc0: PL180 manf 51 rev0 at 0x12400000 irq 41,0 (pio)
[    3.190573] mmci-pl18x 12400000.sdcc: DMA channels RX dma1chan1, TX dma1chan2
[    3.217873] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0
[    3.229250] mmci-pl18x 12400000.sdcc: Initial signal voltage of 3.3v
[    3.249111] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0
[…trimmed…]
[    4.392652] mmci-pl18x 12400000.sdcc: irq0 (data+cmd) 00000000
[    4.392785] mmc0: clock 52000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 1
[    4.406554] mmc0: starting CMD6 arg 03b70201 flags 0000049d
[…trimmed…]

Now, the MMC properly initializes and later switches to high speed.

Thanks to:
* Ansuel for maintaining/help with the IPQ806x platform, kernel code
* slh for additional debugging and suggestions
* dwfreed for confirming newer MMC details, clock frequency
* robimarko for device driver debug printing help, clock debugging
* Drake for testing and confirmation with their own newer NBG6817
...and anyone else I missed!

Signed-off-by: Shane Synan <digitalcircuit36939@gmail.com>
Tested-by: Shane Synan <digitalcircuit36939@gmail.com>
2 years agonat46: update to latest git HEAD
Hans Dedecker [Sun, 5 Dec 2021 17:37:15 +0000 (18:37 +0100)]
nat46: update to latest git HEAD

d9bc161 nat46-core: Fix typo since day one (#31)
840e235 Fix coverity issues observed so far (#30)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
2 years agomediatek: enable bmt on mt7622-rfb1
Felix Fietkau [Sat, 4 Dec 2021 21:46:00 +0000 (22:46 +0100)]
mediatek: enable bmt on mt7622-rfb1

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomediatek: bmt: use generic mtd api
Chuanhong Guo [Sat, 4 Dec 2021 14:24:59 +0000 (22:24 +0800)]
mediatek: bmt: use generic mtd api

BMT replaces nand-specific ops for erasing and writing, but the
mtk-snand driver only implements generic mtd api.

Replace erase, block_isbad, block_markbad in mtd_info for generic mtd
drivers.

Fixes: b600aee3ed ("mediatek: attach bmt to the new snand driver")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 years agobase-files: fix service_running check
Florian Eckert [Tue, 15 Jun 2021 06:48:18 +0000 (08:48 +0200)]
base-files: fix service_running check

The following command checks if a instance of a service is running.
/etc/init.d/<service> running <instance>

 In the variable `$@`, which is passed to the function
`service_running`, the first argument is always the `instance` which
should be checked. Because all other variables where removed from `$@`
with `shift`.

Before this change the first argument of `$@` was set to the `$service`
Variable. So the function does not work as expected. The `$service`
variable was always the instance which should be checked. This is not
what we want.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
2 years agoramips: add support for ipTIME A3004NS-dual
Yuchan Seo [Wed, 13 Oct 2021 01:04:44 +0000 (21:04 -0400)]
ramips: add support for ipTIME A3004NS-dual

ipTIME A3004NS-dual is a 2.4/5GHz band router, based on Mediatek MT7621.

Specifications:
- SoC: MT7621 (880MHz)
- RAM: DDR3 256M
- Flash: SPI NOR 16MB
- WiFi:
 - 2.4GHz: MT7602E
 - 5GHz : MT7612E
- Ethernet:
 - 4x LAN
 - 1x WAN
- USB: 1 * USB3.0 port
- UART:
  - 3.3V, TX, RX, GND / 57600 8N1

Installation via web interface:
- 1. Flash Initramfs image using OEM Firmware's web GUI
- 2. Boot into OpenWrt and perform Sysupgrade with sysupgrade image.

Revert to stock firmware:
- 1. Boot into OpenWrt and perform Sysupgrade with OEM Stock Firmware image.

Signed-off-by: Yuchan Seo <hexagonwin@disroot.org>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
2 years agokirkwood: add support for Ctera C200 V1 NAS
Pawel Dembicki [Mon, 16 Aug 2021 15:42:56 +0000 (17:42 +0200)]
kirkwood: add support for Ctera C200 V1 NAS

2-Bay NAS - maximum two 3.5" Harddisks

Hardware:
  - SoC: Marvell 88F6281-A1 ARMv5TE Processor 1.2GHz
  - Ram: 512MB (4x Nanya NT5TU128M8GE-AC)
  - NAND Flash: 256MB (Samsung 216 K9F2G08U0C)
  - Lan: 1x GBE (Marvell 88E1116R-NNC1)
  - Storage: 2x SATA HDD 3.5" Slot
  - USB: 2x USB 2.0 port
  - Console: Internal J3 connector (1: Vcc, 2: Rx, 3: Tx, 4: GND)
  - LEDs: 13x GPIO controlled
  - Buttons: 2x GPIO controlled

Known issues:
  - Buzzer is unused due lack of proper driver

Installation:
  - Apply factory initramfs image via stock web-gui.
  - Do sysupgrade to make installation complete.

Back to stock:
  - OpenWrt rootfs partition use unused space after stock firmware.
  - Full revert is possible.
  - Login via ssh and run: ctera_c200-v1_back_to_factory

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
[apply sorting to device recipe]
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
2 years agoramips: fix tl-mr3020-v3 switch topology to configure vlans via luci
Sergey V. Lobanov [Fri, 26 Nov 2021 17:26:17 +0000 (20:26 +0300)]
ramips: fix tl-mr3020-v3 switch topology to configure vlans via luci

Currently it is not possible to configure VLANs via LUCI on
tplink tl-mr3020-v3. This patch fixes switch topology for the
LUCI interface.

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
[copied commit message from github PR]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoramips: mt7620: Enable PHY aneg of Lava LR-25G001
Pawel Dembicki [Mon, 29 Nov 2021 12:56:49 +0000 (13:56 +0100)]
ramips: mt7620: Enable PHY aneg of Lava LR-25G001

In 20b09a2125f5 Lava LR-25G001 router have problem with two inactive
ethernet ports. JBOOT bootloader didn't configure ethernet devices by default.
The same situation was there. It is required to enable all phy ports.
This is fragment of stock bootlog:

switch reg write_athr offset=90, value=2b0
switch reg write_athr offset=8c, value=2b0
switch reg write_athr offset=88, value=2b0
switch reg write_athr offset=84, value=2b0
switch reg write_athr offset=80, value=2b0

This patch adds proper registers configuration ar8337 initvals.
0x2b0 value causes force flow control configuration, 0x1200 was used
instead (flow control config auto-neg with phy). [1]

When switch is now ok, let's fix port numeration too.

Fixes: 20b09a2125f5 ("ramips: add support for Lava LR-25G001")
[1] https://github.com/openwrt/openwrt/pull/4806#issuecomment-982019858

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
2 years agoipq40xx: nvmem cells for EZVIZ CS-W3-WD1200G EUP
Christian Lamparter [Sat, 27 Nov 2021 22:06:13 +0000 (23:06 +0100)]
ipq40xx: nvmem cells for EZVIZ CS-W3-WD1200G EUP

introduce nvmem pre-cal + mac-address cells for both Wifis
and ethernet on the EZVIZ CS-W3-WD1200G EUP. This is one of
the few devices in which the correct mac adress is already
at the right place for Wifi, so no separate nvmem cell is
needed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoipq40xx: unbreak EZVIZ CS-W3-WD1200G EUP on 5.10
Christian Lamparter [Sun, 28 Nov 2021 14:26:18 +0000 (15:26 +0100)]
ipq40xx: unbreak EZVIZ CS-W3-WD1200G EUP on 5.10

with current images, the device is no longer booting.
It gets stuck in the bootloader with "Config not available"
and drops to the uboot shell.

|flash_type: 0
|Hit any key to stop autoboot:  0
|SF: Detected MX25L12805D with page size 4 KiB, total 16 MiB
|Config not availabale
|(IPQ40xx) #

This is because the default bootcmd "bootipq" will only read
the first four MiB of the kernel image. With 5.10 the gzip'd
kernel is slightly larger. So the part of the FIT image which
had the configuration is cut off. Hence it can't find it.

To update the bootcmd, you have to attach the serial console
again and enter the following commands into the boot prompt:

 # setenv bootcmd "sf probe; sf read 84000000 180000 600000; bootm"
 # saveenv
 # run bootcmd

This will allow booting kernels with up to six MiB. This also
allows us to drop the DEVICE_DTS_CONFIG hack we had to use.

Note:
uboot doesn't support LZMA. It fails with:
"Unimplemented compression type 3"

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agogemini: only provide squashfs image for storlink-derivates
Christian Lamparter [Thu, 2 Dec 2021 19:04:53 +0000 (20:04 +0100)]
gemini: only provide squashfs image for storlink-derivates

The itian sq201, raidsonic ib-4220-b and storlink sl93512r
can't boot from ext4. This is because the rootfstype in the
device-tree bootargs is set to "squashfs,jffs2". (And ext4
was not designed for raw NOR flash chips).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agofirmware: intel-microcode: update to 20210608
Tan Zien [Fri, 27 Aug 2021 13:27:11 +0000 (21:27 +0800)]
firmware: intel-microcode: update to 20210608

intel-microcode (3.20210608.2)

  * Correct INTEL-SA-00442 CVE id to CVE-2020-24489 in changelog and
    debian/changelog (3.20210608.1).

intel-microcode (3.20210608.1)

  * New upstream microcode datafile 20210608 (closes: #989615)
    * Implements mitigations for CVE-2020-24511 CVE-2020-24512
      (INTEL-SA-00464), information leakage through shared resources,
      and timing discrepancy sidechannels
    * Implements mitigations for CVE-2020-24513 (INTEL-SA-00465),
      Domain-bypass transient execution vulnerability in some Intel Atom
      Processors, affects Intel SGX.
    * Implements mitigations for CVE-2020-24489 (INTEL-SA-00442), Intel
      VT-d privilege escalation
    * Fixes critical errata on several processors
    * New Microcodes:
      sig 0x00050655, pf_mask 0xb7, 2018-11-16, rev 0x3000010, size 47104
      sig 0x000606a5, pf_mask 0x87, 2021-03-08, rev 0xc0002f0, size 283648
      sig 0x000606a6, pf_mask 0x87, 2021-04-25, rev 0xd0002a0, size 283648
      sig 0x00080664, pf_mask 0x01, 2021-02-17, rev 0xb00000f, size 130048
      sig 0x00080665, pf_mask 0x01, 2021-02-17, rev 0xb00000f, size 130048
      sig 0x000806c1, pf_mask 0x80, 2021-03-31, rev 0x0088, size 109568
      sig 0x000806c2, pf_mask 0xc2, 2021-04-07, rev 0x0016, size 94208
      sig 0x000806d1, pf_mask 0xc2, 2021-04-23, rev 0x002c, size 99328
      sig 0x00090661, pf_mask 0x01, 2021-02-04, rev 0x0011, size 19456
      sig 0x000906c0, pf_mask 0x01, 2021-03-23, rev 0x001d, size 19456
      sig 0x000a0671, pf_mask 0x02, 2021-04-11, rev 0x0040, size 100352
    * Updated Microcodes:
      sig 0x000306f2, pf_mask 0x6f, 2021-01-27, rev 0x0046, size 34816
      sig 0x000306f4, pf_mask 0x80, 2021-02-05, rev 0x0019, size 19456
      sig 0x000406e3, pf_mask 0xc0, 2021-01-25, rev 0x00ea, size 105472
      sig 0x000406f1, pf_mask 0xef, 2021-02-06, rev 0xb00003e, size 31744
      sig 0x00050653, pf_mask 0x97, 2021-03-08, rev 0x100015b, size 34816
      sig 0x00050654, pf_mask 0xb7, 2021-03-08, rev 0x2006b06, size 36864
      sig 0x00050656, pf_mask 0xbf, 2021-03-08, rev 0x4003102, size 30720
      sig 0x00050657, pf_mask 0xbf, 2021-03-08, rev 0x5003102, size 30720
      sig 0x0005065b, pf_mask 0xbf, 2021-04-23, rev 0x7002302, size 27648
      sig 0x00050663, pf_mask 0x10, 2021-02-04, rev 0x700001b, size 24576
      sig 0x00050664, pf_mask 0x10, 2021-02-04, rev 0xf000019, size 24576
      sig 0x00050665, pf_mask 0x10, 2021-02-04, rev 0xe000012, size 19456
      sig 0x000506c9, pf_mask 0x03, 2020-10-23, rev 0x0044, size 17408
      sig 0x000506ca, pf_mask 0x03, 2020-10-23, rev 0x0020, size 15360
      sig 0x000506e3, pf_mask 0x36, 2021-01-25, rev 0x00ea, size 105472
      sig 0x000506f1, pf_mask 0x01, 2020-10-23, rev 0x0034, size 11264
      sig 0x000706a1, pf_mask 0x01, 2020-10-23, rev 0x0036, size 74752
      sig 0x000706a8, pf_mask 0x01, 2020-10-23, rev 0x001a, size 75776
      sig 0x000706e5, pf_mask 0x80, 2020-11-01, rev 0x00a6, size 110592
      sig 0x000806a1, pf_mask 0x10, 2020-11-06, rev 0x002a, size 32768
      sig 0x000806e9, pf_mask 0x10, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000806e9, pf_mask 0xc0, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000806ea, pf_mask 0xc0, 2021-01-06, rev 0x00ea, size 103424
      sig 0x000806eb, pf_mask 0xd0, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000806ec, pf_mask 0x94, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000906e9, pf_mask 0x2a, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000906ea, pf_mask 0x22, 2021-01-05, rev 0x00ea, size 102400
      sig 0x000906eb, pf_mask 0x02, 2021-01-05, rev 0x00ea, size 104448
      sig 0x000906ec, pf_mask 0x22, 2021-01-05, rev 0x00ea, size 103424
      sig 0x000906ed, pf_mask 0x22, 2021-01-05, rev 0x00ea, size 103424
      sig 0x000a0652, pf_mask 0x20, 2021-02-07, rev 0x00ea, size 93184
      sig 0x000a0653, pf_mask 0x22, 2021-03-08, rev 0x00ea, size 94208
      sig 0x000a0655, pf_mask 0x22, 2021-03-08, rev 0x00ec, size 94208
      sig 0x000a0660, pf_mask 0x80, 2020-12-08, rev 0x00e8, size 94208
      sig 0x000a0661, pf_mask 0x80, 2021-02-07, rev 0x00ea, size 93184
  * source: update symlinks to reflect id of the latest release, 20210608

intel-microcode (3.20210216.1)

  * New upstream microcode datafile 20210216
    * Mitigates an issue on Skylake Server (H0/M0/U0), Xeon-D 21xx,
      and Cascade Lake Server (B0/B1) when using an active JTAG
      agent like In Target Probe (ITP), Direct Connect Interface
      (DCI) or a Baseboard Management Controller (BMC) to take the
      CPU JTAG/TAP out of reset and then returning it to reset.
    * This issue is related to the INTEL-SA-00381 mitigation.
    * Updated Microcodes:
      sig 0x00050654, pf_mask 0xb7, 2020-12-31, rev 0x2006a0a, size 36864
      sig 0x00050656, pf_mask 0xbf, 2020-12-31, rev 0x4003006, size 53248
      sig 0x00050657, pf_mask 0xbf, 2020-12-31, rev 0x5003006, size 53248
  * source: update symlinks to reflect id of the latest release, 20210216

intel-microcode (3.20201118.1)

  * New upstream microcode datafile 20201118
    * Removes a faulty microcode update from release 2020-11-10 for Tiger Lake
      processors.  Note that Debian already had removed this specific falty
      microcode update on the 3.20201110.1 release
    * Add a microcode update for the Pentium Silver N/J5xxx and Celeron
      N/J4xxx which didn't make it to release 20201110, fixing security issues
      (INTEL-SA-00381, INTEL-SA-00389)
    * Updated Microcodes:
      sig 0x000706a1, pf_mask 0x01, 2020-06-09, rev 0x0034, size 74752
    * Removed Microcodes:
      sig 0x000806c1, pf_mask 0x80, 2020-10-02, rev 0x0068, size 107520

intel-microcode (3.20201110.1)

  * New upstream microcode datafile 20201110 (closes: #974533)
    * Implements mitigation for CVE-2020-8696 and CVE-2020-8698,
      aka INTEL-SA-00381: AVX register information leakage;
      Fast-Forward store predictor information leakage
    * Implements mitigation for CVE-2020-8695, Intel SGX information
      disclosure via RAPL, aka INTEL-SA-00389
    * Fixes critical errata on several processor models
    * Reintroduces SRBDS mitigations(CVE-2020-0543, INTEL-SA-00320)
      for Skylake-U/Y, Skylake Xeon E3
    * New Microcodes
      sig 0x0005065b, pf_mask 0xbf, 2020-08-20, rev 0x700001e, size 27648
      sig 0x000806a1, pf_mask 0x10, 2020-06-26, rev 0x0028, size 32768
      sig 0x000806c1, pf_mask 0x80, 2020-10-02, rev 0x0068, size 107520
      sig 0x000a0652, pf_mask 0x20, 2020-07-08, rev 0x00e0, size 93184
      sig 0x000a0653, pf_mask 0x22, 2020-07-08, rev 0x00e0, size 94208
      sig 0x000a0655, pf_mask 0x22, 2020-07-08, rev 0x00e0, size 93184
      sig 0x000a0661, pf_mask 0x80, 2020-07-02, rev 0x00e0, size 93184
    * Updated Microcodes
      sig 0x000306f2, pf_mask 0x6f, 2020-05-27, rev 0x0044, size 34816
      sig 0x000406e3, pf_mask 0xc0, 2020-07-14, rev 0x00e2, size 105472
      sig 0x00050653, pf_mask 0x97, 2020-06-18, rev 0x1000159, size 33792
      sig 0x00050654, pf_mask 0xb7, 2020-06-16, rev 0x2006a08, size 35840
      sig 0x00050656, pf_mask 0xbf, 2020-06-18, rev 0x4003003, size 52224
      sig 0x00050657, pf_mask 0xbf, 2020-06-18, rev 0x5003003, size 52224
      sig 0x000506c9, pf_mask 0x03, 2020-02-27, rev 0x0040, size 17408
      sig 0x000506ca, pf_mask 0x03, 2020-02-27, rev 0x001e, size 15360
      sig 0x000506e3, pf_mask 0x36, 2020-07-14, rev 0x00e2, size 105472
      sig 0x000706a8, pf_mask 0x01, 2020-06-09, rev 0x0018, size 75776
      sig 0x000706e5, pf_mask 0x80, 2020-07-30, rev 0x00a0, size 109568
      sig 0x000806e9, pf_mask 0x10, 2020-05-27, rev 0x00de, size 104448
      sig 0x000806e9, pf_mask 0xc0, 2020-05-27, rev 0x00de, size 104448
      sig 0x000806ea, pf_mask 0xc0, 2020-06-17, rev 0x00e0, size 104448
      sig 0x000806eb, pf_mask 0xd0, 2020-06-03, rev 0x00de, size 104448
      sig 0x000806ec, pf_mask 0x94, 2020-05-18, rev 0x00de, size 104448
      sig 0x000906e9, pf_mask 0x2a, 2020-05-26, rev 0x00de, size 104448
      sig 0x000906ea, pf_mask 0x22, 2020-05-25, rev 0x00de, size 103424
      sig 0x000906eb, pf_mask 0x02, 2020-05-25, rev 0x00de, size 104448
      sig 0x000906ec, pf_mask 0x22, 2020-06-03, rev 0x00de, size 103424
      sig 0x000906ed, pf_mask 0x22, 2020-05-24, rev 0x00de, size 103424
      sig 0x000a0660, pf_mask 0x80, 2020-07-08, rev 0x00e0, size 94208
  * 0x806c1: remove the new Tiger Lake update: causes hang on cold/warm boot
    https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/issues/44
    INTEL-SA-00381 AND INTEL-SA-00389 MITIGATIONS ARE THEREFORE NOT INSTALLED
    FOR 0x806c1 TIGER LAKE PROCESSORS by this package update.  Contact your
    system vendor for a firmware update, or wait fo a possible fix in a future
    Intel microcode release.
  * source: update symlinks to reflect id of the latest release, 20201110
  * source: ship new upstream documentation (security.md, releasenote.md)

Signed-off-by: Tan Zien <nabsdh9@gmail.com>
[used different .tar.xz source, but with the same content]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agomvebu: next backport mvnet MQPrio offload
Kabuli Chana [Thu, 2 Dec 2021 22:03:51 +0000 (15:03 -0700)]
mvebu: next backport mvnet MQPrio offload

linux-next MQPrio patches adding TC traffic shaping offload

Signed-off-by: Kabuli Chana <newtownBuild@gmail.com>
2 years agoath79: add Embedded Wireless Balin Platform
Catrinel Catrinescu [Thu, 2 Dec 2021 10:07:54 +0000 (10:07 +0000)]
ath79: add Embedded Wireless Balin Platform

Add the Embedded Wireless "Balin" platform, it is in ar71xx too
 SoC: QCA AR9344 or AR9350
 RAM: DDR2-RAM 64MBytes
 Flash: SPI-NOR 16MBytes
 WLAN: 2 x 2 MIMO 2.4 & 5 GHz IEEE802.11 a/b/g/n
 Ethernet: 3 x 10/100 Mb/s
 USB: 1 x USB2.0 Host/Device bootstrap-pin at power-up
 PCIe: MiniPCIe - 1 x lane PCIe 1.2
 Button: 1 x Reset-Button
 UART: 1 x Normal, 1 x High-Speed
 JTAG: 1 x EJTAG
 LED: 1 x Green Power/Status LED
 GPIO: 10 x Input/Output multiplexed

The module comes already with the current vanilla OpenWrt firmware.
To update, use "sysupgrade -n --force <image>" image directly in
vendor firmware. This resets the existing configurations back to
default!

Signed-off-by: Catrinel Catrinescu <cc@80211.de>
[indent, led function+color properties, fix partition unit-address,
re-enable pcie port, mention button+led in commit message]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoipq40xx: sysupgrade: drop disabled UBI to UBI logic
Bjørn Mork [Sat, 20 Mar 2021 10:48:27 +0000 (11:48 +0100)]
ipq40xx: sysupgrade: drop disabled UBI to UBI logic

The commented out code is not required, as the comment
indicates.

The purpose of this code seems to be to avoid issues caused
by partially overwriting an existing UBI partition, where some
of the erase counters would be reset but not the unmodified
ones.  This problem has been solved in a more generic way by
the UBI EOF marker. This ensures that any old PEBs after the
marker are properly initialized.  It is therefore unnecessary
to erase the whole partition before flashing a new OpenWrt
factory image.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2 years agoipq806x: sysupgrade: drop unnecessary UBI to UBI logic
Bjørn Mork [Sat, 20 Mar 2021 10:48:26 +0000 (11:48 +0100)]
ipq806x: sysupgrade: drop unnecessary UBI to UBI logic

The purpose of this code seems to be to avoid issues caused
by partially overwriting an existing UBI partition, where some
of the erase counters would be reset but not the unmodified
ones.  This problem has been solved in a more generic way by
the UBI EOF marker. This ensures that any old PEBs after the
marker are properly initialized.  It is therefore unnecessary
to erase the whole partition before flashing a new OpenWrt
factory image.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2 years agokirkwood: sysupgrade: drop unnecessary UBI to UBI logic
Bjørn Mork [Sat, 20 Mar 2021 10:48:25 +0000 (11:48 +0100)]
kirkwood: sysupgrade: drop unnecessary UBI to UBI logic

The purpose of this code seems to be to avoid issues caused
by partially overwriting an existing UBI partition, where some
of the erase counters would be reset but not the unmodified
ones.  This problem has been solved in a more generic way by
the UBI EOF marker. This ensures that any old PEBs after the
marker are properly initialized.  It is therefore unnecessary
to erase the whole partition before flashing a new OpenWrt
factory image.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2 years agomvebu: sysupgrade: drop unnecessary UBI to UBI logic
Bjørn Mork [Sat, 20 Mar 2021 10:48:24 +0000 (11:48 +0100)]
mvebu: sysupgrade: drop unnecessary UBI to UBI logic

The recent changes to the maximum kernel size for Mamba and Venom
highlighted the fact that the old Mamba kernel size has been
hardcoded in linksys_get_root_magic() even for devices with
a different kernel/rootfs split.

The purpose of this code seems to be to avoid issues caused
by partially overwriting an existing UBI partition, where some
of the erase counters would be reset but not the unmodified
ones.  This problem has been solved in a more generic way by
the UBI EOF marker. This ensures that any old PEBs after the
marker are properly initialized.  It is therefore unnecessary
to erase the whole partition before flashing a new OpenWrt
factory image.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2 years agomt76: update to the latest version
Felix Fietkau [Fri, 3 Dec 2021 09:56:17 +0000 (10:56 +0100)]
mt76: update to the latest version

71e08471ab56 mt76: eeprom: fix return code on corrected bit-flips
9a8fc6636d83 mt76: move sar_capa configuration in common code
7cdbea1dc82a mt76: only access ieee80211_hdr after mt76_insert_ccmp_hdr
678071ef7029 mt76: mt7615: clear mcu error interrupt status on mt7663

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomediatek: mt7623: switch to BPi-R2 to generic eMMC sysugprade
Daniel Golle [Wed, 1 Dec 2021 21:33:25 +0000 (21:33 +0000)]
mediatek: mt7623: switch to BPi-R2 to generic eMMC sysugprade

Make use of new functions in emmc.sh to implement sysupgrade on the
BananaPi BPi-R2.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomediatek: mt7622: switch to generic eMMC sysupgrade
Daniel Golle [Wed, 1 Dec 2021 21:32:27 +0000 (21:32 +0000)]
mediatek: mt7622: switch to generic eMMC sysupgrade

Use functions in newly introduced emmc.sh for sysupgrade of the
BananaPi BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoipq40xx: add support for GL.iNet GL-B2200
TruongSinh Tran-Nguyen [Wed, 1 Dec 2021 15:18:17 +0000 (16:18 +0100)]
ipq40xx: add support for GL.iNet GL-B2200

This patch adds supports for the GL-B2200 router.

Specifications:
  - SOC: Qualcomm IPQ4019 ARM Quad-Core
  - RAM: 512 MiB
  - Flash: 16 MiB NOR - SPI0
  - EMMC: 8GB EMMC
  - ETH: Qualcomm QCA8075
  - WLAN1: Qualcomm Atheros QCA4019 2.4GHz 802.11b/g/n 2x2
  - WLAN2: Qualcomm Atheros QCA4019 5GHz 802.11n/ac W2 2x2
  - WLAN3: Qualcomm Atheros QCA9886 5GHz 802.11n/ac W2 2x2
  - INPUT: Reset, WPS
  - LED: Power, Internet
  - UART1: On board pin header near to LED (3.3V, TX, RX, GND), 3.3V without pin - 115200 8N1
  - UART2: On board with BLE module
  - SPI1: On board socket for Zigbee module

Update firmware instructions:
Please update the firmware via U-Boot web UI (by default at 192.168.1.1, following instructions found at
https://docs.gl-inet.com/en/3/troubleshooting/debrick/).
Normal sysupgrade, either via CLI or LuCI, is not possible from stock firmware.
Please do use the *gl-b2200-squashfs-emmc.img file, gunzipping the produced *gl-b2200-squashfs-emmc.img.gz one first.

What's working:
- WiFi 2G, 5G
- WPA2/WPA3

Not tested:
- Bluetooth LE/Zigbee

Credits goes to the original authors of this patch.

V1->V2:
- updates *arm-boot-add-dts-files.patch correctly (sorry, my mistake)
- add uboot-envtools support
V2->V3:
- Li Zhang updated official patch to fix wrong MAC address on wlan0 (PCI) interface
V3->V4:
- wire up sysupgrade

Signed-off-by: Li Zhang <li.zhang@gl-inet.com>
[fix tab and trailing space, document what's working and what's not]
Signed-off-by: TruongSinh Tran-Nguyen <i@truongsinh.pro>
[rebase on top of master, address remaining comments]
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
[remove redundant check in platform.sh]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agobase-files: add eMMC sysupgrade support
Enrico Mioso [Wed, 1 Dec 2021 15:17:55 +0000 (16:17 +0100)]
base-files: add eMMC sysupgrade support

Adds generic support for sysupgrading on eMMC-based devices.

Provide function emmc_do_upgrade and emmc_copy_config to be used in
/lib/upgrade/platform.sh instead of redundantly implementing the same
logic over and over again.
Similar to generic sysupgrade on NAND, use environment variables
CI_KERNPART, CI_ROOTPART and newly introduce CI_DATAPART to indicate
GPT partition names to be used. On devices with more than one MMC
block device, CI_ROOTDEV can be used to specify the MMC device for
partition name lookups.

Also allow to select block devices directly using EMMC_KERN_DEV,
EMMC_ROOT_DEV and EMMC_DATA_DEV, as using GPT partition names is not
always an option (e.g. when forced to use MBR).

To easily handle writing kernel and rootfs make use of sysupgrade.tar
format convention which is also already used for generic NAND support.

Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
CC: Li Zhang <li.zhang@gl-inet.com>
CC: TruongSinh Tran-Nguyen <i@truongsinh.pro>
2 years agoipq40xx: add MikroTik LHGG-60ad outdoor 802.11ad (60GHz) dish
Alexander Couzens [Mon, 4 Jan 2021 23:22:00 +0000 (00:22 +0100)]
ipq40xx: add MikroTik LHGG-60ad outdoor 802.11ad (60GHz) dish

LHGG-60ad is IPQ4019 + wil6210 based.

Specification:

- Qualcomm IPQ4019 (717 MHz)
- 256 MB of RAM (DDR3L)
- 16 MB (SPI NOR) of flash
- 1x Gbit ethernet, 802.3af/at POE IN connected through AR8035.
- WLAN: wil6210 802.11ad PCI card
- No USB or SD card ports
- UART disabled
- 8x LEDs

Biggest news is the wil6210 PCI card.
Integration for its configuration and detection has already been taken
care of when adding support for TP-Link Talon AD7200.
However, signal quality is much lower than with stock firmware, so
probably additional board-specific data has to be provided to the
driver and is still missing at the moment.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[Fix Ethernet Interface]
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agotoolchain/gcc: fix build on MacOS arm64
Sergey V. Lobanov [Mon, 29 Nov 2021 16:09:10 +0000 (19:09 +0300)]
toolchain/gcc: fix build on MacOS arm64

Added patch for GCC to fix compilation issues on MacOS arm64

The original commit message from Przemysław Buczkowski:

GCC: Patch for Apple Silicon compatibility

This patch fixes a linker error occuring when compiling
the cross-compiler on macOS and ARM64 architecture.

Adapted from:
https://github.com/richfelker/musl-cross-make/issues/116#issuecomment-823612404

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2 years agotools/fakeroot: fix build on MacOS arm64
Sergey V. Lobanov [Mon, 29 Nov 2021 16:07:34 +0000 (19:07 +0300)]
tools/fakeroot: fix build on MacOS arm64

Added patch for MacOS without 32 bit inodes support
(__DARWIN_ONLY_64_BIT_INO_T is true)

This patch based on discussion https://github.com/archmac/bootstrap/issues/4

Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
2 years agomac80211: fix tx aggregation locking issue
Felix Fietkau [Thu, 2 Dec 2021 13:11:21 +0000 (14:11 +0100)]
mac80211: fix tx aggregation locking issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomac80211: fix queue assignment of aggregation start requests
Felix Fietkau [Thu, 2 Dec 2021 12:52:18 +0000 (13:52 +0100)]
mac80211: fix queue assignment of aggregation start requests

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomt76: update to the latest version
Felix Fietkau [Thu, 2 Dec 2021 10:26:36 +0000 (11:26 +0100)]
mt76: update to the latest version

a6451fea5a3d mt76: mt7615: improve wmm index allocation
1911486414dc mt76: mt7915: improve wmm index allocation
7998a41d1321 mt76: clear sta powersave flag after notifying driver
664475574438 mt76: mt7603: introduce SAR support
5c0da39c940b mt76: mt7915: introduce SAR support
77fc6c439a32 mt76: mt7603: improve reliability of tx powersave filtering
094b3d800835 firmware: update mt7663 rebb firmware to 20200904171623
25237b19bcc1 mt76: eeprom: tolerate corrected bit-flips
1463cb4c6ac2 mt76: mt7921: fix boolreturn.cocci warning
586bad6020f7 mt76: mt7921: use correct iftype data on 6GHz cap init
8ec95c910425 mt76: mt7921s: fix bus hang with wrong privilege
688e30c7d854 firmware: update mt7921 firmware to version 20211014
6fad970893dd mt76: fix key pointer overwrite in mt7921s_write_txwi/mt7663_usb_sdio_write_txwi
95acf972750c mt76: fix 802.3 RX fail by hdr_trans
3f402b0cf6c0 mt76: mt7921s: fix possible kernel crash due to invalid Rx count
929a03a8d65d mt76: connac: fix last_chan configuration in mt76_connac_mcu_rate_txpower_band

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agosunxi: update nanopi neo air that use brcmfmac43430a0
Michel Promonet [Sat, 13 Nov 2021 15:15:53 +0000 (16:15 +0100)]
sunxi: update nanopi neo air that use brcmfmac43430a0

Update wifi firmware used for nanopi neo air, with
cypress-firmware-43430-sdio there is no wifi detected, as
brcmfmac-firmware-43430a0-sdio allow to acces to wifi.

Signed-off-by: Michel Promonet <michel.promonet@free.fr>
2 years agobcm4908: sysupgrade: refactor handling different firmware formats
Rafał Miłecki [Mon, 29 Nov 2021 09:25:30 +0000 (10:25 +0100)]
bcm4908: sysupgrade: refactor handling different firmware formats

This results in setting format specific data (format info, extract
commands) in a single function. It should help maintaining sysupgrade
code.

This change has been tested on Asus GT-AC5300 and Netgear R8000P.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agobcm53xx: sysupgrade: refactor handling different firmware formats
Rafał Miłecki [Sun, 28 Nov 2021 10:54:19 +0000 (11:54 +0100)]
bcm53xx: sysupgrade: refactor handling different firmware formats

List of supported formats grew over time and implementation got a bit
messy. There are multiple functions with format-specific parameters and
commands.

Refactor it by making platform_identify() setup all required info right
after detecting firmware format. This simplifies formats handling in
platform_other_check_image() and platform_do_upgrade() a lot.

This has been tested on:
1. SmartRG SR400ac (TRX): non-NAND sysupgrade
2. Netgear R8000 (CHK): NAND aware and standard sysupgrade-s
3. D-Link DIR-885L (Seama): NAND aware and standard sysupgrade-s
4. Luxul XWR-3150 (LXL): NAND aware and standard sysupgrade-s

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agobcm53xx: sysupgrade: simplify extracting image from Seama seal
Rafał Miłecki [Fri, 26 Nov 2021 17:01:50 +0000 (18:01 +0100)]
bcm53xx: sysupgrade: simplify extracting image from Seama seal

Use "oseama extract" which supports now writing to stdout.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agofirmware-utils: bump to the latest master
Rafał Miłecki [Thu, 2 Dec 2021 08:14:09 +0000 (09:14 +0100)]
firmware-utils: bump to the latest master

56e8e19 otrx: support TRX from stdin when extracting
a37ccaf otrx: support unsorted partitions offsets
1fa145e otrx: extract shared code opening & parsing TRX format
0fbc135 oseama: support extracting entity to stdout
58c9d5d oseama: allow reading from stdin
4ecefda otrx: allow validating TRX from stdin
cf01e69 otrx: avoid unneeded fseek() when calculating CRC32
fa35379 tplink-safeloader: add EAP225 v1 support
f4d1263 build, cmake: switch OPENSSL_CRYPTO_LIBRARY -> OPENSSL_CRYPTO_LIBRARIES
cd3f6ee build, cmake: add quotes for FW_UTIL variable arguments

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agoca-certificates: fix python3-cryptography woes in certdata2pem.py
Christian Lamparter [Wed, 1 Dec 2021 14:01:23 +0000 (15:01 +0100)]
ca-certificates: fix python3-cryptography woes in certdata2pem.py

This patch is a revert of the upstream patch to Debian's ca-certificate
commit 033d52259172 ("mozilla/certdata2pem.py: print a warning for expired certificates.")

The reason is, that this change broke builds with the popular
Ubuntu 20.04 LTS (focal) releases which are shipping with an
older version of the python3-cryptography package that is not
compatible.

|Traceback (most recent call last):
|  File "certdata2pem.py", line 125, in <module>
|    cert = x509.load_der_x509_certificate(obj['CKA_VALUE'])
|TypeError: load_der_x509_certificate() missing 1 required positional argument: 'backend'
|make[5]: *** [Makefile:6: all] Error 1

...or if the python3-cryptography was missing all together:
|Traceback (most recent call last):
|  File "/certdata2pem.py", line 31, in <module>
|    from cryptography import x509
|ModuleNotFoundError: No module named 'cryptography'

More concerns were raised by Jo-Philipp Wich:
"We don't want the build to depend on the local system time anyway.
Right now it seems to be just a warning but I could imagine that
eventually certs are simply omitted of found to be expired at
build time which would break reproducibility."

Link: <https://github.com/openwrt/openwrt/commit/7c99085bd697>
Reported-by: Chen Minqiang <ptpt52@gmail.com>
Reported-by: Shane Synan <digitalcircuit36939@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agohostapd: make hostapd/supplicant/wpad packages depend on a specific version of hostap...
Felix Fietkau [Wed, 1 Dec 2021 15:38:35 +0000 (16:38 +0100)]
hostapd: make hostapd/supplicant/wpad packages depend on a specific version of hostapd-commoon

This avoids potential version mismatch between packages when upgraded
individually

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agoqosify: remove bulk flow detection from default ports
Felix Fietkau [Sun, 28 Nov 2021 10:46:11 +0000 (11:46 +0100)]
qosify: remove bulk flow detection from default ports

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agoqosify: add besteffort class and switch all default classifications to class names
Felix Fietkau [Sun, 28 Nov 2021 10:45:25 +0000 (11:45 +0100)]
qosify: add besteffort class and switch all default classifications to class names

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agonftables: bump to 1.0.1
Stijn Tintel [Thu, 25 Nov 2021 04:33:26 +0000 (06:33 +0200)]
nftables: bump to 1.0.1

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agolibnftnl: bump to 1.2.1
Stijn Tintel [Thu, 25 Nov 2021 04:32:18 +0000 (06:32 +0200)]
libnftnl: bump to 1.2.1

This version is required by nftables 1.0.1.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agolantiq: xway_legacy: disable unused switches
Aleksander Jan Bajkowski [Fri, 5 Nov 2021 19:28:07 +0000 (20:28 +0100)]
lantiq: xway_legacy: disable unused switches

The xway_legacy subtarget only supports 5 devices. Most compiled
switch drivers are unused by any of these devices. The same drivers
are compiled into the xway subtarget. They were probably copied
from there when creating this subtarget.

Switches used by devices:
Arcadyan ARV4518PWR01   Realtek RTL8306SD
Arcadyan ARV4518PWR01A  Realtek RTL8306SD
Arcadyan ARV4520PW      Infineon ADM6996I
Arcadyan ARV4525PW      only PHY(IC+ IP101A)
Arcadyan ARV452CQW      Realtek RTL8306

The CONFIG_ETHERNET_PACKET_MANGLE symbol has also been disabled,
as it is only needed by the driver for AR8216.

Reduces kernel size by 19.9 kB.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2 years agompc85xx: Fix HiveAP-330 nvmem mac loader
Martin Kennedy [Wed, 24 Nov 2021 00:07:14 +0000 (19:07 -0500)]
mpc85xx: Fix HiveAP-330 nvmem mac loader

We actually need to enclose the whole section of partitions in a
`partitions { ... }` to assign it a `compatible = "fixed-partitions";
otherwise the partition referred to by `hwinfo` won't be registered
when bringing up MTD partitions, for example as per:

- <https://forum.openwrt.org/t/tp-link-c2600-missing-default-mac-mtd-partition-in-snapshot/103945/6>

- commit e2b03c16eb44 ("ipq806x: add missing enclosing partitions block for TP-Link C2600")'

Fixes: 8ec21d6bb210 ("mpc85xx: convert mtd-mac-address to nvmem implementation")
Signed-off-by: Martin Kennedy <hurricos@gmail.com>
[minor beautification]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoca-certicficates: Update to version 20211016
Christian Lamparter [Sun, 28 Nov 2021 01:31:54 +0000 (02:31 +0100)]
ca-certicficates: Update to version 20211016

Update the ca-certificates and ca-bundle package from version 20210119 to
version 20211016.

Debian change-log entry [1]:
|[...]
|[ Julien Cristau ]
|* mozilla/{certdata.txt,nssckbi.h}: Update Mozilla certificate authority
|    bundle to version 2.50
|    The following certificate authorities were added (+):
|    + "AC RAIZ FNMT-RCM SERVIDORES SEGUROS"
|    + "GlobalSign Root R46"
|    + "GlobalSign Root E46"
|    + "GLOBALTRUST 2020"
|    + "ANF Secure Server Root CA"
|    + "Certum EC-384 CA"
|    + "Certum Trusted Root CA"
|    The following certificate authorities were removed (-):
|    - "QuoVadis Root CA"
|    - "Sonera Class 2 Root CA"
|    - "GeoTrust Primary Certification Authority - G2"
|    - "VeriSign Universal Root Certification Authority"
|    - "Chambers of Commerce Root - 2008"
|    - "Global Chambersign Root - 2008"
|    - "Trustis FPS Root CA"
|    - "Staat der Nederlanden Root CA - G3"
|  * Blacklist expired root certificate "DST Root CA X3" (closes: #995432)
|[...]

[1] <https://metadata.ftp-master.debian.org/changelogs//main/c/ca-certificates/ca-certificates_20211016_changelog>

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agonftables: install package file
Kevin Darbyshire-Bryant [Mon, 29 Nov 2021 20:30:42 +0000 (20:30 +0000)]
nftables: install package file

Install pc file so dnsmasq can find libnftables

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2 years agobcm4908: Deactivate pci feature
Hauke Mehrtens [Sun, 14 Nov 2021 22:52:17 +0000 (23:52 +0100)]
bcm4908: Deactivate pci feature

This target does not activate CONFIG_PCI kernel configuration option, do
not activate the PCI feature. This will deactivate some PCI drivers
which are not building without PCI support in the kernel.

If PCI_SUPPORT or PCIE_SUPPORT are activated in the kernel configuration
the feature flag will be automatically set by the build system again.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agokernel: Deactivate B53 symbols in generic configuration
Hauke Mehrtens [Sun, 14 Nov 2021 22:52:16 +0000 (23:52 +0100)]
kernel: Deactivate B53 symbols in generic configuration

Deactivate all the symbols of the B53 DSA driver in the generic kernel
configuration. Multiple targets are now using this drivers and they
only need some of the options.
This fixes the bcm4908 build which didn't deactivate all of the options.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agosunxi: remove kmod-rtc-sunxi for unsupported devices
Chukun Pan [Sat, 6 Nov 2021 04:01:36 +0000 (12:01 +0800)]
sunxi: remove kmod-rtc-sunxi for unsupported devices

From driver source:

{ .compatible = "allwinner,sun4i-a10-rtc", .data =
&data_year_param[0] },
{ .compatible = "allwinner,sun7i-a20-rtc", .data =
&data_year_param[1] },

The rtc-sunxi module only supports allwinner a10 and a20 SoCs,
other SoCs in the cortexa7 and cortexa53 subtarget using the
CONFIG_RTC_DRV_SUN6I driver which is compiled into the kernel
binary, so remove this package for these unsupported devices.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2 years agomac80211: fixed missing cfg80211 dependency on kmod-rfkill
Oldřich Jedlička [Sun, 7 Nov 2021 19:30:25 +0000 (20:30 +0100)]
mac80211: fixed missing cfg80211 dependency on kmod-rfkill

When compiling with CONFIG_USE_RFKILL=y, the build fails and mentions that
dependency on kmod-rfkill is missing, which is correct [1]. Add this
dependency to the Makefile.

Depend on +USE_RFKILL and not PACKAGE_kmod-rfkill, because it forces
selection of kmod-rfkill package. Other combinations in DEPENDS like
USE_RFKILL:kmod-rfkill or (+)PACKAGE_kmod-rfkill:kmod-rfkill do not force
selection of kmod-rfkill package.

The kmod-rfkill package itself depends on USE_RFKILL, so with +USE_RFKILL
in kmod-cfg80211 package it is not possible to select wrong combination of
packages.

[1] https://linux-wireless.vger.kernel.narkive.com/m8JY9Iks/cfg80211-depends-on-rfkill-or-not

Signed-off-by: Oldřich Jedlička <oldium.pro@gmail.com>
2 years agoath10k-ct: Fix spectral scan NULL pointer
Robert Marko [Mon, 29 Nov 2021 11:46:54 +0000 (12:46 +0100)]
ath10k-ct: Fix spectral scan NULL pointer

If spectral scan support is enabled then ath10k-ct will cause a NULL
pointer due to relay_open() being called with a const callback struct
which is only supported in kernel 5.11 and later.

So, simply check the kernel version and if 5.11 and newer use the const
callback struct, otherwise use the regular struct.

Fixes: 553a3ac ("ath10k-ct: use 5.15 version")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 years agorealtek: netgear-gigabit: Add gpio-restart node
Sander Vanheule [Thu, 25 Nov 2021 05:41:59 +0000 (06:41 +0100)]
realtek: netgear-gigabit: Add gpio-restart node

The Netgear GS110TPP v1 switch cannot reliably perform cold reboots
using the system's internal reset controller.

On this device, and the other supported Netgear switches, internal GPIO
line 13 is connected to the system's hard reset logic. Expose this GPIO
on all systems to ensure restarts work properly.

Cc: Raylynn Knight <rayknight@me.com>
Cc: Michael Mohr <akihana@gmail.com>
Cc: Stijn Segers <foss@volatilesystems.org>
Cc: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Bjørn Mork <bjorn@mork.no>
2 years agorealtek: Enable gpio-restart driver
Sander Vanheule [Thu, 25 Nov 2021 05:41:58 +0000 (06:41 +0100)]
realtek: Enable gpio-restart driver

Add the gpio-restart driver to the realtek build. This way devices,
which cannot reliably perform resets using the SoC's internal reset
logic, can use a GPIO line to drive the SoC's hard reset input.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agorealtek: add missing GPIO irq properties
Sander Vanheule [Thu, 25 Nov 2021 05:40:07 +0000 (06:40 +0100)]
realtek: add missing GPIO irq properties

The internal GPIO controller on RTL838x is also an IRQ controller, which
requires the 'interrupt-controller' and '#interrupts-cells' properties
to be present in the device tree.

Reported-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agorealtek: use full range of assigned MAC addresses
Bjørn Mork [Mon, 12 Apr 2021 12:27:25 +0000 (14:27 +0200)]
realtek: use full range of assigned MAC addresses

Some devices are assigned globally unique MAC addresses for all
ports. These are stored by U-Boot in the second U-Boot enviroment
("sysinfo") as a range of start and end address.

Use the full range if provided.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
2 years agorealtek: revert to "standard" management configuration
Bjørn Mork [Mon, 12 Apr 2021 12:27:23 +0000 (14:27 +0200)]
realtek: revert to "standard" management configuration

The default management interface should be easy to find for users
doing "blind" installations without console access.  There are
already multiple examples in the forum of advanced early adopters
having problems locating the management interface after installing
OpenWrt.

Requiring tagged VLAN configration to access the initial management
interface creates unnecessary hassle at best. Errors on the other
end are close to impossible to debug without console access, even
for advanced users.  Less advanced users might have problems with
the concept of VLAN tagging.

Limiting management access to a single arbitrary port among up to
52 possible LAN ports makes this even more difficult, for no
reason at all. Users might have reasons to use a different port
for management.  And they might even have difficulties using the
OpenWrt selected one. The port might be the wrong type for their
management link (e.g copper instead of fibre).  Or they might
depend on PoE power from a device which they can't reconfigure.

User expectations will be based on
- OpenWrt defaults for other devices
- stock firmware default for the device in question
- common default behaviour of similar devices

All 3 cases point to a static IP address accessible on the native
VLAN of any LAN port.  A switch does not have any WAN port.  All
ports are LAN ports.

This changes the default network configuration in line with these
expectations.

Cc: John Crispin <john@phrozen.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agouboot-omap: Remove omap3_overo configuration
Hauke Mehrtens [Sun, 28 Nov 2021 21:23:47 +0000 (22:23 +0100)]
uboot-omap: Remove omap3_overo configuration

The configs/omap3_overo_defconfig file was removed from upstream U-Boot
in commit ed3294d6d1f9 ("arm: Remove overo board"). Remove it in OpenWrt
too. If someone needs this please add it also to upstream U-Boot.

This fixes the compile of the omap target.

Fixes: ffb807ec90d3 ("omap: update u-boot to 2021.07")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoimage: fix CONFIG_EXTERNAL_CPIO handling
Daniel Golle [Sat, 27 Nov 2021 12:02:05 +0000 (12:02 +0000)]
image: fix CONFIG_EXTERNAL_CPIO handling

CONFIG_EXTERNAL_CPIO is a string variable, hence testing for 'y'
doesn't make much sense here.

Fixes: 330bd380e8 ("image: allow building FIT and uImage with ramdisk")
Reported-by: Huangbin Zhan <zhanhb88@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agokernel: Add extra kernel configuration options for omap
Hauke Mehrtens [Sun, 28 Nov 2021 18:12:53 +0000 (19:12 +0100)]
kernel: Add extra kernel configuration options for omap

This fixes the build on omap.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoipq40xx: Add support for Teltonika RUTX10
Felix Matouschek [Thu, 15 Jul 2021 19:48:11 +0000 (21:48 +0200)]
ipq40xx: Add support for Teltonika RUTX10

This patch adds support for the Teltonika RUTX10.
This device is an industrial DIN-rail router with 4 ethernet ports,
2.4G/5G dualband WiFi, Bluetooth, a USB 2.0 port and two GPIOs.

The RUTX series devices are very similiar so common parts of the DTS
are kept in a DTSI file. They are based on the QCA AP-DK01.1-C1 dev
board.

See https://teltonika-networks.com/product/rutx10 for more info.

Hardware:
  SoC:                 Qualcomm IPQ4018
  RAM:                 256MB DDR3
  SPI Flash 1:         XTX XT25F128B (16MB, NOR)
  SPI Flash 2:         XTX XT26G02AWS (256MB, NAND)
  Ethernet:            Built-in IPQ4018 (SoC, QCA8075), 4x 10/100/1000 ports
  WiFi 1:              Qualcomm QCA4019 IEEE 802.11b/g/n
  Wifi 2:              Qualcomm QCA4019 IEEE 802.11a/n/ac
  USB Hub:             Genesys Logic GL852GT
  Bluetooth:           Qualcomm CSR8510 (A10U)
  LED/GPIO controller: STM32F030 with custom firmware
  Buttons:             Reset button
  Leds:                Power (green, cannot be controlled)
                       WiFi 2.4G activity (green)
                       WiFi 5G activity (green)

MACs Details verified with the stock firmware:
   eth0:             Partition 0:CONFIG Offset: 0x0
   eth1:             = eth0 + 1
   radio0 (2.4 GHz): = eth0 + 2
   radio1 (5.0 GHz): = eth0 + 3
Label MAC address is from eth0.

The LED/GPIO controller needs a separate kernel driver to function.
The driver was extracted from the Teltonika GPL sources and can be
found at following feed: https://github.com/0xFelix/teltonika-rutx-openwrt

USB detection of the bluetooth interface is sometimes a bit flaky. When
not detected power cycle the device. When the bluetooth interface was
detected properly it can be used with bluez / bluetoothctl.

Flash instructions via stock web interface (sysupgrade based):
  1. Set PC to fixed ip address 192.168.1.100
  2. Push reset button and power on the device
  3. Open u-boot HTTP recovery at http://192.168.1.1
  4. Upload latest stock firmware and wait until the device is rebooted
  5. Open stock web interface at http://192.168.1.1
  6. Set some password so the web interface is happy
  7. Go to firmware upgrade settings
  8. Choose
     openwrt-ipq40xx-generic-teltonika_rutx10-squashfs-nand-factory.ubi
  9. Set 'Keep settings' to off
  10. Click update, when warned that it is not a signed image proceed

Return to stock firmware:
  1. Set PC to fixed ip address 192.168.1.100
  2. Push reset button and power on the device
  3. Open u-boot HTTP recovery at http://192.168.1.1
  4. Upload latest stock firmware and wait until the device is rebooted

Note: The DTS expects OpenWrt to be running from the second rootfs
partition. u-boot on these devices hot-patches the DTS so running from the
first rootfs partition should also be possible. If you want to be save follow
the instructions above. u-boot HTTP recovery restores the device so that when
flashing OpenWrt from stock firmware it is flashed to the second rootfs
partition and the DTS matches.

Signed-off-by: Felix Matouschek <felix@matouschek.org>
2 years agoipq806x: add support for Cisco Meraki MR42/MR52
Matthew Hagan [Sun, 9 May 2021 22:28:04 +0000 (23:28 +0100)]
ipq806x: add support for Cisco Meraki MR42/MR52

The MR42 and MR52 are two similar IPQ806x based devices from the Cisco
Meraki "Cryptid" series.

  MR42 main features:
  -  IPQ8068 1.4GHz
  -  512MB RAM
  -  128MB NAND
  -  2x QCA9992 (2.4 & 5GHz)
  -  1x QCA9889 (2.4 & 5GHz)
  -  1x AR8033 PHY
  -  PoE/AC power

  MR52 main features:
  -  IPQ8068 1.4GHz
  -  512MB RAM
  -  128MB NAND
  -  2x QCA9994 (2.4 & 5GHz)
  -  1x QCA9889 (2.4 & 5GHz)
  -  2x AR8033 PHYs
  -  PoE/AC power

(MR42 Only) Installation via diagnostic mode:

If you can successfully complete step 1 then you can continue to install
via this method without having to open the device. Otherwise please use
the standard UART method. Please note that when booting via TFTP, some
Ethernet devices, in particular those on laptops, will not connect in
time, resulting in TFTP boot not succeeding. In this instance it is
advised to connect via a switch.

  1. Hold down reset at power on and keep holding, after around 10 seconds
     if the orange LED changes behaviour to begin flashing, proceed to
     release reset, then press reset two times. Ensure that the LED has
     turned blue. Note that flashing will occur on some devices, but it
     will not be possible to change the LED colour using the reset button.
     In this case it will still be possible to continue with this install
     method.

  2. Set your IP to 192.168.1.250. Set up a TFTP server serving
     mr42_u-boot.mbn and
     openwrt-ipq806x-generic-meraki_mr42-initramfs-fit-uImage.itb, obtained
     from [1].

  3. Use telnet and connect to 192.168.1.1. Run the following commands to
     install u-boot. Note that all these commands are critical, an error
     will likely render the device unusable.

     Option 3.1:
       If you are sure you have set up the TFTP server correctly you can
       run this script on the device. This will download and flash the
       u-boot image immediately:

       `/etc/update_uboot.sh 192.168.1.250 mr42_u-boot.mbn`

       Once completed successfully, power off the device.

     Option 3.2:
       If you are unsure the TFTP server is correctly set up you can
       obtain the image and flash manually:

       3.2.1. `cd /tmp`
       3.2.2. `tftp-hpa 192.168.1.250 -m binary -c get mr42_u-boot.mbn`
       3.2.3. Confirm file has downloaded correctly by comparing the
              md5sum:

            `md5sum mr42_u-boot.mbn`

       3.2.4. The following are the required commands to write the image.

            `echo 1 > /sys/devices/platform/msm_nand/boot_layout
             mtd erase /dev/mtd1
             nandwrite -pam /dev/mtd1 mr42_u-boot.mbn
             echo 0 > /sys/devices/platform/msm_nand/boot_layout`

          Important: You must observe the output of the `nandwrite`
          command. Look for the following to verify writing is occurring:

            `Writing data to block 0 at offset 0x0
             Writing data to block 1 at offset 0x20000
             Writing data to block 2 at offset 0x40000`

          If you do not see this then do not power off the device. Check
          your previous commands and that mr42_u-boot.mbn was downloaded
          correctly. Once you are sure the image has been written you
          can proceed to power off the device.

  4. Hold the reset button and power on the device. This will immediately
     begin downloading the appropriate initramfs image and boot into it.

     Note: If the device does not download the initramfs, this is likely
     due to the interface not being brought up in time. Changing Ethernet
     source to a router or switch will likely resolve this. You can also
     try manually setting the link speed to 10Mb/s Half-Duplex.

  5. Once a solid white LED is displayed on the device, continue to the
     UART installation method, step 6.

Standard installation via UART - MR42 & MR52

  1. Disassemble the device and connect a UART header. The header pinout
     is as follows:

       1 - 3.3v
       2 - TXD
       3 - RXD
       4 - GND

     Important: You should only connect TXD, RXD and GND. Connecting
     3.3v may damage the device.

  2. Set your IP to 192.168.1.250. Set up a TFTP server serving
     openwrt-ipq806x-generic-meraki_(mr42|mr52)-initramfs-fit-uImage.itb.
     Separately obtain the respective sysupgrade image.

  3. Run the following commands, preferably from a Linux host. The
     mentioned files, including ubootwrite.py and u-boot images, can be
     obtained from [1].

       `python ubootwrite.py --write=(mr42|mr52)_u-boot.bin`

     The default for "--serial" option is /dev/ttyUSB0.

  4. Power on the device. The ubootwrite script will upload the image to
     the device and launch it. The second stage u-boot will in turn load
     the initramfs image by TFTP, provided the TFTP server is running
     correctly. This process will take about 13 minutes. Once a solid
     white LED is displayed, the image has successfully finished
     loading. Note: If the image does not load via TFTP, try again with
     the Ethernet link to 10Mb/s Half-Duplex.

  5. (MR42 only) Do not connect over the network. Instead connect over
     the UART using minicom or similar tool. To replace u-boot with
     the network enabled version, please run the following commands.
     Note that in the provided initramfs images, the u-boot.mbn file
     is located in /root:

     If you have not used the provided initramfs, you must ensure you
     are using an image with "boot_layout" ECC configuration enabled in
     the Kernel. This will be version 5.10 or higher. If you do not do
     this correctly the device will be bricked.

       `insmod mtd-rw i_want_a_brick=1
        mtd erase /dev/mtd8
        nandwrite -pam /dev/mtd8 /root/mr42_u-boot.mbn`

     After running nandwrite, ensure you observe the following output:

       `Writing data to block 0 at offset 0x0
        Writing data to block 1 at offset 0x20000
        Writing data to block 2 at offset 0x40000`

  6. (Optional) If you have no further use for the Meraki OS, you can
     remove all other UBI volumes on ubi0 (mtd11), including diagnostic1,
     part.old, storage and part.safe. You must not remove the ubi1 ART
     partition (mtd12).

       `for i in diagnostic1 part.old storage part.safe ; do
        ubirmvol /dev/ubi0 -N $i
        done`

  7. Proceed to flash the sysupgrade image via luci, or else download or
     scp the image to /tmp and use the sysupgrade command.

[1] The mentioned images and ubootwrite.py script can be found in this repo:
    https://github.com/clayface/openwrt-cryptid

[2] The modified u-boot sources for the MR42 and MR52 are available:
    https://github.com/clayface/U-boot-MR52-20200629

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2 years agoipq806x: add gsbi2_i2c label
Matthew Hagan [Thu, 13 May 2021 22:15:27 +0000 (23:15 +0100)]
ipq806x: add gsbi2_i2c label

gsbi2_i2c is used by the Meraki MR42 so we need to expose a label here.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2 years agoipq806x: backport GMAC_AHB_RESET deassert patches
Matthew Hagan [Thu, 13 May 2021 20:49:43 +0000 (21:49 +0100)]
ipq806x: backport GMAC_AHB_RESET deassert patches

Add backports of the following patches:
"net: stmmac: explicitly deassert GMAC_AHB_RESET" and
"ARM: dts: qcom: add ahb reset to ipq806x-gmac"
Required for Meraki MR42/MR52.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2 years agoipq806x: add GSBI nodes to ipq8064-dtsi-addidions
Matthew Hagan [Thu, 20 May 2021 19:55:06 +0000 (20:55 +0100)]
ipq806x: add GSBI nodes to ipq8064-dtsi-addidions

Rather than having separate patches for each GSBI node added, this patch
consolidates the existing GSBI1 patch into
083-ipq8064-dtsi-additions.patch. In addition, GSBI6 and GSBI7 I2C nodes,
required for the MR42 and MR52 respectively, are added.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2 years agokernel: add back kmod-leds-tlc591xx
Matthew Hagan [Thu, 13 May 2021 18:29:45 +0000 (19:29 +0100)]
kernel: add back kmod-leds-tlc591xx

Add back support for the TLC591xx series LEDs which are used in the
ipq806x-based Meraki Cryptid series devices.

This module previously existed for the mvebu platform but was removed
at commit f849c2c83247340d623fdb549e2b75f4c1feea62 due to being enabled
in that platform's kernel config.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
2 years agoipq40xx: add support for MikroTik hAP ac3
Robert Marko [Sat, 9 Oct 2021 18:13:25 +0000 (20:13 +0200)]
ipq40xx: add support for MikroTik hAP ac3

This adds support for the MikroTik RouterBOARD RBD53iG-5HacD2HnD
(hAP ac³), a  indoor dual band, dual-radio 802.11ac
wireless AP with external omnidirectional antennae, USB port, five
10/100/1000 Mbps Ethernet ports and PoE passthrough.

See https://mikrotik.com/product/hap_ac3 for more info.

Specifications:
 - SoC: Qualcomm Atheros IPQ4019
 - RAM: 256 MB
 - Storage: 16 MB NOR + 128 MB NAND
 - Wireless:
   · Built-in IPQ4019 (SoC) 802.11b/g/n 2x2:2, 3 dBi antennae
   · Built-in IPQ4019 (SoC) 802.11a/n/ac 2x2:2, 5.5 dBi antennae
 - Ethernet: Built-in IPQ4019 (SoC, QCA8075) , 5x 1000/100/10 port,
             passive PoE in, PoE passtrough on port 5
- 1x USB Type A port

Installation:
1. Boot the initramfs image via TFTP
2. Run "cat /proc/mtd" and look for "ubi" partition mtd device number, ex. "mtd1"
3. Use ubiformat to remove MikroTik specific UBI volumes
* Detach the UBI partition by running: "ubidetach -d 0"
* Format the partition by running: "ubiformat /dev/mtdN -y"
Replace mtdN with the correct mtd index from step 2.
3. Flash the sysupgrade image using "sysupgrade -n"

Signed-off-by: Robert Marko <robimarko@gmail.com>
Tested-by: Mark Birss <markbirss@gmail.com>
Tested-by: Michael Büchler <michael.buechler@posteo.net>
Tested-by: Alex Tomkins <tomkins@darkzone.net>
2 years agobase-files: dont always create kernel UBI volume
Robert Marko [Mon, 20 Sep 2021 17:13:43 +0000 (19:13 +0200)]
base-files: dont always create kernel UBI volume

Currently nand_upgrade_tar() will pass the kernel length
to nand_upgrade_prepare_ubi() in all cases except for when
the kernel is to be installed in a separate partition as a
binary with the MTD tool.

While this is fine for almost all cases newer MikroTik NAND
devices like hAP ac3 require the kernel to be installed as a
UBIFS packed UBI volume in its own partition.

So, since we have a custom recipe to use ubiformat to flash
the kernel in its partition it makes no sense for sysupgrade
to also install the kernel as a UBI volume in the "ubi"
partition as it only wastes space and will never be used.

So, simply check whether CI_KERNPART is set to "none" and
if so unset the "has_kernel" variable which will in turn
prevent the kernel length from being passed on and then
the kernel UBI volume wont be created for no usefull purpose.

The ath79 MikroTik NAND target has been setting CI_KERNPART
to "none" for a while now altough that was not preventing
the kernel to be installed as UBI volume as well.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2 years agobuild: image: add command to ubinize the kernel image
Robert Marko [Mon, 20 Sep 2021 10:19:37 +0000 (12:19 +0200)]
build: image: add command to ubinize the kernel image

Newer NAND devices from MikroTik like the hAP ac3
require the kernel to be packed into UBIFS and then
ubinized.

So, since the ubinize-image.sh script can now ubinize
kernel only as well lets add a command for it.

This now allows calling ubinize-kernel in the kernel
packaging at then end.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2 years agobuild: image: explicitly pass --rootfs to append-ubi
Robert Marko [Mon, 20 Sep 2021 10:16:42 +0000 (12:16 +0200)]
build: image: explicitly pass --rootfs to append-ubi

Rootfs is now optional in ubinize-image.sh and
requires --rootfs flag instead of just passing the
rootfs image as the argument before ubinize opts.

So, simply add --rootfs flag before the $(IMAGE_ROOTFS).

Signed-off-by: Robert Marko <robimarko@gmail.com>
2 years agoscripts: ubinize-image: make rootfs optional
Robert Marko [Mon, 20 Sep 2021 10:10:07 +0000 (12:10 +0200)]
scripts: ubinize-image: make rootfs optional

Currently ubinize-image script always expects the
rootfs image to be passed and a volume for it created.

So, to allow only ubinizing a kernel for example which
the MikroTik hAP ac3 and other new NAND devices from
MikroTik require make rootfs an optional parameter like
kernel.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2 years agobuild: image: add UBIFS kernel packer
Robert Marko [Sun, 18 Apr 2021 17:05:47 +0000 (19:05 +0200)]
build: image: add UBIFS kernel packer

This allows packing the kernel into UBIFS like newer
MikroTik NAND devices require.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2 years agokernel: bump 5.4 to 5.4.162
John Audia [Sat, 27 Nov 2021 20:40:46 +0000 (15:40 -0500)]
kernel: bump 5.4 to 5.4.162

All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/mt7621*

*I am hit with the binutils 2.37 bug so I had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e
in order to downgrade to 2.35.1

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agokernel: bump 5.4 to 5.4.161
John Audia [Sat, 27 Nov 2021 19:56:33 +0000 (14:56 -0500)]
kernel: bump 5.4 to 5.4.161

Removed upstreamed:
    ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch[1]

Manually rebased:
    layerscape/patches-5.4/804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch
    octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch

All other patches automatically rebased.

1. Private email exchange with patch author, Hauke Mehrtens

Signed-off-by: John Audia <graysky@archlinux.us>
2 years agoath10k-ct: update version to fix DFS for VHT160
Hannu Nyman [Sat, 27 Nov 2021 23:09:35 +0000 (01:09 +0200)]
ath10k-ct: update version to fix DFS for VHT160

Update ath10k-ct to get the upstream fix for
DFS support for VHT160 in the 5.15 based ath10k-ct.
(Switch from 5.10 to 5.15 surfaced the upstream regression.)

* refresh one patch

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2 years agogemini: try fis-index-block with 128 KiB sectors
Christian Lamparter [Thu, 25 Nov 2021 20:32:25 +0000 (21:32 +0100)]
gemini: try fis-index-block with 128 KiB sectors

Steven Maddox reported in the OpenWrt bugzilla, that his
RaidSonic IB-NAS4220-B was no longer booting with the new
OpenWrt 21.02 (uses linux 5.10's device-tree). However, it was
working with the previous OpenWrt 19.07 series (uses 4.14).

(This is still under investigation.)

Bugzilla: https://bugs.openwrt.org/index.php?do=details&task_id=4137
Reported-by: Steven Maddox <s.maddox@lantizia.me.uk>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoipq40xx: utilize nvmem on Netgear EX61X0 v2 Series
Christian Lamparter [Fri, 15 Oct 2021 17:17:42 +0000 (19:17 +0200)]
ipq40xx: utilize nvmem on Netgear EX61X0 v2 Series

the Netgear EX6100v2 and EX6150v2 can utilize the nvmem
for the pre-calibration and mac-address for both WIFI
devices.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: convert TP-Link Archer C7v1/2 Wifis to nvmem-cells
Christian Lamparter [Sat, 16 Oct 2021 19:28:52 +0000 (21:28 +0200)]
ath79: convert TP-Link Archer C7v1/2 Wifis to nvmem-cells

For v2, both ath9k (2.4GHz Wifi) and ath10k (5 GHz) driver now
pull the (pre-)calibration data from the nvmem subsystem. v1
is slightly different as only the ath9k Wifi is supported.

This allows us to move the userspace caldata extraction
and mac-address patching for the 5GHZ ath10k supported
wifi into the device-tree definition of the device.

ath9k's nodes are also changed over to use nvmem-cells
over OpenWrt's custom mtd-cal-data property.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath10k: support nvmem-cells for (pre-)calibration
Christian Lamparter [Fri, 15 Oct 2021 17:17:42 +0000 (19:17 +0200)]
ath10k: support nvmem-cells for (pre-)calibration

refreshes mac80211 + ath10k-ct patches.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agompc85xx: backport "fix oops when CONFIG_FSL_PMC=n"
Christian Lamparter [Fri, 26 Nov 2021 08:35:45 +0000 (09:35 +0100)]
mpc85xx: backport "fix oops when CONFIG_FSL_PMC=n"

Martin Kennedy reported:
|Presently, I get this kernel panic on mpc85xx (Aerohive HiveAP 370)
|on OpenWrt 'master' which occurs right as the second processor is
|initialized:
|
|[    0.478804] rcu: Hierarchical SRCU implementation.
|[    0.535569] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
|[    0.627233] smp: Bringing up secondary CPUs ...
|[    0.681659] kernel tried to execute user page (0) - exploit attempt? (uid: 0)
|[    0.766618] BUG: Unable to handle kernel instruction fetch (NULL pointer?)
|[    0.848899] Faulting instruction address: 0x00000000
|[    0.908273] Oops: Kernel access of bad area, sig: 11 [#1]
|[    0.972851] BE PAGE_SIZE=4K SMP NR_CPUS=2 P1020 RDB
|[    1.031179] Modules linked in:
|[    1.067640] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.10.80 #0
|[    1.139507] NIP:  00000000 LR: c0021d2c CTR: 00000000
|[    1.199921] REGS: c1051cf0 TRAP: 0400   Not tainted  (5.10.80)
|[...]
|[    1.758220] NIP [00000000] 0x0
|[    1.794688] LR [c0021d2c] smp_85xx_kick_cpu+0xe8/0x568
|[    1.856126] Call Trace:
|[    1.885295] [c1051da8] [c0021cb8] smp_85xx_kick_cpu+0x74/0x568 (unreliable)
|[    1.968633] [c1051de8] [c0011460] __cpu_up+0xc0/0x228
|[    2.029038] [c1051e18] [c0031bbc] bringup_cpu+0x30/0x224
|[    2.092572] [c1051e48] [c0031f3c] cpu_up.constprop.0+0x180/0x33c
|[..]
|[    2.727952] ---[ end trace 9b796a4bafb6bc14 ]---
|[    3.800879] Kernel panic - not syncing: Fatal exception
|[    3.862353] Rebooting in 1 seconds..
|[    5.905097] System Halted, OK to turn off power
|
|I bisected this down to commit 3ae5da5adce9 ("kernel: bump 5.10 to 5.10.80");
|that is, I don't get the panic right before this commit, but I do after.

He reported the issue upstream and Xiaoming Ni from huawei came up with
the patch (that is on it's way to upstream). While the AP370 is not in
Openwrt, this will likely affect other SMP P1020 devices OpenWrt ships
with: like the AP330, Enterasys WS-AP3710i, etc.

Reported-by: Martin Kennedy <hurricos@gmail.com>
Tested-by: Martin Kennedy <hurricos@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoipq40xx: purge clk_ignore_unused bootarg
Christian Lamparter [Wed, 17 Nov 2021 10:53:46 +0000 (11:53 +0100)]
ipq40xx: purge clk_ignore_unused bootarg

these flags have been creeping in from the QSDK.
All needed clocks should be accounted for, and
if a device is broken due to this. It should be
looked into.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoipq40xx: update 105-ipq40xx-fix-sleep-clock.patch
Christian Lamparter [Sun, 21 Nov 2021 10:45:46 +0000 (11:45 +0100)]
ipq40xx: update 105-ipq40xx-fix-sleep-clock.patch

Bjorn Anderson has suggestions which would help to upstream the patch.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agouboot-lantiq: danube: fix hanging lzma kernel uncompression #2
Mathias Kresin [Sat, 27 Nov 2021 20:43:40 +0000 (21:43 +0100)]
uboot-lantiq: danube: fix hanging lzma kernel uncompression #2

Follow up to commit 565b62cca2fc7d27f1f1584c44830a6e5c4f0f61. Managed to
hit the very same issue again while playing with the NOR SPL builds.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2 years agolantiq: set maximum kernel size for P2812HNUF3
Mathias Kresin [Sat, 27 Nov 2021 16:28:19 +0000 (17:28 +0100)]
lantiq: set maximum kernel size for P2812HNUF3

The board has a fixed size kernel partition but do not limit the kernel
size during image building.

Disable image building for both boards as well, since the kernel of the
last release as well as master are to big to fit into the 2 MByte kernel
partition.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2 years agolantiq: drop kernel 5.4 support
Aleksander Jan Bajkowski [Sat, 11 Sep 2021 21:24:35 +0000 (23:24 +0200)]
lantiq: drop kernel 5.4 support

The current state of the kernel 5.4 support is in the openwrt-21.02
branch. No need to keep a not default used kernel in this branch.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [VRX268/ bthub5]
2 years agolantiq: switch to kernel 5.10
Aleksander Jan Bajkowski [Tue, 17 Aug 2021 18:55:41 +0000 (20:55 +0200)]
lantiq: switch to kernel 5.10

Use kernel 5.10 by default.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [VRX268/ bthub5]
2 years agolantiq: ar7: use okli loader for FRITZ!Box
Mathias Kresin [Sun, 14 Nov 2021 20:53:45 +0000 (21:53 +0100)]
lantiq: ar7: use okli loader for FRITZ!Box

With Kernel 5.10 the ar7 FRITZ!Box are not booting the initramfs nor the
sysupgrade image any more. Presumably due to the grown kernel.

Use the okli preloader to workaround the bootloader issue. No solution
so far for the initramfs.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2 years agolantiq: bring back okli loader
Mathias Kresin [Sat, 13 Nov 2021 13:55:13 +0000 (14:55 +0100)]
lantiq: bring back okli loader

Removed due to being unused with 1f7a03a70603, but now required for the
ar7 FRITZ!Box.

Could be used for the ARV7519RW22 as well, for which the image
generation was disabled due to a stock u-boot issue with kernel bigger
than 2 MByte.

The code is combination of the ath79 and ramips okli loader.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2 years agouboot-mvebu: update to v2021.10
Andre Heider [Tue, 12 Oct 2021 11:16:20 +0000 (13:16 +0200)]
uboot-mvebu: update to v2021.10

Signed-off-by: Andre Heider <a.heider@gmail.com>
2 years agoarm-trusted-firmware-mvebu: bump mv-ddr-marvell to current version
Andre Heider [Tue, 12 Oct 2021 10:53:39 +0000 (12:53 +0200)]
arm-trusted-firmware-mvebu: bump mv-ddr-marvell to current version

efcad0e Merge pull request #33 from Semihalf/cn913x_cex7_eval
91bed2c cn913x: Add cn913x_cex7_eval config
55139f6 Merge pull request #32 from pali/master
e5573cc ARM: mvebu: a38x: Correct mismatched bound warnings
d83c38b a3700: Remove duplicate check for DDR_TYPE
c0c6bf7 a3700: Put temporary a3700_ddr_type file into $(OBJ_DIR)

Signed-off-by: Andre Heider <a.heider@gmail.com>
2 years agoarm-trusted-firmware-mvebu: bump a3700-utils to current version
Andre Heider [Tue, 12 Oct 2021 10:49:18 +0000 (12:49 +0200)]
arm-trusted-firmware-mvebu: bump a3700-utils to current version

With cryptocpp in place we can now update past the point of dropping
the old tbb_linux binary and build it instead.

Hauke confirmed that this also allows this firmware to be built on
aarch64.

97f01f5 Wtpdownloader: Properly retrieve current tty options
a33ff86 Wtpdownloader: Set CREAD tty cflag
af461d2 Wtpdownloader: Fix stuck during opening UART tty device
38c2135 Makefile: Print error when specified CLOCKSPRESET is not valid
f014428 TBB: Remove out-of-dated x86-64 ELF binary tbb_linux
1b6cb50 TBB: Fix compilation with Crypto++ 5.6.5
d9fb291 TBB: Fix memory corruptions by calling correct delete[] operator
d575885 TBB: Fix initializing CCTIM object
b9e1c4e Wtpdownloader: Fix makefile
8f61591 Wtpdownloader: Fix building with gcc 11
eabea5f TBB: Fix building with gcc 11

Signed-off-by: Andre Heider <a.heider@gmail.com>