openwrt/staging/jow.git
2 years agoath79: mikrotik: use OpenWrt loader for initram image
John Thomson [Wed, 18 May 2022 23:18:20 +0000 (09:18 +1000)]
ath79: mikrotik: use OpenWrt loader for initram image

Return to using the OpenWrt kernel loader to decompress and load kernel
initram image.

Continue to use the vmlinuz kernel for squashfs.

Mikrotik's bootloader RouterBOOT on some ath79 devices is
failing to boot the current initram, due to the size of the initram image.

On the ath79 wAP-ac:
a 5.7MiB initram image would fail to boot
After this change:
a 6.6MiB initram image successfully loads

This partially reverts commit e91344776b9ba7c864be88d915c9c0df0eb790dd.

An alternative of using RouterBOOT's capability of loading an initrd ELF
section was investigated, but the OpenWrt kernel loader allows larger image.

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2 years agolantiq: xrx200: backport upstream network fixes
Aleksander Jan Bajkowski [Mon, 2 May 2022 18:31:17 +0000 (20:31 +0200)]
lantiq: xrx200: backport upstream network fixes

This series contains bug fixes that may occur under
memory pressure.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2 years agomvebu: PCI: aardvark: Implement workaround for PCIe Completion Timeout
Josef Schlehofer [Tue, 2 Aug 2022 14:07:53 +0000 (16:07 +0200)]
mvebu: PCI: aardvark: Implement workaround for PCIe Completion Timeout

Turris MOX randomly crashes up, when there is connected miniPCIe card
MediaTek MT7915 with the following output:

[   71.457007] Internal error: synchronous external abort: 96000210 [#1] SMP
[   71.464021] Modules linked in: xt_connlimit pppoe ppp_async nf_conncount iptable_nat ath9k xt_state xt_nat xt_helper xt_conntrack xt_connmark xt_connbytes xt_REDIREl
[   71.464187]  btintel br_netfilter bnep bluetooth ath9k_hw ath10k_pci ath10k_core ath sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_mg
[   71.629589] CPU: 0 PID: 1298 Comm: kworker/u5:3 Not tainted 5.4.114 #0
[   71.636319] Hardware name: CZ.NIC Turris Mox Board (DT)
[   71.641725] Workqueue: napi_workq napi_workfn
[   71.646221] pstate: 80400085 (Nzcv daIf +PAN -UAO)
[   71.651169] pc : mt76_set_irq_mask+0x118/0x150 [mt76]
[   71.656385] lr : mt7915_init_debugfs+0x358/0x368 [mt7915e]
[   71.662038] sp : ffffffc010003cd0
[   71.665451] x29: ffffffc010003cd0 x28: 0000000000000060
[   71.670929] x27: ffffffc010a56f98 x26: ffffffc010c0fa9a
[   71.676407] x25: ffffffc010ba8788 x24: ffffff803e01fe00
[   71.681885] x23: 0000000000000030 x22: ffffffc010003dc4
[   71.687361] x21: 0000000000000000 x20: ffffff803e01fea4
[   71.692839] x19: ffffff803cb725c0 x18: 000000002d660780
[   71.698317] x17: 0000000000000000 x16: 0000000000000001
[   71.703795] x15: 0000000000005ee0 x14: ffffffc010d1d000
[   71.709272] x13: 0000000000002f70 x12: 0000000000000000
[   71.714749] x11: 0000000000000000 x10: 0000000000000040
[   71.720226] x9 : ffffffc010bbe980 x8 : ffffffc010bbe978
[   71.725704] x7 : ffffff803e4003f0 x6 : 0000000000000000
[   71.731181] x5 : ffffffc02f240000 x4 : ffffffc010003e00
[   71.736658] x3 : 0000000000000000 x2 : ffffffc008e3f230
[   71.742135] x1 : 00000000000d7010 x0 : ffffffc0114d7010
[   71.747613] Call trace:
[   71.750137]  mt76_set_irq_mask+0x118/0x150 [mt76]
[   71.754990]  mt7915_dual_hif_set_irq_mask+0x108/0xdc0 [mt7915e]
[   71.761098]  __handle_irq_event_percpu+0x6c/0x170
[   71.765950]  handle_irq_event_percpu+0x34/0x88
[   71.770531]  handle_irq_event+0x40/0xb0
[   71.774486]  handle_level_irq+0xe0/0x170
[   71.778530]  generic_handle_irq+0x24/0x38
[   71.782667]  advk_pcie_irq_handler+0x11c/0x238
[   71.787249]  __handle_irq_event_percpu+0x6c/0x170
[   71.792099]  handle_irq_event_percpu+0x34/0x88
[   71.796680]  handle_irq_event+0x40/0xb0
[   71.800633]  handle_fasteoi_irq+0xdc/0x190
[   71.804855]  generic_handle_irq+0x24/0x38
[   71.808988]  __handle_domain_irq+0x60/0xb8
[   71.813213]  gic_handle_irq+0x8c/0x198
[   71.817077]  el1_irq+0xf0/0x1c0
[   71.820314]  el1_da+0xc/0xc0
[   71.823288]  mt76_set_irq_mask+0x118/0x150 [mt76]
[   71.828141]  mt7915_mac_tx_free+0x4c4/0x828 [mt7915e]
[   71.833352]  mt7915_queue_rx_skb+0x5c/0xa8 [mt7915e]
[   71.838473]  mt76_dma_cleanup+0x89c/0x1248 [mt76]
[   71.843329]  __napi_poll+0x38/0xf8
[   71.846835]  napi_workfn+0x58/0xb0
[   71.850342]  process_one_work+0x1fc/0x390
[   71.854475]  worker_thread+0x48/0x4d0
[   71.858252]  kthread+0x120/0x128
[   71.861581]  ret_from_fork+0x10/0x1c
[   71.865273] Code: 52800000 d65f03c0 f9562c00 8b214000 (b9400000)
[   71.871560] ---[ end trace 1d4e29987011411b ]---
[   71.876320] Kernel panic - not syncing: Fatal exception in interrupt
[   71.882875] SMP: stopping secondary CPUs
[   71.886923] Kernel Offset: disabled
[   71.890519] CPU features: 0x0002,00002008
[   71.894649] Memory Limit: none
[   71.897799] Rebooting in 3 seconds..

Patch is awaiting upstream merge:
https://lore.kernel.org/linux-pci/20220802123816.21817-1-pali@kernel.org/T/#u

There was also discussion about it in the linux-pci mailing list, where can
be found response from Marvell's employee regarding A3720 PCIe erratum 3.12, which seems to provide further details which help this issue:
https://lore.kernel.org/linux-pci/BN9PR18MB425154FE5019DCAF2028A1D5DB8D9@BN9PR18MB4251.namprd18.prod.outlook.com/t/#u

Reported-by: Ondřej Caletka <ondrej@caletka.cz> [Turris MOX]
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2 years agompc85xx: Make AP3825i boot env partition writable
Martin Kennedy [Sun, 28 Aug 2022 04:05:46 +0000 (00:05 -0400)]
mpc85xx: Make AP3825i boot env partition writable

End-users may need to be able to rewrite u-boot configuration on the
WS-AP3825i, which has had repeated issues with the exact configuration
of u-boot, e.g. commit 1d06277407 ("mpc85xx: Fix output location of
padded dtb") (alongside other failures documented for example in this
post[^1] from the main AP3825i porting thread).

To assist with this, remove the `read-only` property from the u-boot
configuration partitions cfg1 and cfg2.

[^1]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/107

Signed-off-by: Martin Kennedy <hurricos@gmail.com>
2 years agompc85xx: add patch to fix gpio mpc8xxx
Josef Schlehofer [Tue, 6 Sep 2022 11:17:02 +0000 (13:17 +0200)]
mpc85xx: add patch to fix gpio mpc8xxx

Backports patch, which is currently on review [1] for kernel 5.10 and
kernel 5.15, where it applies cleanly. This was tested on CZ.NIC Turris
1.1 router running OpenWrt 21.02.03 with kernel 5.15.

Before:

- In /var/log/messages:
```
[   16.392988] lm90 0-004c: cannot request IRQ 48
[   16.398280] lm90: probe of 0-004c failed with error -22
```

- Sensors does not work:
```
root@turris:~# sensors
No sensors found!
Make sure you loaded all the kernel drivers you need.
Try sensors-detect to find out which these are.
```

After:

```
root@turris:/# sensors
sa56004-i2c-0-4c
Adapter: MPC adapter (i2c@3000)
temp1:        +44.0°C  (low  =  +0.0°C, high = +70.0°C)
                       (crit = +85.0°C, hyst = +75.0°C)
temp2:        +73.8°C  (low  =  +0.0°C, high = +70.0°C)  ALARM (HIGH)
                       (crit = +85.0°C, hyst = +75.0°C)
```

[1] https://lore.kernel.org/linux-gpio/20220906105431.30911-1-pali@kernel.org/

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2 years agoramips: add support for Linksys E7350
Rosen Penev [Mon, 22 Mar 2021 21:06:14 +0000 (14:06 -0700)]
ramips: add support for Linksys E7350

Linksys E7350 is an 802.11ax (Wi-Fi 6) router, based on MediaTek
MT7621A.

Specifications:
- SoC: MT7621 (880MHz, 2 Cores)
- RAM: 256 MB
- Flash: 128 MB NAND
- Wi-Fi:
  - MT7915D: 2.4/5 GHz (DBDC)
- Ethernet: 5x 1GiE MT7530
- USB: 1x USB 3.0
- UART: J4 (57600 baud)
  - Pinout: [3V3] (TXD) (RXD) (blank) (GND)

Notes:
* This device has a dual-boot partition scheme, but this firmware works
  only on boot partition 1.

Installation:

Upload the generated factory.bin image via the stock web firmware
updater.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years agoramips: add support for Belkin RT1800
Rosen Penev [Mon, 22 Mar 2021 21:06:14 +0000 (14:06 -0700)]
ramips: add support for Belkin RT1800

Belkin RT1800 is an 802.11ax (Wi-Fi 6) router, based on MediaTek
MT7621A.

Specifications:
- SoC: MT7621 (880MHz, 2 Cores)
- RAM: 256 MB
- Flash: 128 MB NAND
- Wi-Fi:
  - MT7915D: 2.4/5 GHz (DBDC)
- Ethernet: 5x 1GiE MT7530
- USB: 1x USB 3.0
- UART: J4 (57600 baud)
  - Pinout: [3V3] (TXD) (RXD) (blank) (GND)

Notes:
* This device has a dual-boot partition scheme, but this firmware works
  only on boot partition 1.

Installation:

Upload the generated factory.bin image via the stock web firmware
updater.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years agoramips: add RT-N600 alternative name to RT-AC1200
Ray Wang [Wed, 31 Aug 2022 13:32:10 +0000 (21:32 +0800)]
ramips: add RT-N600 alternative name to RT-AC1200

RT-N600 is internally the same as RT-AC1200, as veryfied by @russinnes .
Adding alt_name so that people can find it in firmware selector.

Signed-off-by: Ray Wang <raywang777@foxmail.com>
Tested-by: Russ Innes <russ.innes@gmail.com>
2 years agoramips: add support for Kroks Rt-Cse SIM Injector DS
Andrey Butirsky [Tue, 7 Dec 2021 14:37:48 +0000 (17:37 +0300)]
ramips: add support for Kroks Rt-Cse SIM Injector DS

Aka Kroks Rt-Cse5 UW DRSIM (KNdRt31R16), ID 1958:
https://kroks.ru/search/?text=1958
See Kroks OpenWrt fork for support of other models:
https://github.com/kroks-free/openwrt

Device specs:
- CPU: MediaTek MT7628AN
- Flash: 16MB SPI NOR
- RAM: 64MB
- Bootloader: U-Boot
- Ethernet: 5x 10/100 Mbps
- 2.4 GHz: b/g/n SoC
- USB: 1x
- SIM-reader: 2x (driven by a dedicated chip with it's own firmware)
- Buttons: reset
- LEDs: 1x Power, 1x Wi-Fi, 12x others (SIM status, Internet, etc.)

Flashing:
- sysupgrade image via stock firmware WEB interface, IP: 192.168.1.254
- U-Boot launches a WEB server if Reset button is held during power up,
  IP: 192.168.1.1

MAC addresses as verified by OEM firmware:
vendor   OpenWrt   source
LAN      eth0      factory 0x4 (label)
2g       wlan0     label

Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
2 years agoramips: add support for Kroks Rt-Pot mXw DS RSIM router
Andrey Butirsky [Wed, 7 Sep 2022 22:19:35 +0000 (01:19 +0300)]
ramips: add support for Kroks Rt-Pot mXw DS RSIM router

Aka "Kroks KNdRt31R19".
Ported from v19.07.8 of OpenWrt fork:
see https://github.com/kroks-free/openwrt
for support of other models.

Device specs:
- CPU: MediaTek MT7628AN
- Flash: 16MB SPI NOR
- RAM: 64MB
- Bootloader: U-Boot
- Ethernet: 1x 10/100 Mbps
- 2.4 GHz: b/g/n SoC
- mPCIe: 1x (usually equipped with an LTE modem by vendor)
- Buttons: reset
- LEDs: 1x Modem, 1x Injector, 1x Wi-Fi, 1x Status

Flashing:
- sysupgrade image via stock firmware WEB interface.
- U-Boot launches a WEB server if Reset button is held during power up.
Server IP: 192.168.1.1

SIM card switching:
The device supports up to 4 SIM cards - 2 locally on board and 2 on
remote SIM-injector.
By default, 1-st local SIM is active.
To switch to e.g. 1-st remote SIM:
echo 0 > /sys/class/gpio/modem1power/value
echo 0 > /sys/class/gpio/modem1sim1/value
echo 1 > /sys/class/gpio/modem1rsim1/value
echo 1 > /sys/class/gpio/modem1power/value

MAC addresses as verified by OEM firmware:
vendor   OpenWrt   source
LAN      eth0      factory 0x4 (label)
2g       wlan0     label

Signed-off-by: Kroks <dev@kroks.ru>
[butirsky@gmail.com: port to master; drop dts-v1]
Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
2 years agokernel: bump 5.10 to 5.10.142
John Audia [Thu, 8 Sep 2022 10:19:20 +0000 (06:19 -0400)]
kernel: bump 5.10 to 5.10.142

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2 years agokernel: bump 5.10 to 5.10.141
John Audia [Mon, 5 Sep 2022 10:47:34 +0000 (06:47 -0400)]
kernel: bump 5.10 to 5.10.141

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2 years agolldpd: update to 1.0.15
Nick Hainke [Tue, 30 Aug 2022 08:59:31 +0000 (10:59 +0200)]
lldpd: update to 1.0.15

Release Notes:
https://github.com/lldpd/lldpd/releases/tag/1.0.15

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibbsd: update to 0.11.6
Nick Hainke [Tue, 23 Aug 2022 14:04:42 +0000 (16:04 +0200)]
libbsd: update to 0.11.6

Update to latest version. Needs libmd.

Old size:
37615 libbsd0_0.10.0-1_aarch64_cortex-a53.ipk
new size (libmd linked static):
38514 libbsd0_0.11.6-1_aarch64_cortex-a53.ipk

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibmd: add library providing message digest functions
Nick Hainke [Tue, 23 Aug 2022 13:57:49 +0000 (15:57 +0200)]
libmd: add library providing message digest functions

This library is needed by >= libbsd-0.11.3.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoiproute2: add missing libbpf dependency
Kien Truong [Sat, 10 Sep 2022 08:25:35 +0000 (15:25 +0700)]
iproute2: add missing libbpf dependency

This patch adds libbpf to the dependencies of tc-mod-iptables.

The package tc-mod-iptables is missing libbpf as a dependency,
which leads to the build failure described in bug #9491

    LIBBPF_FORCE=on set, but couldn't find a usable libbpf

The build dependency is already automatically added because some other
packages from iproute2 depend on libbpf, but bpftools has multiple build
variants. With multiple build variants none gets build by default and
the build system will not build bpftools before iproute2.

Fixes: #9491
Signed-off-by: Kien Truong <duckientruong@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agopx5g-wolfssl: replace unnecessary strncmp()
Jian Huang [Thu, 1 Sep 2022 14:05:47 +0000 (14:05 +0000)]
px5g-wolfssl: replace unnecessary strncmp()

Replace some of the calls to strncmp() with strcmp().

Signed-off-by: Jian Huang <JyanHw@outlook.com>
2 years agoramips: add config-5.15 for mt7620 subtarget
Daniel Golle [Sat, 10 Sep 2022 19:59:16 +0000 (20:59 +0100)]
ramips: add config-5.15 for mt7620 subtarget

Add Kernel config for testing Linux 5.15 for the mt7620 subtarget.
Tested on Youku YK-L1 which boots fine.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agorealtek: add support for TP-Link SG2452P v4 aka T1600G-52PS v4
Andreas Böhler [Fri, 26 Aug 2022 09:21:40 +0000 (11:21 +0200)]
realtek: add support for TP-Link SG2452P v4 aka T1600G-52PS v4

This is an RTL8393-based switch with 802.3af on all 48 ports.

Specifications:
---------------
 * SoC:       Realtek RTL8393M
 * Flash:     32 MiB SPI flash
 * RAM:       256 MiB
 * Ethernet:  48x 10/100/1000 Mbps with PoE+
 * Buttons:   1x "Reset" button, 1x "Speed" button
 * UART:      1x serial header, unpopulated
 * PoE:       12x TI TPS23861 I2C PoE controller, 384W PoE budget
 * SFP:       4 SFP ports

Works:
------
  - (48) RJ-45 ethernet ports
  - Switch functions
  - Buttons
  - All LEDs on front panel except port LEDs
  - Fan monitoring and basic control

Not yet enabled:
----------------
  - PoE - ICs are not in AUTO mode, so the kernel driver is not usable
  - Port LEDs
  - SFP cages

Install via web interface:
-------------------------

Not supported at this time.

Install via serial console/tftp:
--------------------------------

The U-Boot firmware drops to a TP-Link specific "BOOTUTIL" shell at
38400 baud. There is no known way to exit out of this shell, and no
way to do anything useful.

Ideally, one would trick the bootloader into flashing the sysupgrade
image first. However, if the image exceeds 6MiB in size, it will not
work. To install OpenWRT:

Prepare a tftp server with:
 1. server address: 192.168.0.146
 2. the image as: "uImage.img"

Power on device, and stop boot by pressing any key.
Once the shell is active:
 1. Ground out the CLK (pin 16) of the ROM (U6)
 2. Select option "3. Start"
 3. Bootloader notes that "The kernel has been damaged!"
 4. Release CLK as soon as bootloader thinks image is corrupted.
 5. Bootloader enters automatic recovery -- details printed on console
 6. Watch as the bootloader flashes and boots OpenWRT.

Blind install via tftp:
-----------------------

This method works when it's not feasible to install a serial header.

Prepare a tftp server with:
 1. server address: 192.168.0.146
 2. the image as: "uImage.img"
 3. Watch network traffic (tcpdump or wireshark works)
 4. Power on the device.
 5. Wait 1-2 seconds then ground out the CLK (pin 16) of the ROM (U6)
 6. When 192.168.0.30 makes tftp requests, release pin 16
 7. Wait 2-3 minutes for device to auto-flash and boot OpenWRT

Signed-off-by: Andreas Böhler <dev@aboehler.at>
2 years agox86: setup netdev paths for MX100
Martin Kennedy [Mon, 22 Aug 2022 00:37:18 +0000 (20:37 -0400)]
x86: setup netdev paths for MX100

The Meraki MX100 has ten 1000BASE-T and 2 SFP ethernet ports through
3, 4-port PCIe devices. The default enumeration of these network
devices' names does not correspond to their labeling. Fix this by
explicitly naming the devices, mapping against their sysfs path.

Note that these default network names can only be up to 8 characters,
because we can have up to 8 characters of modifiers (e.g. ^br-,
.4096$), and because the maximum network interface name is 16
characters long.

Signed-off-by: Martin Kennedy <hurricos@gmail.com>
[lowercase subject]
Signed-off-by: Paul Spooren <mail@aparcar.org>
2 years agobase-files: rename ethernet devs on known boards
Martin Kennedy [Mon, 22 Aug 2022 00:37:18 +0000 (20:37 -0400)]
base-files: rename ethernet devs on known boards

Some platforms lack an established way to name netdevs; for example,
on x86, PCIe-based ethernet interfaces will be named starting from
eth0 in the order they are probed. This is a problem for many devices
supported explicitly by OpenWrt which have hard-wired, standalone or
on-CPU NICs not supported by DSA (which is usually used to rename the
ports based on their ostensible function).

To fix this, add a mapping between ethernet device name and sysfs
device path to board.json; this allows us to configure ethernet device
names we know about for a given board so that they correspond to
external labeling.

Signed-off-by: Martin Kennedy <hurricos@gmail.com>
2 years agoimagebuilder: clean KDIR_TMP before building
Paul Spooren [Sat, 10 Sep 2022 14:35:31 +0000 (16:35 +0200)]
imagebuilder: clean KDIR_TMP before building

Building images usally stores them in KDIR_TMP and then copies them over
to BIN_DIR. This is fine as rebuilding of images overwrites existing
images. When using the EXTRA_IMAGE_NAME variable frequently this fills
up the ImageBuilder KDIR_TMP folder since every built image is stored
forever.

This commit clears the KDIR_TMP folder before building a new image.

Below an example how sysupgrade.openwrt.org filled up after the release
of 22.03.0 where every created image contains a hash of the package
selction in the filename:

     aparcar@asu-01:~/asu/worker1/cache/22.03.0$ du -d 1 -h
     400M    ./kirkwood
     260M    ./gemini
     2.0G    ./ipq806x
     1.7G    ./ipq40xx
     8.1G    ./ramips
     4.0K    ./octeon
     495M    ./sunxi
     728M    ./lantiq
     1.8G    ./rockchip
     3.7G    ./mediatek
     4.0K    ./realtek
     5.4G    ./mvebu
     8.9G    ./ath79
     3.0G    ./bcm47xx
     14G     ./bcm27xx
     11G     ./x86
     4.0K    ./bcm63xx
     312M    ./mpc85xx
     600M    ./apm821xx
     5.4G    ./bcm53xx
     66G     .

Signed-off-by: Paul Spooren <mail@aparcar.org>
2 years agomediatek: filogic: use WPS button instead of RST on BPi-R3
Daniel Golle [Fri, 9 Sep 2022 19:44:46 +0000 (20:44 +0100)]
mediatek: filogic: use WPS button instead of RST on BPi-R3

The GPIO used for the RST button is also used for PCIe-CLKREQ signal.
Hence it cannot be used as button signal if PCIe is also used.
Wire up WPS button to serve as KEY_RESTART in Linux and "reset" button
in U-Boot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agokernel: fix Aquantia AQtion Atlantic module dependencies
Daniel Golle [Sat, 10 Sep 2022 17:21:39 +0000 (18:21 +0100)]
kernel: fix Aquantia AQtion Atlantic module dependencies

The buildbot revealed that
Package kmod-atlantic is missing dependencies for the following libraries:
hwmon.ko
macsec.ko
make[2]: *** [modules/netdevices.mk:1474: /builder/shared-workdir/build/bin/targets/mediatek/mt7629/packages/kmod-atlantic_5.15.67-1_arm_cortex-a7.ipk] Error 1
make[2]: Leaving directory '/builder/shared-workdir/build/package/kernel/linux'
time: package/kernel/linux/compile#43.51#17.03#415.37
    ERROR: package/kernel/linux failed to build.
make[1]: *** [package/Makefile:116: package/kernel/linux/compile] Error 1
make[1]: *** Waiting for unfinished jobs....

Add those missing dependencies to fix the build.

Fixes: d02e887d7c ("kernel: add Aquantia AQtion Atlantic 10Gbps Ethernet")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agobase-files: support "metric" in board.json
Rafał Miłecki [Sat, 3 Sep 2022 12:31:29 +0000 (14:31 +0200)]
base-files: support "metric" in board.json

It allows prepopulating /etc/config/network interface-s with predefined
metric. It may be useful for devices with multiple WAN ports.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 years agoMakefile: replace head call with grep's -m
Rosen Penev [Sat, 20 Aug 2022 21:12:32 +0000 (14:12 -0700)]
Makefile: replace head call with grep's -m

head is not necessary here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years agokernel: add Aquantia AQtion Atlantic 10Gbps Ethernet
Mehdi Ahmadi [Fri, 26 Aug 2022 21:56:45 +0000 (23:56 +0200)]
kernel: add Aquantia AQtion Atlantic 10Gbps Ethernet

Driver support for Aquantia AQtion Atlantic 10Gbps Ethernet NIC
with the AQC107, AQC108 and others chipsets found on:

 - TP-Link: TX401
 - Asus: XG-C100C, ROG Areion 10G NIC
 - & more ...

Successfully tested using a build with 22.03.0-rc6
(x86_64/EFI image) and the following outputs:

```
[    3.092053] pci 0000:06:00.0: [1d6a:07b1] type 00 class 0x020000
[    3.094983] pci 0000:06:00.0: reg 0x10: [mem 0x50800000-0x5080ffff 64bit]
[    3.098880] pci 0000:06:00.0: reg 0x18: [mem 0x50810000-0x50810fff 64bit]
[    3.108868] pci 0000:06:00.0: reg 0x20: [mem 0x50400000-0x507fffff 64bit]
[    3.108883] pci 0000:06:00.0: enabling Extended Tags
[    3.118874] pci 0000:06:00.0: supports D1 D2
[    3.118874] pci 0000:06:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    3.128891] pci 0000:06:00.0: 7.876 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x1 link at 0000:00:1d.0 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)
[   10.312793] atlantic 0000:06:00.0: enabling device (0000 -> 0002)
[   23.223813] atlantic 0000:06:00.0 eth0: atlantic: link change old 0 new 10000

lsmod && uname -ar ;
  # atlantic              147456  0
  # # // ...
  # Linux version 5.10.138 (vagrant@make-host) (x86_64-openwrt-linux-musl-gcc (OpenWrt GCC 11.3.0 r20430-18a2b29aa1) 11.3.0, GNU ld (GNU Binutils) 2.37) #0 SMP Mon Aug 29 09:54:00 2022
```

Signed-off-by: Mehdi Ahmadi <aphorise@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
[ fix wrong commit author as requested by author itself ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agoscripts: always check certificates
Josh Roys [Sat, 23 Jul 2022 15:23:16 +0000 (11:23 -0400)]
scripts: always check certificates

Remove flags from wget and curl instructing them to ignore bad server
certificates. Although other mechanisms can protect against malicious
modifications of downloads, other vectors of attack may be available
to an adversary.

TLS certificate verification can be disabled by turning oof the
"Enable TLS certificate verification during package download" option
enabled by default in the "Global build settings" in "make menuconfig"

Signed-off-by: Josh Roys <roysjosh@gmail.com>
[ add additional info on how to disable this option ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agoCI: kernel: Cache external toolchain
Christian Marangi [Fri, 9 Sep 2022 19:09:30 +0000 (21:09 +0200)]
CI: kernel: Cache external toolchain

Cache external toolchain for each target to remove load from openwrt cdn
server and make the external toolchain setup quicker.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agomediatek: bananapi-r3: remove kmod-btmtkuart from default packages
Daniel Golle [Sat, 10 Sep 2022 02:22:17 +0000 (03:22 +0100)]
mediatek: bananapi-r3: remove kmod-btmtkuart from default packages

The package kmod-btmtkuart is specific for MT7622 and isn't available
for MT7986 (which doesn't have this built-in Bluetooth like MT7622).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agokernel: fix build on bcm27xx target platform
Daniel Golle [Sat, 10 Sep 2022 00:24:08 +0000 (01:24 +0100)]
kernel: fix build on bcm27xx target platform

The bump to Linux 5.15.67 brought some changes in the VC4 display
driver which we had also patched downstream. Fix our local patches to
fix the build.

Fixes: fbe2f7db86 ("kernel: bump 5.15 to 5.15.67")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agorockchip: add system-LED aliases specific to OpenWrt
David Bauer [Fri, 9 Sep 2022 21:35:49 +0000 (23:35 +0200)]
rockchip: add system-LED aliases specific to OpenWrt

Add the aliases sections required to detect LEDs specific to OpenWrt
boot / update indication for the NanoPi R4S.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agorockchip: ensure NanoPi R4S has unique MAC address
David Bauer [Fri, 9 Sep 2022 23:01:57 +0000 (01:01 +0200)]
rockchip: ensure NanoPi R4S has unique MAC address

Ensure the MAC address for all NanoPi R4S boards is assigned unique for
each board.

FriendlyElec ship two versions of the R4S: The standard as well as the
enterprise edition with only the enterprise edition including the EEPROM
chip that stores the unique MAC address.

In order to assign both board types unique MAC addresses, fall back on
the same method used for the NanoPi R2S in case the EEPROM chip is not
present by generating the board MAC from the SD card CID.

[0] https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R4S#Differences_Between_R4S_Standard_Version_.26_R4S_Enterprise_Version

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agorealtek: fix RTL839x receive tag decoding
Bjørn Mork [Fri, 9 Sep 2022 06:28:13 +0000 (08:28 +0200)]
realtek: fix RTL839x receive tag decoding

The previous fixup was incomplete, and the offsets for the
queue and crc_error cpu_tag bitfields were still wrong on
RTL839x.

Fixes: 545c6113c93b ("realtek: fix RTL838x receive tag decoding")
Suggested-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2 years agolinux-firmware: package MediaTek MT792[12] Bluetooth firmware
Daniel Golle [Fri, 9 Sep 2022 19:29:10 +0000 (20:29 +0100)]
linux-firmware: package MediaTek MT792[12] Bluetooth firmware

btusb fails to start on MT792[12] hardware without the appropriate
firmware being loaded first:
[    9.750285] bluetooth hci0: Direct firmware load for mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin failed with error -2
[    9.765723] bluetooth hci0: Falling back to sysfs fallback for: mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin

Package firmware for MediaTek MT792[12] Bluetooth from linux-firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agokernel: modules: bluetooth: include support for MediaTek USB
Daniel Golle [Fri, 9 Sep 2022 19:27:17 +0000 (20:27 +0100)]
kernel: modules: bluetooth: include support for MediaTek USB

Enable MediaTek protocol in btusb module to support e.g. the Bluetooth
part of the MT7921K NGFF/M.2 module.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agokernel: backport MediaTek USB Bluetooth additions
Daniel Golle [Fri, 9 Sep 2022 19:46:33 +0000 (20:46 +0100)]
kernel: backport MediaTek USB Bluetooth additions

Backport commits from linux.git adding support for various MT7921
Bluetooth USB IDs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomediatek: rename some patches
Daniel Golle [Thu, 8 Sep 2022 20:14:32 +0000 (21:14 +0100)]
mediatek: rename some patches

To ease maintainance rename patches to contain the kernel version they
have first been part of.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomediatek: 5.15: add missing patch suffix
Chukun Pan [Tue, 6 Sep 2022 15:15:39 +0000 (23:15 +0800)]
mediatek: 5.15: add missing patch suffix

The 213 patch is missing filename suffix. Fix it.

Fixes: dabcaac ("mediatek: add mt7986 soc support to the target")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2 years agomediatek: mt7986a/b-rfb: fix 02_network setup
Chukun Pan [Mon, 5 Sep 2022 15:16:09 +0000 (23:16 +0800)]
mediatek: mt7986a/b-rfb: fix 02_network setup

According to the device tree, the lan ports are
lan0 to lan3, and the wan port is eth1.

Fixes: cffc77a ("mediatek: add filogic subtarget")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2 years agokernel: bump 5.15 to 5.15.67
John Audia [Thu, 8 Sep 2022 13:03:12 +0000 (09:03 -0400)]
kernel: bump 5.15 to 5.15.67

All patches automatically rebased

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
2 years agokernel: add # CONFIG_ARM64_ERRATUM_2441009 symbol
John Audia [Tue, 6 Sep 2022 21:34:02 +0000 (17:34 -0400)]
kernel: add # CONFIG_ARM64_ERRATUM_2441009 symbol

No current targets are ARMv9 or Cortex-A510 so comment the new symbol.[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/arm64/Kconfig?id=v5.15.65&id2=v5.15.64

Signed-off-by: John Audia <therealgraysky@proton.me>
2 years agoipq40xx: add LTE packages for GL-AP1300
David Bauer [Fri, 9 Sep 2022 16:14:08 +0000 (18:14 +0200)]
ipq40xx: add LTE packages for GL-AP1300

Add LTE packages required for operating the LTE modem optionally shipped
with the GL-AP1300.

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agoipq40xx: switch to 5.15 as default kernel
Nick Hainke [Wed, 20 Jul 2022 18:39:09 +0000 (20:39 +0200)]
ipq40xx: switch to 5.15 as default kernel

The testing kernel received now multiple months of testing. Set 5.15 as
default to give it a test with a broader audience.

Tested on:
- MikroTik SXTsq 5 AC
- FritzBox 4040/7530
- ZyXEL NBG6617

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agokernel: mt7530: add support for in-band managed link
Daniel Golle [Fri, 9 Sep 2022 04:01:47 +0000 (05:01 +0100)]
kernel: mt7530: add support for in-band managed link

Add support for in-band managed link status to support SFP cage
connected to port 5 of the MT7531 switch on the Bananapi BPi-R3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agokernel: mtk_sgmii: re-organize PCS link status reporting
Daniel Golle [Fri, 9 Sep 2022 04:00:57 +0000 (05:00 +0100)]
kernel: mtk_sgmii: re-organize PCS link status reporting

Don't report speed in case link is down.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agorealtek: fix RTL838x receive tag decoding
Bjørn Mork [Thu, 8 Sep 2022 17:35:34 +0000 (19:35 +0200)]
realtek: fix RTL838x receive tag decoding

Commit dc9cc0d3e2a1 ("realtek: add QoS and rate control") replaced a
16 bit reserved field in the RTL83xx packet header with the initial
cpu_tag word, shifting the real cpu_tag fields by one.  Adjusting for
this new shift was partially forgotten in the new RX tag decoders.

This caused the switch to block IGMP, effectively blocking IPv4
multicast.

The bug was partially fixed by commit 9d847244d9fd ("realtek: fix
RTL839X receive tag decoding")

Fix on RTL838x too, including correct NIC_RX_REASON_SPECIAL_TRAP value.

Suggested-by: Jan Hoffmann <jan@3e8.eu>
Fixes: dc9cc0d3e2a1 ("realtek: add QoS and rate control")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2 years agomediatek: fix typo in bpi-r64 image recipe
Daniel Golle [Thu, 8 Sep 2022 18:29:44 +0000 (19:29 +0100)]
mediatek: fix typo in bpi-r64 image recipe

Janusz Dziedzic reported a typo introduced by a recent commit. Fix it.

Fixes: 50c892d67b ("mediatek: bpi-r64: make initramfs/recovery optional")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoath79: add support for ZTE MF281
David Bauer [Mon, 5 Sep 2022 17:23:16 +0000 (19:23 +0200)]
ath79: add support for ZTE MF281

Add support for the ZTE MF281 battery-powered WiFi router.

Hardware
--------
SoC:    Qualcomm Atheros QCA9563
RAM:    128M DDR2
FLASH:  2M SPI-NOR (GigaDevice GD25Q16)
        128M SPI-NAND (GigaDevice)
WLAN:   QCA9563 2T2R 802.11 abgn
        QCA9886 2T2R 802.11 nac
WWAN:   ASRMicro ASR1826
ETH:    Qualcomm Atheros QCA8337
UART:   115200 8n1
        Unpopulated connector next to SIM slot
        (SIM) GND - RX - TX - 3V3
        Don't connect 3V3
BUTTON: Reset - WPS
LED:    1x debug-LED (internal)
        LEDs on front of the device are controlled
        using the modem CPU and can not be controlled
        by OpenWrt

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

1. Connect to the serial console. Power up the device and interrupt
   autoboot when prompted

2. Connect a TFTP server reachable at 192.168.1.66 to the ethernet port.
   Serve the OpenWrt initramfs image as "speedbox-2.bin"

3. Boot the initramfs image using U-Boot

   $ setenv serverip 192.168.1.66
   $ setenv ipaddr 192.168.1.154
   $ tftpboot 0x84000000 speedbox-2.bin
   $ bootm

4. Copy the OpenWrt factory image to the device using scp and write to
   the NAND flash

   $ mtd write /path/to/openwrt/factory.bin firmware

WWAN
----

The WWAN card can be used with OpenWrt. Example configuration for
connection with a unauthenticated dual-stack APN:

network.lte=interface
network.lte.proto='ncm'
network.lte.device='/dev/ttyACM0'
network.lte.pdptype='IPV4V6'
network.lte.apn='internet.telekom'
network.lte.ipv6='auto'
network.lte.delay='10'

The WWAN card is running a modified version of OpenWrt and handles
power-management as well as the LED controller (AW9523). A root shell
can be acquired by installing adb using opkg and executing "adb shell".

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agomediatek: bpi-r64: make initramfs/recovery optional
Daniel Golle [Thu, 8 Sep 2022 01:44:30 +0000 (02:44 +0100)]
mediatek: bpi-r64: make initramfs/recovery optional

Only include recovery image in SD card image generated for the
BananaPi BPi-R64 if building with CONFIG_TARGET_ROOTFS_INITRAMFS
This allows to build images larger than 32 MB (the limit for
initramfs/recovery image) by deselecting initramfs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomediatek: bpi-r3: make initramfs/recovery optional
Daniel Golle [Thu, 8 Sep 2022 01:34:28 +0000 (02:34 +0100)]
mediatek: bpi-r3: make initramfs/recovery optional

Only include recovery image in SD card image generated for the
BananaPi BPi-R3 if building with CONFIG_TARGET_ROOTFS_INITRAMFS.
This allows to build images larger than 32 MB (the limit for
initramfs/recovery image) by deselecting initramfs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoipq-wifi: add Pakedge WR-1 support
Tomasz Maciej Nowak [Tue, 6 Sep 2022 13:32:34 +0000 (15:32 +0200)]
ipq-wifi: add Pakedge WR-1 support

Calibration variants:
Pakedge-WR-1 ETSI, FCC and IC-2.4GHz
Pakedge-WR-1-ACMA ACMA
Pakedge-WR-1-IC IC-5GHz
Pakedge-WR-1-SRRC SRRC

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2 years agoipq40xx: add support for Pakedge WR-1
Tomasz Maciej Nowak [Tue, 6 Sep 2022 13:32:33 +0000 (15:32 +0200)]
ipq40xx: add support for Pakedge WR-1

Pakedge WR-1 is a dual-band wireless router.

Specification
SoC: Qualcomm Atheros IPQ4018
RAM: 256 MB DDR3
Flash: 32 MB SPI NOR
WIFI: 2.4 GHz 2T2R integrated
      5 GHz 2T2R integrated
Ethernet: 5x 10/100/1000 Mbps QCA8075
USB: 1x 2.0
LEDS: 8x (3 GPIO controlled, 5 connected to switch)
Buttons: 1x GPIO controlled
UART: pin header J5
      1. 3.3V, 2. GND, 3. TX, 4. RX
      baud: 115200, parity: none, flow control: none

Installation
1. Rename initramfs image to:
   openwrt-ipq806x-qcom-ipq40xx-ap.dk01.1-c1-fit-uImage-initramfs.itb
   and copy it to USB flash drive with FAT32 file system.
2. Connect USB flash drive to the router and apply power while pressing
   reset button. Hold the button, on the lates bootloader version, when
   Power and WiFi-5 LEDs will start blinking release it. For the older
   bootloader holding it for 15 seconds should suffice.
3. Now the router boots the initramfs image, at some point (close to one
   minute) the Power LED will start blinking, when stops, router is fully
   booted.
4. Connect to one of LAN ports and use SSH to open the shell at
   192.168.1.1.
5. ATTENTION! now backup the mtd8 and mtd9 partitions, it's necessary if,
   at some point, You want to go back to original firmware. The firmware
   provided by manufacturer on its site is encrypted and U-Boot accepts
   only decrypted factory images, so there's no way to restore original
   firmware.
6. If the backup is prepared, transfer the sysupgrade image to the router
   and use 'sysupgrade' command to flash it.
7. After successful flashing router will reboot. At some point the Power
   LED will start blinking, wait till it stops, then router is ready for
   configuration.

Additional information
U-Boot command line is password protected. Password is unknown.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2 years agokernel: load loop driver before creating overlay
Tomasz Maciej Nowak [Mon, 29 Aug 2022 14:21:52 +0000 (16:21 +0200)]
kernel: load loop driver before creating overlay

Creating overlay will fail if there's no loop device.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2 years agokernel: load FAT filesystem drivers before mount_root
Tomasz Maciej Nowak [Mon, 29 Aug 2022 14:22:18 +0000 (16:22 +0200)]
kernel: load FAT filesystem drivers before mount_root

Devices using GPT usually have FAT filesystem on boot partition and
that's where the intermediary backup of system configuration is stored
on sysupgrade. Automatic restoring of OpenWrt configuration after
sysupgrade will be inhibited if the driver is not loaded and file system
type is not specified in mount command.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
2 years agoRevert "tools/meson: update to 0.63.1"
Daniel Golle [Wed, 7 Sep 2022 03:46:31 +0000 (04:46 +0100)]
Revert "tools/meson: update to 0.63.1"

This reverts commit da95084d3478226bede2aed04e21f47525b7e0ad.
It was pulled by accident.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomediatek: remove redundant patch
Daniel Golle [Wed, 7 Sep 2022 03:23:22 +0000 (04:23 +0100)]
mediatek: remove redundant patch

The patch 921-mt7986-add-mmc-support.patch introduced by commit
dabcaac443 ("mediatek: add mt7986 soc support to the target") has never
been applied in a way that it would have any effect as it actually
created a file target/linux/generic/patches-5.15/... in the kernel tree
and was probably a patch intended to be applied to openwrt.git instead
of being put into kernel patches folder as a file.

As an upstream commit from vanilla Linux also adding support for MT7986
to the mtk-sd driver has already been included we can remove that old
patch.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoarm-trusted-firmware-tools: update to v2.7
Daniel Golle [Tue, 6 Sep 2022 20:16:06 +0000 (21:16 +0100)]
arm-trusted-firmware-tools: update to v2.7

Update host build of fiptool and use the new python sptool.py instead
of the previous sptool executable.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agotools/llvm: update to 14.0.6
Nick Hainke [Mon, 29 Aug 2022 11:35:06 +0000 (13:35 +0200)]
tools/llvm: update to 14.0.6

Update to latest version.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibunwind: update to 1.6.2
Nick Hainke [Mon, 29 Aug 2022 06:17:58 +0000 (08:17 +0200)]
libunwind: update to 1.6.2

Remove upstreamed:
- 001-Don-t-force-exec_prefix-lib64-libdir-on-ppc64.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agotools/meson: update to 0.63.1
Nick Hainke [Mon, 29 Aug 2022 06:03:08 +0000 (08:03 +0200)]
tools/meson: update to 0.63.1

Release Notes:
- 0.62.0 https://mesonbuild.com/Release-notes-for-0-62-0.html
- 0.63.0 https://mesonbuild.com/Release-notes-for-0-63-0.html
- (other notes are not available)

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agotools/fakeroot: update to 1.29
Nick Hainke [Mon, 29 Aug 2022 05:55:14 +0000 (07:55 +0200)]
tools/fakeroot: update to 1.29

Release Notes:
https://salsa.debian.org/clint/fakeroot/-/commit/8dd9e34a2e54862a902040d76adbd1c1a42ffc35

Refresh patches:
- 400-alpine-libc.musl-fix.patch
- 600-macOS.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agotools/expat: update to 2.4.8
Nick Hainke [Mon, 29 Aug 2022 05:48:53 +0000 (07:48 +0200)]
tools/expat: update to 2.4.8

Release Notes:
https://github.com/libexpat/libexpat/blob/R_2_4_8/expat/Changes

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agotools/bc: update to 1.07
Nick Hainke [Mon, 29 Aug 2022 05:26:52 +0000 (07:26 +0200)]
tools/bc: update to 1.07

Update to latest version. Replace mirror with @GNU/bc.

Manually refresh:
- 001-no_doc.patch

Add patch found here:
https://github.com/fivepiece/gnu-bc/commit/26f275502dd28114e78bc098fed81acde1d86d62
as 002-fix-libmath.patch to fix compilation.

Add another patch found here:
https://github.com/archlinux/svntogit-packages/commit/55b26eda94e1a9ff726ac458fccab5f3f3ad2114
as 003-bc-fix-hang.patch to prevent a hang when building the kernel.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agotools/pkgconf: update to 1.9.3
Nick Hainke [Mon, 29 Aug 2022 05:18:32 +0000 (07:18 +0200)]
tools/pkgconf: update to 1.9.3

Release Notes:
https://github.com/pkgconf/pkgconf/blob/pkgconf-1.9.3/NEWS

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoxdp-tools: update to v1.2.6
Nick Hainke [Sun, 28 Aug 2022 19:21:32 +0000 (21:21 +0200)]
xdp-tools: update to v1.2.6

Release Notes:
https://github.com/xdp-project/xdp-tools/releases/tag/v1.2.6

The update contains important fixes for cross-compilation.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agotools/cmake: refresh patches
Nick Hainke [Sun, 21 Aug 2022 21:04:58 +0000 (23:04 +0200)]
tools/cmake: refresh patches

Previous commit forgot to refresh the patches.
This commit refreshes the patches:
- 120-curl-fix-libressl-linking.patch
- 130-bootstrap_parallel_make_flag.patch

Fixes: 3b2f19271cc2 ("tools/cmake: update to 3.24.1")
Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agokernel: mtk_eth_soc: fix hw hash reporting for MT7986
Daniel Golle [Wed, 7 Sep 2022 02:50:42 +0000 (03:50 +0100)]
kernel: mtk_eth_soc: fix hw hash reporting for MT7986

Import patch from Linux 6.0.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agokernel: refresh patches
Daniel Golle [Wed, 7 Sep 2022 02:54:34 +0000 (03:54 +0100)]
kernel: refresh patches

The introduction of the new Airoha target has left the tree in an
unfresh state. Refresh patches to improve that situation.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agomt76: update to the latest version
Felix Fietkau [Tue, 6 Sep 2022 20:44:43 +0000 (22:44 +0200)]
mt76: update to the latest version

d70546462b7b mt76: fix 5 GHz connection regression on mt76x0/mt76x2

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agolibsepol: add PKG_CPE_ID
Nick Hainke [Sun, 4 Sep 2022 13:15:13 +0000 (15:15 +0200)]
libsepol: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibselinux: add PKG_CPE_ID
Nick Hainke [Sun, 4 Sep 2022 13:13:59 +0000 (15:13 +0200)]
libselinux: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agomtd-utils: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 16:19:37 +0000 (18:19 +0200)]
mtd-utils: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibnfnetlink: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 16:17:26 +0000 (18:17 +0200)]
libnfnetlink: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibmnl: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 16:15:24 +0000 (18:15 +0200)]
libmnl: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agof2fs-tools: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 16:11:51 +0000 (18:11 +0200)]
f2fs-tools: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibnl: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 16:07:39 +0000 (18:07 +0200)]
libnl: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agojansson: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 16:04:57 +0000 (18:04 +0200)]
jansson: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibusb: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 16:02:34 +0000 (18:02 +0200)]
libusb: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolldpd: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 16:00:30 +0000 (18:00 +0200)]
lldpd: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agostrace: replace PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 15:51:24 +0000 (17:51 +0200)]
strace: replace PKG_CPE_ID

