openwrt/staging/ldir.git
3 years agouboot-sunxi: add ATF variable for specifying which flavour to use
Zoltan HERPAI [Wed, 29 Apr 2020 09:02:27 +0000 (11:02 +0200)]
uboot-sunxi: add ATF variable for specifying which flavour to use

In preparation for H6 support (which requires a separate ATF blob), add
an envvar to the A64 boards specifying which ATF blob to use.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agotoolchain: gcc: Update to version 10.3.0
Hauke Mehrtens [Sat, 10 Apr 2021 18:37:55 +0000 (20:37 +0200)]
toolchain: gcc: Update to version 10.3.0

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agovalgrind: Fix compile problem with MIPS soft float
Hauke Mehrtens [Sun, 4 Apr 2021 20:37:09 +0000 (22:37 +0200)]
valgrind: Fix compile problem with MIPS soft float

valgrind does not compile any more when using a GCC 10 for MIPS with
soft float. Just remove the parts which are generating assembler which
would not work.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agouboot-envtools: support environment in spi-nand on bpi-r64
Daniel Golle [Sun, 11 Apr 2021 15:55:05 +0000 (16:55 +0100)]
uboot-envtools: support environment in spi-nand on bpi-r64

Default to U-Boot env in UBI if root device is not mmc block device.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agomediatek: mt7622: add spi-nand support for bananapi bpi-r64
Oskari Lemmela [Sat, 10 Apr 2021 17:16:08 +0000 (20:16 +0300)]
mediatek: mt7622: add spi-nand support for bananapi bpi-r64

Some of bpi-r64 boards have serial NAND attached to SPI bus.
Add SD card image support for installing openwrt to it.
Default to nand upgrade if root device is not mmc block device.

Separate preloader and uboot images for snand are generated.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agouboot-mediatek: add spi-nand build for bananapi bpi-r64
Daniel Golle [Sun, 11 Apr 2021 15:59:09 +0000 (16:59 +0100)]
uboot-mediatek: add spi-nand build for bananapi bpi-r64

Some of bpi-r64 boards have serial NAND attached to SPI bus.
Build U-Boot for booting from SPI-NAND.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agomt76: add missing file
Felix Fietkau [Sun, 11 Apr 2021 17:56:32 +0000 (19:56 +0200)]
mt76: add missing file

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomt76: update to the latest version
Felix Fietkau [Sun, 11 Apr 2021 17:37:10 +0000 (19:37 +0200)]
mt76: update to the latest version

028b7152b1a9 mt76: mt7921: remove 80+80 MHz support capabilities
7714dc914df6 mt76: report Rx timestamp
ffd4cf15fa0e mt76: mt7915: add mmio.c
fe8717dd573a mt76: mt7615: add missing SPDX tag in mmio.c
6b293c411d22 mt76: mt7615: always add rx header translation tlv when adding stations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: add client mode connection monitor fix
Felix Fietkau [Sun, 11 Apr 2021 17:42:14 +0000 (19:42 +0200)]
mac80211: add client mode connection monitor fix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomac80211: support rx timestamps for HE rates
Felix Fietkau [Sun, 11 Apr 2021 17:41:56 +0000 (19:41 +0200)]
mac80211: support rx timestamps for HE rates

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agomxs: add support for 5.10 as testing kernel
Zoltan HERPAI [Thu, 18 Feb 2021 22:27:01 +0000 (23:27 +0100)]
mxs: add support for 5.10 as testing kernel

The 100-ARM-dts-imx23-introduce-mmc0_sck_cfg.patch does
not need to be copied over as it's already merged upstream.

Other notable change is the USB_CHIPIDEA_OF change to
USB_CHIPIDEA_IMX [1].

[1] https://www.spinics.net/lists/linux-usb/msg193347.html

Compile/runtime-tested on Olinuxino Micro (imx23).

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agomediatek: fix writing bananapi bpi-r64 env
Oskari Lemmela [Sat, 10 Apr 2021 17:16:06 +0000 (20:16 +0300)]
mediatek: fix writing bananapi bpi-r64 env

Use generic functions to get env partition.

Fixes: 7043e4334f0 ("mediatek: mt7622: improve sysupgrade on MMC")
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agomediatek: bpi-r64: use separate partition for emmc bootloader
Oskari Lemmela [Sat, 10 Apr 2021 17:16:05 +0000 (20:16 +0300)]
mediatek: bpi-r64: use separate partition for emmc bootloader

eMMC booloader is stored to separate partition.
FIP size is increased to 2MB.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
3 years agokernel: Adapt renamed can-dev.ko
Hauke Mehrtens [Sat, 10 Apr 2021 21:06:11 +0000 (23:06 +0200)]
kernel: Adapt renamed can-dev.ko

The can-dev.ko kernel module was moved in kernel 5.4.110 and 5.10.28.

Fixes: a1311df95587 ("kernel: bump 5.10 to 5.10.28")
Fixes: b0a34e886da1 ("kernel: bump 5.4 to 5.4.110")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agokernel: bump 5.10 to 5.10.28
Rui Salvaterra [Thu, 8 Apr 2021 20:27:12 +0000 (21:27 +0100)]
kernel: bump 5.10 to 5.10.28

Automatically refreshed:
601-v5.12-net-implement-threaded-able-napi-poll-loop-support.patch
640-02-net-resolve-forwarding-path-from-virtual-netdevice-a.patch
680-NET-skip-GRO-for-foreign-MAC-addresses.patch

Run tested:
ramips/mt7621 (Redmi AC2100)

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agosunxi: disable LPAE on cortexa8
Zoltan HERPAI [Sat, 10 Apr 2021 20:01:24 +0000 (22:01 +0200)]
sunxi: disable LPAE on cortexa8

LPAE should be disabled as the Cortex-A8 cores don't support it,
and the kernel will crash on boot if it's enabled.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
3 years agoath79: increase max SPI clock for DIR-859 A1
Jan Forman [Sun, 21 Mar 2021 14:29:43 +0000 (15:29 +0100)]
ath79: increase max SPI clock for DIR-859 A1

