openwrt/staging/stintel.git
5 months agomvebu: fix RxAlignErr and RxFcsErr oc200
Stijn Tintel [Wed, 2 Dec 2020 13:00:50 +0000 (15:00 +0200)]
mvebu: fix RxAlignErr and RxFcsErr

5 months agomvebu: sysupgrade support for TP-Link OC200
Stijn Tintel [Mon, 30 Nov 2020 21:32:54 +0000 (23:32 +0200)]
mvebu: sysupgrade support for TP-Link OC200

5 months agomvebu: add sysupgrade image for TP-Link OC200
Stijn Tintel [Tue, 22 Sep 2020 01:16:52 +0000 (04:16 +0300)]
mvebu: add sysupgrade image for TP-Link OC200

This image can be written to the NAND flash with dd:

dd if=/tmp/openwrt-mvebu-cortexa53-tplink_oc200-squashfs-sysupgrade.bin of=/dev/mmcblk0 bs=512 seek=896

5 months agomvebu: experimental qca8k ar8236 support
Stijn Tintel [Tue, 22 Sep 2020 00:36:24 +0000 (03:36 +0300)]
mvebu: experimental qca8k ar8236 support

5 months agomvebu: add support for TP-Link OC200
Stijn Tintel [Fri, 11 Sep 2020 19:33:51 +0000 (22:33 +0300)]
mvebu: add support for TP-Link OC200

Pinout: 1: TX, 2: RX, 3: GND, 4: VCC, with pin 1 closest to the front
side of the board. Baud rate 115200.

5 months agooc200.py: script to generate OC200 factory image
Stijn Tintel [Sun, 20 Sep 2020 19:55:41 +0000 (22:55 +0300)]
oc200.py: script to generate OC200 factory image

5 months agomvebu: support GigaDevices GD25LQ80C
Stijn Tintel [Tue, 22 Sep 2020 00:35:41 +0000 (03:35 +0300)]
mvebu: support GigaDevices GD25LQ80C

5 months agoqoriq: add testing kernel 6.1
Stijn Tintel [Sun, 29 Oct 2023 05:25:50 +0000 (07:25 +0200)]
qoriq: add testing kernel 6.1

5 months agohostapd: use rtnl to set up interfaces
Felix Fietkau [Wed, 8 Nov 2023 10:20:41 +0000 (11:20 +0100)]
hostapd: use rtnl to set up interfaces

In wpa_supplicant, set up wlan interfaces before adding them

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agowifi: fix applying mesh parameters when wpa_supplicant is in use
Felix Fietkau [Wed, 8 Nov 2023 09:45:55 +0000 (10:45 +0100)]
wifi: fix applying mesh parameters when wpa_supplicant is in use

Apply them directly using nl80211 after setting up the interface.
Use the same method in wdev.uc as well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agoqualcommax: refresh patches
Robert Marko [Tue, 7 Nov 2023 14:14:15 +0000 (15:14 +0100)]
qualcommax: refresh patches

It seems that patches were not refreshed during last kernel bump, so lets
refresh them.

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqualcommax: fixup patch numbering
Robert Marko [Tue, 7 Nov 2023 13:38:21 +0000 (14:38 +0100)]
qualcommax: fixup patch numbering

It seems that I forgot one zero in the patch numbering while marking these
as backports, so lets fix it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agopx5g-wolfssl: Fix permission of private key
Hauke Mehrtens [Mon, 6 Nov 2023 23:33:38 +0000 (00:33 +0100)]
px5g-wolfssl: Fix permission of private key

Store the private key with read and write permission for the user only
and not with read permissions for everyone. This converts the
write_file() function from fopen() to open() because open allows to
specify the permission mask of the newly created file. It also adds and
fixes some existing error handling.

OpenSSL does this in the same way already.

With this change it looks like this:
root@OpenWrt:/# ls -al /etc/uhttpd.*
-rw-r--r--    1 root     root           749 Nov  6 23:14 /etc/uhttpd.crt
-rw-------    1 root     root           121 Nov  6 23:14 /etc/uhttpd.key

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agopx5g-mbedtls: Fix permission of private key
Hauke Mehrtens [Sun, 5 Nov 2023 22:05:24 +0000 (23:05 +0100)]
px5g-mbedtls: Fix permission of private key

Store the private key with read and write permission for the user only
and not with read permissions for everyone. This converts the
write_file() function from fopen() to open() because open allows to
specify the permission mask of the newly created file. It also adds and
fixes some existing error handling.

OpenSSL does this in the same way already.

With this change it looks like this:
root@OpenWrt:/# ls -al /etc/uhttpd.crt /etc/uhttpd.key
-rw-r--r--    1 root     root           519 Nov  6 22:58 /etc/uhttpd.crt
-rw-------    1 root     root           121 Nov  6 22:58 /etc/uhttpd.key

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agorockchip: refresh kernel config
Rafał Miłecki [Tue, 7 Nov 2023 12:38:23 +0000 (13:38 +0100)]
rockchip: refresh kernel config

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 months agogemini: refresh kernel config
Rafał Miłecki [Tue, 7 Nov 2023 12:38:23 +0000 (13:38 +0100)]
gemini: refresh kernel config

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 months agosifiveu: refresh kernel config
Rafał Miłecki [Tue, 7 Nov 2023 12:38:23 +0000 (13:38 +0100)]
sifiveu: refresh kernel config

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 months agoqoriq: refresh kernel config
Rafał Miłecki [Tue, 7 Nov 2023 12:38:23 +0000 (13:38 +0100)]
qoriq: refresh kernel config

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 months agonetifd: update to the latest version
Felix Fietkau [Tue, 7 Nov 2023 12:36:39 +0000 (13:36 +0100)]
netifd: update to the latest version

383753dd65ae device/bridge: support passing extra vlans in the device_set_state call
b6e75eafc1af device: send notifications for device events via ubus
cab415c7aefd bridge: add auth-required bridge members with auth_status=0 if vlan is enabled
827a02f0343c bridge: add support for configuring vlans for auth=1,auth_status=false
40ed7363caf2 device: fix build error on 32 bit systems
516ab774cc16 system-linux: fix race condition on bringing up wireless devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agobpf-headers: Fix download URL with kernel 6.1
Hauke Mehrtens [Mon, 6 Nov 2023 00:30:31 +0000 (01:30 +0100)]
bpf-headers: Fix download URL with kernel 6.1

This fixes the download of the kernel 5.15 for the bpf-headers when
kernel 6.1 is build for the target.

Even if kernel 6.1 was selected for the target we still use kernel 5.15
for the bpf-headers. The download script tried to download the 5.15
kernel from the 6.x directory on kernel,org and this failed. Define
PKG_SOURCE_URL based on PKG_PATCHVER and not KERNEL_BASE like done in
kernel.mk.

Without this change it tries to download the kernel from this URL:
ttps://cdn.kernel.org/pub/linux/kernel/v6.x/linux-5.15.129.tar.xz

Fixes: #13190
Fixes: #13671
Fixes: #13814
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agombedtls: Activate secp521r1 curve by default
Hauke Mehrtens [Sun, 5 Nov 2023 22:05:24 +0000 (23:05 +0100)]
mbedtls: Activate secp521r1 curve by default

Activate the secp521r1 ecliptic curve by default. This curve is allowed
by the CA/Browser forum, see
https://cabforum.org/wp-content/uploads/CA-Browser-Forum-BR-v2.0.1-redlined.pdf#page=110

