openwrt/openwrt.git
18 months agoca-certificates: Update to version 20230311
Tianling Shen [Fri, 26 May 2023 04:09:47 +0000 (12:09 +0800)]
ca-certificates: Update to version 20230311

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

Use TAR_OPTIONS instead of hacking Build/Prepare, refresh patches.

Debian change-log entry [1]:
|[...]
|[ Đoàn Trần Công Danh ]
|* ca-certificates: compat with non-GNU mktemp (closes: #1000847)
|
|[ Ilya Lipnitskiy ]
|* certdata2pem.py: use UTC time when checking cert validity
|
|[ Julien Cristau ]
|* Update Mozilla certificate authority bundle to version 2.60
|   The following certificate authorities were added (+):
|   + "Autoridad de Certificacion Firmaprofesional CIF A62634068"
|   + "Certainly Root E1"
|   + "Certainly Root R1"
|   + "D-TRUST BR Root CA 1 2020"
|   + "D-TRUST EV Root CA 1 2020"
|   + "DigiCert TLS ECC P384 Root G5"
|   + "DigiCert TLS RSA4096 Root G5"
|   + "E-Tugra Global Root CA ECC v3"
|   + "E-Tugra Global Root CA RSA v3"
|   + "HARICA TLS ECC Root CA 2021"
|   + "HARICA TLS RSA Root CA 2021"
|   + "HiPKI Root CA - G1"
|   + "ISRG Root X2"
|   + "Security Communication ECC RootCA1"
|   + "Security Communication RootCA3"
|   + "Telia Root CA v2"
|   + "TunTrust Root CA"
|   + "vTrus ECC Root CA"
|   + "vTrus Root CA"
|  The following certificate authorities were removed (-):
|  - "Cybertrust Global Root" (expired)
|  - "EC-ACC"
|  - "GlobalSign Root CA - R2" (expired)
|  - "Hellenic Academic and Research Institutions RootCA 2011"
|  - "Network Solutions Certificate Authority"
|  - "Staat der Nederlanden EV Root CA" (expired)
|* Drop trailing space from debconf template causing misformatting
|  (closes: #980821)
|
|[ Wataru Ashihara ]
|* Make certdata2pem.py compatible with cryptography >= 35 (closes: #1008244)
|[...]

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

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
18 months agoCI: don't add "" in target and subtarget for label workflow
Christian Marangi [Sat, 27 May 2023 17:53:15 +0000 (19:53 +0200)]
CI: don't add "" in target and subtarget for label workflow

Don't add "" in target and subtarget for label workflow from label
detection as it does cause problem in build workflow on container
target/subtarget matching.

Fixes: bf8187d5dc4d ("CI: use split target and subtarget in label workflow")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agomediatek: filogic: add Qihoo 360T7 support
Chukun Pan [Sat, 29 Apr 2023 15:08:26 +0000 (23:08 +0800)]
mediatek: filogic: add Qihoo 360T7 support

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: ESMT F50L1G41LB 128MB
  RAM: MT5CC128M16JR-EK 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, WPS
  Power: DC 12V 1A

Flash instructions:
  1. Attach UART, boot the stock firmware until
     the message about failsafe mode appears.
  2. Enter failsafe mode by pressing "f" and "Enter"
  3. Type "mount_root", then run
     "fw_setenv bootmenu_delay 3"
  4. Back up all mtd partitions before flashing.
  5. Reboot, U-Boot now presents a menu.
  6. Connect to your PC via the Gigabit port of the router,
     set a static ip on the ethernet interface of your PC.
     (ip 192.168.1.254, gateway 192.168.1.1)
  7. Select "Upgrade ATF BL2", then use this file:
     openwrt-mediatek-filogic-qihoo_360t7-preloader.bin
  8. Select "Upgrade ATF FIP", then use this file:
     openwrt-mediatek-filogic-qihoo_360t7-bl31-uboot.fip
  9. Download the initramfs image, and type "reset",
     waiting for tftp recovery to complete.
  a. After openwrt boots up, perform sysupgrade.

Note:
  1. Since NMBM is disabled, we must back up all partitions.
  2. Flash instructions is based on commit 28df7f7.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
18 months agouboot-mediatek: add Qihoo 360T7 support
Chukun Pan [Fri, 28 Apr 2023 15:36:17 +0000 (23:36 +0800)]
uboot-mediatek: add Qihoo 360T7 support

The vendor uboot will verify firmware at boot.
So add a custom uboot build for this device.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
18 months agoarm-trusted-firmware-mediatek: add build for MT7981 DDR3
Chukun Pan [Wed, 26 Apr 2023 15:28:31 +0000 (23:28 +0800)]
arm-trusted-firmware-mediatek: add build for MT7981 DDR3

Add new build option BOARD_QFN/BOARD_BGA.
This option is only useful for MT7981 device.
MT7981A/B: BOARD_BGA, MT7981C: BOARD_QFN.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
18 months agomediatek: filogic: add uboot build for mt7981
Chukun Pan [Tue, 25 Apr 2023 15:06:20 +0000 (23:06 +0800)]
mediatek: filogic: add uboot build for mt7981

Rename previous uboot build to mt7986-*.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
18 months agomediatek: mt7981: add reserved memory to support pstore
Alexander Couzens [Sun, 19 Mar 2023 18:00:51 +0000 (19:00 +0100)]
mediatek: mt7981: add reserved memory to support pstore

Add reserved memory for pstore/ramoops to device tree used by Linux
as well as U-Boot.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: cleanly backport and add fix for I2C driver
Daniel Golle [Fri, 26 May 2023 12:49:02 +0000 (13:49 +0100)]
mediatek: cleanly backport and add fix for I2C driver

Pick accepted patches from upstream Linux tree instead of having to
maintain our slightly different downstream patches.
Import pending patch fixing I2C on MT7981 by making sure all clocks
are enabled before accessing I2C registers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agogeneric: add kernel tag to backport patch
Nick Hainke [Fri, 26 May 2023 21:01:59 +0000 (23:01 +0200)]
generic: add kernel tag to backport patch

In the previous commit, the kernel tag was not added when adding the
backport.

Fixes: 537624db39a9 ("generic: backport missing helper for phy interfaces")
Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agogeneric: backport missing helper for phy interfaces
Nick Hainke [Fri, 26 May 2023 20:16:27 +0000 (22:16 +0200)]
generic: backport missing helper for phy interfaces

The function was defined before in the patch
"hack-5.15/795-backport-phylink_pcs-helpers.patch". However, the hack
did not move to 6.1. Instead of using the hack do the backport of
upstream accepted version.

Fixes errors in the form of:
  make[8]: Entering directory '/home/nick/openwrt/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/linux-6.1.29'
    CC      drivers/net/pcs/pcs-mtk-lynxi.o
  drivers/net/pcs/pcs-mtk-lynxi.c: In function 'mtk_pcs_lynxi_config':
  drivers/net/pcs/pcs-mtk-lynxi.c:160:30: error: implicit declaration of function 'phylink_get_link_timer_ns' [-Werror=implicit-function-declaration]
    160 |                 link_timer = phylink_get_link_timer_ns(interface);
        |                              ^~~~~~~~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Fixes: fa79baf4a6e2 ("generic: copy backport, hack, pending patch and config from 5.15 to 6.1")
Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agoramips: mark patches accepted upstream
Nick Hainke [Tue, 23 May 2023 14:47:42 +0000 (16:47 +0200)]
ramips: mark patches accepted upstream

Add kernel tags to the patches that got accepted upstream.

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agomediatek: fix, clean and unify SD card image generation
Daniel Golle [Fri, 26 May 2023 09:26:49 +0000 (10:26 +0100)]
mediatek: fix, clean and unify SD card image generation

Make sure sub-images on the SD card are size-checked, allow
generating SD card without squashfs and/or initramfs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agokernel: disable wireless extension support for 6.1
Felix Fietkau [Fri, 26 May 2023 11:34:40 +0000 (13:34 +0200)]
kernel: disable wireless extension support for 6.1

It is unused

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agomac80211: remove legacy unused lib80211 support patch
Felix Fietkau [Fri, 26 May 2023 11:37:18 +0000 (13:37 +0200)]
mac80211: remove legacy unused lib80211 support patch

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agohostapd: remove unused legacy wireless extension support
Felix Fietkau [Fri, 26 May 2023 11:32:47 +0000 (13:32 +0200)]
hostapd: remove unused legacy wireless extension support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agoipq-wifi: bump to latest git HEAD
Antti Nykänen [Thu, 25 May 2023 06:43:46 +0000 (09:43 +0300)]
ipq-wifi: bump to latest git HEAD

0f73d32 ipq8074: update RegDB in new submitted BDF
a4cd21f ipq8074: add Compex WPQ873 BDF
c888dd0 qca-wireless: ipq40xx: Add BDFs for Eero Cento
6388ba9 ipq8074: update regdb for Netgear SXK80 BDF
77775d2 ipq8074: add Netgear SXK80

Signed-off-by: Antti Nykänen <antti.nykanen@nokia.com>
18 months agoipq807x: add support for Compex WPQ873
Antti Nykänen [Thu, 25 May 2023 06:42:09 +0000 (09:42 +0300)]
ipq807x: add support for Compex WPQ873

The Compex WPQ873 is a development board with two M.2 B-key
 slots for cellular modems.

Device info:
 - IPQ8072A SoC
 - 512MiB RAM
 - 256MiB NAND flash
 - 8MiB SPI NOR
 - 3x 1GigE ports
 - 1x 2.5GigE port
 - 2.4GHz/5GHz AX WLAN
 - 1x USB 3.0 port
 - 1x M.2 B-key socket with PCIe 3.0
 - 1x M.2 B-key socket with PCIe 2.0 and USB 3.0
 - 4x SIM card slots
 - Bluetooth LE 5.0 (QCA4024)

Prerequisites
1) TFTP server
2) 3.3V USB to TTL cable for UART console
   2.54mm pitch 4-pin header for UART is readily provided on board, no modifications are necessary to access it
   TTL connector pinout: 2=TX, 3=RX, 4=GND
   Arrow marks pin 1 which is 3.3V
   Serial port settings: 115200 8N1 no flow control

The device will most likely ship with a QSDK-based firmware.

1. Power on device and interrupt u-boot to obtain u-boot CLI

2. set serverip to IP address of the TFTP server, for example:

        `setenv serverip 192.168.1.10`

3. Download image from TFTP server:

        `tftpboot 0x44000000 openwrt-ipq807x-generic-compex_wpq873-squashfs-factory.ubi`

4. Flash ubi image to both partitions and reset:

        `sf probe
         imxtract 0x44000000 ubi
         nand device 0
         nand erase 0x0 0x3400000
         nand erase 0x3c00000 0x3400000
         nand write $fileaddr 0x0 $filesize
         nand write $fileaddr 0x3c00000 $filesize
         reset`

Afterwards, you can use sysupgrade to flash new OpenWRT images.

Signed-off-by: Antti Nykänen <antti.nykanen@nokia.com>
18 months agokernel: bump 5.15 to 5.15.113
John Audia [Wed, 24 May 2023 19:10:44 +0000 (15:10 -0400)]
kernel: bump 5.15 to 5.15.113

All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
18 months agox86: disable CONFIG_X86_PLATFORM_DRIVERS_HP
John Audia [Thu, 25 May 2023 07:29:58 +0000 (03:29 -0400)]
x86: disable CONFIG_X86_PLATFORM_DRIVERS_HP

New config option defaulted to N for this bump.

Signed-off-by: John Audia <therealgraysky@proton.me>
18 months agoipq806x: Add support for Netgear Nighthawk Pro Gaming XR450
Andrzej Mialkowski [Fri, 19 May 2023 11:09:54 +0000 (04:09 -0700)]
ipq806x: Add support for Netgear Nighthawk Pro Gaming XR450

Motivation:
 Firmware with platform ID "XR450" required for easy installation.

Manufacturer pages:
 Product page: https://www.netgear.com/support/product/xr450
 Product Data Sheet: https://www.netgear.com/images/datasheet/networking/wifirouter/XR450.pdf
 Current firmware: https://www.downloads.netgear.com/files/GDC/XR450/XR450-V2.3.2.134.zip

Specifications:
Almost identical to Netgear XR500(https://openwrt.org/toh/hwdata/netgear/netgear_xr500)

Differences:
Platform ID: XR450, utilized for firmware validation
WLAN 2.4GHz: b/g/n Supports QAM64 (XR500 QAM256)

SoC: Qualcomm Atheros IPQ8065
RAM: 512 MB
Storage: 256 MiB
Wireless: Qualcomm Atheros QCA9984
Switch: Qualcomm Atheros AR8337 rev. 2
Ethernet: 5x 1000/100/10
USB: 2x 3.0

Install via WEB GUI (recommended):
1. Navigate within GUI to firmware update section
2. Select openwrt-ipq806x-netgear_xr450-squashfs-factory.img
3. Dismiss downgrade warning

Install via TFTP recovery (same as XR500/R7800):

1. Configure host PC to use static address 192.168.1.10 https://openwrt.org/toh/netgear/r7800#prerequisites_for_tftp_flashing
2. Flash openwrt-ipq806x-netgear_xr450-squashfs-factory.img using procedure https://openwrt.org/toh/netgear/r7800#tftp_flashing_process

Revert to stock firmware
1. Download current manufacturer firmware, decompress zip file to obtain img file
2. Use TFTP recovery method flash img file (currently XR450-V2.3.2.134.img)
ipq806x: add support to netgear_xr450

Signed-off-by: Andrzej Mialkowski <andrzej.mialkowski@gmail.com>
18 months agokernel: Backport MGLRU patch from 6.4
Kazuki Hashimoto [Wed, 24 May 2023 14:58:03 +0000 (23:58 +0900)]
kernel: Backport MGLRU patch from 6.4

This fixes a bug where the reclaim path could occasionally have long
tail latency.

Signed-off-by: Kazuki Hashimoto <kazukih0205@gmail.com>
18 months agokernel: 6.1: Synchronize MGLRU patches with upstream
Kazuki Hashimoto [Wed, 24 May 2023 14:56:36 +0000 (23:56 +0900)]
kernel: 6.1: Synchronize MGLRU patches with upstream

Replace the refreshed 5.15 backports with backports for 6.1.

This fixes FMODE_CAN_ODIRECT having the same value as
FMODE_NOREUSE.

Signed-off-by: Kazuki Hashimoto <kazukih0205@gmail.com>
18 months agoCI: build: fix parse toolchain step failing for git strict rules
Christian Marangi [Thu, 25 May 2023 00:44:21 +0000 (02:44 +0200)]
CI: build: fix parse toolchain step failing for git strict rules

Commit 1cb8cdb ("ci: use new buildbot worker images with Debian 11")
introduced new Git version with strict rules for owner of the git
directory.

To handle this and not cause major change, just move the parsing before
the change of ownership of the openwrt directory permitting the correct
run of git fetch command with the same user that did the repository
checkout.

Fixes: 1cb8cdb ("ci: use new buildbot worker images with Debian 11")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoCI: correctly output subtarget in label workflow
Christian Marangi [Thu, 25 May 2023 21:09:59 +0000 (23:09 +0200)]
CI: correctly output subtarget in label workflow

Commit bf8187d5dc4d ("CI: use split target and subtarget in label
workflow") didn't correctly output subtarget resulting in calling with
an empty subtarget. Fix this and correctly output generated subtarget.

Fixes: bf8187d5dc4d ("CI: use split target and subtarget in label workflow")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoCI: use split target and subtarget in label workflow
Christian Marangi [Thu, 25 May 2023 16:24:00 +0000 (18:24 +0200)]
CI: use split target and subtarget in label workflow

With eecc6e48117b ("CI: rework build workflow to have split target and
subtarget directly") target and subtarget are split in 2 different
variables. Label workflow were not aligned to this change and are
currently broken.

Fix them and correctly pass split target and subtarget.

Fixes: eecc6e48117b ("CI: rework build workflow to have split target and subtarget directly")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoCI: ignore master branch for push events
Christian Marangi [Thu, 25 May 2023 11:52:03 +0000 (13:52 +0200)]
CI: ignore master branch for push events

Due to problem with migrating from master to main as the default branch
and downstream project still requiring the master branch to be present,
we currently have for push events double CI runs, one for main and one
for master. To solve this ignore any push event to the master branch for
every workflow that react on push events.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: filter out CONFIG_PAHOLE_HAS_SPLIT_BTF
Robert Marko [Mon, 22 May 2023 21:42:13 +0000 (23:42 +0200)]
generic: filter out CONFIG_PAHOLE_HAS_SPLIT_BTF

CONFIG_PAHOLE_HAS_SPLIT_BTF should be runtime detected as it depends on
pahole being available on the host, so filter it out of configs.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agogeneric: 6.1: disable CONFIG_VMWARE_VMCI by default
Robert Marko [Mon, 22 May 2023 21:38:44 +0000 (23:38 +0200)]
generic: 6.1: disable CONFIG_VMWARE_VMCI by default

There is no reason for VMware VMCI to be disabled in targets, so disable
it in the generic config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agogeneric: 6.1: disable CONFIG_OCTEON_EP by default
Robert Marko [Mon, 22 May 2023 21:36:44 +0000 (23:36 +0200)]
generic: 6.1: disable CONFIG_OCTEON_EP by default

There is no reason for Octeon PCI endpoint driver to be disabled in targets
so disable it in generic config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agogeneric: 6.1: disable CONFIG_HP_WATCHDOG by default
Robert Marko [Mon, 22 May 2023 21:34:01 +0000 (23:34 +0200)]
generic: 6.1: disable CONFIG_HP_WATCHDOG by default

There is no reason for HP ProLiant HW watchdog to be disabled in individual
targets, so disable it in generic config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agogeneric: 6.1: disable CONFIG_ARCH_NXP by default
Robert Marko [Mon, 22 May 2023 21:31:05 +0000 (23:31 +0200)]
generic: 6.1: disable CONFIG_ARCH_NXP by default

There is no reason for CONFIG_ARCH_NXP to have to be disabled in individual
targets, so just disable CONFIG_ARCH_NXP in generic config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agogeneric: 6.1: disable CONFIG_SURFACE_PLATFORMS by default
Robert Marko [Mon, 22 May 2023 21:28:05 +0000 (23:28 +0200)]
generic: 6.1: disable CONFIG_SURFACE_PLATFORMS by default

There is no need for Surface platform drivers to be enabled by default,
especially on OpenWrt so disable CONFIG_SURFACE_PLATFORMS in the generic
config.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agobpftools: update, split off bpftool and libbpf packages
Tony Ambardar [Sun, 21 May 2023 09:14:37 +0000 (02:14 -0700)]
bpftools: update, split off bpftool and libbpf packages

My original bpftools package made "variant" builds of bpftool and libbpf
as a convenience, since both used the same local kernel sources with the
same versioning. This is no longer the case, since the commit below
switched to using an out-of-tree build mirror hosting repos for each.

Replace bpftools with separate bpftool and libbpf packages, each simplified
and correctly versioned. Also fix the broken libbpf ABI introduced in the
same commit. Existing build .config files are not impacted.

Fixes: 00cbf6f6ab1d ("bpftools: update to standalone bpftools + libbpf, use the latest version")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
18 months agotools/meson: update to 1.1.0
Nick Hainke [Mon, 29 Aug 2022 06:03:08 +0000 (08:03 +0200)]
tools/meson: update to 1.1.0

Remove upstreamed:
- 010-wsl2.patch

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
- 0.64.0 https://mesonbuild.com/Release-notes-for-0-64-0.html
- 1.0.0 https://mesonbuild.com/Release-notes-for-1-0-0.html
- 1.1.0 https://mesonbuild.com/Release-notes-for-1-1-0.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agoubnt-ledbar: depend on mediatek and ramips subtargets
Tomasz Maciej Nowak [Thu, 27 Apr 2023 14:34:49 +0000 (16:34 +0200)]
ubnt-ledbar: depend on mediatek and ramips subtargets

It's only used on devices in mt7621 and mt7622 subtargets, so no reason
to compile it for others.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
18 months agoubnt-ledbar: add kernel 6.1 compat
Tomasz Maciej Nowak [Thu, 27 Apr 2023 14:34:48 +0000 (16:34 +0200)]
ubnt-ledbar: add kernel 6.1 compat

As of ed5c2f5fd10d ("i2c: Make remove callback return void") return
value of remove function is ignored.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
18 months agokernel: qca-ssdk: backport support for building as kernel module
Robert Marko [Tue, 23 May 2023 12:55:48 +0000 (14:55 +0200)]
kernel: qca-ssdk: backport support for building as kernel module

Currently, SSDK is rather special in the sense that its not being built as
a proper out of tree module at all but rather like a userspace application
and that involves a lot of make magic which unfortunately broke with make
version 4.4 and newer.

Luckily QCA finally added a way to build SSDK as an out of tree module
and it uses the kernel buildsystem which makes it compile with make 4.4
as well.
So lets backport the support for it and switch to using it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agoCI: build: Add support to use container included external toolchain
Christian Marangi [Sat, 17 Dec 2022 14:07:28 +0000 (15:07 +0100)]
CI: build: Add support to use container included external toolchain

Add support to use container included external toolchain and skip
redownloading external sdk for each test.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoCI: push-containers: build and push container with external toolchain
Christian Marangi [Fri, 16 Dec 2022 23:21:31 +0000 (00:21 +0100)]
CI: push-containers: build and push container with external toolchain

Build and push container with external toolchain embedded in the
container image.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoCI: build: add checks to test if toolchain container can be used
Christian Marangi [Tue, 23 May 2023 13:25:56 +0000 (15:25 +0200)]
CI: build: add checks to test if toolchain container can be used

Add checks to test if toolchain container can be used.
This is to handle case of new target or migration of any sort.

If the toolchain container can't be found, the tools container is used
instead.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoCI: build: add option to configure container to use
Christian Marangi [Sat, 17 Dec 2022 01:02:26 +0000 (02:02 +0100)]
CI: build: add option to configure container to use

Add option to configure container to use for build test.
By default the tools container is used if no option is provided.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoCI: build: package external toolchain after build
Christian Marangi [Tue, 20 Dec 2022 19:02:35 +0000 (20:02 +0100)]
CI: build: package external toolchain after build

Package external toolchain after correct build.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoci: push-containers: trigger job on release branching
Petr Štetiar [Tue, 23 May 2023 14:56:09 +0000 (16:56 +0200)]
ci: push-containers: trigger job on release branching

Currently all 23.05 related CI jobs are failing as the containers are
not available, so lets fix it by pushing those containers when the
version.mk changes.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoci: tools: run the job on changes in include directory as well
Petr Štetiar [Tue, 23 May 2023 12:27:05 +0000 (14:27 +0200)]
ci: tools: run the job on changes in include directory as well

In order to prevent regressions like with #12617.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agoprereq: SetupHostCommand: fix wrong check result
Petr Štetiar [Tue, 23 May 2023 12:17:47 +0000 (14:17 +0200)]
prereq: SetupHostCommand: fix wrong check result

Tony has reported, that CI tools job is failing for him in macOS
container due to prereq check failure for GNU `install` utility.

Michael diagnosed it and from his traces it was clear, that the issue is
caused by a wrong return value in the success check case, so lets fix it
accordingly.

Fixes: f75204036ccc ("prereq-build: allow host command symlinks to update")
Reported-by: Tony Ambardar <itugrok@yahoo.com>
Diagnosed-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agomediatek: add basic mt7988 device tree support
Sam Shih [Sun, 19 Feb 2023 02:18:36 +0000 (10:18 +0800)]
mediatek: add basic mt7988 device tree support

This add basic device tree support for mediatek MT7988 SoC

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: backport cpufreq changes to support MT7988
Daniel Golle [Sun, 30 Apr 2023 17:03:00 +0000 (18:03 +0100)]
mediatek: backport cpufreq changes to support MT7988

Backport cpufreq changes from upstream so that the MediaTek MT7988 SoC
can be supported.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: filogic: add driver for Richtek RT5190A regulator
Daniel Golle [Sun, 30 Apr 2023 16:13:33 +0000 (17:13 +0100)]
mediatek: filogic: add driver for Richtek RT5190A regulator

The Richtek RT5190A is used on the MT7988 reference board. Backport and
enable the driver on the filogic subtarget, so we can support cpufreq
on the MT7988 reference board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: add driver for built-in 2.5G Ethernet PHY
Daniel Golle [Sun, 30 Apr 2023 16:41:22 +0000 (17:41 +0100)]
mediatek: add driver for built-in 2.5G Ethernet PHY

Add driver for the built-in 2.5G Ethernet PHY found in the MT7988 SoC.
To function the PHY also needs firmware files which have not yet been
published via linux-firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: update pending SoC Ethernet PHY driver
Daniel Golle [Sun, 30 Apr 2023 16:34:55 +0000 (17:34 +0100)]
mediatek: update pending SoC Ethernet PHY driver

Update driver for MediaTek's built-in Gigabit Ethernet PHYs which can be
found in the MT7981 and MT7988 SoCs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agogeneric: mt7530: backport support for the MT7988 built-in switch
Daniel Golle [Sun, 30 Apr 2023 13:32:03 +0000 (14:32 +0100)]
generic: mt7530: backport support for the MT7988 built-in switch

Backport commits adding support for the MT7988 built-in switch to the
mt7530 driver.

This change results in the Kconfig symbol NET_DSA_MT7530 to be extended
by NET_DSA_MT7530_MDIO (everything formally covered by NET_DSA_MT7530)
and NET_DSA_MT7530_MMIO (a new driver for the MMIO-connected built-in
switch of the MT7988 SoC).

Select NET_DSA_MT7530_MDIO for all targets previously selecting
NET_DSA_MT7530, with the exception of mediatek/filogic which also
selects NET_DSA_MT7530_MMIO.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agogeneric: add support for MediaTek NETSYS v3
Daniel Golle [Sun, 30 Apr 2023 16:16:12 +0000 (17:16 +0100)]
generic: add support for MediaTek NETSYS v3

In order to support Ethernet on the MT7988 SoC add support for NETSYS v3
as well as new paths and USXGMII SerDes to the mtk_eth_soc driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: add mt7988 pinctrl driver support
Sam Shih [Sun, 19 Feb 2023 02:15:10 +0000 (10:15 +0800)]
mediatek: add mt7988 pinctrl driver support

This adds provisional pinctrl driver support for the MediaTek MT7988 SoC.

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: add mt7988 clock drivers support
Sam Shih [Sun, 19 Feb 2023 02:11:50 +0000 (10:11 +0800)]
mediatek: add mt7988 clock drivers support

This adds clock drivers for the MediaTek MT7988 SoC

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: mt7981: setup all clocks needed for eMMC
Daniel Golle [Tue, 23 May 2023 01:14:32 +0000 (02:14 +0100)]
mediatek: mt7981: setup all clocks needed for eMMC

Setup all necessary clocks to get MMC to work on MT7981, similar to
how it is done also on MT7986.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agomediatek: mt7981: usb enable 3.0 by default
Chukun Pan [Mon, 1 May 2023 15:20:28 +0000 (23:20 +0800)]
mediatek: mt7981: usb enable 3.0 by default

There is no reason to limit USB to 2.0 mode
by default, delete this limit.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
18 months agokernel: enable (ARM|ARM64)_MODULE_PLTS in generic config
Tony Ambardar [Fri, 5 May 2023 02:17:35 +0000 (19:17 -0700)]
kernel: enable (ARM|ARM64)_MODULE_PLTS in generic config

This allows loading modules with large memory requirements, recently needed
while testing on armvirt/32. Past forum discussions [1] and bug reports [2]
also raised this and the ipq806x target already set it in response [3].
Given this increases kernel image size by only ~1KB, is generally useful on
multi-platform kernels, and enabled by default on upstream arm32 Linux, add
it to the generic config.

The setting has similar utility on arm64, is a requirement for KASLR, and
already enabled on most OpenWrt aarch64 targets, so pull this into the
top-level generic config.

[1]: https://forum.openwrt.org/t/vmap-allocation-for-size-442368-failed-use-vmalloc-size-to-increase-size/34545/7
[2]: https://github.com/openwrt/openwrt/issues/8282
[3]: f81e148eb6 ("ipq806x: update 4.19 kernel config").

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
18 months agoRevert "feeds: use git-src-full to allow Git versioning"
Petr Štetiar [Sun, 21 May 2023 16:43:53 +0000 (18:43 +0200)]
Revert "feeds: use git-src-full to allow Git versioning"

This partially reverts commit 7fae1e5677e9bb4979c8d4ac99be4de6955b13d0
as it should be no longer necessary to do a full clone since commit
48ed07bc0b94 ("treewide: replace AUTORELEASE with real PKG_RELEASE").

Suggested-by: Thibaut VARÈNE <hacks@slashdirt.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agokernel: add disabled symbol CONFIG_CPU_LITTLE_ENDIAN on 6.1
Aleksander Jan Bajkowski [Mon, 22 May 2023 21:29:02 +0000 (23:29 +0200)]
kernel: add disabled symbol CONFIG_CPU_LITTLE_ENDIAN on 6.1

The identical change was previously added to the 5.15 kernel in the commit
9226f1e41948 ("kernel: disable CONFIG_CPU_LITTLE_ENDIAN in generic config").

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
18 months agokernel: sort generic configuration
Aleksander Jan Bajkowski [Mon, 22 May 2023 21:27:52 +0000 (23:27 +0200)]
kernel: sort generic configuration

This was done by executing these commands:

$ ./scripts/kconfig.pl '+' target/linux/generic/config-5.15 /dev/null > target/linux/generic/config-5.15-new
$ mv target/linux/generic/config-5.15-new target/linux/generic/config-5.15

$ ./scripts/kconfig.pl '+' target/linux/generic/config-6.1 /dev/null > target/linux/generic/config-6.1-new
$ mv target/linux/generic/config-6.1-new target/linux/generic/config-6.1

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
18 months agomac80211: backport merged version of A-MSDU mesh patch
Robert Marko [Tue, 23 May 2023 11:29:49 +0000 (13:29 +0200)]
mac80211: backport merged version of A-MSDU mesh patch

Kernel 6.1 now has fortify_memcpy_chk() and it is causing the following
warning while trying to compile backports:
  CC [M]  /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/net/wireless/util.o
In file included from ./include/linux/string.h:253,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/string.h:3,
                 from ./include/linux/bitmap.h:11,
                 from ./include/linux/cpumask.h:12,
                 from ./include/linux/smp.h:13,
                 from ./arch/arm64/include/asm/arch_timer.h:18,
                 from ./arch/arm64/include/asm/timex.h:8,
                 from ./include/linux/timex.h:67,
                 from ./include/linux/time32.h:13,
                 from ./include/linux/time.h:60,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/time.h:3,
                 from ./include/linux/skbuff.h:15,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/skbuff.h:3,
                 from ./include/linux/if_ether.h:19,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/if_ether.h:3,
                 from ./include/linux/etherdevice.h:20,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/backport-include/linux/etherdevice.h:3,
                 from /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/net/wireless/util.c:12:
In function 'fortify_memcpy_chk',
    inlined from 'ieee80211_strip_8023_mesh_hdr' at /home/robimarko/Building/AX3600/ipq807x-5.15/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/backports-6.1.24/net/wireless/util.c:590:3:
./include/linux/fortify-string.h:404: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]
  404 |                         __write_overflow_field(p_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

This issue was fixed in the final version of
("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") that was
merged upstream but we have a older version that is using:
memcpy(&payload.eth.h_dest, mesh_addr, 2 * ETH_ALEN);
instead of:
memcpy(&payload.eth, mesh_addr, 2 * ETH_ALEN);

So, lets just backport the merged version of patch to fix the issue.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agomediatek: mt7623: build SD card without all filesystems
Daniel Golle [Mon, 22 May 2023 21:58:58 +0000 (22:58 +0100)]
mediatek: mt7623: build SD card without all filesystems

Allow building SD card images without having both initramfs and squashfs
present on the card, just like it has already been done for the mt7622
and filogic subtargets.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agoipq806x: enable testing kernel version with 6.1 version
Christian Marangi [Tue, 18 Oct 2022 22:05:36 +0000 (00:05 +0200)]
ipq806x: enable testing kernel version with 6.1 version

Enable testing kernel version with 6.1 kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq806x: 6.1: refresh config and add missing symbols
Christian Marangi [Tue, 18 Oct 2022 22:00:38 +0000 (00:00 +0200)]
ipq806x: 6.1: refresh config and add missing symbols

Refresh config for kernel 6.1 and add missing symbols
Then sorted using:
$ ./scripts/kconfig.pl '+' target/linux/ipq806x/config-6.1 /dev/null > target/linux/ipq806x/config-6.1-new
$ mv target/linux/ipq806x/config-6.1-new target/linux/ipq806x/config-6.1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq806x: 6.1: refresh dts
Christian Marangi [Thu, 20 Oct 2022 15:50:06 +0000 (17:50 +0200)]
ipq806x: 6.1: refresh dts

Refresh dts for kernel 6.1 support.
Changes:
- nbg6817 drop amba node and reference directly sdcc1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq806x: 6.1: refresh kernel patches
Christian Marangi [Mon, 22 May 2023 16:12:08 +0000 (18:12 +0200)]
ipq806x: 6.1: refresh kernel patches

Refresh ipq806x kernel patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq806x: 6.1: manually refresh kernel patches
Christian Marangi [Tue, 18 Oct 2022 23:09:53 +0000 (01:09 +0200)]
ipq806x: 6.1: manually refresh kernel patches

Refresh kernel patches for version 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq806x: 6.1: replace ZRELADDR HACK patch with new version
Christian Marangi [Tue, 18 Oct 2022 21:49:18 +0000 (23:49 +0200)]
ipq806x: 6.1: replace ZRELADDR HACK patch with new version

With 6.1 lots have changed and the platform for Makefile.boot got
dropped. Replace the patch with a new version that is alligned to the
new implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq806x: 6.1: drop upstream patch
Christian Marangi [Tue, 18 Oct 2022 21:48:45 +0000 (23:48 +0200)]
ipq806x: 6.1: drop upstream patch

Drop patch that got merged upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agoipq806x: 6.1: copy patches, files and config from 5.15
Christian Marangi [Tue, 18 Oct 2022 21:46:43 +0000 (23:46 +0200)]
ipq806x: 6.1: copy patches, files and config from 5.15

Copy patches, files and config from 5.15 kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: modules: fs: adapt for kernel 6.1
Robert Marko [Wed, 26 Oct 2022 11:27:51 +0000 (13:27 +0200)]
kernel: modules: fs: adapt for kernel 6.1

Adapt filesystem kmods for building under kernel 6.1:
* Depend on kernel not being 5.10 rather than only 5.15
* kmod-fs-9p depends on kmod-fs-netfs from 5.17 as they started using
netfs helpers
* Set new KConfig options to N

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agokernel: modules: wwan: adapt for kernel 6.1
Robert Marko [Fri, 21 Oct 2022 11:08:35 +0000 (13:08 +0200)]
kernel: modules: wwan: adapt for kernel 6.1

Update the WWAN kmods for compilation under kernel 6.1:
* Depend on kernel not being 5.10 rather than only 5.15
* Enable CONFIG_WWAN_DEBUGFS as its now optional from 5.17
* Add missing symbols for new WWAN drivers to generic config

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agokernel: modules: adapt for kernel 6.1
Christian Marangi [Thu, 20 Oct 2022 01:13:50 +0000 (03:13 +0200)]
kernel: modules: adapt for kernel 6.1

Adapt kernel modules to support kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: kernel: add missing symbol
Pawel Dembicki [Tue, 18 Apr 2023 08:28:33 +0000 (10:28 +0200)]
generic: kernel: add missing symbol

Add missing symbol while adding layerscape support

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[ add commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: add missing symbols
Robert Marko [Wed, 26 Oct 2022 11:26:14 +0000 (13:26 +0200)]
generic: 6.1: add missing symbols

These symbols got exposed once building for ipq807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
18 months agogeneric: 6.1: refresh config and add missing symbols
Christian Marangi [Tue, 18 Oct 2022 21:45:09 +0000 (23:45 +0200)]
generic: 6.1: refresh config and add missing symbols

Refresh generic config for 6.1 and add missing symbols.
Then sorted using:
$ ./scripts/kconfig.pl '+' target/linux/generic/config-6.1 /dev/null > target/linux/generic/config-6.1-new
$ mv target/linux/generic/config-6.1-new target/linux/generic/config-6.1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: add CONFIG_INITRAMFS_PRESERVE_MTIME config to Initramfs function
Christian Marangi [Tue, 18 Oct 2022 22:03:17 +0000 (00:03 +0200)]
kernel: add CONFIG_INITRAMFS_PRESERVE_MTIME config to Initramfs function

New kernel version 6.1 introduced new INITRAMFS option. Add them to the
Initramfs functions to correctly compile initramfs images.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: use eth_random_addr instead of random_ether_addr
Christian Marangi [Mon, 22 May 2023 13:08:40 +0000 (15:08 +0200)]
kernel: use eth_random_addr instead of random_ether_addr

random_ether_addr is just a reference to eth_random_addr, that was later
dropped in more recent kernel version.

Drop random_ether_addr and use eth_random_addr directly to fix
compilation error in 6.1

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernek: use struct_group to wipe ar8216 volatile priv data
Christian Marangi [Mon, 22 May 2023 00:34:20 +0000 (02:34 +0200)]
kernek: use struct_group to wipe ar8216 volatile priv data

Instead of reference vlan and do strange subtraction, use the handy
struct_group() to create a virtual struct of the same size of the
members. This permits to have a more secure memset and fix compilation
warning in 6.1 where additional checks are done.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: refresh swconfig_leds to handle new trigger locking
Christian Marangi [Thu, 20 Oct 2022 00:20:17 +0000 (02:20 +0200)]
kernel: refresh swconfig_leds to handle new trigger locking

Refresh swconfig_leds source to handle new trigger locking that is now a
spinlock.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: refresh IFF_NO_IP_ALIGN ifdef for kernel >= 6.1
Christian Marangi [Wed, 19 Oct 2022 21:48:42 +0000 (23:48 +0200)]
kernel: refresh IFF_NO_IP_ALIGN ifdef for kernel >= 6.1

Kernel 6.1 expanded the priv_flags to long bitmap so update and restore
it to priv_flags.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: refresh pending patches
Christian Marangi [Mon, 22 May 2023 16:07:49 +0000 (18:07 +0200)]
generic: 6.1: refresh pending patches

Refresh pending patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: refresh hack patches
Christian Marangi [Mon, 22 May 2023 16:07:13 +0000 (18:07 +0200)]
generic: 6.1: refresh hack patches

Refresh hack patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: refresh backport patches
Christian Marangi [Mon, 22 May 2023 16:06:14 +0000 (18:06 +0200)]
generic: 6.1: refresh backport patches

Refresh backport patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: add pending OPP set opp improvement patch
Christian Marangi [Tue, 18 Oct 2022 23:12:04 +0000 (01:12 +0200)]
generic: 6.1: add pending OPP set opp improvement patch

Add pending OPP set opp improvement patch to better handle _set_opp
function in clock scaling.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: add patch to compile ieee8211 headers
Christian Marangi [Thu, 20 Oct 2022 01:45:31 +0000 (03:45 +0200)]
generic: 6.1: add patch to compile ieee8211 headers

With kernel 6.1 ieee2111_ptr is not compiled by default. Add pending
patch to restore this to make backports project compatible.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: manually refresh mglru patch with new kernel version
Christian Marangi [Mon, 22 May 2023 00:36:35 +0000 (02:36 +0200)]
generic: 6.1: manually refresh mglru patch with new kernel version

Refresh mglru patch for new kernel version due to very fun backport
changing name from folio to pages.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: manually refresh hack patches
Christian Marangi [Tue, 18 Oct 2022 21:43:43 +0000 (23:43 +0200)]
generic: 6.1: manually refresh hack patches

Refresh hack patches for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: drop pending patch backported as fixes
Christian Marangi [Mon, 22 May 2023 00:41:47 +0000 (02:41 +0200)]
generic: 6.1: drop pending patch backported as fixes

Drop pending patch backported as fixes in later kernel version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: manually refresh pending patches
Christian Marangi [Tue, 18 Oct 2022 21:24:43 +0000 (23:24 +0200)]
generic: 6.1: manually refresh pending patches

Refresh pending patches for kernel 6.1.

Changes:
- Refresh mtd patches with new implementation.
- Change 191-rtc-rs5c372-let_the_alarm_to_be_used_as_wakeup_source as
  uie_unsupported got dropped and we now set the bit directly.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: manually refresh backport patches
Christian Marangi [Tue, 18 Oct 2022 22:56:57 +0000 (00:56 +0200)]
generic: 6.1: manually refresh backport patches

Refresh backport patches that still needs to be merged for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: 6.1: drop backport patches
Christian Marangi [Tue, 18 Oct 2022 20:49:57 +0000 (22:49 +0200)]
generic: 6.1: drop backport patches

Drop all backport patches that are now included in kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agogeneric: copy backport, hack, pending patch and config from 5.15 to 6.1
Christian Marangi [Tue, 18 Oct 2022 20:26:34 +0000 (22:26 +0200)]
generic: copy backport, hack, pending patch and config from 5.15 to 6.1

Copy backport, hack, pending patch and config from 5.15 to 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agokernel: add define for kernel 6.1
Christian Marangi [Tue, 18 Oct 2022 20:24:40 +0000 (22:24 +0200)]
kernel: add define for kernel 6.1

Add define for kernel 6.1.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
18 months agobusybox: update to 1.36.1
Nick Hainke [Sun, 21 May 2023 21:54:31 +0000 (23:54 +0200)]
busybox: update to 1.36.1

Release Notes:
http://lists.busybox.net/pipermail/busybox-cvs/2023-May/041510.html

Refresh commands, run after busybox is first built once (nothing changed
compared to 1.36.0):

  cd package/utils/busybox/config/
  ../convert_menuconfig.pl ../../../../build_dir/target-mipsel_24kc_musl/busybox-default/busybox-1.36.1
  cd ..
  ./convert_defaults.pl ../../../build_dir/target-mipsel_24kc_musl/busybox-default/busybox-1.36.1/.config > Config-defaults.in

Manual edits needed afterward:

* Config-defaults.in: OpenWrt config symbol IPV6 logic applied to
  BUSYBOX_DEFAULT_FEATURE_IPV6

* Config-defaults.in: OpenWrt config TARGET_bcm53xx logic applied to
  BUSYBOX_DEFAULT_TRUNCATE (commit 547f1ec)

* Config-defaults.in: OpenWrt logic applied to
  BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD (commit dc92917)

* Config-defaults.in: correct the default ports that get reset
  BUSYBOX_DEFAULT_FEATURE_HTTPD_PORT_DEFAULT    80
  BUSYBOX_DEFAULT_FEATURE_TELNETD_PORT_DEFAULT  23

* config/editors/Config.in: Add USE_GLIBC dependency to
  BUSYBOX_CONFIG_FEATURE_VI_REGEX_SEARCH (commit f141090)

* config/shell/Config.in: change at "Options common to all shells" the conditional symbol
  SHELL_ASH --> BUSYBOX_CONFIG_SHELL_ASH
  (discussion in http://lists.openwrt.org/pipermail/openwrt-devel/2021-January/033140.html
  Apparently our script does not see the hidden option while
  prepending config options with "BUSYBOX_CONFIG_" which leads to a
  missed dependency when the options are later evaluated.)

* Edit a few Config.in files by adding quotes to sourced items in
  config/Config.in, config/networking/Config.in and config/util-linux/Config.in (commit 1da014f)

Tested-by: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agolibxml2: update to 2.11.4
Nick Hainke [Sun, 21 May 2023 21:21:14 +0000 (23:21 +0200)]
libxml2: update to 2.11.4

Release Notes:
https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.11.4

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agolibcap: update to 2.69
Nick Hainke [Sun, 21 May 2023 21:25:52 +0000 (23:25 +0200)]
libcap: update to 2.69

Release Notes:
https://sites.google.com/site/fullycapable/release-notes-for-libcap#h.iuvg7sbjg8pe

Fixes: CVE-2023-2602 CVE-2023-2603
Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agolldpd: update to 1.0.17
Nick Hainke [Sun, 21 May 2023 21:36:01 +0000 (23:36 +0200)]
lldpd: update to 1.0.17

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

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agomediatek: add support for Zyxel EX5601-T0 router
Pietro Ameruoso [Mon, 22 May 2023 07:52:47 +0000 (09:52 +0200)]
mediatek: add support for Zyxel EX5601-T0 router

Zyxel EX5601-T0 specifics
--------------
The operator specific firmware running on the Zyxel branded
EX5601-T0 includes  U-Boot modifications affecting the OpenWrt
installation.

Partition Table
| dev  | size     | erasesize | name          |
| ---- | -------- | --------- | ------------- |
| mtd0 | 20000000 | 00040000  | "spi0.1"      |
| mtd1 | 00100000 | 00040000  | "BL2"         |
| mtd2 | 00080000 | 00040000  | "u-boot-env"  |
| mtd3 | 00200000 | 00040000  | "Factory"     |
| mtd4 | 001c0000 | 00040000  | "FIP"         |
| mtd5 | 00040000 | 00040000  | "zloader"     |
| mtd6 | 04000000 | 00040000  | "ubi"         |
| mtd7 | 04000000 | 00040000  | "ubi2"        |
| mtd8 | 15a80000 | 00040000  | "zyubi"       |

The router boots BL2 which than loads FIP (u-boot).
U-boot has hardcoded a command to always launch Zloader "mtd read zloader 0x46000000" and than "bootm". Bootargs are deactivated.
Zloader is the zyxel booloader which allow to dual-boot ubi or ubi2, by default access to zloader is blocked.
Too zloader checks that the firmware contains a particolar file called zyfwinfo.
Additional details regarding Zloader can be found here:
https://hack-gpon.github.io/zyxel/
https://forum.openwrt.org/t/adding-openwrt-support-for-zyxel-ex5601-t0/155914

Hardware
--------
SOC: MediaTek MT7986a
CPU: 4 core cortex-a53 (2000MHz)
RAM: 1GB DDR4
FLASH: 512MB SPI-NAND (Micron xxx)
WIFI: Wifi6 Mediatek MT7976 802.11ax 5 GHz 4x4 + 2.4GHZ 4x4
ETH: MediaTek MT7531 Switch + SoC
3 x builtin 1G phy (lan1, lan2, lan3)
1 x MaxLinear GPY211B 2.5 N-Base-T phy5 (lan4)
1 x MaxLinear GPY211B 2.5Gbit xor SFP/N-Base-T phy6 (wan)
USB: 1 x USB 3.2 Enhanced SuperSpeed port
UART: 3V3 115200 8N1 (Pinout: GND KEY RX TX VCC)
VOIP: 2 FXS ports for analog phones

MAC Address Table
-----------------
eth0/lan    Factory 0x002a
eth1/wan    Factory 0x0024
wifi 2.4Ghz Factory 0x0004
wifi 5Ghz   Factory 0x0004 + 1

Serial console (UART)
---------------------
+-------+-------+-------+-------+-------+
| +3.3V |  RX   |  TX   |  KEY  |  GND  |
+---+---+-------+-------+-------+-------+
    |
    +--- Don't connect

Installation
------------
Keep in mind that openwrt can only run on the UBI partition, the openwrt firmware is not able to understand the zloader bootargs.
The procedure allows restoring the UBI partition with the Zyxel firmware and retains all the OEM functionalities.

1. Unlock Zloader (this will allow to swap manually between partitions UBI and UBI2):
- Attach a usb-ttl adapter to your computer and boot the router.
- While the router is booting at some point you will read the following: `Please press Enter to activate this console.`
- As soon as you read that press enter, type root and than press enter again (just do it, don't care about the logs scrolling).
- Most likely the router is still printing the boot log, leave it boot until it stops.
- If everything went ok you should have full root access "root@EX5601-T0:/#".
- Type the following command and press enter: "fw_setenv EngDebugFlag 0x1".
- Reboot the router.
- As soon as you read `Hit any key to stop autoboot:` press Enter.
- If everything went ok you should have the following prompt: "ZHAL>".
- You have successfully unlocked zloader access, this procedure must be done only once.

2. Check the current active partition:
- Boot the router and repeat the steps above to gain root access.
- Type the following command to check the current active image: "cat /proc/cmdline".
- If `rootubi=ubi` it means that the active partition is `mtd6`
- If `rootubi=ubi2` it means that the active partition is `mtd7`
- As mentioned earlier we need to flash openwrt into ubi/mtd6 and never overwrite ubi2/mtd7 to be able to fully roll-back.
- To activate and boot from mtd7 (ubi2) enter into ZHAL> command prompt and type the following commands:
atbt 1  # unlock write
atsw    # swap boot partition
atsr    # reboot the router
- After rebooting check again with "cat /proc/cmdline" that you are correctly booting from mtd7/ubi2
- If yes proceed with the installation guide. If not probably you don't have a firmware into ubi2 or you did something wrong.

3. Flashing:
- Download the sysupgrade file for the router from openwrt, than we need to add the zyfwinfo file into the sysupgrade tar.
Zloader only checks for the magic (which is a fixed value 'EXYZ') and the crc of the file itself (256bytes).
I created a script to create a valid zyfwinfo file but you can use anything that does exactly the same:
https://raw.githubusercontent.com/pameruoso/OpenWRT-Zyxel-EX5601-T0/main/gen_zyfwinfo.sh
- Add the zyfwinfo file into the sysupgrade tar.
- Enter via telnet or ssh into the router with admin credentials
- Enter the following commands to disable the firmware and model checks
"zycli fwidcheck off" and "zycli modelcheck off"
- Open the router web interface and in the update firmware page select the "restore default settings option"
- Select the sysupgrade file and click on upload.
- The router will flash and reboot itself into openwrt from UBI

4. Restoring and going back to Zyxel firmware.
- Use the ZHAL> command line to manually swap the boot parition to UBI2 with the following:
atbt 1  # unlock write
atsw    # swap boot partition
atsr    # reboot the router
- You will boot again the Zyxel firmware you have into UBI2 and you can flash the zyxel firmware to overwrite the UBI partition and openwrt.

Working features
----------------
3 gbit lan ports
Wifi
Zyxel partitioning for coexistance with Zloader and dual boot.
WAN SFP port (only after exporting pins 57 and 10. gpiobase411)
leds
reset button
serial interface
usb port
lan ethernet 2.5 gbit port (autosense)
wan ethernet 2.5 gbit port (autosense)

Not working
----------------
voip (missing drivers or proper zyxel platform software)

Swapping the wan ethernet/sfp xor port
----------------
The way to swap the wan port between sfp and ethernet is the following:
export the pins 57 and 10.
Pin 57 is used to probe if an sfp is present.
If pin 57 value is 0 it means that an sfp is present into the cage (cat /sys/class/gpio/gpio468/value).
If pin 57 value is 1 it means that no sfp is inserted into the cage.
In conclusion by default both 57 an 10 pins are by default 1, which means that the active port is the ethernet one.
After inserting an SFP pin 57 will become 0 and you have to manually change the value of pin 10 to 0 too.
This is totally scriptable of course.

Leds description
------------
All the leds are working out of the box but the leds managed by the 2 maxlinear phy (phy 5 lan, phy6 wan).
To activate the phy5 led (rj45 ethernet port led on the back of the router) you have to use mdio-tools.
To activate the phy6 led (led on the front of the router for 2.5gbit link) you have to use mdio-tools.
Example:
Set lan5 led to fast blink on 2500/1000, slow blink on 10/100:
mdio mdio-bus mmd 5:30 raw 0x0001 0x33FC

Set wan 2.5gbit led to constant on when wan is 2.5gbit:
mdio mdio-bus mmd 6:30 raw 0x0001 0x0080

Signed-off-by: Pietro Ameruoso <p.ameruoso@live.it>
18 months agoCI: rework build workflow to have split target and subtarget directly
Christian Marangi [Mon, 22 May 2023 14:47:08 +0000 (16:47 +0200)]
CI: rework build workflow to have split target and subtarget directly

Instead of referring to a redundant job and ENV variables, rework build
workflow to accept and require split target and subtarget and use them
directly from inputs.

Rework each user and pass a JSON of tuple to matrix include with each
target/subtarget combination to test. Special notice this doesn't use
the github actions matrix combination feature but reference each
specific tuple of target and subtarget to test.

Just a cleanup no behaviour change intended.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>