Increase the spi-max frequency to 50 MHz, similar to the DIR-842.

Signed-off-by: Jan Forman <forman.jan96@gmail.com>
[improve commit title, fix commit message alignment]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoramips: improve pinctrl for Youku YK-L1
Shiji Yang [Sun, 4 Apr 2021 03:55:41 +0000 (11:55 +0800)]
ramips: improve pinctrl for Youku YK-L1

1. rename led pin "air" to a more common name "wlan" and use "phy0tpt" to trigger it.
2. led "wan" can be triggered by ethernet pinctrl by default so just drop it.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
3 years agokernel: bump 5.4 to 5.4.110
John Audia [Wed, 7 Apr 2021 14:13:50 +0000 (10:13 -0400)]
kernel: bump 5.4 to 5.4.110

Ran update_kernel.sh in a fresh clone without any existing toolchains.

Manually rebased due to movement of rx-offload.c in 5.4.110:
  layerscape/patches-5.4/802-can-0002-can-rx-offload-fix-long-lines.patch
  layerscape/patches-5.4/802-can-0003-can-rx-offload-can_rx_offload_compare-fix-typo.patch
  layerscape/patches-5.4/802-can-0004-can-rx-offload-can_rx_offload_irq_offload_timestamp-.patch
  layerscape/patches-5.4/802-can-0005-can-rx-offload-can_rx_offload_reset-remove-no-op-fun.patch
  layerscape/patches-5.4/802-can-0006-can-rx-offload-Prepare-for-CAN-FD-support.patch
  layerscape/patches-5.4/802-can-0018-can-flexcan-use-struct-canfd_frame-for-CAN-classic-f.patch

Build system: x86_64
Build-tested: ipq806x/R7800
Run-tested: ipq806x/R7800

No dmesg regressions, everything functional

Signed-off-by: John Audia <graysky@archlinux.us>
3 years agomediatek: remove duplicate dts-v1 statement for UniFi 6 LR
Adrian Schmutzler [Sat, 10 Apr 2021 16:38:33 +0000 (18:38 +0200)]
mediatek: remove duplicate dts-v1 statement for UniFi 6 LR

/dts-v1/; must only be specified once.

