openwrt/staging/wigyori.git
5 months agomdadm: update to 4.3
Rosen Penev [Sat, 18 May 2024 00:28:29 +0000 (17:28 -0700)]
mdadm: update to 4.3

Backport three patches, add one for GCC14, and add Alpine time_t patch for
musl.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 months agoRevert "hostapd: add support for authenticating with multiple PSKs via ubus helper"
Felix Fietkau [Thu, 6 Jun 2024 19:33:53 +0000 (21:33 +0200)]
Revert "hostapd: add support for authenticating with multiple PSKs via ubus helper"

This reverts commit c67d5189a405b2dca015f47f31c55ba38a0d61eb.
Revert until reported issues have been resolved

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agogeneric: 6.6: refresh patches
Daniel Golle [Thu, 6 Jun 2024 19:08:13 +0000 (20:08 +0100)]
generic: 6.6: refresh patches

Patch 733-01-net-ethernet-mtk_eth_soc-use-napi_build_skb.patch needs
a refresh as line numbers no longer match.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agomediatek: filogic: move nand-only devices out of bootdev detection
Tianling Shen [Sun, 14 Apr 2024 02:42:21 +0000 (10:42 +0800)]
mediatek: filogic: move nand-only devices out of bootdev detection

For the first-time installation (mostly migrates from vendor firmware)
the ubiblock is not ready, but bootdev detection relies on it. This
means users must create ubiblock manually otherwise the sysupgrade
will not work.

Now a unique case is added for nand devices which use new fit format,
let's move to it.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
5 months agomediatek: add Nokia EA0326GMP support
Tianling Shen [Sun, 24 Mar 2024 13:26:07 +0000 (21:26 +0800)]
mediatek: add Nokia EA0326GMP support

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

Gain SSH access:
1. Login into web interface, and download the configuration.
2. Download the configration utilities:
   https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
     These binaries are extraced from the factory firmware, which are
     dynamically linked with aarch64 musl 1.1.24. To use them, you
     must run them under the same runtime environment, otherwise the
     binaries will not work properly!
3. Upload the configuration and utilities to a suitable environment.
4. Uncompress the utilities, move them to '/bin' and give them executable permisison:
   tar -zxf openwrt-mediatek-mt7981-nokia-ea0326gmp-config-utils.tar.gz
   mv mkconfig seama /bin
   chmod +x /bin/mkconfig
   chmod +x /bin/seama
5. Decrypt and uncompress the configuration:
     Enter fakeroot if you are not login as root.
   mkconfig -a de-enca -m EA0326GMP_3FE79221BAAA -i EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz -o backup.tar.gz
   tar -zxf backup.tar.gz
6. Edit 'etc/config/dropbear', set 'enable' to '1'.
7. Edit 'etc/passwd', remove root password: 'root::1:0:99999:7:::'.
8. Repack the configuration:
   tar -zcf backup.tar.gz etc/
   mkconfig -a enca -m EA0326GMP_3FE79221BAAA -i backup.tar.gz -o EA0326GMP_3FE79221BAAA-xxxxxxxx-backup.tar.gz
9. Upload new configuration via web interface, now you can SSH to EA0326GMP.

A minimum configuration which enabled SSH access is also provided
to simplify the process:
https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7981-nokia-ea0326gmp-enable-ssh.tar.gz

Flash instructions:
1. SSH to EA0326GMP, backup everything, especially 'Factory' part.
2. Write new BL2:
   mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-preloader.bin BL2
3. Write new FIP:
   mtd write openwrt-mediatek-filogic-nokia_ea0326gmp-bl31-uboot.fip FIP
4. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
5 months agohostapd: add support for authenticating with multiple PSKs via ubus helper
Felix Fietkau [Thu, 23 May 2024 18:16:40 +0000 (20:16 +0200)]
hostapd: add support for authenticating with multiple PSKs via ubus helper

Also supports assigning a VLAN ID based on the PSK

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agokernel: use napi_build_skb in mtk_eth_soc
Felix Fietkau [Mon, 20 May 2024 12:36:55 +0000 (14:36 +0200)]
kernel: use napi_build_skb in mtk_eth_soc

Improves performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
5 months agogeneric: routerbootpart: fix compilation on 64-bit
Robert Marko [Thu, 6 Jun 2024 08:14:39 +0000 (10:14 +0200)]
generic: routerbootpart: fix compilation on 64-bit

Trying to compile routerbootpart parsers on 64-bit platforms will fail:
drivers/mtd/parsers/routerbootpart.c: In function 'routerboot_find_dynparts':
./include/linux/kern_levels.h:5:25: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
    5 | #define KERN_SOH        "\001"          /* ASCII Start Of Header */
      |                         ^~~~~~
