openwrt/staging/hauke.git
23 months agoadd wifi by default kitchensink-202205-2
Hauke Mehrtens [Sun, 22 May 2022 13:21:50 +0000 (15:21 +0200)]
add wifi by default

23 months agoactivate ethernet and USB
Hauke Mehrtens [Sun, 22 May 2022 00:37:18 +0000 (02:37 +0200)]
activate ethernet and USB

23 months agoDeactivate more
Hauke Mehrtens [Sat, 21 May 2022 23:24:54 +0000 (01:24 +0200)]
Deactivate more

23 months agodeactivate some configs
Hauke Mehrtens [Sat, 21 May 2022 22:53:33 +0000 (00:53 +0200)]
deactivate some configs

23 months agoactivate EFI
Hauke Mehrtens [Sat, 21 May 2022 11:43:41 +0000 (13:43 +0200)]
activate EFI

23 months agoreove moduls
Hauke Mehrtens [Fri, 20 May 2022 17:59:32 +0000 (19:59 +0200)]
reove moduls

23 months agoupgrade to default kernel
Hauke Mehrtens [Fri, 20 May 2022 17:57:33 +0000 (19:57 +0200)]
upgrade to default kernel

23 months agomore updates
Hauke Mehrtens [Fri, 20 May 2022 17:45:36 +0000 (19:45 +0200)]
more updates

23 months agosome updates
Hauke Mehrtens [Fri, 20 May 2022 14:13:50 +0000 (16:13 +0200)]
some updates

23 months agobackport patche form kernel 5.16
Hauke Mehrtens [Fri, 20 May 2022 13:18:38 +0000 (15:18 +0200)]
backport patche form kernel 5.16

23 months agovison five
Hauke Mehrtens [Fri, 20 May 2022 12:50:25 +0000 (14:50 +0200)]
vison five

23 months agoopensbi: bump to 1.0 release
Zoltan HERPAI [Sat, 21 May 2022 21:42:23 +0000 (23:42 +0200)]
opensbi: bump to 1.0 release

This will enable SBI v0.3, and add support for the SBI SRST extension which
helps to gracefully reboot/shutdown various HiFive U SoCs.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosifiveu: add new target for SiFive U-based boards
Zoltan HERPAI [Sun, 16 Dec 2018 10:05:58 +0000 (11:05 +0100)]
sifiveu: add new target for SiFive U-based boards

RISC-V is a new CPU architecture aimed to be fully free and open. This
target will add support for it, based on 5.15.

Supports running on:
 - HiFive Unleashed - FU540, first generation
 - HiFive Unmatched - FU740, current latest generation, PCIe

SD-card images are generated, where the partitions are required to have
specific type codes. As it is commonplace nowadays, OpenSBI is used as the
first stage, with U-boot following as the proper bootloader.

Specifications:

HiFive Unleashed:
 - CPU: SiFive FU540 quad-core RISC-V (U54, RV64IMAFDC)
 - Memory: 8Gb
 - Ethernet: 1x 10/100/1000
 - Console: via microUSB

HiFive Unmatched:
 - CPU: SiFive FU740 quad-core RISC-V (U74, RV64IMAFDC)
 - Memory: 16Gb
 - Ethernet: 1x 10/100/1000
 - USB: 4x USB 3.2
 - PCIe:  - 1x PCIe Gen3 x8
          - 1x M.2 key M (PCIe x4)
          - 1x M.2 Key E (PCIe x1 / USB2.0)
 - Console: via microUSB

Installation:
Standard SD-card installation via dd-ing the generated image to
an SD-card of at least 256Mb.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agogeneric: add missing symbols for 5.15
Zoltan HERPAI [Sun, 24 Apr 2022 20:35:25 +0000 (22:35 +0200)]
generic: add missing symbols for 5.15

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agofirmware-utils: ptgen: add SiFive-related GUID types
Zoltan HERPAI [Sat, 23 Apr 2022 17:06:28 +0000 (19:06 +0200)]
firmware-utils: ptgen: add SiFive-related GUID types

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoopenssl: add linux-riscv64 into the targets list
Zoltan HERPAI [Wed, 15 May 2019 15:21:45 +0000 (17:21 +0200)]
openssl: add linux-riscv64 into the targets list

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agouboot-sifiveu: add bootloader package for SiFive Ux40 boards
Zoltan HERPAI [Sun, 26 Jan 2020 22:46:18 +0000 (23:46 +0100)]
uboot-sifiveu: add bootloader package for SiFive Ux40 boards

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoopensbi: add package for RISC-V
Zoltan HERPAI [Sun, 26 Jan 2020 22:45:48 +0000 (23:45 +0100)]
opensbi: add package for RISC-V

OpenSBI is a form of a first-stage bootloader, which initializes
certain parts of an SoC and then passes on control to the second
stage bootloader i.e. an u-boot image.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agogeneric: groundwork for RISC-V
Zoltan HERPAI [Sun, 16 Dec 2018 09:45:53 +0000 (10:45 +0100)]
generic: groundwork for RISC-V

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoixp4xx: upgrade to 5.15
Zoltan HERPAI [Fri, 20 May 2022 06:45:15 +0000 (08:45 +0200)]
ixp4xx: upgrade to 5.15

Also backport patches from up to 5.18-rcX, remove patches already
merged into mainline.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agokirkwood: add support for Netgear Stora (MS2000/2110) NAS
Zoltan HERPAI [Thu, 5 May 2022 06:47:27 +0000 (08:47 +0200)]
kirkwood: add support for Netgear Stora (MS2000/2110) NAS

Dual-slot NAS based on Marvell Kirkwood.

Specifications:
 - Marvell 88F6281 @1GHz
 - 128Mb RAM
 - 256Mb NAND
 - 1x GbE LAN (Marvell 88E1116)
 - 1x USB 2.0
 - 2x SATA
 - PCF8563 RTC
 - LM75 sensor
 - TC654 PWM fan controller
 - Serial on J2 (115200,8n1)
 - Newer bootROM so kwboot-ing via serial is possible

Installation:

1. Serial console
 - Connect your levelshifter to the serial console
   on J2 (refer to the wiki page for pinout)
2. Update u-boot
 - Download the u-boot.kwb image for the device
 - Powercycle the NAS
 - Run "kwboot -b ./u-boot.kwb /dev/ttyUSB0 -p"
 - Connect to the serial console with minicom
 - tftp 0x0800000 netgear_stora-u-boot.kwb
 - nand erase 0x0 100000
 - nand write 0x0800000 0x0 0x100000
 - reset
3. Install OpenWrt
 - Boot up the initramfs image
 - tftpboot 0x800000 openwrt-kirkwood-netgear_stora-initramfs-uImage; bootm 0x800000
 - Download the sysupgrade image and perform sysupgrade

The fan is controlled in 3 stages by a script running every minute
from cron, measuring the CPU temperature.

Snippets taken from bodhi <mibodhi@gmail.com>

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agokirkwood: add hwmon-tc654
Zoltan HERPAI [Thu, 16 Jul 2020 15:46:44 +0000 (17:46 +0200)]
kirkwood: add hwmon-tc654

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosunxi: enable NAND on C64mini
Zoltan HERPAI [Wed, 13 Mar 2019 21:34:54 +0000 (22:34 +0100)]
sunxi: enable NAND on C64mini

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosunxi: add support for Retro Games Limited C=64 Mini (RGL001)
Zoltan HERPAI [Fri, 24 Apr 2020 13:44:01 +0000 (15:44 +0200)]
sunxi: add support for Retro Games Limited C=64 Mini (RGL001)