Fixes: e887049fbb74 ("mediatek: add alternative bootchain variant
for UniFi 6 LR")

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoath79: consolidate testing kernel
Adrian Schmutzler [Sat, 10 Apr 2021 16:23:46 +0000 (18:23 +0200)]
ath79: consolidate testing kernel

All subtargets have the same testing kernel set, so move it to the
target definition.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
3 years agoumdns: add missing syscalls to seccomp filter
Daniel Golle [Sat, 10 Apr 2021 16:30:49 +0000 (17:30 +0100)]
umdns: add missing syscalls to seccomp filter

Looks like 'openat', 'pipe2' and 'ppoll' are now needed, possibly due
to changes on libraries used by umdns now using slightly different
calls.

Found using
/etc/init.d/umdns trace
now use umdns, ie. cover all ubus call etc., then
/etc/init.d/umdns stop
find list of syscalls traced in /tmp/umdns.*.json

Fixes: FS#3355 ("UMDNS: does not start on master with seccomp")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: fix mtd squashfs root regression on targets with CONFIG_FIT_PARTITION
Felix Fietkau [Sat, 10 Apr 2021 15:00:57 +0000 (17:00 +0200)]
kernel: fix mtd squashfs root regression on targets with CONFIG_FIT_PARTITION

Move 480-mtd-set-rootfs-to-be-root-dev.patch to hack-5.10 and fix assumption
about the block device index.

Fixes: 2809d0000744 ("kernel: support FIT partition parser on mtdblock devices")
Acked-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: update flow offload patches to upstream version
Felix Fietkau [Sat, 10 Apr 2021 11:20:04 +0000 (13:20 +0200)]
kernel: update flow offload patches to upstream version

Move patches to backport-5.10, since the series was accepted upstream

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agouboot-envtools: oxnas: drop redundant space after case keywords
Piotr Dymacz [Fri, 2 Apr 2021 17:17:12 +0000 (19:17 +0200)]
uboot-envtools: oxnas: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: layerscape: drop redundant space after case keywords
Piotr Dymacz [Fri, 2 Apr 2021 17:16:14 +0000 (19:16 +0200)]
uboot-envtools: layerscape: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: ipq806x: drop redundant space after case keywords
Piotr Dymacz [Thu, 7 Jan 2021 16:55:15 +0000 (17:55 +0100)]
uboot-envtools: ipq806x: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: ipq40xx: drop redundant space after case keywords
Piotr Dymacz [Thu, 7 Jan 2021 16:54:18 +0000 (17:54 +0100)]
uboot-envtools: ipq40xx: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: imx6: drop redundant space after case keywords
Piotr Dymacz [Thu, 7 Jan 2021 16:51:02 +0000 (17:51 +0100)]
uboot-envtools: imx6: drop redundant space after case keywords

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-envtools: drop shebang from uci-defaults and lib files
Piotr Dymacz [Fri, 2 Apr 2021 17:43:38 +0000 (19:43 +0200)]
uboot-envtools: drop shebang from uci-defaults and lib files

These files are sourced and non-executable, a shebang is redundant.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-imx6: define 'BUILD_DEVICES' for Toradex Apalis
Piotr Dymacz [Thu, 7 Jan 2021 16:30:49 +0000 (17:30 +0100)]
uboot-imx6: define 'BUILD_DEVICES' for Toradex Apalis

Without 'BUILD_DEVICES' defined, the U-Boot related package won't be
automatically selected when building for Toradex Apalis device.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-imx6: align indent size in Makefile
Piotr Dymacz [Thu, 7 Jan 2021 16:28:36 +0000 (17:28 +0100)]
uboot-imx6: align indent size in Makefile

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
3 years agouboot-imx6: drop support for Nitrogen6x/SABRE devices
Piotr Dymacz [Sat, 27 Feb 2021 11:58:55 +0000 (12:58 +0100)]
uboot-imx6: drop support for Nitrogen6x/SABRE devices

These devices never got officially supported in the tree thus it doesn't
make much sense to waste our infrastructure resources and keep building
dedicated U-Boot images for them.

CC: Petr Štetiar <ynezz@true.cz>
CC: Luka Perkov <luka.perkov@sartura.hr>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
Acked-by: Petr Štetiar <ynezz@true.cz>
3 years agomediatek: add alternative bootchain variant for UniFi 6 LR
Daniel Golle [Fri, 2 Apr 2021 23:43:50 +0000 (00:43 +0100)]
mediatek: add alternative bootchain variant for UniFi 6 LR

Builds images for the Ubiquiti Network UniFi 6 LR device running the
U-Boot build added by the previous commits.
Everything but MTD partitions is moved to dtsi.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agouboot-envtools: add env settings for ubnt,unifi-6-lr-ubootmod
Daniel Golle [Sun, 4 Apr 2021 16:16:42 +0000 (17:16 +0100)]
uboot-envtools: add env settings for ubnt,unifi-6-lr-ubootmod

Add settings for fw_printenv/fw_setenv for the Ubiquiti UniFi 6 LR
when running OpenWrt's version of U-Boot. The settings should work
equally with the unmodified version, but that has not yet been
tested.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agouboot-mediatek: add build for Ubiquiti Networks UniFi 6 LR
Daniel Golle [Fri, 2 Apr 2021 11:05:15 +0000 (12:05 +0100)]
uboot-mediatek: add build for Ubiquiti Networks UniFi 6 LR

Add U-Boot build for the Ubiquiti Networks UniFi 6 LR access point.
This allows updating the bootchain to modern ARM Trusted Firmware 2.4
and U-Boot 2021.04 while keeping as much of the existing flash layout
as possible (u-boot-env, factory and eeprom partitions are retained),
gaining robust recovery vs. production dual-boot mechanism.
Add info for the Winbond W25Q512JV SPI NOR flash used in the device
and wait for GPIOs to settle after reset before checking for reset
button.
I2C connected LED controller is not supported yet.
Writing large amounts of data to SPI flash currently doesn't work due
to watchdog timeout causing reset before data write completes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoarm-trusted-firmware-mediatek: increase NOR bl3 size
Daniel Golle [Fri, 2 Apr 2021 11:03:01 +0000 (12:03 +0100)]
arm-trusted-firmware-mediatek: increase NOR bl3 size

Use bl3 size of 0xa0000 instead of 0x80000 in NOR flash.
This results in bl3 ending at 0xc0000 which is where the legacy
bootchain typically puts U-Boot environment.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: support FIT partition parser on mtdblock devices
Daniel Golle [Fri, 2 Apr 2021 23:41:30 +0000 (00:41 +0100)]
kernel: support FIT partition parser on mtdblock devices

Allow using the FIT block-device partition partition parser to work on
top of mtdblock devices.
This is more tricky than it sounds as it requires to reorganize the
procedure of registering mtdblock devices in order to avoid locking
troubles caused by the block partition parsers then trying to open
the mtdblock device for reading while locks are still being held.
Fix that by moving the adding of the disks after the entire device
has been probed when locks no longer need to be held.
Also address issue with mtdsuper surfaced when using sub-partitions
which prevented mounting JFFS2 using the /dev/mtdblock* device.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agokernel: mtdsplit_fit: support FIT with external data
Daniel Golle [Fri, 2 Apr 2021 23:40:25 +0000 (00:40 +0100)]
kernel: mtdsplit_fit: support FIT with external data

U-Boot has recently added support for having data blobs in uImage.FIT
images stored at offsets after the FDT structure rather than embedding
the data into the FDT structure itself. This is useful as it allows
parts of the image to be mapped by the FIT partition parser, and it
allows the FIT structure itself to be parsed more easily as it usually
fits into single page.
mtdsplit_fit assumed that the total length of an image is identical
to the length of the FDT structure. For uImage.FIT with external data
this assumption no longer holds true.
Add support for uImage.FIT with external data to mtdsplit_fit and in
in that case only split-off rootfs_data -- selecting and mapping rootfs
partition is left to the block partition parser just like on UBI and
block/GPT based platforms.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agouboot-mediatek: bpi-r64: erase eMMC environment on installation
Daniel Golle [Fri, 9 Apr 2021 14:58:57 +0000 (15:58 +0100)]
uboot-mediatek: bpi-r64: erase eMMC environment on installation

Erase U-Boot environment partition on eMMC on installation to make sure
chages are applied.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agoath79: mikrotik: define the testing kernel version
Koen Vandeputte [Fri, 9 Apr 2021 14:08:00 +0000 (16:08 +0200)]
ath79: mikrotik: define the testing kernel version

commit d6b785d477 ("ath79: add kernel 5.10 support") moved
KERNEL_TESTING_PATCHVER to a subtarget level,
but is looks like Mikrotik subtarget was forgotten.

Also add it for Mikrotik.

Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
3 years agofirmware-utils: add -Wall to most tools
Rafał Miłecki [Thu, 8 Apr 2021 22:12:28 +0000 (00:12 +0200)]
firmware-utils: add -Wall to most tools

This helps spotting possible problems

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: fix -Wpointer-sign warnings
Rafał Miłecki [Fri, 9 Apr 2021 08:43:07 +0000 (10:43 +0200)]
firmware-utils: fix -Wpointer-sign warnings

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: fix -Wmaybe-uninitialized warnings
Rafał Miłecki [Fri, 9 Apr 2021 07:21:25 +0000 (09:21 +0200)]
firmware-utils: fix -Wmaybe-uninitialized warnings

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: fix few random warnings
Rafał Miłecki [Fri, 9 Apr 2021 06:52:03 +0000 (08:52 +0200)]
firmware-utils: fix few random warnings

1. -Wunused-label
2. -Wparentheses
3. -Wmisleading-indentation
4. -Wformat-overflow

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: fix unused variable warnings
Rafał Miłecki [Fri, 9 Apr 2021 05:38:46 +0000 (07:38 +0200)]
firmware-utils: fix unused variable warnings

This fixes warnings from the:
1. -Wunused-variable
2. -Wunused-but-set-variable

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: fix all -Wformat warnings
Rafał Miłecki [Thu, 8 Apr 2021 22:10:53 +0000 (00:10 +0200)]
firmware-utils: fix all -Wformat warnings

1. Use %hhu for uint8_t
2. Use %z for size_t

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: enable Netgear R8000P bootloader image
Rafał Miłecki [Thu, 8 Apr 2021 08:39:56 +0000 (10:39 +0200)]
bcm4908: enable Netgear R8000P bootloader image

This enables building BCM4908 "raw" image that can be flashed using
bootloader web UI. It requires serial console access & stopping booting
by the "Press any key to stop auto run".

It's easy to build vendor like CHK image but it can't be safely flashed
using vendor UI at this point. Netgear implements method called "NAND
incremental flashing" that doesn't seem to flash bootfs partition as
provided.

Above method seems to update vmlinux.lz without updating 94908.dtb. It
prevents OpenWrt kernel from booting due to incomplete DTB file. Full
Netgear R8000P support can be enabled after finding a way to make vendor
firmware flash OpenWrt firmware including the 94908.dtb update.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: enable target & Asus GT-AC5300 image
Rafał Miłecki [Thu, 8 Apr 2021 07:12:43 +0000 (09:12 +0200)]
bcm4908: enable target & Asus GT-AC5300 image

OpenWrt was succesfully tested on the GT-AC5300 model. It's possible to:
1. Install OpenWrt using vendor UI
2. Perform UBI aware sysupgrade
3. Install vendor firmware using OpenWrt sysupgrade

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: convert into a package
Rafał Miłecki [Thu, 1 Apr 2021 15:06:47 +0000 (17:06 +0200)]
firmware-utils: bcm4908img: convert into a package

bcm4908img is a tool managing BCM4908 platform images. It's used for
creating them as well as checking, modifying and extracting data from.

It's required by both: host (for building firmware images) and target
(for sysupgrade purposes). Make it a host/target package.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: fix uninitialized var usage
Rafał Miłecki [Thu, 8 Apr 2021 07:10:20 +0000 (09:10 +0200)]
firmware-utils: bcm4908img: fix uninitialized var usage

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoramips: rt305x: use lzma-loader for ZyXEL Keenetic Lite rev.B
Szabolcs Hubai [Wed, 3 Feb 2021 06:56:38 +0000 (07:56 +0100)]
ramips: rt305x: use lzma-loader for ZyXEL Keenetic Lite rev.B

Fixes boot loader LZMA decompression issue,
reported by GitHub user KOLANICH at [0].

The reported LZMA ERROR has date of 2020-07-20, soon after
the device support landed:

Ralink UBoot Version: 3.5.2.4_ZyXEL

....

3: System Boot system code via Flash.
   Image Name:   MIPS OpenWrt Linux-4.14.187
   Created:      2020-07-20   3:39:11 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1472250 Bytes =  1.4 MB
   Load Address: 80000000
   Entry Point:  80000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... LZMA ERROR 1 - must RESET board to recover

[0] https://github.com/openwrt/openwrt/commit/fea232ae8feb6af780fd4fa78ebe9231778bf75a#commitcomment-45016560

Fixes: 4dc9ad4af8c921494d20b303b6772fc6b5af3a69 ("ramips: add support for ZyXEL Keenetic Lite Rev.B")
Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com>
3 years agoath79: move pcie node to DTSI for qca955x Senao APs
Michael Pratt [Sat, 27 Feb 2021 19:18:42 +0000 (14:18 -0500)]
ath79: move pcie node to DTSI for qca955x Senao APs

pcie0 is the same for this generation of Senao APs
while eth0, eth1, and wmac can differ

the qca,no-eeprom property has no effect
for the ath10k drivers

Signed-off-by: Michael Pratt <mcpratt@pm.me>
3 years agoath79: cleanup DTS for ALLNET ALL-WAP02860AC
Michael Pratt [Mon, 15 Feb 2021 20:37:06 +0000 (15:37 -0500)]
ath79: cleanup DTS for ALLNET ALL-WAP02860AC

use qca955x_senao_loader.dtsi
because it is the same hardware / partitioning
and some cleanup

Effects:

nodes to match similar boards
 - keys
 - eth0
 - pcie0

bumps SPI frequency to 40 MHz

removes &pll node:
the property is defined in qca955x.dtsi

removes qca,no-eeprom:
has no effect with mtd-cal-data property
(also spelling)

Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
3 years agoath79: add factory.bin for ALLNET ALL-WAP02860AC
Michael Pratt [Fri, 12 Feb 2021 23:58:00 +0000 (18:58 -0500)]
ath79: add factory.bin for ALLNET ALL-WAP02860AC

This device is a Senao-based product
using hardware and software from Senao
with the tar-gz platform for factory.bin
and checksum verification at boot time
using variables stored in uboot environment
and a 'failsafe' image when it fails.

Extremely similar hardware/software to Engenius EAP1200H
and other Engenius APs with qca955x

Tested-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
3 years agoath79: add Senao 'failsafe' sysupgrade procedure
Michael Pratt [Fri, 12 Feb 2021 23:19:10 +0000 (18:19 -0500)]
ath79: add Senao 'failsafe' sysupgrade procedure

Use a similar upgrade method for sysupgrade.bin, like factory.bin,
for Senao boards with the tar.gz OEM upgrade platform,
and 'failsafe' image which is loaded on checksum failure.

This is inspired by the OEM upgrade script /etc/fwupgrade.sh
and the existing platforms for dual-boot Senao boards.

Previously, if the real kernel was damaged or missing
the only way to recover was with UART serial console,
because the OKLI lzma-loader is programmed to halt.

uboot did not detect cases where kernel or rootfs is damaged
and boots OKLI instead of the failsafe image,
because the checksums stored in uboot environment
did not include the real kernel and rootfs space.

Now, the stored checksums include the space for both
the lzma-loader, kernel, and rootfs.
Therefore, these boards are now practically unbrickable.

Also, the factory.bin and sysupgrade.bin are now the same,
except for image metadata.
This allows for flashing OEM image directly from openwrt
as well as flashing openwrt image directly from OEM.

Make 'loader' partition writable so that it can be updated
during a sysupgrade.

tested with
ENS202EXT v1
EAP1200H
EAP350 v1
EAP600
ECB350 v1
ECB600
ENH202 v1

Signed-off-by: Michael Pratt <mcpratt@pm.me>
3 years agoath79: adjust ath79/tiny Senao APs to 4k blocksize
Michael Pratt [Sun, 21 Feb 2021 22:41:30 +0000 (17:41 -0500)]
ath79: adjust ath79/tiny Senao APs to 4k blocksize

ath79/tiny kernel config has
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
from commit
05d35403b211ccb9bf20e2b3c0b7a30c82c6d6a2

Because of this, these changes are required for 2 reasons:

1.

Senao devices in ath79/tiny
with a 'failsafe' partition and the tar.gz sysupgrade platform
and a flash chip that supports 4k sectors
will fail to reboot to openwrt after a sysupgrade.

the stored checksum is made with the 64k blocksize length
of the image to be flashed,
and the actual checksum changes after flashing due to JFFS2 space
being formatted within the length of the rootfs from the image

example:
0x440000 length of kernel + rootfs (from sysupgrade.bin)
0x439000 offset of rootfs_data (from kernel log)

2.

for boards with flash chips that support 4k sectors:
saving configuration over sysupgrade is not possible
because sysupgrade.tgz is appended at a 64k boundary
and the mtd parser starts JFFS2 at a 4k boundary.

for boards with flash chips that do not support 4k sectors:
partitioning with 4k boundaries causes a boot loop
from the mtd parser not finding kernel and rootfs.

Also:

Some of the Senao boards that belong in ath79/tiny,
for example ENH202,
have a flash chip that does not support 4k sectors
(no SECT_4K symbol in upstream source).

Because of this, partitioning must be different for these devices
depending on the flash chip model detected by the kernel.

Therefore:

this creates 2 DTSI files
to replace the single one with 64k partitioning
for 4k and 64k partitioning respectively.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
3 years agoath79: remove 'fakeroot' for Senao devices
Michael Pratt [Thu, 25 Feb 2021 03:55:09 +0000 (22:55 -0500)]
ath79: remove 'fakeroot' for Senao devices

By using the same custom kernel header magic
in both OKLI lzma-loader, DTS, and makefile
this hack is not necessary anymore

However, "rootfs" size and checksum
must now be supplied by the factory.bin image
through a script that is accepted by the OEM upgrade script.

This is because Senao OEM scripts assume a squashfs header exists
at the offset for the original "rootfs" partition
which is actually the kernel + rootfs in this implementation,
and takes size value from the header that would be there with hexdump,
but this offset is now the uImage header instead.

This frees up 1 eraseblock
previously used by the "fakeroot" partition
for bypassing the OEM image verification.

Also, these Senao devices with a 'failsafe' partition
and the tar-gz factory.bin platform would otherwise require
flashing the new tar-gz sysupgrade.bin afterward.
So this also prevents having to flash both images
when starting from OEM or 'failsafe'

the OEM upgrade script verifies the header magic numbers,
but only the first two bytes.
Example:

    [ "${magic_word_kernel}" = "2705" ] &&
    [ "${magic_word_rootfs}" = "7371" -o "${magic_word_rootfs}" = "6873" ] &&
    errcode="0"

therefore picked the magic number
0x73714f4b
which is
'sqOK'

Signed-off-by: Michael Pratt <mcpratt@pm.me>
3 years agoath79: lzma-loader: allow setting custom kernel magic
Michael Pratt [Thu, 25 Feb 2021 03:35:37 +0000 (22:35 -0500)]
ath79: lzma-loader: allow setting custom kernel magic

...and max flash offset

The mtdsplit parser was recently refactored
to allow the kernel to have custom image header magic.

Let's also do this for the lzma-loader

For example:
When implemented together,
this allows the kernel to "appear" to be a rootfs
by OEM software in order to write an image
that is actually kernel + rootfs.

At the same time,
it would boot to openwrt normally
by setting the same magic in DTS.

Both of the variables
have a default value that is unchanged
when not defined in the makefiles

This has no effect on the size of the loader
when lzma compressed.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
3 years agorealtek: allow writing to "u-boot-env2"
Bjørn Mork [Tue, 6 Apr 2021 09:43:05 +0000 (11:43 +0200)]
realtek: allow writing to "u-boot-env2"

U-Boot uses the "bootpartition" variable stored in
"u-boot-env2" to select the active system partition. Allow
updates to enable system switching from OpenWrt.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
3 years agouboot-envtools: add wrapper scripts for alternate config
Bjørn Mork [Tue, 6 Apr 2021 09:43:04 +0000 (11:43 +0200)]
uboot-envtools: add wrapper scripts for alternate config

Now that we can create an alternate configuration file, add two
wrapper scripts for simple access to it using the alternate
alternate application names `fw_printsys' and `fw_setsys'.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
3 years agouboot-envtools: add support for multiple config partitions
Bjørn Mork [Tue, 6 Apr 2021 09:43:03 +0000 (11:43 +0200)]
uboot-envtools: add support for multiple config partitions

Most (all?) of the realtek devices have two u-boot config partitions
with a different set of variables in each. The U-Boot shell provides
two sets of apps to manipulate these:

 printenv- print environment variables
 printsys- printsys - print system information variables
 saveenv - save environment variables to persistent storage
 savesys - savesys - save system information variables to persistent storage
 setenv  - set environment variables
 setsys  - setsys  - set system information variables

Add support for multiple ubootenv configuration types, allowing
more than one configuration file.

Section names are not suitable for naming the different
configurations since each file can be the result of multiple sections
in case of backup partitions.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
3 years agobcm4908: fix Netgear R8000P image
Rafał Miłecki [Wed, 7 Apr 2021 12:38:45 +0000 (14:38 +0200)]
bcm4908: fix Netgear R8000P image

Use vendor format to allow flashing using Negear UI.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agobcm4908: add sysupgrade support
Rafał Miłecki [Wed, 7 Apr 2021 12:14:57 +0000 (14:14 +0200)]
bcm4908: add sysupgrade support

It supports flashing OpenWrt images (bootfs & UBI upgrade) as well as
vendor images (whole MTD partition write).

Upgrading cferom is unsupported. It requires copying device specific
data (like MAC) to target image before flashing.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agomt76: update to the latest version
Felix Fietkau [Wed, 7 Apr 2021 08:58:01 +0000 (10:58 +0200)]
mt76: update to the latest version

7d35b7a15d1d mt76: mt7915: add wifi subsystem reset
04122c89749d mt76: fix rx amsdu subframe processing
5e764ec9bece mt76: mt7921: introduce MT_WFDMA_DUMMY_CR definition
cf0badbc0497 mt76: mt7921: fix inappropriate WoW setup with the missing ARP informaiton
f32a4e15f5b2 mt76: mt7921: fix the dwell time control
54f52771a04a mt76: mt7921: fix kernel crash when the firmware fails to download
97189d2a045b mt76: mt7921: fix the insmod hangs
dcdbd7c89cf5 mt76: mt7921: fix MT_PCIE_MAC_INT_ENABLE access
813db729c02f mt76: mt7921: reduce the data latency during hw scan

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agobcm4908: pad firmware image bootfs JFFS2 partition to 8 MiB
Rafał Miłecki [Wed, 7 Apr 2021 07:30:30 +0000 (09:30 +0200)]
bcm4908: pad firmware image bootfs JFFS2 partition to 8 MiB

This way MTD "bootfs" partition will be always 8+ MiB. This should be
enough for any custom / future firmware to fit its bootfs (e.g. big
kernel) without having to repertition whole flash. That way we can
preserve UBI and its erase counters during sysupgrade.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: extract bootfs without padding
Rafał Miłecki [Wed, 7 Apr 2021 05:59:57 +0000 (07:59 +0200)]
firmware-utils: bcm4908img: extract bootfs without padding

JFFS2 bootfs partition in a BCM4908 image usually includes some padding.
For flashing it individually (writing to designed MTD partition) we want
just JFFS2 data.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: fix extracting cferom
Rafał Miłecki [Tue, 6 Apr 2021 22:17:40 +0000 (00:17 +0200)]
firmware-utils: bcm4908img: fix extracting cferom

Fix offset to extract proper data when image contains vendor header.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: support extracting bootfs & rootfs
Rafał Miłecki [Mon, 5 Apr 2021 17:30:06 +0000 (19:30 +0200)]
firmware-utils: bcm4908img: support extracting bootfs & rootfs

It's required for upgrading firmware using single partitions instead of
just blindly writing whole image.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: replace size with offset
Rafał Miłecki [Mon, 5 Apr 2021 23:06:52 +0000 (01:06 +0200)]
firmware-utils: bcm4908img: replace size with offset

It's much easier to operate on BCM4908 image data with absolute offset
of each section stored. It doesn't require summing sizes over and over.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoath79: ar934x-nand: fix broken nand on kernel 5.10
Koen Vandeputte [Tue, 6 Apr 2021 10:16:10 +0000 (12:16 +0200)]
ath79: ar934x-nand: fix broken nand on kernel 5.10

Booting current 5.10.x testing kernel shows this:

[    0.335781] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    0.342280] nand: Samsung NAND 128MiB 3,3V 8-bit
[    0.346982] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
OOB size: 64
[    0.354703] ar934x-nand 1b800200.nand: unknown ECC mode 2
[    0.360193] ar934x-nand 1b800200.nand: nand_scan failed, err:-22
[    0.366341] ar934x-nand: probe of 1b800200.nand failed with error -22