./include/linux/printk.h:427:25: note: in definition of macro 'printk_index_wrap'
  427 |                 _p_func(_fmt, ##__VA_ARGS__);                           \
      |                         ^~~~
./include/linux/printk.h:498:9: note: in expansion of macro 'printk'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~
./include/linux/kern_levels.h:11:25: note: in expansion of macro 'KERN_SOH'
   11 | #define KERN_ERR        KERN_SOH "3"    /* error conditions */
      |                         ^~~~~~~~
./include/linux/printk.h:498:16: note: in expansion of macro 'KERN_ERR'
  498 |         printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
      |                ^~~~~~~~
drivers/mtd/parsers/routerbootpart.c:170:25: note: in expansion of macro 'pr_err'
  170 |                         pr_err("%s: mtd_read error while parsing (offset: 0x%X): %d\n",

So, lets simply add the length modifier 'z' to fix compilation.

Link: https://github.com/openwrt/openwrt/pull/15640
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agomediatek: improve reliability of Fidelix/Dosilicon SPI-NAND
Daniel Golle [Mon, 8 Apr 2024 16:46:33 +0000 (17:46 +0100)]
mediatek: improve reliability of Fidelix/Dosilicon SPI-NAND

Prior to performing a PROGRAM LOAD RANDOM DATA operation, a WRITE
ENABLE (06h) command must be issued to change the contents of the
memory array. Following a WRITE ENABLE (06) command, **first a PROGRAM
LOAD (02h or 32h) command must be issued to reset the cache**, then
issue a PROGRAM LOAD RANDOM DATA (84h or 34h) command

This is dirty fix provided to use by MediaTek engineer Sky Huang which
may resolve the "OpenWrt Kiss of Death" issue we've been seeing on the
Linksys E8450 aka. Belkin RT3200. However, it means that everything has
to be re-written with that patch already applied, ie. we need to rebuild
the installer once it is part of snapshot builds to have any effect.

Users already on FIP-in-UBI layout are advised to re-write 'fip' UBI
volume and 'bl2' MTD partition manually once from within Linux after
this fix has been applied.

A similar fix will also be required for U-Boot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agouboot-mediatek: snfi: FM35Q1GA is x4-only
Daniel Golle [Mon, 8 Apr 2024 18:35:27 +0000 (19:35 +0100)]
uboot-mediatek: snfi: FM35Q1GA is x4-only

Dont allow x2 read and cache read operations on FM35Q1GA as they seem
to be unstable. Also the Linux drivers does not allow x2 ops.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoarm-trusted-firmware-mediatek: import patchset for Fidelix flash on SNFI
Daniel Golle [Mon, 8 Apr 2024 20:43:38 +0000 (21:43 +0100)]
arm-trusted-firmware-mediatek: import patchset for Fidelix flash on SNFI

Import pending patches to set pinconf settings for SPI-NAND pins on
MT7622 identical to what the old proprietary preloader did.

Should further increase the reliability of some SNFI-attached SPI-NAND
flash chips.

Link: https://github.com/mtk-openwrt/arm-trusted-firmware/pull/7
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoarm-trusted-firmware-mediatek: update to MediaTek-patched v2.10.0
Daniel Golle [Mon, 8 Apr 2024 20:40:34 +0000 (21:40 +0100)]
arm-trusted-firmware-mediatek: update to MediaTek-patched v2.10.0

Update ARM TrustedFirmware-A to the most recent release of
MediaTek downstream patched version released 2024-01-17.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoramips: add support for Buffalo WSR-2533DHPL2
INAGAKI Hiroshi [Sat, 30 Mar 2024 06:33:58 +0000 (15:33 +0900)]
ramips: add support for Buffalo WSR-2533DHPL2

Buffalo WSR-2533DHPL2 is a 2.4/5 GHz band 11ac (Wi-Fi 5) router, based
on MediaTek MT7621A.

Specification:

- SoC           : MediaTek MT7621AT
- RAM           : DDR3 128 MiB (Winbond W631GG6MB12J)
- Flash         : RAW-NAND 128 MiB (Winbond W29N01HVSINF)
- WLAN          : 2.4/5 GHz (2x MediaTek MT7615N)
- Ethernet      : 10/100/1000 Mbps x4
  - Switch      : MediaTek MT7530 (SoC)
- LED/keys      : 8x/6x (2x buttons, 1x slide-switch)
- UART          : through-hole on PCB (J4)
  - arrangement : 3.3V, GND, TX, RX from triangle-mark
  - settings    : 57600n8
- Power         : 12VDC 1.5A

Flash instruction using factory.bin image:

1. boot WSR-2533DHPL2 normally with "Router" mode
2. access to the WebI ("http://192.168.11.1/") on the device and open
   firmware update page
   ("管理" -> "ファームウェア更新")
3. select the OpenWrt factory.bin image and click update ("更新実行")
   button
   Attention: do not use "factory-uboot.bin" image
4. Wait ~120 seconds to complete flashing

Flash instruction using initramfs image:

1. prepare the TFTP server with the initramfs image renamed to
   "linux.trx-recovery" and IP address "192.168.11.2"
2. press the "AOSS" button while powering on the WSR-2533DHPL2
3. after 10 seconds, release the "AOSS" button, WSR-2533DHPL2 downloads
   the initramfs image and boot with it automatically
4. on the initramfs image, download the factory-uboot.bin image to the
   device and perform sysupgrade with it and "-F" option
5. wait ~120 seconds to complete flashing

Notes:

- There are 2x factory*.bin images for different purposes.

  - factory.bin      : for flashing on OEM WebUI
  - factory-uboot.bin: for flashing on OEM bootloader or initramfs image

  factory-uboot.bin is useful for recoverying the device, or refreshing
  when the kernel partition is expanded in the future. sysupgrade on
  this device accepts factory-uboot.bin with option "-F", but on that
  situation, user configurations won't be kept, so it's not for normal
  use.

MAC addresses:

LAN    : 18:EC:E7:xx:xx:E0 (board_data, "mac" (text))
WAN    : 18:EC:E7:xx:xx:E0 (board_data, "mac" (text))
2.4 GHz: 18:EC:E7:xx:xx:E1 (Factory, 0x4    (hex))
5 GHz  : 18:EC:E7:xx:xx:E4 (Factory, 0x8004 (hex))

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agoramips: add support for Buffalo WSR-2533DHPLS
INAGAKI Hiroshi [Sat, 30 Mar 2024 06:33:58 +0000 (15:33 +0900)]
ramips: add support for Buffalo WSR-2533DHPLS

Buffalo WSR-2533DHPLS is a 2.4/5 GHz band 11ac router, based on MediaTek
MT7621A.

Very similar to Buffalo WSR-2533DHPL, but with NAND, different GPIO
and TRX partitions.

Specification:

- SoC           : MediaTek MT7621AT
- RAM           : DDR3 256 MiB (Samsung K4B2G1646F-BYMA)
- Flash         : RAW-NAND 128 MiB
                  (Winbond W29N01HV or KIOXIA TC58BVG0S3HTAI0)
- WLAN          : 2.4/5 GHz (2x MediaTek MT7615N)
- Ethernet      : 10/100/1000 Mbps
  - Switch      : MediaTek MT7530 (SoC) 4 ports
- LED/keys      : 8x/6x (2x buttons, 1x slide-switch)
- UART          : through-hole on PCB (J4)
  - arrangement : 3.3V, GND, TX, RX from triangle-mark
  - settings    : 115200n8
- Power         : 12VDC 1.5A

Flash instruction using factory.bin image:

1. boot WSR-2533DHPLS normally with "Router" mode
2. access to the WebI ("http://192.168.11.1/") on the device and open
   firmware update page
   ("管理" -> "ファームウェア更新")
3. select the OpenWrt factory.bin image and click update ("更新実行")
   button
   Attention: do not use "factory-uboot.bin" image
4. Wait ~120 seconds to complete flashing

Flash instruction using initramfs image:

1. prepare the TFTP server with the initramfs image renamed to
   "linux.trx-recovery" and IP address "192.168.11.2"
2. press the "AOSS" button while powering on the WSR-2533DHPLS
3. after 10 seconds, release the "AOSS" button, WSR-2533DHPLS downloads
   the initramfs image and boot with it automatically
4. on the initramfs image, download the factory-uboot.bin image to the
   device and perform sysupgrade with it and "-F" option
5. wait ~120 seconds to complete flashing

Notes:

- The embedded addresses in eeprom data in Factory partition have
  Buffalo's OUI, but they don't match with the actual addresses
  assigned to wlan devices. So fixup addresses by the user-space
  script.

  root@localhost:/# hexdump -C /dev/mtdblock3 | grep "^0000[08]000\s"
  00000000  15 76 a0 00 88 57 ee bc  01 a8 15 76 c3 14 00 80  |.v...W.....v....|
  00008000  15 76 a0 00 88 57 ee bc  01 f8 15 76 c3 14 00 80  |.v...W.....v....|

  See "MAC addresses" below for actual addresses.

- There are 2x factory*.bin images for different purposes.

  - factory.bin      : for flashing on OEM WebUI
  - factory-uboot.bin: for flashing on OEM bootloader or initramfs image

  factory-uboot.bin is useful for recoverying the device, or refreshing
  when the kernel partition is expanded in the future. sysupgrade on
  this device accepts factory-uboot.bin with option "-F", but on that
  situation, user configurations won't be kept, so it's not for normal
  use.

MAC addresses:

LAN    : 90:96:F3:xx:xx:30 (board_data, "mac" (text))
WAN    : 90:96:F3:xx:xx:30 (board_data, "mac" (text))
2.4 GHz: 90:96:F3:xx:xx:31
5 GHz  : 90:96:F3:xx:xx:38

[original work]
Signed-off-by: Audun-Marius Gangstø <audun@gangsto.org>
[convert to ubi, fix/improve DT, add sysupgrade support]
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agoramips: mt7621: switch trx parser to parser_trx from mtdsplit
INAGAKI Hiroshi [Wed, 27 Mar 2024 09:54:47 +0000 (18:54 +0900)]
ramips: mt7621: switch trx parser to parser_trx from mtdsplit

Switch trx parser to parser_trx of Linux Kernel from mtdsplit_trx to
split firmware partition using model-specific trx magic number on
some Buffalo devices.
This change is tested on Buffalo WSR-2533DHPL.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agobuild: move Build/buffalo-trx to image-commands.mk
INAGAKI Hiroshi [Wed, 27 Mar 2024 11:38:04 +0000 (20:38 +0900)]
build: move Build/buffalo-trx to image-commands.mk

Move Build/buffalo-trx to image-commands.mk from image/mt7622.mk to use
that definition from ramips as well.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agomtd: enable trx feature on ramips
INAGAKI Hiroshi [Wed, 27 Mar 2024 11:21:58 +0000 (20:21 +0900)]
mtd: enable trx feature on ramips

Enable trx feature of mtd command to fixup trx length and crc32 while
booting for some Buffalo devices.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
5 months agomediatek: add support for Ruijie RG-X60 Pro
Ashley Lee [Sat, 30 Dec 2023 14:54:54 +0000 (22:54 +0800)]
mediatek: add support for Ruijie RG-X60 Pro

This pull request ports Ruijie RG-X60 Pro router support to the main branch.

Parameters:
- SoC       : MediaTek MT7986A Quad-core ARM Cortex-A53 2.0GHz
- RAM       : DDR3 512MiB (W634GU6QB)
- Flash     : SPI-NAND 128 MiB (W25N01GVZEIG)
- WLAN      : MediaTek MT7986A integration dual-band WiFi 6
  - 2.4 GHz : b/g/n/ax, MIMO 4x4
  - 5 GHz   : a/n/ac/ax, MIMO 4x4
- Ethernet  : 10/100/1000 Mbps x4 (MediaTek MT7531AE)
                    2500Mbps x 1 (Realtek RTL8221B-VB-CG)
- UART      : through-hole on PCB
  - [J500] GND, TX, RX, 3.3V (115200n1)
- Buttons   : Mesh, Reset
- LEDs      : 1x Power (Blue)
                  1x Turbo (Purple)
- Power     : 12 VDC, 3 A

How to Installation:
1. Remove the case and connect the TTL cable to the corresponding position.
2. Power on the device and quickly press "down" on the keyboard, then
   U-Boot will stay in the menu.
3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)".
4. Input the IP address, input the Openwrt image file name to be
   flashed, start the TFTP server, and press "Enter".
5. Wait for the flashing to complete.

How return to stock:

1. Remove the case and connect the TTL cable to the corresponding
   position.
2. Power on the device and quickly press "down" on the keyboard, then
   U-Boot will stay in the menu.
3. Select "1. Upgrade Firmware", select "0. TFTP Client(Default)".
4. Input the IP address, input the Stock “E-WEBOS” image file name to
   be flashed, start the TFTP server, and press "Enter".
5. Wait for the flashing to complete.

About recovery:
Connect uart, use u-boot menu to flash stock firmware image or boot
OpenWrt initramfs image.

About MAC Address:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 10:82:3D:XX:XX:9E | label     |
| LAN     | 10:82:3D:XX:XX:9F | label+1   |
| WLAN 2g | 10:82:3D:XX:XX:A0 | label+2   |
| WLAN 5g | 10:82:3D:XX:XX:A1 | label+3   |
+---------+-------------------+-----------+

Signed-off-by: Ashley Lee <code@emtips.net>
5 months agoyafut: sync version between tools/ and package/ directories
Michał Kępień [Mon, 13 May 2024 17:26:15 +0000 (19:26 +0200)]
yafut: sync version between tools/ and package/ directories

Use the same Yafut code revision for both updating devices with NAND
flash and preparing firmware images for devices with NOR flash.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: remove kernel2minor
Michał Kępień [Mon, 13 May 2024 17:26:15 +0000 (19:26 +0200)]
tools: remove kernel2minor

Since the Yafut tool is now used for both updating the kernel on
MikroTik devices with NAND flash and preparing firmware images for
MikroTik devices with NOR flash, remove the kernel2minor utility from
the tree as it is no longer used for anything.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agomikrotik: switch to Yafut for building MikroTik NOR images
Michał Kępień [Mon, 13 May 2024 17:26:15 +0000 (19:26 +0200)]
mikrotik: switch to Yafut for building MikroTik NOR images

The Yafut tool now has limited capabilities for working on filesystem
images stored in regular files.  This enables preparing Yaffs2 images
for devices with NOR flash using upstream Yaffs2 filesystem code instead
of the custom kernel2minor tool.

Since minimizing the size of the resulting filesystem image size is
important and upstream Yaffs2 code requires two allocator reserve blocks
to be available when writing a file to the filesystem, a trick is
employed while preparing an OpenWRT image: the blank filesystem image
that Yafut operates on initially contains two extra erase blocks that
are chopped off after the kernel file is written.  This is safe to do
because Yaffs2 has a true log structure and therefore only ever writes
sequentially (and the size of the kernel file is known beforehand).
While the two extra erase blocks are necessary for writes, Yaffs2 code
seems to be perfectly capable of reading back files from a "truncated"
filesystem that does not contain these extra erase blocks.

In terms of image size, this new approach is only marginally worse than
the current kernel2minor-based one: specifically, upstream Yaffs2 code
needs to write three object headers (each of which takes up an entire
data chunk) when the kernel file is written to the filesystem:

  - an object header for the kernel file when it is created,

  - an object header for the root directory when the kernel file is
    created,

  - an updated object header for the kernel file when the latter is
    fully written (so that its new size can be recorded).

kernel2minor only writes two of these headers, which is the absolute
minimum required for reading the file back.  This means that the
Yafut-based approach causes firmware images to be at most one erase
block (64 kB) larger than those created using kernel2minor, but only in
the very unfortunate scenario where the size of the kernel file is
really close to a multiple of the erase block size.

The rest of the calculations performed when the empty filesystem image
is first prepared stems from the Yaffs2 layout used by MikroTik NOR
devices: each 65,536-byte erase block contains 63 chunks, each of which
consists of 1024 bytes of data followed by 16-byte Yaffs tags without
ECC data; each such group of 63 chunks is then followed by 16 bytes of
padding, which translates to "-C 1040 -B 64k -E" in the Yafut
invocation.  Yaffs2 checkpoints and summaries are disabled (using
Yafut's -P and -S switches, respectively) as they are merely performance
optimizations that require extra storage space.  The -L and -M switches
are used to force little-endian or big-endian byte order (respectively)
in the resulting filesystem image, no matter what byte order the build
host uses.  The tr invocation is used to ensure that the filesystem
image is initialized with 0xFF bytes (which are an indicator of unused
space for Yaffs2 code).

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools: add Yafut to enable creating Yaffs filesystem images
Michał Kępień [Mon, 13 May 2024 17:26:15 +0000 (19:26 +0200)]
tools: add Yafut to enable creating Yaffs filesystem images

The Yafut tool has so far been used to update the kernel on devices with
NAND flash via MTD character devices.  Recent upstream updates extended
the tool with limited support for working with filesystem images stored
in regular files.  This enables Yafut to be used for preparing a Yaffs
filesystem image for a device with NOR flash on a build host and
subsequently flashing it to the target device without using Yafut
itself.

Add Yafut to tools/ so that it can be compiled and run on the host
building OpenWRT.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/13453
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoipq40xx: use NVMEM-on-UBI for ASUS RT-AC58U
Daniel Golle [Sun, 25 Feb 2024 21:59:39 +0000 (21:59 +0000)]
ipq40xx: use NVMEM-on-UBI for ASUS RT-AC58U

Instead of extracting WiFi precal as well as MAC addresses in userspace
use recently introduced NVMEM-on-UBI instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Christian Lamparter <chunkeey@gmail.com>
5 months agoramips: mt76x8: add support for Cudy TR1200 v1
Luis Mita [Thu, 30 May 2024 18:50:23 +0000 (14:50 -0400)]
ramips: mt76x8: add support for Cudy TR1200 v1

Hardware:
 - SoC: MediaTek MT7628AN (MIPS 580MHz)
 - Flash: 16 MiB XMC 25QH128CH10
 - RAM: 128 MiB ESMT M14D1G1664A
 - WLAN: 2.4 GHz (MT7628), 5 GHz (MT7613BEN 802.11ac)
 - Ethernet: 1x 10/100 Mbps WAN, 1x 10/100 LAN (MT7628)
 - USB 2.0 port
 - Buttons: 1 Reset button, 1 slider button
 - LEDs: 1x Red, 1x White
 - Serial console: unpopulated header, 115200 8n1
 - Power: 5 VDC, 2 A

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 80:af:ca:xx:xx:x0 | label     |
| LAN     | 80:af:ca:xx:xx:x0 | label     |
| WLAN 2g | 80:af:ca:xx:xx:x0 | label     |
| WLAN 5g | 80:af:ca:xx:xx:x2 | label+2   |
+---------+-------------------+-----------+

Installation:
The installation must be done via TFTP by disassembling the router.
On other occasions Cudy has distributed intermediate firmware to make
installation easier, and so I recommend checking the Wiki for this
device if there is a more convenient solution than the one below.

To install using TFTP:
1. Upgrade to a beta firmware (signed by Cudy) that can be downloaded
from the wiki. This is required in order to use an unlocked u-boot.
2. Connect to UART.
3. While the router is turning on, press 1.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP
server and an OpenWrt initramfs-kernel.bin firmware file as recovery.bin.
5. Press Enter three times. Verify the filename.
6. If you can reach LuCI or SSH now, just use the sysupgrade image with
the 'Keep settings' option turned off.

If you don't want to use the beta firmware nor the unlocked u-boot, you
can install the firmware writing the sysupgrade image on the firmware
partition of the SPI flash.

Signed-off-by: Luis Mita <luis@luismita.com>
5 months agoairoha: drop kernel 6.1 support
Robert Marko [Tue, 4 Jun 2024 20:45:33 +0000 (22:45 +0200)]
airoha: drop kernel 6.1 support

Now that 6.6 is the default, lets remove 6.1.

Link: https://github.com/openwrt/openwrt/pull/15630
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoairoha: default to kernel 6.6
Robert Marko [Tue, 4 Jun 2024 20:44:53 +0000 (22:44 +0200)]
airoha: default to kernel 6.6

Move airoha do kernel 6.6 as the default.

Link: https://github.com/openwrt/openwrt/pull/15630
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoramips: simplify multi-phy support patches
Shiji Yang [Thu, 30 May 2024 08:23:47 +0000 (08:23 +0000)]
ramips: simplify multi-phy support patches

For MT7620, we should always prevent main ethernet interface from
going down due to phy link changes. And the ralink net driver does
not support cable test function, so this patch won't change any
behavior.

Ref:
6fcba5eec3bb ("ramips: port 0034-NET-multi-phy-support.patch to 5.4")

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/15591
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
5 months agokernel: modules: Break out a submenu for RTCs
Linus Walleij [Wed, 22 May 2024 08:09:37 +0000 (10:09 +0200)]
kernel: modules: Break out a submenu for RTCs

There are too many RTC drivers in other.mk, they deserve their
own menu and .mk-file, so let's break them out to a separate
entity.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
5 months agobcm47xx: 6.6: refresh patches
Mieczyslaw Nalewaj [Mon, 6 May 2024 07:23:04 +0000 (09:23 +0200)]
bcm47xx: 6.6: refresh patches

CI tells us that we need to, so lets refresh them.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm47xx: 6.6: set testing kernel
Mieczyslaw Nalewaj [Fri, 29 Mar 2024 10:50:33 +0000 (11:50 +0100)]
bcm47xx: 6.6: set testing kernel

Select 6.6 as testing kernel on bcm47xx.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm47xx: remove 5.15 support
Mieczyslaw Nalewaj [Sun, 19 May 2024 08:43:35 +0000 (10:43 +0200)]
bcm47xx: remove 5.15 support

Since 6.1 is now default, drop 5.15 support.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm47xx: default to kernel 6.1
Mieczyslaw Nalewaj [Fri, 29 Mar 2024 10:47:13 +0000 (11:47 +0100)]
bcm47xx: default to kernel 6.1

Default to kernel 6.1 on bcm47xx.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm47xx: 6.6: refresh patches
Mieczyslaw Nalewaj [Fri, 29 Mar 2024 10:40:13 +0000 (11:40 +0100)]
bcm47xx: 6.6: refresh patches

Refresh kernel patches. Remove patches already included in the kernel.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agobcm47xx: 6.6: refresh kernel config
Mieczyslaw Nalewaj [Sun, 24 Mar 2024 18:08:12 +0000 (19:08 +0100)]
bcm47xx: 6.6: refresh kernel config

Refresh kernel config.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel/bcm47xx: Restore kernel files for v6.1
Mieczyslaw Nalewaj [Fri, 29 Mar 2024 10:37:39 +0000 (11:37 +0100)]
kernel/bcm47xx: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch history,
as git will see the move and copy as a rename thus defeating the purpose.

See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
for the original discussion.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agokernel/bcm47xx: Create kernel files for v6.6 (from v6.1)
Mieczyslaw Nalewaj [Fri, 29 Mar 2024 10:37:38 +0000 (11:37 +0100)]
kernel/bcm47xx: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15010
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoqualcommax: use ath11k_patch_mac for ZBT-Z800AX
Chukun Pan [Tue, 30 Apr 2024 15:10:01 +0000 (23:10 +0800)]
qualcommax: use ath11k_patch_mac for ZBT-Z800AX

Use ath11k_patch_mac and ath11k_set_macflag functions
instead of fix_wifi_mac script.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/15580
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agompc85xx: refresh patches
David Bauer [Sun, 2 Jun 2024 20:41:11 +0000 (22:41 +0200)]
mpc85xx: refresh patches

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agompc85xx: fix patch for kernel 6.6
David Bauer [Sun, 2 Jun 2024 20:26:54 +0000 (22:26 +0200)]
mpc85xx: fix patch for kernel 6.6

Fixes: af329ec38980 ("mpc85xx: add support for Hewlett Packard MSM460")
Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agopackage/utils/secilc: drop PKG_CPE_ID
Fabrice Fontaine [Sat, 27 Apr 2024 15:50:05 +0000 (17:50 +0200)]
package/utils/secilc: drop PKG_CPE_ID

cpe:/a:selinuxproject:secilc is not a correct CPE ID for secilc:
https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:selinuxproject:secilc

Fixes: 9ee7c1ec60e23f25f5d275c6439ce93aec914e1c (secilc: adds new package)
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15298
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoramips: add support for D-Link DIR-2055 A1
Keith Harrison [Fri, 31 May 2024 12:55:03 +0000 (08:55 -0400)]
ramips: add support for D-Link DIR-2055 A1

Add support for D-Link DIR-2055 A1 based on similarities to DIR-1960 A1,
as well as various DIR-8xx A1 models. Existing DIR-1960 A1 openwrt
"factory" firmware installs without modifications via the D-Link Recovery
GUI and has no known incompatibilities with the DIR-2055 A1.

Changes to be committed:
new file:   target/linux/ramips/dts/mt7621_dlink_dir-2055-a1.dts
modified:   target/linux/ramips/image/mt7621.mk
modified:   target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
modified:   target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh

Specifications:

    Board: Not known
    SoC: MediaTek MT7621 Family (MT7621AT)
    RAM: 256 MB (Micron 9OK17 D9PTK, should be DDR3 MT41K128M16JT-125)
    Flash: 128 MB (Winbond W29N01HVSINA)
    WiFi: MediaTek MT7615 Family (MT7615N x2)
    Switch: 1 WAN, 4 LAN (Gigabit)
    Ports: 1 USB 3.0 (front)
    Buttons: Reset, WiFi Toggle, WPS
    LEDs: Power (white/orange), Internet (white/orange),
          WiFi 2.4G (white), WiFi 5G (white)

Notes:

    Only known difference vs. the DIR-1960 A1 is that the DIR-2055 A1
    doesn't have a USB activity LED

Serial port:

    Tested to be identical to various DIR-8xx A1 models with a similar
    enclosure/pcb design:
        Parameters: 57600, 8N1, 3.3V TTL no flow control
        Location: J1 header (close to the Reset, WiFi and WPS buttons)
        Pinout: 1 - VCC 2 - RXD 3 - TXD 4 - GND
            Did not connect VCC when using

Installation:

    D-Link Recovery GUI: power down the router, press and hold the reset
    button, then re-plug it. Keep the reset button pressed until the power
    LED starts flashing orange, manually assign a static IP address under
    the 192.168.0.xxx subnet (e.g. 192.168.0.2) and go to
    http://192.168.0.1

    Some modern browsers may have problems flashing via the Recovery GUI,
    if that occurs consider uploading the firmware through cURL:

    curl -v -i -F "firmware=@file.bin" 192.168.0.1

Signed-off-by: Keith Harrison <keithh@protonmail.com>
5 months agouboot-tegra: Set UBOOT_USE_INTREE_DTC
Hauke Mehrtens [Fri, 31 May 2024 12:15:10 +0000 (14:15 +0200)]
uboot-tegra: Set UBOOT_USE_INTREE_DTC

U-Boot 2024.04 for tegra needs swig installed on the host, this
dependency is only checked if UBOOT_USE_INTREE_DTC is set. add the
missing definition.

Fixes: 6832faf3407e ("uboot-tegra: bump version to 2024.04")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agotegra: Activate CONFIG_SND_DRIVERS
Hauke Mehrtens [Fri, 31 May 2024 12:39:51 +0000 (14:39 +0200)]
tegra: Activate CONFIG_SND_DRIVERS

The option CONFIG_SND_DRIVERS is activated by default in the generic
configuration, do not deactivate it for tegra. This fixes the build of
the kmod-sound-dummy package on tegra.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agokernel: Split kmod-video-dma into two kmods
Hauke Mehrtens [Sat, 1 Jun 2024 10:46:49 +0000 (12:46 +0200)]
kernel: Split kmod-video-dma into two kmods

Split the kmod-video-dma into kmod-video-dma-sg and
kmod-video-dma-contig. The old one contained two kmods, but sometimes
only one of them is build which caused problems. The configuration
options are not manually selectable in the kernel and hidden in OpenWrt.

Currently this causes build failures on some targets.

Fixes: 4d7cbe0a5590 ("kernel: video-dma: explicitly state packaged modules")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agomvebu: disable polling delay for passive trip point for puzzle thermal
Christian Marangi [Tue, 21 May 2024 15:38:28 +0000 (17:38 +0200)]
mvebu: disable polling delay for passive trip point for puzzle thermal

We don't have any passive trip point hence we can set the polling delay
for passive trip to 0 effectively disabling this polling.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agomvebu: split thermal zone for puzzle chassis
Christian Marangi [Tue, 21 May 2024 15:33:02 +0000 (17:33 +0200)]
mvebu: split thermal zone for puzzle chassis

Split thermal zone for puzzle chassis. Thermal platform supports only
one sensor per thermal zone.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agomvebu: fix missing property in puzzle thermal
Christian Marangi [Tue, 21 May 2024 13:37:14 +0000 (15:37 +0200)]
mvebu: fix missing property in puzzle thermal

Fix missing property in puzzle thermal. The thing was never supposed to
work.

Property #thermal-sensor-cells was missing from the puzzle hwmon, making
the entire thermal platform referencing that fail to probe with -EINVAL.

The puzzle hwmon expose 2 termistor but they probably use an userspace
downstream utility to configure and handle thermal. For this reason we
really don't know what they use the sensor for or when it's attached.

We use them to sensor if the Chassis gets too hot due to ambient
temperature and generic components getting too warm.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agomvebu: improve thermal management of IEI Puzzle devices
Daniel Golle [Thu, 2 May 2024 12:21:09 +0000 (13:21 +0100)]
mvebu: improve thermal management of IEI Puzzle devices

 - Make step_wise thermal governor respect hysteresis
   This is done by importing a downstream patch, backporting the same feature
   now present in Linux v6.10+ would be too messy.
 - Introduce thermal zone for the WT61P803 uC (chassis and board sensors)
 - Introduce thermal zones for AQR NBase-T PHYs
 - No longer modify existing SoC thermal zones (which are now only in charge
   for emergency shutdown, and can be interrupt driven instead of polled)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agompc85xx: add label-mac for HP MSM460
David Bauer [Sat, 1 Jun 2024 14:52:20 +0000 (16:52 +0200)]
mpc85xx: add label-mac for HP MSM460

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agompc85xx: add support for Hewlett Packard MSM460
David Bauer [Thu, 30 May 2024 00:27:50 +0000 (02:27 +0200)]
mpc85xx: add support for Hewlett Packard MSM460

Hardware
--------
CPU:  Freescale P1020 2xe500 PPC
RAM:  256M DDR3 (Micron MT41J64M16JT-15E:G "D9MNJ")
NAND: 128M (Micron 2CA1)
BTN:  1x Reset
LED:  Power - ETH - Radio1 - Radio2
UART: RJ-45 Cisco Pinout - 115200 8N1

Installation
------------
NOTE: You can find a repo with up-to-date instructions as well as
the required files here:

https://github.com/blocktrron/msm460-flashing

Required files
==============
You need a command-files as well as a U-Boot image.

The command-file has the following content (padded to 131072 bytes).

If you copy paste these, remove the newlines!

```
U-BOOT setenv ethaddr 02:03:04:05:06:07; setenv ipaddr 192.168.1.1;
setenv serverip 192.168.1.66; tftpboot 0x3000000 msm460-uboot.bin;
nand device; nand erase 0 0xC0000; nand write 0x3000000 0x0 0xC0000; reset
```

You can download the required U-Boot from this repository:

https://github.com/blocktrron/u-boot-msm/releases

Preparation
===========
Prepare a TFTP server serving two files:

 - U-Boot NAND image as `msm460-uboot.bin`.
 - OpenWrt factory image as `msm460-factory.bin`
 - Command-file names `commands.tftp`

You can start a TFTP server in the current directory using dnsmasq:

```bash
sudo dnsmasq --no-daemon --listen-address=0.0.0.0 \
    --port=0 --enable-tftp=enxd0 --tftp-root="$(pwd)" \
    --user=root --group=root
```
Replace `enxd0` with the name of your network interface.

Procedure
=========
1. Assign yourself the IP-Address 192.168.1.66/24.
3. Connect the Router to the PC while keeping the reset button
   pressed.
4. The LEDs will eventually begin to flash.
   They will start to flash faster after around 15 seconds.
5. Release the reset button.
6. Start a new shell
7. Make sure you are currently in the directory where the tftp server
   is located.
8. Run the following command:

```bash
tftp 192.168.1.1 -m binary -c put commands.tftp nflashd.cccc9999
```

You get the message "Transfer timed out."
To find out if you have been successful, please check the
blinking LED Pattern.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agompc85xx: add compressed zImage for mpc85xx
David Bauer [Fri, 31 May 2024 16:47:25 +0000 (18:47 +0200)]
mpc85xx: add compressed zImage for mpc85xx

Add a universal zImage which can be loaded by mpc85xx boards at
load address 0x3000000. This allows boards to boot kernels larger than
16MB even if the image is loaded temporarily from NAND at offset
0x1000000 which some bootloaders do by default.

Signed-off-by: David Bauer <mail@david-bauer.net>
5 months agokirkwood: add D-Link DNS-320L support
Zoltan HERPAI [Fri, 5 Jan 2024 17:42:53 +0000 (18:42 +0100)]
kirkwood: add D-Link DNS-320L support

Dual-slot NAS based on Marvell Kirkwood.

Specifications:
 - Marvell 88F6702 @1GHz
 - 256Mb RAM
 - 128Mb NAND
 - 1x GbE LAN (Marvell 88E1318R)
 - 1x USB 2.0
 - 2x SATA
 - Weltrend WT69P3 ("supervisor" MCU chip)
 - Serial on J2 (115200,8n1)
 - Newer bootROM so kwboot-ing via serial is possible

Notes:
 - The Weltrend MCU is controlled by the package added in utils/dns320l-mcu.
 - The original MAC address is stored in the "mini firmware" image's first
   17 bytes.
 - Compared to the original MTD layout, the uImage+rootfs are now stored in
   a common ubi partition.

Installation:
1. Serial console
 - Connect your levelshifter to the serial console
   on J2 (refer to the wiki page for pinout)
2. Update u-boot
 - Download the u-boot.kwb image for the device
 - Powercycle the NAS
 - Run "kwboot -b u-boot-dns320l/u-boot.kwb /dev/ttyUSB0 -p"
 - Connect to the serial console with minicom
 - tftp 0x0800000 u-boot-dns320l/u-boot.kwb
   (Please note that "PHY reset timed out" seems to be customary
    on kirkwood devices, the egiga0 interface works regardless.)
 - nand erase 0x0 100000
 - nand write 0x0800000 0x0 0x100000
 - reset
3. Install OpenWrt
 - Boot up the initramfs image
 - tftpboot 0x800000 openwrt-kirkwood-generic-dlink_dns320l-initramfs-uImage; bootm 0x800000
 - Download the sysupgrade image and perform sysupgrade

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Reviewed-by: Pawel Dembicki <paweldembicki@gmail.com>
5 months agobuild: add option KERNEL_DEBUG_INFO_BTF_MODULES
Tony Ambardar [Fri, 31 May 2024 06:07:22 +0000 (23:07 -0700)]
build: add option KERNEL_DEBUG_INFO_BTF_MODULES

The recent kernel v6.6.31 update broke BTF-enabled builds since upstream
Linux added a prompt for config option DEBUG_INFO_BTF_MODULES in commit
2166cb2e21 ("bpf, kconfig: Fix DEBUG_INFO_BTF_MODULES Kconfig definition").

Fix by updating Config-kernel.in to add the option, cleaning up a related
dependency and whitespace also.

Fixes: 10d77b9bc3 ("kernel: bump 6.6 to 6.6.31")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
5 months agotools/elfutils: pass -O2 in HOST_CXXFLAGS
Robert Marko [Fri, 31 May 2024 13:47:15 +0000 (15:47 +0200)]
tools/elfutils: pass -O2 in HOST_CXXFLAGS

Trying to compile elfutils on Fedora 40 with GCC 14.1.1 will fail with:
/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/bin/g++ -std=c++11 -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/share/locale"'  -DDEBUGPRED=0 -DSRCDIR=\"/home/robimarko/Building/AX3600/qualcommax/build_dir/host/elfutils-0.191/src\" -DOBJDIR=\"/home/robimarko/Building/AX3600/qualcommax/build_dir/host/elfutils-0.191/src\" -I. -I..  -I../libgnu -I../libgnu -I. -I. -I../lib -I.. -I./../libelf -I./../libebl -I./../libdw -I./../libdwelf -I./../libdwfl -I./../libasm -I../debuginfod -I/home/robimarko/Building/AX3600/qualcommax/staging_dir/host/include  -std=c++11 -Wall -Wshadow -Wtrampolines -Wlogical-op -Wduplicated-cond -Wnull-dereference -Wimplicit-fallthrough=5 -Werror -Wunused -Wextra -Wstack-usage=262144   -D_FORTIFY_SOURCE=3  -c -o srcfiles.o srcfiles.cxx
In file included from /usr/include/c++/14/x86_64-redhat-linux/bits/os_defines.h:39,
                 from /usr/include/c++/14/x86_64-redhat-linux/bits/c++config.h:2521,
                 from /usr/include/c++/14/cstdlib:41,
                 from ../libgnu/gettext.h:56,
                 from ../libgnu/eu-config.h:62,
                 from ../config.h:2378,
                 from srcfiles.cxx:31:
/usr/include/features.h:414:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
  414 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
      |    ^~~~~~~
cc1plus: all warnings being treated as errors

So, lets do as the error says and pass -O2 in HOST_CXXFLAGS like we already
do by default in HOST_CFLAGS.

Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: do not directly link gnulib to libelf
Michael Pratt [Wed, 1 May 2024 21:47:26 +0000 (17:47 -0400)]
tools/elfutils: do not directly link gnulib to libelf

The compiled library resulting from importing gnulib has been
linked to libelf in order to easily cover other link dependencies.
However, this is not appropriate for linking libelf to other programs
as it bloats the resulting libelf library, and may result in
multiple defintions of symbols based on whether or not
certain modules from gnulib are included while elfutils
already has it's own definition of a function.

This is not a problem while building elfutils, because gnulib has
it's own way of creating function aliases and special declarations
that allow the linker to ignore the original function definitions,
however, when libelf is used to link to something else,
this results in an error at link time.

The gnulib manual recommended linking the libraries directly,
but those who have written it may not have considered how this
can affect the ability to link that library in other builds,
they likely assume the build targets would not be a dependency.

Fix this by removing the linking between gnulib and libelf
and instead overriding Make variables in order to add linking
between gnulib and each of the binaries provided by elfutils,
using Make functions to avoid applying it to other subdirectories.

The function tdestroy() would still be missing on macOS,
but the existence of the gnulib tsearch object having been built
is an indicator of whether or not it is needed
because it is only built conditionally by gnulib,
so include linking that object only when it exists.

Block the unnecessary replacement of some functions by gnulib
so that future linking with libelf doesn't require
the associated gnulib "rpl" prefixed functions.
These replacements are very strict in order to correct
minor bugs that don't have a real impact in almost all cases
or new standards requirements that are not yet in effect or used.

Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/elfutils: install a subset of the elfutils binaries
Michael Pratt [Wed, 1 May 2024 19:21:38 +0000 (15:21 -0400)]
tools/elfutils: install a subset of the elfutils binaries

Install binaries that are not common with binutils
instead of none at all. This adds a negligible time to the build.

Building shared libraries is disabled, so the AM_LDFLAGS can be reset
without the rpath-link option which is unrecognized by clang.

Some of the binaries depend on functions that are defined
using a "strong alias" instead of a normal definition,
but this is disabled by our patches in order to work on macOS,
so use the identical function directly instead.

Add fnmatch from gnulib with GNU extensions
which is needed for usage of the FNM_EXTMATCH flag.

Handle a "Wunused-const-variable" error with the same
preprocessor conditional used to include the function
that the variable is used in.

Ref: f64bd4b6c ("tools/elfutils: only build required components")
Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/gnulib: unmangle fts header on macOS
Michael Pratt [Sun, 5 May 2024 07:42:44 +0000 (03:42 -0400)]
tools/gnulib: unmangle fts header on macOS

The gnulib fts header is meant to not be overwritten
in any way by the host system's copy of fts.h
and was therefore given a unique name instead.

This is fine if the built libgnu library is directly linked
with the target library, but if we want to keep them isolated
we end up having the definitions being mangled anyway
when the next object to link against included the fts.h header.

On some macOS platforms, the use of __DARWIN_INODE64
is messing with the link name for fts functions, resulting in:

Undefined symbols for architecture x86_64:
  "_rpl_fts_close$INODE64", referenced from:
...

Create a local fts header for gnulib
that completely blocks the macOS host fts header.

An alternative and more upstream friendly fix would be
to rename fts_.h to fts.h and add the macOS-only
include guard to that file within it's own include guard,
but that would be a massive patch, so do this for now.

Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agoimagebuilder: fix broken IB_STANDALONE option
Christian Marangi [Fri, 31 May 2024 11:08:02 +0000 (13:08 +0200)]
imagebuilder: fix broken IB_STANDALONE option

Fix broken IB_STANDALONE option for OPKG due to an error in ifdef logic
where we weren't adding the required entry to reference the local files
in repositories.conf

Rework the ifdef to more explicit and restore original functionality of
this option.

While at it also provide different README for APK or OPKG.

Fixes: d788ab376f85 ("build: add APK package build capabilities")
Link: https://github.com/openwrt/openwrt/pull/15599
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5 months agotegra: enable VDE driver
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:10 +0000 (16:24 +0200)]
tegra: enable VDE driver

Upstream commit 83b7f0b8aeab ("ARM: tegra: Add OPP tables and power
domains to Tegra20 device-trees") added power domains to all devices
supporting power management and one of them is Video Decoder Engine.
Because of lacking driver for VDE, its power gate couldn't be driven
which inhibited reboot of the whole device.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
5 months agotegra: add testing 6.6 kernel
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:09 +0000 (16:24 +0200)]
tegra: add testing 6.6 kernel

Preliminary support.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
5 months agotegra: 6.6: refresh config and patches
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:08 +0000 (16:24 +0200)]
tegra: 6.6: refresh config and patches