Searching for strace in nvd.nist.gov/products/cpe/search [0] will result
in "cpe:/a:strace_project:strace". Replace the current PKG_CPE_ID with
it.

[0] - https://nvd.nist.gov/products/cpe/search/results?namingFormat=2.2&keyword=strace

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoethtool: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 15:42:56 +0000 (17:42 +0200)]
ethtool: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agotools/bc: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 15:38:43 +0000 (17:38 +0200)]
tools/bc: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibcap: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 10:13:36 +0000 (12:13 +0200)]
libcap: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agonettle: add PKG_CPE_ID
Nick Hainke [Sat, 3 Sep 2022 10:00:26 +0000 (12:00 +0200)]
nettle: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agokernel: rework Huawei-compatible OEM SFP GE-T
Daniel Golle [Mon, 5 Sep 2022 21:41:22 +0000 (22:41 +0100)]
kernel: rework Huawei-compatible OEM SFP GE-T

This patch was added in 09b086eecaa545cf7f30bc7e394a32751e25db65
("kernel: add quirk for Huawei-compatible OEM SFP GE-T"). Add patch
title, description and SoB to follow OpenWrt's developer guide for
working patches to prepare it for being sent upstream. This patch
should be discussed with Russell King and merged to Linux kernel.

Co-authored-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agokernel: add support for HALNy HL-GSFP and other related fixes
Josef Schlehofer [Fri, 26 Aug 2022 14:21:44 +0000 (16:21 +0200)]
kernel: add support for HALNy HL-GSFP and other related fixes