CPU: Allwinner A20 dual-core Cortex A7
Memory: 256/512Mb
Storage: 128Mb NAND
USB: 2x USB2.0

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosunxi: add support for NextThing CHIP with Tzatziffy board
Zoltan HERPAI [Thu, 2 Jul 2020 08:50:31 +0000 (10:50 +0200)]
sunxi: add support for NextThing CHIP with Tzatziffy board

Specifications:
SoC     R8 @ 1Ghz
DRAM    512MiB DDR3-800E @ 360MHz
NAND    4GB
Power   DC 5V @ ~1A, 3.7V Li-Ion battery (Not included)
Storage SD-card via Tzatziffy board

Install method:
Standard sunxi method.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosunxi: enable NAND on pcDuino3
Zoltan HERPAI [Sun, 25 Aug 2019 20:40:37 +0000 (22:40 +0200)]
sunxi: enable NAND on pcDuino3

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosunxi: enable NAND support on 5.15
Zoltan HERPAI [Thu, 21 Apr 2022 07:14:18 +0000 (09:14 +0200)]
sunxi: enable NAND support on 5.15

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agomodules: add Allwinner Mali support
Zoltan HERPAI [Mon, 26 Aug 2019 08:24:32 +0000 (10:24 +0200)]
modules: add Allwinner Mali support

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosunxi: add support for Banana Pi M3
Zoltan HERPAI [Thu, 5 Mar 2020 20:54:53 +0000 (21:54 +0100)]
sunxi: add support for Banana Pi M3

CPU Allwinner A83t Octa-core Cortex A7 @ 1.8GHz
Memory  2Gb DDR3
Storage SDcard, SATA (via USB), 8GB eMMC
Network 10/100/1000M ethernet, Ampak AP6212 wifi + BT
USB 2x USB 2.0

Flashing instructions:
 Standard sunxi SD card installation procedure - copy image to SD card,
 insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosunxi: add modules for AC100 MFD and RTC
Zoltan HERPAI [Sun, 17 Jan 2021 22:26:33 +0000 (23:26 +0100)]
sunxi: add modules for AC100 MFD and RTC

The X-Powers AC100 is a multi-function IC used to provide RTC
and audio codec via RSB (reduced serial bus, an Allwinner-
speciality). On some boards using the A80/A83T SoCs, aside
from the RTC functionality, the RTC is used as a clocksource
for the Ampak WiFi/BT modules.

Add modules for the core MFD support and the RTC.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoath79: add support for Ubiquiti LiteStation SR71
Zoltan HERPAI [Mon, 21 Dec 2020 22:39:51 +0000 (23:39 +0100)]
ath79: add support for Ubiquiti LiteStation SR71

Specifications:

SoC: AR7130
DRAM: 32Mb DDR1
Flash: 16Mb SPI-NOR
LAN: 2x 10/100Mbps via ADM6996 switch on MII
     (1 with PoE)
PCI: 1x mini-PCI
UART: standard UART header
JTAG: yes
LEDs: 8x LEDs

Installation instructions:

The original FIS partitioning does not provide enough
space for the kernel, so the installation must start
with re-partitioning the flash from RedBoot.

The MAC address is stored in the "boardconfig" partition, which is
automatically created.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoath79: add support for Atheros PB42 reference board
Zoltan HERPAI [Sun, 13 Dec 2020 00:37:56 +0000 (01:37 +0100)]
ath79: add support for Atheros PB42 reference board

Specifications:

SoC: AR7130
DRAM: 32Mb DDR1
Flash: 8Mb SPI-NOR
LAN: 4x 10/100Mbps via ADM6996 switch on MII
WAN: 1x 10/100Mbps via RMII
PCI: 2x mini-PCI
UART: standard QCA UART header
JTAG: yes
Button: 1x WPS, 1x reset
LEDs: 8x LEDs

Installation instructions:

The original FIS partitioning does not provide enough
space for the kernel, so the installation must start
with re-partitioning the flash from RedBoot.

The suggested partition table is the following:

RedBoot           0xBF000000  0xBF000000  0x00040000  0x00000000
kernel            0xBF040000  0x80060000  0x001F0000  0x80060000
rootfs            0xBF230000  0x00000000  0x005B0000  0x00000000
FIS directory     0xBF7E0000  0xBF7E0000  0x0000F000  0x00000000
RedBoot config    0xBF7EF000  0xBF7EF000  0x00001000  0x00000000

Which can be created with:
fis init
fis create -r 0x80060000 -e 0x80060000 -b 0xbf040000 -l 0x220000 kernel
fis create -b 0xbf260000 -l 0x580000 rootfs

The kernel and the rootfs must then be loaded from TFTP:

load -r -v -b 0x80060000 openwrt-ath79-generic-atheros_pb42-squashfs-kernel.bin
fis create kernel
load -r -v -b 0x80100000 openwrt-ath79-generic-atheros_pb42-squashfs-rootfs.bin
fis create rootfs

Once OpenWrt is installed, the normal sysupgrade method will work for
upgrades.

The MAC address is stored in the "boardconfig" partition, which is
automatically created.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoath79: DO NOT MERGE: add a custom WR741N v1/v2 8Mb variant
Zoltan HERPAI [Sun, 27 Feb 2022 11:03:23 +0000 (12:03 +0100)]
ath79: DO NOT MERGE: add a custom WR741N v1/v2 8Mb variant

Device is a WR741N v2.4 (AR7240) with the flash replaced with
an 8Mb chip. ART partition is moved to the end (0x7f0000). Also,
the commit adds the 741-related code back to the generic board.d
files.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoath79: add label to flash in the TP-Link dtsi
Zoltan HERPAI [Tue, 8 Jun 2021 11:37:34 +0000 (13:37 +0200)]
ath79: add label to flash in the TP-Link dtsi

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoixp4xx: image cleanup and add Gateworks GW2358
Zoltan HERPAI [Fri, 21 May 2021 22:07:48 +0000 (00:07 +0200)]
ixp4xx: image cleanup and add Gateworks GW2358

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoixp4xx: add Titan Wireless 266-2
Zoltan HERPAI [Fri, 21 May 2021 22:04:55 +0000 (00:04 +0200)]
ixp4xx: add Titan Wireless 266-2

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoixp4xx: add two boards, GW7001 and Pronghornmetro
Zoltan HERPAI [Fri, 21 May 2021 22:04:04 +0000 (00:04 +0200)]
ixp4xx: add two boards, GW7001 and Pronghornmetro

These boards use the second UART as their console, support is
not fully tested.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoixp4xx: add a second UART to the core DTS
Zoltan HERPAI [Fri, 21 May 2021 22:02:17 +0000 (00:02 +0200)]
ixp4xx: add a second UART to the core DTS

The ixp family provides two UARTs, the first is designated
as a high-speed one, the second is designated as the console. Boards
vary in which one they use as the console.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoixp4xx: bring back as a modernized target
Zoltan HERPAI [Fri, 21 May 2021 21:58:20 +0000 (23:58 +0200)]
ixp4xx: bring back as a modernized target