Simple refresh to get rid of any fuzz and drop serial patch. With few
bug fixes around tegra serial driver the spurious IRQ didn't appear any
more during test. Let's see how long that'll last.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
5 months agokernel/tegra: Restore kernel files for v5.15
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:07 +0000 (16:24 +0200)]
kernel/tegra: Restore kernel files for v5.15

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
5 months agokernel/tegra: Create kernel files for v6.6 (from v5.15)
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:06 +0000 (16:24 +0200)]
kernel/tegra: Create kernel files for v6.6 (from v5.15)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
5 months agotegra: refresh 5.15 config
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:05 +0000 (16:24 +0200)]
tegra: refresh 5.15 config

Reduce diffstat in kernel config on new version introduction.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
5 months agokernel: video-dma: explicitly state packaged modules
Tomasz Maciej Nowak [Wed, 29 May 2024 14:24:04 +0000 (16:24 +0200)]
kernel: video-dma: explicitly state packaged modules

Because wildcard in variable stating packaged modules, the filtering for
built-in kernel modules didn't work and would cause a packaging failure.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
5 months agoramips: get rid of downstream network device label patch
Daniel Golle [Thu, 30 May 2024 13:23:08 +0000 (14:23 +0100)]
ramips: get rid of downstream network device label patch

Use a simple Shell script like on filogic target to get rid of downstream
patch for the Ethernet driver which was rejected upstream long ago.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agomediatek: filogic: avoid sub-shell invovation in netdev rename loop
Daniel Golle [Thu, 30 May 2024 13:38:56 +0000 (14:38 +0100)]
mediatek: filogic: avoid sub-shell invovation in netdev rename loop