It was reported on Turris forum [1] that HALNy HL-GSFP module does not
work as it should with kernel 5.15. Russell King prepared this patch
series, which fixes broken SFP module to work.

Compile and run tested with Turris Omnia.

[1] https://forum.turris.cz/t/hbl-turrisos-6-0-alpha2-halny-hl-gsfp-sfp-gpon-stick-problems/17547

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
2 years agohostapd: rename hostapd multicast_to_unicast option to multicast_to_unicast_all
Felix Fietkau [Tue, 6 Sep 2022 10:12:12 +0000 (12:12 +0200)]
hostapd: rename hostapd multicast_to_unicast option to multicast_to_unicast_all

There are two feature currently altered by the multicast_to_unicast option.
1. bridge level multicast_to_unicast via IGMP snooping
2. hostapd/mac80211 config multicast_to_unicast setting

The hostapd/mac80211 setting has the side effect of converting *all* multicast
or broadcast traffic into per-station duplicated unicast traffic, which can
in some cases break expectations of various protocols.
It also has been observed to cause ARP lookup failure between stations
connected to the same interface.

The bridge level feature is much more useful, since it only covers actual
multicast traffic managed by IGMP, and it implicitly defaults to 1 already.

Renaming the hostapd/mac80211 option to multicast_to_unicast_all should avoid
unintentionally enabling this feature

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agotools: remove xxd package
Petr Štetiar [Tue, 30 Aug 2022 06:41:07 +0000 (08:41 +0200)]
tools: remove xxd package