Work is in progress to modernize support for the SoC family, moving
board config to DTS and upgrading all required drivers.

As a first step, re-add a basic target with updated image creation,
the updated ethernet, PCI and flash driver, and cherry-pick some
of the older patches. Further legacy patches will be brought in as
required, and board support DTSes will be added as they come online.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoconfig: allow armeb to select KERNEL_EARLY_PRINTK
Zoltan HERPAI [Fri, 21 May 2021 21:56:07 +0000 (23:56 +0200)]
config: allow armeb to select KERNEL_EARLY_PRINTK

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoimx-bootlets: bump to latest version available
Zoltan HERPAI [Wed, 13 Mar 2019 23:31:37 +0000 (00:31 +0100)]
imx-bootlets: bump to latest version available

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosuniv: add new target
Zoltan HERPAI [Wed, 13 Mar 2019 23:24:50 +0000 (00:24 +0100)]
suniv: add new target

This is Allwinner's ARM926EJ-S core, which is one of its early
products, reappearing in recent compact designs. The SoC includes
32/64Mb memory integrated, and has display and USB interfaces,
allowing for small footprint boards.

The target consists of basic 5.10 support, with u-boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agoshmin: add new SH3-target
Zoltan HERPAI [Mon, 26 Aug 2019 15:04:33 +0000 (17:04 +0200)]
shmin: add new SH3-target

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agosh775x: add new target to support SH7751R-based (SH4) boards
Zoltan HERPAI [Mon, 26 Aug 2019 14:37:31 +0000 (16:37 +0200)]
sh775x: add new target to support SH7751R-based (SH4) boards

If SH4 hardware is not available for testing, the generated kernel and
rootfs can happily start up in qemu:

qemu-system-sh4 -M r2d -nographic -no-reboot -kernel openwrt-sh775x-zImage \
-append "console=ttySC1 noiotrap root=/dev/hda" -monitor null -serial null \
-serial stdio -drive file=openwrt-sh775x-rootfs-ext4.img,format=raw

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agogeneric: add missing symbols for SH4
Zoltan HERPAI [Fri, 1 Apr 2022 08:35:56 +0000 (10:35 +0200)]
generic: add missing symbols for SH4

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agogcc: add multilib m4/m4-nofpu config for sh4
Zoltan HERPAI [Sun, 30 Jan 2022 12:47:12 +0000 (13:47 +0100)]
gcc: add multilib m4/m4-nofpu config for sh4

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
23 months agompc85xx: enable error reporting for RAM and PCIe
Josef Schlehofer [Fri, 6 May 2022 17:13:05 +0000 (19:13 +0200)]
mpc85xx: enable error reporting for RAM and PCIe

All Freescale processors used in this target are capable to detect error
and correction. [1] It can not be used as kernel module. [2] This is
helpful to report hardware errors.

It enables three kernel options:

- EDAC, which is a subsystem
- EDAC_LEGACY_SYSFS, it enables sysfq nodes
- MP85XX, support for Freescale MPC8349, MPC8560, MPC8540, MPC8548, T4240

EDAC is already enabled for following targets:
qoriq, octeon, octeontx and zynq.

[1] https://cateee.net/lkddb/web-lkddb/EDAC.html
[2] https://patchwork.ozlabs.org/patch/554908/

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
23 months agouboot-fritz4040: Add support for Toshiba NAND
Christian Lamparter [Fri, 13 May 2022 19:44:30 +0000 (21:44 +0200)]
uboot-fritz4040: Add support for Toshiba NAND

From Andreas Böhler:

"Some revisions of the FRITZ!7530 use a Toshiba NAND with 8 bit ECC
in contrast to the Macronix NAND with 4 bit ECC.".

Uboot needs to know this in order to have a chance to load from
the NAND.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoipq-wifi: drop upstreamed board-2.bin
Christian Lamparter [Fri, 13 May 2022 20:25:36 +0000 (22:25 +0200)]
ipq-wifi: drop upstreamed board-2.bin

The BDFs for the:
Aruba AP-303
ASUS RT-AC42U
AVM FRITZ!Repeater 1200
Buffalo WTR-M2133HP
Cell C RTL30VW
D-Link DAP-2610
EnGenius EAP2200
EnGenius EMD1
EnGenius EMR3500
EnGenius EMR5000
EZVIZ CS-W3-WD1200G EUP
Google Wifi
Linksys MR8300 V1.0
Luma WRTQ-329ACN
MobiPromo CM520-79F
NEC Platforms WG2600HP3
Plasma Cloud PA1200 (updated version)
Plasma Cloud PA2200
ZTE MF286D

were upstreamed to the ath10k-firmware repository
and landed in linux-firmware.git.

Furthermore the BDFs for the:
8devices Habanero
OpenMesh A62
OpenMesh A42
AVM FRITZ!Box 4040

have been updated.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agolinux-firmware: take linux-firmware.git's qca99x0 boardfile
Christian Lamparter [Fri, 13 May 2022 20:07:59 +0000 (22:07 +0200)]
linux-firmware: take linux-firmware.git's qca99x0 boardfile

Kalle Valo managed to add the qca9980's boardfile in the
upstream repository. Sourcing the file from his repository
is no longer needed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agolinux-firmware: Update to version 20220509
Christian Lamparter [Fri, 13 May 2022 19:55:46 +0000 (21:55 +0200)]
linux-firmware: Update to version 20220509

git log --pretty=oneline --abbrev-commit 20220411..20220509 (sorted)

amdgpu:
480d6c2 amdgpu: update dcn_3_1_6_dmcub firmware
b4994be amdgpu: update gc_10_3_7_rlc firmware
61eb408 amdgpu: update psp_13_0_8 firmware
fcf9d8c amdgpu: update yellow carp DMCUB firmware

ath10k:
73743b8 ath10k: QCA4019 hw1.0: update board-2.bin
6ad0930 ath10k: QCA6174 hw3.0: update board-2.bin
729bd7f ath10k: QCA6174 hw3.0: update firmware-6.bin to WLAN.RM.4.4.1-00288-QCARMSWPZ-1
9fce09f ath10k: QCA9888 hw2.0: update board-2.bin
b155d85 ath10k: QCA9888 hw2.0: update firmware-5.bin to 10.4-3.9.0.2-00156
44b8aee ath10k: QCA9984 hw1.0: update board-2.bin
4ad3bd3 ath10k: QCA9984 hw1.0: update firmware-5.bin to 10.4-3.9.0.2-00156
1962cba ath10k: QCA99X0 hw2.0: add board-2.bin

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoipq40xx: Lyra: update RGB LED-Controller node for 5.10+
Christian Lamparter [Sat, 7 May 2022 17:41:55 +0000 (19:41 +0200)]
ipq40xx: Lyra: update RGB LED-Controller node for 5.10+

Add the reg and color property to each channel node. This
update is to accommodate the multicolor framework.

Refer to:
<https://lore.kernel.org/all/20200622185919.2131-9-dmurphy@ti.com>
<https://lore.kernel.org/all/20210818070209.1540451-1-michal.vokac@ysoft.com>

Note:

There is only a single extremely bright RGB-LED.
The RGB-color channels (i.e.: blue-0, blue-1 and blue-2)
are running in parallel to increase the current delivery
beyond what a single PWM-output on the LED controller
could do.

BugLink: https://github.com/openwrt/openwrt/issues/9851
Reported-By: Thomas Bøge <thomas@boegenielsen.dk>
Tested-By: Thomas Bøge <thomas@boegenielsen.dk>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoapm821xx: use nested fixed-partitions
Christian Lamparter [Sat, 14 May 2022 08:44:58 +0000 (10:44 +0200)]
apm821xx: use nested fixed-partitions

This makes it possible to fix Netgear WNDAP620+660 DTS ugliness.
Bring back the dtb and firmware partitions for the WNDR4700.
Thank you, mans0n.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agobcm53xx: remove MR32's specific get_leds_dt code
Christian Lamparter [Wed, 9 Mar 2022 19:20:20 +0000 (20:20 +0100)]
bcm53xx: remove MR32's specific get_leds_dt code

the existing diag.sh code will pick up the LED
by itself. This is not/no longer needed.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agolantiq: xway: disable unused switch drivers
Aleksander Jan Bajkowski [Tue, 21 Dec 2021 21:57:27 +0000 (22:57 +0100)]
lantiq: xway: disable unused switch drivers

None of the devices supported by target xway are using Realtek
RTL8366S, RTL8367A and RTL8367B switches. The switches mentioned
earlier were enabled when bumping the kernel version to 3.7 in
commit 3a948770cf46 ("add linux-v3.7").

Switches used by individual devices are listed below.

Device Switch PHY
Arcadyan ARV4510PW Infineon ADM6996I int. switch
Arcadyan ARV4519PW Atheros AR8216 int. switch
Arcadyan ARV7506PW11 Realtek RTL8306G int. switch
Arcadyan ARV7510PW22 Atheros AR8216 int. switch
Arcadyan ARV7518PW Atheros AR8216 int. switch
Arcadyan ARV7519PW Atheros RTL8306G int. switch
Arcadyan ARV7525PW N/A IC+ IP101A
Arcadyan ARV752DPW Realtek RTL8306G int. switch
Arcadyan ARV752DPW22 Atheros AR8216 int. switch
Arcadyan ARV8539PW22 Atheros AR8216 int. switch
AVM Fritzbox 7312 int. SoC Atheros AR8030-A
AVM Fritzbox 7320 int. SOC Lantiq PEF7071V
AudioCodes MediaPack MP-252 Infineon ADM6996I int. switch
BT Home Hub 2B Infineon ADM6996I int. switch
BT Home Hub 3A Infineon PSB6972 Lantiq PEF7071V
Buffalo WBMR-HP-G300H-A Atheros AR8316 int. switch
Buffalo WBMR-HP-G300H-B Atheros AR8316 int. switch
Lantiq EASY50712 Infinein ADM6996I int. switch
Netgear DGN3500 Realtek RTL8366RB int. switch
Netgear DGN3500B Realtek RTL8366RB int. switch
Siemens Gigaset sx76x Infineon ADM6996I int. switch
ZTE H201L Realtek RTL8306G int. switch
ZyXEL P-2601HN-F1 Realtek RTL8306E int. switch
ZyXEL P-2601HN-F3 Realtek RTL8306E int. switch

Reduces uncompressed kernel size by 36 kB.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
(checkpatch.pl fixes)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoramips: fix booting on Samknows SK-WB8
Piotr Dymacz [Fri, 13 May 2022 11:35:59 +0000 (13:35 +0200)]
ramips: fix booting on Samknows SK-WB8

This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of similar devices.

Fixes: #9824
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
23 months agoimage: drop unused 'BuildKernel/MkFIT'
Piotr Dymacz [Fri, 1 Apr 2022 15:35:42 +0000 (17:35 +0200)]
image: drop unused 'BuildKernel/MkFIT'

The 'MkFIT' recipe is no longer used across whole codebase.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
23 months agorealtek: do not reset SerDes on link change
Birger Koblitz [Sun, 24 Apr 2022 20:01:31 +0000 (22:01 +0200)]
realtek: do not reset SerDes on link change

Do not reset the RTL930x SerDes on link changes, instead set up
the SDS with internal PHYs for the SFP+ ports only.
This fixes the 8 1GBit ports on the Zyxel XGS1250 which
do not work without this patch.

A complete SerDes reset was performed on all SerDes links. For copper
1Gbit ports, this is commonly a single XGMII link to an RTL8218D. There
is however no support for setting up the XGMII link on RTL9300/RTL9310,
thereby wiping the (RX/TX) setup done by u-boot and breaking the 1GBit
ports. No SerDes reset should be done for these links.

The handling of SGMII/HiSGMII, 1000BX or 10GR links is actually entirely
different. All these modes need to be suitably RX calibrated and the
pre- main and post- amplifiers set up properly for TX.

The 10GBit SFP+ fiber links are recalibrated instead of reset, which
e.g. is necessary when someone pulls a module out and puts another in.
This makes swapping out 10GBit fiber modules possible. 1GBit modules are
not yet supported, nor any modules with an internal phy.

Tested-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
[rewrite commit message based on discussion]
Link: http://lists.infradead.org/pipermail/openwrt-devel/2022-May/038623.html
Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agokernel: bump 5.15 to 5.15.38
Rui Salvaterra [Mon, 9 May 2022 08:41:30 +0000 (09:41 +0100)]
kernel: bump 5.15 to 5.15.38

Deleted (upstreamed):
mediatek/patches-5.15/120-10-v5.18-mtd-nand-fix-ecc-parameters-for-mt7622.patch [1]

Other patches automatically rebased.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.38&id=3ec920d755ae69c201b358e8d8e96c32f51145d8

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
23 months agokernel: bump 5.15 to 5.15.37
Rui Salvaterra [Sun, 1 May 2022 21:23:46 +0000 (22:23 +0100)]
kernel: bump 5.15 to 5.15.37

Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
23 months agokernel: bump 5.15 to 5.15.36
Rui Salvaterra [Sat, 30 Apr 2022 23:40:39 +0000 (00:40 +0100)]
kernel: bump 5.15 to 5.15.36

Patches automatically rebased.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
23 months agoramips: add support for Cudy X6
Alessio Prescenzo [Wed, 22 Sep 2021 14:45:19 +0000 (16:45 +0200)]
ramips: add support for Cudy X6

Specifications:

SoC: MediaTek MT7621
RAM: 256 MB
Flash: 32 MB
WiFi: MediaTek MT7915E
Switch: 1 WAN, 4 LAN (Gigabit)
Ports: 1 USB 3.0
Buttons: Reset, WPS
LEDs: Power, System, Wan, Lan 1-4, WiFi 2.4G, WiFi 5G, WPS, USB
Power: DC 12V 1A tip positive
Installation:

Download and flash the manufacturer's built OpenWRT image available at
http://www.cudytech.com/openwrt_software_download
Install the new OpenWRT image via luci (System -> Backup/Flash firmware)
Be sure to NOT keep settings. The force upgrade may need to be checked
due to differences in router naming conventions.

Recovery:

Loads only signed manufacture firmware due to bootloader RSA verification
serve tftp-recovery image as /recovery.bin on 192.168.1.88/24
connect to any lan ethernet port
power on the device while holding the reset button
wait at least 8 seconds before releasing reset button for image to
download

Signed-off-by: Alessio Prescenzo <alessioprescenzo@gmail.com>
[ensure unique wireless MAC, fix GPIO pingroup]
Signed-off-by: David Bauer <mail@david-bauer.net>
23 months agorealtek: Trap all frames with switch as destination to CPU-port
Birger Koblitz [Sun, 24 Apr 2022 18:37:33 +0000 (20:37 +0200)]
realtek: Trap all frames with switch as destination to CPU-port

This fixes a bug where frames sent to the switch itself were
flooded to all ports unless the MAC address of the CPU-port
was learned otherwise.

Tested-by: Wenli Looi <wlooi@ucalgary.ca>
Tested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
[fix code formatting]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agorealtek: add support for ZyXEL GS1900-16
Raylynn Knight [Sun, 10 Apr 2022 07:26:59 +0000 (03:26 -0400)]
realtek: add support for ZyXEL GS1900-16

The ZyXEL GS1900-16 is a 16 port gigabit switch similar to other GS1900 switches.

Specifications
--------------
* Device:    ZyXEL GS1900-16
* SoC:       Realtek RTL8382M 500 MHz MIPS 4KEc
* Flash:     16 MiB Macronix MX25L12835F
* RAM:       128 MiB DDR2 SDRAM Nanya NT5TU128M8HE
* Ethernet:  16x 10/100/1000 Mbps
* LEDs:      1 PWR LED (green, not configurable)
             1 SYS LED (green, configurable)
             16 ethernet port link/activity LEDs (green, SoC controlled)
* Buttons:   1 "RESET" button on front panel
* Power      120-240V AC C13
* UART:      1 serial header (J12) with populated standard pin connector on
             the right back of the PCB.
             Pinout (front to back):
             + Pin 1 - VCC marked with white dot
             + Pin 2 - RX
             + Pin 3 - TX
             + PIn 4 - GND

Serial connection parameters:  115200 8N1.

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

OEM upgrade method:

* Log in to OEM management web interface
* Navigate to Maintenance > Firmware
* Select the HTTP radio button
* Select the Active radio button
* Use the browse button to locate the
realtek-generic-zyxel_gs1900-16-initramfs-kernel.bin
file amd select open so File Path is update with filename.
* Select the Apply button. Screen will display "Prepare
for firmware upgrade ...".
*Wait until screen shows "Do you really want to reboot?"
then select the OK button
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/realtek-generic-zyxel_gs1900-16-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

U-Boot TFTP method:

* Configure your client with a static 192.168.1.x IP (e.g. 192.168.1.10).
* Set up a TFTP server on your client and make it serve the initramfs image.
* Connect serial, power up the switch, interrupt U-boot by hitting the
  space bar, and enable the network:
   > rtk network on
* Since the GS1900-16 is a dual-partition device, you want to keep the OEM
  firmware on the backup partition for the time being. OpenWrt can only boot
  from the first partition anyway (hardcoded in the DTS). To make sure we are
  manipulating the first partition, issue the following commands:
  > setsys bootpartition 0
  > savesys
* Download the image onto the device and boot from it:
   > tftpboot 0x84f00000 192.168.1.10:openwrt-realtek-generic-zyxel_gs1900-16-initramfs-kernel.bin
   > bootm
* Once OpenWrt has booted, scp the sysupgrade image to /tmp and flash it:
   > sysupgrade -n /tmp/openwrt-realtek-generic-zyxel_gs1900-16-squashfs-sysupgrade.bin
   it may be necessary to restart the network (/etc/init.d/network restart) on
   the running initramfs image.

Signed-off-by: Raylynn Knight <rayknight@me.com>
[removed duplicate patch title, align RAM specification]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
23 months agokernel: backports: add Huawei MA5671A tx-fault workaround
Matthew Hagan [Wed, 4 May 2022 07:26:44 +0000 (08:26 +0100)]
kernel: backports: add Huawei MA5671A tx-fault workaround

This workaround will allow the MA5671A to function, ignoring the
persistently asserted tx-fault.

Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>
(added 5.15 backport)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoapm821xx: add support for kernel 5.15 for testing
Christian Lamparter [Thu, 5 May 2022 16:16:25 +0000 (18:16 +0200)]
apm821xx: add support for kernel 5.15 for testing

This patch copies over refreshed config and patches from 5.10
with the following changes:

 - dropped superfluous tc654/tc655 variant detection patch
   (tc654 support will become available upstream starting with
   5.17-rc7+).

 - dropped xhci msi(x) workaround... as the broken MSI(X)
   is now gone.

 - dropped dwc2 workaround since the driver was fixed and it
   works without it.

Please note: Netgear WNDAP660 & WNDAP620 users:

Due to the kernel's size increase, uboot will likely break
because it is overwrite the kernel during decompression.

To fix this (and debrick affected devices, no reflash
necessary), attach the RJ45-Serial-Console cable and
enter the following in the uboot prompt during bootup:

 setenv kernel_addr_r 1100000
 saveenv
 run bootcmd

to restore the old/previous behavior:

 setenv kernel_addr_r 600000
 saveenv
 run bootcmd

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agokernel: usb-xhci-pci-renesas: remove LINUX_5_10 dependency symbol
Christian Lamparter [Thu, 5 May 2022 19:15:57 +0000 (21:15 +0200)]
kernel: usb-xhci-pci-renesas: remove LINUX_5_10 dependency symbol

With 5.4 out of the picture, remove LINUX_5_10 here. This is
needed for the WNDR4700 as otherwise kmod-usb3 isn't available
for 5.15.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agogeneric: 5.15: add missing symbol
Christian Lamparter [Thu, 5 May 2022 18:19:32 +0000 (20:19 +0200)]
generic: 5.15: add missing symbol

Found during apm821xx refresh.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agokernel/x86: move x86' specific watchdogs to the x86 target
Christian Lamparter [Sun, 1 May 2022 12:10:43 +0000 (14:10 +0200)]
kernel/x86: move x86' specific watchdogs to the x86 target

upstream linux have these watchdogs locked behind X86.
These will not build on other architectures. So move them
to target/linux/x86/modules.mk

drivers/watchdog/Kconfig:

|config F71808E_WDT
| tristate "Fintek F718xx, F818xx Super I/O Watchdog"
| depends on X86
|[...]
|config IT87_WDT
| tristate "IT87 Watchdog Timer"
| depends on X86
|[...]
|config ITCO_WDT
| tristate "Intel TCO Timer/Watchdog"
| depends on (X86 || IA64) && PCI
|[...]
|config W83627HF_WDT
| tristate "Watchdog timer for W83627HF/W83627DHG and compatibles"
| depends on X86
|[...]

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agox86: detangle meraki-mx100 / nu801 build confusion
Christian Lamparter [Sun, 1 May 2022 12:10:35 +0000 (14:10 +0200)]
x86: detangle meraki-mx100 / nu801 build confusion

Grommish reported the dreaded build error that happend with 5.4
since the kernel didn't have the cgpio v2 interface. His reason
for the removed 5.4 was that the octeon target had a memory leak
issue, so he had to backport the removed 5.4 kernel for his tests.