Rename network devices to their label set in DT without invocation of
a sub-shell.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agoply: add dynamic tracing package using BPF
Tony Ambardar [Tue, 7 May 2024 00:06:55 +0000 (17:06 -0700)]
ply: add dynamic tracing package using BPF

ply is a light-weight dynamic tracer for Linux that leverages the kernel's
BPF VM in concert with kprobes/tracepoints to attach probes to arbitrary
points in the kernel.

Most tracers that generate BPF bytecode are based on the LLVM-based BCC
toolchain; ply on the other hand has no external dependencies outside libc,
making it suitable for use on constrained embedded systems.

Currently ply supports x86_64, aarch64, arm, riscv64, riscv32, powerpc,
mips(el), and mips64(el) architectures.

Further documentation, examples and implementation details may be found at:
https://github.com/iovisor/ply.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
5 months agopackages: refresh patches
Rosen Penev [Sat, 18 May 2024 20:45:34 +0000 (13:45 -0700)]
packages: refresh patches

CI is supposed to catch all of these. Some of these predate CI.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
5 months agokernel: Add CONFIG_FB_DEVICE to kmod-fb
Hauke Mehrtens [Sun, 26 May 2024 21:53:10 +0000 (23:53 +0200)]
kernel: Add CONFIG_FB_DEVICE to kmod-fb