...

[    1.089264] /dev/root: Can't open blockdev
[    1.093482] VFS: Cannot open root device "(null)" or
unknown-block(0,0): error -6
[    1.101077] Please append a correct "root=" boot option; here are the
available partitions:
[    1.109555] 1f00              64 mtdblock0
[    1.109559]  (driver?)
[    1.116199] 1f01              48 mtdblock1
[    1.116202]  (driver?)
[    1.122841] 1f02               4 mtdblock2
[    1.122844]  (driver?)
[    1.129493] 1f03               4 mtdblock3
[    1.129497]  (driver?)
[    1.136138] 1f04               4 mtdblock4
[    1.136142]  (driver?)
[    1.142787] Kernel panic - not syncing: VFS: Unable to mount root fs
on unknown-block(0,0)
[    1.151168] Rebooting in 1 seconds..

The issue is caused by a wrong check for ECC engine type
on newer kernels.

Fix this.

Bootlog after:

[    0.335689] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    0.342192] nand: Samsung NAND 128MiB 3,3V 8-bit
[    0.346884] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
OOB size: 64
[    0.354611] Scanning device for bad blocks
[    0.364924] random: fast init done
[    0.496641] 3 fixed-partitions partitions found on MTD device
ar934x-nand
[    0.503545] Creating 3 MTD partitions on "ar934x-nand":
[    0.508865] 0x000000000000-0x000000040000 : "booter"
[    0.515133] 0x000000040000-0x000000400000 : "kernel"
[    0.523265] 0x000000400000-0x000008000000 : "ubi"