Chen Minqiang chimed in and noted that no matter what (i.e.
@TARGET_x86 in depends) didn't prevent the package from being build
on other targets.

From what I can tell, the reason for this was that +nu801 meant
that kmod-meraki-mx100 pulled in an unconditional dependency as
part of to the kernel build.

|scripts/package-metadata.pl mk tmp/.packageinfo
|
|$(curdir)/kernel/linux/compile += $(curdir)/firmware/linux-firmware/compile \
| $(curdir)/firmware/prism54-firmware/compile \
| $(curdir)/kernel/gpio-button-hotplug/compile \
| >>> $(curdir)/system/gpio-cdev/nu801/compile <<<

change this by making the dependency conditional on the
meraki-mx100 module itself. Note that the nu801 enables/sets
the  KCONFIG for the cgpio v2 interface itself, since the
userspace program and not the kernel meraki-mx100 relies on it.

Reference: <https://github.com/openwrt/openwrt/commit/eeb8fd4ce7e9>
Reported-by: Grommish <grommish@gmail.com>
Reported-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agox86: add ib700wdt module for x86 qemu watchdogs
Christian Lamparter [Sun, 1 May 2022 12:10:25 +0000 (14:10 +0200)]
x86: add ib700wdt module for x86 qemu watchdogs

QEMU+Libvirt can emulate the ib700wdt watchdogs
which due to its I/O-Port mapping makes it x86
specific.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agoarmvirt: 64: enable driver for QEMU' supported watchdog
Christian Lamparter [Sun, 1 May 2022 12:10:18 +0000 (14:10 +0200)]
armvirt: 64: enable driver for QEMU' supported watchdog

QEMU can emulate several watchdogs:
aspeed SoC, i6300esb, ib700wdt, imx2, cmsdk-apb and sbsa_gwdt.

Out of these, the ARM SBSA Generic Watchdog (sbsa_gwdt)
makes the most sense for the armvirt' 64 target. Both imx2 and
aspeed are guarded by special vendor specific CONFIG_ in the
upstream kernel.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agokernel: provide i6300esb for qemu/libvirt
Christian Lamparter [Sun, 1 May 2022 12:10:07 +0000 (14:10 +0200)]
kernel: provide i6300esb for qemu/libvirt

the Intel i6300esb is QEMU's default watchdog. And unlike
the real "Intel i6300ESB I/O Controller hub" hardware, the
i6300esb watchdog driver works on non-x86 targets like for
ARM (armvirt 32bit) and potentially virtual PowerPC and MIPS
targets (if there was any).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
23 months agokernel: fix corrupted padding on small packets with mt753x dsa
Felix Fietkau [Fri, 6 May 2022 19:54:48 +0000 (21:54 +0200)]
kernel: fix corrupted padding on small packets with mt753x dsa

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agokernel: backport flow offload fixes to 5.10
Felix Fietkau [Fri, 6 May 2022 13:49:58 +0000 (15:49 +0200)]
kernel: backport flow offload fixes to 5.10

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agokernel: fix flow offload issues with pppoe
Felix Fietkau [Fri, 6 May 2022 13:49:58 +0000 (15:49 +0200)]
kernel: fix flow offload issues with pppoe

sync xt_FLOWOFFLOAD code with latest version of nft_flow_offload

Signed-off-by: Felix Fietkau <nbd@nbd.name>
23 months agoipq40xx: consolidate ar40xx driver files
Sungbo Eo [Wed, 4 May 2022 15:54:43 +0000 (00:54 +0900)]
ipq40xx: consolidate ar40xx driver files

Commit f4fb63d2ab4f ("ipq40xx: 5.10: move AR40xx to MDIO drivers") moved
the ar40xx driver files to kernel version specific directories to place
them in different subdirectory in kernel tree. But now kernel 5.4 is
gone and there is no reason to keep them separate. Move them back to
common files/ directory.

Signed-off-by: Sungbo Eo <mans0n@gorani.run>
23 months agoipq40xx: 5.15: fix ar40xx driver
Nick Hainke [Sun, 1 May 2022 19:06:52 +0000 (21:06 +0200)]
ipq40xx: 5.15: fix ar40xx driver

Also apply commit ab7e53e5cce7 ("ipq40xx: 5.10: fix ar40xx driver") to
5.15 driver.

The commit fixes the data corruption on TX packets. Packets are
transmitted, but their contents are replaced with zeros. This error is
caused by the lack of guard (50 ms) intervals between calibration phases.
This error is treated by adding mdelay(50) to the calibration function
code. In the original qca-ssda code, these mdelays were existing, but in
the ar41xx.c they are gone.

Fixes: 87318eb17936 ("ipq40xx: 5:15: copy config and patch from 5.10")
Signed-off-by: Nick Hainke <vincent@systemli.org>
23 months agoramips: add i2c in dts for GL-MT300N-V2
Ptilopsis Leucotis [Sat, 30 Apr 2022 20:57:04 +0000 (23:57 +0300)]
ramips: add i2c in dts for GL-MT300N-V2

According wiki https://docs.gl-inet.com/en/2/hardware/mt300n-v2/
GL-MT300N-V2 have I2C interface on GPIO4, GPIO5.
Adding I2C in device tree make possible using I2C on this device.

Signed-off-by: Ptilopsis Leucotis <PtilopsisLeucotis@yandex.com>
23 months agoipq806x: add support for Arris TR4400 v2 / RAC2V1A
Rodrigo Balerdi [Thu, 7 Apr 2022 06:18:59 +0000 (03:18 -0300)]
ipq806x: add support for Arris TR4400 v2 / RAC2V1A

Hardware specs:
  SoC: Qualcomm IPQ8065 (dual core Cortex-A15)
  RAM: 512 MB DDR3
  Flash: 256 MB NAND, 32 MB NOR
  WiFi: QCA9983 2.4 GHz, QCA9984 5 GHz
  Switch: QCA8337
  Ethernet: 5x 10/100/1000 Mbit/s
  USB: 1x USB 3.0 Type-A
  Buttons: WPS, Reset
  Power: 12 VDC, 2.5 A

Ethernet ports:
  1x WAN: connected to eth2
  4x LAN: connected via the switch to eth0 and eth1
          (eth0 is disabled in OEM firmware)

MAC addresses (OEM and OpenWrt):
  fw_env @ 0x00  d4:ab:82:??:??:?a  LAN (eth1)
  fw_env @ 0x06  d4:ab:82:??:??:?b  WAN (eth2)
  fw_env @ 0x0c  d4:ab:82:??:??:?c  WLAN 2.4 GHz (ath1)
  fw_env @ 0x12  d4:ab:82:??:??:?d  WLAN 5 GHz (ath0)
  fw_env @ 0x18  d4:ab:82:??:??:?e  OEM usage unknown (eth0 in OpenWrt)

  OID d4:ab:82 is registered to:
  ARRIS Group, Inc., 6450 Sequence Drive, San Diego CA 92121, US

More info:
  https://openwrt.org/inbox/toh/arris/tr4400_v2

IMPORTANT:

This port requires moving the 'fw_env' partition prior to first boot to
consolidate 70% of the usable space in flash into a contiguous partition.
'fw_env' contains factory-programmed MAC addresses, SSIDs, and passwords.
Its contents must be copied to 'rootfs_1' prior to booting via initramfs.
Note that the stock 'fw_env' partition  will be wiped during sysupgrade.