At least kmod-fb-tft depends on CONFIG_FB_DEVICE and can not be
activated without it.

This configuration option was added with kernel 6.6, before this featre
was always activated.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agox86: Activate CONFIG_FB_DEVICE
Hauke Mehrtens [Sat, 25 May 2024 16:27:32 +0000 (18:27 +0200)]
x86: Activate CONFIG_FB_DEVICE

This adds the legacy /dev/fb* device file for kernel 6.6 again.
Linux upstream commit 701d2054fa31 ("fbdev: Make support for
userspace interfaces configurable") made this configurable and we
deactivated this option by default for kernel 6.6. On x86 we are not
space constrained and some users need this legacy interface.

Fixes: #15222
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agoiproute2: update to 6.9.0
Rui Salvaterra [Sat, 25 May 2024 15:30:25 +0000 (15:30 +0000)]
iproute2: update to 6.9.0

Support for iptables action has been dropped. Remove tc-mod-iptables and related
patch (175-reduce-dynamic-syms.patch).

We also add the missing libbpf dependency for `ss` since iproute 8740ca9
("ss: add support for BPF socket-local storage") now means that `ss` requires
libbpf as well.

Fix 170-ip_tiny.patch, as the help text didn't match all the included functions.

Drop upstreamed patches 402-bpf-fix-warning-from-basename.patch
and 403-bpf-include-libgen.h-for-basename.patch.

All other patches automatically rebased.

Co-authored-by: Rany Hany <rany_hany@riseup.net>
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Rany Hany <rany_hany@riseup.net>
5 months agoiproute2: fix build on GCC 14
Rany Hany [Mon, 13 May 2024 17:38:12 +0000 (20:38 +0300)]
iproute2: fix build on GCC 14

Upstream patches:

401-bridge-vlan.c-bridge-vlan.c-fix-build-with-gcc-14-on.patch
402-bpf-fix-warning-from-basename.patch
403-bpf-include-libgen.h-for-basename.patch

The patch (400-rdma-include-libgen.h-for-basename.patch) was not
submitted upstream but just adds a missing include for basename.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
5 months agombedtls: fix build on GCC 14
Rany Hany [Mon, 13 May 2024 17:09:44 +0000 (20:09 +0300)]
mbedtls: fix build on GCC 14

Without this patch, GCC 14 incorrectly complains about the following error:

In file included from /home/user/workspace/mbedtls/library/ctr_drbg.c:13:
In function ‘mbedtls_xor’,
    inlined from ‘ctr_drbg_update_internal’ at /home/user/workspace/mbedtls/library/ctr_drbg.c:372:5:
/home/user/workspace/mbedtls/library/common.h:235:17: error: array subscript 48 is outside array bounds of ‘unsigned char[48]’ [-Werror=array-bounds=]
  235 |         r[i] = a[i] ^ b[i];
      |                ~^~~
/home/user/workspace/mbedtls/library/ctr_drbg.c: In function ‘ctr_drbg_update_internal’:
/home/user/workspace/mbedtls/library/ctr_drbg.c:335:19: note: at offset 48 into object ‘tmp’ of size 48
  335 |     unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN];
      |                   ^~~