This increases the size of libmbedtls12_2.28.5-1_aarch64_generic.ipk by
about 400 bytes:
Without:
252,696 libmbedtls12_2.28.5-1_aarch64_generic.ipk
With:
253,088 libmbedtls12_2.28.5-2_aarch64_generic.ipk

Fixes: #13774
Acked-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agobcm53xx: refresh kernel config for 6.1
Rafał Miłecki [Mon, 6 Nov 2023 12:25:34 +0000 (13:25 +0100)]
bcm53xx: refresh kernel config for 6.1

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 months agoimage: fix image generation within ImageBuilder
Petr Štetiar [Mon, 6 Nov 2023 08:52:24 +0000 (08:52 +0000)]
image: fix image generation within ImageBuilder

Changes introduced in commit d604a07225c5 ("build: add CycloneDX SBOM
JSON support") broke ImageBuilder:

  Cannot open '/openwrt-imagebuilder-ath79-generic.Linux-x86_64/tmp/.packageinfo': No such file or directory

So lets fix it by wrapping the BOM generation behind condition of IB
feature check.

Fixes: #13881
Fixes: d604a07225c5 ("build: add CycloneDX SBOM JSON support")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agomediatek: add label-mac for GL.iNet GL-MT3000
David Bauer [Fri, 3 Nov 2023 21:05:04 +0000 (22:05 +0100)]
mediatek: add label-mac for GL.iNet GL-MT3000

The MAC-address of gmac0 matches the one printed on the bottom label.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agomediatek: mt7981: improve fan behaviour
Łukasz M [Tue, 31 Oct 2023 15:15:06 +0000 (16:15 +0100)]
mediatek: mt7981: improve fan behaviour

This doubles the number of cooling-levels.
In addition the fan is turned on with a low speed at lower temperatures
and with a higher speed at higher temperatures.
This also attempts to reduce the likelihood of constant start-stop actions.

The change only affects the GL.iNet MT3000 and has been tested with it.

Signed-off-by: Łukasz M <lukasz1992m@gmail.com>
5 months agoath79: support Fortinet FAP-220-B
Lech Perczak [Sat, 22 Jul 2023 16:44:20 +0000 (18:44 +0200)]
ath79: support Fortinet FAP-220-B

Fortinet FAP-220-B is a dual-radio, dual-band 802.11n enterprise managed
access point with PoE input and single gigabit Ethernet interface.

Hardware highlights:
Power: 802.3af PoE input on Ethernet port, +12V input on 5.5/2.1mm DC jack.
SoC: Atheros AR7161 (MIPS 24kc at 680MHz)
RAM: 64MB DDR400
Flash: 16MB SPI-NOR
Wi-Fi 1: Atheros AR9220 2T2R 802.11abgn (dual-band)
Wi-Fi 2: Atheros AR9223 2T2R 802.11bgn (single-band)
Ethernet: Atheros AR8021 single gigabit Phy (RGMII)
Console: External RS232 port using Cisco 8P8C connector (9600-8-N-1)
USB: Single USB 2.0 host port
LEDs: Power (single colour, green), Wi-Fi 1, Wi-Fi 2, Ethernet, Mode, Status
(dual-colour, green and yellow)
Buttons: reset button hidden in bottom grill,
  in the top row, 2nd column from the right.
Label MAC address: eth0

FCC ID: TVE-220102

Serial port pinout:
3 - TxD
4 - GND
6 - RxD

Installation: The same methods apply as for already supported FAP-221-B.

For both methods, a backup of flash partitions is recommended, as stock firmware
is not freely available on the internet.

(a) Using factory image:

1. Connect console cable to the console port
2. Connect Ethernet interface to your PC
3. Start preferred terminal at 9600-8-N-1
4. Have a TFTP server running on the PC.
5. Put the "factory" image in TFTP root
6. Power on the device
7. Break boot sequence by pressing "Ctrl+C"
8. Press "G". The console will ask you for device IP, server IP, and filename.
   Enter them appropriately.
   The defaults are:
   Server IP: 192.168.1.1 # Update accordingly
   Device IP: 192.168.1.2 # Update accordingly
   Image file: image.out # Use for example: openwrt-ath79-generic-fortinet_fap-220-b-squashfs-factory.bin
9. The device will load the firmware over TFTP, and verify it. When
   verification passes, press "D" to continue installation. The device
   will reboot on completion.

(b) Using initramfs + sysupgrade
1. Connect console cable to the console port
2. Connect Ethernet interface to your PC
3. Start preferred terminal at 9600-8-N-1
4. Have a TFTP server running on the PC.
5. Put the "initramfs" image in TFTP root
6. Power on the device.
7. Break boot sequence by pressing "Ctrl+C"
8. Enter hidden U-boot shell by pressing "K". The password is literal "1".
9. Load the initramfs over TFTP:

   > setenv serverip 192.168.1.1 # Your PC IP
   > setenv ipaddr 192.168.1.22 # Device IP, both have to share a subnet.
   > tftpboot 81000000 openwrt-ath79-generic-fortinet_fap-220-b-initramfs-kernel.bin
   > bootm 81000000

10. (Optional) Copy over contents of at least "fwconcat0", "loader", and "fwconcat1"
    partitions, to allow restoring factory firmware in future:

    # cat /dev/mtd1 > /tmp/mtd1_fwconcat0.bin
    # cat /dev/mtd2 > /tmp/mtd2_loader.bin
    # cat /dev/mtd3 > /tmp/mtd3_fwconcat1.bin

    and then SCP them over to safety at your PC.

11. When the device boots, copy over the sysupgrade image, and execute
    normal upgrade:

    # sysupgrade openwrt-ath79-generic-fortinet_fap-220-b-squashfs-sysupgrade.bin

Return to stock firmware:
1. Boot initramfs image as per initial installation up to point 9
2. Copy over the previously backed up contents over network
3. Write the backed up contents back:

   # mtd write /tmp/mtd1_fwconcat0.bin fwconcat0
   # mtd write /tmp/mtd2_loader.bin loader
   # mtd write /tmp/mtd3_fwconcat1.bin fwconcat1

4. Erase the reserved partition:

   # mtd erase reserved

5. Reboot the device

Quirks and known issues:
- The power LED blinking pattern is disrupted during boot, probably due
  to very slow serial console, which prints a lot during boot compared
  to stock FW.
- "mac-address-ascii" device tree binding cannot yet be used for address
  stored in U-boot partition, because it expects the colons as delimiters,
  which this address lacks. Addresses found in ART partition are used
  instead.
- Due to using kmod-owl-loader, the device will lack wireless interfaces
  while in initramfs, unless you compile it in.
- The device heats up A LOT on the bottom, even when idle. It even
  contains a warning sticker there.
- Stock firmware uses a fully read-write filesystem for its rootfs.
- Stock firmware loads a lot of USB-serial converter drivers for use
  with built-in host, probably meant for hosting modem devices.
- U-boot build of the device is stripped of all branding, despite that
  evidence of it (obviously) being U-boot can be found in the binary.
- The user can break into hidden U-boot shell using key "K" after
  breaking boot sequence. The password is "1" (without quotes).
- Telnet is available by default, with login "admin", without password.
  The same is true for serial console, both drop straight to the Busybox
  shell.
- The web interface drops to the login page again, after successfull
  login.
- Whole image authentication boils down to comparing a device ID against
  one stored in U-boot.
- And this device is apparently made by a security company.

Big thanks for Michael Pratt for providing support for FAP-221-B, which
shares the entirety of image configuration with this device, this saved
me a ton of work.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
5 months agoath79: image: extract common part for Fortinet FAP series
Lech Perczak [Wed, 26 Jul 2023 01:01:02 +0000 (03:01 +0200)]
ath79: image: extract common part for Fortinet FAP series

In preparation for FAP-220-B support, extract the common part of image
recipe for FAP-221-B.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
5 months agoath79: dts: fortinet_loader: extract common part
Lech Perczak [Wed, 26 Jul 2023 00:55:05 +0000 (02:55 +0200)]
ath79: dts: fortinet_loader: extract common part

In preparation for FAP-220-B support, rename ar934x_fortinet_loader.dtsi
to arxxxx_fortinet_loader.dtsi, to avoid confusion, as FAP-220-B shares
flash layout with FAP-221-B exactly despite different SoC.

While at that, add a label to U-boot partition to allow for nvmem MAC
binding in future.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
5 months agobuild: replace `true` with a custom noop script
Ilya Katsnelson [Sun, 29 Oct 2023 22:39:31 +0000 (01:39 +0300)]
build: replace `true` with a custom noop script

`true` might be a shell built-in, or simply not accessible in the hardcoded locations.
Replace it with a custom script that does nothing.

Signed-off-by: Ilya Katsnelson <me@0upti.me>
5 months agotreewide: fix MERCUSYS brand spelling
Mikhail Zhilkin [Sun, 29 Oct 2023 14:51:32 +0000 (14:51 +0000)]
treewide: fix MERCUSYS brand spelling

This commit fixes MERCUSYS brand spelling. The proper name is capitalized.

Link: https://www.mercusys.com/
Link: https://github.com/torvalds/linux/blob/master/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c#L7779
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
5 months agofilogic: fix wifi eeprom filename for tuf-ax6000
Patryk Kowalczyk [Thu, 2 Nov 2023 08:46:36 +0000 (09:46 +0100)]
filogic: fix wifi eeprom filename for tuf-ax6000
The router use mt7986_eeprom_mt7976_dual.bin

Fixes: d522ccecb2 ("filogic: add support for ASUS TUF AX6000")
Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
5 months agoramips: add support for MeiG SLT866 4G CPE
Daniel Golle [Tue, 24 Oct 2023 17:05:28 +0000 (18:05 +0100)]
ramips: add support for MeiG SLT866 4G CPE

Hardware:
 - SoC: Mediatek MT7621 (MT7621AT)
 - Flash: 32 MiB SPI-NOR (Macronix MX25L25635E)
 - RAM: 128 MiB
 - Ethernet: Built-in, 2 x 1GbE
 - 3G/4G Modem: MEIG SLM828 (currently only supported with ModemManager)
 - SLIC: Si32185 (unsupported)
 - Power: 12V via barrel connector
 - Wifi 2.4GHz: Mediatek MT7603BE 802.11b/g/b
 - Wifi 5GHz: Mediatek MT7613BE 802.11ac/n/a
 - LEDs: 8x (7 controllable)
 - Buttons: 2x (RESET, WPS)

Installing OpenWrt:
 - sysupgrade image is compatible with vendor firmware.

Recovery:
 - Connect to any of the Ethernet ports, configure local IP:
   10.10.10.3/24 (or 192.168.10.19/24, depending on OEM)
 - Provide firmware file named 'mt7621.img' on TFTP server.
 - Hold down both, RESET and WPS, then power on the board.
 - Watch network traffic using tcpdump or wireshark in realtime to
   observe progress of device requesting firmware. Once download has
   completed, release both buttons and wait until firmware comes up.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agouboot-envtools: add environment config for MeiG SLT866
Daniel Golle [Sun, 29 Oct 2023 16:01:05 +0000 (16:01 +0000)]
uboot-envtools: add environment config for MeiG SLT866

Add configuration to access U-Boot environment on MeiG SLT866.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agokernel: support reading hex MAC address from NVMEM
Daniel Golle [Thu, 26 Oct 2023 02:50:40 +0000 (03:50 +0100)]
kernel: support reading hex MAC address from NVMEM

In addition to binary and ASCII-formatted MAC addresses, add support
for processing hexadecimal encoded MAC addresses from NVMEM.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agokernel: add support MeigLink SLM828 modem
Daniel Golle [Thu, 26 Oct 2023 02:46:44 +0000 (03:46 +0100)]
kernel: add support MeigLink SLM828 modem

Another Qualcomm-based USB-connected modem, offering endpoints
 0 : rndis_host (link to voip subsystem listening on 169.254.5.100)
 1 : rndis_host (?)
 2 : option (?)
 3 : option (at)
 4 : option (at)
 5 : option (?)
 6 : GobiNet (qmi)
 7 : ?

Add support for this modem in rndis_host, option and qmi_wwan driver
which allows the modem to be used with ModemManager.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agofirewall4: update to latest Git HEAD
Jo-Philipp Wich [Fri, 3 Nov 2023 14:13:58 +0000 (15:13 +0100)]
firewall4: update to latest Git HEAD

4101dd4 fw4: perform strict validation of zone and set names
a923c88 fw4: pass zone to templates whenever possible
597dc90 fw4: add support for zone log_limit
1874050 fw4: add log_limit to rules and redirects
19a8caf ruleset: dispatch ct states using verdict map
a5553da ruleset: reduce ksoftirqd load by refering to looopback by numeric id
de3483c tests: adjust zone log limit testcases
7392792 ruleset: do not emit redundant drop invalid rules
698a533 ruleset: apply egress MSS fixup later to apply final MTU before wire

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 months agokernel: bump 6.1 to 6.1.61
John Audia [Thu, 2 Nov 2023 10:06:02 +0000 (06:06 -0400)]
kernel: bump 6.1 to 6.1.61

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.61

Removed upstreamed:
  generic/backport-6.1/814-v6.6-0018-nvmem-imx-correct-nregs-for-i.MX6SLL.patch[1]
  generic/backport-6.1/814-v6.6-0019-nvmem-imx-correct-nregs-for-i.MX6UL.patch[2]
  generic/backport-6.1/814-v6.6-0020-nvmem-imx-correct-nregs-for-i.MX6ULL.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.61&id=b90b8633ef62314f3a5f5675106e6dcdec981b6f
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.61&id=37495846b1efc23c1767b17ddd6645cc0ccb9946
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.61&id=116671d25915b913374ccdb2956b5fdaff939dc9

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
5 months agofirmware-utils: bump to git HEAD
Paul Spooren [Thu, 2 Nov 2023 23:51:47 +0000 (00:51 +0100)]
firmware-utils: bump to git HEAD

ba5bc4e add dlink-sge-image for D-Link devices by SGE

Signed-off-by: Paul Spooren <mail@aparcar.org>
5 months agoath10k-ct: add patch fixing compilation error in debug
Christian Marangi [Fri, 3 Nov 2023 03:10:03 +0000 (04:10 +0100)]
ath10k-ct: add patch fixing compilation error in debug

ath10k-ct based on kernel 6.4 doesn't have a fix present in previous
kernel. Add patch that port the compilation error fix from previous
kernel in the new 6.4 kernel.

Fixes: 7d3651f1b9be ("ath10k-ct: switch to 6.4")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agoramips: fix wrong permissions on dts files
Mikhail Zhilkin [Sun, 29 Oct 2023 15:10:58 +0000 (15:10 +0000)]
ramips: fix wrong permissions on dts files

This commit fixes wrong permissions on dts files. Before the commit these
dts files are executable:
   -rwxrwxr-x mt7620a_dlink_dir-806a-b1.dts
   -rwxrwxr-x mt7621_wavlink_wl-wn573hx1.dts

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
5 months agoath10k-ct: switch to 6.4
Koen Vandeputte [Wed, 20 Sep 2023 12:14:05 +0000 (14:14 +0200)]
ath10k-ct: switch to 6.4

Switch to the latest version so we match as close as possible to
our own mac80211 version.

Run-time tested on hundreds of devices in the field for months now:
- qca988x (wave 1)
- qca4019 (wave 2)

Tested-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
5 months agoath10k-ct: bump to latest upstream
Koen Vandeputte [Tue, 6 Jun 2023 11:21:53 +0000 (13:21 +0200)]
ath10k-ct: bump to latest upstream

92900bf("at10k-ct: fixup version info")

Tested-by: Enrico Mioso <mrkiko.rs@gmail.com>
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
5 months agodnsmasq: don't source functions.sh twice
Philip Prindeville [Sun, 22 Oct 2023 20:26:48 +0000 (14:26 -0600)]
dnsmasq: don't source functions.sh twice

It's already pulled in from /etc/rc.common.

Fixes: #13758
Fixes: 6b23836071b1 ("package: avoid the use of eval to parse ipcalc.sh output")
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
5 months agobuild: fix pkg-config detection when inside of a nix-shell
Sandro Jäckel [Wed, 1 Nov 2023 15:49:20 +0000 (16:49 +0100)]
build: fix pkg-config detection when inside of a nix-shell

The output of command_all when inside a nix-shell looks like the below
where /usr does not match:

 ➜ scripts/command_all.sh pkg-config
/nix/store/ifr6srqgpvygd5vp14748d109ri31isv-pkg-config-wrapper-0.29.2/bin/pkg-config

Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
5 months agoqualcommax: ipq807x: move subtarget specific kernel options
Robert Marko [Sun, 29 Oct 2023 16:00:29 +0000 (17:00 +0100)]
qualcommax: ipq807x: move subtarget specific kernel options

Currently, qualcommax target contains the full kernel config for the
ipq807x subtarget, but since I am working on ipq60xx as well it makes
sense to split out the ipq807x specific kernel options to subtarget
config.

ipq60xx will use the same approach and use subtarget config.

Should result in the same end kernel config, verified by comparing the
generated kernel .config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoRevert "uboot-sunxi: add missing type __u64"
Petr Štetiar [Mon, 30 Oct 2023 19:38:04 +0000 (19:38 +0000)]
Revert "uboot-sunxi: add missing type __u64"

This reverts commit 3cc57ba4627c9c7555f8ad86e4f78d86d8f9ddf0 as it
should be fixed in commit 78cbd5a57e11 ("tools: macOS: types.h: fix
missing unsigned types").

References: #13833
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agoRevert "uboot-mediatek: fix build on Mac OS X"
Petr Štetiar [Mon, 30 Oct 2023 19:37:59 +0000 (19:37 +0000)]
Revert "uboot-mediatek: fix build on Mac OS X"

This reverts commit 997ff740dc44045390680eaa30b6566d40bca322.
78cbd5apick as it should be fixed in commit 78cbd5a57e11 ("tools: macOS:
types.h: fix missing unsigned types").

References: #13833
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agotools: macOS: types.h: fix missing unsigned types
Petr Štetiar [Mon, 30 Oct 2023 19:31:03 +0000 (19:31 +0000)]
tools: macOS: types.h: fix missing unsigned types

For some reason unsigned types were not added in commit 0a06fcf608dd
("build: fix kernel 5.4 on macos"), which led to bunch of hacks, like
commit 3cc57ba4627c ("uboot-sunxi: add missing type __u64") or
commit 997ff740dc44 ("uboot-mediatek: fix build on Mac OS X").

So lets add the missing unsigned types to workaround it in a bit more
maintainable way.

Fixes: #13833
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agobuild: use long hashes when generating feed.buildinfo
Sandro Jäckel [Thu, 2 Nov 2023 02:16:52 +0000 (03:16 +0100)]
build: use long hashes when generating feed.buildinfo

Short hashes are not guaranteed to be unambiguous forever and could
collide if the repo grows over time. Git also estimates how many
characters are roughly required to prevent such a collision and slowly
increases the amount of characters beginning from 6, OpenWrt is already
at 8. Lets use the full hash the have a predictable length and keep
hashes unambiguous forever.

Signed-off-by: Sandro Jäckel <sandro.jaeckel@gmail.com>
5 months agoucode: update to latest Git HEAD
Jo-Philipp Wich [Thu, 2 Nov 2023 09:36:05 +0000 (10:36 +0100)]
ucode: update to latest Git HEAD

cfb24ea build: avoid redefining _FORTIFY_SOURCE
448c763 lib: enforce consistent `index()` behavior with empty needle argument
cdc0203 nl80211: fix maybe uninitialized variable
a69b5c8 vm: fix unused result warning
ea046bd build: enable source fortification by default

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 months agobcm53xx: add the latest fix version of brcm_nvram
Rafał Miłecki [Thu, 2 Nov 2023 08:08:54 +0000 (09:08 +0100)]
bcm53xx: add the latest fix version of brcm_nvram

It was just sent for upstream.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 months agourngd: update to version 2023-11-01
Hauke Mehrtens [Wed, 1 Nov 2023 21:10:46 +0000 (22:10 +0100)]
urngd: update to version 2023-11-01

Fix compilation with glibc

44365eb Deactivate _FORTIFY_SOURCE in jitterentropy-base.c

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agotools/elfutils: fix missing _ in auxv info alias
Felix Fietkau [Wed, 1 Nov 2023 18:20:16 +0000 (19:20 +0100)]
tools/elfutils: fix missing _ in auxv info alias

Fixes dwarves compile issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agotools/elfutils: disable bzlib support
Felix Fietkau [Wed, 1 Nov 2023 17:37:45 +0000 (18:37 +0100)]
tools/elfutils: disable bzlib support

It is not needed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agotools/elfutils: add -fPIC to fix linker errors (#13841)
Felix Fietkau [Wed, 1 Nov 2023 16:44:43 +0000 (17:44 +0100)]
tools/elfutils: add -fPIC to fix linker errors (#13841)

Resolves issues with building PIE binaries that link against libdw or libelf

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agoci: add workflow for automated GitHub release
Petr Štetiar [Thu, 19 Oct 2023 04:09:25 +0000 (04:09 +0000)]
ci: add workflow for automated GitHub release

Implement a GitHub Actions workflow for automated project releases.

The workflow triggers on Git tags, ensuring that a GitHub release is
created whenever a new tag is pushed.

That new release is going to be created in draft and pre-release mode
and needs to be manually promoted to the proper release, once its
decided, that its good enough and prepared.

This is a start of a streamlined and consistent release process for
GitHub, reducing manual intervention.

Acked-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agohostapd: fix broken WPS on broadcom-wl and ath11k
Petr Štetiar [Fri, 27 Oct 2023 07:37:52 +0000 (07:37 +0000)]
hostapd: fix broken WPS on broadcom-wl and ath11k

Upgrading wpa_supplicant from 2.9 to 2.10 breaks broadcom-wl/ath11k
based adapters. The reason for it is hostapd tries to install additional
IEs for scanning while the driver does not support this.

The kernel indicates the maximum number of bytes for additional scan IEs
using the NL80211_ATTR_MAX_SCAN_IE_LEN attribute. Save this value and
only add additional scan IEs in case the driver can accommodate these
additional IEs.

Bug: http://lists.infradead.org/pipermail/hostap/2022-January/040178.html
Bug-Debian: https://bugs.debian.org/1004524
Bug-ArchLinux: https://bugs.archlinux.org/task/73495
Upstream-Status: Changes Requested [https://patchwork.ozlabs.org/project/hostap/patch/20220130192200.10883-1-mail@david-bauer.net]
Reported-by: Étienne Morice <neon.emorice@mail.com>
Tested-by: Étienne Morice <neon.emorice@mail.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agobuild: add CycloneDX SBOM JSON support
Petr Štetiar [Tue, 24 Oct 2023 08:27:13 +0000 (08:27 +0000)]
build: add CycloneDX SBOM JSON support

CycloneDX is an open source standard developed by the OWASP foundation.
It supports a wide range of development ecosystems, a comprehensive set
of use cases, and focuses on automation, ease of adoption, and
progressive enhancement of SBOMs (Software Bill Of Materials) throughout
build pipelines.

So lets add support for CycloneDX SBOM for packages and images
manifests.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agopackage-dumpinfo,metadata: add ABI version information to package index
Petr Štetiar [Thu, 26 Oct 2023 16:11:47 +0000 (16:11 +0000)]
package-dumpinfo,metadata: add ABI version information to package index

There is no standard for ABI versioning, so its not possible to find out
from `libext2fs2`, `libiwinfo20230701` or `libss2` package names if
thats just package name or package name with ABI version included. To
help with the decision, lets make ABI version aviable in package index.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agopackage-metadata: add CPE information to JSON package manifests
Petr Štetiar [Wed, 19 Oct 2022 13:46:45 +0000 (15:46 +0200)]
package-metadata: add CPE information to JSON package manifests

Common Platform Enumeration (CPE) is a structured naming scheme for
information technology systems, software, and packages.

In order for the information to be processed further, it should also be
available in JSON package manifests.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agopackage-dumpinfo: add CPE information to package index
Petr Štetiar [Wed, 19 Oct 2022 13:43:37 +0000 (15:43 +0200)]
package-dumpinfo: add CPE information to package index

Common Platform Enumeration (CPE) is a structured naming scheme for
information technology systems, software, and packages.

In order for the information to be processed further, it should also be
available in package index files.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 months agouboot-mediatek: fix determine the size of an uImage.FIT using 'imsz' or 'imszb'.
Jianhui Zhao [Fri, 20 Oct 2023 03:59:34 +0000 (11:59 +0800)]
uboot-mediatek: fix determine the size of an uImage.FIT using 'imsz' or 'imszb'.

It must read the entire image for previous code of 'imsz' or 'imszb'.

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
Suggested-by: Chuanhong Guo <gch981213@gmail.com>
5 months agouqmi: update to latest HEAD
David Bauer [Tue, 31 Oct 2023 11:33:42 +0000 (12:33 +0100)]
uqmi: update to latest HEAD

eea2924 uqmi: add slot number to uim-sim-status output

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agohostapd: fix OWE association with mbedtls
David Bauer [Tue, 24 Oct 2023 01:07:48 +0000 (03:07 +0200)]
hostapd: fix OWE association with mbedtls

The code for hostapd-mbedtls did not work when used for OWE association.

When handling association requests, the buffer offsets and length
assumptions were incorrect, leading to never calculating the y point,
thus denying association.

Also when crafting the association response, the buffer contained the
trailing key-type.

Fix up both issues to adhere to the specification and make
hostapd-mbedtls work with the OWE security type.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agouqmi: configure PDP type and APN to modem
David Bauer [Mon, 9 Oct 2023 21:10:10 +0000 (23:10 +0200)]
uqmi: configure PDP type and APN to modem

Configure the PLMN and APN to the modem. This is required in cases,
where either the SGSN or GGSN does not permit the selection of IPv4v6
pdp type.

Previously, the modem always tried to establish a dual-stacked PDP
context regardless of the configured PDP type in uci. As this setting
can not be parameterized when creating a WDS context, configure it to
the modems internal list of profiles. This way, the PDP type is taken
into account when creating the WDS context.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agouqmi: fix non-working PLMN selection
David Bauer [Mon, 9 Oct 2023 21:08:01 +0000 (23:08 +0200)]
uqmi: fix non-working PLMN selection

The PLMN selection was reset when calling network-register, thus
rendering the sepcific selection of a carrier unapplied.

Set the PLMN selection after executing network-register. This seems to
cause the modem to re-select the carrier eventually.

That being said, qmi does allow the parameterization of the
network-register to include dpecific PLMN settings, however this is
currently not implemented in uqmi.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agouqmi: set RAT preference before attach
David Bauer [Mon, 9 Oct 2023 14:29:59 +0000 (16:29 +0200)]
uqmi: set RAT preference before attach

Set the RAT preference before attaching. This handles cases better,
where a network might be available but not with the preferred RAT.

If RAT is changed to a non-available RAT after attach, QMI does not fail
with missing registration but with failing to establish a PDP session.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agouqmi: increase wait time before checking connection state
David Bauer [Sat, 7 Oct 2023 20:28:00 +0000 (22:28 +0200)]
uqmi: increase wait time before checking connection state

Increase the wait time before polling the connection state for the first
time.

Depending on the prior state of the modem, the first poll might still
return a connected state. The script then tries to establish a PDP
session, which subsequently fails as the modem by then is in scan state.

Increasing the wait-time to 3 seconds mitigates this from happening.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agouqmi: add illegal SIM state recovery
David Bauer [Sat, 7 Oct 2023 20:27:03 +0000 (22:27 +0200)]
uqmi: add illegal SIM state recovery

On some network-triggered disconnections the UIM state might end up in
"illegal". This prevents the modem from attaching to any network in
non-restricted service modes.

Detect this state and reset the SIM card. This way, the modem can attach
to networks again.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agouqmi: don't block restart on failed registration
David Bauer [Sat, 7 Oct 2023 10:33:45 +0000 (12:33 +0200)]
uqmi: don't block restart on failed registration

Failing the registration does not necessarily mean we can not bring this
interface up. For example, roaming SIM cards are possibly steered by the
home-operator.

Don't block restart of the QMI interface in this case.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agox86: add support for Mellanox Spectrum SN2000 Switches
Til Kaiser [Fri, 15 Sep 2023 12:06:38 +0000 (14:06 +0200)]
x86: add support for Mellanox Spectrum SN2000 Switches

The Mellanox Spectrum SN2000 Series Switches are Managed Ethernet
Switches with a maximum speed of 100Gb/s and up to 56 ports.

Tested on a Mellanox Spectrum SN2100 with the following specs:
 - CPU: Intel ATOM x86 dual-core 2.4GHz
 - RAM: 8GB
 - Disk: 16GB SSD
 - Ports: 16x QSFP28 100GbE, 1x 100M Mgmt Port, 1x RJ45 Serial Port
 - USB: 1x mini 2.0
 - Button: 1x (reset)
 - LEDs: 6x

Installation:
 - Create a bootable USB device (either by flashing this image
   onto it or another Linux distribution)
 - Unzip the generic OpenWrt x64 image
   and copy it onto the USB device
 - Plug the USB device into the Mellanox Switch and boot from it
 - Flash the image (e.g., with dd) onto the internal SSD
   of the switch (should be /dev/sda)

To enter the BIOS, reboot the switch and press CTRL+B while you see
the BIOS information text (American Megatrends …). The default password
to enter the BIOS is admin. To boot from the USB device, switch to the
Boot index tab and set your USB device at the top of the boot order
(the internal SSD should be currently there). Don't forget to set
the SSD back at the top after you have flashed the image.

Signed-off-by: Til Kaiser <til.kaiser@gmx.de>
[unify with generic x64 image]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agopackages: add needed packages for Mellanox Spectrum Switches
Til Kaiser [Fri, 15 Sep 2023 10:03:07 +0000 (12:03 +0200)]
packages: add needed packages for Mellanox Spectrum Switches

Add needed kernel and firmware packages for Mellanox Spectrum
SN2000 Series Switches.

Signed-off-by: Til Kaiser <til.kaiser@gmx.de>
5 months agofilogic: add support for ASUS TUF AX6000
Patryk Kowalczyk [Sat, 16 Sep 2023 01:02:35 +0000 (03:02 +0200)]
filogic: add support for ASUS TUF AX6000

Hardware
========
SOC: MediaTek MT7986
RAM: 512MB DDR3
FLASH: 256MB SPI-NAND
WIFI: Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz 4T4R
ETH: MediaTek MT7530 Switch (LAN)
MaxLinear GPY211C 2.5 N-Base-T PHY (WAN)
MaxLinear GPY211C 2.5 N-Base-T PHY (LAN)
UART: 3V3 115200 8N1 (Do not connect VCC)
USB 3.1

Installation
============

Download the OpenWrt initramfs image. Copy the image to a TFTP server
reachable at 192.168.1.70/24. Rename the image to TUF-AX6000.bin.

Connect to the serial console, interrupt the auto boot process by
pressing '4' when prompted or press '1' and set client IP, server
IP and name of the image.

yOU don't need to open the case or even soldering anything.
use three goldpin wires, remove their plastic cover and connect
them to the console pinout via the case holes.

You can see three holes
From Bottom: RX, TX, Ground - partially covered

Download & Boot the OpenWrt initramfs image.

In case of option '4'
$ setenv ipaddr 192.168.1.1
$ setenv serverip 192.168.1.70
$ tftpboot 0x46000000 TUF-AX6000.bin
$ bootm 0x46000000

In case of option '1'
1: Load System code to SDRAM via TFTP.
Please Input new ones /or Ctrl-C to discard
Input device IP (192.168.1.1) ==:
Input server IP (192.168.1.70) ==:
Input Linux Kernel filename (TUF-AX6000.trx) ==:

Wait for OpenWrt to boot. Transfer the sysupgrade
image to the device using scp and install using sysupgrade.

$ sysupgrade -n <path-to-sysupgrade.bin>

Missing features
================

2.5Gb LAN port LED is ON during boot or when the LAN cable is disconnected

The cover yellow light is not supported. (only blue one)

Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
5 months agomac80211: ath: add struct_group for struct ath_cycle_counters
Shiji Yang [Sat, 27 May 2023 09:18:50 +0000 (17:18 +0800)]
mac80211: ath: add struct_group for struct ath_cycle_counters

Add a struct_group to around all members in struct ath_cycle_counters.
It can help the compiler detect the intended bounds of the memcpy() and
memset().

This patch fixes the following build warning:

In function 'fortify_memset_chk',
    inlined from 'ath9k_ps_wakeup' at /home/db/openwrt/build_dir/target-mips_24kc_musl/linux-ath79_generic/backports-6.1.24/drivers/net/wireless/ath/ath9k/main.c:140:3:
./include/linux/fortify-string.h:314:25: error: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Werror=attribute-warning]
  314 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agokernel: fix mtd/NVMEM regression affecting U-Boot env NVMEM driver
Rafał Miłecki [Tue, 31 Oct 2023 16:09:45 +0000 (17:09 +0100)]
kernel: fix mtd/NVMEM regression affecting U-Boot env NVMEM driver

Fixes: b5956700702b ("kernel: backport nvmem v6.6 fixes and v6.7 changes")
Fixes: https://github.com/openwrt/openwrt/issues/13831
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 months agomvebu: add support for IIJ SA-W2
INAGAKI Hiroshi [Sun, 13 Nov 2022 08:22:26 +0000 (17:22 +0900)]
mvebu: add support for IIJ SA-W2

Internet Initiative Japan Inc. (IIJ) SA-W2 is a network appliance with
11ac (Wi-Fi 5) wlan, based on 88F6810.

Specification:

- SoC         : Marvell Armada 380 88F6810
- RAM         : DDR3 256 MiB (Micron MT41K64M16TW-107:J x2)
- Flash       : SPI-NOR 32 MiB (Winbond W25Q256JVFIQ)
- WLAN        : 2.4/5 GHz, Mini PCI-E
  - 2.4 GHz   : Silex SX-PCEGN (Atheros AR9287 (2T2R))
  - 5 GHz     : Silex SX-PCEAC (Qualcomm Atheros QCA9880 (3T3R))
- Ethernet    : 10/100/1000 Mbps x5
  - Switch    : Marvell 88E6172
- LEDs/Keys   : 12x/1x
- UART        : "CONSOLE" port (RJ-45, RS-232C)
  - settings  : 115200n8
  - assignment: 1:NC,  2:NC,  3:TXD, 4:GND,
                5:GND, 6:RXD, 7:NC,  8:NC
  - note      : compatible with Cisco console cable
- Power       : DC Input or PoE
  - DC Input  : 12 VDC, 3 A
  - PoE       : 802.3af
    - module  : Silvertel Ag9712-2BR
    - note    : USB ports shouldn't be used when powered by PoE
- Bootloader  : PMON2000 based
- Stock       : NetBSD based

Flash instruction using sysupgrade image:

1. Prepare TFTP server with IP address 192.168.0.10 and put sysupgrade
   image to TFTP directory
2. Connect PC to "GE0/PoE" port on SA-W2
3. Power on SA-W2, interrupt count-down by Esc and enter to bootloader
   CLI
4. Set IP address of the device

   address 192.168.0.1

5. Download sysupgrade image and flash to storage

   tftpload 192.168.0.10 <image name>
   firmwrite

   example:

   #tftpload 192.168.0.10 openwrt-mvebu-cortexa9-iij_sa-w2-squashfs-sysupgrade.bin
   Loading openwrt-mvebu-cortexa9-iij_sa-w2-squashfs-sysupgrade.bin
   loaded 8127268 byte(s)
   #firmwrite
   Erasing FLASH block  32 Done 0x00200000.
   Erasing FLASH block  33 Done 0x00210000.
   ...
   Erasing FLASH block 155 Done 0x009b0000.
   Erasing FLASH block 156 Done 0x009c0000.
   Programming FLASH. Done.
   Verifying FLASH. No Errors found.

6. Check the flashed firmware

   firmcheck

   example:

   #firmcheck
   [Normal firmware]
   ident: 'SEIL2015'
   copyright: 'ARM OpenWrt Linux-5.15.93'
   version format: 1
   version major: 9
   version minor: 99
   version release: 'r22060+36-5163bb5e54'
   body size: 3578524
   checksum: 0x8a083cb8

   [Rescue firmware]
   ident: 'SEIL2015'
   copyright: 'Copyright (c) 2017 Internet Initiative Japan Inc. All rights reserved.'
   version format: 1
   version major: 3
   version minor: 70
   version release: 'Release'
   body size: 10152458
   checksum: 0x8f9518c2

7. Boot with the flashed firmware

   boot

Note:

- The bootloader on this device is not U-Boot and it's environment space
  ("bootloader-env") has no compatibility with U-Boot tools.

- eth1 is connected to port6 of 88E6172 switch, but multi-cpu port can't
  be handled on Linux Kernel and not defined.

- Powering by PoE hasn't been tested yet.

- This device has 2x OS images on flash and they can be switched by
  setting "BOOTDEV" variable on bootloader CLI.
  That variable supports the following values:

  - "flash" : primary image on flash ("firmware")
  - "rescue": secondary image on flash ("rescue")
  - "usb"   : usb storage (broken?)
  - "lan0/1": network

  command to set:

  set BOOTDEV=<dev>

  example:

    set BOOTDEV=rescue

  This commit also supports booting from secondary partition.

- To execute initramfs image on bootloader CLI, use "go" command.
  ("go" command is not listed on the output of "help", but available)

  example (download and execute):

    address 192.168.0.1
    tftpload 192.168.0.10 openwrt-mvebu-cortexa9-iij_sa-w2-initramfs-kernel.bin
    go

MAC addresses:

LAN    : 00:E0:4D:xx:xx:19 (none)
WAN    : 00:E0:4D:xx:xx:18 (board_info, 0x6 (hex))
2.4 GHz: 84:25:3F:xx:xx:xx (Mini PCI-E card)
5 GHz  : 84:25:3F:xx:xx:xx (Mini PCI-E card)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agomvebu: cortexa9: enable seil-fw mtdsplit driver
INAGAKI Hiroshi [Sat, 11 Feb 2023 07:39:02 +0000 (16:39 +0900)]
mvebu: cortexa9: enable seil-fw mtdsplit driver

Enable seil-fw driver on mvebu/cortexa9 to use it on IIJ SA-W2.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agokernel: add seil-fw mtdsplit driver for IIJ SEIL devices
INAGAKI Hiroshi [Sat, 11 Feb 2023 07:36:56 +0000 (16:36 +0900)]
kernel: add seil-fw mtdsplit driver for IIJ SEIL devices

This mtdsplit parser driver parses firmware partition on Internet
Initiative Japan Inc. (IIJ) SEIL series devices.

Structure of header:

  0x0 - 0x7 : Identifier            (hex)
  0x8 - 0x57: Copyright             (ascii)
 0x58 - 0x5b: Data CRC              (hex)
 0x5c - 0x5f: Image Format Version  (hex)
 0x60 - 0x63: Image Major Version   (hex)
 0x64 - 0x67: Image Minor Version   (hex)
 0x68 - 0x87: Image Release Version (ascii)
 0x88 - 0x8b: Xor value for Data?   (hex)
 0x8c - 0x8f: Data Length           (hex)

Properties:

- compatible      : "iij,seil-firmware"
- iij,seil-id     : ID of SEIL firmware for the device (8 bytes)
  - examples:
    - SA-W2       : <0x5345494c 0x32303135> ("SEIL2015")
    - SEIL/X1     : <0x5345494c 0x2F582020> ("SEIL/X  ")
- iij,bootdev-name: boot device name assigned to the partition
                    (optional)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agoramips: enable wireless LEDs activity blinking for TP-Link EC330-G5u v1
Mikhail Zhilkin [Sun, 29 Oct 2023 19:10:23 +0000 (19:10 +0000)]
ramips: enable wireless LEDs activity blinking for TP-Link EC330-G5u v1

This commit enables wireless LEDs activity blinking for TP-Link EC330-G5u
v1 router.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
5 months agoath79: add support for GL.iNet GL-S200
Weiping Yang [Thu, 21 Sep 2023 02:17:32 +0000 (10:17 +0800)]
ath79: add support for GL.iNet GL-S200

Specifications:
SoC: QCA9531(650MHz)
RAM: DDR2 128M
Flash: SPI NOR 16M + SPI NAND 128M
WiFi: 2.4GHz with 2 antennas(WiFi/Thread)
Ethernet:
    1xLAN(10/100M)
    2xWAN(10/100M)
Button: 1x Reset Button
Switch: 1x Mode switch
LED: 1x Blue LED + 1x White LED + 1x Orange LED
IOT: Thread + ZigBee/Zwave

By uboot web failsafe:
Push the reset button for 5 seconds util the power led flash faster,
then use broswer to access http://192.168.1.1

Afterwards upgrade can use sysupgrade image.

Signed-off-by: Weiping Yang <weiping.yang@gl-inet.com>
5 months agohostapd: do not trim trailing whitespace, except for newline
Felix Fietkau [Mon, 30 Oct 2023 17:32:24 +0000 (18:32 +0100)]
hostapd: do not trim trailing whitespace, except for newline

Fixes adding SSID or key with trailing whitespace

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agodevcontainer: Add development environment for gihub codespace
Hauke Mehrtens [Sat, 1 Jul 2023 17:56:57 +0000 (19:56 +0200)]
devcontainer: Add development environment for gihub codespace

This adds a configuration for github codespace using our buildbot
container. This allows users to start VS code in the browser using the
buildbot build container.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agotools/elfutils: add missing dependency to fix build error
Felix Fietkau [Mon, 30 Oct 2023 08:08:39 +0000 (09:08 +0100)]
tools/elfutils: add missing dependency to fix build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agoath79: increase the rfkill debounce interval for TP-Link Archer C7 v2
Shiji Yang [Fri, 14 Jul 2023 15:09:55 +0000 (23:09 +0800)]
ath79: increase the rfkill debounce interval for TP-Link Archer C7 v2

Due to circuit issue or silicon defect, sometimes the WiFi switch button
of the Archer C7 v2 can be accidentally triggered multiple times in one
second. This will cause WiFi to be unexpectedly shut down and trigger
'irq 23: nobody cared'[1] warning. Increasing the key debounce interval
to 1000 ms can fix this issue. This patch also add the missing rfkill
key label.

[1] Warning Log:
```
[87765.218511] irq 23: nobody cared (try booting with the "irqpoll" option)
[87765.225331] CPU: 0 PID: 317 Comm: irq/23-keys Not tainted 5.15.118 #0
...
[87765.486246] handlers:
[87765.488543] [<85257547>] 0x800c29a0 threaded [<5c6328a2>] 0x80ffe0b8 [gpio_button_hotplug@4cf73d00+0x1a00]
[87765.498364] Disabling IRQ #23
```

Fixes: https://github.com/openwrt/openwrt/issues/13010
Fixes: https://github.com/openwrt/openwrt/issues/12167
Fixes: https://github.com/openwrt/openwrt/issues/11191
Fixes: https://github.com/openwrt/openwrt/issues/7835
Tested-by: Hans Hasert
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: fix Gigabit Ethernet port of the HiWiFi HC5861
Shiji Yang [Tue, 26 Sep 2023 12:12:45 +0000 (20:12 +0800)]
ramips: fix Gigabit Ethernet port of the HiWiFi HC5861

HiWiFi HC5861 has a GbE port which connected to the RTL8211E PHY
chip. This patch adds the missing Realtek PHY driver package and
sets the correct external PHYs base address to make it work again.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agomt76: Add firmware package for MT7922
Daniel Danzberger [Fri, 13 Oct 2023 11:50:49 +0000 (13:50 +0200)]
mt76: Add firmware package for MT7922

Adds the 2 required firmware files for MT7922 chips.

Signed-off-by: Daniel Danzberger <dd@embedd.com>
5 months agoiptables: opt-out of lto usage
Anari Jalakas [Sat, 14 Oct 2023 12:18:34 +0000 (15:18 +0300)]
iptables: opt-out of lto usage

This fixes building with USE_LTO enabled.

<artificial>:(.text+0xc22): relocation R_MIPS16_26 against `libxt_DNAT_init' cannot be used when making a shared object; recompile with -fPIC
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: non-dynamic relocations refer to dynamic symbol printf
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
5 months agolua: opt-out of lto usage
Anari Jalakas [Sat, 7 Oct 2023 12:16:47 +0000 (15:16 +0300)]
lua: opt-out of lto usage

This fixes building with USE_LTO enabled.

<artificial>:(.text+0xcc8): relocation R_MIPS16_26 against `luaL_argerror' cannot be used when making a shared object; recompile with -fPIC
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: non-dynamic relocations refer to dynamic symbol strcpy
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
5 months agolibsepol: opt-out of lto usage
Anari Jalakas [Sat, 7 Oct 2023 13:13:21 +0000 (16:13 +0300)]
libsepol: opt-out of lto usage

This fixes building with USE_LTO enabled.

<artificial>:(.text+0x4194): relocation R_MIPS16_26 against `cil_printf.lto_priv.0' cannot be used when making a shared object; recompile with -fPIC
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: non-dynamic relocations refer to dynamic symbol memcmp
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
5 months agolibselinux: opt-out of lto usage
Anari Jalakas [Sat, 7 Oct 2023 13:43:09 +0000 (16:43 +0300)]
libselinux: opt-out of lto usage

This fixes building with USE_LTO enabled:

<artificial>:(.text.exit+0x6e): relocation R_MIPS16_26 against `pthread_key_delete' cannot be used when making a shared object; recompile with -fPIC
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: non-dynamic relocations refer to dynamic symbol stpcpy
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
5 months agoiwinfo: opt-out of lto usage
Anari Jalakas [Sat, 7 Oct 2023 12:10:50 +0000 (15:10 +0300)]
iwinfo: opt-out of lto usage

This fixes building with USE_LTO enabled.

<artificial>:(.text+0x400c): relocation R_MIPS16_26 against `iwinfo_close' cannot be used when making a shared object; recompile with -fPIC
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: non-dynamic relocations refer to dynamic symbol strcpy
./openwrt/staging_dir/toolchain-mips_24kc_gcc-12.3.0_musl/lib/gcc/mips-openwrt-linux-musl/12.3.0/../../../../mips-openwrt-linux-musl/bin/ld.bfd: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status

Signed-off-by: Anari Jalakas <anari.jalakas@gmail.com>
5 months agobuild: hide kmod-zram config unless enabled
Rani Hod [Sun, 8 Oct 2023 15:18:13 +0000 (18:18 +0300)]
build: hide kmod-zram config unless enabled

Currently the zram default compressor choice is displayed whether or not
zram is activated. Since the default choice is lzo-rle, this adds a
false dependency on kmod-lib-lzo.
With this patch, the choice options appear only when activating zram.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
5 months agoramips: add support for ZyXEL LTE5398-M904
Milan Krstic [Fri, 29 Sep 2023 15:26:47 +0000 (15:26 +0000)]
ramips: add support for ZyXEL LTE5398-M904

ZyXEL LTE5398-M904 is a dual band 802.11ac indoor LTE/3G CPE with an FXS
port.

Specifications:

* SoC: Mediatek MT7621AT
* RAM: 256 MB
* Flash: 128MB NAND (MX30LF1G18AC)
* WiFi: MediaTek MT7603 2.4G + MediaTek MT7615 5G
* Switch: 2 GbE ports MT7530
* LTE/3G: Quectel EG18-EA LTE-A Cat. 18
* SIM: 1 micro-SIM card slot
* Buttons: Reset, WPS
* LEDs: power (G/B), internet (G), LTE (R/G/Orange), WiFi (G), voice (G)
* VoIP: 1 FXS RJ11 port
* Power: 12V, 2A

UART serial console:

57600,8N1
Unpopulated header J5:

 [o] GND
 [ ] key - no pin
 [o] RX
 [o] TX
 [o] 3.3V Vcc

Installation:

* Log in as root using ssh to 192.168.1.1
* scp OpenWrt initramfs-recovery.bin image to root@192.168.1.1:/tmp/
* Prepare bootloader config by running:
   nvram setro uboot DebugFlag 0x1
   nvram setro uboot CheckBypass 0
   nvram commit
* Run "mtd_write -w write /tmp/initramfs-recovery.bin Kernel" and reboot
* Wait for OpenWrt to boot and ssh to root@192.168.1.1
* Run sysupgrade with OpenWrt squashfs-sysupgrade.bin image

For mode details about flashing see:
2449a63208 (ramips: mt7621: Add support for ZyXEL NR7101, 2021-04-19)

Unsupported:

* FXS/Voice

Signed-off-by: Milan Krstic <milan.krstic@gmail.com>
5 months agofirmware-utils: bump to git HEAD
Hauke Mehrtens [Sun, 29 Oct 2023 17:38:47 +0000 (18:38 +0100)]
firmware-utils: bump to git HEAD

a170683 firmware-utils: fix use of NULL string progname
89875fc tplink-safeloader: CPE510: add Canadian support
9e211d2 mktplinkfw2: add support to extract bootloader images
c18f662 mktplinkfw2: add support to pack bootloader
3dc1339 mktplinkfw2: show exact exceed bytes when the image is to big
d16ff79 tplink-safeloader: WPA8631: add v4 AU, US
0fa1cc5 zytrx: add LTE5398-M904
6354661 firmware-utils: ptgen: add SiFive GPT partition support

The removed patch was applied upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel: fix compile issues with tools/ on macOS
Felix Fietkau [Sun, 29 Oct 2023 12:56:14 +0000 (13:56 +0100)]
kernel: fix compile issues with tools/ on macOS

Reduce dependencies on linux specific header files.
Avoid using __weak for function declarations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agoelfutils: fix build and enable on non-linux systems
Felix Fietkau [Wed, 11 Jan 2023 17:41:22 +0000 (18:41 +0100)]
elfutils: fix build and enable on non-linux systems

Use gnulib for compatibility

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agotools/include: add more endian macros
Felix Fietkau [Wed, 11 Jan 2023 17:39:02 +0000 (18:39 +0100)]
tools/include: add more endian macros

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agoqualcommax: only build initramfs if CONFIG_TARGET_ROOTFS_INITRAMFS is set
Florian Maurer [Thu, 26 Oct 2023 06:40:59 +0000 (08:40 +0200)]
qualcommax: only build initramfs if CONFIG_TARGET_ROOTFS_INITRAMFS is set

This makes it possible to build the ipq807x netgear-wax218 without initramfs - which is required for downstream projects (gluon)

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
5 months agoqualcommax: mark upstreamed patches as such
Robert Marko [Sun, 29 Oct 2023 10:00:50 +0000 (11:00 +0100)]
qualcommax: mark upstreamed patches as such

The GPLL fixes were merged upstream, so lets mark them as such.

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled
Matt Merhar [Sun, 29 Oct 2023 01:15:46 +0000 (21:15 -0400)]
kernel: fix jffs2 compilation with GCC_PLUGIN_RANDSTRUCT enabled

Designated initializers are required when using the randstruct GCC
plugin, otherwise an error like the following is seen:

./include/linux/lzma.h:60:31: error: positional initialization of field in 'struct' declared with 'designated_init' attribute [-Werror=designated-init]

This was originally applied via 55643e469c21, but was unintentionally
reverted in 483503603cb2.

Fixes: 483503603cb2 ("generic: 5.15: rework pending patch")
Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>