Fixes: fb64e2c30f ("ath79: ar934x-nand: add kernel 5.10 compatibility")
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
3 years agobcm4908: rename bootfs dummy file to the 1-openwrt
Rafał Miłecki [Mon, 5 Apr 2021 22:03:31 +0000 (00:03 +0200)]
bcm4908: rename bootfs dummy file to the 1-openwrt

The purpose of that dummy file is to make CFE work properly with OpenWrt
bootfs. CFE for some reason ignores JFFS2 files with ino 0.

Rename it to 1-openwrt so:
1. It's consistent with bcm63xx
2. It's OpenWrt specific so sysupgrade can distinguish it from vendor
   images

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoglibc: update to latest git HEAD (BZ #27468, BZ #27511)
Hans Dedecker [Mon, 5 Apr 2021 16:34:19 +0000 (18:34 +0200)]
glibc: update to latest git HEAD (BZ #27468, BZ #27511)

e78ea9bd26 Update Nios II libm-test-ulps.
98bb18f52a malloc: Fix a realloc crash with heap tagging [BZ 27468]
fc4ecce85b S390: Also check vector support in memmove ifunc-selector [BZ #27511]

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
3 years agouboot-mediatek: update to v2021.04
Daniel Golle [Mon, 5 Apr 2021 16:38:19 +0000 (17:38 +0100)]
uboot-mediatek: update to v2021.04

Remove patches merged upstream and refresh the remaining ones.
Runtime tested on
 * Bananapi BPi-R64 (eMMC and SD Card)
 * Linksys E8450 (SPI-NAND)
 * Ubiquiti UniFi 6 LR (SPI-NOR)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agolldpd: further size reductions
Stijn Tintel [Mon, 5 Apr 2021 15:48:41 +0000 (18:48 +0300)]
lldpd: further size reductions

Size difference on mips_4kec:
Before: 120196
After:  120006

Closes https://github.com/openwrt/openwrt/pull/3823

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Suggested-by: Lucian Cristian <lucian.cristian@gmail.com>
3 years agolldpd: enable LTO
Stijn Tintel [Mon, 5 Apr 2021 15:30:45 +0000 (18:30 +0300)]
lldpd: enable LTO

Size difference on mips_4kec:
W/o LTO: 139674
W/ LTO:  120196

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Suggested-by: Lucian Cristian <lucian.cristian@gmail.com>
3 years agolldpd: bump to 1.0.9
Stijn Tintel [Mon, 5 Apr 2021 14:35:39 +0000 (17:35 +0300)]
lldpd: bump to 1.0.9

Contains fixes related to CVE-2020-27827.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agolldpd: add libcap dependency
Stijn Tintel [Thu, 11 Mar 2021 23:10:07 +0000 (01:10 +0200)]
lldpd: add libcap dependency

Now that libcap is in OpenWrt base, we can drop our custom patch to
disable libcap support and have lldpd depend on it instead. This will
allow the monitor process to drop its privileges instead of running as
root, improving security.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
3 years agolibcap: bump to 2.48
Stijn Tintel [Thu, 11 Mar 2021 23:08:25 +0000 (01:08 +0200)]
libcap: bump to 2.48

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agolibcap: drop invalid copyright header
Stijn Tintel [Thu, 11 Mar 2021 23:03:43 +0000 (01:03 +0200)]
libcap: drop invalid copyright header

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agolibcap: import from packages feed
Stijn Tintel [Thu, 11 Mar 2021 23:03:22 +0000 (01:03 +0200)]
libcap: import from packages feed

Having libcap in OpenWrt base allows us to enable libcap support in
other packages in base.

In lldpd, this would allow the monitor process to drop its privileges
instead of running as root, improving security. It will also allow us to
drop our patch to disable libcap.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agobcm4908: enable JFFS2 support
Rafał Miłecki [Mon, 5 Apr 2021 08:44:46 +0000 (10:44 +0200)]
bcm4908: enable JFFS2 support

It's needed for accessing JFFS2 bootfs partition.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: add bootfs support
Rafał Miłecki [Fri, 2 Apr 2021 15:28:21 +0000 (17:28 +0200)]
firmware-utils: bcm4908img: add bootfs support

This adds support for accessing bootfs JFFS2 partition in the BCM4908
image. Support includes:
1. Listing files
2. Renaming file (requires unchanged name length)

Above commands are useful for flashing BCM4908 images which by defualt
come with cferom.000 file and require renaming it.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: support extracting image data
Rafał Miłecki [Fri, 2 Apr 2021 14:31:43 +0000 (16:31 +0200)]
firmware-utils: bcm4908img: support extracting image data

It's useful for upgrading cferom, firmware, etc.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: find cferom size
Rafał Miłecki [Fri, 2 Apr 2021 13:04:46 +0000 (15:04 +0200)]
firmware-utils: bcm4908img: find cferom size

It's important for modifying / extracting firmware content. cferom is
optional image content at the file beginning.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: use "info" command displaying file info
Rafał Miłecki [Fri, 2 Apr 2021 12:12:58 +0000 (14:12 +0200)]
firmware-utils: bcm4908img: use "info" command displaying file info

BCM4908 image format contains some info that may be useful for info /
debugging purposes.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: support reading from stdin
Rafał Miłecki [Sun, 4 Apr 2021 12:53:00 +0000 (14:53 +0200)]
firmware-utils: bcm4908img: support reading from stdin

1. Don't allow pipe stdin as we need to fseek()
2. Don't alow TTY as it doesn't make sense for binary input

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: detect Netgear vendor firmware
Rafał Miłecki [Fri, 2 Apr 2021 11:59:02 +0000 (13:59 +0200)]
firmware-utils: bcm4908img: detect Netgear vendor firmware

Netgear uses CHK header which needs to be skipped when validating
BCM4908 image. Detect it directly in the bcm4908img tool. Dealing with
binary structs and endianess is way simpler in C.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agofirmware-utils: bcm4908img: extract parsing code
Rafał Miłecki [Fri, 2 Apr 2021 11:02:51 +0000 (13:02 +0200)]
firmware-utils: bcm4908img: extract parsing code

Move code parsing existing firmware file to separated function. This
cleans up existing code and allows reusing parsing code for other
commands.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 years agoipq40xx: add MikroTik hAP ac2 support
Robert Marko [Thu, 12 Nov 2020 18:45:22 +0000 (19:45 +0100)]
ipq40xx: add MikroTik hAP ac2 support

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

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

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

Installation:
Boot the initramfs image via TFTP and then flash the sysupgrade
image using "sysupgrade -n"

Signed-off-by: Robert Marko <robimarko@gmail.com>
3 years agouboot-mediatek: bpi-r64: no longer force recovery on first-boot
Daniel Golle [Fri, 2 Apr 2021 14:45:02 +0000 (15:45 +0100)]
uboot-mediatek: bpi-r64: no longer force recovery on first-boot

Now that sdcard.gz image contains everything needed to boot straight
into production image, no longer force booting into recovery image on
first boot by removing the logic which implemented that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
3 years agomt76: update to the latest version
Felix Fietkau [Sun, 4 Apr 2021 09:28:48 +0000 (11:28 +0200)]
mt76: update to the latest version

465dda65ee84 mt7615,mt7915: replace fw log 0-terminating code with wiphy info length limit
62b13f5352b8 mt76: mt7921: fix key set/delete issue
0ff3a336a8d8 mt7615,mt7915: fix a compiler warning
113ba8a81d54 mt76: mt7615: remove redundant dev_err call in mt7622_wmac_probe()
be1ab3b9ae7c mt76: mt7921: fix typo in mt7921_pci_resume
4e22f0dc934b mt76: mt7915: fix txpower init for TSSI off chips
e66a0b9b8d66 mt76: mt7615: always wake the device in mt7615_remove_interface
38f656768a90 mt76: mt7921: always wake the device in mt7921_remove_interface
6ee4770de083 mt76: mt7921: rework mt7921_mcu_debug_msg_event routine
e578b4b8d56a mt76: mt7615: fix .add_beacon_offload()
f8c6c7cbf10f mt76: mt7915: fix mt7915_mcu_add_beacon

Signed-off-by: Felix Fietkau <nbd@nbd.name>
3 years agokernel: bump 5.10 to 5.10.27
Kevin Darbyshire-Bryant [Tue, 30 Mar 2021 21:01:27 +0000 (22:01 +0100)]
kernel: bump 5.10 to 5.10.27

Use update_kernel to refresh all patches, required manual updates to:

610-netfilter_match_bypass_default_checks.patch
611-netfilter_match_bypass_default_table.patch
762-net-bridge-switchdev-Refactor-br_switchdev_fdb_notif.patch
764-net-bridge-switchdev-Send-FDB-notifications-for-host.patch

Run-tested: x86_64

Nothing screamed out but any funny business with linux bridging should
suspect this update first.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
3 years agonetifd: update to Git version 2021-04-03
Hauke Mehrtens [Sat, 3 Apr 2021 17:11:38 +0000 (19:11 +0200)]
netifd: update to Git version 2021-04-03

f8899b9 netifd: bridge: set default value for igmp_snoop
327da98 netifd: add possibility to switch off route config

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agouclient: update to Git version 2021-04-03
Hauke Mehrtens [Sat, 3 Apr 2021 17:04:53 +0000 (19:04 +0200)]
uclient: update to Git version 2021-04-03

83efca2 tests: fix possibly longer start of HTTP server
64e00d6 uclient-fetch: document missing options

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
3 years agohostapd: enable airtime policy for the -basic variants
Rui Salvaterra [Wed, 25 Nov 2020 23:03:48 +0000 (23:03 +0000)]
hostapd: enable airtime policy for the -basic variants

Airtime policy configuration is extremely useful in multiple BSS scenarios.
Since nowadays most people configure both private and guest networks (at
least), it makes sense to enable it by default, except for the most limited
of the variants.

Size of the hostapd-basic-openssl binary (mipsel 24Kc -O2):
543944 bytes (airtime policy disabled)
548040 bytes (airtime policy enabled)

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Daniel Golle <daniel@makrotopia.org>
3 years agorealtek: rename partitions in Netgear DTSI
Stijn Segers [Sun, 28 Feb 2021 21:50:15 +0000 (22:50 +0100)]
realtek: rename partitions in Netgear DTSI

Switch the Netgear DTSI for the Realtek target from the OEM partition
naming scheme to accepted OpenWrt naming practices. A quick git grep for
'u-boot-env' e.g. in the OpenWrt tree turns up almost 500 hits whereas
grepping for 'bdinfo' (the OEM equivalent) returns a meagre 14.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
3 years agozram-swap: bail out early if the kernel doesn't support swap
Rui Salvaterra [Thu, 1 Apr 2021 13:36:33 +0000 (14:36 +0100)]
zram-swap: bail out early if the kernel doesn't support swap

Since KERNEL_SWAP is only enabled by default for !SMALL_FLASH targets, we need
to check if the current kernel supports swap before trying to configure
zram-swap, as opkg can't check for kernel dependencies.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agozram-swap: clean up the makefile
Rui Salvaterra [Thu, 1 Apr 2021 13:36:32 +0000 (14:36 +0100)]
zram-swap: clean up the makefile

Break dependencies into separate lines, to improve the readability. Trim
trailing whitespace.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
3 years agolantiq: add basic support for AVM FRITZ!Box 3390
Andreas Böhler [Thu, 23 Jan 2020 20:20:38 +0000 (21:20 +0100)]
lantiq: add basic support for AVM FRITZ!Box 3390

The FRITZ!Box 3390 actually contains two SoCs, one Lantiq with a
5GHz WiFi and one AR9342 with a 2.4GHz WiFi. Only the Lantiq
has access to the flash memory, the Atheros runs fully from RAM.

Specifications
--------------

  - Lantiq 500 MHz
  - 128MiB RAM
  - 128MiB NAND
  - 256k Flash
  - AR9580 5GHz WiFi
  - AR9342 560 MHz
  - 64MiB RAM
  - AR9328 2.4GHz WiFi

Remarks
-------

This commit only adds support for the Lantiq side of things and
prepares the drivers for communication with the Atheros SoC. Thus,
only 5GHz WiFi works by default, the 2.4GHz WiFi will be added via
another target.

Some kernel patches will be required to add support for the Atheros SoC.

Installation
------------

Use the eva_ramboot.py script to boot the initramfs image. Then, transfer
the sysupgrade image to the device and run sysupgrade to flash it to the
NAND.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
Acked-by: Aleksander Jan Bajkowski A.Bajkowski@stud.elka.pw.edu.pl
Signed-off-by: Joachim Cerny <cocktail_yogi@web.de>