In function ‘mbedtls_xor’,
    inlined from ‘ctr_drbg_update_internal’ at /home/user/workspace/mbedtls/library/ctr_drbg.c:372:5:
/home/user/workspace/mbedtls/library/common.h:235:24: error: array subscript 48 is outside array bounds of ‘const unsigned char[48]’ [-Werror=array-bounds=]
  235 |         r[i] = a[i] ^ b[i];
      |                       ~^~~
/home/user/workspace/mbedtls/library/ctr_drbg.c: In function ‘ctr_drbg_update_internal’:
/home/user/workspace/mbedtls/library/ctr_drbg.c:333:57: note: at offset 48 into object ‘data’ of size [0, 48]
  333 |                                     const unsigned char data[MBEDTLS_CTR_DRBG_SEEDLEN])
      |                                     ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘mbedtls_xor’,
    inlined from ‘ctr_drbg_update_internal’ at /home/user/workspace/mbedtls/library/ctr_drbg.c:372:5:
/home/user/workspace/mbedtls/library/common.h:235:14: error: array subscript 48 is outside array bounds of ‘unsigned char[48]’ [-Werror=array-bounds=]
  235 |         r[i] = a[i] ^ b[i];
      |         ~~~~~^~~~~~~~~~~~~
/home/user/workspace/mbedtls/library/ctr_drbg.c: In function ‘ctr_drbg_update_internal’:
/home/user/workspace/mbedtls/library/ctr_drbg.c:335:19: note: at offset 48 into object ‘tmp’ of size 48
  335 |     unsigned char tmp[MBEDTLS_CTR_DRBG_SEEDLEN];
      |                   ^~~