A writable 'stock_fw_env' partition pointing to the old, stock location
is included in the port to help rolling back this change if desired.

Installation:

- Requires serial access and a TFTP server.
- Fully boot stock, press ENTER, type in:
mtd erase /dev/mtd21
dd if=/dev/mtd22 bs=128K count=1 | mtd write - /dev/mtd21
umount /config && ubidetach -m 23 && mtd erase /dev/mtd23
- Reboot and interrupt U-Boot by pressing a key, type in:
set mtdids 'nand0=nand0'
set mtdparts 'mtdparts=nand0:155M@0x6500000(mtd_ubi)'
set bootcmd 'ubi part mtd_ubi && ubi read 0x44000000 kernel && bootm'
env save
- Setup TFTP server serving initramfs image as 'recovery.bin', type in:
set ipaddr 192.168.1.1
set serverip 192.168.1.2
tftpboot recovery.bin && bootm
- Use sysupgrade to install squashfs image.

This port is based on work done by AmadeusGhost <amadeus@jmu.edu.cn>.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
[add 5.15 changes for 0069-arm-boot-add-dts-files.patch]
Signed-off-by: Sungbo Eo <mans0n@gorani.run>
23 months agopackages: nvram: add NVRAM quirks for bcm53xx target
Arınç ÜNAL [Wed, 4 May 2022 08:34:29 +0000 (11:34 +0300)]
packages: nvram: add NVRAM quirks for bcm53xx target

Add NVRAM quirks script for the bcm53xx target. Split NVRAM quirks for the
bcm47xx and bcm53xx targets. Move clear partialboot NVRAM quirk for Linksys
EA9500 here. Add set wireless LED behaviour quirk for Asus RT-AC88U.

Use boot() instead of start() as nvram commands are meant to be executed
only once, at boot.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
23 months agofirewall: config: remove restictions on DHCPv6 allow rule
Tiago Gaspar [Wed, 4 May 2022 09:36:07 +0000 (10:36 +0100)]
firewall: config: remove restictions on DHCPv6 allow rule

Remove restrictions on source and destination addresses, which aren't
specified on RFC8415, and for some reason in openwrt are configured
to allow both link-local and ULA addresses.
As cleared out in issue #5066 there are some ISPs that use Gloabal
Unicast addresses, so fix this rule to allow them.

Fixes: #5066
Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
[rebase onto firewall3, clarify subject, bump PKG_RELEASE]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
23 months agoltq-vdsl-app: disconnect when service is stopped
Jan Hoffmann [Wed, 27 Apr 2022 17:40:50 +0000 (19:40 +0200)]
ltq-vdsl-app: disconnect when service is stopped

Stop the connection when the control daemon is terminated. The code is
a modified version of the termination routine in version 4.23.1 of the
daemon (which doesn't support VR9 modems anymore).

This could also be implemented by calling the acos and acs commands via
dsl_cpe_pipe.sh in the init script. However, doing it in the daemon
itself has the advantage of also working if it is terminated in another
way (for example during sysupgrade).

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
23 months agoltq-vdsl/ltq-adsl: fix elapsed time calculation
Jan Hoffmann [Mon, 25 Apr 2022 19:52:39 +0000 (21:52 +0200)]
ltq-vdsl/ltq-adsl: fix elapsed time calculation

The driver maintains elapsed times by repeatedly accumulating the time
since the previous update in a loop. For the elapsed showtime time, the
time difference is truncated to seconds before adding it, leading to a
sizable error over time.

Move the truncation to before calculation of the time difference in
order to remove this error. Also maintain the total elapsed time in the
same way in full seconds, to prevent the unsigned 32-bit counter from
wrapping around after about 50 days.

Testing on a VR9 device shows that the reported line uptime now matches
the actual elapsed wall time. The ADSL variant is only compile-tested,
but it should also work as the relevant code is identical.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
23 months agoltq-atm/ltq-ptm: avoid unnecessary build dependencies
Jan Hoffmann [Mon, 25 Apr 2022 19:43:50 +0000 (21:43 +0200)]
ltq-atm/ltq-ptm: avoid unnecessary build dependencies

Right now, both ltq-adsl-mei and ltq-vdsl-mei are always built, even
when they aren't necessary for the selected variant. This can cause the
build to fail, for example ltq-vdsl-mei doesn't build successfully here
on xway target due to the vectoring callback.

Make these dependencies conditional on the specific package variants,
so they are only built when actually needed.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
23 months agouqmi: update to git HEAD
Daniel Golle [Wed, 4 May 2022 00:32:17 +0000 (01:32 +0100)]
uqmi: update to git HEAD

 56cb2d4 nas: add decoding of cell_id
 9a9019a uqmi: wms - added storage to read text messages

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agofstools: update to git HEAD
Daniel Golle [Tue, 3 May 2022 01:10:37 +0000 (02:10 +0100)]
fstools: update to git HEAD

 9e11b37 fstools: remove SELinux restorecon hack

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agoprocd: update to git HEAD
Daniel Golle [Tue, 3 May 2022 01:07:40 +0000 (02:07 +0100)]
procd: update to git HEAD

 652e6df init: restore SELinux labels after policy is loaded

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agobase-files: simplify restorecon logic
Daniel Golle [Mon, 2 May 2022 20:07:16 +0000 (21:07 +0100)]
base-files: simplify restorecon logic

Remove forgotten redundant selinuxenabled call and skip the whole
thing in case $IPKG_INSTROOT is set as labels are anyway applied only
later on in fakeroot when squashfs is created.

Fixes: 6d7272852e ("base-files: add missing $IPKG_INSTROOT to restorecon call")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agoselinux-policy: update to version 1.1
Dominick Grift [Sat, 16 Apr 2022 13:10:39 +0000 (15:10 +0200)]
selinux-policy: update to version 1.1

try to clean up some labeling inconsistencies
iwinfo loose ends
ucode loose ends
Makefile: adjust mintesttgt (adds blockmount/blockd)
nftables: reads inherited netifd pipe
ucode: reads inherited netifd pipes
mountroot: fowner
sandbox: writes inherited dropbear pipes
unbound related to /tmp/etc/ssl
unbound loose ends
adds a sslconftmpfile for /tmp/etc/ssl
README: maintain a wish list in the README
iwinfo: netifd forgot write
gptfdisk loose ends
iwinfo: netifd wpad reads/writes inherited netifd fifo files
netifd (mac80211.sh) executes iwinfo
luci: executes wireguard
luci-cgi: audits xtables execute access
rcuhttpd: lists ssl certfile dirs
iwinfo, wifi,nftables usage of ttyd pty if available
urandomseed: seedrng needs cap_sys_admin
iwinfo iwinfo, nftables and some chronyd rules related to ntp nts server
nftables, wifi and adds iwinfo skel
nftables, rpcd, ucode
nftables, ucode and seedrng ucode, fw3/nftables, luci
adds ucode skel and some fw3/nftables related
urandomseed: some seedrng rules
fw3 adds some support for fw4
urandomseed: /etc/seedrng is for seed.credit
hotplugcal: runs ucode which is interpreter like
adds a nftables skeleton and makes xtables optional
agent: allow all agents to write inherited dropbear pipes
urandomseed: this seems to be replaced by seedrng
kmodloader: label /etc/modules.conf kmodloader.conffile
Revert "shelexecfile: remove auditallow rule"
Makefile: sort the modules to process by secilc
Moves back to git.defensec.nl
unbound odhcpd (ip) reads net proc
tcp dump
shelexecfile: remove auditallow rule
rrd.cil: fixes indent
Target rddtool from cgi-io instead of runnit it without transition
rrd.cil related
rrd, rpcd, cgiio clean ups related to luci-app-statistics
Rules for rrd files and luci-statistics
unboundcontrol ordering
Several missing permissions
blockmount, dnsmasq, hotplugcall, rpcd, unbound
adds mctp_socket (linux 5.15)
ip: forgot tc-tiny type transition to go along with the fc spec
ip: adds a fc spec for tc-tiny (called by sqm)
adds ttyACM fc spec and various assorted loose ends
.gitattributes: do not export the github workflows
workflow use selinux 3.3

project moved back to https://git.defensec.nl/selinux-policy.git

Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
23 months agoipq40xx: fix BDF file for pcie wifi chip on the GL.Inet GL-B2200
Enrico Mioso [Thu, 28 Apr 2022 06:57:24 +0000 (08:57 +0200)]
ipq40xx: fix BDF file for pcie wifi chip on the GL.Inet GL-B2200

After the switch to pre-calibration, ath10k would fail to initialize
the PCIE Wi-Fi on the GL-B200 as follows:

ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142)
ath10k_pci 0000:01:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000
[...]
ath10k_pci 0000:01:00.0: failed to fetch board data for bus=pci,bmi-chip-id=0,bmi-board-id=16,variant=GL-B2200 from ath10k/QCA9888/hw2.0/board-2.bin
ath10k_pci 0000:01:00.0: failed to fetch board-2.bin or board.bin from ath10k/QCA9888/hw2.0
ath10k_pci 0000:01:00.0: failed to fetch board file: -12
ath10k_pci 0000:01:00.0: could not probe fw (-12)