It shouldn't be needed anymore as we've now `scripts/xxdi.pl`, which
should be self contained and fully compatible `xxd -i` replacement.

Fixes: #10555
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 years agobuild: provide xxd -i with scripts/xxdi.pl
Petr Štetiar [Tue, 30 Aug 2022 06:45:39 +0000 (08:45 +0200)]
build: provide xxd -i with scripts/xxdi.pl

Dependency on xxd was added in commit c4dd2441e787 ("tools: add xxd
(from vim)") as U-Boot requires xxd to create the default environment
from an external file.

Later in commit 2b94aac7a128 ("tools: xxd: use more convenient source
tarball"), xxd from another source was used instead, but that source is
currently unavailable, so let's fix it by using simple xxdi.pl Perl
script instead.

Fixes: #10555
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 years agoscripts: xxdi.pl: add xxd -i compat mode
Petr Štetiar [Tue, 30 Aug 2022 06:34:26 +0000 (08:34 +0200)]
scripts: xxdi.pl: add xxd -i compat mode

So it can serve as a standalone drop in replacement for xxd utility used
currently mostly in U-Boot packages with `xxd -i` mode which outputs C
include file style, with aim for byte to byte identical output, so the
eventual difference in the generated output is easily spottable.

Fixes: #10555
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Signed-off-by: Jo-Philipp Wich <jo@mein.io> [perl-fu]
2 years agoscripts: xxdi.pl: remove File::Slurp dependency
Jo-Philipp Wich [Tue, 30 Aug 2022 16:20:04 +0000 (18:20 +0200)]
scripts: xxdi.pl: remove File::Slurp dependency

In order to make it more portable.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 years agoscripts: add xxdi.pl
Petr Štetiar [Tue, 30 Aug 2022 06:31:42 +0000 (08:31 +0200)]
scripts: add xxdi.pl

xxdi.pl is a Perl script that implements vim's 'xxd -i' mode so that
packages do not have to use all of vim just to get this functionality.

References: #10555
Source: https://github.com/gregkh/xxdi/blob/97a6bd5cee05d1b15851981ec38ef5a460ddfcb1/xxdi.pl
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2 years agomediatek: fix sysupgrade on MTK7986 rfba AP
Daniel Golle [Tue, 6 Sep 2022 02:27:16 +0000 (03:27 +0100)]
mediatek: fix sysupgrade on MTK7986 rfba AP

A line in platform.sh was accidentally removed when adding support
for the Bananapi BPi-R3.
Re-add it to fix sysupgrade on the MTK7986 rfba AP.

Fixes: a96382c1bb ("mediatek: add support for Bananapi BPi-R3")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2 years agoath79: move 5.15 testing kernel to common Makefile
Nick Hainke [Tue, 23 Aug 2022 17:14:47 +0000 (19:14 +0200)]
ath79: move 5.15 testing kernel to common Makefile

All subtargets are using now 5.15 as testing kernel.
Move KERNEL_TESTING_PATCHVER:=5.15 to the common Makefile.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoath79: tiny: add 5.15 support for tiny subtarget
Nick Hainke [Tue, 23 Aug 2022 16:44:21 +0000 (18:44 +0200)]
ath79: tiny: add 5.15 support for tiny subtarget

Tested on Ubiquiti Nanostation M5 XM with low_mem.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoath79: add low_mem to tiny image
Nick Hainke [Fri, 19 Aug 2022 16:59:36 +0000 (18:59 +0200)]
ath79: add low_mem to tiny image

Devices with SMALL_FLASH enabled have "SQUASHFS_BLOCK_SIZE=1024" in
their config. This significantly increases the cache memory required by
squashfs [0]. This commit enables low_mem leading to a much better
performance because the SQUASHFS_BLOCK_SIZE is reduced to 256.

Example Nanostation M5 (XM):
The image size increases by 128 KiB. However, the memory statisitcs look
much better:

Default tiny build:
------
MemTotal:          26020 kB
MemFree:            5648 kB
MemAvailable:       6112 kB
Buffers:               0 kB
Cached:             3044 kB

low_mem enabled:
-----
MemTotal:          26976 kB
MemFree:            6748 kB
MemAvailable:      11504 kB
Buffers:               0 kB
Cached:             7204 kB

[0] - https://github.com/freifunk-gluon/gluon/commit/7e8af99cf504ca1dc389f282a0c94f4a911571be

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoipq40xx: add support for Extreme Networks WS-AP3915i
David Bauer [Mon, 29 Aug 2022 12:30:01 +0000 (14:30 +0200)]
ipq40xx: add support for Extreme Networks WS-AP3915i

Hardware
--------
Qualcomm IPQ4029 WiSoC
2T2R 802.11 abgn
2T2R 802.11 nac
Macronix MX25L25635E SPI-NOR (32M)
512M DDR3 RAM
1x Gigabit LAN
1x Cisco RJ-45 Console port
Settings: 115200 8N1

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

1. Attach to the Console port. Power up the device and press the s key
   to interrupt autoboot.

2. The default username / password to the bootloader is admin / new2day

3. Update the bootcommand to allow loading OpenWrt.

   $ setenv ramboot_openwrt "setenv serverip 192.168.1.66;
     setenv ipaddr 192.168.1.1; tftpboot 0x86000000 openwrt-3915.bin;
     bootm"
   $ setenv boot_openwrt "sf probe;
     sf read 0x88000000 0x280000 0xc00000; bootm 0x88000000"
   $ setenv bootcmd "run boot_openwrt"
   $ saveenv

4. Download the OpenWrt initramfs image. Serve it using a TFTP server as
   "openwrt-3915.bin" at 192.1681.66.

5. Download & boot the OpenWrt initramfs image on the access point.

   $ run ramboot_openwrt

6. Wait for OpenWrt to start.

7. Download and transfer the sysupgrade image to the device using e.g.
   SCP.

8. Install OpenWrt to the device using "sysupgrade"

   $ sysupgrade -n /path/to/openwrt.bin

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agoipq-wifi: add Extreme Networks WS-AP3915i
David Bauer [Mon, 29 Aug 2022 15:36:46 +0000 (17:36 +0200)]
ipq-wifi: add Extreme Networks WS-AP3915i

Signed-off-by: David Bauer <mail@david-bauer.net>
2 years agoipq40xx: point to externally compiled dtbs in recipes
Tomasz Maciej Nowak [Thu, 25 Aug 2022 18:26:11 +0000 (20:26 +0200)]
ipq40xx: point to externally compiled dtbs in recipes

Adjusting dts will cause a rebuild of whole kernel as the buildroot
considers this a part of kernel source. It's a royal PITA when trying to
prepare support for new device, since this takes a lot of time on slower
systems. As it stands, buildroot itself, with own rule, also compiles
dtbs and the results are $(KDIR)/image-$(DEVICE_DTS).dtb. With setting
DEVICE_DTS_DIR to directory holding the device dts (similarly to some
other targets), buildroot doesn't consider changed dts as part of kernel
source and rebuilds only dtb. This really speeds up development. And
since the kernel built dts are no longer used, drop the paches adding
dtses to its build.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>