This change adds a basic check to silence the warning until a solution is worked on upstream.
As this check is already used by another compiler, it shouldn't cause any issues for us.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
5 months agox86: drop 6.1 support
Mieczyslaw Nalewaj [Wed, 29 May 2024 23:05:55 +0000 (01:05 +0200)]
x86: drop 6.1 support

Drop configs, files and patches for Linux 6.1.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
5 months agox86: use kernel 6.6 by default
Mieczyslaw Nalewaj [Wed, 29 May 2024 23:03:24 +0000 (01:03 +0200)]
x86: use kernel 6.6 by default

Switch to Linux kernel version 6.6.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
5 months agoarmsr: Remove kernel 6.1 configuration
Hauke Mehrtens [Sun, 26 May 2024 22:00:19 +0000 (00:00 +0200)]
armsr: Remove kernel 6.1 configuration

Armsr is using kernel 6.6 by default now, remove configuration for
kernel 6.1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agoarmsr: Use kernel 6.6 by default
Hauke Mehrtens [Sun, 26 May 2024 21:59:39 +0000 (23:59 +0200)]
armsr: Use kernel 6.6 by default

All 2 subtargets are compiling fine and booting up in qemu.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agogeneric: 6.6: net: sfp-bus: fix SFP mode detect from bitrate
Daniel Golle [Thu, 30 May 2024 11:06:26 +0000 (12:06 +0100)]
generic: 6.6: net: sfp-bus: fix SFP mode detect from bitrate

Backport commit fixing detection of SFP modules which has been broken
since Linux 6.4 for some modules.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agogeneric: backport accepted and pending patches for mtk_eth_soc
Daniel Golle [Wed, 29 May 2024 01:41:30 +0000 (02:41 +0100)]
generic: backport accepted and pending patches for mtk_eth_soc