Repackage the BDF file after renaming relevant fields and files to
allow for the Wi-Fi interface to start again.

Fixes: 80d34d9d593 ("ipq40xx: document pcie wifi chip on the GL.Inet GL-B2200")
CC: Christian Lamparter <chunkeey@gmail.com>
CC: Robert Marko <robimarko@gmail.com>
Reviewed-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com>
23 months agobase-files: add missing $IPKG_INSTROOT to restorecon call
Daniel Golle [Mon, 2 May 2022 18:58:56 +0000 (19:58 +0100)]
base-files: add missing $IPKG_INSTROOT to restorecon call

Update to overlooked v2 version of Dominick Grift's patch.

Fixes: 5109bd164c ("base-files: address sed in-place without SELinux awareness")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agodnsmasq: fix jail_mount for serversfile
Bruno Victal [Fri, 15 Apr 2022 14:30:01 +0000 (15:30 +0100)]
dnsmasq: fix jail_mount for serversfile

Fix 'serversfile' option not being jail_mounted by the init script.

Signed-off-by: Bruno Victal <brunovictal@outlook.com>
23 months agobase-files: address sed in-place without SELinux awareness
Dominick Grift [Sun, 1 May 2022 17:54:04 +0000 (19:54 +0200)]
base-files: address sed in-place without SELinux awareness

sed(1) in busybox does not support this functionality:
https://git.savannah.gnu.org/cgit/sed.git/tree/sed/execute.c#n598

This causes /etc/group to become mislabeled when a package requests
that a uid/gid be added on OpenWrt with SELinux

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[move restorecon inside lock]
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
23 months agobase-files: fix sysupgrade for kernel-out-of-UBI
Rodrigo Balerdi [Mon, 2 May 2022 08:33:01 +0000 (05:33 -0300)]
base-files: fix sysupgrade for kernel-out-of-UBI

Commit ecbcc0b59551 bricks devices on which the raw kernel and UBI mtd
partitions overlap.

This is the case of the ZyXEL NR7101 for example. Its OEM bootloader has
no UBI support. OpenWrt splits the stock kernel mtd partition into a raw
kernel part used by the bootloader and a UBI part used to store rootfs
and rootfs_data. Running mtd erase on the complete partition during
sysupgrade erases the UBI part and results in a soft brick.

Arguably the best solution would be to fix the partition layouts so that
kernel and UBI partitions do not overlap, also including a stock_kernel
partition to help reverting to stock firmware. This would have the added
benefit of protecting UBI from kernel images that are excessively large.

Fixes: ecbcc0b59551 ("base-files: safer sysupgrade.tar for kernel-out-of-UBI")
Reported-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
23 months agofstools: update to git HEAD
Daniel Golle [Sun, 1 May 2022 16:00:47 +0000 (17:00 +0100)]
fstools: update to git HEAD

 f0fc66a libfstools: check for overlay mounting errors
 128ecaf Update / fix extroot comments
 8a0ba3b libfstools: get rid of "extroot_prefix" global variable
 649cd3f libfstools: use variable for overlay mount-point
 922f1b3 libfstools: avoid segfault in find_mount_point
 ce5eacb libfstools: mtd: improve error handling
 898b328 blockd: restore device_move semantics
 0917d22 block: don't probe mtdblock on NAND (with legacy exceptions)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
23 months agoramips: ethernet: ralink: add led_source dts-binding
Tamas Balogh [Fri, 15 Apr 2022 09:16:37 +0000 (11:16 +0200)]
ramips: ethernet: ralink: add led_source dts-binding

this adds the new dts-binding "mediatek,led_source"
currently for MT7628AN and MT7688 built-in switches,
which is documented as a 3-bit field configuring the
switch LEDs for various control schemes from 0 to 3.

Normally this is not needed, but e.g. for Asus RT-AC1200-V2
it is a must to set it to the anyway undocumented value
of 4, to have the switch LEDs react correctly on link/act
events. This is an MT7628DAN device, but I doubt this is
a speciality of this particular SoC.

Also added the RT305X_ESW_LED_OFF value to LED states.
Did also rename the register RT5350_EWS_REG_LED_POLARITY
to RT5350_EWS_REG_LED_CONTROL, which is the correct name.
Also making use of defines for some hardcoded values.

Signed-off-by: Tamas Balogh <tamasbalogh@hotmail.com>
23 months agokirkwood: set testing kernel version to 5.15
Pawel Dembicki [Mon, 25 Apr 2022 07:36:39 +0000 (09:36 +0200)]
kirkwood: set testing kernel version to 5.15

This patch configures kernel testing version for kirkwood target.

Compile tested: all
Run tested: Endian 4i

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agokirkwood: refresh 5.15 kernel config
Pawel Dembicki [Fri, 22 Apr 2022 07:26:20 +0000 (09:26 +0200)]
kirkwood: refresh 5.15 kernel config

Done by "make kernel_oldconfig".

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
23 months agogeneric: 5.15: add missing symbol
Pawel Dembicki [Fri, 22 Apr 2022 07:24:34 +0000 (09:24 +0200)]
generic: 5.15: add missing symbol

Found durring kirkwood refreshing.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>