Backport a bunch of fixes and improvements for WED and PPE, mostly
for MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agogeneric: move accepted patches for mtk_eth_soc to backport-6.6
Daniel Golle [Tue, 28 May 2024 22:48:16 +0000 (23:48 +0100)]
generic: move accepted patches for mtk_eth_soc to backport-6.6

In preparation to update to upcoming Linux 6.6.33 move accepted patches
from mediatek target to backport folder, so moving to newer Linux 6.6
releases becomes easier and also other patches on top can be applied
more easily.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agokernel: add missing patch header
Daniel Golle [Tue, 28 May 2024 00:49:36 +0000 (01:49 +0100)]
kernel: add missing patch header

Make sure all patches can again be applied using 'git am' on the
corresponding linux-stable git tree.

Fixes: a7ae4ed0a3 ("kernel: fix tools build breakage on macos with x86")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agokernel: bump 6.6 to 6.6.32
John Audia [Sat, 25 May 2024 17:03:59 +0000 (13:03 -0400)]
kernel: bump 6.6 to 6.6.32

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

Only kernel checksum was updated/no patches needed a rebase.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/glinet_gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
5 months agokernel: bump 6.6 to 6.6.31
John Audia [Fri, 17 May 2024 11:43:59 +0000 (07:43 -0400)]
kernel: bump 6.6 to 6.6.31

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

Removed upstreamed:
backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch[1]
backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch[2]
backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch[3]
backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch[4]
pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch[5]
pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch[6]
pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch[7]
pending-6.6/778-net-l2tp-drop-flow-hash-on-forward.patch[8]
pending-6.6/440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch[9a,b]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=7f7b0ebb37afc5070d122318e3651d7cb8c4f01c
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=af276a5ac8e938c8b058e3e124073cc1e322d98b
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=78b6092d78341e423e5f6afae4d9f401b561aca7
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=26e2fe4cab10e67f116f4a2eecc393824bb294b8
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=65fbc7a11d063236e1f1dcebb38eeaa3ccbe2dbc
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=cfe34d86ef9765c388f145039006bb79b6c81ac6
7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=1ce60741d7e17dcf707e3bdebed4442ae30bdd02
8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=23e25d2fc777cd0cc77c2f857f93e9b13ee789b9
9a. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.31&id=cce311f8bbbf9d24eacc39af3228cd104e079396
9b. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/drivers/mtd/mtdcore.c?id=v6.6.31&id2=v6.6.30

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
5 months agod1: drop 6.1 support
Zoltan HERPAI [Wed, 29 May 2024 08:54:26 +0000 (10:54 +0200)]
d1: drop 6.1 support

Now that 6.6 is the default, remove the 6.1 config and patches.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 months agod1: switch default to 6.6
Zoltan HERPAI [Wed, 29 May 2024 08:53:55 +0000 (10:53 +0200)]
d1: switch default to 6.6

Switch the default kernel to 6.6.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 months agod1: 6.6: set testing kernel
Zoltan HERPAI [Sat, 25 May 2024 22:56:33 +0000 (00:56 +0200)]
d1: 6.6: set testing kernel

Allow selecting 6.6 as testing kernel on d1.

Runtime-tested: Nezha D1

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 months agod1: refresh kernel config
Zoltan HERPAI [Sat, 25 May 2024 22:54:24 +0000 (00:54 +0200)]
d1: refresh kernel config

Refresh kernel config, and enable thermal features.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 months agod1: remove upstreamed patches and add new patchset
Zoltan HERPAI [Sat, 25 May 2024 22:53:22 +0000 (00:53 +0200)]
d1: remove upstreamed patches and add new patchset

Remove patches that were upstreamed, and backport features from
later kernels.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 months agokernel/d1: Restore kernel files for v6.1
Zoltan HERPAI [Sat, 25 May 2024 22:51:10 +0000 (00:51 +0200)]
kernel/d1: Restore kernel files for v6.1

This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.

For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 months agokernel/d1: Create kernel files for v6.6 (from v6.1)
Zoltan HERPAI [Sat, 25 May 2024 22:51:10 +0000 (00:51 +0200)]
kernel/d1: Create kernel files for v6.6 (from v6.1)

This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 months agoscripts: Add GNU ftp mirror redirector for GNU and Savannah
Sahil Dhiman [Sat, 25 May 2024 09:57:12 +0000 (15:27 +0530)]
scripts: Add GNU ftp mirror redirector for GNU and Savannah

Add GNU's redirector which automatically redirect user to nearby online
mirror.

Signed-off-by: Sahil Dhiman <sahil@hopbox.in>
Link: https://github.com/openwrt/openwrt/pull/15557
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 months agotools/mkimage: update to v2024.04
Nick Hainke [Fri, 5 Apr 2024 10:18:41 +0000 (12:18 +0200)]
tools/mkimage: update to v2024.04

Update to latest version.

Refresh patches:
- 030-allow-to-use-different-magic.patch
- 095-tools-disable-TOOLS_FIT_FULL_CHECK.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
5 months agoramips: modules: remove symbol CONFIG_DW_DMAC_PCI
Shiji Yang [Mon, 27 May 2024 12:48:46 +0000 (12:48 +0000)]
ramips: modules: remove symbol CONFIG_DW_DMAC_PCI

The DW_DMAC_PCI symbol won't be automatically selected at all.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: gdma: remove slave_id field
Shiji Yang [Mon, 27 May 2024 12:41:48 +0000 (12:41 +0000)]
ramips: gdma: remove slave_id field

Fix compile error:
drivers/dma/ralink-gdma.c: In function 'gdma_dma_config':
drivers/dma/ralink-gdma.c:197:40: error: 'struct dma_slave_config' has no member named 'slave_id'
  197 |                 chan->slave_id = config->slave_id;
      |                                        ^~
drivers/dma/ralink-gdma.c:206:40: error: 'struct dma_slave_config' has no member named 'slave_id'
  206 |                 chan->slave_id = config->slave_id;
      |                                        ^~
make[8]: *** [scripts/Makefile.build:243: drivers/dma/ralink-gdma.o] Error 1

ref: https://lore.kernel.org/all/20211122222203.4103644-1-arnd@kernel.org/

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agoramips: add back the gdma driver
Shiji Yang [Mon, 27 May 2024 08:55:42 +0000 (08:55 +0000)]
ramips: add back the gdma driver

The gdma driver has been removed from the upstream. Let's move it
to the local files. This patch also removed unsupported compatible
string and sub-target.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
5 months agomediatek: add missing ';;' in shell switch case block
Daniel Golle [Tue, 28 May 2024 22:50:15 +0000 (23:50 +0100)]
mediatek: add missing ';;' in shell switch case block

Add missing ';;' to the end of shell switch case statement.

Fixes: c71b68acdd ("mediatek: filogic: add Adtran SmartRG Mount Stuart series")
Reported-by: @gl-dude
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
5 months agotoolchain: gcc: update to 13.3
Olcay Korkmaz [Tue, 28 May 2024 19:42:41 +0000 (22:42 +0300)]
toolchain: gcc: update to 13.3

Release Notes:
https://gcc.gnu.org/pipermail/gcc/2024-May/243980.html

Remove upstreamed patches:
- patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
- patches-13.x/021-libcc1-fix-vector-include.patch
- patches-13.x/400-LoongArch-Fix-MUSL_DYNAMIC_LINKER.patch
- patches-13.x/401-LoongArch-Modify-MUSL_DYNAMIC_LINKER.patch

Refresh patches:
- patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
- patches-13.x/970-macos_arm64-building-fix.patch

Signed-off-by: Olcay Korkmaz <nuke_mania@hotmail.com>
5 months agomalta: Remove kernel 6.1 configuration
Hauke Mehrtens [Sun, 26 May 2024 18:04:33 +0000 (20:04 +0200)]
malta: Remove kernel 6.1 configuration

Malta is using kernel 6.6 by default now, remove configuration for
kernel 6.1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 months agomalta: Use kernel 6.6 by default
Hauke Mehrtens [Sun, 26 May 2024 18:03:09 +0000 (20:03 +0200)]
malta: Use kernel 6.6 by default

All 4 subtargets are compiling fine and booting up in qemu.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>