Compare commits

...

319 Commits

Author SHA1 Message Date
ba33aa15af fix merge conflict 2025-03-21 02:15:24 -04:00
87e7d6bf02 added gretap tunnel 2025-03-21 02:00:03 -04:00
Resneptacle
c0508577b3 added custom cghmn config and scripts 2025-03-20 06:16:16 +00:00
Felix Fietkau
4f5f56b702 libnl-tiny: update to Git HEAD (2025-03-19)
c0df580adbd4 attr.c: fix nla_reserve size check

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-19 13:19:34 +01:00
Daniel Golle
7a303d861a kernel: move accepted patch from pending-6.6 to backport-6.6
742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch has been
accepted a while ago as
https://git.kernel.org/torvalds/linux/c/87bfdbbb1992

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-03-18 17:25:39 +00:00
Álvaro Fernández Rojas
26e7a11836 ipq-wifi: fix PKG_MIRROR_HASH after update to 2024-02-17
PKG_MIRROR_HASH is incorrect and the package check is currently failing.

Fixes: 4990ce613b7d ("ipq-wifi: update to 2024-02-17")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-03-18 12:38:03 +01:00
Tomas Lara
f86476b18b rockchip: fix missing ".patch" file extension
Fixes missing .patch file extension in:
- de9ad11dac
- 2e7d060fd1

Signed-off-by: Tomas Lara <tl849670@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18281
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-18 10:30:23 +01:00
Nayab Sayed
5ff9ce11f0 at91bootstrap: update at91bootstrap v4 targets to v4.0.10
Update AT91Bootstrap v4 capable targets to v4.0.10.

Signed-off-by: Nayab Sayed <nayabbasha.sayed@microchip.com>
Link: https://github.com/openwrt/openwrt/pull/18131
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-18 10:24:56 +01:00
Rosen Penev
16b58c278f ath79: om2p-v1: fix compatible string
This device uses AR9285, and not AR9280.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18271
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 21:34:33 +01:00
Coia Prant
612bedaf5b ramips: Fix Hongdian H8922 v30 pinctrl default state
According to the MT7620A hardware datasheet, GPIO/14 was originally used for RIN of UARTF, but is now used as the WPS LED.

Corrected pinctrl to ensure it works properly in the future.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18278
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 21:31:37 +01:00
Lech Perczak
ffad196537 ath79: support switch LEDs on TL-WR1043ND v2/v3
Add switch LED definitions for TP-Link TL-WR1043ND family, based on data
extracted from ar71xx board file. Update the LED labels to match current
pattern, i.e. drop the "tp-link:" prefix.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
af64c180b3 ath79: TP-link TL-WR1043ND v2/v3: use fixed-link for AR8327 switch connection
Attaching PHY driver to the switch, while adding LEDs binding causes the
PHY driver to create additional LED instances, handled incorrectly by
the PHY driver, which are non-functional. Use fixed-link to attach the
switch driver, instead of PHY driver, to prevent that.

This has a side effect of not logging switch port up/down events in the kernel
log.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
a6bde79c91 ath79: support switch LEDs on Archer C7 family
Add switch LED definitions for TP-Link Archer C7 v1/2/3 family, based on data
extracted from ar71xx board file. Update the LED labels to match current
pattern, i.e. drop the "tp-link:" prefix.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
c61a6efdf5 ath79: TP-link Archer C7v2: use fixed-link for AR8327 switch connection
Attaching PHY driver to the switch, while adding LEDs binding causes the
PHY driver to create additional LED instances, handled incorrectly by
the PHY driver, which are non-functional. Use fixed-link to attach the
switch driver, instead of PHY driver, to prevent that.

This has a side effect of not logging switch port up/down events in the kernel
log.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
b5367180b9 ath79: support switch LEDs on TL-WDR4300 family
Add switch LED definitions for TP-Link TL-WDR4300 family, based on data
extracted from ar71xx board file. Update the LED labels to match current
pattern, i.e. drop the "tp-link:" prefix.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
acd6f48e87 ath79: TP-link TL-WDR4300: use fixed-link for AR8327 switch connection
Attaching PHY driver to the switch, while adding LEDs binding causes the
PHY driver to create additional LED instances, handled incorrectly by
the PHY driver, which are non-functional. Use fixed-link to attach the
switch driver, instead of PHY driver, to prevent that.

This has a side effect of not logging switch port up/down events in the kernel
log.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
3ba4a4e32c kernel: ar8327: support LED device tree bindings
The ar8216 switch driver supports exposing configuration of AR8327 and
AR8337 switch LEDs to the userspace, however it is only configurable
through platform data, causing the devices ported from ar71xx target to
lack the support.
Since there is still a long way to go until we can migrate the target to
qca8k, an interim solution is needed.
Extend ar8327_hw_config_of function to parse a "leds"
subnode, which will populate the missing platform data based on device
tree contents, and restore the existing support for the LEDs.
Standard bindings apply, mapping "reg" property to LED index, with
addition of "qca,led-mode" property, which selects HW (0) or SW (1)
mode, defaulting to HW mode.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Lech Perczak
5a4f8b26f0 kernel: ar8327: fix active-low LED initialization
Switch LEDs configured as active-low remain low instead of high upon
initialization, because in ar8327_leds_init, no distinction is made with
regards to LED pattern based on active_low property - only whether HW
mode is active. Select the proper initial pattern based also on
active_low to fix that.

While at that, simplify the equation ruling pattern selection for
setting brightness, avoiding unnecessary binary XOR operation, not
really valid for 'bool' type.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/12487
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:40:46 +01:00
Simonas Tamošaitis
9f1f918aed ath79: fix chipidea usb controller detection
Devices with chipidea usb controller does not detect usb hub after
phy-names change to "usb", revert it back to "usb-phy"

Fixes: 787cb9d87edb ("ath79: change phy-names to only usb")
Signed-off-by: Simonas Tamošaitis <simsasss@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18230
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 15:23:45 +01:00
Henrik Ginstmark
929b3d0e52 ramips: add missing LEDs and modem control for ASUS 4G-AX56
Add missing LEDs and modem control for ASUS 4G-AX56
 - wifi2.4G white
 - wifi5G   white
 - wan      two-coloured, white and red
 - modem    four-coloured white, blue, yellow and red
   change
      label = "xxxx:modem";
   to
      color = <LED_COLOR_ID_xxxx>;
      function = LED_FUNCTION_MOBILE;
 - rssi-1   white
 - rssi-2   white
 - rssi-3   white

and modem reboot and reset

Combined into one commit

Signed-off-by: Henrik Ginstmark <henrik@ginstmark.se>
Link: https://github.com/openwrt/openwrt/pull/17927
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 15:13:42 +01:00
Stephen Howell
63f45b8ab4 kernel: modules: add Intel ICE support
Add support for the Intel E800 series of cards, with switchdev
support enabled for lower CPU usage.

Signed-off-by: Stephen Howell <howels@allthatwemight.be>
Link: https://github.com/openwrt/openwrt/pull/17564
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 14:53:53 +01:00
Stephen Howell
743aaaf2ad linux-firmware: Add support for Intel ICE
Uses the OS Default DDP package for Intel Ethernet 800 series.

Signed-off-by: Stephen Howell <howels@allthatwemight.be>
Link: https://github.com/openwrt/openwrt/pull/17564
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 14:53:53 +01:00
Felix Fietkau
77f8a70f65 unetmsg: add unet pub/sub message broker based on ubus
This service automatically establishes connections to any hosts that are members
of the same unet network, and allows publish/subscribe exchanges via ubus channels.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-17 13:17:52 +01:00
Felix Fietkau
5d40123818 provision: add script for managing device provisioning data
This is useful for keeping specific data on a device across factory reset.
It uses a separate partition (only UBI supported at the moment) to store
the data. The primary use case is storing sensitive data like cryptographic
keys for maintaining a device as part of a network.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-17 13:17:52 +01:00
Felix Fietkau
5f0f8d23a1 base-files: add support for creating a provisioning partition on sysupgrade
This partition can be used to store sensitive config items (e.g. keys/certificates)
across factory resets.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-17 13:17:52 +01:00
Felix Fietkau
1be7036f69 unetd: cli: add support for changing network password
This does not actually create a new private key. Instead, the salt is replaced,
and a xor key is generated which when merged with the key derived from the new
password transforms into the original private key.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-17 13:17:14 +01:00
Felix Fietkau
2055b73ba4 unetd: cli: add unet_create/update/delete hook calls
Useful for upcoming cli modules that store created interfaces separately

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-17 13:16:48 +01:00
Felix Fietkau
7c04fa0328 unetd: update to Git HEAD (2025-03-15)
5f97919896c4 cli: reduce code duplication, cleanup
20e4b342aa08 cli: add support for adding xor key to private key

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-17 13:16:27 +01:00
Felix Fietkau
5f54aa602e unetd: cli: bypass override directory
Useful for better integration with uconfig, which overrides uci with generated files

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-17 13:16:08 +01:00
Felix Fietkau
960e1c4c24 ucode: update to Git HEAD (2025-03-17)
9d94d54ed1a3 uci: implement cursor.list_append() and cursor.list_remove()
a5a299075f37 zlib: rework code logic
ee6a6c3ca579 zlib: deduplicate code
d20f7bb87d47 zlib: add stream-oriented deflate operations
0255af462be3 zlib: add stream-oriented inflate operations
9260bd5354bf WIP: lib: support map() over objects
60f05ac60bfe docs: cover switch statement in syntax article
338aa2ebf00e docs: add article with array specific information
df5a79a04b17 uci: link save() and commit() functions in cursor class description
03fb60d0e4b3 docs: add detailed documentation article for dictionaries
8e122f16327c ubus: add support for calling system objects
21a615c84367 socket: add reuseaddr argument for socket.listen()
e04908ef57e7 uci: add support for altering the override config directory
9dbace122d7e socket: add missing documentation for socket.listen() reuseaddr
312b25482b30 ubus: add errval_return() helper macro
1af4a6bbc206 ubus: add channel defer() method
0002684b9772 ubus: support sending multiple reply messages on a request
fb1da7157d13 ubus: remove broken implied await when calling defer() outside of uloop.run()
67a4ad20f172 ubus: fix uninitialized variable warning

Fixes: https://github.com/jow-/ucode/issues/279
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-17 10:25:23 +01:00
Tomasz Maciej Nowak
adc4d95c74 mediatek: u7623: fix network switch enumeration
With upstream changes hitting kernel 6.4 the dtb for u7623 ends up with
both mac (gmac) disabled, since this is now the default status in
mt7623.dtsi. Fix this by including mt7623a.dtsi (which already has all
necessary bits) and enabling all revlevant ports. This will also do
a side hustle of assigning proper clocks for power controller and
specifying proper power domain for few devices.

Link: https://lore.kernel.org/all/20230210182505.24597-1-arinc.unal@arinc9.com
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250304164507.60511-2-tmn505@terefe.re/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:43:02 +01:00
Tomasz Maciej Nowak
f8a2e1c68b uboot-mediatek: u7623: remove keys pin function
Apparently U-Boot will discard whole node if requested pin function is
unknown to the driver. This resulted in inability to interact with
U-Boot on the said board, as U-Boot always assumed the recovery key
pressed and issued recovery procedure. Log snippet:

button_gpio gpio-keys: pinctrl_select_state_full: pinctrl_config_one: err=-38
reset button found
button pushed, resetting environment

Recovery procedure also booted recovery image, which didn't affect much
the 23.05.x release, since the root fs argument was valid, so changes
persisted. But as 24.10.x hit with fitblk, the board will boot only
recovery image (initramfs) because of default bootargs will reset on each
boot and U-Boot provided bootargs took precedence.

Fixes: 42eeb22450f2 ("uboot-mediatek: fix factory/reset button")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250304164507.60511-1-tmn505@terefe.re/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:42:51 +01:00
J. S. Seldenthuis
4fed462454 ramips: use openwrt,netdev-name to fix port name conflict on TP-Link Deco M4R v4
Since 24.10.0, eth0, used for the WAN interface, does not work. From dmesg:

...
[    1.831126] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.846204] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
...
[    1.933969] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.967668] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    1.975999] mt7530-mdio mdio-bus:1f eth0 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=21)
[    1.986907] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    1.987149] mtk_soc_eth 1e100000.ethernet eth0: error -17 registering interface eth0
[    2.004157] mt7530-mdio mdio-bus:1f eth1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=22)
[    2.017698] mtk_soc_eth 1e100000.ethernet eth0: entered promiscuous mode
[    2.024849] DSA: tree 0 setup
...
[    4.249680] mtk_soc_eth 1e100000.ethernet dsa: renamed from eth0
...

Like #15865, it seems that gmac0 does not rename eth0 to dsa until after the
switch ports are initialized, leading to a name collision (error -17 = EEXIST).

This patch follows #17062 by using openwrt,netdev-name to fix the collision.

Signed-off-by: J. S. Seldenthuis <jseldenthuis@lely.com>
Link: https://github.com/openwrt/openwrt/pull/18082
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:26:20 +01:00
Jack Sun
4b650dd39f nettle: update to 3.10.1
refresh path:100-portability.patch
Announcement:https://lists.gnu.org/archive/html/info-gnu/2024-12/msg00008.html

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17824
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:21:14 +01:00
Rosen Penev
148f82ad45 ipq806x: use nvmem for wifi mac
Userspace handling is deprecated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16229
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:19:46 +01:00
Til Kaiser
86a691cd25 x86: add Supermicro SuperServer E302-9D
This adds a default network configuration for the
Supermicro SuperServer SYS-E302-9D by adding all
onboard network ports to the default `lan` interface.

The network ports `eth0` till `eth3` use the `igb`
driver, whereas `eth4` till `eth7` use `i40e`.

--- Hardware Highlights ---
CPU: Intel Xeon D-2123IT, 2.20GHz, 4 cores
RAM: Up to 256GB in 4 DIMM Slots
Ports: 4x 1GbE, 2x 10GBase-T, 2x 10G SFP+, 1x IPMI 2.0
Video: 1x VGA
USB: 2x 3.0

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/17990
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:14:29 +01:00
Til Kaiser
ad106a350d kernel: modules: reorder i40e, mlx4, and mlx5 load priorities
Sets the boot flag for the i40e network device driver
to load it at a more early stage of the boot process.

With commit 0a47d518df0d758e8d3b31264cb0428d57c362c3,
I added a boot priority for the mlx4 and mlx5 drivers.

Also, increase those priorities because I think they
are too low since there is currently no "room" for
built-in network device drivers.
That can cause interface order, i.e., name inconsistencies,
when Mellanox ConnectX cards are inserted or removed.

Signed-off-by: Til Kaiser <mail@tk154.de>
Link: https://github.com/openwrt/openwrt/pull/17990
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:14:29 +01:00
Lech Perczak
8951ac6f65 ath79: ZTE MF281: use specific board definition file for qca9888
Using board definition file extracted from stock firmware yields 50%
throughput improvement in RX direction under iperf3 test.
Make the device use temporary files from firmware_qca-wireless.git
temporarily, as well as select the specific variant in the device tree
files. The device uses same board file as the MF286C.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:10:05 +01:00
Lech Perczak
5ac6f56dbe ath79: support ZTE MF286C
ZTE MF286 is an indoor LTE category 12 CPE router with simultaneous
dual-band 802.11ac plus 802.11n Wi-Fi radios and quad-port gigabit
Ethernet switch, FXS and external USB 2.0 port.

Software-wise it's compatible with previous MF286A, save for different
5GHz Wi-Fi board definition file, requiring a separate image.

Hardware highlights:
- CPU: QCA9563 SoC at 775MHz,
- RAM: 128MB DDR2,
- NOR Flash: MX25L1606E 2MB SPI Flash, for U-boot only,
- NAND Flash: W25N01GV 128MB SPI NAND-Flash, for all other data,
- Wi-Fi 5GHz: QCA9886 2x2 MIMO 802.11ac Wave2 radio,
- WI-Fi 2.4GHz: QCA9563 3x3 MIMO 802.11n radio,
- Switch: QCA8337v2 4-port gigabit Ethernet, with single SGMII CPU port,
- WWAN: MDM9250-based category 12 internal LTE modem
  in extended  mini-PCIE form factor, with 5 internal antennas and
  2 external antenna connections, single mini-SIM slot.
- FXS: one external ATA port (handled entirely by modem part) with two
  physical connections in parallel,
- USB: Single external USB 2.0 port,
- Switches: power switch, WPS, Wi-Fi and reset buttons,
- LEDs: Wi-Fi, Test (internal). Rest of LEDs (Phone, WWAN, Battery,
  Signal state) handled entirely by modem. 4 link status LEDs handled by
  the switch on the backside.
- Label MAC device: eth0

Internal modem of MF286C is supported via uqmi.

Console connection: connector X2 is the console port, with the following
pinout, starting from pin 1, which is the topmost pin when the board is
upright:
- VCC (3.3V). Do not use unless you need to source power for the
  converer from it.
- TX
- RX
- GND
Default port configuration in U-boot as well as in stock firmware is
115200-8-N-1.

Installation:
Due to different flash layout from stock firmware, sysupgrade from
within stock firmware is impossible, despite it's based on QSDK which
itself is based on OpenWrt.

STEP 0: Stock firmware update:
As installing OpenWrt cuts you off from official firmware updates for
the modem part, it is recommended to update the stock firmware to latest
ath79: support ZTE MF286C

STEP 1: Booting initramfs image:

Method 1: using serial console (RECOMMENDED):
- Have TFTP server running, exposing the OpenWrt initramfs image, and
  set your computer's IP address as 192.168.0.22. This is the default
  expected by U-boot. You may wish to change that, and alter later
  commands accordingly.
- Connect the serial console if you haven't done so already,
- Interrupt boot sequence by pressing any key in U-boot when prompted
- Use the following commands to boot OpenWrt initramfs through TFTP:

  setenv serverip 192.168.0.22
  setenv ipaddr 192.168.0.1
  tftpboot 0x81000000 openwrt-ath79-nand-zte_mf286c-initramfs-kernel.bin
  bootm 0x81000000

  (Replace server IP and router IP as needed). There is no  emergency
  TFTP boot sequence triggered by buttons, contrary to MF283+.
- When OpenWrt initramfs finishes booting, proceed to actual
  installation.

STEP 2: Backing up original software:
As the stock firmware may be customized by the carrier and is not
officially available in the Internet, IT IS IMPERATIVE to back up the
stock firmware, if you ever plan to returning to stock firmware.
It is highly recommended to perform backup using both methods, to avoid
hassle of reassembling firmware images in future, if a restore is
needed.

Method 1: after booting OpenWrt initramfs image via TFTP:
- Connect your USB-UART adapter
- Dump stock firmware located on stock kernel and ubi partitions:

  ssh root@192.168.1.1: cat /dev/mtd9 > mtd3_ubiconcat0.bin
  ssh root@192.168.1.1: cat /dev/mtd4 > mtd4_kernel.bin
  ssh root@192.168.1.1: cat /dev/mtd9 > mtd5_ubiconcat1.bin

And keep them in a safe place, should a restore be needed in future.

Method 2: using stock firmware:
- Connect an external USB drive formatted with FAT or ext4 to the USB
  port.
- The drive will be auto-mounted to /var/usb_disk
- Check the flash layout of the device:

  cat /proc/mtd

  It should show the following:
  mtd0: 000a0000 00010000 "u-boot"
  mtd1: 00020000 00010000 "u-boot-env"
  mtd2: 00140000 00010000 "reserved1"
  mtd3: 000a0000 00020000 "fota-flag"
  mtd4: 00080000 00020000 "art"
  mtd5: 00080000 00020000 "mac"
  mtd6: 000c0000 00020000 "reserved2"
  mtd7: 00400000 00020000 "cfg-param"
  mtd8: 00400000 00020000 "log"
  mtd9: 000a0000 00020000 "oops"
  mtd10: 00500000 00020000 "reserved3"
  mtd11: 00800000 00020000 "web"
  mtd12: 00300000 00020000 "kernel"
  mtd13: 01a00000 00020000 "rootfs"
  mtd14: 01900000 00020000 "data"
  mtd15: 03200000 00020000 "fota"
  mtd16: 01d00000 00020000 "firmware"

  Differences might indicate that this is NOT a MF286C device but
  one of other variants.
- Copy over all MTD partitions, for example by executing the following:

  for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do cat /dev/mtd$i > \
  /var/usb_disk/mtd$i; done

  "Firmware" partition can be skipped, it is a concatenation
  of "kernel" and "rootfs".

- If the count of MTD partitions is different, this might indicate that
  this is not a MF286C device, but one of its other variants.
- (optionally) rename the files according to MTD partition names from
  /proc/mtd
- Unmount the filesystem:

  umount /var/usb_disk; sync

  and then remove the drive.
- Store the files in safe place if you ever plan to return to stock
  firmware. This is especially important, because stock firmware for
  this device is not available officially, and is usually customized by
  the mobile providers.

STEP 3: Actual installation:
- Set your computer IP to 192.168.1.22/24
- scp the sysupgrade image to the device:

  scp -O openwrt-ath79-nand-zte_mf286a-squashfs-sysupgrade.bin \
  root@192.168.1.1:/tmp/

- ssh into the device and execute sysupgrade:

  sysupgrade -n /tmp/openwrt-ath79-nand-zte_mf286a-squashfs-sysupgrade.bin

- Wait for router to reboot to full OpenWrt.

STEP 4: WAN connection establishment
Since the router is equipped with LTE modem as its main WAN interface, it
might be useful to connect to the Internet right away after
installation. To do so, please put the following entries in
/etc/config/network, replacing the specific configuration entries with
one needed for your ISP:

config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option auth '<auth>' # As required, usually 'none'
        option pincode '<pin>' # If required by SIM
        option apn '<apn>' # As required by ISP
        option pdptype '<pdp>' # Typically 'ipv4', or 'ipv4v6' or 'ipv6'

For example, the following works for most polish ISPs
config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
        option auth 'none'
        option apn 'internet'
        option pdptype 'ipv4'

The required minimum is:
config interface 'wan'
        option proto 'qmi'
        option device '/dev/cdc-wdm0'
In this case, the modem will use last configured APN from stock
firmware - this should work out of the box, unless your SIM requires
PIN which can't be switched off.

If you have build with LuCI, installing luci-proto-qmi helps with this
task.

Restoring the stock firmware:

- Boot to initramfs as in step 3:
- Completely detach ubi0 partition using ubidetach /dev/ubi0_0
- Copy over the stock kernel image using scp to /tmp
- Erase kernel and restore stock kernel:
  (scp mtd4_kernel.bin root@192.168.1.1:/tmp/)
  mtd write kernel /tmp/mtd4_kernel.bin
  rm /tmp/mtd4_kernel.bin
- Copy over the stock partition backups one-by-one using scp to /tmp, and
  restore them individually. Otherwise you might run out of space in
  tmpfs:

  (scp -O mtd3_ubiconcat0.bin root@192.168.1.1:/tmp/)

  mtd write ubiconcat0 /tmp/mtd3_ubiconcat0.bin
  rm /tmp/mtd3_ubiconcat0.bin

  (scp -O mtd5_ubiconcat1.bin root@192.168.1.1:/tmp/)

  mtd write ubiconcat1 /tmp/mtd5_ubiconcat1.bin
  rm /tmp/mtd5_ubiconcat1.bin

- If the write was correct, force a device reboot with

  reboot -f

Quirks and known issues
- It was observed, that CH340-based USB-UART converters output garbage
  during U-boot phase of system boot. At least CP2102 is known to work
  properly.
- Kernel partition size is increased to 4MB compared to stock 3MB, to
  accomodate future kernel updates - at this moment OpenWrt 5.10 kernel
  image is at 2.5MB which is dangerously close to the limit. This has no
  effect on booting the system - but keep that in mind when reassembling
  an image to restore stock firmware.
- uqmi seems to be unable to change APN manually, so please use the one
  you used before in stock firmware first. If you need to change it,
  please use protocok '3g' to establish connection once, or use the
  following command to change APN (and optionally IP type) manually:
  echo -ne 'AT+CGDCONT=1,"IP","<apn>' > /dev/ttyUSB0
- The only usable LED as a "system LED" is the blue debug LED hidden
  inside the case. All other LEDs are controlled by modem, on which the
  router part has some influence only on Wi-Fi LED.
- GPIO5 used for modem reset is a suicide switch, causing a hardware
  reset of whole board, not only the modem. It is attached to
  gpio-restart driver, to restart the modem on reboot as well, to ensure
  QMI connectivity after reboot, which tends to fail otherwise.
- Modem, as in MF283+, exposes root shell over ADB - while not needed
  for OpenWrt operation at all - have fun lurking around.
  The same modem module is used as in older MF286.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:10:04 +01:00
Lech Perczak
b60d241f2d ath79: ZTE MF286A: use specific board definition file for qca9888
Using board definition file extracted from stock firmware yields 50%
throughput improvement in RX direction under iperf3 test.
Make the device use temporary files from firmware_qca-wireless.git
temporarily, as well as select the specific variant in the device tree
files.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:09:20 +01:00
Lech Perczak
4990ce613b ipq-wifi: update to 2024-02-17
Changes included in this release:
* qca9888: add ZTE MF286C BDF
* qca9888: add ZTE MF28A/R BDF

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17620
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 22:06:53 +01:00
Chukun Pan
3a1bc14733 generic: silence led set_brightness error message
Currently, if the phy driver does not implement the led_brightness_set
function, setting the LED will result in the following error message:

leds mdio-bus:*:green:lan: Setting an LED's brightness failed (-524)

Backport a patch to silence this error message.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/18080
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 19:50:21 +01:00
Mikhail Zhilkin
043df82cea mediatek: Xiaomi AX3000t: enable SPI calibration
Xiaomi enabled SPI calibration in new firmware:
- 1.0.84 and newer (rd03 model)
- 1.0.76 and newer (rd23 model)

This enables SPI calibration routines in OpenWrt too.

Tested-by: Aleksandr Danilov <sc16me@gmail.com>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17976
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 19:21:49 +01:00
Andrew LaMarche
054b870196 generic: import rtl8261n patches from mediatek
RTL8261N is used on some Airoha and Realtek devices. Move the driver
from Mediatek to generic so it can be used everywhere.

Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18163
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 19:05:56 +01:00
Simon Etzlstorfer
06142cc1e7 ramips: mt7621: add support for Maginon MC-1200AC
This commit adds support for Maginon MC-1200AC.

Hardware specifications:

SoC: MediaTek MT7621
Flash: 16 MB SPI Flash
RAM: 128 MB RAM
Ethernet:
2x 1G RJ45 ports
WLAN:
2.4GHz: MediaTek MT7603E
5GHz: MediaTek MT7613BE
LEDs: Red and blue status lights
Power: 12V DC
UART: 3.3V, 115200 baud, 8N1, like printed on silkscreen (GND,TX,RX,3.3V)

MAC addresses
-------------
+---------+-------------------+
|         | MAC example       |
+---------+-------------------+
| LAN     | 80:3F:5D:xx:xx:72 |
| WAN     | 80:3F:5D:xx:xx:73 |
| WLAN 2g | 80:3F:5D:xx:xx:74 |
| WLAN 5g | 80:3F:5D:xx:xx:75 |
+---------+-------------------+

Installation:

The firmware can be flashed via the U-Boot recovery web interface.
To access it, hold the reset button while powering on the device.
U-Boot recovery web interface is then avaiable at 192.168.10.1.

Alternatively, the image can be loaded using the U-Boot serial interface and TFTP.

Signed-off-by: Simon Etzlstorfer <simon@etzi.at>
Link: https://github.com/openwrt/openwrt/pull/17671
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-16 18:24:08 +01:00
Álvaro Fernández Rojas
1f20752be0 bcm27xx: refresh kernel configs
Refresh kernel config for all bcm27xx subtargets.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-03-16 15:48:10 +01:00
Álvaro Fernández Rojas
7a1fe3fa8e selinux-policy: fix PKG_MIRROR_HASH after update to v2.6
PKG_MIRROR_HASH is incorrect and fails the download from mirrors.

Fixes: 0aaabffdea2c ("selinux-policy: update to version v2.6")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-03-16 08:29:16 +01:00
Álvaro Fernández Rojas
251f76c1c6 bcm27xx: pull 6.6 patches from RPi repo
Adds latest 6.6 patches from the Raspberry Pi repository.

These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.6.y/
With the following command:
git format-patch -N v6.6.83..HEAD
(HEAD -> 08d4e8f52256bd422d8a1f876411603f627d0a82)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-03-16 08:04:48 +01:00
Álvaro Fernández Rojas
6403c2890c bcm27xx-utils: update to latest version
Full changelog: 0c02957911...685afa8c0d

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-03-16 08:03:28 +01:00
Álvaro Fernández Rojas
2804cfe553 bcm27xx-gpu-fw: update to v1.20250305
Full changelog: https://github.com/raspberrypi/firmware/compare/1.20241126...1.20250305

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-03-15 18:28:15 +01:00
Dominick Grift
0aaabffdea selinux-policy: update to version v2.6
Changes since v2.1:

1228b1d README
8cd7a4a wireguard/netifd loose ends
d26ed92 file_contexts.subs_dist
b756046 tmux and htop rules
dcb983a various
2c03fd4 conf.cil: netlink_xperm
ee8d6d3 blkid
fdfc313 (tag: v2.5) dnsmasq
b66a3d2 do_stage2 related
5e13212 more do_stage2 related
c5bea19 absolute paths
84ed620 various hacks
6b43706 (tag: v2.4) mtdstordev nand
9c6bfe5 mtdstordev: nand install
2e1c55a mtdblock supposedly for nor
58dd1bc blockd
633f99e pciutils
99e82ec README
e7e65f2 ethtool
426537f lspci
becac0d lspci
8418000 surpress leaks
a892349 hotplugcall
4daddc6 f2fstools
385feb7 pciutils rules
295e128 lspci and picocom skels
d2088a6 netifd and ipcalc
c7f123e adds uqmi sysagent
aeb416e hotplugcall and adds cdc serial
35b5afd rpcd
6eb727d ucode and netifd
d299acd blkid and modem serial
1c3cc50 adds pstore nodedev
4503902 showed up on bpi r4 (boot from sd)
d0dba85 (tag: v2.3) sandbox
647777f sandbox
6b10e8a sandbox
d276333 sandbox
3e1e232 sandbox
aa5cc92 sandbox
f02a0a6 sandbox
ddc2c12 sandbox
2242c9e sandbox
e763f2d sandbox
cb1239a sandbox
449ad9a sandbox
1ec532b sandbox
6cef851 sandbox
b8b5522 sandbox
95f0bb6 sandbox
2bf87a9 (tag: v2.2) sandbox stordev
74bf2e3 README
5f1640c silenced.type loose ends
a80682a README
5664b1a uci: /tmp/run/uci overrides
73c4e6a sandbox
de9a088 sandbox
8c51986 sandbox
0fe32da sandbox
68e376b sandbox
fe59dfa sandbox
5d16966 sandbox
cf9a186 adds sandbox domain
77bd3a4 adds silenced.type
ff3ff8f README
73e3be8 dnsmasq: /etc/dnsmasq.hosts
2b3491c Revert "adds tmux"
9fe54dd adds tmux
bc34b62 misc.cil be a bit more specific because usually dos is not supported
26a4784 sshsftpserver: gets attributes of fs
9510bc0 rename vdstordev and blockmount transition
13960b4 cgiscript agent: anon_subj_type_transition
e69687f README fixes
a2bca07 README updates
0cc10ff vdastordev: adds one more partition
3867574 blkid adds alternative --cache-file
009b441 blkid run file
f9b75d0 README: adds blkid to baseline

Run-tested: mediatek-filogic-bananapi_bpi-r4
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
2025-03-15 15:13:20 +00:00
Hauke Mehrtens
abd0418684 kernel: Activate CONFIG_NET_SWITCHDEV in generic config
The CONFIG_NET_SWITCHDEV option is needed by CONFIG_DSA and some other
options. It is boolean, we have to compile it into the kernel it self.
Activate it for all targets in the generic configuration, it is already
activated for most of them. This allows to install DSA drivers as a
module.

On the ramips/mt7620 target the kernel would grown by 4.5kB.

For some small targets which do not support a DSA switch by default the
option is deactivated.

Link: https://github.com/openwrt/openwrt/pull/17668
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:54:59 +01:00
Aleksander Jan Bajkowski
a18d95f35b lantiq-gphy-firmware: add package
This has several advantages:
* reduction in the size of the kernel and the complete image. Individual
devices only need two of the four binaries. In combination with the second
commit it reduces kernel size by 64.2 kB and image size by 22.8 kB,
* the option to extend this package with firmware for future SoCs,
* combining the kernel and binary blobs with another licence may not be
fully compatible with the licence used by Linux. The current PHY firmware
is built into the kernel. This comit converts it to a package.

Tested on AVM 5490 and BT Home Hub 5A.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/17669
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:52:40 +01:00
Aleksander Jan Bajkowski
62bf028732 lantiq: xrx200: convert switch driver to package
The next commit converts the firmware used by this driver
to a package. Due to the fact that the driver is shipped
as a package the firmware is already available.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/17669
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:52:40 +01:00
Boyang Sun
f4ba980f15 mediatek: Update mt7622-reyee-ax3200-e5.dts
fixed wrong reg.
The original commit assumed the size part was the end of the reg.

Fixes: 7dbac3433fef ("mediatek: add support for reyee AX3200-E5")
Signed-off-by: Boyang Sun <boyinthesun@163.com>
Link: https://github.com/openwrt/openwrt/pull/18074
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:48:00 +01:00
Thomas Richard
8c3a43be27 optee-os.mk: override default PATH to not use hostpkg python
In some cases hostpkg python from packages feed is used (hostpkg has higher
priority in PATH) which causes build failure (cryptography module is
missing). So override PATH to not use hostpkg python.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18102
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:43:14 +01:00
Eric Schäfer
f3eca7cbc1 ramips: add support for Zyxel LTE7490-M904
The Zyxel LTE7490-M904 is an 802.3at PoE powered LTE outdoor (IP68) CPE
with integrated directional antennas.

Specifications:

- SoC: MediaTek MT7621AT
- RAM: 256 MB
- Flash: 128 MB MB NAND (MX30LF1G18AC)
- WiFi: MediaTek MT7603E 802.11b/g/n
- Switch: 1 LAN port (1 Gbps)
- LTE/3G/2G: Quectel EG18-EA LTE-A Cat. 18 connected by USB3 to SoC
- SIM: 1 micro-SIM slots under transparent cover
- Buttons: Reset, WLAN under same cover
- LEDs: Multicolour green/red/amber under same cover (visible)
- Power: 802.3at PoE via LAN port

The device is built as an outdoor ethernet to LTE bridge or router.
The wifi interface is intended for installation and/or temporary
management purposes only.

UART Serial:

57600N1, located on populated 5 pin header J5:

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

Remove the SIM/button/LED cover and 12 screws holding the back plate
and antenna cover together. Be careful with the cables.

Installation from OEM web GUI:

- Log in as "admin" on OEM web GUI
- Upload OpenWrt initramfs-recovery.bin image on the
  Maintenance -> Firmware page
- Wait for OpenWrt to boot and ssh to root@192.168.1.1
- Sysupgrade to the OpenWrt sysupgrade image and reboot

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

Main porting work done by Ernesto Castellotti <ernesto@castellotti.net>:
bf1c12f68b (ramips: add support for ZyXEL LTE7490-M904, 2023-12-20)

Signed-off-by: Eric Schäfer <eric@es86.de>
Link: https://github.com/openwrt/openwrt/pull/17485
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:39:41 +01:00
Roy H
3961b71776 ath79: add support for Longdata APS256
Forum discussion : https://forum.openwrt.org/t/aps-256va-help-for-identification/143653/52

Specification:
Power: 12-36V input via 5,5/2,1 DC barrel jack, or 5V Micro USB-B
CPU: Atheros AR9344 rev 2
RAM: 128MB
Flash: 16MB
WI-Fi: 2.4GHz
Fast Ethernet: 1 WAN and 2 LAN
USB: 2 x USB-A, 1 x micro-USB-B (for power input)
WWAN: 3G modem via extended mini-PCIE form factor (can be replaced with Wifi 5GHz card)

The device come with custom openwrt BB an CC.

Because of limited LAN port, I disable GMAC0, so the WAN port can be connected to GMAC1 and function as LAN port as well.

Enable ssh access and Backup:

1.  open router admin page via LAN cable
2.  browse 192.168.111.1:8000
3.  login with password 123456
4.  click wifi icon on top menu
5.  change the path at the end of the url (after random hash) with /admin/system/flashops
        it will looks like this:
        http://192.168.111.1:8000/cgi-bin/luci/;stok=29698152cf64c980177a04f86c99ea0d/admin/system/flashops
        (the hash after "stok=" will be different)
6.  restore the config with this modified backup (can be created manually by changing dropbear config to allow ssh)
        https://drive.google.com/file/d/1Vs-k7DHBSRZFfkxv1cMOmgAPZfB-RUen/view?usp=sharing
7.  now you can login to ssh with root user and 123456 password, and backup all partition and upgrade firmware

!!! BACKUP EVERY PARTITION !!!

Flashing instructions:
- Flash directly from factory web interface accessed from "Enable ssh access" step 5

Signed-off-by: Roy H <roy@altbytes.com>
Link: https://github.com/openwrt/openwrt/pull/17939
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 13:35:41 +01:00
Robert Marko
a178d8966f Revert "tools/coreutils: update to 9.6"
This reverts commit 160e0b7ad866c9f52b81d95588c7b0a40cffd109.

It seems that this was not tested on MacOS and will fail to compile,
so revert it until a proper update is done.

Fixes: 160e0b7ad866 ("tools/coreutils: update to 9.6")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-15 13:07:33 +01:00
Robert Marko
e41247ca21 Revert "tools/coreutils: fix wrong PKG_HASH after update to version 9.6"
This reverts commit c2a58fe875ff04ce956c7da8f42412053bfc7597.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-15 13:07:29 +01:00
Shiji Yang
3d8d807373 uboot-mediatek: move custom uart config symbol to board defconfigs
This helps to solve the issue of waiting for "SERIAL_RX_BUFFER_SIZE"
input when enabling verbose log output option (V=s).

Fixes: https://github.com/openwrt/openwrt/issues/18036
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/18043
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-15 12:50:57 +01:00
Roland Reinl
c13a050d5a ramips: Add support for Cudy M1200 v1
The M1200 v1 is similar to the TR1200 series from Cudy. Differences:
- Only 1 LAN port
- No USB

Specifications:
- MT7628
- MT7628AN (2.4G b/g/n) and MT7613BE (5G ac/n) wifi
- 128 MB RAM
- 16 MB flash

MAC Addresses:
- There is one on the label, e.g. xx:xx:xx:xx:xx:A4
- LAN (bottom connector) is the same as the label, e.g. xx:xx:xx:xx:xx:A4
- WAN (top connector) is label + 1, e.g. xx:xx:xx:xx:xx:A5
- WLAN (2.4G) is the same as the label, e.g. xx:xx:xx:xx:xx:A4
- WLAN (5G) is label + 2, e.g. xx:xx:xx:xx:xx:A6

UART:
- is available via the pin holes on the board
- The pinout is printed to the board: P: VCC, G: GND, R: RX, T:TX
- RX and TX require solder bridges to be installed
- Do NOT connect VCC
- Settings: 3.3V, 115200, 8N1

GPIO:
- There are two LEDs: Red (GPIO 4) and White (GPIO 0)
- There are two buttons: Reset (GPIO 11) and WPS (GPIO 5)

Migration to OpenWrt:
- Download the migration image from the Cudy website (it should be available as soon as OpenWrt officially supports the device)
- Connect computer to LAN (bottom connector) and flash the migration image via OEM web interface
- OpenWrt is now accessible via 192.168.1.1

Revert back to OEM firmware:
- Set up a TFTP server on IP 192.168.1.88 and connect to the WAN port (upper port)
- Provide the Cudy firmware as recovery.bin in the TFTP server
- Press the reset button while powering on the device
- Recovery process is started now
- When recovery process is done, OEM firmware is accessible via 192.168.10.1 again

General information:
- No possibility to load a initramfs image via U-Boot because there is no option to interrupt U-Boot

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18233
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:54:32 +01:00
Shiji Yang
4efb4a26d2 stm32: modules: fix stm32-hash package build
* Remove misplaced backslash to fix the build warning:

WARNING: can't parse line: FILES:=/drivers/crypto/stm32/stm32-hash.ko

* Add missing dependency package kmod-crypto-engine:

Package kmod-stm32-hash is missing dependencies for the following libraries:
crypto_engine.ko

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/18241
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:44:30 +01:00
Michel Lespinasse
effcb6e4c3 kernel: load r8169 network module at boot time
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.

(This was a real problem I encountered with a nanopi R6S device and
an external rtl8152 usb3 network controller - the USB controller would
claim the eth1 name, causing much confusion).

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:37:59 +01:00
Michel Lespinasse
59215154a0 rockchip: set network IRQ affinity to fast CPU cores
The nanopi R6S, R6C and nanopc T6 platforms are based on rk3588(s) SoC,
which has fast and slow CPU cores. Set up network interrupt affinity to be
on the fast CPU cores by default. This is similar to the way this was
already configured on nanopi R4S.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:37:59 +01:00
Michel Lespinasse
2e7d060fd1 rockchip: configure reset button on nanopi R6
Set up openwrt to handle the reset button appropriately (so that it
can trigger the various recovery modes) on the nanopi R6S and R6C models.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:37:59 +01:00
Michel Lespinasse
de9ad11dac rockchip: show boot stages on nanopi R6 system LED
Set up openwrt to show boot progress on the nanopi R6S or R6C system LED.

The LED blinking states indicate the boot stage. The LED is defined as
a power LED, but can still be set to heartbeat in /etc/config/system
after the system is done booting.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:37:59 +01:00
John Audia
748682e855 kernel: bump 6.6 to 6.6.83
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.83

Removed upstreamed:
	bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch[1]

Manually rebased:
	bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch
	bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
	bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch

All other patches automatically rebased.

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/host/xhci-pci.c?h=linux-6.6.y&id=c401b1b4b835d66792e884b76264d742a20d931d

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

Signed-off-by: John Audia <therealgraysky@proton.me>
[fixed issues with bcm27xx patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-03-15 10:25:57 +01:00
Mieczyslaw Nalewaj
bdd5587b6b generic: rename backport patch 852
Rename 852-stable-bus-mhi-host-pci_generic-constify-modem_telit_fn980_.patch
to 852-v6.9-stable-bus-mhi-host-pci_generic-constify-modem_telit_fn980.patch
because it is used since kernel 6.9-rc1 (https://lore.kernel.org/lkml/Zfwv2y7P7BneKqMZ@kroah.com/).

Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.9.y&id=2ec11b5d6d900b17c7d001fbee4751fd2aa58917
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18237
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:22:22 +01:00
Petr Štetiar
c2a58fe875
tools/coreutils: fix wrong PKG_HASH after update to version 9.6
Currently macOS builds are failing due to hash mismatch. Lets fix it by
using proper hash:

 Here are the SHA1 and SHA256 checksums:

   File: coreutils-9.6.tar.gz
   SHA1 sum:   1da82e96486e0eedbd5257c8190f2cf9fcb71c2e
   SHA256 sum: 2bec616375002c92c1ed5ead32a092b174fe44c14bc736d32e5961053b821d84

References: https://lists.gnu.org/archive/html/coreutils/2025-01/msg00049.html
Fixes: 160e0b7ad866 ("tools/coreutils: update to 9.6")
Reported-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2025-03-15 09:21:12 +00:00
Mauri Sandberg
a53417cc30 ramips: Cleanup Genexis EX400 upgrade script
The code can be made more efficient by not extracting the sysupgrade.tar but
rather just querying for the filesize within the archive. Resorting to
manual update of UBI volume is extra work too, setting CI_KERNPART=rootfs_0
is enough.

Suggested-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Signed-off-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Link: https://github.com/openwrt/openwrt/pull/17806
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:18:50 +01:00
John Audia
f4801cffc3 firmware: intel-microcode: update to 20250211
Debian Changelogs from 20240531:

 local access.
    - Mitigations for INTEL-SA-01079 (CVE-2024-23918)
      Potential security vulnerabilities in some Intel Xeon processors
      using Intel SGX may allow escalation of privilege.  Intel disclosed
      that some processor models were already fixed by a previous
      microcode update.
    - Updated mitigations for INTEL-SA-01097 (CVE-2024-24968)
      Improper finite state machines (FSMs) in hardware logic in some
      Intel Processors may allow an privileged user to potentially enable a
      denial of service via local access.
    - Mitigations for INTEL-SA-01103 (CVE-2024-23984)
      A potential security vulnerability in the Running Average Power Limit
      (RAPL) interface for some Intel Processors may allow information
      disclosure.  Added mitigations for more processor models.
  * Updated Microcodes:
    sig 0x000806f8, pf_mask 0x87, 2024-06-20, rev 0x2b000603, size 588800
    sig 0x000806f7, pf_mask 0x87, 2024-06-20, rev 0x2b000603
    sig 0x000806f6, pf_mask 0x87, 2024-06-20, rev 0x2b000603
    sig 0x000806f5, pf_mask 0x87, 2024-06-20, rev 0x2b000603
    sig 0x000806f4, pf_mask 0x87, 2024-06-20, rev 0x2b000603
    sig 0x00090672, pf_mask 0x07, 2024-05-29, rev 0x0037, size 224256
    sig 0x00090675, pf_mask 0x07, 2024-05-29, rev 0x0037
    sig 0x000b06f2, pf_mask 0x07, 2024-05-29, rev 0x0037
    sig 0x000b06f5, pf_mask 0x07, 2024-05-29, rev 0x0037
    sig 0x000906a3, pf_mask 0x80, 2024-06-03, rev 0x0435, size 223232
    sig 0x000906a4, pf_mask 0x80, 2024-06-03, rev 0x0435
    sig 0x000a06a4, pf_mask 0xe6, 2024-08-02, rev 0x0020, size 138240
    sig 0x000b06a2, pf_mask 0xe0, 2024-05-29, rev 0x4123, size 220160
    sig 0x000b06a3, pf_mask 0xe0, 2024-05-29, rev 0x4123
    sig 0x000b06a8, pf_mask 0xe0, 2024-05-29, rev 0x4123
    sig 0x000c06f2, pf_mask 0x87, 2024-06-20, rev 0x21000283, size 560128
    sig 0x000c06f1, pf_mask 0x87, 2024-06-20, rev 0x21000283
  * source: update symlinks to reflect id of the latest release, 20241112
  * Update changelog for 3.20240910.1 and 3.20240813.1 with new information:
    INTEL-SA-1103 was addressed by 3.20240813.1 for some processor models,
    and not by 3.20240910. INTEL-SA-1079 was addressed by 3.20240910.1 for
    some processor models.

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Thu, 14 Nov 2024 15:37:40 -0300

intel-microcode (3.20241029.1) UNRELEASED; urgency=medium

  * New upstream microcode datafile 20241029
    - Not relevant for operating system microcode updates
    - Only when loaded from firmware, this update fixes the critical,
      potentially hardware-damaging errata RPL061: Incorrect Internal
      Voltage Request on Raptor Lake (Core 13th/14th gen) Intel
      processors.
  * Updated Microcodes:
    sig 0x000b0671, pf_mask 0x32, 2024-08-29, rev 0x012b, size 211968

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Thu, 14 Nov 2024 14:49:03 -0300

intel-microcode (3.20240910.1) unstable; urgency=medium

  * New upstream microcode datafile 20240910 (closes: #1081363)
    - Mitigations for INTEL-SA-01097 (CVE-2024-24968)
      Improper finite state machines (FSMs) in hardware logic in some
      Intel Processors may allow an privileged user to potentially enable a
      denial of service via local access.
    - Fixes for unspecified functional issues on several processor models
    - The processor voltage limit issue on Core 13rd/14th gen REQUIRES A
      FIRMWARE UPDATE.  It is present in this release for sig 0xb0671, but
      THE VOLTAGE ISSUE FIX ONLY WORKS WHEN THE MICROCODE UPDATE IS LOADED
      THROUGH THE FIT TABLE IN FIRMWARE.  Contact your system vendor for a
      firmware update that includes the appropriate microcode update for
      your processor.
  * Updated Microcodes:
    sig 0x00090672, pf_mask 0x07, 2024-02-22, rev 0x0036, size 224256
    sig 0x00090675, pf_mask 0x07, 2024-02-22, rev 0x0036
    sig 0x000b06f2, pf_mask 0x07, 2024-02-22, rev 0x0036
    sig 0x000b06f5, pf_mask 0x07, 2024-02-22, rev 0x0036
    sig 0x000906a3, pf_mask 0x80, 2024-02-22, rev 0x0434, size 222208
    sig 0x000906a4, pf_mask 0x80, 2024-02-22, rev 0x0434
    sig 0x000a06a4, pf_mask 0xe6, 2024-06-17, rev 0x001f, size 137216
    sig 0x000b0671, pf_mask 0x32, 2024-07-18, rev 0x0129, size 215040
    sig 0x000b06a2, pf_mask 0xe0, 2024-02-22, rev 0x4122, size 220160
    sig 0x000b06a3, pf_mask 0xe0, 2024-02-22, rev 0x4122
    sig 0x000b06a8, pf_mask 0xe0, 2024-02-22, rev 0x4122
    sig 0x000b06e0, pf_mask 0x19, 2024-03-25, rev 0x001a, size 138240
  * Update changelog for 3.20240813.1 with new information
  * Update changelog for 3.20240514.1 with new information
  * source: update symlinks to reflect id of the latest release, 20240910

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Sat, 21 Sep 2024 16:40:07 -0300

intel-microcode (3.20240813.2) unstable; urgency=high

  * Merge changes from intel-microcode/3.20240531.1+nmu1, which were left out
    from 3.20240813.1 by an oversight, regressing merged-usr. Closes: #1060200

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Sat, 17 Aug 2024 11:31:32 -0300

intel-microcode (3.20240813.1) unstable; urgency=medium

  * New upstream microcode datafile 20240813 (closes: #1078742)
    - Mitigations for INTEL-SA-01083 (CVE-2024-24853)
      Incorrect behavior order in transition between executive monitor and SMI
      transfer monitor (STM) in some Intel Processors may allow a privileged
      user to potentially enable escalation of privilege via local access.
    - Mitigations for INTEL-SA-01118 (CVE-2024-25939)
      Mirrored regions with different values in 3rd Generation Intel Xeon
      Scalable Processors may allow a privileged user to potentially enable
      denial of service via local access.
    - Mitigations for INTEL-SA-01100 (CVE-2024-24980)
      Protection mechanism failure in some 3rd, 4th, and 5th Generation Intel
      Xeon Processors may allow a privileged user to potentially enable
      escalation of privilege via local access.
    - Mitigations for INTEL-SA-01038 (CVE-2023-42667)
      Improper isolation in the Intel Core Ultra Processor stream cache
      mechanism may allow an authenticated user to potentially enable
      escalation of privilege via local access.  Intel disclosed that some
      processor models were already fixed by the previous microcode update.
    - Mitigations for INTEL-SA-01046 (CVE-2023-49141)
      Improper isolation in some Intel Processors stream cache mechanism may
      allow an authenticated user to potentially enable escalation of
      privilege via local access.  Intel disclosed that some processor models
      were already fixed by the previous microcode update.
    - Mitigations for INTEL-SA-01079 (CVE-2024-23918)
      Potential security vulnerabilities in some Intel Xeon processors
      using Intel SGX may allow escalation of privilege.  Intel released this
      information during the full disclosure for the 20241112 update.
      Processor signatures 0x606a6 and 0x606c1.
    - Mitigations for INTEL-SA-01103 (CVE-2024-23984)
      A potential security vulnerability in the Running Average Power Limit
      (RAPL) interface for some Intel Processors may allow information
      disclosure. Intel released this information during the full disclosure
      for the 20240910 update.  Processor signatures 0x5065b, 0x606a6,
      0x606c1.
    - Fix for unspecified functional issues on several processor models
    - Fix for errata TGL068/ADL075/ICL088/... "Processor may hang during a
      microcode update".  It is not clear which processors were fixed by this
      release, or by one of the microcode updates from 2024-05.
    - Mitigations for INTEL-SA-01213 (CVE-2024-36293)
      Improper access control in the EDECCSSA user leaf function for some
      Intel Processors with Intel SGX may allow an authenticated user to
      potentially enable denial of service via local access.  Intel released
      this information during the full disclosure for the 20250211 update.
      Processor signature 0x906ec (9th Generation Intel Core processor).
  * Updated microcodes:
    sig 0x00050657, pf_mask 0xbf, 2024-03-01, rev 0x5003707, size 39936
    sig 0x0005065b, pf_mask 0xbf, 2024-04-01, rev 0x7002904, size 30720
    sig 0x000606a6, pf_mask 0x87, 2024-04-01, rev 0xd0003e7, size 308224
    sig 0x000606c1, pf_mask 0x10, 2024-04-03, rev 0x10002b0, size 300032
    sig 0x000706e5, pf_mask 0x80, 2024-02-15, rev 0x00c6, size 114688
    sig 0x000806c1, pf_mask 0x80, 2024-02-15, rev 0x00b8, size 112640
    sig 0x000806c2, pf_mask 0xc2, 2024-02-15, rev 0x0038, size 99328
    sig 0x000806d1, pf_mask 0xc2, 2024-02-15, rev 0x0052, size 104448
    sig 0x000806e9, pf_mask 0xc0, 2024-02-01, rev 0x00f6, size 106496
    sig 0x000806e9, pf_mask 0x10, 2024-02-01, rev 0x00f6, size 106496
    sig 0x000806ea, pf_mask 0xc0, 2024-02-01, rev 0x00f6, size 105472
    sig 0x000806eb, pf_mask 0xd0, 2024-02-01, rev 0x00f6, size 106496
    sig 0x000806ec, pf_mask 0x94, 2024-02-05, rev 0x00fc, size 106496
    sig 0x00090661, pf_mask 0x01, 2024-04-05, rev 0x001a, size 20480
    sig 0x000906ea, pf_mask 0x22, 2024-02-01, rev 0x00f8, size 105472
    sig 0x000906eb, pf_mask 0x02, 2024-02-01, rev 0x00f6, size 106496
    sig 0x000906ec, pf_mask 0x22, 2024-02-01, rev 0x00f8, size 106496
    sig 0x000906ed, pf_mask 0x22, 2024-02-05, rev 0x0100, size 106496
    sig 0x000a0652, pf_mask 0x20, 2024-02-01, rev 0x00fc, size 97280
    sig 0x000a0653, pf_mask 0x22, 2024-02-01, rev 0x00fc, size 98304
    sig 0x000a0655, pf_mask 0x22, 2024-02-01, rev 0x00fc, size 97280
    sig 0x000a0660, pf_mask 0x80, 2024-02-01, rev 0x00fe, size 97280
    sig 0x000a0661, pf_mask 0x80, 2024-02-01, rev 0x00fc, size 97280
    sig 0x000a0671, pf_mask 0x02, 2024-03-07, rev 0x0062, size 108544
    sig 0x000a06a4, pf_mask 0xe6, 2024-04-15, rev 0x001e, size 137216
  * source: update symlinks to reflect id of the latest release, 20240813
  * postinst, postrm: switch to dpkg-trigger to run update-initramfs

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Thu, 15 Aug 2024 14:41:50 -0300

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18197
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 10:09:29 +01:00
Daniel Golle
6c8cc86295 mediatek: filogic: openwrt-one: drop kmod-nvme
The OpenWrt One is the only board listing kmod-nvme as part of it's
default package set.

Remove kmod-nvme from the default package set as the board is sold
without an NVMe SSD and the M.2 slot can also be used for other
purposes.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-03-14 11:23:57 +00:00
Felix Fietkau
6ef0f08664 umdns: set triggers and firewall rules on reload
Both depend on the config, so they need to be sent to procd on reload.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-14 10:05:34 +01:00
John Audia
160e0b7ad8 tools/coreutils: update to 9.6
Update to latest stable release

https://lists.gnu.org/archive/html/coreutils/2025-01/msg00049.html

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18191
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-03-13 22:37:45 +01:00
Andreas Gnau
4e3342f5f1 ramips: mt7621: Reduce hardcoded metadata for Inteno Y3 imgs
Instead of hardcoded metadata, put some sensible data instead.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/17551
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 21:33:47 +01:00
Andreas Gnau
3e7337feea ramips: Add support for Genexis / Inteno Pulse EX400
Add support for Genexis Pulse EX400 / Inteno Pulse EX400. A branded
variant for the Finnish ISP DNA has already been added in fea2264d9fdd
(ramips: mt7621: Add DNA Valokuitu Plus EX400, 2023-07-31). This commit
adds support for the generic variants with Inteno and Genexis branding.
Inteno changed its name to Genexis and both brandings exist.

In terms of electronics, there is no difference between the DNA-branded
version and other brandings. LED markings on the case are different,
though. While the DNA-version has a "software-update" LED, the other
versions have a WPS LED. To reduce user confusion, create a separate
image.

Add the different device-tree with the different LED and rename things
to work the same way for both variants.

Specifications:
- Device: Genexis Pulse EX400 / Inteno Pulse EX400
- SoC: MT7621A
- Flash: 256 MB NAND
- RAM: 256 MB
- Ethernet: Built-in, 2 x 1 GbE
- Wifi: MT7603 2.4 GHz 2x2 MIMO, MT7615 5 GHz 4x4 MU-MIMO
- USB: 1x 2.0
- LEDs (GPIO): green/red status, green WPS
- LEDs (SX9512, unsupported): Broadband, Wi-Fi 2.4G, Wi-Fi 5G
- Buttons (GPIO): Reset
- Buttons (SX9512, unsupported): Wi-Fi 2.4G, Wi-Fi 5G, WPS

MAC addresses:
- LAN:     U-Boot 'ethaddr' (label)
- WAN:     label + 1
- 2.4 GHz: label + 6
- 5 GHz:   label + 7

Serial:
 There is a black block connector next to the red ethernet connector. It
 is accessible also through holes in the casing.

Pinout (TTL 3.3V)
 +---+---+
 |Tx |Rx |
 +---+---+
 |Vcc|Gnd|
 +---+---+

Firmware:
 The vendor firmware is a fork of OpenWrt (Reboot) with a kernel version
 4.4.93. The flash is arranged as below and there is a dual boot
 mechanism alternating between rootfs_0 and rootfs_1.

 +-------+------+------+-----------+-----------+
 |       | env1 | env2 | rootfs_0  |  rootfs_1 |
 |       +------+------+-----------+-----------+
 |       |         UBI volumes                 |
 +-------+-------------------------------------+
 |U-Boot |             UBI                     |
 +-------+-------------------------------------+
 |mtd0   |             mtd1                    |
 +-------+-------------------------------------+
 |                     NAND                    |
 +---------------------------------------------+

 In OpenWrt rootfs_0 will be used as a boot partition that will contain the
 kernel and the dtb. The squashfs rootfs and overlay are standard OpenWrt
 behaviour.

 +-------+------+------+-----------+--------+------------+
 |       | env1 | env2 | rootfs_0  | rootfs | rootfs_data|
 |       +------+------+-----------+--------+------------+
 |       |         UBI volumes                           |
 +-------+-----------------------------------------------+
 |U-Boot |             UBI                               |
 +-------+-----------------------------------------------+
 |mtd0   |             mtd1                              |
 +-------+-----------------------------------------------+
 |                     NAND                              |
 +-------------------------------------------------------+

U-boot:
 With proper serial access, booting can be halted to U-boot by pressing
 any key. TFTP and flash writes are available, but only the first one has
 been tested.

 NOTE: Recovery mode can be accessed by holding down the reset button while
 powering on the device. The led 'Update' will show a solid green light
 once ready. A web server will be running at 192.168.1.1:80 and it will
 allow flashing a firmware package. You can cycle between rootfs_0 and
 rootfs_1 by pressing the reset button once.

Root password:
 With the vendor web UI create a backup of your settings and download the
 archive to your computer. Within the archive in the file
 /etc/shadow replace the password hash for root with that of a password you
 know. Restore the configuration with the vendor web UI and you will have
 changed the root password.

SSH access:
 You might need to enable the SSH service for LAN interface as by default
 it's enabled for WAN only.

Installing OpenWrt:
 With the vendor web UI, or from the U-Boot recovery UI, install the
 OpenWrt factory image. Alternatively, ssh to the device and use
 sysupgrade -n from cli.

 Finalize by installing the OpenWrt sysupgrade image to get a fully
 functioning system.

Reverting to the vendor firmware:

 Boot with OpenWrt initramfs image
  - Remove volumes rootfs_0, rootfs and rootfs_data and create vendor
    volumes.

    ubirmvol /dev/ubi0 -n 2
    ubirmvol /dev/ubi0 -n 3
    ubirmvol /dev/ubi0 -n 4
    ubimkvol /dev/ubi0 -N rootfs_0 -S 990
    ubimkvol /dev/ubi0 -N rootfs_1 -S 990

    Power off and enter to the U-boot recovery to install the vendor
    firmware.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/17551
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 21:33:46 +01:00
Andreas Gnau
e8603f3b5a ramips: mt7621: Move common DNA EX400 defs to dtsi
Move common definitions for DNA Valokuitu Plus EX400 to a dtsi include.
This is in preparation of adding the non-branded variant of the device
produced by Genexis / Inteno in the next commit. The device with DNA
branding differs in the LED labling on the device.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/17551
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 21:33:46 +01:00
John Audia
a21ae5cc61 linux-firmware: update to 20250311
git log --no-merges --pretty=oneline --abbrev-commit 20250211...20250311
bdd88e967517 amdgpu: update psp 14.0.0 firmware
c8234f76bdd5 amdgpu: update gc 11.5.0 firmware
cc3227cd4fdb amdgpu: update vcn 4.0.2 firmware
1498f32eb8b7 amdgpu: update psp 13.0.4 firmware
a8bbcfaa3e15 amdgpu: update gc 11.0.1 firmware
645cc116bf8c amdgpu: update navy flounder firmware
5eac1029bb58 amdgpu: update gc 11.5.2 firmware
c5dc6df52b6d amdgpu: update vcn 5.0.0 firmware
8d5a8ed7f731 amdgpu: update smu 14.0.3 firmware
e6827bc2196f amdgpu: update sdma 7.0.1 firmware
44458e4f60b2 amdgpu: update gc 14.0.3 firmware
118bd6c7609c amdgpu: update gc 12.0.1 firmware
16987c25cf66 amdgpu: update sienna cichlid firmware
7ade6230b03a amdgpu: update yellow carp firmware
03d2ad8f27f3 amdgpu: update smu 14.0.2 firmware
eaf44ec2dff9 amdgpu: update psp 14.0.2 firmware
a9e53dc0e853 amdgpu: update gc 12.0.0 firmware
f7654d0634d3 amdgpu: update vega20 firmware
ff0fce9d60e1 amdgpu: update navi14 firmware
052c28862ae1 amdgpu: update vega12 firmware
3ca9ff138536 amdgpu: update vcn 4.0.4 firmware
3402e84bb438 amdgpu: update psp 13.0.7 firmware
1d028a0a7820 amdgpu: update gc 11.0.2 firmware
e58f61a19248 amdgpu: update vega10 firmware
0560dbe09009 amdgpu: update vcn 3.1.2 firmware
b3bcd93cdaa4 amdgpu: update gc 10.3.6 firmware
777f9945d49e amdgpu: update navi10 firmware
204aacb2901c amdgpu: update navi12 firmware
f3f87199f598 amdgpu: update psp 13.0.10 firmware
0833f16ca55a amdgpu: update gc 11.0.3 firmware
598c0af458cb amdgpu: update vangogh firmware
c32b218f2621 amdgpu: update picasso firmware
fcc391f90bec amdgpu: update vcn 4.0.0 firmware
bdd88e967517 amdgpu: update psp 14.0.0 firmware
c8234f76bdd5 amdgpu: update gc 11.5.0 firmware
cc3227cd4fdb amdgpu: update vcn 4.0.2 firmware
1498f32eb8b7 amdgpu: update psp 13.0.4 firmware
a8bbcfaa3e15 amdgpu: update gc 11.0.1 firmware
645cc116bf8c amdgpu: update navy flounder firmware
5eac1029bb58 amdgpu: update gc 11.5.2 firmware
c5dc6df52b6d amdgpu: update vcn 5.0.0 firmware
8d5a8ed7f731 amdgpu: update smu 14.0.3 firmware
e6827bc2196f amdgpu: update sdma 7.0.1 firmware
44458e4f60b2 amdgpu: update gc 14.0.3 firmware
118bd6c7609c amdgpu: update gc 12.0.1 firmware
16987c25cf66 amdgpu: update sienna cichlid firmware
7ade6230b03a amdgpu: update yellow carp firmware
03d2ad8f27f3 amdgpu: update smu 14.0.2 firmware
eaf44ec2dff9 amdgpu: update psp 14.0.2 firmware
a9e53dc0e853 amdgpu: update gc 12.0.0 firmware
f7654d0634d3 amdgpu: update vega20 firmware
ff0fce9d60e1 amdgpu: update navi14 firmware
052c28862ae1 amdgpu: update vega12 firmware
3ca9ff138536 amdgpu: update vcn 4.0.4 firmware
3402e84bb438 amdgpu: update psp 13.0.7 firmware
1d028a0a7820 amdgpu: update gc 11.0.2 firmware
e58f61a19248 amdgpu: update vega10 firmware
0560dbe09009 amdgpu: update vcn 3.1.2 firmware
b3bcd93cdaa4 amdgpu: update gc 10.3.6 firmware
777f9945d49e amdgpu: update navi10 firmware
204aacb2901c amdgpu: update navi12 firmware
f3f87199f598 amdgpu: update psp 13.0.10 firmware
0833f16ca55a amdgpu: update gc 11.0.3 firmware
598c0af458cb amdgpu: update vangogh firmware
c32b218f2621 amdgpu: update picasso firmware
fcc391f90bec amdgpu: update vcn 4.0.0 firmware
bdd88e967517 amdgpu: update psp 14.0.0 firmware
c8234f76bdd5 amdgpu: update gc 11.5.0 firmware
cc3227cd4fdb amdgpu: update vcn 4.0.2 firmware
1498f32eb8b7 amdgpu: update psp 13.0.4 firmware
a8bbcfaa3e15 amdgpu: update gc 11.0.1 firmware
645cc116bf8c amdgpu: update navy flounder firmware
5eac1029bb58 amdgpu: update gc 11.5.2 firmware
c5dc6df52b6d amdgpu: update vcn 5.0.0 firmware
8d5a8ed7f731 amdgpu: update smu 14.0.3 firmware
e6827bc2196f amdgpu: update sdma 7.0.1 firmware
44458e4f60b2 amdgpu: update gc 14.0.3 firmware
118bd6c7609c amdgpu: update gc 12.0.1 firmware
16987c25cf66 amdgpu: update sienna cichlid firmware
7ade6230b03a amdgpu: update yellow carp firmware
03d2ad8f27f3 amdgpu: update smu 14.0.2 firmware
eaf44ec2dff9 amdgpu: update psp 14.0.2 firmware
a9e53dc0e853 amdgpu: update gc 12.0.0 firmware
f7654d0634d3 amdgpu: update vega20 firmware
ff0fce9d60e1 amdgpu: update navi14 firmware
052c28862ae1 amdgpu: update vega12 firmware
3ca9ff138536 amdgpu: update vcn 4.0.4 firmware
3402e84bb438 amdgpu: update psp 13.0.7 firmware
1d028a0a7820 amdgpu: update gc 11.0.2 firmware
e58f61a19248 amdgpu: update vega10 firmware
0560dbe09009 amdgpu: update vcn 3.1.2 firmware
b3bcd93cdaa4 amdgpu: update gc 10.3.6 firmware
777f9945d49e amdgpu: update navi10 firmware
204aacb2901c amdgpu: update navi12 firmware
f3f87199f598 amdgpu: update psp 13.0.10 firmware
0833f16ca55a amdgpu: update gc 11.0.3 firmware
598c0af458cb amdgpu: update vangogh firmware
c32b218f2621 amdgpu: update picasso firmware
fcc391f90bec amdgpu: update vcn 4.0.0 firmware
16dba25cc2a6 amdgpu: update psp 13.0.0 firmware
1921d2321616 amdgpu: update gc 11.0.0 firmware
401fdb179a92 amdgpu: update psp 13.0.14 firmware
9b0c9f217009 amdgpu: update gc 9.4.4 firmware
12f2ea7e1edd amdgpu: update psp 13.0.6 firmware
37dd196c523d amdgpu: update gc 9.4.3 firmware
f04ce74d4960 amdgpu: update beige goby firmware
5f011e04bba5 amdgpu: update gc 10.3.7 firmware
6f8864aecde2 amdgpu: update psp 14.0.1 firmware
ccd76e2f57a1 amdgpu: update gc 11.5.1 firmware
c5710c8a642a amdgpu: update gc 11.0.4 firmware
ff2c4d0706a8 amdgpu: update dimgrey cavefish firmware
6966680eeb7d amdgpu: update aldebaran firmware
ffdb342f8db5 qcom: Update gpu firmwares for qcs8300 chipset
ad16cf3b829f linux-firmware: add firmware for qat_420xx devices
c2c0e64a1b02 amdgpu: DMCUB updates for various ASICs
d2e1085e36fb i915: Update Xe3LPD DMC to v2.20
8b3109069b3b linux-firmware: update firmware for MT7925 WiFi device
ae25a3cb0fd8 mediatek MT7925: update bluetooth firmware to 20250305133215
7a074fed8691 mediatek MT7920: update bluetooth firmware to 20250210151502
d61ca3c53acd linux-firmware: Update firmware file for Intel BlazarU core
9971a5b69745 linux-firmware: Update firmware file for Intel BlazarI core
9b870dde196d intel_vpu: Add firmware for 37xx and 40xx NPUs
f573fa75ee6c QCA: Add Bluetooth firmwares for QCA2066 with USB transport
250b01fdbbda QCA: Add two bluetooth firmware nvm files for QCA2066
ca3ecd432113 QCA: Update Bluetooth QCA2066 firmware to 2.1.0-00653
f5afc67b2d57 QCA: Update Bluetooth WCN685x 2.1 firmware to 2.1.0-00653
675b89218fe1 cirrus: cs35l41: Add firmware and tuning for ASUS Consumer laptops
68fe46cc732f cirrus: cs35l41: Add Firmware for various ASUS Commercial laptops
312effe7857e ASoC: tas2781: Update dsp firmware for Gemtree project
35900e1f24cd xe: Update GUC to v70.40.2 for BMG, LNL
5602c7293e66 amdgpu: DMCUB updates for various ASICs
de78f0aaafb9 amdgpu: DCUB update for DCN401 and DCN315
90e90cd14622 cirrus: cs35l41: Add firmware and tunings for CS35L41 driver for Steam Deck
811bb52b1d29 ath11k: QCN9074 hw1.0: update to WLAN.HK.2.9.0.1-02175-QCAHKSWPL_SILICONZ-2
a4ede19b319e ath11k: QCA6698AQ hw2.1: update to WLAN.HSP.1.1-04604-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1
537891bbcbb2 ath11k: QCA6698AQ hw2.1: update board-2.bin
0a69dcd33a4b rtw89: 8852bt: update fw to v0.29.122.0 and BB parameter to 07
3660cb7665df linux-firmware: Update AMD SEV firmware
15442c631c6b linux-firmware: update firmware for MT7920 WiFi device
2ee90738b79a qca: update WCN3988 firmware
1cc8c1bfa112 amdgpu: Update ISP FW for isp v4.1.1
773611b481e1 qcom: add firmware for Adreno A225
307af4cea232 cirrus: cs35l56: Add and update firmware for Cirrus CS35L56 for two HP laptops
0aad62c61cab cirrus: cs35l56: Add firmware for Cirrus Amps for some ASUS laptops
f2ac3cafdec1 cirrus: cs35l56: Add and update firmware for Cirrus CS35L56 for various Lenovo laptops
50710a3006fa cirrus: cs35l56: Update firmware for Cirrus Amps for some Dell laptops
d88562a09aac linux-firmware: update firmware for en8811h 2.5G ethernet phy
f71241766176 i915: Update Xe3LPD DMC to v2.17
9ea3e5dd4265 ASoC: tas2781: Change regbin firmwares for single device

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18234
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-03-13 20:35:29 +01:00
Felix Fietkau
9a79cdc7ee package: use service_running instead of service_started for ubus config
Fixes issue with loading config after a service crash. Should also improve
startup time.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
Felix Fietkau
3b65496654 procd: update to Git HEAD (2025-03-13)
80187cf5badb service: re-run init script "running" command after instance restart
891094aefcb2 rcS: avoid duplicate pending "running" calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
Felix Fietkau
a46a55b407 cli: fix showing empty lists
Display <none> as value instead of hiding the attribute name

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
Felix Fietkau
ae31c0ddd7 cli: fix removing values when attribute has .get_object set
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
Felix Fietkau
228eb7f62a unetd: cli: fix editing service config attributes
They must be set on the config object instead of the main service object

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-13 11:23:03 +01:00
John Audia
7cf8f61eb2 kernel: bump 6.6 to 6.6.82
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.82

All patches automatically rebased.

Added CONFIG_MICROCODE_INITRD32=y to x86: config-6.6[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.82&id2=v6.6.81

Build system: x86/64
Build-tested: bcm27xx/bcm2712
Run-tested: bcm27xx/bcm2712

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18188
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 00:08:36 +01:00
John Audia
aabc61d93f kernel: bump 6.6 to 6.6.81
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.81

All patches automatically rebased.

For x86, CONFIG_MICROCODE_LATE_FORCE_MINREV was introduced in this bump
with hrecommendation to enable it[1].

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.81&id2=v6.6.80

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18188
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 00:08:36 +01:00
Hauke Mehrtens
8d69613125 armsr: Fix kmod-fsl-dpaa2-net build
The build failed because the CONFIG_FSL_DPAA2_ETH_DCB option was not
set. Activate this option to build the driver with DCB support when it
is available.

Fixes: 40f1db9cb11d ("kernel: Add KERNEL_DCB (Data Center Bridging)")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-12 23:56:09 +01:00
Dávid Benko
939628f6b8 hostapd/RADIUS_server: enhance logging
Currently, logging level of the RADIUS server is a constant corresponding
to the highest verbosity (EXCESSIVE, ALL), but when running as a system
service, the output is discarded.

This commit makes logging verbosity configurable by `log_level` option
and redirects all logs to `logd`. Possible levels are defined in hostap
sources:
https://w1.fi/cgit/hostap/tree/src/utils/wpa_debug.h?id=012a893c469157d5734f6f33953497ea6e3b0169#n23
Their reference is inlined in `radius.config` file.

Default value for logging verbosity is INFO (even if the `-l` flag isn't
specified).

Signed-off-by: Dávid Benko <davidbenko@davidbenko.dev>
Link: https://github.com/openwrt/openwrt/pull/18089
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-12 13:12:12 +01:00
Dávid Benko
dbdd84725d hostapd/RADIUS_server: add config option for IPv6
Even though IPv6 support for hostapd RADIUS server is implemented
(flag `-6`), it's not possible to enable it from configuration.

This commit adds this option and adapts init script.

Signed-off-by: Dávid Benko <davidbenko@davidbenko.dev>
Link: https://github.com/openwrt/openwrt/pull/18089
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-12 13:12:12 +01:00
Martin Schiller
843e50f4fa mediatek: bpi-r4: create additional emmc gpt artifact
This makes it possible to initialize the eMMC from scratch like it is
done for the BPI-R3 mini (without an SD card).

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-12 12:04:08 +01:00
Martin Schiller
bbe58f9830 generic: net: phy: sfp: backport some FS copper SFP fixes
This fixes the handling of some FS copper SFP modules using the RollBall
protocol and needing some extra treatment.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-12 12:01:53 +01:00
Nick Hainke
79aae6ff42 libnl: update to 3.11.0
Changes:
c7edc38f libnl-3.11.0 release
b75e27de lib/route: add support for bridge msti
8a73b245 lib/route: add support for bridge info boolopts
3b284a11 lib/route: extend bridge info support
a43a41cd lib/route: add missing bridge info getter functions
756d5161 lib/route: add missing entry in libnl-route-3.sym file
014c33a6 lib/route: add rtnl_neigh ext flags support
acf572b5 route: add support for getting permanent mac address of link
afafe78a lib/route: extend bridge flags
11597b73 xfrm: remove redundant check in xfrm_sa_update_cache()
2abfb089 xfrm: use the new _nl_auto_nl_object helper
831e9868 cache: use the new _nl_auto_nl_object helper
4b9daa6d add _nl_auto_nl_object helper
379a1405 black: fix "target-version" in "pyproject.toml"
8460c9b7 link/bonding: implement parsing link type
d60535c9 link/bonding: implement comparing bond links
22b6cf5c link/bonding: implement io_clone()
e1c75bff link/bonding: add getters for attributes
ee4612ca link/bonding: rename bn_mask to ce_mask
81c40cbb tests: optimize _nltst_assert_route_list_permutate() to short cut search through permutations
9f5fac78 tests: in _nltst_assert_route_list() accept arbitrary order
01f06b57 base: add _nl_swap() helper macro
5b570259 tests: ensure that there are all expected routes in _nltst_assert_route_list()
1aa16ea9 tests: print route list before failure in _nltst_assert_route_list()
7f099cf0 tests: add _nltst_objects_to_string() helper
e76d5697 tests: add _nltst_malloc0() and _nltst_sprintf() helpers
d94a3e81 tests: move definition of asserts in "tests/nl-test-util.h"
798278ea tests: use _nl_ptrarray_len() helper in _nltst_assert_route_list()
def89a2c base: add _nl_ptrarray_len() helper
64fad14b link: link_msg_parser(): keep link info instead of release and reacquire
b8d3cfb2 lib/attr: add nla functions for variable-length integers
2ae88c48 lib/attr: add NLA_{SINT|UINT} attribute types

Link: https://github.com/openwrt/openwrt/pull/18193
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-03-11 23:57:22 +01:00
Nick Hainke
fe47089878 libxml2: update to 2.13.6
Release Notes:
https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.13.5
https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.13.6

Fixes: CVE-2025-24928 CVE-2024-56171

Link: https://github.com/openwrt/openwrt/pull/18194
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-03-11 23:35:40 +01:00
Rui Salvaterra
371cad4f28 kernel: usb: simplify r8152 dependencies
It doesn't depend on either usb-net or usb-net-cdc-ncm. It does, however, depend
on mii. Fix thusly, and make it depend explicitly on usb, not usb-net.

While at it, add a conditional dependency on libphy, for future kernel versions.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-10 12:39:42 +00:00
Rui Salvaterra
979938b99f kernel: usb: simplify usb-net kconfig
Now that CONFIG_USB_NET_DRIVERS is unconditionally enabled, remove it from the
usb-net kconfig symbol list.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-10 12:39:42 +00:00
Rui Salvaterra
17cfcaa754 generic: enable CONFIG_USB_NET_DRIVERS
This is only relevant for devices with USB support, and in itself changes
nothing in the kernel build. However, it is useful to further simplify the
dependencies of some USB network devices.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-10 12:39:42 +00:00
Rosen Penev
0cdcba238f ramips: use regulator for USB
The DWC2 driver used here supports a vbus-supply property to control
the GPIO. Use it instead of the local gpio,exports solution.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17357
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-10 10:42:13 +01:00
Coia Prant
6a1bdcf545 ramips: add support for Hongdian H8922 v30
This is an industrial 4G router equipped with OpenWrt 14.07 OEM
customized version

WARNING: The original firmware device tree is common to multiple
boards, and the device tree name is H9350. This submitted device
tree is a modified version, which deletes the non-this-device parts
and adds GPIO watchdog.

Specification:
- SoC: MediaTek MT7620A
- Flash: 16 MB
- RAM: 128 MB
- Power: DC 5V-36V 1.5A
- Ethernet: 1x WAN, 4x LAN (10/100 Mbps)
- Wireless radio: 802.11n 2.4g-only
- LED:
  System/Power (RUN): GPIO/26 active-low
  Ethernet: 1x WAN, 4x LAN
  Modem 1: GPIO/66 active-low
  RF 1 (Modem 1 Signal): GPIO/67 active-low
  Modem 2: GPIO 71 active-low
  RF 2 (Modem 2 Signal): GPIO/24 active-low
  WLAN: GPIO/72 active-low
  WPS: GPIO/12 active-low
- Button:
  WPS / RESET: GPIO/34 active-low
- UART: 1x UART on PCB - 115200 8N1
- GPIO Watchdog: GPIO/62 mode=toggle timeout=1s
- PCIe: 2x miniPCIe for modem
- SIM Slots: 2x SIM Slots

Issue:
- No factory partition, eeprom is located
 at /lib/firmware/mt7620a.eeprom

Flash instruction:
Using UART:
1. Configure PC with a static IP address and setup an TFTP server.
2. Put rootfs into the tftp directory.
3. Connect the UART line as described on the PCB.
4. Power up the device and press Ctrl+C to break auto boot.
5. Use `system 6` command and follow the instruction to set device
   and tftp server IP address and input the rootfs file name.
   U-boot will then load the rootfs and write it into
   the flash.
6. Use `system 1` command and follow the instruction to set device
   and tftp server IP address and input the firmware file name.
   U-boot will then load the firmware once.
7. Login to LuCI and use LuCI upgrade firmware.

Original Firmware Dump / More details:
https://blog.gov.cooking/archives/research-hongdian-h8922-and-flash.html

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Tested-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17472
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-10 00:42:44 +01:00
Coia Prant
5d266b55ed mac80211: rt2x00: load the eeprom data from devicetree embedded data on Ralink SoCs
It will allow loading eeprom from eeprom-data embedded in device tree.
Ported from mediatek mt76 wireless driver (drivers/net/wireless/mediatek/mt76/eeprom.c)

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17472
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-10 00:42:44 +01:00
Bernardus Jansen
6da7352ebe ath79: add support for Fortinet FAP-221-C
FCC ID: TVE-121402

Fortinet FAP-221-C is an indoor access point with 1gb ethernet port,
dual-band wireless, internal antenna plates, and 802.3at PoE+.

Hardware and board design are from Senao. The device appears very
similar to the EnGenius EAP1200H, albeit with double the flash and RAM.

**Specifications:**

  - QCA9557 SOC
  - QCA9882 WLAN PCI card, 5 GHz, 2x2, 26dBm
  - AR8035-A PHY RGMII GbE with PoE+ IN
  - 40 MHz clock
  - 32 MB FLASH FL256SAIFR0
  - 2x 128 MB RAM NT5TU64M16HG
  - UART populated
  - 4 internal antenna plates
  - 5 LEDs, 1 button (power, 'warning', eth0, wifi1, wifi2) (reset)

  Amber LAN LED appears hardwired to ethernet port. Power LED is green
only. Other LEDs are amber/green.

**MAC addresses:**

1 MAC Address in flash at end of uboot
ASCII encoded, no delimiters
Labeled as "MAC Address" on case

**Serial Access:**

Pinout: (arrow) VCC GND RX TX

Pins are populated with a header and traces not blocked.
Bootloader is set to 9600 baud, 8 data, 1 stop.

**Console Access:**

Bootloader:

Interrupt boot with Ctrl+C
Press "k" and enter password "1"
OR
Hold reset button for 5 sec during power on
Interrupt the TFTP transfer with Ctrl+C

to print commands available, enter "help"

OEM:

default username is "admin", password blank
telnet is available at default address 192.168.1.2
serial is available with baud 9600

to print commands available, enter "help"
or tab-tab (busybox list of commands)

**Installation:**

Use factory.bin with OEM upgrade procedures
OR
Use initramfs.bin with uboot TFTP commands.
Then perform a sysupgrade with sysupgrade.bin

**TFTP Recovery:**

Using serial console, load initramfs.bin using TFTP
to boot openwrt without touching the flash.

**Return to OEM:**

The best way to return to OEM firmware
is to have a copy of the MTD partitions
before flashing Openwrt.

Backup copies should be made of partitions
"fwconcat0", "loader", and "fwconcat1"
which together is the same flash range
as OEM's "rootfs" and "uimage"
by loading an initramfs.bin
and using LuCI to download the mtdblocks.

It is also possible to extract from the
OEM firmware upgrade image by splitting it up
in parts of lengths that correspond
to the partitions in openwrt
and write them to flash,
after gzip decompression.

After writing to the firmware partitions,
erase the "reserved" partition and reboot.

Signed-off-by: Bernardus Jansen <bernardus@bajansen.nl>
Link: https://github.com/openwrt/openwrt/pull/18109
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-09 19:57:26 +01:00
Eric ZHANG
d136c24f7c
dnsmasq: fix handlers for options filter_rr and cache_rr
According to:
- https://github.com/openwrt/luci/blob/master/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js#L700
- https://github.com/openwrt/luci/blob/master/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js#L402

These two options should be of type `MultiValue` but here there're used as single value. This results in dnsmasq crashes when either of these options are set with multiple values, which leads to an invalid space-separated value.

As these options are designed to take multiple values, I think it's better to use list format eg. `list filter_rr 'AAAA'`, instead of `option filter_rr 'AAAA,HTTPS'`.

See: https://forum.openwrt.org/t/selecting-more-than-one-filter-arbitrary-rr-or-cache-arbitrary-rr-in-v24-10-0-crashes-dnsmasq/225801

Tested on 24.10.0

Signed-off-by: Eric ZHANG <ericzhangjx@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18149
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-03-09 17:26:48 +01:00
Hauke Mehrtens
40f1db9cb1 kernel: Add KERNEL_DCB (Data Center Bridging)
The kmod-mlxsw-spectrum driver activated CONFIG_DCB indirectly already
on all targets which are building this driver. All other DCB capable
driver did not activate their DCB support.

CONFIG_DCB increases the uncompressed kernel size by about 7.8KB.

CONFIG_DCB is only needed some data center Ethernet cards and not used
on normal routers. Activate it only on the x86_64 and the armsr_arm64
target which are used on normal servers or in VMs.

Link: https://github.com/openwrt/openwrt/pull/17672
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-09 17:05:26 +01:00
Roland Reinl
8a78637670 ramips: Add support for Cudy M1300 v2
The M1300 v2 is similar to the WR1300 series from Cudy. Differences:
- Only 1 LAN port
- No USB

Specifications:
- MT7621
- MT7603E (2.4G b/g/n) and MT7613BE (5G ac/n) wifi
- 128 MB RAM
- 16 MB flash

MAC Addresses:
- There is one on the label, e.g. xx:xx:xx:xx:xx:1C
- LAN (bottom connector) is the same as the label, e.g. xx:xx:xx:xx:xx:1C
- WAN (top connector) is label +2, e.g. xx:xx:xx:xx:xx:1E
- WLAN (2.4G) is the same as the label, e.g. xx:xx:xx:xx:xx:1C
- WLAN (5G) is the same as WAN, e.g. xx:xx:xx:xx:xx:1E

UART:
- is available via the pin holes on the board
- From inner to outer pin: TX, RX, GND, VCC
- Do NOT connect VCC
- Settings: 3.3V, 115200, 8N1

GPIO:
- There are two LEDs: Red (GPIO 3) and White (GPIO 4)
- There are two buttons: Reset (GPIO 8) and WPS (GPIO 10)

Migration to OpenWrt:
- Download the migration image from the Cudy website (it should be available as soon as OpenWrt officially supports the device)
- The migration image is also available here until a image is provided by Cudy: https://github.com/RolandoMagico/openwrt-build/releases/tag/M1300_Build_20240222
- File: openwrt-ramips-mt7621-cudy_m1300-v2-squashfs-flash-signed.bin
- Connect computer to LAN (bottom connector) and flash the migration image via OEM web interface
- In the migration image, LAN and WAN are swapped. Computer must be connected to the other port after flashing
- OpenWrt is now accessible via 192.168.1.1
- After flashing an up to date OpenWrt image, LAN and WAN settings are again the same as in the OEM firmware
- So use the other connector again

Revert back to OEM firmware:
- Set up a TFTP server on IP 192.168.1.88 and connect to the LAN port (lower port)
- Provide the Cudy firmware as recovery.bin in the TFTP server
- Press the reset button while powering on the device
- Recovery process is started now
- When recovery process is done, OEM firmware is accessible via 192.168.10.1 again

General information:
- No possibility to load a initramfs image via U-Boot because there is no option to interrupt U-Boot

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18139
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-09 16:51:26 +01:00
Felix Fietkau
84909c62c8 unetd: update to Git HEAD (2025-03-09)
d8b43985e4d7 ubus: fix token_create policy
7326459bd743 ubus: dump service information on network_get
6c9c8fbd8128 service: add @all as alias for all members, unless defined differently

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-09 16:44:14 +01:00
Felix Fietkau
f6a9cce09a cli: fix spurious error when exiting the cli
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-09 10:52:07 +01:00
Felix Fietkau
7f0913d7b1 cli: improve error handling on editor select call
Use common error functions instead of explicit warn() calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-09 10:52:07 +01:00
Aleksander Jan Bajkowski
a2fd837e2e lantiq: xrx200_legacy: migrate ECI V-2FUb/R to upstream PHY LED control
This commit switches the control of the leds connected to the Lantiq PEF7071V
PHY to an upstream solution. There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/18153
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-08 20:26:03 +01:00
Tianling Shen
2091c29578 ramips: fix reading mac address for hiwifi hc5962
The spaces in variables have been stripped since commit 551e04f3c9c0
("base-files: strip space and tab characters from ASCII mac address"),
resulting "Vfac_mac " matches nothing. Fix the issue by removing the
space at end.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18150
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-08 20:12:11 +01:00
Mieczyslaw Nalewaj
a0449f8cf3 ramips: mt7621: 02_network optimization
Merging repeating blocks inside the ramips_setup_interfaces() function.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18146
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-08 16:36:53 +01:00
Tianling Shen
96c6608346 mediatek: add support for CMCC A10
This board is also as known as SuperElectron ZN-M5 and ZN-M8. However,
for ZN-M5 and ZN-M8, there's another version uses ZX279128 as CPU
chip, which is unsupported.
You can check it in "高级设置" > "系统日志" > "内核日志" page from webUI.

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
  Power: DC 12V 1A

Stock layout flash instructions:
Login into webUI and upload sysupgrade firmware in "系统管理" > "升级固件" page.
Remember to unselect "保留配置" ("Keep configurations") first before doing that.

OpenWrt U-Boot layout flash instructions:
1. Flash stock layout firmware first.
2. Connect to the device via SSH, and backup everything,
   especially 'Factory' partition.
3. Unlock MTD partitions:
   apk update && apk add kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
4. Write new BL2 and FIP:
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-preloader.bin BL2
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-bl31-uboot.fip FIP
5. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
6. Serve OpenWrt initramfs image using TFTP server.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18121
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-08 15:44:56 +01:00
Christian Marangi
ea6f3e49d6 generic: globally enable CONFIG_PCPU_DEV_REFCNT
Quoting the kconfig description for CONFIG_PCPU_DEV_REFCNT:

network device refcount are using per cpu variables if this option is
set. This can be forced to N to detect underflows (with a performance
drop).

This was introduced from kernel 5.13 and was wrongly set as disabled.
Some target actually enables it but this should be always enabled unless
refcount needs to be debugged (unlikely for production images)

Enable in generic and drop the entry in every other target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18174
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-08 11:33:56 +01:00
Weikai Kong
213799e33e qualcommax: fap650: fix dtc warnings on partitions
This commit adds the missing properties to address the following warnings:
Warning (reg_format): /soc@0/spi@78b5000/flash@0/partitions/partition@x:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)"

Signed-off-by: Weikai Kong <priv@pppig236.com>
Link: #18180
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-07 14:03:12 +01:00
Jiri Kastner
2f9ef8a256 mvebu/image/cortexa53.mk: add kmod-dsa-mv88e6xxx
all espressobins have topaz switch as same soc, so it is safe to add
kmod-dsa-mv88e6xxx to all

Signed-off-by: Jiri Kastner <cz172638@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18161
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-07 14:01:51 +01:00
Qingfang Deng
edddbaf79c kernel: Mediatek: set default EEE Tx LPI timer
Due to API changes during the backport, the default value of Tx LPI
timer is accidentally left unset, breaking the network if EEE is on.
Set the default timer to 1ms on init, and fix an incorrect condition.

Fixes: d8315d5358d5 ("kernel: backport Mediatek SoC EEE support")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2025-03-07 20:39:13 +08:00
Martin Schiller
6af46a6984 mediatek: filogic: enable CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY
The Cortex-A73 in MediaTek Filogic 880 (MT7988A) is vulnerable to
multiple Spectre variants including Spectre-BHB.

Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-06 20:26:54 +01:00
Martin Schiller
5013efc4f9 mediatek: Refresh kernel configuration
I selected one subtarget after the other and refreshed their
configuration using this command:
  make kernel_oldconfig CONFIG_TARGET=subtarget

For MT7629 I had to re-add CONFIG_LEDS_SMARTRG_LED manually.
Otherwise, building MT7629 with ALL_KMODS we get prompted for
LEDS_SMARTRG_LED and this will break CI and in future buildbot
compilation. See commit 6bdea8c7bd85 ("mediatek: mt7629: 6.6: disable
LEDS_SMARTRG_LED by default") for more details.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2025-03-06 20:26:54 +01:00
Ahmed Naseef
ecd609f509 kernel: usbnet: Restore usb%d naming for cdc-ethernet devices with local MAC
Prior to commit 8a7d12d674,
cdc-ethernet USB LTE modems (e.g. Quectel EC200A) were consistently named
usb0. After 8a7d12d67, devices began renaming to eth1 due to an assumption
that local MAC addresses originate exclusively from the kernel. Some
devices provide driver-assigned local MACs, causing point-to-point
interfaces with driver-set MACs to adopt eth%d names instead of usb%d.

Restore the naming exception for point-to-point devices: interfaces
without driver MACs or with driver-provided local MACs will retain the
usb%d convention. This addresses issues reported in [1] and fixed in [2].

[1] https://lore.kernel.org/all/Z00udyMgW6XnAw6h@atmark-techno.com/
[2] https://lore.kernel.org/all/20241203130457.904325-1-asmadeus@codewreck.org/

Tested-by: Ahmed Naseef <naseefkm@gmail.com>
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17757
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-06 15:49:45 +01:00
Qingfang Deng
d8315d5358 kernel: backport Mediatek SoC EEE support
Backport Mediatek SoC EEE support from net-next upstream.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[refreshed patches]
2025-03-05 20:16:05 +00:00
Daniel Golle
fad94e8cda libpcap: backport support for various DSA tags
Trying to tcpdump DSA conduits results in errors such as
"unsupported DSA tag: mtk".
Backport two commits adding support for various DSA tags to libpcap.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-03-05 19:23:50 +00:00
Felix Fietkau
46c17c22cd hostapd: add missing #ifdef to fix compile error when 802.11be support is disabled
Fixes: d65d546bce36 ("hostapd: add missing ctrl socket initialization on bss add")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 09:19:37 +01:00
Felix Fietkau
4d4e631267 ucode-mod-pkgen: fix refcounting issue
Do not call ucv_get if the reference is transferred without being used
elsewhere

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:25:43 +01:00
Felix Fietkau
12298ca7c4 ucode-mod-uline: fix refcounting errors
Do not call ucv_get if the reference is transferred without being used
elsewhere

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:25:43 +01:00
Felix Fietkau
d65d546bce hostapd: add missing ctrl socket initialization on bss add
Fixes adding/removing individual bss interfaces

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:03:00 +01:00
Matthew Cather
6a10da2934 hostapd: get reference to object before removal
`ucv_array_set` releases the array's reference to the object being cleared.
If this is the last reference to the object, it will be freed, making our
pointer `val` invalid.

To avoid this, we need to obtain our own reference to the object so we
can safely return `val`.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
2025-03-05 08:03:00 +01:00
Matthew Cather
7729f96093 hostapd: consistent reference counting for registry
Since `wpa_ucode_registry_add` collects its own reference to the values added, the
two functions `hostapd_ucode_bss_get_uval` and `hostapd_ucode_iface_get_uval` would
sometimes return a referenced object (from `uc_resource_new`) and sometimes return
an unreferenced object (from `wpa_ucode_registry_get`). Now, both functions always
return a referenced object.

This change also indirectly fixes `hostapd_ucode_bss_get_uval`, ensuring it now
always returns a referenced object.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:03:00 +01:00
Matthew Cather
22eaf18647 hostapd: clean-up references to local variables
Remove extra ucv_get calls when passing a referenced value to an object
without using it further.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-03-05 08:03:00 +01:00
Matthew Cather
f79968ee0f hostapd: fix ucode memory leak with strings
This fixes a common reference counting bug typically along the lines of:
```
uc_value_push(ucv_get(ucv_string_new(...)));
```
This would leave our new string with a reference count of 2, one from
the construction of the string, the other from `ucv_get`. This would
prevent the strings from being correctly cleaned up when it goes out
of scope.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
2025-03-05 08:03:00 +01:00
Christian Marangi
90dee1ab30
airoha: drop MTD Airoha parser patch
Drop Airoha MTD parser patch as a better solution was agreed with a
fixed partition table.

Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> # tested on Quantum W1700k
Link: https://github.com/openwrt/openwrt/pull/18112
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-03-05 00:04:36 +01:00
Christian Marangi
7805100e15
airoha: an7581: cleanup kernel config
Cleanup kernel config and drop all unrelated configs. This have the side
effect of fixing the port not going up automatically due to Bridge VLAN
Filtering disabled.

Link: https://github.com/openwrt/openwrt/pull/18112
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-03-05 00:04:35 +01:00
Cedric CHEDALEUX
9ec32cfb27 scripts/feeds: shallow clone submodules
When a feed has submodules, all its submodules are fully cloned whereas
the feed itself is shallowed. Let's be consistent and perform shallow clones
as well for the submodules.

Signed-off-by: Cedric CHEDALEUX <cedric.chedaleux@orange.com>
Link: https://github.com/openwrt/openwrt/pull/18003
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-04 12:00:19 +01:00
Cedric CHEDALEUX
32d0a57dc1 scripts/feeds: shallow clone for specific commit update
When a feed is referenced with a specific commit (i.e. <git_url>^<sha1>),
a full clone was performed and a branch was created from the sha1
and named with the sha1. Other git clones operations are shallowed.

As Git does not support clone at a specific commit, let's first perform
a shallow clone to latest commit, then fetch the relevant commit and
finally checkout it (no more 'pseudo' branch).

It saves bandwith and significantly speeds up the feed update process.

Signed-off-by: Cedric CHEDALEUX <cedric.chedaleux@orange.com>
Link: https://github.com/openwrt/openwrt/pull/18003
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-04 12:00:19 +01:00
Christian Marangi
47fed9b61b
apk: backport patch fixing broken apk update with wget fetch
APK update is currently broken if wget is used as a tool. This wasn't
correctly tested and cause seg fault. Backport the patch fixing this to
restore original functionality.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-03-04 01:03:10 +01:00
George Moussalem
9a7192c08e qualcommax: ipq50xx: Add support for Linksys MR5500
Add support for Linksys MR5500 (Hydra 6 Pro).

Speficiations:
* SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
* Memory: Kingston D2516ECMDXGJD (512 MiB)
* Serial Port: 3v3 TTL 115200n8
* Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax)
         QCN9024 (4x4:4 5 Ghz 802.11an/ac/ax)
* Ethernet: IPQ5018 integrated virtual switch connected to an external
            QCA8337 switch (4 Ports 10/100/1000 GBASE-T)
* Flash: Gigadevice GD5F2GQ5REYIH (256 MiB)
* LEDs: 1x multi-color PWM LED
        1x blue led for USB (GPIO 19 Active High)
* Buttons: 1x WPS (GPIO 27 Active Low)
           1x Reset (GPIO 28 Acive Low)
           5x ethernet port LEDs (amber for activity & green for link up)
* Peripherals: 1x USB2 (powered by GPIO 17 Active Low)
               support for USB3 will be added in a separate PR
* FCC ID: 2AYRA-03734

Flash instructions:
1. On OEM firmware, login to the device (typically at http://192.168.1.1) and click 'CA'
in the bottom right corner -> Connectivity -> Manual Upgrade. Alternatively, browse to
http://<router IP>/fwupdate.html.
Upgrade firmware using openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin image.
Optionally install on second partition, after first boot check actual partition:
fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin kernel
and in case of 1:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin alt_kernel
2. Installation using serial connection from OEM firmware (default login: root, password: admin):
fw_printenv -n boot_part
In case of 2:
flash_erase /dev/mtd12 0 0
nandwrite -p /dev/mtd12 openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin
or in case of 1:
flash_erase /dev/mtd14 0 0
nandwrite -p /dev/mtd14 openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin
After first boot install firmware on second partition:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin kernel
or:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_mr5500-squashfs-factory.bin alt_kernel
3. Back to the OEM firmware.
Download firmware from OEM website:
MR5500: https://support.linksys.com/kb/article/207-en/
From serial or SSH:
fw_printenv boot_part
in case of 1:
mtd -r -e alt_kernel -n write FW_MR5500_1.1.2.209598_prod.img alt_kernel
else in case of 2:
mtd -r -e kernel -n write FW_MR5500_1.1.2.209598_prod.img kernel
4. Boot from USB
This allows you loading an OpenWrt image into RAM and is meant for recovery scenarios only.
Enable loading image from USB in u-boot. From serial or SSH:
fw_setenv bootusb 'usb start && usbboot &loadaddr && bootm $loadaddr'
fw_setenv bootcmd 'run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'
Copy OpenWrt initramfs image to USB:
dd bs=1M if=openwrt-qualcommax-ipq50xx-linksys_mr5500-initramfs-uImage.itb of=/dev/sda

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17958
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-02 11:42:48 +01:00
John Audia
86fd00b0fb kernel: bump 6.6 to 6.6.80
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.80

Removed upstreamed:
	generic/backport-6.6/819-v6.8-0002-nvmem-Create-a-header-for-internal-sharing.patch[1]
	generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch[2]
	generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch[3]

All other patches automatically rebased.

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.80&id=39dfc17a38f77b14f7cb2619bd3488a18d797d5d
2. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.80&id=276dae17ad9757c3813d9e736a0210f05ccdf8b7
3. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.80&id=a0ee898a5024f12572e4ce45202df9b149dadc05

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18140
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-02 11:39:59 +01:00
Aleksander Jan Bajkowski
7560af7647 mediatek: filogic: migrate ASUS TUF AX6000 to upstream PHY LED control
This commit switches the control of the leds connected to the Maxlinear
GPY211C PHY to an upstream solution. There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2025-03-01 03:05:18 +00:00
Aleksander Jan Bajkowski
25ea7ff393 mediatek: filogic: migrate Acer W6/W6d to upstream PHY LED control
This commit switches the control of the leds connected to the Maxlinear
GPY211C PHY to an upstream solution. There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2025-03-01 03:04:18 +00:00
Aleksander Jan Bajkowski
d50d51d74e mediatek: filogic: migrate Zyxel NWA50AX Pro to upstream PHY LED control
This commit switches the control of the leds connected to the Maxlinear
GPY211C PHY to an upstream solution. There should be no functional changes.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2025-03-01 03:03:02 +00:00
Felix Fietkau
ce68f61cb6 unetd: update to Git HEAD (2025-02-28)
75a236be122a service: add missing null pointer check
f5341f327539 ubus: add api for generating and validating security tokens
3fab99eab4d5 add udebug support
28d86bd30e97 pex: only respond to update requests when we have network data
8e6f37cc361e pex-msg: ignore no-data responses if version is zero
12e6cf7f63e1 pex: create pex host from update responses
edc8fdae463a ubus: show the local addresses in network status

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-28 17:36:01 +01:00
Felix Fietkau
8835ecf29b ucode-mod-uline: add support for querying window size from terminal if ioctl fails
This is useful for running the cli on a serial console

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-28 17:36:01 +01:00
Felix Fietkau
7953376400 cli: use model scope for hook calls
Make the scope consistent with other callbacks

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-28 17:36:01 +01:00
Felix Fietkau
bc078b833a cli: add support for create/destroy object editor with single type
Allows hooking create/destroy in a separate menu without having the user
specify a type argument.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-28 17:36:01 +01:00
Felix Fietkau
895b4e7caf cli: add support for partial completion with separator character
Useful for completing long lists of possible values with common prefix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-28 17:36:01 +01:00
Sander Vanheule
04ecccf3e9 realtek: Drop redundant LED labels
Some devices have both the color/function and label property defined.
The label can be constructed from the former properties, making it
redundant.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-28 16:30:29 +01:00
Sander Vanheule
13a5e02e28 realtek: Add status LED for Netgear GS310TP
Power LED is identical to GS308T.

Link: https://forum.openwrt.org/t/222970/11
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-28 14:15:17 +01:00
Bjørn Mork
be181cb3b3 realtek: add thermal zones for SFP sensors on SKS8300-8X
Create thermal zones for SFP internal sensors, enabling shutdown
on critical temperatures.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17967
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-27 19:24:45 +01:00
Bjørn Mork
f29b57dc68 realtek: add thermal zones for SFP sensors on GS1900-10HP
Create thermal zones for SFP internal sensors, enabling shutdown
on critical temperatures.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17967
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-27 19:24:45 +01:00
Bjørn Mork
864d6743ee realtek: thermal driver for rtl838x and rtl930x SoCs
Add simple driver reading the internal temperature sensor.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17967
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-27 19:24:44 +01:00
Robert Marko
fe37574be6
libpcap: add missing PKG_CONFIG_DEPENDS entries
Currently, enabling USB, BT or Netfilter support after initial compilation
will not trigger a rebuild, so add the missing PKG_CONFIG_DEPENDS so
that rebuild gets triggered.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2025-02-27 12:39:16 +01:00
Álvaro Fernández Rojas
3d3328bf5f kernel: r8126: update to v10.015.00
Changelog: https://github.com/openwrt/rtl8126/compare/10.014.01...10.015.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-02-27 11:56:50 +01:00
Álvaro Fernández Rojas
a8dea562aa kernel: r8125: update to v9.015.00
Changelog: https://github.com/openwrt/rtl8125/compare/9.014.01...9.015.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-02-27 11:56:06 +01:00
Álvaro Fernández Rojas
23fdbd4e71 omcproxy: update to latest version
Changelog: bfba2aa758...582cd8d3ae

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18130
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-27 11:52:27 +01:00
Hauke Mehrtens
2389793edf kernel: kmod-btmtk: Extract btmtk.ko into own package
btmtk.ko is used by btusb.ko and btmtkuart.ko, add it into an own
package and make both packages depend on it.

Fixes: 1c42a0be3619 ("kernel: modules: bluetooth: separating UART and USB drivers")
Link: https://github.com/openwrt/openwrt/pull/18110
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-26 23:31:36 +01:00
Bjørn Mork
d6977ab33a realtek: rtl930x: sgmii support
This makes sgmii work for 1000Base-T SFPs by stupidly adding the sgmii mode
wherever 1000base-x is accepted.  No intelligence has been used in the
process.  But it "works for me".

There is an obvious need for refactoring this code to make it more obvious
how and why we configure the mac/phy link like we do for different modes.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17950
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-25 20:53:30 +01:00
Bjørn Mork
1fc19bc06e realtek: rtl93xx: mdio-smbus support for clause 45 and Rollball SFPs
These features have been added to the mdio-i2c driver and are now used by
the sfp driver. The support is required for some newer SFPs.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17950
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-25 20:53:30 +01:00
Bjørn Mork
4457c1eee4 realtek: rtl93xx: support SFPs with phys
This driver use "phy-handle" as a placeholder for mac configuration
data.  Such handles are therefore required for all ports - even those
connected directly to SFP slots and having a managed property set to
"in-band-status".

The DSA core will register these nodes as if they are real phys. This
prevents later attachment of pluggable phys with errors like

   sfp sfp-p8: sfp_add_phy failed: -EBUSY

Replace the virtual SFP slot handles with "pseudo-phy-handle" to keep
the driver logic as-is but hide the node from the DSA core.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17950
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-25 20:53:30 +01:00
Bjørn Mork
ccf54ca673 realtek: sfp: add mdio bus only for sfps with a phy
The SMBus patch broke the logic and caused the driver to always
register an mdio bus, regardless of the sfp.  Restore original
logic.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17950
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-25 20:53:30 +01:00
Bjørn Mork
736229ba99 realtek: sfp: prevent duplicate hwmon devices when re-probing on interface up
Re-probing on interface up will register a new duplicate hwmon device. Skip
the hwmon probe if we already have a sensor device.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17950
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-25 20:53:30 +01:00
Bjørn Mork
ef4b022150 realtek: i2c-rtl9300: fix crash on block transfers
Fix a typo which resulted in wrong .read hooks and unset .write
hooks.  This made I2C_SMBUS_BLOCK_DATA transfers dereference the
NULL .write hook and Oops.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17950
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-25 20:53:30 +01:00
Bjørn Mork
d5dcb88906 realtek: dsa: silence debug log noise
The log noise emmitted by this driver is overwhelming, even for developers
looking at specific issues.  Demoting to debug allows individual messages
to be dynamically enabled instead.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17950
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-25 20:53:30 +01:00
Bjørn Mork
024e9dbace realtek: dsa: silence log noise on route offload
Adding a static IPv4 route made the driver repeatedly print

 rtl83xx_l3_nexthop_update: Setting up fwding: ip 192.168.1.42, GW mac 0000001b21a7xxxx
 Route with id 3 to 192.168.99.0 / 24
 rtl83xx_l3_nexthop_update: total packets: 0
 Warning: TEMPLATE_FIELD_RANGE_CHK: not configured

These messages are only useful to developers while debugging offloading.
Demote to debug level, which in general is more useful for developers
by allowing precise dynamic control.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/17950
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-25 20:53:30 +01:00
Robert Marko
e1acc7a67b Revert "tools/autoconf-archive: bump to 2024.10.16"
This reverts commit bbb3b985b036193d814e9742d07143330d19a71a.

LuaJIT support that is included in 2024.10.16 was supposed to be optional
but unfortunately, it seems that there is a bug[1] and its now breaking FRR
host builds and more.

So, revert the update for now.

[1] https://lists.gnu.org/archive/html/autoconf-archive-maintainers/2024-11/msg00000.html

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-25 18:12:32 +01:00
Kristian Skramstad
a76651a24a kernel: qca-nss-dp: update to 12.5.5
There is some new changes since 12.5.r2 to 12.5.5, so refresh
and update patches.

Changes:
modified:   package/kernel/qca-nss-dp/Makefile
modified:   package/kernel/qca-nss-dp/patches/0006-nss_dp_main-Use-a-phy-handle-property-to-connect-to-.patch
modified:   package/kernel/qca-nss-dp/patches/0008-nss-dp-allow-setting-netdev-name-from-DTS.patch
deleted:    package/kernel/qca-nss-dp/patches/0011-01-edma_v1-rework-hw_reset-logic-to-permit-rmmod-and-in.patch
deleted:    package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
deleted:    package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
deleted:    package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
deleted:    package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
deleted:    package/kernel/qca-nss-dp/patches/0011-06-edma_v1-skip-edma_disable_port-in-edma_cleanup-subse.patch

Log:
2024-10-16 |4c9f671| [qca-nss-dp] removed the calling of fal_port_autoneg_status_get
2024-10-16 |fb33119| Merge "[qca-nss-dp] Change Debug Level of TX Complete Errors"
2024-10-15 |e197b9d| [qca-nss-dp] Change Debug Level of TX Complete Errors
2024-10-03 |1b7aeb1| Merge remote-tracking branch origin/AU_LINUX_QSDK_GINGER_OPEN_TARGET_ALL.12.5.5.230.918 into HEAD
2024-10-01 |830ac73| Merge "[qca-nss-dp] Enable rmmod support for qca-nss-dp module."
2024-06-05 |aef242d| [qca-nss-dp] Enable rmmod support for qca-nss-dp module.
2024-09-18 |b1bfeb6| Merge "[qca-nss-dp] Move pr_info to pr_debug"
2024-09-12 |54aee26| Merge "[qca-nss-dp] Fix Loopback ring teardown path"
2024-09-10 |21f6567| Merge "[qca-nss-dp] Extend Tx Complete errors to track individual error type"
2024-09-10 |7fee76f| Merge "[qca-nss-dp] Destination VP xmit support"
2024-09-09 |0d4ecfd| [qca-nss-dp] Fix Loopback ring teardown path
2024-08-29 |438ab8e| [qca-nss-dp] Move pr_info to pr_debug
2024-08-29 |3f45e3d| Merge "[qca-nss-dp] Fix EDMA Recovery API to Prevent Multiple RX NAPI Add Calls"
2024-08-23 |7a792b1| [qca-nss-dp] Fix EDMA Recovery API to Prevent Multiple RX NAPI Add Calls
2024-07-08 |1227746| [qca-nss-dp] Add support for DDR extended buffer
2024-08-20 |d45bceb| [qca-nss-dp] Extend Tx Complete errors to track individual error type
2024-06-17 |a8f7155| [qca-nss-dp] Destination VP xmit support
2024-08-21 |a5d189b| Merge "[qca-nss-dp] Support for the PPE-VP Qdisc feature"
2024-08-16 |da97bc7| Merge "[qca-nss-dp] Restrict compilation of a file in DP module"
2024-06-22 |bf90fe9| [qca-nss-dp] Support for the PPE-VP Qdisc feature
2024-02-07 |6ceeb8f| [qca-nss-dp] Enable EDMA driver to allocate from beyond 4GB space.
2024-03-19 |4a7ff28| [qca-nss-dp] Restrict compilation of a file in DP module
2024-07-09 |73bad34| [qca-nss-dp] Check for DS node state before getting ppe queue
2024-05-03 |22cdbd6| [qca-nss-dp] Add PPE-DS Enqueue vp to queue mapping
2024-07-04 |5d6ef18| Merge "[qca-nss-dp] NAPI Budget change for KPI improvement"
2024-07-02 |cd0b543| Merge "[qca-nss-dp] Read fake_mac header indication from rx_desc"
2024-07-01 |160b988| [qca-nss-dp] NAPI Budget change for KPI improvement
2024-05-22 |54c2fd1| [qca-nss-dp]: Fixing SA warnings as part of qca-nss-dp module.
2024-06-22 |602534b| [qca-nss-dp] Read fake_mac header indication from rx_desc
2023-11-24 |10210e2| [qca-nss-dp] EDMA register changes for ipq54xx
2024-05-22 |1af0d03| Merge "[qca-nss-dp]: Change to support PPE-VP path for MLO Assist"
2024-05-15 |2acd9f3| [qca-nss-dp]: Change to support PPE-VP path for MLO Assist
2023-09-27 |1ca59f2| [qca-nss-dp] DP changes for ipq54xx
2024-04-18 |bc60c5a| Merge "[qca-nss-dp] Add support for the XGMAC latency computation"
2024-04-18 |6a67d6d| Merge "[qca-nss-dp] Fix the packets processing in the Rx NAPI"

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
Link: https://github.com/openwrt/openwrt/pull/17731
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-25 10:46:33 +01:00
Paweł Owoc
7b401a9d95 qualcommax: fix upgrade function for Linksys MX dual boot devices
Function remove_oem_ubi_volume was called before CI_UBIPART variable was defined.

Fixes: df1f6e1e18 (qualcommax: ipq807x: Remove OEM UBI volume before upgrade for Linksys MX devices)
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18090
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-24 21:11:41 +01:00
Daniel Golle
7a9a646c72 linux-firmware: update to 20250211
Changes since 20241110:
 bb591083 i915: Update Xe2LPD DMC to v2.28
 68eeb2a5 ASoC: tas2781: Add regbin firmware by index for single device
 31e5b6b0 WHENCE: qca: add missing version information
 e6e52fde WHENCE: qca: add missing version information
 920ec27d WHENCE: split generic QCA section into USB and serial sections
 bb5d129b rtl_bt: Update RTL8852B BT USB FW to 0x0474_842D
 608fdf4c iwlwifi: add Bz/gl FW for core93-123 release
 c1252c30 iwlwifi: update ty/So/Ma firmwares for core93-123 release
 69e83a8d iwlwifi: update cc/Qu/QuZ firmwares for core93-82 release
 5b217397 ASoC: tas2781: Add dsp firmware for new projects
 24625a79 amdgpu: DMCUB update for DCN401
 99720d02 ath12k: WCN7850 hw2.0: update board-2.bin
 a3f44afe ath12k: QCN9274 hw2.0: update to WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
 94a1e6ed ath12k: QCN9274 hw2.0: update board-2.bin
 3a44e641 ath11k: WCN6750 hw1.0: update board-2.bin
 ccc21e6c ath11k: QCN9074 hw1.0: update to WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
 73718ee7 ath11k: QCA6698AQ hw2.1: add to WLAN.HSP.1.1-04479-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1
 06fe00a9 ath11k: QCA6698AQ hw2.1: add board-2.bin
 bc502ac3 ath11k: QCA6390 hw2.0: update board-2.bin
 7003cdef ath11k: QCA2066 hw2.1: update to WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.6
 8cd06dd2 ath11k: QCA2066 hw2.1: update board-2.bin
 0dba9647 ath11k: IPQ8074 hw2.0: update to WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
 bd0511af ath11k: IPQ6018 hw1.0: update to WLAN.HK.2.7.0.1-02409-QCAHKSWPL_SILICONZ-1
 51f77040 copy-firmware: Fix 'No such file or directory' error.
 e38da104 ath11k: add device-specific firmware for QCM6490 boards
 6b12b964 qca: add more WCN3950 1.3 NVM files
 42101764 qca: add firmware for WCN3950 chips
 93160a02 qca: move QCA6390 firmware to separate section
 03087bcd qca: restore licence information for WCN399x firmware
 61d257d5 amdgpu: DMCUB updates for various ASICs
 a204b433 amdgpu: DMCUB updates forvarious AMDGPU ASICs
 7db7f79e qca: Update Bluetooth WCN6750 1.1.0-00476 firmware to 1.1.3-00069
 bba19e40 qcom:x1e80100: Support for Lenovo T14s G6 Qualcomm platform
 b3553788 qcom:x1e80100: Support for Lenovo T14s G6 Qualcomm platform
 211fbc28 linux-firmware: Update FW files for MRVL SD8997 chips
 4f91bc37 i915: Update Xe2LPD DMC to v2.27
 0ff5d857 qca: Update Bluetooth WCN6856 firmware 2.1.0-00642 to 2.1.0-00650
 9c2bf7af rtl_bt: Update RTL8852B BT USB FW to 0x049B_5037
 8f070131 amdgpu: Update ISP FW for isp v4.1.1
 84e4027f trivial: contrib: wrap the process in try/except to catch server issues
 e75caebf trivial: contrib: use python-magic to detect encoding of emails
 52e96183 QCA: Add Bluetooth firmware for QCA6698
 0e16f416 amdgpu: revert DMCUB 3.1.4 firmware
 7c07d2d2 amlogic: update firmware for w265s2
 634d0a0a mediatek MT7925: update bluetooth firmware to 20250113153307
 3b6b1cba linux-firmware: update firmware for MT7925 WiFi device
 a6cc7472 amdgpu: update psp 13.0.10 firmware
 133355e8 amdgpu: update gc 11.0.3 firmware
 ed8de441 amdgpu: update psp 13.0.8 firmware
 11ec4d49 amdgpu: update psp 13.0.5 firmware
 78caaee2 amdgpu: update vcn 4.0.0 firmware
 d9f8cb2a amdgpu: update psp 13.0.0 firmware
 29761144 amdgpu: update gc 11.0.0 firmware
 9ac860c0 amdgpu: update beige goby firmware
 f959a13f amdgpu: update dimgrey cavefish firmware
 8e978d08 amdgpu: update navy flounder firmware
 a4b34d9c amdgpu: update sienna cichlid firmware
 7b211e6a amdgpu: update navi14 firmware
 4ea4ad03 amdgpu: update smu 14.0.3 firmware
 d3547493 amdgpu: update psp 14.0.3 firmware
 0ca6b708 amdgpu: update gc 12.0.1 firmware
 367fe221 amdgpu: update navi12 firmware
 5d6d3f3e amdgpu: update smu 14.0.2 firmware
 70482da5 amdgpu: update psp 14.0.2 firmware
 95bfb9ef amdgpu: update gc 12.0.0 firmware
 64e0a082 amdgpu: update gc 9.4.3 firmware
 dcb68fd8 amdgpu: update navi10 firmware
 7718769c amdgpu: update vcn 4.0.4 firmware
 02d16372 amdgpu: update psp 13.0.7 firmware
 f0f3895c amdgpu: update gc 11.0.2 firmware
 73c7a2bd amdgpu: update yellow carp firmware
 f07c3754 qcom: correct licence information for SA8775P binaries
 efa7a4c2 qcom: update SLPI firmware for RB5 board
 6dca3000 amdgpu: DMCUB updates for various AMDGPU ASICs
 dfc33728 qcom: add DSP firmware for SA8775p platform
 f5dae710 qcom: correct venus firmware versions
 dd5f35ba qcom: add missing version information
 dcc4a069 linux-firmware: Update firmware (v10) for mt7988 internal
 fd01e808 iwlwifi: add Bz FW for core90-93 release
 ee800d83 linux-firmware: wilc3000: add firmware for WILC3000 WiFi device
 d36d77d5 rtw89: 8852b: update fw to v0.29.29.8
 b93e274c rtw89: 8852c: update fw to v0.27.122.0
 6d24ab23 rtw89: 8922a: update fw to v0.35.54.0
 9dbec479 rtw89: 8922a: update fw to v0.35.52.1 and stuffs
 882976ea rtw89: 8852bt: update fw to v0.29.110.0
 20cace1a rtw89: 8852b: update fw to v0.29.29.7
 b3049665 amdgpu: DMCUB updates for various AMDGPU ASICs
 5d60a596 amdgpu: update sdma 6.0.3 firmware
 a071c69c amdgpu: update psp 13.0.10 firmware
 17dce2a9 amdgpu: update gc 11.0.3 firmware
 256dd4b1 amdgpu: update sdma 4.4.5 firmware
 9ecdd733 amdgpu: update psp 13.0.14 firmware
 c380f294 amdgpu: update gc 9.4.4 firmware
 df61f757 amdgpu: update psp 13.0.5 firmware
 9e98368a amdgpu: update vega20 firmware
 3f7b0107 amdgpu: update vega12 firmware
 8253e1ba amdgpu: update vega10 firmware
 f46e1c5e amdgpu: update vcn 4.0.0 firmware
 3822f749 amdgpu: update psp 13.0.0 firmware
 ca765ac8 amdgpu: update gc 11.0.0 firmware
 e3d76647 amdgpu: update picasso firmware
 5ade735e amdgpu: update beige goby firmware
 ab3f55cb amdgpu: update vangogh firmware
 dcae23bb amdgpu: update dimgrey cavefish firmware
 81afa06d amdgpu: update navy flounder firmware
 38f582b0 amdgpu: update psp 13.0.11 firmware
 2a6b035e amdgpu: update gc 11.0.4 firmware
 a3010763 amdgpu: update vcn 4.0.2 firmware
 5f1d715f amdgpu: update psp 13.0.4 firmware
 29110540 amdgpu: update gc 11.0.1 firmware
 28cfd823 amdgpu: update sienna cichlid firmware
 52d598fe amdgpu: update vcn 4.0.6 firmware
 521a4cd3 amdgpu: update psp 14.0.1 firmware
 28f84675 amdgpu: update vcn 4.0.5 firmware
 1e70894c amdgpu: update gc 11.5.0 firmware
 44e3c3ba amdgpu: update vcn 5.0.0 firmware
 f96ec199 amdgpu: update smu 14.0.3 firmware
 572e86af amdgpu: update psp 14.0.3 firmware
 ffbb5c05 amdgpu: update gc 12.0.1 firmware
 42fe6fa0 amdgpu: update navi14 firmware
 67e008dc amdgpu: update arcturus firmware
 2f09a8e7 amdgpu: update renoir firmware
 c795a0cc amdgpu: update smu 14.0.2 firmware
 b255f18f amdgpu: update psp 14.0.2 firmware
 335a3d30 amdgpu: update gc 12.0.0 firmware
 0910afb8 amdgpu: update navi12 firmware
 210ed963 amdgpu: update vcn 4.0.3 firmware
 45612237 amdgpu: update sdma 4.4.2 firmware
 e7a51c79 amdgpu: update psp 13.0.6 firmware
 32114486 amdgpu: update gc 9.4.3 firmware
 a76f74a1 amdgpu: update yellow carp firmware
 cd6cef46 amdgpu: update vcn 4.0.4 firmware
 3320119d amdgpu: update psp 13.0.7 firmware
 80802ba0 amdgpu: update gc 11.0.2 firmware
 39332647 amdgpu: update navi10 firmware
 4f47e84d amdgpu: update aldebaran firmware
 5e1e0ae5 cirrus: cs35l56: Correct some links to address the correct amp instance
 7ccc69cf linux-firmware: Update firmware file for Intel Bluetooth Magnetar core
 35f74899 linux-firmware: Update firmware file for Intel BlazarU core
 127ac452 linux-firmware: Update firmware file for Intel Bluetooth Solar core
 838bf587 cirrus: cs35l41: Add Firmware for Ayaneo system 1f660105
 af598a3f Fix has_gnu_parallel function
 e39831b1 rtl_bt: Add separate config for RLT8723CS Bluetooth part
 804b3e69 amdgpu: revert VCN 3.1.2 firmware
 599deec0 amdgpu: revert yellow carp VCN firmware
 95867e92 amdgpu: revert sienna cichlid VCN firmware
 81ca4929 amdgpu: revert navy flounder VCN firmware
 382f95f0 amdgpu: revert dimgrey cavefish VCN firmware
 0f3495ac WHENCE: Link the Raspberry Pi CM5 and 500 to the 4B
 729c0c8e copy-firmware.sh: Fix typo in error message.
 2b781910 Add support to install files/symlinks in parallel.
 c170fc69 Makefile: Remove obsolete/broken reference.
 a100ea55 check_whence.py: Use a more portable shebang.
 bf3697e4 rtl_bt: Update RTL8852B BT USB FW to 0x04BE_1F5E
 9cf329b3 cnm: update chips&media wave521c firmware.
 c92f98b8 WHENCE: Add "Info:" tag to text that's clearly not part of the license
 e1e114f8 rtl_nic: add firmware rtl8125bp-2
 891a8d4f qcom: venus-5.4: update firmware binary for sc7180 and qcs615
 bd491523 cirrus: cs35l56: Correct filenames of SSID 17aa3832
 9c46d10f cirrus: cs35l56: Add and update firmware for various Cirrus CS35L54 and CS35L56 laptops
 2cb303e7 cirrus: cs35l56: Correct SSID order for 103c8d01 103c8d08 10431f43
 16329652 rtl_nic: add firmware rtl8125d-2
 7012ac97 linux-firmware: Update firmware file for Intel BlazarU core
 209c18b0 amdgpu: update dmcub 0.0.246.0 firmware
 27272156 Add top level license file.
 f5aeeb47 amdgpu: update raven firmware
 1363a0ea amdgpu: update gc 11.0.3 firmware
 a69ccec7 amdgpu: update psp 13.0.14 firmware
 be80726a amdgpu: update vcn 3.1.2 firmware
 0269927e amdgpu: update vpe 6.1.3 firmware
 66a1d205 amdgpu: update psp 14.0.4 firmware
 929c0891 amdgpu: update gc 11.5.2 firmware
 39ba34e6 amdgpu: update vcn 4.0.0 firmware
 53c443d3 amdgpu: update gc 11.0.0 firmware
 63dcba16 amdgpu: update picasso firmware
 0985337b amdgpu: update beige goby firmware
 6c7f2c6a amdgpu: update vangogh firmware
 7f87800c amdgpu: update dimgrey cavefish firmware
 3b1a3e06 amdgpu: update navy flounder firmware
 1fa991ad amdgpu: update gc 11.0.4 firmware
 c6d3af09 amdgpu: update green sardine firmware
 32de3dbc amdgpu: update vcn 4.0.2 firmware
 d4e69c52 amdgpu: update gc 11.0.1 firmware
 9ae22572 amdgpu: update sienna cichlid firmware
 923200c8 amdgpu: update vcn 4.0.6 firmware
 0599265e amdgpu: update gc 11.5.1 firmware
 0dc221f2 amdgpu: update vcn 4.0.5 firmware
 f6295215 amdgpu: update psp 14.0.0 firmware
 dd3f6661 amdgpu: add vcn 5.0.0 firmware
 614375e1 amdgpu: add smu 14.0.3 firmware
 664fb29d amdgpu: add sdma 7.0.1 firmware
 54a0aa85 amdgpu: add psp 14.0.3 firmware
 72eda6ac amdgpu: add gc 12.0.1 firmware
 90fcc01f amdgpu: update navi14 firmware
 e264aa6f amdgpu: update renoir firmware
 141c3088 amdgpu: add smu 14.0.2 firmware
 49612d12 amdgpu: add sdma 7.0.0 firmware
 95f3ca63 amdgpu: add psp 14.0.2 firmware
 c852aecc amdgpu: add gc 12.0.0 firmware
 51744331 amdgpu: update navi12 firmware
 308d5f14 amdgpu: update psp 13.0.6 firmware
 252ffc5b amdgpu: update yellow carp firmware
 f3d0f0ba amdgpu: update vcn 4.0.4 firmware
 eb22099a amdgpu: update gc 11.0.2 firmware
 c3eccd75 amdgpu: update navi10 firmware
 f367a87d amdgpu: update aldebaran firmware
 52a3bca7 upstream amdnpu firmware
 7f116580 QCA: Add Bluetooth nvm files for WCN785x
 ea71da6f i915: Update Xe2LPD DMC to v2.24
 3f08f270 cirrus: cs35l56: Add firmware for Cirrus CS35L56 for various Dell laptops
 42b01d49 iwlwifi: add Bz-gf FW for core89-91 release
 16414d8b QCA: Update Bluetooth WCN785x firmware to 2.0.0-00515-2
 113d0f19 amdgpu: update smu 13.0.10 firmware
 a956cc9c amdgpu: update sdma 6.0.3 firmware
 72809ef1 amdgpu: update psp 13.0.10 firmware
 cce4f155 amdgpu: update gc 11.0.3 firmware
 b015f2e6 amdgpu: add smu 13.0.14 firmware
 3b20eb12 amdgpu: add sdma 4.4.5 firmware
 e736a04b amdgpu: add psp 13.0.14 firmware
 4017dd0e amdgpu: add gc 9.4.4 firmware
 ad211a73 amdgpu: update vcn 3.1.2 firmware
 821595b4 amdgpu: update psp 13.0.5 firmware
 ebdbabc2 amdgpu: update psp 13.0.8 firmware
 f665d459 amdgpu: update vega20 firmware
 d0e86e75 amdgpu: update vega12 firmware
 1c720ff4 amdgpu: update psp 14.0.4 firmware
 cc7d01ee amdgpu: update gc 11.5.2 firmware
 ac83d136 amdgpu: update vega10 firmware
 92cfa0cc amdgpu: update vcn 4.0.0 firmware
 b3848445 amdgpu: update smu 13.0.0 firmware
 ed656376 amdgpu: update psp 13.0.0 firmware
 f5e2c676 amdgpu: update gc 11.0.0 firmware
 54d70b86 amdgpu: update beige goby firmware
 7416c173 amdgpu: update vangogh firmware
 169ab504 amdgpu: update dimgrey cavefish firmware
 3e78bb66 amdgpu: update navy flounder firmware
 c770f5bb amdgpu: update psp 13.0.11 firmware
 7508bcff amdgpu: update gc 11.0.4 firmware
 95091a45 amdgpu: update vcn 4.0.2 firmware
 9ae39887 amdgpu: update psp 13.0.4 firmware
 bfca88ab amdgpu: update gc 11.0.1 firmware
 c9244523 amdgpu: update sienna cichlid firmware
 5bce792a amdgpu: update vpe 6.1.1 firmware
 398e526f amdgpu: update vcn 4.0.6 firmware
 4a172771 amdgpu: update psp 14.0.1 firmware
 d316e650 amdgpu: update gc 11.5.1 firmware
 0109c8f4 amdgpu: update vcn 4.0.5 firmware
 9fdafc63 amdgpu: update psp 14.0.0 firmware
 cca5bb4a amdgpu: update gc 11.5.0 firmware
 50bd1edb amdgpu: update navi14 firmware
 78829a1a amdgpu: update arcturus firmware
 0b20421f amdgpu: update renoir firmware
 e790f175 amdgpu: update navi12 firmware
 93116bb7 amdgpu: update sdma 4.4.2 firmware
 d9e052f0 amdgpu: update psp 13.0.6 firmware
 8d6dc052 amdgpu: update gc 9.4.3 firmware
 799542f9 amdgpu: update vcn 4.0.4 firmware
 bca51065 amdgpu: update psp 13.0.7 firmware
 ce9cd47f amdgpu: update gc 11.0.2 firmware
 f9e90ac1 amdgpu: update navi10 firmware
 9a186727 amdgpu: update aldebaran firmware
 508d770e ice: update ice DDP wireless_edge package to 1.3.20.0
 1db0dc9f ice: update ice DDP comms package to 1.3.52.0
 b0cdbcef ice: update ice DDP package to ice-1.3.41.0
 b94113ee amdgpu: update DMCUB to v9.0.10.0 for DCN314
 60f838aa amdgpu: update DMCUB to v9.0.10.0 for DCN351
 48bb90cc linux-firmware: Update AMD cpu microcode
 00643cab xe: Update GUC to v70.36.0 for BMG, LNL
 36d0c646 i915: Update GUC to v70.36.0 for ADL-P, DG1, DG2, MTL, TGL
 60cdfe18 iwlwifi: add Bz-gf FW for core91-69 release
 1e7f6588 qcom: venus-5.4: add venus firmware file for qcs615
 aeede7af qcom: update venus firmware file for SC7280
 77a11ffc QCA: Add 22 bluetooth firmware nvm files for QCA2066
 4023ed0b mediatek MT7922: update bluetooth firmware to 20241106163512
 ff344a7f mediatek MT7921: update bluetooth firmware to 20241106151414
 862cd742 linux-firmware: update firmware for MT7922 WiFi device
 45c98412 linux-firmware: update firmware for MT7921 WiFi device
 01842da4 qcom: Add QDU100 firmware image files.
 af7f6e4f qcom: Update aic100 firmware files
 af70c9d5 dedup-firmware.sh: fix infinite loop for --verbose

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-24 13:52:59 +00:00
Hannu Nyman
e03676a9ba tools/autoconf: Fix relocatable patch
Fix the 000-relocatable.patch broken by e0f5ce9. The patch segment about
detecting STAGING_DIR_HOST was erroneously removed, as upstream had
deleted the previous bin/autoconf.as and had implemented it in perl
in bin/autoconf.in. Re-create the previous functionality in that.

Fixes: #18059
Fixes: e0f5ce974 ("tools/autoconf: bump to 2.72")
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/18073
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-24 14:12:47 +01:00
Felix Fietkau
15c27ce9f0 ucode-mod-uline: fix prompt after set_hint with string bigger than the window size
Redraw the prompt after the hint instead of trying to move backwards

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-24 13:31:53 +01:00
Shiji Yang
06c6481e7f tools: zlib: switch to git source
Switch to the git repository source so that we can use zstd
compression algorithm to create smaller package tarball. This
patch also corrected the license file name[1].

[1] 352cb28d12

Suggested-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17880
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-24 12:44:02 +01:00
Shiji Yang
c43c816afc zlib: switch to git source
Switch to the git repository source so that we can use zstd
compression algorithm to create smaller package tarball. This
patch also corrected the license file name[1] and the CPE ID[2].

[1] 352cb28d12
[2] https://nvd.nist.gov/products/cpe/detail/95C64A3E-A897-4D55-B74A-D2285440D164

Suggested-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17880
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-24 12:44:02 +01:00
Robert Marko
87f3365d90 Revert "tools/automake: bump to 1.17"
This reverts commit b930ce3bf7aa350cf0252dbf95c9447e51be4de9.

Bump to 1.17 broke SDK portability as it partially reverted commit
("automake: portability fixes") which made Perl PATH "/usr/bin/env perl"
as that is portable, as otherwise automake will set the absolute path to
the Perl binary and this will then fail when using SDK on a different
system as that PATH is not present.

So, since fixing this would require backport of upstream commit
("configure: make perl path with whitespace a warning, not error.") which
requires autoreconf to be done in order for configure to get regenerated
we cannot do it because at that time we do not have automake built.

So, for now revert the bump until upstream makes a new release.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-24 12:27:47 +01:00
Felix Fietkau
00e4b23e27 kernel: fix IPv6 TCP GSO segmentation with NAT
Add missing checksum update

Fixes: https://github.com/openwrt/openwrt/issues/15857
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-24 12:26:37 +01:00
Daniel Golle
3a7467ffde ethtool: work-around ETHTOOL_GRSSH/ETHTOOL_SRSSH ABI breakage
ethtool since version 6.9 introduced support for getting/setting RSS
input transformation supported in Linux since version 6.8.

The now changed kernel ioctl ABI, however, cannot be detected from
userland, and ethtool since version 6.9 simply assumes that a previously
reserved field is now used to set the input transformation.
Unfortunately the default value RXH_XFRM_NO_CHANGE (0xff) used by ethtool
userland creates an incompatibility with older kernels which cannot be
resolved easily without introducing even more ABI breakage.

Work-around the issue and fix support for --set-rxfh and --set-rxfh-indir
ethtool userland tool commands by making the support for input_xfrm
conditional on compile time, and keep it disabled for Linux 6.6.

Fixes: 8c2dcd1518 ("ethtool: update to 6.10")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-24 05:07:01 +00:00
Rudy Andram
da2cc98458 wireless-regdb: Update to version 2025.02.20
b43aeb5 wireless-regdb: assert and correct maximum bandwidth within frequency difference
68588bf wireless-regdb: Update regulatory info for Syria (SY) for 2020
0dda57e wireless-regdb: Update regulatory info for Moldova (MD) on 6GHz for 2022
b19ab0b wireless-regdb: Update regulatory info for Azerbaijan (AZ) on 6GHz for 2024
f67f40d wireless-regdb: Update regulatory info for Oman (OM)
bd70876 wireless-regdb: Update regulatory rules for Armenia (AM) on 2.4 and 5 GHz
6c7cbcc wireless-regdb: Permit 320 MHz bandwidth in 6 GHz band in ETSI/CEPT
f9f6b30 wireless-regdb: Update regulatory rules for Austria (AT)
39b47ea wireless-regdb: Update regulatory info for Cayman Islands (KY) for 2024
3dd7ceb wireless-regdb: allow NO-INDOOR flag in db.txt
4d754a1 wireless-regdb: Update regulatory rules for Iran (IR) on both 2.4 and 5Ghz for 2021
8c8308a wireless-regdb: Update frequency range with NO-INDOOR for Oman (OM)
c2f11e2 wireless-regdb: update regulatory database based on preceding changes

Signed-off-by: Rudy Andram <rmandrad@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17957
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-24 00:30:21 +01:00
Andre Heider
4aea0689e7 ltq-vdsl-vr11-mei: remove static linking
This removes -static compile option. The -static option tells GCC to
link this statically with the libc, which we do not want in OpenWrt. We
want to link everything dynamically to the libc. This fixes a compile
problem with glibc.

References: 71bdff91 "ltq-vdsl-mei: Remove static linking"
Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-24 00:25:29 +01:00
Andre Heider
d787839afa ltq-vdsl-vr11-mei: remove support for older kernel versions
There's only v6.6 in-tree, remove anything older.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-24 00:25:29 +01:00
Paweł Owoc
3b7a92754e linux: use packages kmod-hci-uart and kmod-btusb instead of kmod-bluetooth
Use Bluetooth UART and USB packages separetly.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15118
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-24 00:08:42 +01:00
Paweł Owoc
1c42a0be36 kernel: modules: bluetooth: separating UART and USB drivers
Not all devices need Bluetooth UART and USB drivers to be installed together. Three separate drivers have been created:
- kmod-bluetooth
- kmod-hci-uart
- kmod-btusb

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15118
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-24 00:08:42 +01:00
Paweł Owoc
f4f0a847a4 kernel: modules: bluetooth: creating a new Bluetooth menu
Move Bluetooth modules to new Bluetooth menu from Other menu.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15118
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-24 00:08:39 +01:00
Bjørn Mork
8b3c845835 realtek: ONTi ONT-S508CL-8S is a relabeled XikeStor SKS8300-8X
Both hardware and firmware of these devices appears identical except for the
manufacturers logo and device name.  The documented XikeStor SKS8300-8X
installation method is verified to work on the ONTi ONT-S508CL-8S using
Openwrt images made for the XikeStor SKS8300-8X. This includes the OEM boot
loader magic password phrases.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Link: https://github.com/openwrt/openwrt/pull/18071
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-23 17:23:35 +01:00
Shiji Yang
3ffe54a1e1 tools: xz: update to 5.6.4
The serious liblzma backdoor vulnerability (CVE-2024-3094) has
been fixed since v5.6.2. It's time to bump this tool to the
latest version. This patch also added a new GitHub package URL.

Changelogs:
https://github.com/tukaani-project/xz/releases/tag/v5.6.2
https://github.com/tukaani-project/xz/releases/tag/v5.6.3
https://github.com/tukaani-project/xz/releases/tag/v5.6.4

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/18063
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-02-23 12:21:26 +01:00
John Audia
d664d74669 kernel: bump 6.6 to 6.6.79
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.79

Manually rebased:
	ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch

All other patches automatically rebased.

Build system: x86/64
Build-tested: bcm27xx/bcm2712, filogic/glinet_gl-mt6000, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: bcm27xx/bcm2712, filogic/glinet_gl-mt6000, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18066
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-02-23 12:17:38 +01:00
Shiji Yang
ce67f08449 tools: zstd: update to 1.5.7
This new version has some performance enhancements.

Changelog:
https://github.com/facebook/zstd/releases/tag/v1.5.7

Upstreamed patch:
001-Provide-variant-pkg-config-file-for-multi-threaded-s.patch[1]

[1] f1f1ae369a

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/18064
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-22 20:30:00 +01:00
Robert Marko
cb5fb841a5 iproute2: update to 6.13
Update iproute2 to 6.13.

Release notes:
https://lwn.net/ml/all/20250120194053.3744d96b@hermes.local/

Allows us to drop multiple upstreamed patches:
package/network/utils/iproute2/patches/013-endian.h.patch
package/network/utils/iproute2/patches/014-basename.patch
package/network/utils/iproute2/patches/015-limits.h.patch
package/network/utils/iproute2/patches/016-limits.h.patch
package/network/utils/iproute2/patches/017-linux-limits.patch
package/network/utils/iproute2/patches/018-linux-limits.patch

Link: https://github.com/openwrt/openwrt/pull/18067
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-22 20:22:26 +01:00
Dominick Grift
aba52e092c selinux-policy: update to version v2.1
Rebased onto dssp5-base. Baseline is:
ss, tc, stubby, irqbalance, usbutils, ethtool, tcpdump, mtr,
bmon, zram-swap, parted, e2fsprogs, gdisk, block-mount,
kmod-fs-ext4, kmod-fs-f2fs, kmod-usb-storage, f2fs-tools-selinux,
kmod-usb-storage-uas, kmod-usb3, wireguard-tools,
openssh-sftp-server, luci-light, resolveip, blockd

Changes since v2.0:

3dcc957 three issues:
434bad8 /new_root related
04d18a5 README armsr combined-efi
506d8c1 /efi is not a thing in armsr combined-efi
c0db1ed efivarfs remove these filecons
4eb35b7 adds efivars noseclabelfs for armsr combined-efi
bbc6a6b adds /dev/ttyS3 to tty serialtermdev
1467206 README local logins
6ae3185 rename eficapsulemiscnodedev
d43ded0 rename to vportserialtermdev
a47d2f8 fixes virtio port serialtermdev
03aec70 blockmount: make it a bit more robust
70f1ed3 hotplugcall not sure what config triggers this
3338764 boarddetect: i was expecting this
d97548a deal with /dev/tty and /dev/vcs
c6ba4a5 adds virtio block device
d03e216 adds virtio vport serialtermdev for qemu guest agent
2dc0291 validatefirmwareimage: allow getattr of *all* dev chr files
fdfb3a7 adds /dev/efi_capsule_loader for armsr combined target
b129fb9 validatefirmwareimage ordering
b5e81b4 validatefirmwareimage clean up
0932dc5 README typo fixes
a1f88f0 README fix
e6c68be README typo fixes
a232c21 hvcloginserialtermdev: macro not used
d7edd95 support /usr/local and update README
c0d2947 validatefirmwareimage comment
7dbc9b3 validatefirmwareimage: allow find to getattr of dev.except char
f647175 platformtmpfile: elaborate a bit in comment
52f32c1 reintroduce misc.cil
320d77f validatefirmwareimage: /lib/upgrade/platform.sh
365fc65 deal with /efi for combined images
183b412 adds hvc logserialtermdev
20cd42a sshdsysagent: limited support for legacy scp -O with firmware images
1ccee8d validatefirmwareimages: some events related to "combined" images
9b47fc3 jshn reads /dev/urandom
f86def7 adds /tmp/log/apk.log
f1247b3 these are relative to the current namespace
32c0cc8 hotplugcall qemu virtio-console-helper
5cc41f5 uclient-fetch for manually downloading sysupgrade related
c8140bd cgi-io creates firmware and backup atomically
edf517b factoryreset deal with firstboot compatibility
f5116b5 pppd: redundant, is implied with shell client type
86be72c updates README
8c08ca1 luci-mod-system: a bit of speculation here
417f4a5 adds /dev/autofs
1ed537c misc.cil: remove
01d014a selinuxsecfile: be more specific
53fca71 rename blockd module
b4c9b15 ttyloginserialtermdev: ordering
016c3c1 sysagent traversal of /root is enough
d0d7c91 hotplugcall: net/00-sysctl
2821746 adds ttyAMA0 and some incomplete rules for board-detect

Run-tested: ilogic-openwrt_one, ipq40xx-generic-linksys_mr8300

Tested-by: Stefan Hellermann <stefan@the2masters.de>
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250116092312.1350223-1-dominick.grift@defensec.nl/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-22 19:52:00 +01:00
Jan Hoffmann
4baf162d83 ltq-vdsl-vr11-app: exit more quickly if orderly shutdown fails
On exit, the app tries to do an orderly shutdown of the DSL connection
before it is stopped forcibly. Since the driver does 3 attempts with a
timeout of 2 seconds each, this might take about 6 seconds in the worst
case.

This is problematic on sysupgrade, because any process that doesn't exit
within 4 seconds is killed. This means that the DSL connection might not
be stopped at all before the actual system upgrade begins.

To avoid this, use the newly added option in the driver to not retry the
L3 request on failure.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250130102108.1606919-3-jan@3e8.eu/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-22 18:55:54 +01:00
Jan Hoffmann
03bbd36e67 ltq-vdsl-vr11: add option for L3 request without retry on failure
This allows to attempt an orderly shutdown via L3 request while avoiding
excessive delay in the failure case (up to 6 seconds with the currently
hard-coded 3 attempts).

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250130102108.1606919-2-jan@3e8.eu/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-22 18:55:44 +01:00
Jan Hoffmann
a9b4d1f4b9 ltq-vdsl-vr9-mei: avoid unnecessary usage of unsafe_memcpy
Commit 7bc487c12eef ("kernel: ltq-vdsl-vr9-mei: fix warning about
field-spanning write") patched the driver to use unsafe_memcpy in
MEI_IoctlCmdMsgWrite.

However, this is not actually necessary. The assignment of the variable
"pDestPtr" can be modified so that the compiler knows about the correct
size. This way, the check in the fortified memcpy works correctly.

While at it, also adjust all places where similar code is used to copy
from a CMV_STD_MESSAGE_T struct.

Also mark all related structs as packed, because the code (and the
driver in general) seems to rely on that anyway.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250206225444.2521817-2-jan@3e8.eu/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-22 18:53:19 +01:00
Jan Hoffmann
6df4e4663b ltq-vdsl-vr11-mei: fix field-spanning write warning
Since the update to kernel 6.1, a warning like this appears in the
kernel log:

[   49.773953] ------------[ cut here ]------------
[   49.773998] WARNING: CPU: 3 PID: 2349 at target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_msg_process.c:3570 MEI_IoctlCmdMsgWrite+0x290/0x2c8 [drv_mei_cpe]
[   49.777670] memcpy: detected field-spanning write (size 4) of single field "pDestPtr" at target-arm_cortex-a7+neon-vfpv4_musl_eabi/linux-ipq40xx_generic/dsl_cpe_mei-ugw_8.5.2.10/src/drv_mei_cpe_msg_process.c:3570 (size 2)
...
[   50.087078] ---[ end trace 0000000000000000 ]---

The variable "pDestPtr" points to the field "header.index" in a
CMV_STD_MESSAGE_T struct (header is a CMV_STD_MESSAGE_HEADER_T struct).
The offending code intentionally copies data beyond this field, which is
followed by "header.length" and "payload".

To fix this, change the assignment of "pDestPtr" to use the pointer to
the message plus the offset of the "header.index" field. This way, the
compiler knows about the size and thus the false positive warning
disappears.

While at it, also adjust all places where similar code is used to copy
from a CMV_STD_MESSAGE_T struct.

Also mark all related structs as packed, because the code (and the
driver in general) seems to rely on that anyway.

Fixes: https://github.com/openwrt/openwrt/issues/17142
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250206225444.2521817-1-jan@3e8.eu/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-22 18:53:05 +01:00
Chukun Pan
9df4a88e60 sunxi: enable usbgadget feature
The USB of most sunxi devices works in otg or peripheral mode.
Enable this feature to use usbgadget. Tested on OrangePi Zero3.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250221140105.250920-1-amadeus@jmu.edu.cn/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-22 18:43:23 +01:00
Sander Vanheule
890293c13c realtek: add PoE enable line to Netgear GS310TP
By switching to the new RTL8231 driver in commit b7af54d5c18c ("realtek:
Simple conversions to RTL8231 MFD driver"), the bootloader state of the
RTL8231's pins is now maintained. As the bootloader de-asserts the PoE
enable signal, this means PoE output is no longer available.

Add a gpio-hog with high output, restoring the line value from when the
pin was configured (by default) as an input with a pull-up resistor.
This will hard-enable the PoE output, but the individual ports can still
be administratively disabled by realtek-poe or a similar tool.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-22 12:31:24 +01:00
Kuan-Yi Li
6936deac67 imagebuilder: fix addition of local packages
Since alpinelinux/apk-tools@460d62ee74, relative paths are no longer
accepted in repositories file.

Add local repository in APK command instead to fix this issue.

Fixes: 83d2d21904e0 ("apk: update to Git HEAD (2025-02-08)")
Fixes: https://github.com/openwrt/openwrt/issues/18032
Signed-off-by: Kuan-Yi Li <kyli@abysm.org>
Link: https://github.com/openwrt/openwrt/pull/18048
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-21 10:44:42 +01:00
Nick Hainke
70586f574d ipq40xx: convert GL.iNet GL-S1300 to DSA
Convert the router to DSA.

Co-Developed-by: Matt Beaumont <github@beaum.xyz>
Tested-by: Matt Beaumont <github@beaum.xyz>
Link: https://github.com/openwrt/openwrt/pull/12478
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-02-20 20:02:27 +01:00
Shiji Yang
2b0c973895 tools: fakeroot: update to 1.37
There are no patches that need to be refreshed.

changelog:
https://salsa.debian.org/clint/fakeroot/-/blob/debian/1.37-1/debian/changelog?ref_type=tags

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17879
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-02-20 19:42:50 +01:00
John Audia
57b0304ce9 kernel: bump 6.6 to 6.6.78
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.78

Removed upstreamed:
	bcm27xx/patches-6.6/950-0487-drivers-media-imx296-Add-standby-delay-during-probe.patch[1]
	mediatek/patches-6.6/256-clk-mediatek-mt2701-vdec-fix-conversion-to-mtk_clk_s.patch[2]
	mediatek/patches-6.6/257-clk-mediatek-mt2701-aud-fix-conversion-to-mtk_clk_si.patch[3]
	mediatek/patches-6.6/258-clk-mediatek-mt2701-bdp-add-missing-dummy-clk.patch[4]
	mediatek/patches-6.6/259-clk-mediatek-mt2701-mm-add-missing-dummy-clk.patch[5]
	mediatek/patches-6.6/260-clk-mediatek-mt2701-img-add-missing-dummy-clk.patch[6]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=25abffee5ceb6691ecd4f089be2bb28842e2d2fd
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=b6c5237ab7af82c9f1d8d772dbf309bb4aadfdbb
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=20210b5c775d2d96f706591c64bc2ad975c37eaf
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=a1fa3dda6bf0b7ecd95fa8f9125e5486b699a81f
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=fc60e9357f15372698da373ee76de8f52d22aac2
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=6f4868e6b2887b55531bc8e0a4106ef0150e6326

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18000
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-20 19:27:57 +01:00
George Moussalem
b790989dff qualcommax: ipq50xx: Linksys MX remove superfluous properties and fix indentation
On the ipq50xx platform, the internal GE PHY at phy address 7 on mdio0
must be enabled as it's used to detect the virtual switch in qca-ssdk.
This is a platform wide condition and is therefore part of the dtsi.
However, by enabling the mdio0 bus in board-specific dts files, the ge_phy
is implicitly enabled. So, let's remove the superfluous status property
in the dts files for Linksys MX2000 and MX5500.

While at it, remove the redundant phy-mode property as it's set to sgmii
by default in the ipq5018-ess.dtsi file and fix indentation in the
firmware property of the q5v6_wcss node.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18029
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-20 18:24:39 +01:00
George Moussalem
eacc4d8c9b qualcommax: ipq50xx: use ascii-env driver to set mac address for Linksys MX devices
The ascii-env driver enables reading name pair values from nand in ascii layout.
So, let's pick up and set the mac address accordingly.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18029
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-20 18:24:39 +01:00
Daniel Golle
ab80e6c684 arm-trusted-firmware-mediatek: update to upstream release 2025-02-12
Rebased MediaTek's SoC support patchset on top of upstream ARM
TrustedFirmware-A v2.12+.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-20 00:05:52 +00:00
Michael Trinidad
edfe589811
mwlwifi: update to version 10.4.11-20250206
The fixes are only for the WRT1900X and WRT1200AC.

It contains:

Deletes the driver's ability to modify the debit table.
Remove skb_get(done_skb) in txdone
Reworking ISR
clean code
Napi replaces tasklet
Add rx_decrypt feature

Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
Link: https://github.com/openwrt/openwrt/pull/17997
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-19 09:55:25 +01:00
Jack Sun
bbb3b985b0
tools/autoconf-archive: bump to 2024.10.16
Changelog included in package.

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17826
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-19 09:45:35 +01:00
Jack Sun
e0f5ce9746
tools/autoconf: bump to 2.72
refresh patch:000-relocatable.patch
Announcement:https://lists.gnu.org/archive/html/autotools-announce/2023-12/msg00003.html

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17825
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-19 09:44:46 +01:00
Jack Sun
b930ce3bf7
tools/automake: bump to 1.17
refresh patch:
000-relocatable.patch
100-aclocal-skip-not-existing-directories.patch
101-do-not-require-files.patch
200-other-V-values-for-verbosity.patch
Announcement:https://lists.gnu.org/archive/html/info-gnu/2021-01/msg00010.html

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17827
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-19 09:43:38 +01:00
Jack Sun
abd424c3e1
tools/bc: update to 1.08.1
refresh patch:
001-no_doc.patch
002-fix-libmath.patch
Changelog included in package.

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17828
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-19 09:41:37 +01:00
Jack Sun
208288ff6c
tools/mtools: update to 4.0.47
Release Notes:
https://lists.gnu.org/archive/html/info-gnu/2025-01/msg00010.html

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17829
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-19 09:40:55 +01:00
George Moussalem
02481fb1d9
nvmem: layouts: ascii-env handle CRLF while parsing
Add validation and support for parsing of name/value pairs with CRLF line
endings.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17935
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-19 09:40:21 +01:00
Michał Kępień
08f5a13db1
yafut: update to a version that builds on macOS
The latest upstream version of Yafut builds on macOS and other
POSIX-compatible systems.  Drop the custom OpenWRT patch applying
non-Linux compatibility fixes to the tool's source code.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
Link: https://github.com/openwrt/openwrt/pull/18014
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-19 09:37:46 +01:00
Lix Zhou
b74318481b wifi-scripts: failed to start hostapd if he_spr_psr_enabled is set
he_spr_psr_enabled is appended to hostapd.conf if it's enabled, but hostapd
doesn't support this config, it should be used as an internal flag to control
the he_spr_sr_control configuring.

Signed-off-by: Lix Zhou <xeontz@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18025
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-19 08:07:52 +01:00
Sean Khan
c840629046 wifi-scripts: iwinfo: add definition for QCA9984
Fixes iwinfo output for QCA9984 devices.

Before:
```
  Hardware: nl80211 [Generic MAC80211]
```

After:
```
  Hardware: 0x168c:0x0046 0x168c:0xcafe [Qualcomm, Atheros QCA9984]
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18028
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-19 08:07:20 +01:00
Sean Khan
15013e87cb wifi-scripts: iwinfo: add null checks for rx/tx bitrate
On some devices, the rx/tx bitrate may not always be available
right away, or at all when in mesh mode at plink is blocked causing
the following:

```
Reference error: left-hand side expression is null
In assoclist(), file /usr/share/ucode/iwinfo.uc, line 321, byte 46:
  called from function info (/usr/share/ucode/iwinfo.uc:427:33)
  called from anonymous function (/usr/bin/iwinfo:108:25)

 `                bitrate_raw: station.sta_info.tx_bitrate.bitrate,`
  Near here -----------------------------------------------^
Reference error: left-hand side expression is null
In assoclist(), file /usr/share/ucode/iwinfo.uc, line 314, byte 54:
  called from function info (/usr/share/ucode/iwinfo.uc:427:33)
  called from anonymous function (/usr/bin/iwinfo:108:25)

 `                bitrate: format_rate(station.sta_info.rx_bitrate.bitrate),`
  Near here -------------------------------------------------------^
Reference error: left-hand side expression is null
In assoc_flags(), file /usr/share/ucode/iwinfo.uc, line 216, byte 12:
  called from function assoclist (/usr/share/ucode/iwinfo.uc:323:51)
  called from function info (/usr/share/ucode/iwinfo.uc:427:33)
  called from anonymous function (/usr/bin/iwinfo:108:25)

 `        if (data[k])`
  Near here -------^
```

This was seen on Linksys MX5300 in mesh mode (QCA9984).

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18027
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-19 08:07:20 +01:00
Sean Khan
eabea737fa wifi-scripts: fix missing VHT capabilities detection
* Add missing parentheses in the conditionals for VHT160/VHT160-80PLUS80
  and VHT_MAX_MPDU capabilities. The missing parentheses caused the bitwise
  AND to be evaluated after the equality comparison due to ECMA's operator
  precedence, where `==` has higher precedence than `&`.

* Fix Max MPDU length detection by changing the comparison operators to
  `>=` vs `>` otherwise the condition would never be met.

* Add missing default values:
  - `true` value for `short_gi_80` (As it exists for `short_gi_20`, `short_gi_40`, `short_gi_160`)
  - `7` for `vht_max_mpdu` (Without it the loop in MAX-MPDU-* calculation always compares with null)

* Change the `vht160` condition to `config.vht160 <= 2`. This flag is
  `2` by default, and only ever set to `0` when `vht_oper_chwidth < 2`.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18013
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-19 08:07:20 +01:00
Sean Khan
1851131427 wifi-scripts: fix RX-STBC notation VHT capabilities
Notation for RX-STBC VHT capabilities when specifying number of spatial
streams should be hyphenated, e.g. RX-STBC-1, RX-STBC-2. HT capabilities
use without hyphen, e.g. RX-STBC1, RX-STBC2. This is consistent with
what hostapd expects.

```c
static int hostapd_config_ht_capab(struct hostapd_config *conf,
				   const char *capab)
{
	if (os_strstr(capab, "[RX-STBC1]")) {
		conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
		conf->ht_capab |= HT_CAP_INFO_RX_STBC_1;
	}
	if (os_strstr(capab, "[RX-STBC12]")) {
		conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
		conf->ht_capab |= HT_CAP_INFO_RX_STBC_12;
	}
	if (os_strstr(capab, "[RX-STBC123]")) {
		conf->ht_capab &= ~HT_CAP_INFO_RX_STBC_MASK;
		conf->ht_capab |= HT_CAP_INFO_RX_STBC_123;
	}
}

static int hostapd_config_vht_capab(struct hostapd_config *conf,
				    const char *capab)
{
	if (os_strstr(capab, "[RX-STBC-1]"))
		conf->vht_capab |= VHT_CAP_RXSTBC_1;
	if (os_strstr(capab, "[RX-STBC-12]"))
		conf->vht_capab |= VHT_CAP_RXSTBC_2;
	if (os_strstr(capab, "[RX-STBC-123]"))
		conf->vht_capab |= VHT_CAP_RXSTBC_3;
	if (os_strstr(capab, "[RX-STBC-1234]"))
}
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18013
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-19 08:07:20 +01:00
Sean Khan
7fd9340ec4 wifi-scripts: fix vht_oper_centr_freq_seg0_idx_map calculation
When selecting channels above 100 in VHT160+ modes the center
frequency segment was incorrectly set to 50, causing the interface
to not come up.

Change logic to instead check if the channel is within ±28 channels
of the intended center, which matches the actual 160+ MHz channel
width specification for VHT160, HE160, and EHT160.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/18013
Signed-off-by: John Crispin <john@phrozen.org>
2025-02-19 08:07:20 +01:00
Zoltan HERPAI
1152af3490 sunxi: add support for Merrii Hummingbird A31
Specifications:
 - SoC: Allwinner A31 @ 1GHz
 - DRAM: 1/2Gb DDR3
 - SD-card slot
 - NAND: 8/16Gb MLC
 - Ethernet: 1x 10/100/1000Mbps (RTL8211E)
 - Wireless: Ampak AP6210 (BCM43362)
 - 2x USB2.0
 - 1x mPCIe slot for 4G cards
 - 1x SIM slot
 - HDMI/VGA via simplefb
 - RTC with battery
 - Power via DC12V / 3A

Installation:
Use the standard sunxi installation to an SD-card. NAND is
not supported.

This is to re-add proper support for an older device.

Link: https://openwrt.org/toh/merrii/hummingbird
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-02-18 22:50:16 +01:00
Zoltan HERPAI
e60729c720 uboot-sifiveu: bump to 2023.10
Upgrade the u-boot to a more recent version, and drop and refresh
patches while at it. Additionally, use the correct architecture
when running mkimage.

Runtime-tested:
 - SiFive Unleashed
 - SiFive Unmatched

Dropped:
0009-riscv-Fix-build-against-binutils.patch

Added:
0006-riscv-sifive-fu740-reduce-DDR-speed-from-1866MT-s-to.patch

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-02-18 22:40:26 +01:00
Daniel Golle
ef22d4af1f kernel: add missing patch description
Add missing patch description, so all generic patches can be applied
to a kernel tree using 'git am'.

Fixes: d23e0a0086 ("kernel: backport MHI patch required by an upcoming mac80211 update")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-18 19:32:52 +00:00
Zoltan HERPAI
2aba2b32ce uboot-sunxi: bump to 2025.01
Runtime-tested on:
 - Linksprite pcDuino v2 (A10)
 - Olimex Olinuxino Micro (A20)
 - Bananapi M2 Berry (V40)
 - Bananapi P2 Zero (H2+)
 - OrangePi Zero2 (H616)

Patches refreshed where required.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-02-18 16:28:55 +01:00
Christian Marangi
3a1c19fd6b
apk: disable python module
APK recently introduced python binding support. Disable this sub module
as we don't ship python in normal build to reduce space.

Link: https://github.com/openwrt/openwrt/pull/17925
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-18 15:10:59 +01:00
Christian Marangi
83d2d21904
apk: update to Git HEAD (2025-02-08)
5f127fcc415c convdb: preserve newlines at the end of scripts
e94a2212a0d2 convdb: import package names starting with leading dot
9c0d353c7905 adbdump: use literal block if yaml quoting is needed
93c6a09a8ea8 improve compatibility of shellscripts
6c454d13de9b doc: fix pre/post commit hook documentation
3eb0b70b6d0f solver: rework solver name ordering to fix install_if handling
78c3bdc03cbd solver: make dependencies only packages selectable
373b364ef2a8 build: use the VERSION directly as the soname
6f627d93f5a0 update .gitignore
908f1ee7e87b index, add, pkg: check arch in 'add' only to allow 'index' to work
7c164c471251 index: Fix total always 0
0042b035df53 pkg, db: check arch on apk_db_pkg_add
ffc706689603 applet: always show help for global options
f6a66ebc5876 help: use uppercase usage prefix
7ebb23720483 doc: fix manpage sections
5e5e1f088986 genhelp: reorganize and add --debug output mode
9b371e452fb2 genhelp: do man page link wrangling for COMMANDS text only
2a87e46a354b context: introduce and use apknew_suffix
a6180e4cfa1a meson: add tests option
eb100676c5f0 test: move subdir unit to be the first
a12eae1780e8 test/user/hardlink: be portable to bsd-style stat(1)
f0c096bc034b db: attempt new mount user namespace for chroot in usermode
994e5e4e0006 db: fix "fetch --recurisve" to work
24d8f9677d77 Revert "database: move lock file from /lib/apk to /run/apk"
470432aafe77 applets: simplify option group handling
e1275e2f5010 apk: load global options from /etc/apk/config
8c39b525cd0c add support for repository package name specification
5856cf100241 doc, db: fix repository url_base to be allocated and fetch man page
a0411e87187e cache: fix not to remove indexes
cddca5769e98 apk, commit: support --cache-predownload to first download packages
915e9841ed1c ci: always test all features available
4f94807104e3 commit: print version numbers with --verbose --interactive summary
5bd6d49ac447 fetch: call progress early to avoid flicker
fc66fdfc49cd test: portability fixes
3f73ba343cbd test: shellcheck test suite for bash, dash and busybox
d94671bb1235 test: fixup sourcing testlib.sh to work better with shellcheck
6007db9cdde6 print: refactor progress printing API
a1d7042a2d3b print: further refactor progress API
bed4628c9317 print: reorganize progress to be renderred after apk_out
8cd7362a986c add process main loop to pipe stdout/stderr and logs it
ccfd7ac5e518 db: log script output using apk_process api
3c4594962fb4 db: log uvol output using apk_process api and add tests
fc7768c09497 io_url_wget: log wget output using apk_process api
90a62541751f build: only use VERSION up until first space for soname
378d6360ab17 db: rename apk_db_add_repository to add_repository
5d978c2a5924 db: split open_repository out of add_repository
af812cd28c6d print: simplify code a little bit
4c776eb74997 db: make index refresh notices a progress note
64e053071a89 db: fix non-repository reverese dependency indexing
3cf039322ce1 apk-tools-3.0.0_rc1
90220e710c61 commit: fixup progress during package removal
d11521ec6309 apk-tools-3.0.0_rc2
dc191820b1c4 solver: fix name resolving order of pure virtual names
7da628bc455f libfetch: remove remaining ftp references
10b467c0992a libfetch: remove error generation script
b5b130e1d628 print: flush after progress notice if needed
d71722b9a637 libfetch: rework error codes API
7b0b69a3023f commit: advise on using upgrade --prune and/or --available
1fd82ea2d7dc test: fix spelling s/shuld/should
8eb22149138f process: move apk_exit_status_str as static function
752ee96a25b1 db: refactor repository parsing and url printing
bfa763904fe4 doc: update apk-keys(5) and apk-repositories(5)
165333af1a35 db: introduce and use apk_db_foreach_repository
8e98d6889c92 libfetch: remove unused file scheme and manual pages
30b1c0348d6b remove usage of TRUE/FALSE
fa19887d741c crypto: use explicit algorithm fetching for openssl >=3.0
a706cbdfd5b1 crypto: remove support for obsolete md5
35a57547a7d7 db: remove APK_REPOSITORY_CACHED and use cache_repository
7f616711636c db: const correctness for apk_db_pkg_available
2cda62cd3a4c io: adjust scheme detection in apk_url_local_file()
50a2c12a32b8 db: make repo.url_index a pure blob
a186267a8822 db: make repo.url_base_printable prefix of url_index_printable
9fb473c6a269 add .editorconfig
088c584bf515 mkndx: introduce --filter-spec to filter existing index
0c3188793243 atom: remove apk_atomize_dup0
866374c7cda0 python: add initial python binding
bdf492471328 python: add unittests
9afe8dae79a0 ci: install python3-dev
df3424e5c8cd python: move version to a submodule
3e65a63aa4f1 apk-tools-3.0.0_rc3
946027f6abde test: extend blob_split tests
e73b5e313998 db: do not add empty arch
a6c84f8f62f7 atom: use null atom also for zero length blobs
fb8eef15dc52 db: handle not found names in __apk_db_foreach_sorted_package
0ef8a2223cca commit: don't trigger question with --prune/--available warning
fe484a5c06b9 atom: remove apk_atomize
70fc828cf06b update: make --update-cache and and 'update' behave the same
04e83acfb9b9 upgrade: fix previous commit
cdeebc01283d test: add mkpkg/add symlink test
c2f21ce06a67 mkpkg: do not include filename on error message
de0a4886a91c fs_fsys: do not leave temporary files after failed commit
e5e362c1a65c doc: update --cache-max-age documentation
8d41ff40b59a fetch: fix fetch_err_make() for 32-bit arches
2526fd73bc66 walk_gentext: make state per-module, use apk_ostream for output
bb65553e6423 walk_genadb: make state per-module
a920e5976127 adb_walk: rename scheme to start_scheme and always call end for it
92c573fac280 adb_walk: separate string and numeric values
fe4876bd3a4e adbdump: add support for json output
66cc8da577f0 walk_adb: always call the string scalar function
40bfa97ce3e3 adb: reset dynamic on freeing adb_obj
7519b70d42d1 convert adb_walk_gen* to apk_serializer_*
64c484730c9f add missing serialize.c
83e85aaee220 add missing apk_serialize.h
f70638e12ccc serializer: simplify schema and array handling
9bfc259d9fdb serializer: merge start_schema and start_object to one op
a23368b38ff6 serialize_yaml: improve quoting detection
3a33e75b92aa serialize_adb: move from libapk to apk executable
f5c3fd843824 info: fix -W with symlinks
d54fdb753135 update, version: do not print unavailable repositories
8223c10d4c33 doc: extract arguments are files
a3b4ebcefa3b serialize_yaml/adb: support single quoting, and fixes
77aff1daa967 db: fix --no-cache
f0e3aa4c139d mkpkg: do not call openat() with null pathname
28770f552f4e adb: fix adb_block_init check when extended block is needed
1ca73b6ae892 blob: apk_blob_push_int use uint64_t as value
0b159e23432e print: use uint64_t for progress api progress type
5da830ba51d0 db, commit, print: use uint64_t for file size types
a7b5d8d8eeb9 mkndx, extract: use uint64_t for file size types
639f8ab8d9cd io: use uint64_t for file size as needed
49905d47ee90 io: introduce and use apk_istream_skip
8d83f18647d4 defines: drop muldiv and mulmod helpers
d373a9a6971e db: drop now unused apk_repo_format_cache_index
5700b195d67d pkg: update script execution logging style
00c51e267162 pkg: cap sizes that are allowed for scripts and some v2 fields
5157c540d732 io: fix segment_close to read the inner stream
ad741fe98b72 db: implement system repository list configuration path
6ca1831ed563 use #pragma once instead of ifdef guards
64254d190b32 db, ctx: add and use allocator in apk_ctx
581825bb0811 fix handling of etc/apk/config options with an argument
508b312df637 apk: add APK_CONFIG to overwite path to config file
0e8e7e5a8264 test: fix busybox realpath compat
0186a6aa9d5c apk: support loading configuration options from /lib/apk/config
0c52242990f4 db: fix package name orphan check
a7766c933853 add: don't print misleading error after failed non-repository check
4254863de6ac introduce and use apk_array_foreach and apk_array_foreach_item
b276b3c50618 serialize: separate apk_ser_string and its multiline variant
91dc10b1cddf blob: introduce and use apk_blob_foreach_token
d345a9aa6d25 adbgen: split adbgen specific code to separate file
00522cd60e18 apk: introduce and use APK_OPTVAL_* macros
7f8a1ca12465 list, search: fix origin existence checks
b0bb4a99378b adb: allow copying larger arrays
3fe4258d4c1b mkndx: fix matching packages from old index
b263d961ba12 libfetch/http: reuse fetch_netrc_auth for http(s)
1d4ed5525f54 ctype: fix apk_blob_{spn,cspn} for non-ascii characters
1fa9f3c221c7 genhelp.lua: don't match underscores in the middle of words
48980518436f ctx, trust: load public keys also from lib/apk/keys
ba38d6584599 mkndx: remove --rewrite-arch
a9ea20e37029 context: fix --keys-dir
8abae4785c78 various: fix compilation error for missing inttypes.h
fdb10df21486 various: fix compilation error for missing limits.h
89ef2b546087 database: fix compilation error for missing sched.h
8afd4ab47200 process: correctly handle error from pipe2 and open
1cbbf7457721 crypto_openssl: make sha global variables constant for OpenSSL < 3
025710552ac8 io: fix compilation error for missing stdarg.h
908efa92701c libfetch: allow obsolete date format in http timestamps
70494b5bcdf9 apk: add support for boolean flag arguments
16ab8c549a06 apk: add --cache-packages to enable package caching always
460d62ee743c db: extend repositories file format with commands
34771ccb7964 apk-tools-3.0.0_rc4

Link: https://github.com/openwrt/openwrt/pull/17925
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-18 15:10:58 +01:00
George Moussalem
92132bb9cc qualcommax: ipq50xx: sysupgrade: fix OEM UBI volume name for Linksys MX devices
The UBI volume name in OEM firmware for Linksys MX2000, MX5500, and
SPNMX56 is 'squashfs' instead of 'rootfs'. So let's update the volume
accordingly.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17968
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-18 09:37:25 +01:00
George Moussalem
fe379eb1c1 qualcommax: ipq50xx: add support for Linksys SPNMX56
The SPNMX56 is an ISP-branded and distributed device similar to the MX5500
with the same Wifi chips (IPQ5018 for 2.4G and QCN9074 for 5G) but has an
additional QCA8081 PHY providing a 2.5gbps ethernet WAN port.

Speficiations:
* SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
* Memory: Winbond W634GU6NB-11 (512 MiB DDR3-933)
* Serial Port: 3v3 TTL 115200n8
* Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax)
         QCN9024 (4x4:4 5 Ghz 802.11an/ac/ax)
* Ethernet: IPQ5018 integrated virtual switch connected to an external
            QCA8337 switch (3 Ports 10/100/1000 GBASE-T) and a
            QCA8081 phy (up to 2.5 Gbps)
* Flash: Gigadevice GD5F2GM7RExxG (256 MiB)
* LEDs: 1x multi-color PWM LED
* Buttons: 1x WPS (GPIO 27 Active Low)
           1x Reset (GPIO 28 Acive Low)

Flash instructions:
1. On OEM firmware, login to the device (typically at http://192.168.1.1)
and click 'CA' in the bottom right corner -> Connectivity ->
Manual Upgrade. Alternatively, browse to http://<router IP>/fwupdate.html
Upload openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin
Optionally flash 2nd partition, after first boot check actual partition:
fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin kernel
and in case of 1:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin alt_kernel
2. Installation using serial connection from OEM firmware
hit Enter once booted and enter credentials (login: root, password: admin)
fw_printenv -n boot_part
In case of 2:
flash_erase /dev/mtd12 0 0
nandwrite -p /dev/mtd12 openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin
or in case of 1:
flash_erase /dev/mtd14 0 0
nandwrite -p /dev/mtd14 openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin
After first boot install firmware on second partition:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin kernel
or:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_spnmx56-squashfs-factory.bin alt_kernel
3. Back to the OEM firmware.
Download firmware from OEM website:
Firmware for this device cannot be searched for on the Linksys website.
Instead, we'd have to use serial to intercept the URL of the firmware
while it's trying to update. Firmware is ISP specific:
Toob (UK): http://download.linksys.com/updates/20241125t080737/FW_MX56TB_1.0.1.216218_prod.img

The intention is to collect URLs for different ISPs on a wiki page.

From serial or SSH:
fw_printenv boot_part
in case of 1:
mtd -r -e alt_kernel -n write FW_MX56TB_1.0.1.216218_prod.img alt_kernel
else in case of 2:
mtd -r -e kernel -n write FW_MX56TB_1.0.1.216218_prod.img kernel

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17968
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-18 09:37:25 +01:00
Daniel Golle
31dc43daf5 generic: mtk_eth_soc: dump registers on forced reset
Import patch from MediaTek's SDK to hack-6.6 which dumps all relevant
registers of the Ethernet controller in case of a forced reset.
This can help to debug and find the cause for sporadic resets seen on
Filogic SoCs when used with OpenWrt's Linux 6.6.

Link: 73d44392b8
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-18 04:38:16 +00:00
Robert Senderek
f93367227e ramips: Add support for Mercusys MR1800X as alt name of MR70X
Both share the same OEM firmware but differ in product_name for safeloader
product_name:MR1800X,product_ver:1.0.0,special_id:45550000

Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
Link: https://github.com/openwrt/openwrt/pull/17965
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-17 23:55:13 +01:00
Robert Senderek
1437ff840b tools: firmware-utils: update to Git HEAD (2024-02-16)
2051fe5 mktplinkfw2: Add 16MLmtk layout
5d1446b tplink-safeloader: Add more special_id's for MR70X

Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
Link: https://github.com/openwrt/openwrt/pull/17999
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-17 23:53:13 +01:00
Mieczyslaw Nalewaj
bb84c256e7 ramips: improve MT7621S core detection
The proposed detection method was based on reading the LAUNCH_FREADY core flag.
However, this method only works before the cores are launched.
For this reason, the core number detection method has been changed to a simpler one.
For mt6721s the 17th revision bit is zero, hence we know that it is this chip,
so the number of cores is 1.

Fixes: https://github.com/openwrt/openwrt/issues/17764
Tested-by: Enrico Mioso <mrkiko.rs@gmail.com>
Tested-by: Simon Etzlstorfer <simon@etzi.at>
Tested-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Co-authored-by: Shiji Yang <yangshiji66@qq.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17834
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-17 23:43:27 +01:00
Felix Fietkau
38c21271d2 kernel: receive all bridged multicast packets if IFF_ALLMULTI is set
Fixes issues with odhcpd, especially in relay mode

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-17 12:30:12 +01:00
Chukun Pan
51d485ef31 qualcommax: add support for Aliyun AP8220
Aliyun AP8220 is an AP manufactured by Edgecore.
(Very similar to Edgecore EAP102)

Hardware specifications:
  SoC: Qualcomm IPQ8071A
  RAM: 1GB of DDR4 600MHz
  Flash1: MX25U3235F 4MB
  Flash2: MX30UF1G18AC 128MB
  Ethernet: 2x 2.5G RJ45 port
  USB: 2x USB-A 2.0 port
  WiFi1: QCN5024 2.4GHz
  WiFi2: QCN5054 5GHz
  Power: DC 12V / PoE

Flash instructions:
  1. Connect the router via serial port
  2. Keep pressing @ until uboot is interrupted
  3. Download the initramfs image, rename it to
     initramfs.bin, host it with tftp server
  4. Run these commands:
     tftpboot initramfs.bin
     bootm
  5. After openwrt boots up, use scp or luci
     to upload sysupgrade.bin to upgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/17970
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-17 10:21:21 +01:00
Chukun Pan
b6fa124bdf qualcommax: cleanup network script indent
Cleanup 02_network script indentation.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/17970
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-17 10:21:21 +01:00
Chukun Pan
f138507683 ipq-wifi: update to version 2025-02-16
Contains following updates:

 * Add BDFs for Linksys MR7500
 * ipq5018: add Wallys DR5018
 * ipq5018: add BDF for Linksys MR5500
 * qcn9074: add BDF for Linksys MR5500
 * ipq5018: add BDF for Linksys SPNMX56
 * qcn9074: add BDF for Linksys SPNMX56
 * ipq8074: add Aliyun AP8220 BDF

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/17970
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-17 10:21:21 +01:00
Pietro Ameruoso
74f0c95154 mediatek: filogic: fix sysupgrade for ex5601-t0-stock
fix undesired red warning when upgrading in place ex5601-t0-stock model.

Signed-off-by: Pietro Ameruoso <p.ameruoso@live.it>
Link: https://github.com/openwrt/openwrt/pull/17973
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-16 22:48:12 +01:00
Anton Yu. Ivanusev
144e8199d0 ramips: fixes for Keenetic KN-1613,1711,1713,1910
Fixed the 5G mac address on KN-1910, rolled back the image size to stock
(there are no errors with loading large images in version 24.10.0),
minor spelling errors.

Signed-off-by: Anton Yu. Ivanusev <ivanusevanton@yandex.ru>
Link: https://github.com/openwrt/openwrt/pull/17946
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-16 22:37:27 +01:00
Raylynn Knight
de0e6a9501 ramips: Add alternate support for TP-Link FR205
This is a MT7621-based device with 128MB NAND flash, 256MB RAM, and a USB port.
It is identical hardware to the already supported TP-Link ER605 v2 right
down to the PCB ID.  The only differences are the color of the case and
the factory firmware features.

Signed-off-by: Raylynn Knight <rayknight@me.com>
Link: https://github.com/openwrt/openwrt/pull/17728
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-16 21:20:51 +01:00
Tim Harvey
5a124ff167 imx: cortexa53: fix sysupgrade image device support for venice
Set the SUPPORTED_DEVICES Device var so that sysupgrade images
are supported without a force.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17964
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-16 16:46:51 +01:00
Tim Harvey
ee73d35fbe imx: cortexa53: add 'gateworks,imx8m*' to sysupgrade board checks
The upstream device-tree files are now using 'gateworks' instead of 'gw'
for compatible. Add this pattern so that the newer boards support
sysupgrade.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17964
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-16 16:46:51 +01:00
Aleksander Jan Bajkowski
9772ca190e mediatek: filogic: upstream LEDs control on 2.5G ports on EX5601
This commit switches the control of the leds connected to the Maxlinear
GPY211C PHY to an upstream solution. The behaviour of LED1 is the same
as before. The behaviour of 2.5G-WAN LED has been changed. It is only
active when a 2.5G link is detected, which matches the stock software.
Additionally, the name of the WAN led has been changed to INTERNET.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/17952
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-16 16:31:05 +01:00
Fabian Groffen
26d43b039d octeon/generic: ubnt,erlite: define profile
Currently the erlite install shows Model as EBNT_E100, uses eth0 as lan,
eth1 as wan, and doesn't use eth2.

- define dts for this device, such that we get a cleaner naming here
- fix handing of this device to inlude eth2
- change eth0 to wan, like er-4/usg/etc as it once was intended

Fixes: https://github.com/openwrt/openwrt/issues/14946
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Link: https://github.com/openwrt/openwrt/pull/17758
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-16 16:06:10 +01:00
John Audia
b4e6fd7b76 openssl: update to 3.0.16
Changes between 3.0.15 and 3.0.16 [11 Feb 2025]

CVE-2024-13176[1] - Fixed timing side-channel in ECDSA signature
computation.

There is a timing signal of around 300 nanoseconds when the top word of
the inverted ECDSA nonce value is zero. This can happen with significant
probability only for some of the supported elliptic curves. In
particular the NIST P-521 curve is affected. To be able to measure this
leak, the attacker process must either be located in the same physical
computer or must have a very fast network connection with low latency.

CVE-2024-9143[2] - Fixed possible OOB memory access with invalid
low-level GF(2^m) elliptic curve parameters.

Use of the low-level GF(2^m) elliptic curve APIs with untrusted explicit
values for the field polynomial can lead to out-of-bounds memory reads
or writes. Applications working with "exotic" explicit binary (GF(2^m))
curve parameters, that make it possible to represent invalid field
polynomials with a zero constant term, via the above or similar APIs,
may terminate abruptly as a result of reading or writing outside of
array bounds. Remote code execution cannot easily be ruled out.

1. https://www.openssl.org/news/vulnerabilities.html#CVE-2024-13176
2. https://www.openssl.org/news/vulnerabilities.html#CVE-2024-9143

Build system: x86/64
Build-tested: bcm27xx/bcm2712
Run-tested: bcm27xx/bcm2712

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17947
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-16 12:59:49 +01:00
Daniel Golle
4387de9445 mediatek: apply bootloader work-around for affected ASUS devices
Apply "u-boot-dont-touch-spi-nand" to ASUS RT-AX59U, ASUS TUF-AX4200 as
well as ASUS TUF-AX6000 routers to prevent U-Boot from wiping MTD
child nodes from DT.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-15 16:47:57 +00:00
Daniel Golle
c48afca32c mediatek: add work-around for ASUS bootloader MTD behavior
ASUS makes use of U-Boot's fdt_fixup_mtdparts() function which applies
the partitions defined in U-Boot's mtdparts and mtdids environment
variables to the devicetree passed over to Linux.

The undesired side-effect is that in this way also all additional
properties and child nodes get wiped, preventing NVMEM cells to be
defined for MTD partitions or UBI volumes.

To work-around this issue, add an additional compatible string
'u-boot-dont-touch-spi-nand' which can be used instead of 'spi-nand' in
case the replacement of the MTD partitions by U-Boot should be skipped
alltogether.

In practise this is mostly relevant for SPI-NAND which anyway comes only
with two partitions nowadays: 'Bootloader' and 'UBI_DEV'. Hence this
work-around is applicable for SPI-NAND only. Similar work-arounds for
other MTD devices can be created as well should they actually be needed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-15 16:47:57 +00:00
Zoltan HERPAI
054bdc7877 opensbi: bump to 1.6
Upgrade the OpenSBI firmware used by RISC-V CPUs to 1.6.

Runtime-tested:
 - d1 (LicheeRV Dock)
 - sifiveu (SiFive Unleashed)

Updates since last release:

1.6:
Support for parsing riscv,isa-extensions DT property
Setup serial console very early in cold boot path
Support for multiple heaps and aligned memory allocation
Support for shadow stacks (Zicfiss) ISA extension
Support for landing pads (Zicfilp) ISA extension
Support for per-domain data
Support for double-trap (Smdbltrp/Ssdbltrp) ISA extensions
DT-based configurable heap size
Common fdt_driver and helpers for driver initialization
Support for SBI PMU raw event v2 (Experimental)
Simple FDT based mailbox driver framework
RPMI shared memory transport driver (Experimental)
RPMI system reset driver (Experimental)
Simple FDT based system suspend driver framework
RPMI system suspend driver (Experimental)
Simple FDT based HSM driver framework
RPMI HSM driver (Experimental)
Simple FDT based CPPC driver framework
RPMI CPPC driver (Experimental)
SBI Message Proxy (MPXY) extension (Experimental)
Simple FDT based MPXY driver framework
Common RPMI client driver for MPXY (Experimental)
Support for vector misaligned load/store

1.5.1:
Save/restore menvcfg only when it exists
Adjust Sscofpmf mhpmevent mask for upper 8 bits
Fix potential NULL pointer dereferences in SBI DBTR
Fix incorrect size passed to sbi_zalloc() in SBI FWFT
Check result of pmp_get() in is_pmp_entry_mapped()

1.5:
SBI debug triggers (DBTR) extension (Experimental)
Support to specify coldboot harts in DT
Relocatable FW_JUMP_ADDR and FW_JUMP_FDT_ADDR
Smcsrind and Smcdeleg extensions support
SBIUnit testing framework
Initial domain context management support
Platform specific load/store emulation callbacks
New trap context
Improved sbi_trap_error() to dump state in a nested trap
SBI supervisor software events (SSE) extension (Experimental)
Simplified wait_for_coldboot() implementation
Early wakeup of non-coldboot HART in the coldboot path
Sophgo CV18XX/SG200X series support
APLIC delegation DT property fix
Svade and Svadu extensions support
SBI firmware features (FWFT) extension (Experimental)

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-02-15 15:31:54 +01:00
George Moussalem
9fb44638ba nss-dp: switchdev: apply flag dependency directives
The FDB roaming issues were observed on ipq807x and ipq60xx boards.
The fix depends on API exposed only when NSS_DP_PPE_SUPPORT is enabled.
However, this flag applies to above mentioned platforms only and is
causing the logs to be flooded on other QCA platforms, including ipq50xx,
with:

[   34.893418] nss-dp 39c00000.dp1 lan: cannot get VSI ID for port 1
[   34.898370] nss-dp 39c00000.dp1 lan: cannot get VSI ID for port 1
[   34.904598] nss-dp 39c00000.dp1 lan: cannot get VSI ID for port 1
[   34.910661] nss-dp 39c00000.dp1 lan: cannot get VSI ID for port 1

So let's apply a dependency on the NSS_DP_PPE_SUPPORT flag and contain
the patch code for ipq807x and ipq60xx within conditional directives.

Tested on: Linksys SPNMX56

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17966
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-14 12:39:17 +01:00
Felix Fietkau
3dfd1f69a7 mt76: update to Git HEAD (2025-02-14)
2919ae2c0f94 wifi: mt76: mt7996: revise TXS size
1aaacd335577 wifi: mt76: mt7996: fix SER reset trigger on WED reset
e9396ad2378f wifi: mt76: mt7996: remove unnecessary key->cipher check for BIP frames
e5fef138524e mt76: only mark tx-status-failed frames as ACKed on mt76x0/2

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-14 11:30:39 +01:00
Linus Walleij
78b78a4268 gemini: Convert to use module for Realtek switch
Only the DIR-685 uses a Realtek DSA switch currently so
convert this platform to load it from a module and save
memory on all other devices.

At the same time drop the rt2800 PCI package that this
device actually isn't using, it needs an out-of-tree
wireless driver.

Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250207-gemini-rtl-dsa-module-v3-1-e25a3df8bdc0@linaro.org/
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-02-14 00:34:16 +01:00
Felix Fietkau
562ced3d8f umdns: add cli module
This makes it easy to browse mDNS services and hosts on the local network

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-13 19:00:30 +01:00
Felix Fietkau
f7c5a2b7d4 unetd: add cli module
This vastly simplifies creating and managing unet networks.
It also adds support for the unetd protocol for onboarding new nodes
over the network.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-13 19:00:30 +01:00
Felix Fietkau
248b66b44f cli: add OpenWrt CLI
This provides an easy to use modular CLI that can be used to interact with
OpenWrt services. It has full support for context sensitive tab completion
and help.
Extra modules can be provided by packages and can extend the existing node
structure in any place.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-13 19:00:30 +01:00
Felix Fietkau
be31d44bd9 ucode-mod-uline: add package for ucode terminal line editing
It provides a ucode module with similar functionality as libreadline,
however with much smaller code and no dependencies aside from ucode and
libubox.
It also provides shell-style parsing/escaping code useful for building
a CLI.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-13 19:00:30 +01:00
Daniel Golle
b6415e9fa9 arm-trusted-firmware-tools: update to version 2.12
Upstream changes:
 3789c3c00 build: determine toolchain tools dynamically
 ccbfd01d9 fix(tools): update the fiptool and certtool to fix POSIX build
 7c4e1eea6 build: unify verbosity handling
 10327628c Merge "feat(stm32mp2): add ddr-fw parameter for fiptool" into integration
 a11230ad0 refactor(fiptool): change all occurrences of RSS to RSE
 e494afc05 feat(stm32mp2): add ddr-fw parameter for fiptool
 ffb774212 build: use new toolchain variables for tools
 cc277de81 build: refactor toolchain detection
 503cf9927 refactor(juno): move plat_def_uuid_config to fiptool
 4d4fec281 feat(fiptool): add ability to build statically
 352366ede refactor(ethos-n): move build flags to ethosn_npu.mk
 aa57ce632 build(tools): avoid unnecessary link
 d4affdce8 Merge "fix(stm32mp1): add void entry in plat_def_toc_entries" into integration
 570a23099 fix(fiptool): move juno plat_fiptool.mk
 8214ecdab fix(stm32mp1): add void entry in plat_def_toc_entries

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-13 03:16:40 +00:00
Shiji Yang
43bc5e6e12 Revert "Revert "ramips: mt7620: fix patching mac address in caldata""
This reverts commit f628467dfd6b32ead172d33a2593f04901395343.

The initial fix was correct. However, a recently introduced bug in
base-files can cause some unexpected byte overwriting in eeprom.
Since it has been fixed, let's accept this patch again.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-13 00:26:23 +01:00
Shiji Yang
094b6f593f base-files: fix offset conversion on caldata_patch_data()
`$(( ))` will convert uninitialized variable to "0". If we want to
use "-n" to check the string length, it's necessary to make sure the
converted variable is not empty.

Fixes: 652a6677d5fa ("base-files: Add new functions for ath11k caldata")
Fixes: https://github.com/openwrt/openwrt/issues/17818
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-13 00:26:23 +01:00
Shiji Yang
3aa9b70836 ramips: mt7620: add missing PA/LNA pinctrl for Linksys E1700
This device has high-power external PA and LNA[1]. So we must
configure PA/LNA pins to make the wireless work properly.

[1] https://fccid.io/Q87-E1700/Internal-Photos/Internal-Photos-pdf-2135639.pdf
Fixes: https://github.com/openwrt/openwrt/issues/7959
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-13 00:26:22 +01:00
Shiji Yang
693108a318 mac80211: rt2x00: fix eeprom load from PCI eFuse
When eeprom name is not defined, the file load function should
return an error code so that it can fallthrough to read eeprom
form NIC inside eFuse.

Fixes: https://github.com/openwrt/openwrt/issues/17854
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-13 00:26:22 +01:00
Lech Perczak
40fc6bd5cc ath79: mikrotik: fix reference clock of Routerboard 911G
When support for Routerboard 911G was introduced, Routerboad 912UAG
device tree was used as a base, and the common part. This led to use of
40MHz as the reference clock frequency for both [1], while RB911G uses 25MHz
crystal on the board, causing heavy system clock drift.

Split the definition, and set the reference clock frequency for RB911G
back to 25MHz.

[1] a716ac556497 ("ath79: fix reference clock for RouterBoard 912UAG")

Fixes: bcc44b1212b2 ("ath79: support for MikroTik RouterBOARD 911G-(2,5)HPnD")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17944
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-13 00:24:14 +01:00
John Audia
16924e55f0 kernel: bump 6.6 to 6.6.77
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.77

No patches automatically rebased/checksum update only

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17822
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-13 00:03:54 +01:00
John Audia
84e370f16c kernel: bump 6.6 to 6.6.76
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.76

Manually rebased:
	bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch
	imx/patches-6.6/600-PCI-imx6-Start-link-at-max-gen-first-for-IMX8MM-and-IMX8MP.patch

Removed upstreamed:
	bcm27xx/patches-6.6/950-1446-media-i2c-ov9282-Correct-the-exposure-offset.patch[1]
	bcm47xx/patches-6.6/701-bgmac-reduce-max-frame-size-to-support-just-MTU-1500.patch[2]
	bcm53xx/patches-6.6/700-bgmac-reduce-max-frame-size-to-support-just-MTU-1500.patch[3]
	ramips/patches-6.6/003-v6.14-clk-ralink-mtmips-remove-duplicated-xtal-clock-for-Ralink.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.76&id=11c7649c9ec3dcaf0a7760551ad30747d9e02d81
2, 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.76&id=5e6e723675e54ced5200bcc367e2526badc4070c
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.76&id=d0edcd0d18d700d76c61c091a24568b8b8c3b387

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17822
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-13 00:03:54 +01:00
John Audia
9790417109 kernel: bump 6.6 to 6.6.75
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.75

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17822
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-13 00:03:54 +01:00
John Audia
11f1f67a3e qualcommb/ipq95xx: refresh patches ahead of 6.6.75
Refreshed patches for qualcommb/ipq95xx by running
make target/linux/refresh after creating a .config containing:
CONFIG_TARGET_qualcommbe=y
CONFIG_TARGET_qualcommbe_ipq95xx=y
CONFIG_TARGET_qualcommbe_ipq95xx_DEVICE_qcom_rdp433=y

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17822
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-13 00:03:54 +01:00
Klaas Demter
71a966c480 uboot-envtools: add support for ZyXEL GS-1900-24EP
It seems the that this was forgotten during initial adding of the
device in 0688cf5aebe1dc9a2e7f3820861783c2a7a75d44

Thanks to
https://forum.openwrt.org/t/zyxel-gs1900-10hp-revision-b1-support-openwrt-firmware/131841/32
for putting me on the right track for this problem

Error that is being fixed - running fw_printenv results in:
"Warning: Bad CRC, using default environment"
and not showing boardmodel

Workaround, manually changing /etc/fw_env.config to
"/dev/mtd1 0x0 0x400 0x10000"

Signed-off-by: Klaas Demter <psychic-stool-cozy@duck.com>
Link: https://github.com/openwrt/openwrt/pull/17920
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-12 23:32:35 +01:00
Felix Fietkau
8118b2dace hostapd: fix sta psk index for dynamic psk auth
Depending on the config / circumstances, the get_psk call can be called
multiple times from differnt places, which can lead to wrong sta->psk_idx
values. The correct call is the one that is also interested in the vlan_id,
so use the vlan_id pointer as indication of when to set sta->psk_idx.
Also fix off-by-one error for secondary PSKs

Fixes: b2a2c286170d ("hostapd: add support for authenticating with multiple PSKs via ubus helper")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-12 11:57:50 +01:00
Rany Hany
4779b731d4 hostapd: update to version 2025-02-09
Manually refreshed:

010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
110-mbedtls-TLS-crypto-option-initial-port.patch
140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
301-mesh-noscan.patch
601-ucode_support.patch
780-Implement-APuP-Access-Point-Micro-Peering.patch

Dropped upstreamed:

330-nl80211_fix_set_freq.patch
804-hostapd-Fix-clearing-up-settings-for-color-switch.patch

Automatically rebased all other patches.

Tested-by: Rany Hany <rany_hany@riseup.net> # ramips_mt7621/asus_rt-ax53u, mt7622/xiaomi_redmi-router-ax6s
Tested-by: Andre Heider <a.heider@gmail.com> # filogic/openwrt_one, ramips_mt7621/netgear_wac124
Tested-by: Agustin Lorenzo <agustin.lorenzo@thinco.es> # qualcommax/ipq807x (AX3600)
Tested-by: Daniel Pawlik <pawlik.dan@gmail.com> # BPi-R4 with mt7996
Signed-off-by: Rany Hany <rany_hany@riseup.net>
2025-02-12 11:17:02 +01:00
Felix Fietkau
1ee44825ad wifi-scripts: fix mac address allocation with macaddr_base set
The 00 address_mask needs to be inverted, otherwise the mac address
allocation will modify the last byte instead of the first one.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-11 18:28:45 +01:00
Felix Fietkau
04570f5ee2 build: fix building llvm tarball
Add missing select NEED_BPF_TOOLCHAIN in order to ensure that the toolchain
actually gets built.

Fixes: https://github.com/openwrt/openwrt/issues/17926
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-10 22:10:50 +01:00
Felix Fietkau
dd5c598de0 umdns: update to Git HEAD (2025-02-10)
c0a2aa12c397 ubus: allow query without specifying interface
c5ca22a71b2e cache: improve service discovery reliability

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-10 21:41:05 +01:00
Felix Fietkau
0e672e9806 ucode: update to Git HEAD (2025-02-10)
a362263595e6 vm: fix inverted condition in uc_vm_signal_handlers_setup()
1b8660d33fb7 tests: adjust testcases after previous commit
4efad5388184 main: fix crash on printing -p output
0b80ceb29311 vm: close signal pipe in uc_vm_signal_handlers_reset()
175686c97d82 uci: eliminate usage of global variables
0f69da9c3777 struct: fix memory leak in buffer.pull()
47f3a6b69908 debian/control: Build-Depend on cmake
01efa7b92100 debian/control: Fix Standards-Version, add Bugs
f50149d67fef debian/source/format: change to native
bd001ae4f830 debian/control: libucode Recommends ucode-modules
87776a0bc2b2 docs: Mention `libmd` in macOS docs
826a5c9de7d3 docs: Fix compilation command for macOS
1fa771fc91c0 debian/copyright: fix missing dot to separate paragraphs
60c0e5eae992 debian/control: pkg-config now called pkgconf
244570db4f8e debian/changelog: switch versioning to native package scheme
fa2326fc00a0 .gitignore: ignore files generated by debuild
faec62367524 debian: ignore lintian warning no-manual-page
af881af4b0dc main: add global SCRIPT_NAME variable
5cbd32514187 socket: fix AF_PACKET recvmsg() and sockaddr formatting
6f71a35c4cfa rtnl: properly handle runtime exceptions in listener callback
6dd08716205f ci: bump actions/upload-artifact to v4
001ced17982f socket: properly support SO_ATTACH_FILTER sockopt
f0e865fe3ddd ubus: add named parameter support in functions with many params
18a2ffaf51fa fs: ioctl: export constants for direction values
0ba75bea925d fs: ioctl: improve ioctl read to avoid allocating twice
9da8b8aa4ad0 ubus: add defer.await() method
17dbf0bef4b6 ubus: add request get_fd/set_fd methods
4acb960c90f7 ubus: add support for sending file descriptors via ubus.call/defer
22b9523565a5 ubus: add support for receiving file descriptors in call and defer
c0d1654a450b ubus: add support for channels
b32321beb112 vm: fix crash due to stale frame pointer

Fixes: https://github.com/jow-/ucode/issues/254
Fixes: https://github.com/jow-/ucode/issues/255
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-10 17:02:20 +01:00
Erik Servili
302c717aa3 uboot-mediatek: port patches for FORESEE NAND support
Backport FORESEE NAND chip support from upstream Linux. The newly
introduced FORESEE F35SQA001G was found on the Xiaomi AX3000T.

Signed-off-by: Erik Servili <serverror@serverror.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2025-02-09 22:01:36 +00:00
Shiji Yang
4be1bab9ed uboot-mediatek: move default env files to a dedicated directory
Putting all files in the root folder is too messy.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2025-02-09 22:01:21 +00:00
Shiji Yang
b85c5f6817 uboot-mediatek: enable auto switch chip detect for Xiaomi AX3000T
The Xiaomi AX3000T has two hardware revisions. One uses MT7531
switch, and the other uses AN8855 switch. Set "mediatek,switch"
property to "auto" to be compatible with different switches.

Tested-by: Mikhail Zhilkin <csharper2005@gmail.com>
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2025-02-09 21:50:58 +00:00
Shiji Yang
4e7c991af5 uboot-mediatek: backport more mtk platform pending fixes
* Cumulative fixes and updates for MediaTek platform. [1]
* Update mt7981 pinctrl driver based on upstream kernel. [2]

[1] https://lore.kernel.org/u-boot/cover.1737104723.git.weijie.gao@mediatek.com/
[2] https://lore.kernel.org/u-boot/20250124033902.187796-1-weijie.gao@mediatek.com/

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2025-02-09 21:50:58 +00:00
Shiji Yang
2266d8c077 uboot-mediatek: sync mtk-openwrt open source u-boot patches
Synchronize the latest MTK u-boot patches[1]. Some patches have
been amended since last synchronization.

Changes:
* Minor NMBM layer fixes and improvements.
* A new bootmenu shortkey implementation.
* New SPI flash support for en25qx128.

[1] https://github.com/mtk-openwrt/u-boot/tree/mtksoc-20230719

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2025-02-09 21:50:58 +00:00
Shiji Yang
24ade65ab5 uboot-mediatek: backport mtk_eth fixes from u-boot next
This patch series will provide better support for Mediatek
ethernet and add support for Airoha AN8855.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2025-02-09 21:50:58 +00:00
Shiji Yang
10b16d9328 uboot-mediatek: update to v2025.01
Remove upstreamed patches:
010-menu-fix-the-logic-checking-whether-ESC-key-is-press.patch [1]
011-menu-add-support-to-check-if-menu-needs-to-be-reprin.patch [2]
012-bootmenu-add-reprint-check.patch [3]

Remove outdated patches:
455-arm-provide-noncached_set_region-prototype-to-fix-build.patch

Some patches have been manually rebased to match the upstream
changes. This patch also fixes the dtc warning for reserved-memory
dts node. If #address-cells and #size-cells are not same as the
root node definitions, the dtc will complain about it.

All defconfigs are refreshed by `make "$board"_defconfig` and
`make savedefconfig`.

[1] ddac69885e
[2] ccdd7948e2
[3] 599652cff1

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2025-02-09 21:50:58 +00:00
Evan Jobling
cbd1acbad3 realtek: HPE 1920-48G-PoE: allow fan speed control
The JG928A has an RTL8231 on the aux mdio bus. Add it to dts to expose
the GPIO pins used to control and monitor the fan speed. To enable speed
control, add the appropriate kernel driver module to DEVICE_PACKAGES.

Of note, this does not control all fans for the unit. The power supply
fans are not controlled.

Signed-off-by: Evan Jobling <evan@jobling.au>
Link: https://github.com/openwrt/openwrt/pull/17699
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-09 21:36:55 +01:00
Hauke Mehrtens
95a4ed8d24 CI: labeler: Add qualcommbe target
Add a label for changes in the qualcommbe target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/17922
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-09 21:04:19 +01:00
Hauke Mehrtens
c3f6e8e940 CI: labeler: extend qualcommax target
Add two qualcommax specific packages to the qualcommax labeler.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Link: https://github.com/openwrt/openwrt/pull/17922
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-09 21:04:19 +01:00
Robert Marko
1bb1b03f69 uboot-envtools: ipq60xx: code simplification
Do the same code simplification as was done for ipq807x to avoid code
duplication.

Link: https://github.com/openwrt/openwrt/pull/17907
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-09 20:34:40 +01:00
Aleksander Jan Bajkowski
c9ea2799b7 mediatek: filogic: increase spi flash memory speed on ZyXEL EX5601
The factory firmware uses a 20 MHz frequency, so it should be safe.

Before:
10485760 bytes (10 MB, 10 MiB) copied, 2.53096 s, 4.1 MB/s

After:
10485760 bytes (10 MB, 10 MiB) copied, 1.51901 s, 6.9 MB/s

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Link: https://github.com/openwrt/openwrt/pull/17749
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-09 18:16:41 +01:00
Pietro Ameruoso
d023ee7439 mediatek: filogic: fix mt7986a-zyxel-ex5601-t0-stock.dts model name and eth1 wan definition
Fix the model name to reflect the stock partitioning and the wan eth1 detection in the 02_network script.

Fixes: https://github.com/openwrt/openwrt/issues/14432
Fixes: b5df398a36f1 ("mediatek: add Zyxel EX5601-T0 with uboot custom partition")
Signed-off-by: Pietro Ameruoso <p.ameruoso@live.it>
Link: https://github.com/openwrt/openwrt/pull/17859
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-09 16:06:11 +01:00
Tianling Shen
92814fec77 uboot-rockchip: bump to 2025.01
Removed upstreamed patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/17558
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-09 13:51:49 +01:00
Robert Marko
89dd393d8c qualcommax: drop the fake IPQ5018 SNAND compatible
Devices that rely on faking the NAND controler compatible for U-Boot
to patch the nodes should add it in their DTS directly, this does not
belong in the SoC DTSI.

Link: https://github.com/openwrt/openwrt/pull/17908
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-09 09:21:13 +01:00
Robert Marko
24db75d242 qualcommax: replace SPI NAND with latest series
Replace the existing SPI NAND controller patches with the latest v14 set
that is pending upstream, and include Ansuels patch that fixes it.

Bindings patch is removed as there is no point carrying it in OpenWrt.

Link: https://github.com/openwrt/openwrt/pull/17908
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-09 09:21:13 +01:00
Felix Fietkau
05138fe898 umdns: add firewall rule for configured interfaces
Makes it easier to enable MDNS on wan without having to edit the firewall
configuration for it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-08 22:31:46 +01:00
Christian Marangi
4b6886d9fd generic: fix Qcom SNAND driver and move to backports directory
Add patch to fix Qcom SNAND driver and move the SNAND patches to
backports directory as they are shared between qualcommax and qualcommbe
target.

Fixes: #17897
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17900
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-08 10:41:27 +01:00
Felix Fietkau
6605e45676 build: conditionally build llvm bpf toolchain by default
Unless another toolchain is present (or selected), build the bpf toolchain
whenever a package is selected that needs it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-07 11:16:08 +01:00
Robert Marko
411df8fbc4 qualcommax: ipq50xx: refresh kernel config
Refresh the ipq50xx kernel config as it looks like it was created by hand
instead of kernel_menuconfig so we have stuff like DWC3 which is packaged
as a kmod in a generic way, QMI helpers are part of backports etc.

Link: https://github.com/openwrt/openwrt/pull/17890
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-07 11:02:52 +01:00
Mikhail Zhilkin
3299d19c01 mediatek: fix nmbm configuration mismatch (Xiaomi AX3000t)
This commit fixes nmbm configuration mismatch error on Xiaomi AX3000t
with Winbond W25N01KVZEIR spi-nand:
'''
[    0.786783] NMBM configuration mismatch
'''

Root cause:
1. U-Boot W25N01KV spi-nand driver ia compiled with 64B OOB size for the
   chip and store this size in the nmbm signature;
2. Linux W25N01KV driver use 96B OOB.

The change doesn't affect AX3000t variants with other spi-nand chips
(ESMT, Foresee) because their Linux drivers use 64B OOB.

Fixes: openwrt#16972
Tested-by: Aleksandr Danilov <sc16me@gmail.com>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17549
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-07 09:04:35 +01:00
Mikhail Zhilkin
e585ae70d4 kernel: nmbm: add mediatek,bmt-mtd-overridden-oobsize property
This commit adds new "mediatek,bmt-mtd-overridden-oobsize" property. The
property helps avoid "NMBM configuration mismatch" error if mtd "OOB size"
is not equal to the "spare size" which is stored in the nmbm signature.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17549
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-07 09:04:35 +01:00
Robert Marko
98d7f4202f qualcommax: disable IPQ5018 specific symbols
Newly introduced IPQ5018 specific symbols will stop compilation of
ipq807x and ipq60xx subtargets, so make sure to disable them in the
generic config.

Link: https://github.com/openwrt/openwrt/pull/17884
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 21:59:30 +01:00
Robert Marko
b61c192e75 libiwinfo: update to Git HEAD (2025-02-06)
9ff15f7ee3a0 devices: add device id for MediaTek MT7992E
94b3a3c1a6c4 devices: add device id for Qualcomm Atheros IPQ5018
9cec6b4dd2df devices: add device id for Qualcomm Atheros QCN6122

Link: https://github.com/openwrt/openwrt/pull/17878
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 14:51:11 +01:00
Robert Marko
47d605410e ipq-wifi: update to Git HEAD (2025-02-06)
12948ce23744 Revert "ipq6018: add BDF for Edgecore EAP101"
6b3522faae1a ipq6018: add BDF for Edgecore EAP101
0411c6b1a00a ipq5018: add BDF for Linksys MX2000
feb4f2dfaa1b qcn6122: add BDF for Linksys MX2000
29819c35c8a5 ipq5018: add BDF for Linksys MX5500
38b0e9ee0f3c qcn9074: add BDF for Linksys MX5500

Link: https://github.com/openwrt/openwrt/pull/17877
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 14:50:43 +01:00
Chukun Pan
08ebb9e914
tools: ccache: disable build testing
The ccache build relies on doctest, which
is useless and can be disabled.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Link: https://github.com/openwrt/openwrt/pull/17700
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-06 12:55:21 +01:00
Chukun Pan
e1451a53e1
tools: add xxhash package for ccache
The ccache build requires xxhash, which is download from
the Internet. So add host-build package for xxhash.

Fixes: #16851
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
[ use git source proto ]
Link: https://github.com/openwrt/openwrt/pull/17700
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-06 12:55:21 +01:00
George Moussalem
c9c0f1d8e5 mac80211: ath11k: poll reo status ring for IPQ5018
This downstream patch fixes a bug which could flood the logs with the
following message and would eventually lead to a crash.

ath11k c000000.wifi: failed to send HAL_REO_CMD_UPDATE_RX_QUEUE cmd, tid 0 (-105)

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:14 +01:00
George Moussalem
398f4a9737 qualcommax: ipq50xx: add support for Linksys MX2000 and MX5500
Add support for Linksys MX2000 (Atlas 6) and MX5500 (Atlas 6 Pro).
These devices are completely identical except for the secondary wifi
chip used for 5Ghz: QCN6102 is used on MX2000 while QCN9024 is used
on MX5500

Speficiations:
* SoC: Qualcomm IPQ5018 (64-bit dual-core ARM Cortex-A53 @ 1.0Ghz)
* Memory: Winbond W634GU6NB-11 (512 MiB DDR3-933)
* Serial Port: 3v3 TTL 115200n8
* Wi-Fi: IPQ5018 (2x2 2.4 Ghz 802.11b/g/n/ax)
* Wi-Fi: MX2000: QCN6102 (2x2:2 5 Ghz 802.11an/ac/ax)
         MX5500: QCN9024 (4x4:4 5 Ghz 802.11an/ac/ax)
* Ethernet: IPQ5018 integrated virtual switch connected to an external
            QCA8337 switch (4 Ports 10/100/1000 GBASE-T)
* Flash: Macronix MX35UF2GE4AD (256 MiB)
* LEDs: 1x multi-color PWM LED
* Buttons: 1x WPS (GPIO 27 Active Low)
           1x Reset (GPIO 28 Acive Low)

Flash instructions (in case of MX2000, else replace with MX5500 images):
1. On OEM firmware, login to the device (typically at http://192.168.1.1) and click 'CA'
in the bottom right corner -> Connectivity -> Manual Upgrade. Alternatively, browse to
http://<router IP>/fwupdate.html.
Upgrade firmware using openwrt-qualcommax-ipq50xx-linksys_mx2000-squashfs-factory.bin image.
Optionally install on second partition, after first boot check actual partition:
fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_mx2000-squashfs-factory.bin kernel
and in case of 1:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_mx2000-squashfs-factory.bin alt_kernel
2. Installation using serial connection from OEM firmware (default login: root, password: admin):
fw_printenv -n boot_part
In case of 2:
flash_erase /dev/mtd12 0 0
nandwrite -p /dev/mtd12 openwrt-qualcommax-ipq50xx-linksys_mx2000-squashfs-factory.bin
or in case of 1:
flash_erase /dev/mtd14 0 0
nandwrite -p /dev/mtd14 openwrt-qualcommax-ipq50xx-linksys_mx2000-squashfs-factory.bin
After first boot install firmware on second partition:
mtd -r -e kernel -n write openwrt-qualcommax-ipq50xx-linksys_mx2000-squashfs-factory.bin kernel
or:
mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq50xx-linksys_mx2000-squashfs-factory.bin alt_kernel
3. Back to the OEM firmware.
Download firmware from OEM website:
MX2000: https://support.linksys.com/kb/article/585-en/
MX5500: https://support.linksys.com/kb/article/587-en/
From serial or SSH:
fw_printenv boot_part
in case of 1:
mtd -r -e alt_kernel -n write FW_MX2000_1.1.7.210469_prod.img alt_kernel
else in case of 2:
mtd -r -e kernel -n write FW_MX2000_1.1.7.210469_prod.img kernel

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
George Moussalem
f76b846eea mac80211: ath11k: add support for QCN6122 wifi
Add QCN6122 platform support.

QCN6122 is a PCIe based solution that is attached to and enumerated
by the WPSS (Wireless Processor SubSystem) Q6 processor.

Though it is a PCIe device, since it is not attached to APSS processor
(Application Processor SubSystem), APSS will be unaware of such a decice
and hence it is registered to the APSS processor as a platform device(AHB).
Because of this hybrid nature, it is called as a hybrid bus device.

As such, QCN6122 is a hybrid bus type device and follows the same codepath
as for WCN6750.

This is a reversed engineered and heavily simplified version of below
downstream patch:
https://git.codelinaro.org/clo/qsdk/oss/system/feeds/wlan-open/-/ \
blob/NHSS.QSDK.12.4.5.r2/mac80211/patches/232-ath11k-qcn6122-support.patch

Co-developed-by: George Moussalem <george.moussalem@outlook.com>
Signed-off-by: Sowmiya Sree Elavalagan <ssreeela@codeaurora.org>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
George Moussalem
552056622d ath11k-firmware: add wifi firmware for QCN6122
Add ability to download and package ath11k firmware for QCN6122.
QCN6122 is specific/exclusive to the IPQ5018 platform and firmware
files are publishes in a subdirectory of the IPQ5018 firmware files.

While at it, add support for packaging BDFs for QCN6122 wifi and
update iwinfo to recognize QCN6122 wifi.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
George Moussalem
432f2f83de mac80211: ath11k: Support setting bdf-addr and caldb-addr via DT
IPQ5018 uses different BDF and caldb addresses for vairous boards,
so let's support reading these addresses from the device tree.

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
George Moussalem
f520f54ab2 mac80211: ath11k: fix remapped ce access on 64-bit OS
https://lore.kernel.org/linux-wireless/TYZPR01MB55563B3A689D54D18179E5B4C9192@TYZPR01MB5556.apcprd01.prod.exchangelabs.com/

Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
George Moussalem
ea83f7de2b ath11k-firmware: add wifi firmware for IPQ5018
Add ability to download and package ath11k firmware for IPQ5018.

As part of commit 172ccf7, the source is pointed to the new QCA repo.
Until QCA publishes updated firmware for IPQ5018 and QCN6122, we need
to download the firmware from the old QUIC repo. As such, add a new
download routine for IPQ5018/QCN6122 to fetch the firmware files from
the old repo.

While at it, add support for packaging BDFs for IPQ5018-based boards
and update iwinfo to recognize IPQ5018 wifi.

Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
George Moussalem
34d9172655 qualcommax: add ipq50xx target
Introduce support for the Qualcomm IPQ50xx SoC.
This series adds support for the following components:
- minimal boot support: GCC/pinctrl/watchdog/CPUFreq/SDI (upstreamed)
- USB2 (upstreamed)
- Thermal/Tsens
- PCIe gen2 1&2-lane PHY and controller
- PWM and PWM LED
- QPIC SPI NAND controller
- CMN PLL Block (provider of fixed rate clocks to GCC/ethernet/more.)
- Ethernet: IPQ5018 Internal GE PHY (1 gbps)
- Remoteproc MPD driver for IPQ5018 (2.4G) & QCN6122 (5/6G) Wifi

Co-developed-by: Ziyang Huang <hzyitc@outlook.com>
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
George Moussalem
39750798f7 qca-nss-dp: add support for IPQ50xx
Add support for the Qualcomm IPQ50xx in the QCA NSS dataplane driver.
The QCA implementation uses depracated DMA api calls and a downstream SCM
call, so convert to proper Linux DMA and SCM api calls.
In addition, add fixed-link support to support SGMII which is used to
connect the internal IPQ50xx switch to an external switch (ex. QCA8337)

Co-developed-by: Ziyang Huang <hzyitc@outlook.com>
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
George Moussalem
7bffb469bc qca-ssdk: add support for ipq50xx
The codename for IPQ50xx is Maple (abbreviated as 'MP'), so let's pass
the codename to allow the QCA-SSDK to build for the IPQ50xx SoC.

In addition, disable compiling the MP_PHY driver in favor of a native
driver being upstreamed.

Co-developed-by: Ziyang Huang <hzyitc@outlook.com>
Signed-off-by: Ziyang Huang <hzyitc@outlook.com>
Signed-off-by: George Moussalem <george.moussalem@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
Luiz Angelo Daros de Luca
62a5280b8b kernel: modules: netdevices: add realtek DSA modules
Uses upstream DSA switch modules (rtl8365mb, rtl8366), similar to
RTL8367C and rtl8366rb swconfig drivers.

The package dependencies exclude targets built without kernel CONFIG_OF.

It also fixes the rtl8366rb LED support.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17182
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-06 09:51:13 +01:00
Zoltan HERPAI
c332a7d5a0 imx-bootlets: bump to 10.12.01
- refresh patches
 - add patch to fix compilation with GCC13
   (referring to ARM-8933/1).

Link: https://lore.kernel.org/lkml/20220630133231.272605764@linuxfoundation.org/
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2025-02-05 22:00:09 +01:00
Michael Heimpold
6f63eb71f3 mxs: adapt default package list for Duckbill devices
Replace outdated package names, order the remaining.

firewall4 is added again, since it is enabled by default.
The device is not a router by default, so this package
makes no sense in the default config. User can enable it
by theirself, or it will be automatically pulled via
dependency, e.g. luci-app-firewall.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-02-05 22:00:09 +01:00
Michael Heimpold
da33d7928c mxs: image: slightly adjust whitespace (no functional change)
Seems that the common style is to have whitespace around the operators
and the indent is single tab.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-02-05 22:00:09 +01:00
Michael Heimpold
77a1a5ef8e mxs: fix image generation for I2SE Duckbills
The standard U-Boot boot scripts for Duckbills expect the
Linux kernel and device tree files installed below /boot
within the (ext4) root filesystem.
Also a raw zImage is expected instead of uImage.

Extend the SD card generation accordingly and while at,
install all possible Duckbill DT blobs there.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2025-02-05 22:00:09 +01:00
Sander Vanheule
b410f2216c realtek: drop old RTL8231 driver
The old RTL8231 driver integrated the MDIO bus access with the GPIO
control ops, making this driver not very portable to newer platforms.
It depended on the SoC ID instead of the compatible to determine the
MDIO access register, further complicating portability.

A new MFD driver is now available, which offers proper pin config as
well as optional LED support, which can work on any (bitbanged) MDIO
bus. Now that all devices have been migrated, we can drop the old code.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-05 20:55:19 +01:00
Álvaro Fernández Rojas
5dd763680e kernel: r8168: update to v8.055.00
Changelog: https://github.com/openwrt/rtl8168/compare/8.054.00...8.055.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-02-05 08:56:07 +01:00
Christian Marangi
f480fa60d3
generic: fix broken NVMEM ASCII patch for x86 target and mute warning
Fix broken NVMEM ASCII patch for x86 target as it does currently fail
compilation when OF is not compiled.

Also mute a warning for integer from pointer without a cast.

Fixes: 73a6cb983c46 ("generic: add pending support for NVMEM ASCII ENV layout driver")
Link: https://github.com/openwrt/openwrt/pull/17845
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-05 08:34:58 +01:00
Chuanhong Guo
2e5e022c30 siflower: move soruce-only flag to sf19a2890 subtarget
sf21 contains support for Bananapi BPI-RV2 which is a board available
to the general public. Limit the source-only flag to sf19a2890 instead.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2025-02-05 11:12:42 +08:00
Chuanhong Guo
704c9d0d1a siflower: sf19a2890: refresh kconfig
update kconfig for symbols from the newly added subtarget

Link: https://github.com/openwrt/openwrt/pull/17115
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2025-02-05 11:08:38 +08:00
Chuanhong Guo
b8a8bf53e9 siflower: sf21: add support for Bananapi BPI-RV2
Specification:
 - Siflower SF21H8898
 - 512MB DDR3, 128MB SPI-NAND and 16MB SPI-NOR
 - 5x Gigabit ports (SF23P1240 QSGMII PHY and SF23P1211F RGMII PHY)
 - 1x 2.5G port (Airoha EN8811H PHY)
 - M.2 Key B slot with USB2.0, PCIEx1 and a NanoSIM card slot
 - MiniPCIe slot with USB2.0 and PCIEx1
 - 1x USB2.0 port through USB Hub
 - PCF8563-compatible RTC

The SoC can only boot from SPI0. Two SPI flash chipselects are connected
to GPIO5 (SPI0 CS) and GPIO36 through a 2x2 jumper. It boots from
SPI-NOR or SPI-NAND depending on how the jumpers are connected.

The firmware can be flashed using U-boot web recovery from Siflower
vendor U-boot.

Link: https://github.com/openwrt/openwrt/pull/17115
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2025-02-05 11:08:37 +08:00
Chuanhong Guo
c057db94f8 siflower: sf21: new subtarget for sf21a6826/sf21h8898
Siflower SF21A6826/SF21H8898 are a family of RISC-V SoCs with:

 * Quad-core T-Head C908 (1.125G for SF21A6826, 1.25G for SF21H8898)
 * DDR3/DDR4 memory controller
 * 1 QSGMII 4x1G
 * 1 SGMII/2500Base-X 2.5G
 * 1 additional RGMII on SF21H8898
 * Network offloading engine for L2 switching and L3 NAT
 * 2 PCIE Gen2 lanes, operating in either one PCIE Gen2x2 or two
   PCIE Gen2x1 mode
 * 1 USB2.0

Link: https://github.com/openwrt/openwrt/pull/17115
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2025-02-05 11:08:37 +08:00
Chuanhong Guo
274df8eedb siflower: add ngpios property to gpio-siflower
The same GPIO controller is found on all current Siflower SoCs,
with different number of GPIOs. Add ngpios property instead of
specifying it with dt match data.

Link: https://github.com/openwrt/openwrt/pull/17115
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2025-02-05 11:08:37 +08:00
Chuanhong Guo
bbde170ec6 siflower: add per-subtarget image makefile
Move SF19A2890 images into a separated .mk in preparation for
more subtargets.

Link: https://github.com/openwrt/openwrt/pull/17115
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2025-02-05 11:08:37 +08:00
Paul Spooren
63e178f067 build: lock versions for special APK packages
The three packages base-files, libc and kernel are special, the former
can't be upgraded in place since it's content are modified on startup,
the latter two are virtual packages only used as constraints for the
package manager.

Historically base-files was "locked" via a special OPKG function, the
latter two were hidden from the package index and thereby never picked
as possible upgrade.

Time moved forward and we now have APK and tools like OWUT. The latter
compares available packages with installed packages and generates user
readable output, requiring versions for libc and kernel, too. At the
same time, APK uses a different looking mechanism, which is set during
installation instead of part of the package metadata.

In short, this patch adds version constraints to the three packages,
allowing them to be part of the package index.

Fixes: #17774
Fixes: #17775
Fixes: efahl/owut#31

Signed-off-by: Paul Spooren <mail@aparcar.org>
2025-02-04 13:48:59 +00:00
Hauke Mehrtens
f628467dfd Revert "ramips: mt7620: fix patching mac address in caldata"
This reverts commit 3295f6f1c254cd7e5e5285a05581bf6abbde8999.

It looks like the eeprom gets broken after this change.
I think this change was not tested on a real device before it was
merged.
The MAC addresses will be broken again after this revert.

Fixes: #17818
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-04 00:07:25 +01:00
Chuanhong Guo
fb566abab9 mediatek: refresh adtran nvmem patch
This patch fails to apply due to the recently introduced ascii
nvmem driver.
Manually refresh it.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2025-02-03 18:00:42 +08:00
Christian Marangi
c4fe3e9502
ipq806x: make use of ASCII env NVMEM driver for Linksys EAX devices
Make use of ASCII env NVMEM driver for Linksys EAX devices. This also
fix a problem with Linksys EAX devices where the 2 MAC interface had the
same MAC address causing a conflicts with FDB entry. This got much more
present with the DSA conversion making the system not usable.

To fix this, increment + 1 the MAC address for the WAN interface.

Link: https://github.com/openwrt/openwrt/pull/17839
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-03 01:54:26 +01:00
Christian Marangi
73a6cb983c
generic: add pending support for NVMEM ASCII ENV layout driver
Add pending patch to support NVMEM ASCII ENV layout driver. This is a
generic driver to handle simple NVMEM partition that store environment
in a simple text format. This is the case for Linksys devinfo partition
that are litterally txt file with format "name=value\n"

Such driver works similar to u-boot,env with a similar format. While at
it also introduce a patch to generalize mac-base handling for also other
layout driver.

Link: https://github.com/openwrt/openwrt/pull/17839
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-03 01:54:26 +01:00
Christian Marangi
eba2fbf638
ipq806x: fix broken WAN on Linksys EAX and Asrock G10
Fix broken WAN on Linksys EAX and Asrock G10 by incrementing the WAN
interface MAC address + 1. This caused conflicting entry in the FDB
table and caused the WAN port to malfunction with the DSA conversion.

Fixes: #17157
Fixes: #15585
Fixes: #16604
Link: https://github.com/openwrt/openwrt/pull/17839
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-03 01:54:26 +01:00
Shiji Yang
cfca9d6894 ramips: fix xtal clock registration issue on RT3883
The redundant xtal clock source caused clock registration failure.

Link: https://lore.kernel.org/all/20250108093636.265033-1-sergio.paracuellos@gmail.com/
Fixes: https://github.com/openwrt/openwrt/issues/17677
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17830
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-02 20:22:25 +01:00
1098 changed files with 68430 additions and 8938 deletions

545
.config
View File

@ -69,6 +69,10 @@ CONFIG_TARGET_ramips_mt76x8=y
# CONFIG_TARGET_ramips_mt76x8_DEVICE_comfast_cf-wr617ac is not set
# CONFIG_TARGET_ramips_mt76x8_DEVICE_comfast_cf-wr758ac-v1 is not set
# CONFIG_TARGET_ramips_mt76x8_DEVICE_comfast_cf-wr758ac-v2 is not set
<<<<<<< HEAD
# CONFIG_TARGET_ramips_mt76x8_DEVICE_cudy_m1200-v1 is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_TARGET_ramips_mt76x8_DEVICE_cudy_tr1200-v1 is not set
# CONFIG_TARGET_ramips_mt76x8_DEVICE_cudy_wr1000 is not set
# CONFIG_TARGET_ramips_mt76x8_DEVICE_d-team_pbr-d1 is not set
@ -345,6 +349,10 @@ CONFIG_KERNEL_IPV6_PIMSM_V2=y
# CONFIG_KERNEL_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_KERNEL_LWTUNNEL_BPF is not set
# CONFIG_KERNEL_NET_L3_MASTER_DEV is not set
<<<<<<< HEAD
# CONFIG_KERNEL_DCB is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_KERNEL_XDP_SOCKETS is not set
CONFIG_KERNEL_PAGE_POOL=y
# CONFIG_KERNEL_PAGE_POOL_STATS is not set
@ -457,6 +465,10 @@ CONFIG_EXTRA_GCC_CONFIG_OPTIONS=""
CONFIG_MUSL_DISABLE_CRYPT_SIZE_HACK=y
CONFIG_GDB=y
# CONFIG_GDB_PYTHON is not set
<<<<<<< HEAD
CONFIG_HAS_BPF_TOOLCHAIN=y
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_HAS_PREBUILT_LLVM_TOOLCHAIN is not set
CONFIG_USE_MUSL=y
CONFIG_SSP_SUPPORT=y
@ -488,7 +500,11 @@ CONFIG_TARGET_INIT_ENV=""
CONFIG_TARGET_INIT_CMD="/sbin/init"
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
CONFIG_VERSIONOPT=y
<<<<<<< HEAD
CONFIG_VERSION_DIST="OpenWrt-CGHMND-Node"
=======
CONFIG_VERSION_DIST="OpenWrt-CGHMND-GW"
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
CONFIG_VERSION_NUMBER=""
CONFIG_VERSION_CODE=""
CONFIG_VERSION_REPO="https://downloads.openwrt.org/snapshots"
@ -514,6 +530,10 @@ CONFIG_PACKAGE_base-files=y
# CONFIG_PACKAGE_block-mount is not set
# CONFIG_PACKAGE_blockd is not set
# CONFIG_PACKAGE_bridge is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_bridger is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
CONFIG_PACKAGE_busybox=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_DEFAULT_HAVE_DOT_CONFIG=y
@ -2575,6 +2595,10 @@ CONFIG_PACKAGE_procd=y
CONFIG_PACKAGE_procd-seccomp=y
# CONFIG_PACKAGE_procd-selinux is not set
# CONFIG_PACKAGE_qos-scripts is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_qosify is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_refpolicy is not set
CONFIG_PACKAGE_resolveip=y
CONFIG_PACKAGE_rpcd=y
@ -2792,6 +2816,10 @@ CONFIG_PACKAGE_libiwinfo-data=y
# CONFIG_PACKAGE_ath10k-firmware-qca99x0-ct is not set
# CONFIG_PACKAGE_ath10k-firmware-qca99x0-ct-full-htt is not set
# CONFIG_PACKAGE_ath10k-firmware-qca99x0-ct-htt is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_ath11k-firmware-ipq5018 is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_ath11k-firmware-ipq6018 is not set
# CONFIG_PACKAGE_ath11k-firmware-ipq8074 is not set
# CONFIG_PACKAGE_ath11k-firmware-qca2066 is not set
@ -2863,6 +2891,10 @@ CONFIG_PACKAGE_libiwinfo-data=y
# CONFIG_PACKAGE_i915-firmware-guc is not set
# CONFIG_PACKAGE_i915-firmware-huc is not set
# CONFIG_PACKAGE_ibt-firmware is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_ice-firmware is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_iwl3945-firmware is not set
# CONFIG_PACKAGE_iwl4965-firmware is not set
# CONFIG_PACKAGE_iwlwifi-firmware-ax101 is not set
@ -3034,6 +3066,21 @@ CONFIG_PACKAGE_wireless-regdb=y
# end of Block Devices
#
<<<<<<< HEAD
# Bluetooth Support
#
# CONFIG_PACKAGE_kmod-ath3k is not set
# CONFIG_PACKAGE_kmod-bluetooth is not set
# CONFIG_PACKAGE_kmod-bluetooth-6lowpan is not set
# CONFIG_PACKAGE_kmod-btmrvl is not set
# CONFIG_PACKAGE_kmod-btsdio is not set
# CONFIG_PACKAGE_kmod-btusb is not set
# CONFIG_PACKAGE_kmod-hci-uart is not set
# end of Bluetooth Support
#
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CAN Support
#
# CONFIG_PACKAGE_kmod-can is not set
@ -3479,6 +3526,12 @@ CONFIG_PACKAGE_kmod-nft-offload=y
# CONFIG_PACKAGE_kmod-dsa-mv88e6060 is not set
# CONFIG_PACKAGE_kmod-dsa-mv88e6xxx is not set
# CONFIG_PACKAGE_kmod-dsa-qca8k is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_kmod-dsa-realtek is not set
# CONFIG_PACKAGE_kmod-dsa-rtl8365mb is not set
# CONFIG_PACKAGE_kmod-dsa-rtl8366rb is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
CONFIG_PACKAGE_kmod-dummy=y
# CONFIG_PACKAGE_kmod-e100 is not set
# CONFIG_PACKAGE_kmod-e1000 is not set
@ -3490,6 +3543,10 @@ CONFIG_PACKAGE_kmod-dummy=y
# CONFIG_PACKAGE_kmod-hfcpci is not set
# CONFIG_PACKAGE_kmod-i40e is not set
# CONFIG_PACKAGE_kmod-iavf is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_kmod-ice is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_kmod-ifb is not set
# CONFIG_PACKAGE_kmod-igb is not set
# CONFIG_PACKAGE_kmod-igc is not set
@ -3582,6 +3639,20 @@ CONFIG_PACKAGE_kmod-dummy=y
# CONFIG_PACKAGE_kmod-fou is not set
# CONFIG_PACKAGE_kmod-fou6 is not set
# CONFIG_PACKAGE_kmod-geneve is not set
<<<<<<< HEAD
CONFIG_PACKAGE_kmod-gre=y
CONFIG_PACKAGE_kmod-gre6=y
# CONFIG_PACKAGE_kmod-inet-diag is not set
CONFIG_PACKAGE_kmod-ip6-tunnel=y
# CONFIG_PACKAGE_kmod-ipip is not set
# CONFIG_PACKAGE_kmod-ipsec is not set
CONFIG_PACKAGE_kmod-iptunnel=y
CONFIG_PACKAGE_kmod-iptunnel6=y
# CONFIG_PACKAGE_kmod-jool-netfilter is not set
CONFIG_PACKAGE_kmod-l2tp=y
CONFIG_PACKAGE_kmod-l2tp-eth=y
CONFIG_PACKAGE_kmod-l2tp-ip=y
=======
# CONFIG_PACKAGE_kmod-gre is not set
# CONFIG_PACKAGE_kmod-gre6 is not set
# CONFIG_PACKAGE_kmod-inet-diag is not set
@ -3594,6 +3665,7 @@ CONFIG_PACKAGE_kmod-iptunnel=y
# CONFIG_PACKAGE_kmod-l2tp is not set
# CONFIG_PACKAGE_kmod-l2tp-eth is not set
# CONFIG_PACKAGE_kmod-l2tp-ip is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_kmod-macremapper is not set
# CONFIG_PACKAGE_kmod-macsec is not set
# CONFIG_PACKAGE_kmod-mdio-netlink is not set
@ -3617,7 +3689,11 @@ CONFIG_PACKAGE_kmod-ppp=y
# CONFIG_PACKAGE_kmod-ppp-synctty is not set
# CONFIG_PACKAGE_kmod-pppoa is not set
CONFIG_PACKAGE_kmod-pppoe=y
<<<<<<< HEAD
CONFIG_PACKAGE_kmod-pppol2tp=y
=======
# CONFIG_PACKAGE_kmod-pppol2tp is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
CONFIG_PACKAGE_kmod-pppox=y
# CONFIG_PACKAGE_kmod-pptp is not set
# CONFIG_PACKAGE_kmod-qrtr-mhi is not set
@ -3651,7 +3727,11 @@ CONFIG_PACKAGE_kmod-slhc=y
# CONFIG_PACKAGE_kmod-tcp-scalable is not set
# CONFIG_PACKAGE_kmod-tls is not set
# CONFIG_PACKAGE_kmod-trelay is not set
<<<<<<< HEAD
CONFIG_PACKAGE_kmod-tun=y
=======
# CONFIG_PACKAGE_kmod-tun is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
CONFIG_PACKAGE_kmod-udptunnel4=y
CONFIG_PACKAGE_kmod-udptunnel6=y
# CONFIG_PACKAGE_kmod-veth is not set
@ -3663,12 +3743,16 @@ CONFIG_PACKAGE_kmod-wireguard=y
# Other modules
#
# CONFIG_PACKAGE_kmod-6lowpan is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_kmod-bcma is not set
=======
# CONFIG_PACKAGE_kmod-ath3k is not set
# CONFIG_PACKAGE_kmod-bcma is not set
# CONFIG_PACKAGE_kmod-bluetooth is not set
# CONFIG_PACKAGE_kmod-bluetooth-6lowpan is not set
# CONFIG_PACKAGE_kmod-btmrvl is not set
# CONFIG_PACKAGE_kmod-btsdio is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_kmod-button-hotplug is not set
# CONFIG_PACKAGE_kmod-dma-ralink is not set
# CONFIG_PACKAGE_kmod-echo is not set
@ -4050,11 +4134,19 @@ CONFIG_GOLANG_BUILD_CACHE_DIR=""
# CONFIG_PACKAGE_lpeg is not set
# CONFIG_PACKAGE_lsqlite3 is not set
# CONFIG_PACKAGE_lsqlite3-lua5.3 is not set
<<<<<<< HEAD
CONFIG_PACKAGE_lua=y
=======
# CONFIG_PACKAGE_lua is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_lua-argparse is not set
# CONFIG_PACKAGE_lua-bencode is not set
# CONFIG_PACKAGE_lua-bit32 is not set
# CONFIG_PACKAGE_lua-cjson is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_lua-cjson-lua5.3 is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_lua-copas is not set
# CONFIG_PACKAGE_lua-coxpcall is not set
# CONFIG_PACKAGE_lua-cs-bouncer is not set
@ -4083,6 +4175,10 @@ CONFIG_LUA_ECO_MBEDTLS=y
# CONFIG_PACKAGE_lua-eco-ubus is not set
# CONFIG_PACKAGE_lua-eco-websocket is not set
# CONFIG_PACKAGE_lua-ev is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_lua-examples is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_lua-ffi is not set
# CONFIG_PACKAGE_lua-ffi-lua5.3 is not set
# CONFIG_PACKAGE_lua-ffi-lua5.4 is not set
@ -4132,6 +4228,19 @@ CONFIG_HAS_LUAJIT_ARCH=y
#
# Node.js
#
<<<<<<< HEAD
# CONFIG_PACKAGE_node-arduino-firmata is not set
# CONFIG_PACKAGE_node-cylon is not set
# CONFIG_PACKAGE_node-cylon-firmata is not set
# CONFIG_PACKAGE_node-cylon-gpio is not set
# CONFIG_PACKAGE_node-cylon-i2c is not set
# CONFIG_PACKAGE_node-hid is not set
# CONFIG_PACKAGE_node-homebridge is not set
# CONFIG_PACKAGE_node-javascript-obfuscator is not set
# CONFIG_PACKAGE_node-serialport is not set
# CONFIG_PACKAGE_node-serialport-bindings is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# end of Node.js
#
@ -4462,7 +4571,12 @@ CONFIG_PACKAGE_ucode-mod-uloop=y
# Compression
#
# CONFIG_PACKAGE_libbz2 is not set
<<<<<<< HEAD
CONFIG_PACKAGE_liblz4=y
# CONFIG_LZ4_OPTIMIZE_SPEED is not set
=======
# CONFIG_PACKAGE_liblz4 is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_liblzma is not set
# CONFIG_PACKAGE_libunrar is not set
# CONFIG_PACKAGE_libzip-gnutls is not set
@ -5235,7 +5349,12 @@ CONFIG_PACKAGE_libblobmsg-json=y
# CONFIG_PACKAGE_libbpf is not set
# CONFIG_PACKAGE_libbsd is not set
# CONFIG_PACKAGE_libcap is not set
<<<<<<< HEAD
CONFIG_PACKAGE_libcap-ng=y
# CONFIG_PACKAGE_libcap-ng-bin is not set
=======
# CONFIG_PACKAGE_libcap-ng is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_libcares is not set
# CONFIG_PACKAGE_libcbor is not set
# CONFIG_PACKAGE_libcgroup is not set
@ -5352,12 +5471,21 @@ CONFIG_PACKAGE_libjson-c=y
# CONFIG_PACKAGE_libloragw is not set
# CONFIG_PACKAGE_libltdl is not set
# CONFIG_PACKAGE_liblto is not set
<<<<<<< HEAD
CONFIG_PACKAGE_liblua=y
# CONFIG_PACKAGE_liblua5.3 is not set
# CONFIG_PACKAGE_liblua5.4 is not set
CONFIG_PACKAGE_liblucihttp=y
CONFIG_PACKAGE_liblucihttp-lua=y
CONFIG_PACKAGE_liblucihttp-ucode=y
=======
# CONFIG_PACKAGE_liblua is not set
# CONFIG_PACKAGE_liblua5.3 is not set
# CONFIG_PACKAGE_liblua5.4 is not set
# CONFIG_PACKAGE_liblucihttp is not set
# CONFIG_PACKAGE_liblucihttp-lua is not set
# CONFIG_PACKAGE_liblucihttp-ucode is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_liblzo is not set
# CONFIG_PACKAGE_libmad is not set
# CONFIG_PACKAGE_libmagic is not set
@ -5519,7 +5647,11 @@ CONFIG_PACKAGE_libreadline=y
CONFIG_PACKAGE_libubox=y
# CONFIG_PACKAGE_libubox-lua is not set
CONFIG_PACKAGE_libubus=y
<<<<<<< HEAD
CONFIG_PACKAGE_libubus-lua=y
=======
# CONFIG_PACKAGE_libubus-lua is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
CONFIG_PACKAGE_libuci=y
# CONFIG_PACKAGE_libuci-lua is not set
# CONFIG_PACKAGE_libuci2 is not set
@ -5556,6 +5688,10 @@ CONFIG_PACKAGE_libustream-mbedtls=y
# CONFIG_PACKAGE_libwebsockets-openssl is not set
# CONFIG_PACKAGE_libwpe is not set
# CONFIG_PACKAGE_libwrap is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_libxdp is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_libxerces-c is not set
# CONFIG_PACKAGE_libxerces-c-samples is not set
# CONFIG_PACKAGE_libxkbcommon is not set
@ -5579,7 +5715,10 @@ CONFIG_PACKAGE_libustream-mbedtls=y
# CONFIG_PACKAGE_msgpack-c is not set
# CONFIG_PACKAGE_mtdev is not set
# CONFIG_PACKAGE_musl-fts is not set
<<<<<<< HEAD
=======
# CONFIG_PACKAGE_mxml is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_nspr is not set
# CONFIG_PACKAGE_oath-pam is not set
# CONFIG_PACKAGE_oniguruma is not set
@ -5593,9 +5732,15 @@ CONFIG_PACKAGE_libustream-mbedtls=y
# CONFIG_PACKAGE_protobuf-lite is not set
# CONFIG_PACKAGE_pthsem is not set
# CONFIG_PACKAGE_re2 is not set
<<<<<<< HEAD
CONFIG_PACKAGE_rpcd-mod-luci=y
# CONFIG_PACKAGE_rpcd-mod-rad2-enc is not set
CONFIG_PACKAGE_rpcd-mod-rrdns=y
=======
# CONFIG_PACKAGE_rpcd-mod-luci is not set
# CONFIG_PACKAGE_rpcd-mod-rad2-enc is not set
# CONFIG_PACKAGE_rpcd-mod-rrdns is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_rpcd-mod-wireguard is not set
# CONFIG_PACKAGE_sbc is not set
# CONFIG_PACKAGE_serdisplib is not set
@ -5633,8 +5778,13 @@ CONFIG_PACKAGE_zlib=y
#
# 1. Collections
#
<<<<<<< HEAD
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-light=y
=======
# CONFIG_PACKAGE_luci is not set
# CONFIG_PACKAGE_luci-light is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_luci-nginx is not set
# CONFIG_PACKAGE_luci-ssl is not set
# CONFIG_PACKAGE_luci-ssl-openssl is not set
@ -5643,7 +5793,11 @@ CONFIG_PACKAGE_zlib=y
#
# 2. Modules
#
<<<<<<< HEAD
CONFIG_PACKAGE_luci-base=y
=======
# CONFIG_PACKAGE_luci-base is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_LUCI_SRCDIET is not set
CONFIG_LUCI_JSMIN=y
CONFIG_LUCI_CSSTIDY=y
@ -5690,6 +5844,18 @@ CONFIG_LUCI_CSSTIDY=y
# CONFIG_LUCI_LANG_zh_Hant is not set
# end of Translations
<<<<<<< HEAD
CONFIG_PACKAGE_luci-compat=y
CONFIG_PACKAGE_luci-lua-runtime=y
CONFIG_PACKAGE_luci-mod-admin-full=y
# CONFIG_PACKAGE_luci-mod-battstatus is not set
# CONFIG_PACKAGE_luci-mod-dashboard is not set
# CONFIG_PACKAGE_luci-mod-dsl is not set
CONFIG_PACKAGE_luci-mod-network=y
# CONFIG_PACKAGE_luci-mod-rpc is not set
CONFIG_PACKAGE_luci-mod-status=y
CONFIG_PACKAGE_luci-mod-system=y
=======
# CONFIG_PACKAGE_luci-compat is not set
# CONFIG_PACKAGE_luci-lua-runtime is not set
# CONFIG_PACKAGE_luci-mod-admin-full is not set
@ -5700,6 +5866,7 @@ CONFIG_LUCI_CSSTIDY=y
# CONFIG_PACKAGE_luci-mod-rpc is not set
# CONFIG_PACKAGE_luci-mod-status is not set
# CONFIG_PACKAGE_luci-mod-system is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# end of 2. Modules
#
@ -5711,6 +5878,10 @@ CONFIG_LUCI_CSSTIDY=y
# CONFIG_PACKAGE_luci-app-adblock-fast is not set
# CONFIG_PACKAGE_luci-app-advanced-reboot is not set
# CONFIG_PACKAGE_luci-app-alist is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_luci-app-antiblock is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_luci-app-apinger is not set
# CONFIG_PACKAGE_luci-app-aria2 is not set
# CONFIG_PACKAGE_luci-app-attendedsysupgrade is not set
@ -5735,7 +5906,11 @@ CONFIG_LUCI_CSSTIDY=y
# CONFIG_PACKAGE_luci-app-example is not set
# CONFIG_PACKAGE_luci-app-filebrowser is not set
# CONFIG_PACKAGE_luci-app-filemanager is not set
<<<<<<< HEAD
CONFIG_PACKAGE_luci-app-firewall=y
=======
# CONFIG_PACKAGE_luci-app-firewall is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_luci-app-frpc is not set
# CONFIG_PACKAGE_luci-app-frps is not set
# CONFIG_PACKAGE_luci-app-fwknopd is not set
@ -5743,6 +5918,10 @@ CONFIG_LUCI_CSSTIDY=y
# CONFIG_PACKAGE_luci-app-hnet is not set
# CONFIG_PACKAGE_luci-app-https-dns-proxy is not set
# CONFIG_PACKAGE_luci-app-irqbalance is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_luci-app-keepalived is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_luci-app-ksmbd is not set
# CONFIG_PACKAGE_luci-app-ledtrig-rssi is not set
# CONFIG_PACKAGE_luci-app-ledtrig-switch is not set
@ -5770,7 +5949,11 @@ CONFIG_LUCI_CSSTIDY=y
# CONFIG_PACKAGE_luci-app-openvpn is not set
# CONFIG_PACKAGE_luci-app-openwisp is not set
# CONFIG_PACKAGE_luci-app-p910nd is not set
<<<<<<< HEAD
CONFIG_PACKAGE_luci-app-package-manager=y
=======
# CONFIG_PACKAGE_luci-app-package-manager is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_luci-app-pagekitec is not set
# CONFIG_PACKAGE_luci-app-pbr is not set
# CONFIG_PACKAGE_luci-app-privoxy is not set
@ -5811,7 +5994,11 @@ CONFIG_LUCI_CSSTIDY=y
#
# 4. Themes
#
<<<<<<< HEAD
CONFIG_PACKAGE_luci-theme-bootstrap=y
=======
# CONFIG_PACKAGE_luci-theme-bootstrap is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_luci-theme-material is not set
# CONFIG_PACKAGE_luci-theme-openwrt is not set
# CONFIG_PACKAGE_luci-theme-openwrt-2020 is not set
@ -5824,31 +6011,172 @@ CONFIG_LUCI_CSSTIDY=y
# CONFIG_PACKAGE_luci-proto-autoip is not set
# CONFIG_PACKAGE_luci-proto-batman-adv is not set
# CONFIG_PACKAGE_luci-proto-external is not set
<<<<<<< HEAD
CONFIG_PACKAGE_luci-proto-gre=y
# CONFIG_PACKAGE_luci-proto-hnet is not set
# CONFIG_PACKAGE_luci-proto-ipip is not set
CONFIG_PACKAGE_luci-proto-ipv6=y
=======
# CONFIG_PACKAGE_luci-proto-gre is not set
# CONFIG_PACKAGE_luci-proto-hnet is not set
# CONFIG_PACKAGE_luci-proto-ipip is not set
# CONFIG_PACKAGE_luci-proto-ipv6 is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_luci-proto-mbim is not set
# CONFIG_PACKAGE_luci-proto-modemmanager is not set
# CONFIG_PACKAGE_luci-proto-ncm is not set
# CONFIG_PACKAGE_luci-proto-nebula is not set
# CONFIG_PACKAGE_luci-proto-openconnect is not set
# CONFIG_PACKAGE_luci-proto-openfortivpn is not set
<<<<<<< HEAD
CONFIG_PACKAGE_luci-proto-ppp=y
=======
# CONFIG_PACKAGE_luci-proto-ppp is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_luci-proto-pppossh is not set
# CONFIG_PACKAGE_luci-proto-qmi is not set
# CONFIG_PACKAGE_luci-proto-relay is not set
# CONFIG_PACKAGE_luci-proto-sstp is not set
# CONFIG_PACKAGE_luci-proto-unet is not set
# CONFIG_PACKAGE_luci-proto-vpnc is not set
<<<<<<< HEAD
CONFIG_PACKAGE_luci-proto-vxlan=y
CONFIG_PACKAGE_luci-proto-wireguard=y
=======
# CONFIG_PACKAGE_luci-proto-vxlan is not set
# CONFIG_PACKAGE_luci-proto-wireguard is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_luci-proto-yggdrasil is not set
# end of 5. Protocols
#
# 6. Libraries
#
<<<<<<< HEAD
CONFIG_PACKAGE_luci-lib-base=y
# CONFIG_PACKAGE_luci-lib-chartjs is not set
# CONFIG_PACKAGE_luci-lib-httpclient is not set
# CONFIG_PACKAGE_luci-lib-httpprotoutils is not set
CONFIG_PACKAGE_luci-lib-ip=y
# CONFIG_PACKAGE_luci-lib-ipkg is not set
# CONFIG_PACKAGE_luci-lib-iptparser is not set
# CONFIG_PACKAGE_luci-lib-json is not set
CONFIG_PACKAGE_luci-lib-jsonc=y
CONFIG_PACKAGE_luci-lib-nixio=y
# CONFIG_PACKAGE_luci-lib-px5g is not set
CONFIG_PACKAGE_luci-lib-uqr=y
# end of 6. Libraries
# CONFIG_PACKAGE_luci-i18n-base-ar is not set
# CONFIG_PACKAGE_luci-i18n-base-bg is not set
# CONFIG_PACKAGE_luci-i18n-base-bn is not set
# CONFIG_PACKAGE_luci-i18n-base-ca is not set
# CONFIG_PACKAGE_luci-i18n-base-cs is not set
# CONFIG_PACKAGE_luci-i18n-base-da is not set
# CONFIG_PACKAGE_luci-i18n-base-de is not set
# CONFIG_PACKAGE_luci-i18n-base-el is not set
# CONFIG_PACKAGE_luci-i18n-base-es is not set
# CONFIG_PACKAGE_luci-i18n-base-fa is not set
# CONFIG_PACKAGE_luci-i18n-base-fi is not set
# CONFIG_PACKAGE_luci-i18n-base-fil is not set
# CONFIG_PACKAGE_luci-i18n-base-fr is not set
# CONFIG_PACKAGE_luci-i18n-base-he is not set
# CONFIG_PACKAGE_luci-i18n-base-hi is not set
# CONFIG_PACKAGE_luci-i18n-base-hu is not set
# CONFIG_PACKAGE_luci-i18n-base-it is not set
# CONFIG_PACKAGE_luci-i18n-base-ja is not set
# CONFIG_PACKAGE_luci-i18n-base-ko is not set
# CONFIG_PACKAGE_luci-i18n-base-lt is not set
# CONFIG_PACKAGE_luci-i18n-base-mr is not set
# CONFIG_PACKAGE_luci-i18n-base-ms is not set
# CONFIG_PACKAGE_luci-i18n-base-nl is not set
# CONFIG_PACKAGE_luci-i18n-base-no is not set
# CONFIG_PACKAGE_luci-i18n-base-pl is not set
# CONFIG_PACKAGE_luci-i18n-base-pt is not set
# CONFIG_PACKAGE_luci-i18n-base-pt-br is not set
# CONFIG_PACKAGE_luci-i18n-base-ro is not set
# CONFIG_PACKAGE_luci-i18n-base-ru is not set
# CONFIG_PACKAGE_luci-i18n-base-sk is not set
# CONFIG_PACKAGE_luci-i18n-base-sv is not set
# CONFIG_PACKAGE_luci-i18n-base-tr is not set
# CONFIG_PACKAGE_luci-i18n-base-uk is not set
# CONFIG_PACKAGE_luci-i18n-base-vi is not set
# CONFIG_PACKAGE_luci-i18n-base-yua is not set
# CONFIG_PACKAGE_luci-i18n-base-zh-cn is not set
# CONFIG_PACKAGE_luci-i18n-base-zh-tw is not set
# CONFIG_PACKAGE_luci-i18n-firewall-ar is not set
# CONFIG_PACKAGE_luci-i18n-firewall-bg is not set
# CONFIG_PACKAGE_luci-i18n-firewall-bn is not set
# CONFIG_PACKAGE_luci-i18n-firewall-ca is not set
# CONFIG_PACKAGE_luci-i18n-firewall-cs is not set
# CONFIG_PACKAGE_luci-i18n-firewall-da is not set
# CONFIG_PACKAGE_luci-i18n-firewall-de is not set
# CONFIG_PACKAGE_luci-i18n-firewall-el is not set
# CONFIG_PACKAGE_luci-i18n-firewall-es is not set
# CONFIG_PACKAGE_luci-i18n-firewall-fa is not set
# CONFIG_PACKAGE_luci-i18n-firewall-fi is not set
# CONFIG_PACKAGE_luci-i18n-firewall-fr is not set
# CONFIG_PACKAGE_luci-i18n-firewall-he is not set
# CONFIG_PACKAGE_luci-i18n-firewall-hi is not set
# CONFIG_PACKAGE_luci-i18n-firewall-hu is not set
# CONFIG_PACKAGE_luci-i18n-firewall-it is not set
# CONFIG_PACKAGE_luci-i18n-firewall-ja is not set
# CONFIG_PACKAGE_luci-i18n-firewall-ko is not set
# CONFIG_PACKAGE_luci-i18n-firewall-lt is not set
# CONFIG_PACKAGE_luci-i18n-firewall-mr is not set
# CONFIG_PACKAGE_luci-i18n-firewall-ms is not set
# CONFIG_PACKAGE_luci-i18n-firewall-nl is not set
# CONFIG_PACKAGE_luci-i18n-firewall-no is not set
# CONFIG_PACKAGE_luci-i18n-firewall-pl is not set
# CONFIG_PACKAGE_luci-i18n-firewall-pt is not set
# CONFIG_PACKAGE_luci-i18n-firewall-pt-br is not set
# CONFIG_PACKAGE_luci-i18n-firewall-ro is not set
# CONFIG_PACKAGE_luci-i18n-firewall-ru is not set
# CONFIG_PACKAGE_luci-i18n-firewall-sk is not set
# CONFIG_PACKAGE_luci-i18n-firewall-sv is not set
# CONFIG_PACKAGE_luci-i18n-firewall-tr is not set
# CONFIG_PACKAGE_luci-i18n-firewall-uk is not set
# CONFIG_PACKAGE_luci-i18n-firewall-vi is not set
# CONFIG_PACKAGE_luci-i18n-firewall-yua is not set
# CONFIG_PACKAGE_luci-i18n-firewall-zh-cn is not set
# CONFIG_PACKAGE_luci-i18n-firewall-zh-tw is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-ar is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-bg is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-bn is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-ca is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-cs is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-da is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-de is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-el is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-es is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-fa is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-fi is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-fr is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-he is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-hi is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-hu is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-it is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-ja is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-ko is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-lt is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-mr is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-ms is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-nl is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-no is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-pl is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-pt is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-pt-br is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-ro is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-ru is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-sk is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-sv is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-tr is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-uk is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-vi is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-yua is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-zh-cn is not set
# CONFIG_PACKAGE_luci-i18n-package-manager-zh-tw is not set
=======
# CONFIG_PACKAGE_luci-lib-base is not set
# CONFIG_PACKAGE_luci-lib-chartjs is not set
# CONFIG_PACKAGE_luci-lib-httpclient is not set
@ -5862,6 +6190,7 @@ CONFIG_LUCI_CSSTIDY=y
# CONFIG_PACKAGE_luci-lib-px5g is not set
# CONFIG_PACKAGE_luci-lib-uqr is not set
# end of 6. Libraries
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# end of LuCI
#
@ -6023,6 +6352,11 @@ CONFIG_LUCI_CSSTIDY=y
# CONFIG_PACKAGE_ksmbd-hotplug is not set
# CONFIG_PACKAGE_ksmbd-server is not set
# CONFIG_PACKAGE_netatalk is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_netatalk-full is not set
# CONFIG_PACKAGE_netatalk-small is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_nfs-kernel-server is not set
# CONFIG_PACKAGE_owftpd is not set
# CONFIG_PACKAGE_owhttpd is not set
@ -6525,7 +6859,19 @@ CONFIG_PACKAGE_ip-tiny=y
# CONFIG_PACKAGE_openconnect is not set
# CONFIG_PACKAGE_openfortivpn is not set
# CONFIG_PACKAGE_openvpn-easy-rsa is not set
<<<<<<< HEAD
CONFIG_PACKAGE_openvpn-mbedtls=y
# CONFIG_OPENVPN_mbedtls_ENABLE_LZO is not set
CONFIG_OPENVPN_mbedtls_ENABLE_LZ4=y
# CONFIG_OPENVPN_mbedtls_ENABLE_MANAGEMENT is not set
CONFIG_OPENVPN_mbedtls_ENABLE_FRAGMENT=y
CONFIG_OPENVPN_mbedtls_ENABLE_PORT_SHARE=y
# CONFIG_OPENVPN_mbedtls_ENABLE_IPROUTE2 is not set
# CONFIG_OPENVPN_mbedtls_ENABLE_DCO is not set
CONFIG_OPENVPN_mbedtls_ENABLE_SMALL=y
=======
# CONFIG_PACKAGE_openvpn-mbedtls is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_openvpn-openssl is not set
# CONFIG_PACKAGE_openvpn-wolfssl is not set
# CONFIG_PACKAGE_pptpd is not set
@ -6549,7 +6895,11 @@ CONFIG_PACKAGE_ip-tiny=y
# CONFIG_PACKAGE_wgsd-client is not set
# CONFIG_PACKAGE_wgsd-coredns is not set
CONFIG_PACKAGE_wireguard-tools=y
<<<<<<< HEAD
CONFIG_PACKAGE_xl2tpd=y
=======
# CONFIG_PACKAGE_xl2tpd is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_zerotier is not set
# end of VPN
@ -6579,7 +6929,11 @@ CONFIG_PACKAGE_wireguard-tools=y
# Web Servers/Proxies
#
# CONFIG_PACKAGE_apache is not set
<<<<<<< HEAD
CONFIG_PACKAGE_cgi-io=y
=======
# CONFIG_PACKAGE_cgi-io is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_clamav is not set
# CONFIG_PACKAGE_cloudflared is not set
# CONFIG_PACKAGE_etebase is not set
@ -6691,10 +7045,17 @@ CONFIG_WPA_MBO_SUPPORT=y
# CONFIG_PACKAGE_wpa-supplicant-wolfssl is not set
# CONFIG_PACKAGE_wpad is not set
# CONFIG_PACKAGE_wpad-basic is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_wpad-basic-mbedtls is not set
# CONFIG_PACKAGE_wpad-basic-openssl is not set
# CONFIG_PACKAGE_wpad-basic-wolfssl is not set
CONFIG_PACKAGE_wpad-mbedtls=y
=======
CONFIG_PACKAGE_wpad-basic-mbedtls=y
# CONFIG_PACKAGE_wpad-basic-openssl is not set
# CONFIG_PACKAGE_wpad-basic-wolfssl is not set
# CONFIG_PACKAGE_wpad-mbedtls is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_wpad-mesh-mbedtls is not set
# CONFIG_PACKAGE_wpad-mesh-openssl is not set
# CONFIG_PACKAGE_wpad-mesh-wolfssl is not set
@ -6755,6 +7116,10 @@ CONFIG_PACKAGE_wpad-basic-mbedtls=y
# CONFIG_PACKAGE_cni-route-override is not set
# CONFIG_PACKAGE_coap-server is not set
# CONFIG_PACKAGE_conserver is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_conserver-ipmi is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_crowdsec is not set
# CONFIG_PACKAGE_crowdsec-firewall-bouncer is not set
# CONFIG_PACKAGE_cshark is not set
@ -6771,12 +7136,23 @@ CONFIG_PACKAGE_wpad-basic-mbedtls=y
# CONFIG_PACKAGE_ethtool is not set
# CONFIG_PACKAGE_ethtool-full is not set
# CONFIG_PACKAGE_evilginx2 is not set
<<<<<<< HEAD
CONFIG_PACKAGE_external-protocol=y
# CONFIG_PACKAGE_fail2ban is not set
# CONFIG_PACKAGE_fakeidentd is not set
# CONFIG_PACKAGE_fakepop is not set
# CONFIG_PACKAGE_flent is not set
# CONFIG_PACKAGE_foolsm is not set
# CONFIG_PACKAGE_fping is not set
# CONFIG_PACKAGE_freeipmi-tools is not set
=======
# CONFIG_PACKAGE_external-protocol is not set
# CONFIG_PACKAGE_fail2ban is not set
# CONFIG_PACKAGE_fakeidentd is not set
# CONFIG_PACKAGE_fakepop is not set
# CONFIG_PACKAGE_foolsm is not set
# CONFIG_PACKAGE_fping is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_fsh is not set
# CONFIG_PACKAGE_generate-ipv6-address is not set
# CONFIG_PACKAGE_gensio-bin is not set
@ -6785,7 +7161,11 @@ CONFIG_PACKAGE_wpad-basic-mbedtls=y
# CONFIG_PACKAGE_geoipupdate is not set
# CONFIG_PACKAGE_gnunet is not set
# CONFIG_PACKAGE_gping is not set
<<<<<<< HEAD
CONFIG_PACKAGE_gre=y
=======
# CONFIG_PACKAGE_gre is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_gsocket is not set
# CONFIG_PACKAGE_hev-socks5-server is not set
# CONFIG_PACKAGE_hev-socks5-tproxy is not set
@ -6823,12 +7203,22 @@ CONFIG_PACKAGE_iw=y
# CONFIG_PACKAGE_iw-full is not set
# CONFIG_PACKAGE_jool-tools-netfilter is not set
# CONFIG_PACKAGE_keepalived is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_keepalived-sync is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_knxd is not set
# CONFIG_PACKAGE_kplex is not set
# CONFIG_PACKAGE_krb5-client is not set
# CONFIG_PACKAGE_krb5-libs is not set
# CONFIG_PACKAGE_krb5-server is not set
# CONFIG_PACKAGE_krb5-server-extras is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_libfreeipmi is not set
# CONFIG_PACKAGE_libipmiconsole is not set
# CONFIG_PACKAGE_libipmidetect is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_libipset is not set
# CONFIG_PACKAGE_libndp is not set
# CONFIG_PACKAGE_linknx is not set
@ -6901,6 +7291,10 @@ CONFIG_PACKAGE_odhcpd_ipv6only_ext_cer_id=0
# CONFIG_PACKAGE_pcapplusplus is not set
# CONFIG_PACKAGE_pen is not set
# CONFIG_PACKAGE_phantap is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_phytool is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_pimbd is not set
# CONFIG_PACKAGE_pingcheck is not set
# CONFIG_PACKAGE_port-mirroring is not set
@ -6908,7 +7302,11 @@ CONFIG_PACKAGE_ppp=y
# CONFIG_PACKAGE_ppp-mod-passwordfd is not set
# CONFIG_PACKAGE_ppp-mod-pppoa is not set
CONFIG_PACKAGE_ppp-mod-pppoe=y
<<<<<<< HEAD
CONFIG_PACKAGE_ppp-mod-pppol2tp=y
=======
# CONFIG_PACKAGE_ppp-mod-pppol2tp is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_ppp-mod-pptp is not set
# CONFIG_PACKAGE_ppp-mod-radius is not set
# CONFIG_PACKAGE_ppp-multilink is not set
@ -7001,9 +7399,19 @@ CONFIG_PACKAGE_uclient-fetch=y
CONFIG_PACKAGE_vxlan=y
# CONFIG_PACKAGE_wakeonlan is not set
# CONFIG_PACKAGE_wg-installer-client is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_wg-installer-server is not set
# CONFIG_PACKAGE_wifi-presence is not set
# CONFIG_PACKAGE_wpan-tools is not set
# CONFIG_PACKAGE_wwan is not set
# CONFIG_PACKAGE_xdp-filter is not set
# CONFIG_PACKAGE_xdp-loader is not set
# CONFIG_PACKAGE_xdpdump is not set
=======
# CONFIG_PACKAGE_wifi-presence is not set
# CONFIG_PACKAGE_wpan-tools is not set
# CONFIG_PACKAGE_wwan is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_xinetd is not set
# CONFIG_PACKAGE_xray-core is not set
# CONFIG_PACKAGE_ztdns is not set
@ -7152,7 +7560,11 @@ CONFIG_PACKAGE_vxlan=y
# CONFIG_PACKAGE_joe-extras is not set
# CONFIG_PACKAGE_jupp is not set
# CONFIG_PACKAGE_mg is not set
<<<<<<< HEAD
CONFIG_PACKAGE_nano=y
=======
# CONFIG_PACKAGE_nano is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_nano-full is not set
# CONFIG_PACKAGE_nano-plus is not set
# CONFIG_PACKAGE_vim is not set
@ -7441,6 +7853,10 @@ CONFIG_PACKAGE_vxlan=y
# CONFIG_PACKAGE_checksec is not set
# CONFIG_PACKAGE_checksec_automator is not set
# CONFIG_PACKAGE_chkcon is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_cli is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_clocate is not set
# CONFIG_PACKAGE_cmdpad is not set
# CONFIG_PACKAGE_cni is not set
@ -7453,6 +7869,114 @@ CONFIG_PACKAGE_vxlan=y
# CONFIG_PACKAGE_containerd is not set
# CONFIG_PACKAGE_coremark is not set
# CONFIG_PACKAGE_coreutils is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_coreutils-b2sum is not set
# CONFIG_PACKAGE_coreutils-base32 is not set
# CONFIG_PACKAGE_coreutils-base64 is not set
# CONFIG_PACKAGE_coreutils-basename is not set
# CONFIG_PACKAGE_coreutils-basenc is not set
# CONFIG_PACKAGE_coreutils-cat is not set
# CONFIG_PACKAGE_coreutils-chcon is not set
# CONFIG_PACKAGE_coreutils-chgrp is not set
# CONFIG_PACKAGE_coreutils-chmod is not set
# CONFIG_PACKAGE_coreutils-chown is not set
# CONFIG_PACKAGE_coreutils-chroot is not set
# CONFIG_PACKAGE_coreutils-cksum is not set
# CONFIG_PACKAGE_coreutils-comm is not set
# CONFIG_PACKAGE_coreutils-cp is not set
# CONFIG_PACKAGE_coreutils-csplit is not set
# CONFIG_PACKAGE_coreutils-cut is not set
# CONFIG_PACKAGE_coreutils-date is not set
# CONFIG_PACKAGE_coreutils-dd is not set
# CONFIG_PACKAGE_coreutils-df is not set
# CONFIG_PACKAGE_coreutils-dir is not set
# CONFIG_PACKAGE_coreutils-dircolors is not set
# CONFIG_PACKAGE_coreutils-dirname is not set
# CONFIG_PACKAGE_coreutils-du is not set
# CONFIG_PACKAGE_coreutils-echo is not set
# CONFIG_PACKAGE_coreutils-env is not set
# CONFIG_PACKAGE_coreutils-expand is not set
# CONFIG_PACKAGE_coreutils-expr is not set
# CONFIG_PACKAGE_coreutils-factor is not set
# CONFIG_PACKAGE_coreutils-false is not set
# CONFIG_PACKAGE_coreutils-fmt is not set
# CONFIG_PACKAGE_coreutils-fold is not set
# CONFIG_PACKAGE_coreutils-groups is not set
# CONFIG_PACKAGE_coreutils-head is not set
# CONFIG_PACKAGE_coreutils-hostid is not set
# CONFIG_PACKAGE_coreutils-id is not set
# CONFIG_PACKAGE_coreutils-install is not set
# CONFIG_PACKAGE_coreutils-join is not set
# CONFIG_PACKAGE_coreutils-kill is not set
# CONFIG_PACKAGE_coreutils-link is not set
# CONFIG_PACKAGE_coreutils-ln is not set
# CONFIG_PACKAGE_coreutils-logname is not set
# CONFIG_PACKAGE_coreutils-ls is not set
# CONFIG_PACKAGE_coreutils-md5sum is not set
# CONFIG_PACKAGE_coreutils-mkdir is not set
# CONFIG_PACKAGE_coreutils-mkfifo is not set
# CONFIG_PACKAGE_coreutils-mknod is not set
# CONFIG_PACKAGE_coreutils-mktemp is not set
# CONFIG_PACKAGE_coreutils-mv is not set
# CONFIG_PACKAGE_coreutils-nice is not set
# CONFIG_PACKAGE_coreutils-nl is not set
# CONFIG_PACKAGE_coreutils-nohup is not set
# CONFIG_PACKAGE_coreutils-nproc is not set
# CONFIG_PACKAGE_coreutils-numfmt is not set
# CONFIG_PACKAGE_coreutils-od is not set
# CONFIG_PACKAGE_coreutils-paste is not set
# CONFIG_PACKAGE_coreutils-pathchk is not set
# CONFIG_PACKAGE_coreutils-pinky is not set
# CONFIG_PACKAGE_coreutils-pr is not set
# CONFIG_PACKAGE_coreutils-printenv is not set
# CONFIG_PACKAGE_coreutils-printf is not set
# CONFIG_PACKAGE_coreutils-ptx is not set
# CONFIG_PACKAGE_coreutils-pwd is not set
# CONFIG_PACKAGE_coreutils-readlink is not set
# CONFIG_PACKAGE_coreutils-realpath is not set
# CONFIG_PACKAGE_coreutils-rm is not set
# CONFIG_PACKAGE_coreutils-rmdir is not set
# CONFIG_PACKAGE_coreutils-runcon is not set
# CONFIG_PACKAGE_coreutils-seq is not set
# CONFIG_PACKAGE_coreutils-sha1sum is not set
# CONFIG_PACKAGE_coreutils-sha224sum is not set
# CONFIG_PACKAGE_coreutils-sha256sum is not set
# CONFIG_PACKAGE_coreutils-sha384sum is not set
# CONFIG_PACKAGE_coreutils-sha512sum is not set
# CONFIG_PACKAGE_coreutils-shred is not set
# CONFIG_PACKAGE_coreutils-shuf is not set
# CONFIG_PACKAGE_coreutils-sleep is not set
# CONFIG_PACKAGE_coreutils-sort is not set
# CONFIG_PACKAGE_coreutils-split is not set
# CONFIG_PACKAGE_coreutils-stat is not set
# CONFIG_PACKAGE_coreutils-stdbuf is not set
# CONFIG_PACKAGE_coreutils-stty is not set
# CONFIG_PACKAGE_coreutils-sum is not set
# CONFIG_PACKAGE_coreutils-sync is not set
# CONFIG_PACKAGE_coreutils-tac is not set
# CONFIG_PACKAGE_coreutils-tail is not set
# CONFIG_PACKAGE_coreutils-tee is not set
# CONFIG_PACKAGE_coreutils-test is not set
# CONFIG_PACKAGE_coreutils-timeout is not set
# CONFIG_PACKAGE_coreutils-touch is not set
# CONFIG_PACKAGE_coreutils-tr is not set
# CONFIG_PACKAGE_coreutils-true is not set
# CONFIG_PACKAGE_coreutils-truncate is not set
# CONFIG_PACKAGE_coreutils-tsort is not set
# CONFIG_PACKAGE_coreutils-tty is not set
# CONFIG_PACKAGE_coreutils-uname is not set
# CONFIG_PACKAGE_coreutils-unexpand is not set
# CONFIG_PACKAGE_coreutils-uniq is not set
# CONFIG_PACKAGE_coreutils-unlink is not set
# CONFIG_PACKAGE_coreutils-uptime is not set
# CONFIG_PACKAGE_coreutils-users is not set
# CONFIG_PACKAGE_coreutils-vdir is not set
# CONFIG_PACKAGE_coreutils-wc is not set
# CONFIG_PACKAGE_coreutils-who is not set
# CONFIG_PACKAGE_coreutils-whoami is not set
# CONFIG_PACKAGE_coreutils-yes is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_cpupower is not set
# CONFIG_PACKAGE_cpusage is not set
# CONFIG_PACKAGE_crconf is not set
@ -7493,6 +8017,10 @@ CONFIG_PACKAGE_vxlan=y
# CONFIG_PACKAGE_flashrom-pci is not set
# CONFIG_PACKAGE_flashrom-spi is not set
# CONFIG_PACKAGE_flashrom-usb is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_flent-tools is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_flock is not set
# CONFIG_PACKAGE_fritz-caldata is not set
# CONFIG_PACKAGE_fritz-tffs is not set
@ -7641,6 +8169,10 @@ CONFIG_PACKAGE_libjson-script=y
# CONFIG_PACKAGE_prometheus-node-exporter-lua is not set
# CONFIG_PACKAGE_prometheus-node-exporter-ucode is not set
# CONFIG_PACKAGE_prometheus-statsd-exporter is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_provision is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_pservice is not set
# CONFIG_PACKAGE_psmisc is not set
# CONFIG_PACKAGE_pv is not set
@ -7734,11 +8266,20 @@ CONFIG_STRACE_NONE=y
# CONFIG_PACKAGE_triggerhappy is not set
# CONFIG_PACKAGE_ubnt-manager is not set
# CONFIG_PACKAGE_ucode-mod-bpf is not set
<<<<<<< HEAD
CONFIG_PACKAGE_ucode-mod-html=y
CONFIG_PACKAGE_ucode-mod-lua=y
# CONFIG_PACKAGE_ucode-mod-pkgen is not set
# CONFIG_PACKAGE_ucode-mod-uclient is not set
# CONFIG_PACKAGE_ucode-mod-udebug is not set
# CONFIG_PACKAGE_ucode-mod-uline is not set
=======
# CONFIG_PACKAGE_ucode-mod-html is not set
# CONFIG_PACKAGE_ucode-mod-lua is not set
# CONFIG_PACKAGE_ucode-mod-pkgen is not set
# CONFIG_PACKAGE_ucode-mod-uclient is not set
# CONFIG_PACKAGE_ucode-mod-udebug is not set
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_udebug-cli is not set
# CONFIG_PACKAGE_udebugd is not set
# CONFIG_PACKAGE_udns-dnsget is not set
@ -7747,6 +8288,10 @@ CONFIG_STRACE_NONE=y
# CONFIG_PACKAGE_ugps is not set
# CONFIG_PACKAGE_uhubctl is not set
# CONFIG_PACKAGE_uledd is not set
<<<<<<< HEAD
# CONFIG_PACKAGE_unetmsg is not set
=======
>>>>>>> 4e229539bd8dd125ea7ea32229a4950ec5d8e905
# CONFIG_PACKAGE_unix2dos is not set
# CONFIG_PACKAGE_unshare is not set
# CONFIG_PACKAGE_usb-modeswitch is not set

6
.github/labeler.yml vendored
View File

@ -80,6 +80,12 @@
- changed-files:
- any-glob-to-any-file:
- "target/linux/qualcommax/**"
- "package/kernel/qca-ssdk/**"
- "package/kernel/qca-nss-dp/**"
"target/qualcommbe":
- changed-files:
- any-glob-to-any-file:
- "target/linux/qualcommbe/**"
"target/ixp4xx":
- changed-files:
- any-glob-to-any-file:

View File

@ -1212,6 +1212,28 @@ config KERNEL_NET_L3_MASTER_DEV
drivers to support L3 master devices like VRF.
Increases the compressed kernel size by ~4kB (as of Linux 6.6).
config KERNEL_DCB
bool "Data Center Bridging support"
default y if TARGET_armsr_armv8
default y if TARGET_x86_64
help
This enables support for configuring Data Center Bridging (DCB)
features on DCB capable Ethernet adapters via rtnetlink. Say 'Y'
if you have a DCB capable Ethernet adapter which supports this
interface and you are connected to a DCB capable switch.
DCB is a collection of Ethernet enhancements which allow DCB capable
NICs and switches to support network traffic with differing
requirements (highly reliable, no drops vs. best effort vs. low
latency) to co-exist on Ethernet.
DCB features include:
Enhanced Transmission Selection (aka Priority Grouping) - provides a
framework for assigning bandwidth guarantees to traffic classes.
Priority-based Flow Control (PFC) - a MAC control pause frame which
works at the granularity of the 802.1p priority instead of the
link (802.3x).
config KERNEL_XDP_SOCKETS
bool "XDP sockets support"
help

View File

@ -1,4 +1,4 @@
BPF_DEPENDS := @HAS_BPF_TOOLCHAIN
BPF_DEPENDS := @HAS_BPF_TOOLCHAIN +@NEED_BPF_TOOLCHAIN
LLVM_VER:=
CLANG_MIN_VER:=12

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .74
LINUX_KERNEL_HASH-6.6.74 = f15e2b1a8bab0eba494b07858a5abc88d8f788e25f6fe4a572a77840bbd5494d
LINUX_VERSION-6.6 = .83
LINUX_KERNEL_HASH-6.6.83 = 894bbbe63b7484a0bc576a1e11a8dbc090fbd476d6424431bdc8435e03c2c208

View File

@ -85,7 +85,7 @@ endef
define Build/Compile/Optee-os
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
PATH=$(LINUX_DIR)/scripts/dtc/:$(PATH) \
PATH=$(LINUX_DIR)/scripts/dtc/:$(STAGING_DIR_HOST)/bin:$(PATH) \
CROSS_COMPILE=$(TARGET_CROSS) \
CROSS_COMPILE_core="$(TARGET_CROSS)" \
CROSS_COMPILE_ta_arm64="$(TARGET_CROSS)" \

View File

@ -6,6 +6,9 @@
# Substituted by SDK, do not remove
# REVISION:=x
# SOURCE_DATE_EPOCH:=x
# BASE_FILES_VERSION:=x
# KERNEL_VERSION:=x
# LIBC_VERSION:=x
PKG_CONFIG_DEPENDS += \
CONFIG_VERSION_HOME_URL \

View File

@ -100,7 +100,11 @@ ifneq ($(CONFIG_USE_APK),)
$(foreach pkg,$(shell cat $(PACKAGE_INSTALL_FILES) 2>/dev/null),$(pkg)$(call GetABISuffix,$(pkg))))
$(call apk,$(TARGET_DIR)) add --no-cache --initdb --no-scripts --arch $(ARCH_PACKAGES) \
--repositories-file /dev/null --repository file://$(PACKAGE_DIR_ALL)/packages.adb \
$$(cat $(TMP_DIR)/apk_install_list)
$$(cat $(TMP_DIR)/apk_install_list) \
"base-files=$(shell cat $(TMP_DIR)/base-files.version)" \
"libc=$(shell cat $(TMP_DIR)/libc.version)" \
"kernel=$(shell cat $(TMP_DIR)/kernel.version)"
rm -rf $(TARGET_DIR)/run
else
$(file >$(TMP_DIR)/opkg_install_list,\
@ -131,7 +135,7 @@ ifneq ($(CONFIG_USE_APK),)
--keys-dir $(TOPDIR) \
--sign $(BUILD_KEY_APK_SEC) \
--output packages.adb \
$$(ls *.apk | grep -vE '^(base-files-|kernel-|libc-)'); \
*.apk; \
echo -n '{"architecture": "$(ARCH_PACKAGES)", "packages":{' > index.json; \
$(STAGING_DIR_HOST)/bin/apk adbdump packages.adb | \
awk '/- name: / {pkg = $$NF} ; / version: / {printf "\"%s\": \"%s\", ", pkg, $$NF}' | \

View File

@ -256,6 +256,7 @@ ifneq ($(CONFIG_USE_APK),)
rm -f $(1)/etc/uci-defaults/13_fix-group-user
rm -f $(1)/sbin/pkg_check
echo $(PKG_RELEASE)~$(lastword $(subst -, ,$(REVISION))) >$(TMP_DIR)/base-files.version
else
$(if $(CONFIG_CLEAN_IPKG),, \
mkdir -p $(1)/etc/opkg; \

View File

@ -125,8 +125,8 @@ caldata_valid() {
caldata_patch_data() {
local data=$1
local data_count=$((${#1} / 2))
local data_offset=$(($2))
local chksum_offset=$(($3))
[ -n "$2" ] && local data_offset=$(($2))
[ -n "$3" ] && local chksum_offset=$(($3))
local target=$4
local fw_data
local fw_chksum

View File

@ -217,6 +217,16 @@ nand_upgrade_prepare_ubi() {
[ "$root_ubivol" ] && ubirmvol /dev/$root_ubidev -N "$CI_ROOTPART" || :
[ "$data_ubivol" ] && ubirmvol /dev/$root_ubidev -N rootfs_data || :
# create provisioning vol
if [ "${UPGRADE_OPT_ADD_PROVISIONING:-0}" -gt 0 ]; then
[ -n "$(nand_find_volume $root_ubidev provisioning)" ] || {
if ! ubimkvol /dev/$root_ubidev -N provisioning -s 131072; then
echo "cannot create provisioning volume"
return 1
fi
}
fi
# create kernel vol
if [ -n "$kernel_length" ]; then
if ! ubimkvol /dev/$kern_ubidev -N "$CI_KERNPART" -s $kernel_length; then

View File

@ -11,6 +11,7 @@ INSTALLED_PACKAGES=${ETCBACKUP_DIR}/installed_packages.txt
COMMAND=/lib/upgrade/do_stage2
# File-local globals
ADD_PROVISIONING=0
SAVE_OVERLAY=0
SAVE_OVERLAY_PATH=
SAVE_PARTITIONS=1
@ -45,6 +46,7 @@ while [ -n "$1" ]; do
-c) SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/etc;;
-o) SAVE_OVERLAY=1 SAVE_OVERLAY_PATH=/;;
-p) SAVE_PARTITIONS=0;;
-P) ADD_PROVISIONING=1;;
-k) SAVE_INSTALLED_PKGS=1;;
-u) SKIP_UNCHANGED=1;;
-b|--create-backup) CONF_BACKUP="$2" NEED_IMAGE=1; shift;;
@ -68,7 +70,7 @@ done
print_help() {
cat <<EOF
Usage: $0 [<upgrade-option>...] <image file or URL>
$0 [-q] [-i] [-c] [-u] [-o] [-k] <backup-command> <file>
$0 [-q] [-i] [-c] [-u] [-o] [-k] [-P] <backup-command> <file>
upgrade-option:
-f <config> restore configuration from .tar.gz (file or url)
@ -82,6 +84,8 @@ upgrade-option:
-k include in backup a list of current installed packages at
$INSTALLED_PACKAGES
-s stay on current partition (for dual firmware devices)
-P create provisioning partition to keep sensitive data across
factory resets.
-T | --test
Verify image and config .tar.gz but do not actually flash.
-F | --force
@ -427,6 +431,7 @@ else
json_add_string command "$COMMAND"
json_add_object options
json_add_int save_partitions "$SAVE_PARTITIONS"
json_add_int add_provisioning "$ADD_PROVISIONING"
[ $USE_CURR_PART -eq 1 ] && json_add_boolean use_curr_part 1
json_close_object

View File

@ -9,13 +9,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-mediatek
PKG_RELEASE:=3
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
PKG_SOURCE_DATE:=2024-01-17
PKG_SOURCE_VERSION:=bacca82a8cac369470df052a9d801a0ceb9b74ca
PKG_MIRROR_HASH:=1138649f64ac3982330925c38c795ca6860289adbd95755991f80afa30ebdea7
PKG_SOURCE_DATE:=2025-02-12
PKG_SOURCE_VERSION:=e090770684e775711a624e68e0b28112227a4c38
PKG_MIRROR_HASH:=1ff9d60f3677aadd9a6716e860985987ba7157bd28ce831112e05c0b3170939a
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
@ -569,7 +569,6 @@ TFA_TARGETS:= \
mt7988-spim-nand-ubi-comb
TFA_MAKE_FLAGS += \
$(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
BOOT_DEVICE=$(BOOT_DEVICE) \
USE_MKIMAGE=1 MKIMAGE=$(STAGING_DIR_HOST)/bin/mkimage \
$(if $(findstring ddr4,$(DDR_TYPE)),DRAM_USE_DDR4=1) \

View File

@ -13,15 +13,19 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c
+++ b/plat/mediatek/apsoc_common/bl2/bl2_dev_snfi_init.c
@@ -29,8 +29,10 @@ static int snfi_mtd_read_page(struct nan
@@ -30,9 +30,14 @@ static int snfi_mtd_read_page(struct nan
int ret;
ret = mtk_snand_read_page(snf, addr, (void *)buffer, NULL, false);
- if (ret == -EBADMSG)
- if (ret == -EBADMSG || ret > 0)
+ if (ret == -EBADMSG)
ret = 0;
+ if (ret > 0) {
+ NOTICE("corrected %d bitflips while reading page %u\n", ret, page);
ret = 0;
+ ret = 0;
+ }
+
return ret;
}

View File

@ -8,9 +8,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-tools
PKG_VERSION:=2.9
PKG_VERSION:=2.12
PKG_RELEASE:=1
PKG_HASH:=76a66a1de0c01aeb83dfc7b72b51173fe62c6e51d6fca17cc562393117bed08b
PKG_HASH:=b4c047493cac1152203e1ba121ae57267e4899b7bf56eb365e22a933342d31c9
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_HOST_ONLY:=1
@ -33,7 +33,8 @@ define Host/Compile
$(MAKE) -C \
$(HOST_BUILD_DIR)/tools/fiptool \
CPPFLAGS="$(HOST_CFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)"
LDFLAGS="$(HOST_LDFLAGS)" \
OPENSSL_DIR="$(STAGING_DIR_HOST)"
endef
define Host/Install

View File

@ -1,11 +1,11 @@
--- a/tools/fiptool/Makefile
+++ b/tools/fiptool/Makefile
@@ -38,7 +38,7 @@
@@ -74,7 +74,7 @@ all: --openssl ${PROJECT}
${PROJECT}: ${OBJECTS} Makefile
@echo " HOSTLD $@"
- ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS}
+ ${Q}${HOSTCC} ${OBJECTS} -o $@ ${LDLIBS} $(LDFLAGS)
@${ECHO_BLANK_LINE}
@echo "Built $@ successfully"
@${ECHO_BLANK_LINE}
$(s)echo " HOSTLD $@"
- $(q)$(host-cc) ${OBJECTS} -o $@ $(LDOPTS)
+ $(q)$(host-cc) ${OBJECTS} -o $@ $(LDOPTS) $(LDFLAGS)
$(s)echo
$(s)echo "Built $@ successfully"
$(s)echo

View File

@ -1,15 +1,6 @@
--- a/tools/fiptool/fiptool.c
+++ b/tools/fiptool/fiptool.c
@@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
-
+#define _DARWIN_C_SOURCE
#ifndef _MSC_VER
#include <sys/mount.h>
#endif
@@ -18,6 +18,9 @@
@@ -19,6 +19,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -19,3 +10,13 @@
#include "fiptool.h"
#include "tbbr_config.h"
--- a/tools/fiptool/fiptool_platform.h
+++ b/tools/fiptool/fiptool_platform.h
@@ -12,6 +12,7 @@
#ifndef FIPTOOL_PLATFORM_H
#define FIPTOOL_PLATFORM_H
+#define _DARWIN_C_SOURCE
#ifndef _MSC_VER
/* Not Visual Studio, so include Posix Headers. */

View File

@ -9,9 +9,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=at91bootstrap
PKG_VERSION:=v4.0.3
PKG_MIRROR_HASH:=9c1d42337294b549e6c229ae4c9996efd21e00ae5f968bd780d352e054e24cb7
PKG_SOURCE_VERSION:=1d9e673698d9db4a4f2301559f481274de2e75ae
PKG_VERSION:=v4.0.10
PKG_SOURCE_VERSION:=c123c68d1f5b13a55a8e164b03be866491ce3049
PKG_MIRROR_HASH:=0c2d6a8a81a179c29227ad2f880b403f86095d3671f176ff1d2a21ba4e09c858
BINARIES_DIR:=build/binaries
PKG_CPE_ID:=cpe:/a:linux4sam:at91bootstrap

View File

@ -7,11 +7,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=imx-bootlets
PKG_VERSION:=10.05.02
PKG_VERSION:=10.12.01
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://trabant.uid0.hu/openwrt/
PKG_HASH:=09ecd81a64db5166a235932146faf08d0689bfc7ac04ac9fcc3a5bd809fba74a
PKG_HASH:=f7c98cbc41e15184cad61c56115e840e34ac3ebb4a162fadeea905e5038fd65b
PKG_FLAGS:=nonshared
@ -37,7 +37,7 @@ define Package/imx-bootlets/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/boot_prep/boot_prep $(STAGING_DIR)/boot_prep
$(INSTALL_BIN) $(PKG_BUILD_DIR)/linux_prep/output-target/linux_prep $(STAGING_DIR)/linux_prep
$(INSTALL_BIN) $(PKG_BUILD_DIR)/power_prep/power_prep $(STAGING_DIR)/power_prep
$(INSTALL_BIN) $(PKG_BUILD_DIR)/linux_prebuilt.db $(STAGING_DIR)/linux_prebuilt.db
$(INSTALL_BIN) $(PKG_BUILD_DIR)/linux_ivt.bd $(STAGING_DIR)/linux_ivt.bd
endef
$(eval $(call BuildPackage,imx-bootlets))

View File

@ -1,18 +1,22 @@
--- a/Makefile
+++ b/Makefile
@@ -32,10 +32,11 @@ ifeq "$(DFT_IMAGE)" "$(wildcard $(DFT_IM
sed -i 's,[^ *]image.*;,\timage="$(DFT_UBOOT)";,' uboot.db
elftosb2 -z -c ./uboot.db -o i$(ARCH)_uboot.sb
@@ -37,13 +37,13 @@ ifeq "$(DFT_IMAGE)" "$(wildcard $(DFT_IM
elftosb -z -c ./uboot.bd -o i$(ARCH)_uboot.sb
elftosb -z -f imx28 -c ./uboot_ivt.bd -o i$(ARCH)_ivt_uboot.sb
else
- @echo "by using the pre-built kernel"
- elftosb2 -z -c ./linux_prebuilt.db -o i$(ARCH)_linux.sb
- @echo "generating U-Boot boot stream image"
- elftosb2 -z -c ./uboot_prebuilt.db -o i$(ARCH)_uboot.sb
- elftosb -z -c ./linux.bd -o i$(ARCH)_linux.sb
- elftosb -z -f imx28 -c ./linux_ivt.bd -o i$(ARCH)_ivt_linux.sb
+ @echo "... not generating any image for now."
+ #@echo "by using the pre-built kernel"
+ #elftosb2 -z -c ./linux_prebuilt.db -o i$(ARCH)_linux.sb
+ #elftosb -z -c ./linux.bd -o i$(ARCH)_linux.sb
+ #elftosb -z -f imx28 -c ./linux_ivt.bd -o i$(ARCH)_ivt_linux.sb
- @echo "generating U-Boot boot stream image"
- elftosb -z -c ./uboot.bd -o i$(ARCH)_uboot.sb
- elftosb -z -f imx28 -c ./uboot_ivt.bd -o i$(ARCH)_ivt_uboot.sb
+ #@echo "generating U-Boot boot stream image"
+ #elftosb2 -z -c ./uboot_prebuilt.db -o i$(ARCH)_uboot.sb
+ #elftosb -z -c ./uboot.bd -o i$(ARCH)_uboot.sb
+ #elftosb -z -f imx28 -c ./uboot_ivt.bd -o i$(ARCH)_ivt_uboot.sb
endif
#@echo "generating kernel bootstream file sd_mmc_bootstream.raw"
#Please use cfimager to burn xxx_linux.sb. The below way will no

View File

@ -1,5 +1,5 @@
--- a/linux_prebuilt.db
+++ b/linux_prebuilt.db
--- a/linux_ivt.bd
+++ b/linux_ivt.bd
@@ -4,10 +4,10 @@ options {
flags = 0x01;
}
@ -7,11 +7,11 @@
- power_prep="./power_prep/power_prep";
- sdram_prep="./boot_prep/boot_prep";
- linux_prep="./linux_prep/output-target/linux_prep";
- zImage = "./zImage";
- zImage="./zImage";
+ power_prep="./power_prep";
+ sdram_prep="./boot_prep";
+ linux_prep="./linux_prep";
+ zImage = "./zImage_dtb";
+ zImage="./zImage_dtb";
}
section (0) {

View File

@ -121,7 +121,7 @@
all: build_prep gen_bootstream
@@ -94,6 +97,8 @@ distclean: clean
@@ -101,6 +104,8 @@ distclean: clean
clean:
-rm -rf *.sb
rm -f sd_mmc_bootstream.raw
@ -130,14 +130,3 @@
$(MAKE) -C linux_prep clean ARCH=$(ARCH)
$(MAKE) -C boot_prep clean ARCH=$(ARCH)
$(MAKE) -C power_prep clean ARCH=$(ARCH)
--- a/uboot.db
+++ b/uboot.db
@@ -3,7 +3,7 @@
sources {
power_prep="./power_prep/power_prep";
sdram_prep="./boot_prep/boot_prep";
- image="/home/b18647/repos/ltib_latest/rootfs/boot/u-boot";
+ image="../boot/u-boot";
}
section (0) {

View File

@ -0,0 +1,11 @@
--- a/linux_prep/core/cmdlines.S
+++ b/linux_prep/core/cmdlines.S
@@ -14,7 +14,7 @@
#define CMDLINES_FILE "output-target/command_lines_stripped.txt"
#endif
- .section .cmdlines, #alloc
+ .section .cmdlines, "a"
.globl cmdlines_start
cmdlines_start:
.incbin CMDLINES_FILE

View File

@ -6,13 +6,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=opensbi
PKG_RELEASE:=1.4
PKG_RELEASE:=1.6
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/riscv/opensbi
PKG_SOURCE_DATE:=2023-12-24
PKG_SOURCE_VERSION:=a2b255b88918715173942f2c5e1f97ac9e90c877
PKG_MIRROR_HASH:=a81d7b3622feba80b2a45fe0d38600be73cfbee64a0426be82a71545c10c54d3
PKG_SOURCE_DATE:=2024-12-24
PKG_SOURCE_VERSION:=bd613dd92113f683052acfb23d9dc8ba60029e0a
PKG_MIRROR_HASH:=247bbb751635d9414cf47cce417185fd3323e98c524eafa825dc91b76cc5c054
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)

View File

@ -176,6 +176,7 @@ wallys,dr531)
;;
zte,mf286|\
zte,mf286a|\
zte,mf286c|\
zte,mf286r)
ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x10000"
;;

View File

@ -34,6 +34,7 @@ ubootenv_add_ubi_default() {
case "$board" in
abt,asr3000|\
cmcc,a10-ubootmod|\
h3c,magic-nx30-pro|\
jcg,q30-pro|\
mercusys,mr90x-v1-ubi|\

View File

@ -0,0 +1,24 @@
[ -e /etc/config/ubootenv ] && exit 0
touch /etc/config/ubootenv
. /lib/uboot-envtools.sh
. /lib/functions.sh
board=$(board_name)
case "$board" in
linksys,mr5500|\
linksys,mx2000|\
linksys,mx5500|\
linksys,spnmx56)
idx="$(find_mtd_index u_env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
;;
esac
config_load ubootenv
config_foreach ubootenv_add_app_config
exit 0

View File

@ -7,33 +7,27 @@ touch /etc/config/ubootenv
board=$(board_name)
ubootenv_add_mtd() {
local idx="$(find_mtd_index "${1}")"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "${2}" "${3}" "${4}"
}
case "$board" in
8devices,mango-dvk|\
8devices,mango-dvk-sfp|\
cambiumnetworks,xe3-4)
idx="$(find_mtd_index 0:APPSBLENV)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
ubootenv_add_mtd "0:APPSBLENV" "0x0" "0x10000" "0x10000"
;;
linksys,mr7350)
idx="$(find_mtd_index u_env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
;;
netgear,wax214)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
ubootenv_add_mtd "u_env" "0x0" "0x40000" "0x20000"
;;
netgear,wax214|\
tplink,eap610-outdoor)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000"
ubootenv_add_mtd "0:appsblenv" "0x0" "0x40000" "0x20000"
;;
yuncore,fap650)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x10000"
;;
esac

View File

@ -26,6 +26,12 @@ ubootenv_add_mmc() {
}
case "$board" in
aliyun,ap8220|\
compex,wpq873|\
edgecore,eap102|\
zyxel,nbg7815)
ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x10000"
;;
dynalink,dl-wrx36|\
netgear,rax120v2|\
netgear,sxr80|\
@ -37,11 +43,6 @@ tplink,eap620hd-v1|\
tplink,eap660hd-v1)
ubootenv_add_mtd "0:appsblenv" "0x0" "0x40000" "0x20000"
;;
compex,wpq873|\
edgecore,eap102|\
zyxel,nbg7815)
ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x10000"
;;
edimax,cax1800)
ubootenv_add_mtd "0:appsblenv" "0x0" "0x10000" "0x20000"
;;

View File

@ -19,6 +19,7 @@ alfa-network,r36m-e4g|\
alfa-network,tube-e4g|\
engenius,epg600|\
engenius,esr600h|\
hongdian,h8922-v30|\
linksys,re7000|\
meig,slt866|\
sitecom,wlr-4100-v1-002|\
@ -137,6 +138,7 @@ zyxel,lte3301-plus)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x80000"
;;
zyxel,lte5398-m904|\
zyxel,lte7490-m904|\
zyxel,nr7101)
idx="$(find_mtd_index Config)"
[ -n "$idx" ] && \
@ -148,7 +150,8 @@ xiaomi,mi-router-cr6608|\
xiaomi,mi-router-cr6609)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
;;
dna,valokuitu-plus-ex400)
dna,valokuitu-plus-ex400|\
genexis,pulse-ex400)
ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
;;

View File

@ -28,6 +28,7 @@ zyxel,gs1900-10hp|\
zyxel,gs1900-16|\
zyxel,gs1900-24-v1|\
zyxel,gs1900-24e|\
zyxel,gs1900-24ep|\
zyxel,gs1900-24hp-v1|\
zyxel,gs1900-24hp-v2)
idx="$(find_mtd_index u-boot-env)"

View File

@ -13,7 +13,7 @@ PKG_RELEASE:=67
PKG_HASH:=0d71e62beb952b41ebafb20a7ee4df2f960db64c31b054721ceb79ff14014c55
FIRMWARE_LANTIQ_SOURCE:=$(TOPDIR)/target/linux/lantiq/files/firmware/lantiq
FIRMWARE_LANTIQ_SOURCE:=$(TOPDIR)/package/firmware/lantiq/lantiq-gphy-firmware/files/
include $(INCLUDE_DIR)/u-boot.mk
include $(INCLUDE_DIR)/package.mk

View File

@ -1,8 +1,8 @@
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_VERSION:=2024.10
PKG_HASH:=b28daf4ac17e43156363078bf510297584137f6df50fced9b12df34f61a92fb0
PKG_VERSION:=2025.01
PKG_HASH:=cdef7d507c93f1bbd9f015ea9bc21fa074268481405501945abc6f854d5b686f
PKG_BUILD_DEPENDS:=!(TARGET_ramips||TARGET_mediatek_mt7623):arm-trusted-firmware-tools/host
UBOOT_USE_INTREE_DTC:=1
@ -231,6 +231,18 @@ define U-Boot/mt7981_abt_asr3000
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
endef
define U-Boot/mt7981_cmcc_a10
NAME:=CMCC A10
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=cmcc_a10-ubootmod
UBOOT_CONFIG:=mt7981_cmcc_a10
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=spim-nand
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr3
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
endef
define U-Boot/mt7981_cmcc_rax3000m-emmc
NAME:=CMCC RAX3000M
BUILD_SUBTARGET:=filogic
@ -832,6 +844,7 @@ UBOOT_TARGETS := \
mt7628_ravpower_rp-wd009 \
mt7629_rfb \
mt7981_abt_asr3000 \
mt7981_cmcc_a10 \
mt7981_cmcc_rax3000m-emmc \
mt7981_cmcc_rax3000m-nand \
mt7981_gatonetworks_gdsp \
@ -884,8 +897,7 @@ UBOOT_TARGETS := \
UBOOT_CUSTOMIZE_CONFIG := \
--disable TOOLS_KWBIMAGE \
--disable TOOLS_LIBCRYPTO \
--disable TOOLS_MKEFICAPSULE \
--enable SERIAL_RX_BUFFER
--disable TOOLS_MKEFICAPSULE
ifdef CONFIG_TARGET_mediatek
UBOOT_MAKE_FLAGS += $(UBOOT_IMAGE:.fip=.bin)

View File

@ -1,63 +0,0 @@
From 72b4ba8417d33516b8489bac3c90dbbbf781a3d2 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 29 Oct 2024 17:47:10 +0800
Subject: [PATCH 1/3] menu: fix the logic checking whether ESC key is pressed
It's observed that the bootmenu on a serial console sometimes
incorrectly quitted with superfluous characters filled to command
line input:
> *** U-Boot Boot Menu ***
>
> 1. Startup system (Default)
> 2. Upgrade firmware
> 3. Upgrade ATF BL2
> 4. Upgrade ATF FIP
> 5. Load image
> 0. U-Boot console
>
>
> Press UP/DOWN to move, ENTER to select, ESC to quit
>MT7988> [B
Analysis shows it was caused by the wrong logic of bootmenu_loop:
At first the bootmenu_loop received the first ESC char correctly.
However, during the second call to bootmenu_loop, there's no data
in the UART Rx FIFO. Due to the low baudrate, the second char of
the down array key sequence hasn't be fully received.
But bootmenu_loop just did a mdelay(10), and then treated it as a
single ESC key press event. It didn't even try tstc() again after
the 10ms timeout.
This patch fixes this issue by letting bootmenu_loop check tstc()
twice.
Tested-By: E Shattow <lucent@gmail.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
common/menu.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/common/menu.c
+++ b/common/menu.c
@@ -525,14 +525,15 @@ enum bootmenu_key bootmenu_loop(struct b
struct cli_ch_state *cch)
{
enum bootmenu_key key;
- int c;
+ int c, errchar = 0;
c = cli_ch_process(cch, 0);
if (!c) {
while (!c && !tstc()) {
schedule();
mdelay(10);
- c = cli_ch_process(cch, -ETIMEDOUT);
+ c = cli_ch_process(cch, errchar);
+ errchar = -ETIMEDOUT;
}
if (!c) {
c = getchar();

View File

@ -1,112 +0,0 @@
From f1cbdd3330f0055dfbff0ef7d86276c4cc3cff2a Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 29 Oct 2024 17:47:16 +0800
Subject: [PATCH 2/3] menu: add support to check if menu needs to be reprinted
This patch adds a new callback named need_reprint for menu.
The need_reprint will be called before printing the menu. If the
callback exists and returns FALSE, menu printing will be canceled.
This is very useful if the menu was not changed. It can save time
for serial-based menu to handle more input data.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
boot/pxe_utils.c | 2 +-
cmd/bootmenu.c | 2 +-
cmd/eficonfig.c | 2 +-
common/menu.c | 11 +++++++++++
include/menu.h | 1 +
5 files changed, 15 insertions(+), 3 deletions(-)
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -1449,7 +1449,7 @@ static struct menu *pxe_menu_to_menu(str
* Create a menu and add items for all the labels.
*/
m = menu_create(cfg->title, DIV_ROUND_UP(cfg->timeout, 10),
- cfg->prompt, NULL, label_print, NULL, NULL);
+ cfg->prompt, NULL, label_print, NULL, NULL, NULL);
if (!m)
return NULL;
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -506,7 +506,7 @@ static enum bootmenu_ret bootmenu_show(i
menu = menu_create(NULL, bootmenu->delay, 1, menu_display_statusline,
bootmenu_print_entry, bootmenu_choice_entry,
- bootmenu);
+ NULL, bootmenu);
if (!menu) {
bootmenu_destroy(bootmenu);
return BOOTMENU_RET_FAIL;
--- a/cmd/eficonfig.c
+++ b/cmd/eficonfig.c
@@ -443,7 +443,7 @@ efi_status_t eficonfig_process_common(st
efi_menu->menu_desc = menu_desc;
menu = menu_create(NULL, 0, 1, display_statusline, item_data_print,
- item_choice, efi_menu);
+ item_choice, NULL, efi_menu);
if (!menu)
return EFI_INVALID_PARAMETER;
--- a/common/menu.c
+++ b/common/menu.c
@@ -43,6 +43,7 @@ struct menu {
void (*display_statusline)(struct menu *);
void (*item_data_print)(void *);
char *(*item_choice)(void *);
+ bool (*need_reprint)(void *);
void *item_choice_data;
struct list_head items;
int item_cnt;
@@ -117,6 +118,11 @@ static inline void *menu_item_destroy(st
*/
static inline void menu_display(struct menu *m)
{
+ if (m->need_reprint) {
+ if (!m->need_reprint(m->item_choice_data))
+ return;
+ }
+
if (m->title) {
puts(m->title);
putc('\n');
@@ -362,6 +368,9 @@ int menu_item_add(struct menu *m, char *
* item. Returns a key string corresponding to the chosen item or NULL if
* no item has been selected.
*
+ * need_reprint - If not NULL, will be called before printing the menu.
+ * Returning FALSE means the menu does not need reprint.
+ *
* item_choice_data - Will be passed as the argument to the item_choice function
*
* Returns a pointer to the menu if successful, or NULL if there is
@@ -371,6 +380,7 @@ struct menu *menu_create(char *title, in
void (*display_statusline)(struct menu *),
void (*item_data_print)(void *),
char *(*item_choice)(void *),
+ bool (*need_reprint)(void *),
void *item_choice_data)
{
struct menu *m;
@@ -386,6 +396,7 @@ struct menu *menu_create(char *title, in
m->display_statusline = display_statusline;
m->item_data_print = item_data_print;
m->item_choice = item_choice;
+ m->need_reprint = need_reprint;
m->item_choice_data = item_choice_data;
m->item_cnt = 0;
--- a/include/menu.h
+++ b/include/menu.h
@@ -13,6 +13,7 @@ struct menu *menu_create(char *title, in
void (*display_statusline)(struct menu *),
void (*item_data_print)(void *),
char *(*item_choice)(void *),
+ bool (*need_reprint)(void *),
void *item_choice_data);
int menu_default_set(struct menu *m, char *item_key);
int menu_get_choice(struct menu *m, void **choice);

View File

@ -1,75 +0,0 @@
From 702752cfae954648d6133bdff19283343b3339ef Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 29 Oct 2024 17:47:22 +0800
Subject: [PATCH 3/3] bootmenu: add reprint check
Record the last active menu item and check if it equals to the
current selected item before reprint.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
cmd/bootmenu.c | 16 +++++++++++++++-
include/menu.h | 1 +
2 files changed, 16 insertions(+), 1 deletion(-)
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -103,11 +103,13 @@ static char *bootmenu_choice_entry(void
switch (key) {
case BKEY_UP:
+ menu->last_active = menu->active;
if (menu->active > 0)
--menu->active;
/* no menu key selected, regenerate menu */
return NULL;
case BKEY_DOWN:
+ menu->last_active = menu->active;
if (menu->active < menu->count - 1)
++menu->active;
/* no menu key selected, regenerate menu */
@@ -133,6 +135,17 @@ static char *bootmenu_choice_entry(void
return NULL;
}
+static bool bootmenu_need_reprint(void *data)
+{
+ struct bootmenu_data *menu = data;
+ bool need_reprint;
+
+ need_reprint = menu->last_active != menu->active;
+ menu->last_active = menu->active;
+
+ return need_reprint;
+}
+
static void bootmenu_destroy(struct bootmenu_data *menu)
{
struct bootmenu_entry *iter = menu->first;
@@ -332,6 +345,7 @@ static struct bootmenu_data *bootmenu_cr
menu->delay = delay;
menu->active = 0;
+ menu->last_active = -1;
menu->first = NULL;
default_str = env_get("bootmenu_default");
@@ -506,7 +520,7 @@ static enum bootmenu_ret bootmenu_show(i
menu = menu_create(NULL, bootmenu->delay, 1, menu_display_statusline,
bootmenu_print_entry, bootmenu_choice_entry,
- NULL, bootmenu);
+ bootmenu_need_reprint, bootmenu);
if (!menu) {
bootmenu_destroy(bootmenu);
return BOOTMENU_RET_FAIL;
--- a/include/menu.h
+++ b/include/menu.h
@@ -40,6 +40,7 @@ int menu_show(int bootdelay);
struct bootmenu_data {
int delay; /* delay for autoboot */
int active; /* active menu entry */
+ int last_active; /* last active menu entry */
int count; /* total count of menu entries */
struct bootmenu_entry *first; /* first menu entry */
};

View File

@ -0,0 +1,45 @@
From 6e45549f4dac42748d66462e04f940ef6737289d Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:39:16 +0800
Subject: [PATCH 01/10] clk: mediatek: mt7629: fix parent clock of some top
clock muxes
According to the mt7629 programming guide, the CLK_TOP_F10M_REF_SEL
shares the same parent selection with CLK_TOP_IRRX_SEL, while the
present parent selection for CLK_TOP_F10M_REF_SEL is actually used
for CLK_TOP_SGMII_REF_1_SEL.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/clk/mediatek/clk-mt7629.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/clk/mediatek/clk-mt7629.c
+++ b/drivers/clk/mediatek/clk-mt7629.c
@@ -186,7 +186,7 @@ static const int pwm_parents[] = {
CLK_TOP_UNIVPLL2_D4
};
-static const int f10m_ref_parents[] = {
+static const int sgmii_ref_1_parents[] = {
CLK_XTAL,
CLK_TOP_SGMIIPLL_D2
};
@@ -369,7 +369,7 @@ static const struct mtk_composite top_mu
/* CLK_CFG_1 */
MUX_GATE(CLK_TOP_PWM_SEL, pwm_parents, 0x50, 0, 2, 7),
- MUX_GATE(CLK_TOP_F10M_REF_SEL, f10m_ref_parents, 0x50, 8, 1, 15),
+ MUX_GATE(CLK_TOP_F10M_REF_SEL, irrx_parents, 0x50, 8, 1, 15),
MUX_GATE(CLK_TOP_NFI_INFRA_SEL, nfi_infra_parents, 0x50, 16, 4, 23),
MUX_GATE(CLK_TOP_FLASH_SEL, flash_parents, 0x50, 24, 3, 31),
@@ -412,7 +412,7 @@ static const struct mtk_composite top_mu
/* CLK_CFG_8 */
MUX_GATE(CLK_TOP_CRYPTO_SEL, crypto_parents, 0xC0, 0, 3, 7),
- MUX_GATE(CLK_TOP_SGMII_REF_1_SEL, f10m_ref_parents, 0xC0, 8, 1, 15),
+ MUX_GATE(CLK_TOP_SGMII_REF_1_SEL, sgmii_ref_1_parents, 0xC0, 8, 1, 15),
MUX_GATE(CLK_TOP_10M_SEL, gpt10m_parents, 0xC0, 16, 1, 23),
};

View File

@ -0,0 +1,28 @@
From ba365c3d23411620d86b5baf621c8f5a4000ab33 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:39:20 +0800
Subject: [PATCH 02/10] arm: dts: mt7629: fix sgmii clock selection for
ethernet
Setup correct parent of clock CLK_TOP_SGMII_REF_1_SEL to allow
sgmiisys1 work correctly.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
arch/arm/dts/mt7629.dtsi | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/arch/arm/dts/mt7629.dtsi
+++ b/arch/arm/dts/mt7629.dtsi
@@ -314,8 +314,10 @@
"sgmii2_cdr_ref", "sgmii2_cdr_fb",
"sgmii_ck", "eth2pll";
assigned-clocks = <&topckgen CLK_TOP_ETH_SEL>,
- <&topckgen CLK_TOP_F10M_REF_SEL>;
+ <&topckgen CLK_TOP_F10M_REF_SEL>,
+ <&topckgen CLK_TOP_SGMII_REF_1_SEL>;
assigned-clock-parents = <&topckgen CLK_TOP_UNIVPLL1_D2>,
+ <&topckgen CLK_TOP_SYSPLL4_D16>,
<&topckgen CLK_TOP_SGMIIPLL_D2>;
power-domains = <&scpsys MT7629_POWER_DOMAIN_ETHSYS>;
resets = <&ethsys ETHSYS_FE_RST>;

View File

@ -0,0 +1,64 @@
From 0d4d8e6f47ef22ea6b3041b4c0cb27b4ed4bf188 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:39:23 +0800
Subject: [PATCH 03/10] net: mediatek: use correct register field for SGMII
speed selection
The register field for SGMII speed selection is a 2-bit field with
value 0 for 1Gbps and 1 for 2.5Gbps (2/3 are reserved).
So it's necessary to set both bits instead of just setting/clearing
only the lower bit.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/net/mtk_eth.c | 12 ++++++------
drivers/net/mtk_eth.h | 3 ++-
2 files changed, 8 insertions(+), 7 deletions(-)
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -835,8 +835,8 @@ static int mt7531_port_sgmii_init(struct
}
/* Set SGMII GEN2 speed(2.5G) */
- mt753x_reg_rmw(priv, MT7531_PHYA_CTRL_SIGNAL3(port),
- SGMSYS_SPEED_2500, SGMSYS_SPEED_2500);
+ mt753x_reg_rmw(priv, MT7531_PHYA_CTRL_SIGNAL3(port), SGMSYS_SPEED_MASK,
+ FIELD_PREP(SGMSYS_SPEED_MASK, SGMSYS_SPEED_2500));
/* Disable SGMII AN */
mt753x_reg_rmw(priv, MT7531_PCS_CONTROL_1(port),
@@ -1281,8 +1281,7 @@ static int mtk_phy_probe(struct udevice
static void mtk_sgmii_an_init(struct mtk_eth_priv *priv)
{
/* Set SGMII GEN1 speed(1G) */
- clrsetbits_le32(priv->sgmii_base + priv->soc->ana_rgc3,
- SGMSYS_SPEED_2500, 0);
+ clrbits_le32(priv->sgmii_base + priv->soc->ana_rgc3, SGMSYS_SPEED_MASK);
/* Enable SGMII AN */
setbits_le32(priv->sgmii_base + SGMSYS_PCS_CONTROL_1,
@@ -1305,8 +1304,9 @@ static void mtk_sgmii_an_init(struct mtk
static void mtk_sgmii_force_init(struct mtk_eth_priv *priv)
{
/* Set SGMII GEN2 speed(2.5G) */
- setbits_le32(priv->sgmii_base + priv->soc->ana_rgc3,
- SGMSYS_SPEED_2500);
+ clrsetbits_le32(priv->sgmii_base + priv->soc->ana_rgc3,
+ SGMSYS_SPEED_MASK,
+ FIELD_PREP(SGMSYS_SPEED_MASK, SGMSYS_SPEED_2500));
/* Disable SGMII AN */
clrsetbits_le32(priv->sgmii_base + SGMSYS_PCS_CONTROL_1,
--- a/drivers/net/mtk_eth.h
+++ b/drivers/net/mtk_eth.h
@@ -108,7 +108,8 @@ enum mkt_eth_capabilities {
#define SGMSYS_GEN2_SPEED 0x2028
#define SGMSYS_GEN2_SPEED_V2 0x128
-#define SGMSYS_SPEED_2500 BIT(2)
+#define SGMSYS_SPEED_MASK GENMASK(3, 2)
+#define SGMSYS_SPEED_2500 1
/* USXGMII subsystem config registers */
/* Register to control USXGMII XFI PLL digital */

View File

@ -0,0 +1,78 @@
From 7562da9454c1a6eff3db3b41c183e03039e855e6 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:39:27 +0800
Subject: [PATCH 04/10] net: mediatek: correct register name of ethsys syscfg1
The SYSCFG0 should be SYSCFG1 according to the programming guide.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/net/mtk_eth.c | 14 +++++++-------
drivers/net/mtk_eth.h | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1450,8 +1450,8 @@ static void mtk_mac_init(struct mtk_eth_
}
ge_mode = GE_MODE_RGMII;
- mtk_ethsys_rmw(priv, ETHSYS_SYSCFG0_REG, SYSCFG0_SGMII_SEL_M,
- SYSCFG0_SGMII_SEL(priv->gmac_id));
+ mtk_ethsys_rmw(priv, ETHSYS_SYSCFG1_REG, SYSCFG1_SGMII_SEL_M,
+ SYSCFG1_SGMII_SEL(priv->gmac_id));
if (priv->phy_interface == PHY_INTERFACE_MODE_SGMII)
mtk_sgmii_an_init(priv);
else
@@ -1469,9 +1469,9 @@ static void mtk_mac_init(struct mtk_eth_
}
/* set the gmac to the right mode */
- mtk_ethsys_rmw(priv, ETHSYS_SYSCFG0_REG,
- SYSCFG0_GE_MODE_M << SYSCFG0_GE_MODE_S(priv->gmac_id),
- ge_mode << SYSCFG0_GE_MODE_S(priv->gmac_id));
+ mtk_ethsys_rmw(priv, ETHSYS_SYSCFG1_REG,
+ SYSCFG1_GE_MODE_M << SYSCFG1_GE_MODE_S(priv->gmac_id),
+ ge_mode << SYSCFG1_GE_MODE_S(priv->gmac_id));
if (priv->force_mode) {
mcr = (IPG_96BIT_WITH_SHORT_IPG << IPG_CFG_S) |
@@ -1527,8 +1527,8 @@ static void mtk_xmac_init(struct mtk_eth
}
/* Set GMAC to the correct mode */
- mtk_ethsys_rmw(priv, ETHSYS_SYSCFG0_REG,
- SYSCFG0_GE_MODE_M << SYSCFG0_GE_MODE_S(priv->gmac_id),
+ mtk_ethsys_rmw(priv, ETHSYS_SYSCFG1_REG,
+ SYSCFG1_GE_MODE_M << SYSCFG1_GE_MODE_S(priv->gmac_id),
0);
if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII &&
--- a/drivers/net/mtk_eth.h
+++ b/drivers/net/mtk_eth.h
@@ -65,11 +65,11 @@ enum mkt_eth_capabilities {
/* Ethernet subsystem registers */
-#define ETHSYS_SYSCFG0_REG 0x14
-#define SYSCFG0_GE_MODE_S(n) (12 + ((n) * 2))
-#define SYSCFG0_GE_MODE_M 0x3
-#define SYSCFG0_SGMII_SEL_M (0x3 << 8)
-#define SYSCFG0_SGMII_SEL(gmac) ((!(gmac)) ? BIT(9) : BIT(8))
+#define ETHSYS_SYSCFG1_REG 0x14
+#define SYSCFG1_GE_MODE_S(n) (12 + ((n) * 2))
+#define SYSCFG1_GE_MODE_M 0x3
+#define SYSCFG1_SGMII_SEL_M (0x3 << 8)
+#define SYSCFG1_SGMII_SEL(gmac) ((!(gmac)) ? BIT(9) : BIT(8))
#define ETHSYS_CLKCFG0_REG 0x2c
#define ETHSYS_TRGMII_CLK_SEL362_5 BIT(11)
@@ -84,7 +84,7 @@ enum mkt_eth_capabilities {
#define QPHY_SEL_MASK 0x3
#define SGMII_QPHY_SEL 0x2
-/* SYSCFG0_GE_MODE: GE Modes */
+/* SYSCFG1_GE_MODE: GE Modes */
#define GE_MODE_RGMII 0
#define GE_MODE_MII 1
#define GE_MODE_MII_PHY 2

View File

@ -0,0 +1,90 @@
From 82f05bc48821f3709f22f3d1f6e45290547f74be Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:39:41 +0800
Subject: [PATCH 05/10] net: mediatek: fix sgmii selection for mt7622
Unlike other platforms, mt7622 has only one SGMII and it can be
attached to either gmac1 or gmac2. So the register field of the
sgmii selection differs from other platforms as newer platforms can
control each sgmii individually.
This patch adds a new capability for mt7622 to handle this case.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/net/mtk_eth.c | 10 ++++++++--
drivers/net/mtk_eth.h | 8 ++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1434,7 +1434,7 @@ static void mtk_usxgmii_an_init(struct m
static void mtk_mac_init(struct mtk_eth_priv *priv)
{
- int i, ge_mode = 0;
+ int i, sgmii_sel_mask = 0, ge_mode = 0;
u32 mcr;
switch (priv->phy_interface) {
@@ -1450,8 +1450,13 @@ static void mtk_mac_init(struct mtk_eth_
}
ge_mode = GE_MODE_RGMII;
- mtk_ethsys_rmw(priv, ETHSYS_SYSCFG1_REG, SYSCFG1_SGMII_SEL_M,
+
+ if (MTK_HAS_CAPS(priv->soc->caps, MTK_ETH_PATH_MT7622_SGMII))
+ sgmii_sel_mask = SYSCFG1_SGMII_SEL_M;
+
+ mtk_ethsys_rmw(priv, ETHSYS_SYSCFG1_REG, sgmii_sel_mask,
SYSCFG1_SGMII_SEL(priv->gmac_id));
+
if (priv->phy_interface == PHY_INTERFACE_MODE_SGMII)
mtk_sgmii_an_init(priv);
else
@@ -2112,6 +2117,7 @@ static const struct mtk_soc_data mt7623_
};
static const struct mtk_soc_data mt7622_data = {
+ .caps = MT7622_CAPS,
.ana_rgc3 = 0x2028,
.gdma_count = 2,
.pdma_base = PDMA_V1_BASE,
--- a/drivers/net/mtk_eth.h
+++ b/drivers/net/mtk_eth.h
@@ -23,6 +23,7 @@ enum mkt_eth_capabilities {
/* PATH BITS */
MTK_ETH_PATH_GMAC1_TRGMII_BIT,
MTK_ETH_PATH_GMAC2_SGMII_BIT,
+ MTK_ETH_PATH_MT7622_SGMII_BIT,
};
#define MTK_TRGMII BIT(MTK_TRGMII_BIT)
@@ -36,6 +37,7 @@ enum mkt_eth_capabilities {
#define MTK_ETH_PATH_GMAC1_TRGMII BIT(MTK_ETH_PATH_GMAC1_TRGMII_BIT)
#define MTK_ETH_PATH_GMAC2_SGMII BIT(MTK_ETH_PATH_GMAC2_SGMII_BIT)
+#define MTK_ETH_PATH_MT7622_SGMII BIT(MTK_ETH_PATH_MT7622_SGMII_BIT)
#define MTK_GMAC1_TRGMII (MTK_ETH_PATH_GMAC1_TRGMII | MTK_TRGMII)
@@ -45,6 +47,8 @@ enum mkt_eth_capabilities {
#define MT7621_CAPS (MTK_GMAC1_TRGMII | MTK_TRGMII_MT7621_CLK)
+#define MT7622_CAPS (MTK_ETH_PATH_MT7622_SGMII)
+
#define MT7623_CAPS (MTK_GMAC1_TRGMII)
#define MT7981_CAPS (MTK_GMAC2_U3_QPHY | MTK_NETSYS_V2)
@@ -68,8 +72,8 @@ enum mkt_eth_capabilities {
#define ETHSYS_SYSCFG1_REG 0x14
#define SYSCFG1_GE_MODE_S(n) (12 + ((n) * 2))
#define SYSCFG1_GE_MODE_M 0x3
-#define SYSCFG1_SGMII_SEL_M (0x3 << 8)
-#define SYSCFG1_SGMII_SEL(gmac) ((!(gmac)) ? BIT(9) : BIT(8))
+#define SYSCFG1_SGMII_SEL_M GENMASK(9, 8)
+#define SYSCFG1_SGMII_SEL(gmac) BIT(9 - (gmac))
#define ETHSYS_CLKCFG0_REG 0x2c
#define ETHSYS_TRGMII_CLK_SEL362_5 BIT(11)

View File

@ -0,0 +1,73 @@
From d8d7e566545f836dd49611cafbf44eef56434e08 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:39:46 +0800
Subject: [PATCH 06/10] net: mediatek: fix gmac2 usability for mt7629
MT7629 need extra setting for gmac2 to work. So additional
capability is added for mt7629 to handle this case.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/net/mtk_eth.c | 6 ++++++
drivers/net/mtk_eth.h | 7 +++++++
2 files changed, 13 insertions(+)
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1437,6 +1437,11 @@ static void mtk_mac_init(struct mtk_eth_
int i, sgmii_sel_mask = 0, ge_mode = 0;
u32 mcr;
+ if (MTK_HAS_CAPS(priv->soc->caps, MTK_ETH_PATH_MT7629_GMAC2)) {
+ mtk_infra_rmw(priv, MT7629_INFRA_MISC2_REG,
+ INFRA_MISC2_BONDING_OPTION, priv->gmac_id);
+ }
+
switch (priv->phy_interface) {
case PHY_INTERFACE_MODE_RGMII_RXID:
case PHY_INTERFACE_MODE_RGMII:
@@ -2101,6 +2106,7 @@ static const struct mtk_soc_data mt7981_
};
static const struct mtk_soc_data mt7629_data = {
+ .caps = MT7629_CAPS,
.ana_rgc3 = 0x128,
.gdma_count = 2,
.pdma_base = PDMA_V1_BASE,
--- a/drivers/net/mtk_eth.h
+++ b/drivers/net/mtk_eth.h
@@ -24,6 +24,7 @@ enum mkt_eth_capabilities {
MTK_ETH_PATH_GMAC1_TRGMII_BIT,
MTK_ETH_PATH_GMAC2_SGMII_BIT,
MTK_ETH_PATH_MT7622_SGMII_BIT,
+ MTK_ETH_PATH_MT7629_GMAC2_BIT,
};
#define MTK_TRGMII BIT(MTK_TRGMII_BIT)
@@ -38,6 +39,7 @@ enum mkt_eth_capabilities {
#define MTK_ETH_PATH_GMAC2_SGMII BIT(MTK_ETH_PATH_GMAC2_SGMII_BIT)
#define MTK_ETH_PATH_MT7622_SGMII BIT(MTK_ETH_PATH_MT7622_SGMII_BIT)
+#define MTK_ETH_PATH_MT7629_GMAC2 BIT(MTK_ETH_PATH_MT7629_GMAC2_BIT)
#define MTK_GMAC1_TRGMII (MTK_ETH_PATH_GMAC1_TRGMII | MTK_TRGMII)
@@ -51,6 +53,8 @@ enum mkt_eth_capabilities {
#define MT7623_CAPS (MTK_GMAC1_TRGMII)
+#define MT7629_CAPS (MTK_ETH_PATH_MT7629_GMAC2 | MTK_INFRA)
+
#define MT7981_CAPS (MTK_GMAC2_U3_QPHY | MTK_NETSYS_V2)
#define MT7986_CAPS (MTK_NETSYS_V2)
@@ -88,6 +92,9 @@ enum mkt_eth_capabilities {
#define QPHY_SEL_MASK 0x3
#define SGMII_QPHY_SEL 0x2
+#define MT7629_INFRA_MISC2_REG 0x70c
+#define INFRA_MISC2_BONDING_OPTION GENMASK(15, 0)
+
/* SYSCFG1_GE_MODE: GE Modes */
#define GE_MODE_RGMII 0
#define GE_MODE_MII 1

View File

@ -0,0 +1,147 @@
From ad0c47109e4c9f6297aa247d8bbf7131438bc435 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:39:50 +0800
Subject: [PATCH 07/10] net: mediatek: add support for 10GBASE-R
This patch adds support for 10GBASE-R interface mode
Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/net/mtk_eth.c | 83 +++++++++++++++++++++++++++++++++++++++++--
1 file changed, 81 insertions(+), 2 deletions(-)
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1246,6 +1246,7 @@ static int mtk_phy_start(struct mtk_eth_
if (!priv->force_mode) {
if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII ||
+ priv->phy_interface == PHY_INTERFACE_MODE_10GBASER ||
priv->phy_interface == PHY_INTERFACE_MODE_XGMII)
mtk_xphy_link_adjust(priv);
else
@@ -1425,6 +1426,71 @@ static void mtk_usxgmii_setup_phya_an_10
udelay(400);
}
+static void mtk_usxgmii_setup_phya_force_10000(struct mtk_eth_priv *priv)
+{
+ regmap_write(priv->usxgmii_regmap, 0x810, 0x000FFE6C);
+ regmap_write(priv->usxgmii_regmap, 0x818, 0x07B1EC7B);
+ regmap_write(priv->usxgmii_regmap, 0x80C, 0xB0000000);
+ ndelay(1020);
+ regmap_write(priv->usxgmii_regmap, 0x80C, 0x90000000);
+ ndelay(1020);
+
+ regmap_write(priv->xfi_pextp_regmap, 0x9024, 0x00C9071C);
+ regmap_write(priv->xfi_pextp_regmap, 0x2020, 0xAA8585AA);
+ regmap_write(priv->xfi_pextp_regmap, 0x2030, 0x0C020707);
+ regmap_write(priv->xfi_pextp_regmap, 0x2034, 0x0E050F0F);
+ regmap_write(priv->xfi_pextp_regmap, 0x2040, 0x00140032);
+ regmap_write(priv->xfi_pextp_regmap, 0x50F0, 0x00C014AA);
+ regmap_write(priv->xfi_pextp_regmap, 0x50E0, 0x3777C12B);
+ regmap_write(priv->xfi_pextp_regmap, 0x506C, 0x005F9CFF);
+ regmap_write(priv->xfi_pextp_regmap, 0x5070, 0x9D9DFAFA);
+ regmap_write(priv->xfi_pextp_regmap, 0x5074, 0x27273F3F);
+ regmap_write(priv->xfi_pextp_regmap, 0x5078, 0xA7883C68);
+ regmap_write(priv->xfi_pextp_regmap, 0x507C, 0x11661166);
+ regmap_write(priv->xfi_pextp_regmap, 0x5080, 0x0E000AAF);
+ regmap_write(priv->xfi_pextp_regmap, 0x5084, 0x08080D0D);
+ regmap_write(priv->xfi_pextp_regmap, 0x5088, 0x02030909);
+ regmap_write(priv->xfi_pextp_regmap, 0x50E4, 0x0C0C0000);
+ regmap_write(priv->xfi_pextp_regmap, 0x50E8, 0x04040000);
+ regmap_write(priv->xfi_pextp_regmap, 0x50EC, 0x0F0F0C06);
+ regmap_write(priv->xfi_pextp_regmap, 0x50A8, 0x506E8C8C);
+ regmap_write(priv->xfi_pextp_regmap, 0x6004, 0x18190000);
+ regmap_write(priv->xfi_pextp_regmap, 0x00F8, 0x01423342);
+ regmap_write(priv->xfi_pextp_regmap, 0x00F4, 0x80201F20);
+ regmap_write(priv->xfi_pextp_regmap, 0x0030, 0x00050C00);
+ regmap_write(priv->xfi_pextp_regmap, 0x0070, 0x02002800);
+ ndelay(1020);
+ regmap_write(priv->xfi_pextp_regmap, 0x30B0, 0x00000020);
+ regmap_write(priv->xfi_pextp_regmap, 0x3028, 0x00008A01);
+ regmap_write(priv->xfi_pextp_regmap, 0x302C, 0x0000A884);
+ regmap_write(priv->xfi_pextp_regmap, 0x3024, 0x00083002);
+ regmap_write(priv->xfi_pextp_regmap, 0x3010, 0x00022220);
+ regmap_write(priv->xfi_pextp_regmap, 0x5064, 0x0F020A01);
+ regmap_write(priv->xfi_pextp_regmap, 0x50B4, 0x06100600);
+ regmap_write(priv->xfi_pextp_regmap, 0x3048, 0x47684100);
+ regmap_write(priv->xfi_pextp_regmap, 0x3050, 0x00000000);
+ regmap_write(priv->xfi_pextp_regmap, 0x3054, 0x00000000);
+ regmap_write(priv->xfi_pextp_regmap, 0x306C, 0x00000F00);
+ if (priv->gmac_id == 2)
+ regmap_write(priv->xfi_pextp_regmap, 0xA008, 0x0007B400);
+ regmap_write(priv->xfi_pextp_regmap, 0xA060, 0x00040000);
+ regmap_write(priv->xfi_pextp_regmap, 0x90D0, 0x00000001);
+ regmap_write(priv->xfi_pextp_regmap, 0x0070, 0x0200E800);
+ udelay(150);
+ regmap_write(priv->xfi_pextp_regmap, 0x0070, 0x0200C111);
+ ndelay(1020);
+ regmap_write(priv->xfi_pextp_regmap, 0x0070, 0x0200C101);
+ udelay(15);
+ regmap_write(priv->xfi_pextp_regmap, 0x0070, 0x0202C111);
+ ndelay(1020);
+ regmap_write(priv->xfi_pextp_regmap, 0x0070, 0x0202C101);
+ udelay(100);
+ regmap_write(priv->xfi_pextp_regmap, 0x30B0, 0x00000030);
+ regmap_write(priv->xfi_pextp_regmap, 0x00F4, 0x80201F00);
+ regmap_write(priv->xfi_pextp_regmap, 0x3040, 0x30000000);
+ udelay(400);
+}
+
static void mtk_usxgmii_an_init(struct mtk_eth_priv *priv)
{
mtk_xfi_pll_enable(priv);
@@ -1432,6 +1498,13 @@ static void mtk_usxgmii_an_init(struct m
mtk_usxgmii_setup_phya_an_10000(priv);
}
+static void mtk_10gbaser_init(struct mtk_eth_priv *priv)
+{
+ mtk_xfi_pll_enable(priv);
+ mtk_usxgmii_reset(priv);
+ mtk_usxgmii_setup_phya_force_10000(priv);
+}
+
static void mtk_mac_init(struct mtk_eth_priv *priv)
{
int i, sgmii_sel_mask = 0, ge_mode = 0;
@@ -1532,6 +1605,9 @@ static void mtk_xmac_init(struct mtk_eth
case PHY_INTERFACE_MODE_USXGMII:
mtk_usxgmii_an_init(priv);
break;
+ case PHY_INTERFACE_MODE_10GBASER:
+ mtk_10gbaser_init(priv);
+ break;
default:
break;
}
@@ -1541,7 +1617,8 @@ static void mtk_xmac_init(struct mtk_eth
SYSCFG1_GE_MODE_M << SYSCFG1_GE_MODE_S(priv->gmac_id),
0);
- if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII &&
+ if ((priv->phy_interface == PHY_INTERFACE_MODE_USXGMII ||
+ priv->phy_interface == PHY_INTERFACE_MODE_10GBASER) &&
priv->gmac_id == 1) {
mtk_infra_rmw(priv, TOPMISC_NETSYS_PCS_MUX,
NETSYS_PCS_MUX_MASK, MUX_G2_USXGMII_SEL);
@@ -1843,6 +1920,7 @@ static int mtk_eth_probe(struct udevice
/* Set MAC mode */
if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII ||
+ priv->phy_interface == PHY_INTERFACE_MODE_10GBASER ||
priv->phy_interface == PHY_INTERFACE_MODE_XGMII)
mtk_xmac_init(priv);
else
@@ -1977,7 +2055,8 @@ static int mtk_eth_of_to_plat(struct ude
/* Upstream linux use mediatek,pnswap instead of pn_swap */
priv->pn_swap = ofnode_read_bool(args.node, "pn_swap") ||
ofnode_read_bool(args.node, "mediatek,pnswap");
- } else if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII) {
+ } else if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII ||
+ priv->phy_interface == PHY_INTERFACE_MODE_10GBASER) {
/* get corresponding usxgmii phandle */
ret = dev_read_phandle_with_args(dev, "mediatek,usxgmiisys",
NULL, 0, 0, &args);

View File

@ -0,0 +1,144 @@
From 5ac929fd1ab1d0dc77b9167952aea7cafdb8619f Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:39:55 +0800
Subject: [PATCH 08/10] net: mediatek: make sgmii/usxgmii optional
Not all platforms supports sgmii and/or usxgmii. So we add Kconfig
options for these features and enable them only for supported
platforms.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/net/Kconfig | 12 ++++++++++++
drivers/net/mtk_eth.c | 39 +++++++++++++++++++++++++++++----------
2 files changed, 41 insertions(+), 10 deletions(-)
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -975,6 +975,18 @@ config MEDIATEK_ETH
This Driver support MediaTek Ethernet GMAC
Say Y to enable support for the MediaTek Ethernet GMAC.
+if MEDIATEK_ETH
+
+config MTK_ETH_SGMII
+ bool
+ default y if ARCH_MEDIATEK && !TARGET_MT7623
+
+config MTK_ETH_XGMII
+ bool
+ default y if TARGET_MT7987 || TARGET_MT7988
+
+endif # MEDIATEK_ETH
+
config HIFEMAC_ETH
bool "HiSilicon Fast Ethernet Controller"
select DM_CLK
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1505,7 +1505,7 @@ static void mtk_10gbaser_init(struct mtk
mtk_usxgmii_setup_phya_force_10000(priv);
}
-static void mtk_mac_init(struct mtk_eth_priv *priv)
+static int mtk_mac_init(struct mtk_eth_priv *priv)
{
int i, sgmii_sel_mask = 0, ge_mode = 0;
u32 mcr;
@@ -1522,13 +1522,16 @@ static void mtk_mac_init(struct mtk_eth_
break;
case PHY_INTERFACE_MODE_SGMII:
case PHY_INTERFACE_MODE_2500BASEX:
+ if (!IS_ENABLED(CONFIG_MTK_ETH_SGMII)) {
+ printf("Error: SGMII is not supported on this platform\n");
+ return -ENOTSUPP;
+ }
+
if (MTK_HAS_CAPS(priv->soc->caps, MTK_GMAC2_U3_QPHY)) {
mtk_infra_rmw(priv, USB_PHY_SWITCH_REG, QPHY_SEL_MASK,
SGMII_QPHY_SEL);
}
- ge_mode = GE_MODE_RGMII;
-
if (MTK_HAS_CAPS(priv->soc->caps, MTK_ETH_PATH_MT7622_SGMII))
sgmii_sel_mask = SYSCFG1_SGMII_SEL_M;
@@ -1539,6 +1542,8 @@ static void mtk_mac_init(struct mtk_eth_
mtk_sgmii_an_init(priv);
else
mtk_sgmii_force_init(priv);
+
+ ge_mode = GE_MODE_RGMII;
break;
case PHY_INTERFACE_MODE_MII:
case PHY_INTERFACE_MODE_GMII:
@@ -1595,12 +1600,19 @@ static void mtk_mac_init(struct mtk_eth_
RX_RST | RXC_DQSISEL);
mtk_gmac_rmw(priv, GMAC_TRGMII_RCK_CTRL, RX_RST, 0);
}
+
+ return 0;
}
-static void mtk_xmac_init(struct mtk_eth_priv *priv)
+static int mtk_xmac_init(struct mtk_eth_priv *priv)
{
u32 force_link = 0;
+ if (!IS_ENABLED(CONFIG_MTK_ETH_XGMII)) {
+ printf("Error: 10Gb interface is not supported on this platform\n");
+ return -ENOTSUPP;
+ }
+
switch (priv->phy_interface) {
case PHY_INTERFACE_MODE_USXGMII:
mtk_usxgmii_an_init(priv);
@@ -1633,6 +1645,8 @@ static void mtk_xmac_init(struct mtk_eth
/* Force GMAC link down */
mtk_gmac_write(priv, GMAC_PORT_MCR(priv->gmac_id), FORCE_MODE);
+
+ return 0;
}
static void mtk_eth_fifo_init(struct mtk_eth_priv *priv)
@@ -1922,9 +1936,12 @@ static int mtk_eth_probe(struct udevice
if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII ||
priv->phy_interface == PHY_INTERFACE_MODE_10GBASER ||
priv->phy_interface == PHY_INTERFACE_MODE_XGMII)
- mtk_xmac_init(priv);
+ ret = mtk_xmac_init(priv);
else
- mtk_mac_init(priv);
+ ret = mtk_mac_init(priv);
+
+ if (ret)
+ return ret;
/* Probe phy if switch is not specified */
if (priv->sw == SW_NONE)
@@ -2032,8 +2049,9 @@ static int mtk_eth_of_to_plat(struct ude
}
}
- if (priv->phy_interface == PHY_INTERFACE_MODE_SGMII ||
- priv->phy_interface == PHY_INTERFACE_MODE_2500BASEX) {
+ if ((priv->phy_interface == PHY_INTERFACE_MODE_SGMII ||
+ priv->phy_interface == PHY_INTERFACE_MODE_2500BASEX) &&
+ IS_ENABLED(CONFIG_MTK_ETH_SGMII)) {
/* get corresponding sgmii phandle */
ret = dev_read_phandle_with_args(dev, "mediatek,sgmiisys",
NULL, 0, 0, &args);
@@ -2055,8 +2073,9 @@ static int mtk_eth_of_to_plat(struct ude
/* Upstream linux use mediatek,pnswap instead of pn_swap */
priv->pn_swap = ofnode_read_bool(args.node, "pn_swap") ||
ofnode_read_bool(args.node, "mediatek,pnswap");
- } else if (priv->phy_interface == PHY_INTERFACE_MODE_USXGMII ||
- priv->phy_interface == PHY_INTERFACE_MODE_10GBASER) {
+ } else if ((priv->phy_interface == PHY_INTERFACE_MODE_USXGMII ||
+ priv->phy_interface == PHY_INTERFACE_MODE_10GBASER) &&
+ IS_ENABLED(CONFIG_MTK_ETH_XGMII)) {
/* get corresponding usxgmii phandle */
ret = dev_read_phandle_with_args(dev, "mediatek,usxgmiisys",
NULL, 0, 0, &args);

View File

@ -0,0 +1,36 @@
From b9dfb5636bc5eb9b783b88b8388dc7d1f41d6498 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:39:59 +0800
Subject: [PATCH 09/10] net: mediatek: don't enable GDMA cpu bridge
unconditionally for NETSYSv3
Enable GDMA cpu bridge only when 10Gb interface is enabled for GMAC other
than GMAC0, or when MT7988 internal switch is used.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/net/mtk_eth.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -1762,10 +1762,16 @@ static int mtk_eth_start(struct udevice
if (priv->sw == SW_MT7988 && priv->gmac_id == 0) {
mtk_gdma_write(priv, priv->gmac_id, GDMA_IG_CTRL_REG,
GDMA_BRIDGE_TO_CPU);
- }
- mtk_gdma_write(priv, priv->gmac_id, GDMA_EG_CTRL_REG,
- GDMA_CPU_BRIDGE_EN);
+ mtk_gdma_write(priv, priv->gmac_id, GDMA_EG_CTRL_REG,
+ GDMA_CPU_BRIDGE_EN);
+ } else if ((priv->phy_interface == PHY_INTERFACE_MODE_USXGMII ||
+ priv->phy_interface == PHY_INTERFACE_MODE_10GBASER ||
+ priv->phy_interface == PHY_INTERFACE_MODE_XGMII) &&
+ priv->gmac_id != 0) {
+ mtk_gdma_write(priv, priv->gmac_id, GDMA_EG_CTRL_REG,
+ GDMA_CPU_BRIDGE_EN);
+ }
}
udelay(500);

View File

@ -0,0 +1,37 @@
From c949686e558e00cbb8c38f7c060701006d70cea8 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Tue, 17 Dec 2024 16:40:03 +0800
Subject: [PATCH 10/10] net: mediatek: fix usability with wget command
The wget command currently cannot work correctly with mtk_eth driver.
This patch fixed this by increase DMA ring size and invalidate ring data
after use.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/net/mtk_eth.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/net/mtk_eth.c
+++ b/drivers/net/mtk_eth.c
@@ -29,8 +29,8 @@
#include "mtk_eth.h"
-#define NUM_TX_DESC 24
-#define NUM_RX_DESC 24
+#define NUM_TX_DESC 32
+#define NUM_RX_DESC 32
#define TX_TOTAL_BUF_SIZE (NUM_TX_DESC * PKTSIZE_ALIGN)
#define RX_TOTAL_BUF_SIZE (NUM_RX_DESC * PKTSIZE_ALIGN)
#define TOTAL_PKT_BUF_SIZE (TX_TOTAL_BUF_SIZE + RX_TOTAL_BUF_SIZE)
@@ -1897,6 +1897,9 @@ static int mtk_eth_free_pkt(struct udevi
rxd = priv->rx_ring_noc + idx * priv->soc->rxd_size;
+ invalidate_dcache_range((ulong)rxd->rxd1,
+ (ulong)rxd->rxd1 + PKTSIZE_ALIGN);
+
if (MTK_HAS_CAPS(priv->soc->caps, MTK_NETSYS_V2) ||
MTK_HAS_CAPS(priv->soc->caps, MTK_NETSYS_V3))
rxd->rxd2 = PDMA_V2_RXD2_PLEN0_SET(PKTSIZE_ALIGN);

View File

@ -0,0 +1,63 @@
From fe106f2093733b8bd61946372945dfea552b4755 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 10 Jan 2025 16:41:20 +0800
Subject: [PATCH 2/3] net: mediatek: add support for MediaTek MT7987 SoC
This patch adds support for MediaTek MT7987.
MT7987 features MediaTek NETSYS v3, similar to MT7988, features three GMACs
which support 2.5Gb HSGMII. One 2.5Gb PHY is also embedded an can be
connected to a dedicated GMAC.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/net/mtk_eth/Kconfig | 4 ++--
drivers/net/mtk_eth/mtk_eth.c | 10 ++++++++++
2 files changed, 12 insertions(+), 2 deletions(-)
--- a/drivers/net/mtk_eth/Kconfig
+++ b/drivers/net/mtk_eth/Kconfig
@@ -16,7 +16,7 @@ config MTK_ETH_SGMII
config MTK_ETH_XGMII
bool
- default y if TARGET_MT7988
+ default y if TARGET_MT7987 || TARGET_MT7988
config MTK_ETH_SWITCH_MT7530
bool "Support for MediaTek MT7530 ethernet switch"
@@ -25,7 +25,7 @@ config MTK_ETH_SWITCH_MT7530
config MTK_ETH_SWITCH_MT7531
bool "Support for MediaTek MT7531 ethernet switch"
default y if TARGET_MT7622 || TARGET_MT7629 || TARGET_MT7981 || \
- TARGET_MT7986
+ TARGET_MT7986 || TARGET_MT7987
config MTK_ETH_SWITCH_MT7988
bool "Support for MediaTek MT7988 built-in ethernet switch"
--- a/drivers/net/mtk_eth/mtk_eth.c
+++ b/drivers/net/mtk_eth/mtk_eth.c
@@ -1477,6 +1477,15 @@ static const struct mtk_soc_data mt7988_
.rxd_size = sizeof(struct mtk_rx_dma_v2),
};
+static const struct mtk_soc_data mt7987_data = {
+ .caps = MT7987_CAPS,
+ .ana_rgc3 = 0x128,
+ .gdma_count = 3,
+ .pdma_base = PDMA_V3_BASE,
+ .txd_size = sizeof(struct mtk_tx_dma_v2),
+ .rxd_size = sizeof(struct mtk_rx_dma_v2),
+};
+
static const struct mtk_soc_data mt7986_data = {
.caps = MT7986_CAPS,
.ana_rgc3 = 0x128,
@@ -1531,6 +1540,7 @@ static const struct mtk_soc_data mt7621_
static const struct udevice_id mtk_eth_ids[] = {
{ .compatible = "mediatek,mt7988-eth", .data = (ulong)&mt7988_data },
+ { .compatible = "mediatek,mt7987-eth", .data = (ulong)&mt7987_data },
{ .compatible = "mediatek,mt7986-eth", .data = (ulong)&mt7986_data },
{ .compatible = "mediatek,mt7981-eth", .data = (ulong)&mt7981_data },
{ .compatible = "mediatek,mt7629-eth", .data = (ulong)&mt7629_data },

View File

@ -0,0 +1,26 @@
From 92090b92fab207250d5b8d5a4a36aa34f5a91f19 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:16:33 +0800
Subject: [PATCH 01/15] board: mediatek: mt7622: remove board_late_init
The function board_late_init defined for mt7622 is useless now. Just
remove it.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
board/mediatek/mt7622/mt7622_rfb.c | 7 -------
1 file changed, 7 deletions(-)
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
@@ -15,10 +15,3 @@ int board_init(void)
{
return 0;
}
-
-int board_late_init(void)
-{
- gd->env_valid = 1; //to load environment variable from persistent store
- env_relocate();
- return 0;
-}

View File

@ -0,0 +1,48 @@
From b033dfb21df8ae876ec69d84bc8c5fafd7aa8ced Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:16:38 +0800
Subject: [PATCH 02/15] clk: mediatek: fix uninitialized fields issue in
INFRA_MUX struct
This patch adds missing initialization of fields in INFRA_MUX struct
which caused uart broken after any other infra mux being enabled by
'clk_prepare_enable'
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/clk/mediatek/clk-mt7981.c | 1 +
drivers/clk/mediatek/clk-mt7986.c | 1 +
drivers/clk/mediatek/clk-mt7988.c | 1 +
3 files changed, 3 insertions(+)
--- a/drivers/clk/mediatek/clk-mt7981.c
+++ b/drivers/clk/mediatek/clk-mt7981.c
@@ -359,6 +359,7 @@ static const struct mtk_parent infra_pci
.id = _id, .mux_reg = (_reg) + 0x8, \
.mux_set_reg = (_reg) + 0x0, .mux_clr_reg = (_reg) + 0x4, \
.mux_shift = _shift, .mux_mask = BIT(_width) - 1, \
+ .gate_shift = -1, .upd_shift = -1, \
.parent_flags = _parents, .num_parents = ARRAY_SIZE(_parents), \
.flags = CLK_MUX_SETCLR_UPD | CLK_PARENT_MIXED, \
}
--- a/drivers/clk/mediatek/clk-mt7986.c
+++ b/drivers/clk/mediatek/clk-mt7986.c
@@ -366,6 +366,7 @@ static const struct mtk_parent infra_pci
.id = _id, .mux_reg = (_reg) + 0x8, \
.mux_set_reg = (_reg) + 0x0, .mux_clr_reg = (_reg) + 0x4, \
.mux_shift = _shift, .mux_mask = BIT(_width) - 1, \
+ .gate_shift = -1, .upd_shift = -1, \
.parent_flags = _parents, .num_parents = ARRAY_SIZE(_parents), \
.flags = CLK_MUX_SETCLR_UPD | CLK_PARENT_MIXED, \
}
--- a/drivers/clk/mediatek/clk-mt7988.c
+++ b/drivers/clk/mediatek/clk-mt7988.c
@@ -485,6 +485,7 @@ static const int infra_pcie_gfmux_tl_ck_
.id = _id, .mux_reg = _reg + 0x8, .mux_set_reg = _reg + 0x0, \
.mux_clr_reg = _reg + 0x4, .mux_shift = _shift, \
.mux_mask = BIT(_width) - 1, .parent = _parents, \
+ .gate_shift = -1, .upd_shift = -1, \
.num_parents = ARRAY_SIZE(_parents), \
.flags = CLK_MUX_SETCLR_UPD | CLK_PARENT_TOPCKGEN, \
}

View File

@ -0,0 +1,25 @@
From 7958b41b8c6a15c3c993affd2091f8c921b6a8a1 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:17:38 +0800
Subject: [PATCH 03/15] configs: mt7629: move image load address to 0x42000000
Update the image load address to ensure it matches the mt7629 NOR
controller's DMA alignment requirements.
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
configs/mt7629_rfb_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/configs/mt7629_rfb_defconfig
+++ b/configs/mt7629_rfb_defconfig
@@ -18,7 +18,7 @@ CONFIG_SPL_STACK=0x106000
CONFIG_SPL_TEXT_BASE=0x201000
CONFIG_SPL_STACK_R=y
CONFIG_SYS_BOOTM_LEN=0x4000000
-CONFIG_SYS_LOAD_ADDR=0x42007f1c
+CONFIG_SYS_LOAD_ADDR=0x42000000
CONFIG_SPL_PAYLOAD="u-boot-lzma.img"
CONFIG_BUILD_TARGET="u-boot-mtk.bin"
CONFIG_SPL_IMAGE="spl/u-boot-spl-mtk.bin"

View File

@ -0,0 +1,24 @@
From c7a3761ddfce2bd56ad319a254d5269cb26fa18f Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:17:44 +0800
Subject: [PATCH 04/15] configs: mt7988: move image load address to 0x44000000
This patch sets mt7988 image load address to 0x44000000 to support loading
larger images.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
configs/mt7988_rfb_defconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/configs/mt7988_rfb_defconfig
+++ b/configs/mt7988_rfb_defconfig
@@ -7,7 +7,7 @@ CONFIG_SYS_MALLOC_F_LEN=0x4000
CONFIG_NR_DRAM_BANKS=1
CONFIG_DEFAULT_DEVICE_TREE="mt7988-rfb"
CONFIG_TARGET_MT7988=y
-CONFIG_SYS_LOAD_ADDR=0x46000000
+CONFIG_SYS_LOAD_ADDR=0x44000000
CONFIG_DEBUG_UART_BASE=0x11000000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_DEBUG_UART=y

View File

@ -0,0 +1,23 @@
From a2c2ac46ca4c4ef5fe043e584cf867a20e93226d Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:17:51 +0800
Subject: [PATCH 05/15] spi: mtk_spim: add support to use DT live tree
Change devfdt_get_addr_ptr to dev_read_addr_ptr to support DT live tree.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/spi/mtk_spim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/spi/mtk_spim.c
+++ b/drivers/spi/mtk_spim.c
@@ -648,7 +648,7 @@ static int mtk_spim_probe(struct udevice
struct mtk_spim_priv *priv = dev_get_priv(dev);
int ret;
- priv->base = devfdt_get_addr_ptr(dev);
+ priv->base = dev_read_addr_ptr(dev);
if (!priv->base)
return -EINVAL;

View File

@ -0,0 +1,27 @@
From 7725d4ba16577b74567f7cffb2faffa8bdc5ad61 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:17:55 +0800
Subject: [PATCH 06/15] spi: mtk_spim: check slave device mode in spi-mem's
supports_op
Call spi_mem_default_supports_op() in supports_op to honor the
slave's supported single/dual/quad mode settings.
Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/spi/mtk_spim.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/spi/mtk_spim.c
+++ b/drivers/spi/mtk_spim.c
@@ -359,6 +359,9 @@ static bool mtk_spim_supports_op(struct
struct udevice *bus = dev_get_parent(slave->dev);
struct mtk_spim_priv *priv = dev_get_priv(bus);
+ if (!spi_mem_default_supports_op(slave, op))
+ return false;
+
if (op->cmd.buswidth == 0 || op->cmd.buswidth > 4 ||
op->addr.buswidth > 4 || op->dummy.buswidth > 4 ||
op->data.buswidth > 4)

View File

@ -0,0 +1,96 @@
From c7a602028669f4409538c3ce0a63c4054d0f2b7a Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:18:01 +0800
Subject: [PATCH 07/15] arm: dts: mediatek: add quad mode capabilities for SPI
flashes
Explicitly add quad mode capabilities or the SPI controller may
start transfer in single mode.
Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
arch/arm/dts/mt7981-rfb.dts | 4 ++++
arch/arm/dts/mt7986a-rfb.dts | 4 ++++
arch/arm/dts/mt7986b-rfb.dts | 4 ++++
arch/arm/dts/mt7988-rfb.dts | 4 ++++
4 files changed, 16 insertions(+)
--- a/arch/arm/dts/mt7981-rfb.dts
+++ b/arch/arm/dts/mt7981-rfb.dts
@@ -143,6 +143,8 @@
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <52000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
};
};
@@ -164,6 +166,8 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <52000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
};
};
--- a/arch/arm/dts/mt7986a-rfb.dts
+++ b/arch/arm/dts/mt7986a-rfb.dts
@@ -190,12 +190,16 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <52000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
};
spi_nand@1 {
compatible = "spi-nand";
reg = <1>;
spi-max-frequency = <52000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
};
};
--- a/arch/arm/dts/mt7986b-rfb.dts
+++ b/arch/arm/dts/mt7986b-rfb.dts
@@ -177,12 +177,16 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <52000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
};
spi_nand@1 {
compatible = "spi-nand";
reg = <1>;
spi-max-frequency = <52000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
};
};
--- a/arch/arm/dts/mt7988-rfb.dts
+++ b/arch/arm/dts/mt7988-rfb.dts
@@ -144,6 +144,8 @@
compatible = "spi-nand";
reg = <0>;
spi-max-frequency = <52000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
};
};
@@ -165,6 +167,8 @@
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <52000000>;
+ spi-rx-bus-width = <4>;
+ spi-tx-bus-width = <4>;
};
};

View File

@ -0,0 +1,98 @@
From 7071ba2658ef6175183cc5dc85819293811490b3 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:18:06 +0800
Subject: [PATCH 08/15] pwm: mediatek: add pwm3 support for mt7981
This patch adds pwm channel 2 (pwm3) support for mt7981
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
arch/arm/dts/mt7981-emmc-rfb.dts | 8 ++++++++
arch/arm/dts/mt7981-rfb.dts | 8 ++++++++
arch/arm/dts/mt7981-sd-rfb.dts | 8 ++++++++
arch/arm/dts/mt7981.dtsi | 10 ++++++++--
drivers/pwm/pwm-mtk.c | 2 +-
5 files changed, 33 insertions(+), 3 deletions(-)
--- a/arch/arm/dts/mt7981-emmc-rfb.dts
+++ b/arch/arm/dts/mt7981-emmc-rfb.dts
@@ -95,6 +95,14 @@
};
};
+ /* pin13 as pwm0, pin15 as pwm1, pin7 as pwm2 */
+ three_pwm_pins_1: three-pwm-pins {
+ mux {
+ function = "pwm";
+ groups = "pwm0_0", "pwm1_1", "pwm2";
+ };
+ };
+
mmc0_pins_default: mmc0default {
mux {
function = "flash";
--- a/arch/arm/dts/mt7981-rfb.dts
+++ b/arch/arm/dts/mt7981-rfb.dts
@@ -123,6 +123,14 @@
groups = "pwm0_1", "pwm1_0", "pwm2";
};
};
+
+ /* pin13 as pwm0, pin15 as pwm1, pin7 as pwm2 */
+ three_pwm_pins_1: three-pwm-pins {
+ mux {
+ function = "pwm";
+ groups = "pwm0_0", "pwm1_1", "pwm2";
+ };
+ };
};
&spi0 {
--- a/arch/arm/dts/mt7981-sd-rfb.dts
+++ b/arch/arm/dts/mt7981-sd-rfb.dts
@@ -95,6 +95,14 @@
};
};
+ /* pin13 as pwm0, pin15 as pwm1, pin7 as pwm2 */
+ three_pwm_pins_1: three-pwm-pins {
+ mux {
+ function = "pwm";
+ groups = "pwm0_0", "pwm1_1", "pwm2";
+ };
+ };
+
mmc0_pins_default: mmc0default {
mux {
function = "flash";
--- a/arch/arm/dts/mt7981.dtsi
+++ b/arch/arm/dts/mt7981.dtsi
@@ -137,8 +137,14 @@
<&infracfg CLK_INFRA_PWM1_CK>,
<&infracfg CLK_INFRA_PWM2_CK>,
<&infracfg CLK_INFRA_PWM3_CK>;
- assigned-clocks = <&topckgen CLK_TOP_PWM_SEL>;
- assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>;
+ assigned-clocks = <&topckgen CLK_TOP_PWM_SEL>,
+ <&infracfg CLK_INFRA_PWM1_SEL>,
+ <&infracfg CLK_INFRA_PWM2_SEL>,
+ <&infracfg CLK_INFRA_PWM3_SEL>;
+ assigned-clock-parents = <&topckgen CLK_TOP_CB_CKSQ_40M>,
+ <&topckgen CLK_TOP_PWM_SEL>,
+ <&topckgen CLK_TOP_PWM_SEL>,
+ <&topckgen CLK_TOP_PWM_SEL>;
clock-names = "top", "main", "pwm1", "pwm2", "pwm3";
status = "disabled";
};
--- a/drivers/pwm/pwm-mtk.c
+++ b/drivers/pwm/pwm-mtk.c
@@ -192,7 +192,7 @@ static const struct mtk_pwm_soc mt7629_d
};
static const struct mtk_pwm_soc mt7981_data = {
- .num_pwms = 2,
+ .num_pwms = 3,
.pwm45_fixup = false,
.reg_ver = PWM_REG_V2,
};

View File

@ -0,0 +1,61 @@
From dfbadb86b3bc43c004671ab6eb46ee160a192e98 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:18:11 +0800
Subject: [PATCH 09/15] pci: mediatek: add support for multiple ports in
mediatek pcie gen3 driver
One MediaTek PCIe Gen3 controller has only one port, where PCI bus 0
on this port represents the controller itself and bus 1 represents
the external PCIe device.
If multiple PCIe controllers are probed in U-Boot, U-Boot will use
bus numbers greater than 2 as input parameters. Therefore, we should
convert the BDF bus number to either 0 or 1 by subtracting the
offset by controller->seq_.
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/pci/pcie_mediatek_gen3.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
--- a/drivers/pci/pcie_mediatek_gen3.c
+++ b/drivers/pci/pcie_mediatek_gen3.c
@@ -83,6 +83,28 @@ struct mtk_pcie {
struct phy phy;
};
+static pci_dev_t convert_bdf(const struct udevice *controller, pci_dev_t bdf)
+{
+ int bdfs[3];
+
+ bdfs[0] = PCI_BUS(bdf);
+ bdfs[1] = PCI_DEV(bdf);
+ bdfs[2] = PCI_FUNC(bdf);
+
+ /*
+ * One MediaTek PCIe Gen3 controller has only one port, where PCI bus 0 on
+ * this port represents the controller itself and bus 1 represents the
+ * external PCIe device. If multiple PCIe controllers are probed in U-Boot,
+ * U-Boot will use bus numbers greater than 2 as input parameters. Therefore,
+ * we should convert the BDF bus number to either 0 or 1 by subtracting the
+ * offset by controller->seq_
+ */
+
+ bdfs[0] = bdfs[0] - controller->seq_;
+
+ return PCI_BDF(bdfs[0], bdfs[1], bdfs[2]);
+}
+
static void mtk_pcie_config_tlp_header(const struct udevice *bus,
pci_dev_t devfn,
int where, int size)
@@ -91,6 +113,8 @@ static void mtk_pcie_config_tlp_header(c
int bytes;
u32 val;
+ devfn = convert_bdf(bus, devfn);
+
size = 1 << size;
bytes = (GENMASK(size - 1, 0) & 0xf) << (where & 0x3);

View File

@ -0,0 +1,219 @@
From 4064eb22e221ce93fef7f1ec3b13ac670c6b20e2 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:18:17 +0800
Subject: [PATCH 10/15] arm: dts: mediatek: add pcie support for mt7988
This patch adds PCIe support for mt7988
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
arch/arm/dts/mt7988-rfb.dts | 18 ++++
arch/arm/dts/mt7988.dtsi | 162 ++++++++++++++++++++++++++++++++++++
2 files changed, 180 insertions(+)
--- a/arch/arm/dts/mt7988-rfb.dts
+++ b/arch/arm/dts/mt7988-rfb.dts
@@ -63,6 +63,24 @@
};
};
+&pcie0 {
+ status = "okay";
+};
+
+&pcie1 {
+ status = "okay";
+};
+
+/* PCIE2 not working in u-boot */
+&pcie2 {
+ status = "disabled";
+};
+
+/* PCIE3 not working in u-boot */
+&pcie3 {
+ status = "disabled";
+};
+
&pinctrl {
i2c1_pins: i2c1-pins {
mux {
--- a/arch/arm/dts/mt7988.dtsi
+++ b/arch/arm/dts/mt7988.dtsi
@@ -188,6 +188,152 @@
status = "okay";
};
+ pcie2: pcie@11280000 {
+ compatible = "mediatek,mt7988-pcie",
+ "mediatek,mt7986-pcie",
+ "mediatek,mt8192-pcie";
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ reg = <0 0x11280000 0 0x2000>;
+ reg-names = "pcie-mac";
+ linux,pci-domain = <3>;
+ interrupts = <GIC_SPI 170 IRQ_TYPE_LEVEL_HIGH>;
+ bus-range = <0x00 0xff>;
+ ranges = <0x82000000 0 0x20200000 0 0x20200000 0 0x07e00000>;
+ clocks = <&infracfg CLK_INFRA_PCIE_PIPE_P2>,
+ <&infracfg CLK_INFRA_PCIE_GFMUX_TL_P2>,
+ <&infracfg CLK_INFRA_PCIE_PERI_26M_CK_P2>,
+ <&infracfg CLK_INFRA_133M_PCIE_CK_P2>;
+ clock-names = "pl_250m", "tl_26m", "peri_26m",
+ "top_133m";
+ phys = <&xphyu3port0 PHY_TYPE_PCIE>;
+ phy-names = "pcie-phy";
+
+ status = "disabled";
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &pcie_intc2 0>,
+ <0 0 0 2 &pcie_intc2 1>,
+ <0 0 0 3 &pcie_intc2 2>,
+ <0 0 0 4 &pcie_intc2 3>;
+
+ pcie_intc2: interrupt-controller {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+ };
+
+ pcie3: pcie@11290000 {
+ compatible = "mediatek,mt7988-pcie",
+ "mediatek,mt7986-pcie",
+ "mediatek,mt8192-pcie";
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ reg = <0 0x11290000 0 0x2000>;
+ reg-names = "pcie-mac";
+ linux,pci-domain = <2>;
+ interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
+ bus-range = <0x00 0xff>;
+ ranges = <0x82000000 0 0x28200000 0 0x28200000 0 0x07e00000>;
+ clocks = <&infracfg CLK_INFRA_PCIE_PIPE_P3>,
+ <&infracfg CLK_INFRA_PCIE_GFMUX_TL_P3>,
+ <&infracfg CLK_INFRA_PCIE_PERI_26M_CK_P3>,
+ <&infracfg CLK_INFRA_133M_PCIE_CK_P3>;
+ clock-names = "pl_250m", "tl_26m", "peri_26m",
+ "top_133m";
+ use-dedicated-phy;
+
+ status = "disabled";
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &pcie_intc3 0>,
+ <0 0 0 2 &pcie_intc3 1>,
+ <0 0 0 3 &pcie_intc3 2>,
+ <0 0 0 4 &pcie_intc3 3>;
+ pcie_intc3: interrupt-controller {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+ };
+
+ pcie0: pcie@11300000 {
+ compatible = "mediatek,mt7988-pcie",
+ "mediatek,mt7986-pcie",
+ "mediatek,mt8192-pcie";
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ reg = <0 0x11300000 0 0x2000>;
+ reg-names = "pcie-mac";
+ linux,pci-domain = <0>;
+ interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
+ bus-range = <0x00 0xff>;
+ ranges = <0x82000000 0 0x30200000 0 0x30200000 0 0x07e00000>;
+ clocks = <&infracfg CLK_INFRA_PCIE_PIPE_P0>,
+ <&infracfg CLK_INFRA_PCIE_GFMUX_TL_P0>,
+ <&infracfg CLK_INFRA_PCIE_PERI_26M_CK_P0>,
+ <&infracfg CLK_INFRA_133M_PCIE_CK_P0>;
+ clock-names = "pl_250m", "tl_26m", "peri_26m",
+ "top_133m";
+ use-dedicated-phy;
+
+ status = "disabled";
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &pcie_intc0 0>,
+ <0 0 0 2 &pcie_intc0 1>,
+ <0 0 0 3 &pcie_intc0 2>,
+ <0 0 0 4 &pcie_intc0 3>;
+ pcie_intc0: interrupt-controller {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+ };
+
+ pcie1: pcie@11310000 {
+ compatible = "mediatek,mt7988-pcie",
+ "mediatek,mt7986-pcie",
+ "mediatek,mt8192-pcie";
+ device_type = "pci";
+ #address-cells = <3>;
+ #size-cells = <2>;
+ reg = <0 0x11310000 0 0x2000>;
+ reg-names = "pcie-mac";
+ linux,pci-domain = <1>;
+ interrupts = <GIC_SPI 169 IRQ_TYPE_LEVEL_HIGH>;
+ bus-range = <0x00 0xff>;
+ ranges = <0x82000000 0 0x38200000 0 0x38200000 0 0x07e00000>;
+ clocks = <&infracfg CLK_INFRA_PCIE_PIPE_P1>,
+ <&infracfg CLK_INFRA_PCIE_GFMUX_TL_P1>,
+ <&infracfg CLK_INFRA_PCIE_PERI_26M_CK_P1>,
+ <&infracfg CLK_INFRA_133M_PCIE_CK_P1>;
+ clock-names = "pl_250m", "tl_26m", "peri_26m",
+ "top_133m";
+ use-dedicated-phy;
+
+ status = "disabled";
+
+ #interrupt-cells = <1>;
+ interrupt-map-mask = <0 0 0 0x7>;
+ interrupt-map = <0 0 0 1 &pcie_intc1 0>,
+ <0 0 0 2 &pcie_intc1 1>,
+ <0 0 0 3 &pcie_intc1 2>,
+ <0 0 0 4 &pcie_intc1 3>;
+ pcie_intc1: interrupt-controller {
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ interrupt-controller;
+ };
+ };
+
usbtphy: usb-phy@11c50000 {
compatible = "mediatek,mt7988",
"mediatek,generic-tphy-v2";
@@ -214,6 +360,22 @@
status = "okay";
};
};
+
+ xphy: xphy@11e10000 {
+ compatible = "mediatek,mt7988", "mediatek,xsphy";
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+ status = "disabled";
+
+ xphyu3port0: usb-phy@11e13000 {
+ reg = <0 0x11e13400 0 0x500>;
+ clocks = <&dummy_clk>;
+ clock-names = "ref";
+ #phy-cells = <1>;
+ status = "okay";
+ };
+ };
xfi_pextp0: syscon@11f20000 {
compatible = "mediatek,mt7988-xfi_pextp_0", "syscon";

View File

@ -0,0 +1,36 @@
From 4a85182570200bf5e87e2a9920e9d28e968bc6e0 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:18:22 +0800
Subject: [PATCH 11/15] arm: dts: medaitek: fix internal switch link speed of
mt7988
The CPU port of mt7988 internal switch uses 10Gb link speed.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
arch/arm/dts/mt7988-rfb.dts | 2 +-
arch/arm/dts/mt7988-sd-rfb.dts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm/dts/mt7988-rfb.dts
+++ b/arch/arm/dts/mt7988-rfb.dts
@@ -57,7 +57,7 @@
mediatek,switch = "mt7988";
fixed-link {
- speed = <1000>;
+ speed = <10000>;
full-duplex;
pause;
};
--- a/arch/arm/dts/mt7988-sd-rfb.dts
+++ b/arch/arm/dts/mt7988-sd-rfb.dts
@@ -48,7 +48,7 @@
mediatek,switch = "mt7988";
fixed-link {
- speed = <1000>;
+ speed = <10000>;
full-duplex;
pause;
};

View File

@ -0,0 +1,103 @@
From 64cf3dd0ef520a81a27359d83d58b64939e2aa06 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:18:27 +0800
Subject: [PATCH 12/15] arm: dts: mediatek: add support for all three GMACs for
mt7988
This patch add all three GMACs nodes for mt7988. Each GMAC can be
configured to connect to different ethernet switches/PHYs.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
arch/arm/dts/mt7988-rfb.dts | 3 +--
arch/arm/dts/mt7988-sd-rfb.dts | 3 +--
arch/arm/dts/mt7988.dtsi | 42 ++++++++++++++++++++++++++++++++--
3 files changed, 42 insertions(+), 6 deletions(-)
--- a/arch/arm/dts/mt7988-rfb.dts
+++ b/arch/arm/dts/mt7988-rfb.dts
@@ -50,9 +50,8 @@
status = "okay";
};
-&eth {
+&eth0 {
status = "okay";
- mediatek,gmac-id = <0>;
phy-mode = "usxgmii";
mediatek,switch = "mt7988";
--- a/arch/arm/dts/mt7988-sd-rfb.dts
+++ b/arch/arm/dts/mt7988-sd-rfb.dts
@@ -41,9 +41,8 @@
status = "okay";
};
-&eth {
+&eth0 {
status = "okay";
- mediatek,gmac-id = <0>;
phy-mode = "usxgmii";
mediatek,switch = "mt7988";
--- a/arch/arm/dts/mt7988.dtsi
+++ b/arch/arm/dts/mt7988.dtsi
@@ -587,11 +587,11 @@
#reset-cells = <1>;
};
- eth: ethernet@15100000 {
+ eth0: ethernet@15110100 {
compatible = "mediatek,mt7988-eth", "syscon";
reg = <0 0x15100000 0 0x20000>;
+ mediatek,gmac-id = <0>;
mediatek,ethsys = <&ethdma>;
- mediatek,sgmiisys = <&sgmiisys0>;
mediatek,usxgmiisys = <&usxgmiisys0>;
mediatek,xfi_pextp = <&xfi_pextp0>;
mediatek,xfi_pll = <&xfi_pll>;
@@ -602,6 +602,44 @@
#address-cells = <1>;
#size-cells = <0>;
mediatek,mcm;
+ status = "disabled";
+ };
+
+ eth1: ethernet@15110200 {
+ compatible = "mediatek,mt7988-eth", "syscon";
+ reg = <0 0x15100000 0 0x20000>;
+ mediatek,gmac-id = <1>;
+ mediatek,ethsys = <&ethdma>;
+ mediatek,sgmiisys = <&sgmiisys1>;
+ mediatek,usxgmiisys = <&usxgmiisys1>;
+ mediatek,xfi_pextp = <&xfi_pextp1>;
+ mediatek,xfi_pll = <&xfi_pll>;
+ mediatek,infracfg = <&topmisc>;
+ mediatek,toprgu = <&watchdog>;
+ resets = <&ethdma ETHDMA_FE_RST>;
+ reset-names = "fe";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ mediatek,mcm;
+ status = "disabled";
+ };
+
+ eth2: ethernet@15110300 {
+ compatible = "mediatek,mt7988-eth", "syscon";
+ reg = <0 0x15100000 0 0x20000>;
+ mediatek,gmac-id = <2>;
+ mediatek,ethsys = <&ethdma>;
+ mediatek,sgmiisys = <&sgmiisys0>;
+ mediatek,usxgmiisys = <&usxgmiisys0>;
+ mediatek,xfi_pextp = <&xfi_pextp0>;
+ mediatek,xfi_pll = <&xfi_pll>;
+ mediatek,infracfg = <&topmisc>;
+ mediatek,toprgu = <&watchdog>;
+ resets = <&ethdma ETHDMA_FE_RST>;
+ reset-names = "fe";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ mediatek,mcm;
status = "disabled";
};
};

View File

@ -0,0 +1,81 @@
From 1090c6df3767da2c56d5827ba65ce91af8745420 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:18:41 +0800
Subject: [PATCH 13/15] arm: dts: medaitek: add flash interface driving
settings for mt7988
Add driving settings for both SPI and SD/eMMC interfaces to support ensure
flash devices is accessible for ram-booting.
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
arch/arm/dts/mt7988-rfb.dts | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
--- a/arch/arm/dts/mt7988-rfb.dts
+++ b/arch/arm/dts/mt7988-rfb.dts
@@ -101,6 +101,19 @@
function = "spi";
groups = "spi0", "spi0_wp_hold";
};
+
+ conf-pu {
+ pins = "SPI0_CSB", "SPI0_HOLD", "SPI0_WP";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+ };
+
+ conf-pd {
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+ };
+
};
spi2_pins: spi2-pins {
@@ -108,6 +121,18 @@
function = "spi";
groups = "spi2", "spi2_wp_hold";
};
+
+ conf-pu {
+ pins = "SPI2_CSB", "SPI2_HOLD", "SPI2_WP";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+ };
+
+ conf-pd {
+ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+ };
};
mmc0_pins_default: mmc0default {
@@ -121,18 +146,25 @@
"EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
"EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
input-enable;
+ drive-strength = <MTK_DRIVE_4mA>;
+ mediatek,pull-up-adv = <1>; /* pull-up 10K */
};
conf-clk {
pins = "EMMC_CK";
+ drive-strength = <MTK_DRIVE_6mA>;
+ mediatek,pull-down-adv = <2>; /* pull-down 50K */
};
conf-dsl {
pins = "EMMC_DSL";
+ mediatek,pull-down-adv = <2>; /* pull-down 50K */
};
conf-rst {
pins = "EMMC_RSTB";
+ drive-strength = <MTK_DRIVE_4mA>;
+ mediatek,pull-up-adv = <1>; /* pull-up 10K */
};
};
};

View File

@ -0,0 +1,62 @@
From 140303d0308738dfb04059333c9fc25b5159a776 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:18:55 +0800
Subject: [PATCH 14/15] arm: dts: mediatek: update mt7981 mmc node
1. Fix mmc clock order of mt7981 to match the clock name
2. Limit the max clock of SD to 50MHz to meet SD Card Spec 2.0
3. Increase the CLK pin driving strength to 8mA
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
arch/arm/dts/mt7981-sd-rfb.dts | 6 ++++--
arch/arm/dts/mt7981.dtsi | 12 ++++++------
2 files changed, 10 insertions(+), 8 deletions(-)
--- a/arch/arm/dts/mt7981-sd-rfb.dts
+++ b/arch/arm/dts/mt7981-sd-rfb.dts
@@ -118,7 +118,7 @@
};
conf-clk {
pins = "SPI1_CS";
- drive-strength = <MTK_DRIVE_6mA>;
+ drive-strength = <MTK_DRIVE_8mA>;
bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
};
conf-rst {
@@ -140,10 +140,12 @@
};
&mmc0 {
+ assigned-clock-parents = <&topckgen CLK_TOP_CB_NET2_D4>,
+ <&topckgen CLK_TOP_CB_NET2_D2>;
pinctrl-names = "default";
pinctrl-0 = <&mmc0_pins_default>;
bus-width = <4>;
- max-frequency = <52000000>;
+ max-frequency = <50000000>;
cap-sd-highspeed;
r_smpl = <0>;
vmmc-supply = <&reg_3p3v>;
--- a/arch/arm/dts/mt7981.dtsi
+++ b/arch/arm/dts/mt7981.dtsi
@@ -306,13 +306,13 @@
reg = <0x11230000 0x1000>,
<0x11C20000 0x1000>;
interrupts = <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&topckgen CLK_TOP_EMMC_400M>,
- <&topckgen CLK_TOP_EMMC_208M>,
+ clocks = <&topckgen CLK_TOP_EMMC_208M>,
+ <&topckgen CLK_TOP_EMMC_400M>,
<&infracfg CLK_INFRA_MSDC_CK>;
- assigned-clocks = <&topckgen CLK_TOP_EMMC_400M_SEL>,
- <&topckgen CLK_TOP_EMMC_208M_SEL>;
- assigned-clock-parents = <&topckgen CLK_TOP_CB_NET2_D2>,
- <&topckgen CLK_TOP_CB_M_D2>;
+ assigned-clocks = <&topckgen CLK_TOP_EMMC_208M_SEL>,
+ <&topckgen CLK_TOP_EMMC_400M_SEL>;
+ assigned-clock-parents = <&topckgen CLK_TOP_CB_M_D2>,
+ <&topckgen CLK_TOP_CB_NET2_D2>;
clock-names = "source", "hclk", "source_cg";
status = "disabled";
};

View File

@ -0,0 +1,36 @@
From 8707ea0360046522d0784135b6c9a7c564f9515c Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 17 Jan 2025 17:18:59 +0800
Subject: [PATCH 15/15] MAINTAINERS: update file list for MediaTek ARM platform
Add driver files for MediaTek ARM platform
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
MAINTAINERS | 5 +++++
1 file changed, 5 insertions(+)
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -412,9 +412,13 @@ F: drivers/mmc/mtk-sd.c
F: drivers/phy/phy-mtk-*
F: drivers/pinctrl/mediatek/
F: drivers/power/domain/mtk-power-domain.c
+F: drivers/pci/pcie_mediatek_gen3.c
+F: drivers/pci/pcie_mediatek.c
+F: drivers/pwm/pwm-mtk.c
F: drivers/ram/mediatek/
F: drivers/spi/mtk_snfi_spi.c
F: drivers/spi/mtk_spim.c
+F: drivers/spi/mtk_snor.c
F: drivers/timer/mtk_timer.c
F: drivers/usb/host/xhci-mtk.c
F: drivers/usb/mtu3/
@@ -422,6 +426,7 @@ F: drivers/watchdog/mtk_wdt.c
F: drivers/net/mtk_eth.c
F: drivers/net/mtk_eth.h
F: drivers/reset/reset-mediatek.c
+F: drivers/serial/serial_mtk.c
F: include/dt-bindings/clock/mediatek,*
F: include/dt-bindings/power/mediatek,*
F: tools/mtk_image.c

View File

@ -0,0 +1,138 @@
From 24e660265f11dad63687c5529cf732538946a197 Mon Sep 17 00:00:00 2001
From: Weijie Gao <weijie.gao@mediatek.com>
Date: Fri, 24 Jan 2025 11:39:02 +0800
Subject: [PATCH] pinctrl: mediatek: update mt7981 pinctrl driver based on
upstream kernel
Update mt7981 pinctrl driver based on upstream kernel
Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
drivers/pinctrl/mediatek/pinctrl-mt7981.c | 51 ++++++++++++++++++++---
1 file changed, 45 insertions(+), 6 deletions(-)
--- a/drivers/pinctrl/mediatek/pinctrl-mt7981.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt7981.c
@@ -569,6 +569,11 @@ static const struct mtk_pin_desc mt7981_
MT7981_TYPE1_PIN(56, "WF_HB10"),
};
+/* List all groups consisting of these pins dedicated to the enablement of
+ * certain hardware block and the corresponding mode for all of the pins.
+ * The hardware probably has multiple combinations of these pinouts.
+ */
+
/* WA_AICE */
static const int mt7981_wa_aice1_pins[] = { 0, 1, };
static const int mt7981_wa_aice1_funcs[] = { 2, 2, };
@@ -632,6 +637,9 @@ static const int mt7981_wo0_jtag_1_funcs
static const int mt7981_uart2_0_pins[] = { 4, 5, 6, 7, };
static const int mt7981_uart2_0_funcs[] = { 3, 3, 3, 3, };
+static const int mt7981_uart2_0_tx_rx_pins[] = { 4, 5, };
+static const int mt7981_uart2_0_tx_rx_funcs[] = { 3, 3, };
+
/* GBE_LED0 */
static const int mt7981_gbe_led0_pins[] = { 8, };
static const int mt7981_gbe_led0_funcs[] = { 3, };
@@ -718,6 +726,17 @@ static const int mt7981_drv_vbus_pins[]
static const int mt7981_drv_vbus_funcs[] = { 1, };
/* EMMC */
+static const int mt7981_emmc_reset_pins[] = { 15, };
+static const int mt7981_emmc_reset_funcs[] = { 2, };
+
+static const int mt7981_emmc_4_pins[] = { 16, 17, 18, 19, 24, 25, };
+static const int mt7981_emmc_4_funcs[] = { 2, 2, 2, 2, 2, 2, };
+
+static const int mt7981_emmc_8_pins[] = {
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, };
+static const int mt7981_emmc_8_funcs[] = {
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, };
+
static const int mt7981_emmc_45_pins[] = {
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, };
static const int mt7981_emmc_45_funcs[] = {
@@ -754,6 +773,12 @@ static const int mt7981_uart1_0_funcs[]
static const int mt7981_uart1_1_pins[] = { 26, 27, 28, 29, };
static const int mt7981_uart1_1_funcs[] = { 2, 2, 2, 2, };
+static const int mt7981_uart1_2_pins[] = { 9, 10, };
+static const int mt7981_uart1_2_funcs[] = { 2, 2, };
+
+static const int mt7981_uart1_3_pins[] = { 26, 27, };
+static const int mt7981_uart1_3_funcs[] = { 2, 2, };
+
/* UART2 */
static const int mt7981_uart2_1_pins[] = { 22, 23, 24, 25, };
static const int mt7981_uart2_1_funcs[] = { 3, 3, 3, 3, };
@@ -832,6 +857,8 @@ static const struct mtk_group_desc mt798
PINCTRL_PIN_GROUP("wo0_jtag_0", mt7981_wo0_jtag_0),
/* @GPIO(4,7) WM_JTAG(3) */
PINCTRL_PIN_GROUP("uart2_0", mt7981_uart2_0),
+ /* @GPIO(4,5) WM_JTAG(4) */
+ PINCTRL_PIN_GROUP("uart2_0_tx_rx", mt7981_uart2_0_tx_rx),
/* @GPIO(8) GBE_LED0(3) */
PINCTRL_PIN_GROUP("gbe_led0", mt7981_gbe_led0),
/* @GPIO(4,6) PTA_EXT(4) */
@@ -844,7 +871,7 @@ static const struct mtk_group_desc mt798
PINCTRL_PIN_GROUP("spi1_0", mt7981_spi1_0),
/* @GPIO(6,7) I2C(5) */
PINCTRL_PIN_GROUP("i2c0_0", mt7981_i2c0_0),
- /* @GPIO(8): DFD_NTRST(6) */
+ /* @GPIO(0,1,4,5): DFD_NTRST(6) */
PINCTRL_PIN_GROUP("dfd_ntrst", mt7981_dfd_ntrst),
/* @GPIO(9,10): WM_AICE(2) */
PINCTRL_PIN_GROUP("wm_aice1", mt7981_wm_aice1),
@@ -870,6 +897,12 @@ static const struct mtk_group_desc mt798
PINCTRL_PIN_GROUP("udi", mt7981_udi),
/* @GPIO(14) DRV_VBUS(1) */
PINCTRL_PIN_GROUP("drv_vbus", mt7981_drv_vbus),
+ /* @GPIO(15): EMMC_RSTB(2) */
+ PINCTRL_PIN_GROUP("emmc_reset", mt7981_emmc_reset),
+ /* @GPIO(16,17,18,19,24,25): EMMC_DATx, EMMC_CLK, EMMC_CMD */
+ PINCTRL_PIN_GROUP("emmc_4", mt7981_emmc_4),
+ /* @GPIO(16,17,18,19,20,21,22,23,24,25): EMMC_DATx, EMMC_CLK, EMMC_CMD */
+ PINCTRL_PIN_GROUP("emmc_8", mt7981_emmc_8),
/* @GPIO(15,25): EMMC(2) */
PINCTRL_PIN_GROUP("emmc_45", mt7981_emmc_45),
/* @GPIO(16,21): SNFI(3) */
@@ -888,8 +921,12 @@ static const struct mtk_group_desc mt798
PINCTRL_PIN_GROUP("uart1_0", mt7981_uart1_0),
/* @GPIO(26,29): UART1(2) */
PINCTRL_PIN_GROUP("uart1_1", mt7981_uart1_1),
+ /* @GPIO(9,10): UART1(2) */
+ PINCTRL_PIN_GROUP("uart1_2", mt7981_uart1_2),
+ /* @GPIO(26,27): UART1(2) */
+ PINCTRL_PIN_GROUP("uart1_3", mt7981_uart1_3),
/* @GPIO(22,25): UART2(3) */
- PINCTRL_PIN_GROUP("uart2_0", mt7981_uart2_1),
+ PINCTRL_PIN_GROUP("uart2_1", mt7981_uart2_1),
/* @GPIO(22,24) PTA_EXT(4) */
PINCTRL_PIN_GROUP("pta_ext_1", mt7981_pta_ext_1),
/* @GPIO(20,21): WM_UART(4) */
@@ -964,9 +1001,10 @@ static const struct mtk_io_type_desc mt7
*/
static const char *const mt7981_wa_aice_groups[] = { "wa_aice1", "wa_aice2",
"wm_aice1_1", "wa_aice3", "wm_aice1_2", };
-static const char *const mt7981_uart_groups[] = { "wm_uart_0", "uart2_0",
- "net_wo0_uart_txd_0", "net_wo0_uart_txd_1", "net_wo0_uart_txd_2",
- "uart1_0", "uart1_1", "uart2_0", "wm_aurt_1", "wm_aurt_2", "uart0", };
+static const char *const mt7981_uart_groups[] = { "net_wo0_uart_txd_0",
+ "net_wo0_uart_txd_1", "net_wo0_uart_txd_2", "uart0", "uart1_0",
+ "uart1_1", "uart1_2", "uart1_3", "uart2_0", "uart2_0_tx_rx", "uart2_1",
+ "wm_uart_0", "wm_aurt_1", "wm_aurt_2", };
static const char *const mt7981_dfd_groups[] = { "dfd", "dfd_ntrst", };
static const char *const mt7981_wdt_groups[] = { "watchdog", "watchdog1", };
static const char *const mt7981_pcie_groups[] = { "pcie_pereset", "pcie_clk",
@@ -986,7 +1024,8 @@ static const char *const mt7981_i2c_grou
static const char *const mt7981_pcm_groups[] = { "pcm", };
static const char *const mt7981_udi_groups[] = { "udi", };
static const char *const mt7981_usb_groups[] = { "drv_vbus", };
-static const char *const mt7981_flash_groups[] = { "emmc_45", "snfi", };
+static const char *const mt7981_flash_groups[] = { "emmc_reset", "emmc_4",
+ "emmc_8", "emmc_45", "snfi", };
static const char *const mt7981_ethernet_groups[] = { "smi_mdc_mdio",
"gbe_ext_mdc_mdio", "wf0_mode1", "wf0_mode3", "mt7531_int", };
static const char *const mt7981_ant_groups[] = { "ant_sel", };

View File

@ -49,7 +49,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
config SYS_NAND_MAX_OOBFREE
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -40,3 +40,5 @@ obj-$(CONFIG_$(SPL_TPL_)SPI_FLASH_SUPPOR
@@ -40,3 +40,5 @@ obj-$(CONFIG_$(PHASE_)SPI_FLASH_SUPPORT)
obj-$(CONFIG_SPL_UBI) += ubispl/
endif

View File

@ -89,14 +89,14 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
depends on ENV_IS_IN_UBI
--- a/env/Makefile
+++ b/env/Makefile
@@ -24,6 +24,7 @@ obj-$(CONFIG_$(SPL_TPL_)ENV_IS_NOWHERE)
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_MMC) += mmc.o
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_FAT) += fat.o
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_EXT4) += ext4.o
+obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_MTD) += mtd.o
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_NAND) += nand.o
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_SPI_FLASH) += sf.o
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_FLASH) += flash.o
@@ -24,6 +24,7 @@ obj-$(CONFIG_$(PHASE_)ENV_IS_NOWHERE) +=
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_MMC) += mmc.o
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_FAT) += fat.o
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_EXT4) += ext4.o
+obj-$(CONFIG_$(PHASE_)ENV_IS_IN_MTD) += mtd.o
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_NAND) += nand.o
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_SPI_FLASH) += sf.o
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_FLASH) += flash.o
--- a/env/env.c
+++ b/env/env.c
@@ -46,6 +46,9 @@ static enum env_location env_locations[]
@ -370,7 +370,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+};
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -107,6 +107,7 @@ enum env_location {
@@ -108,6 +108,7 @@ enum env_location {
ENVL_FAT,
ENVL_FLASH,
ENVL_MMC,

View File

@ -13,13 +13,13 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
drivers/mtd/Makefile | 1 +
drivers/mtd/nmbm/Kconfig | 29 +
drivers/mtd/nmbm/Makefile | 5 +
drivers/mtd/nmbm/nmbm-core.c | 2936 +++++++++++++++++++++++++++++++
drivers/mtd/nmbm/nmbm-core.c | 3040 +++++++++++++++++++++++++++++++
drivers/mtd/nmbm/nmbm-debug.h | 37 +
drivers/mtd/nmbm/nmbm-debug.inl | 39 +
drivers/mtd/nmbm/nmbm-private.h | 137 ++
include/nmbm/nmbm-os.h | 66 +
include/nmbm/nmbm.h | 102 ++
10 files changed, 3354 insertions(+)
include/nmbm/nmbm-os.h | 68 +
include/nmbm/nmbm.h | 105 ++
10 files changed, 3463 insertions(+)
create mode 100644 drivers/mtd/nmbm/Kconfig
create mode 100644 drivers/mtd/nmbm/Makefile
create mode 100644 drivers/mtd/nmbm/nmbm-core.c
@ -31,15 +31,15 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -282,6 +282,8 @@ source "drivers/mtd/ubi/Kconfig"
source "drivers/mtd/nvmxip/Kconfig"
@@ -276,6 +276,8 @@ config SYS_NAND_MAX_CHIPS
help
The maximum number of NAND chips per device to be supported.
+source "drivers/mtd/nmbm/Kconfig"
+
endif
source "drivers/mtd/spi/Kconfig"
endmenu
source "drivers/mtd/ubi/Kconfig"
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -42,3 +42,4 @@ obj-$(CONFIG_SPL_UBI) += ubispl/
@ -89,10 +89,10 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+obj-$(CONFIG_NMBM) += nmbm-core.o
--- /dev/null
+++ b/drivers/mtd/nmbm/nmbm-core.c
@@ -0,0 +1,2936 @@
@@ -0,0 +1,3040 @@
+// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
+/*
+ * Copyright (C) 2020 MediaTek Inc. All Rights Reserved.
+ * Copyright (C) 2021 MediaTek Inc. All Rights Reserved.
+ *
+ * Author: Weijie Gao <weijie.gao@mediatek.com>
+ */
@ -349,6 +349,37 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+}
+
+/*
+ * nmbm_panic_write_phys_page - Panic write page with retry
+ * @ni: NMBM instance structure
+ * @addr: linear address where the data will be written to
+ * @data: the main data to be written
+ *
+ * Write a page for at most NMBM_TRY_COUNT times.
+ */
+static bool nmbm_panic_write_phys_page(struct nmbm_instance *ni, uint64_t addr,
+ const void *data)
+{
+ int tries, ret;
+
+ if (ni->lower.flags & NMBM_F_READ_ONLY) {
+ nlog_err(ni, "%s called with NMBM_F_READ_ONLY set\n", addr);
+ return false;
+ }
+
+ for (tries = 0; tries < NMBM_TRY_COUNT; tries++) {
+ ret = ni->lower.panic_write_page(ni->lower.arg, addr, data);
+ if (!ret)
+ return true;
+
+ nmbm_reset_chip(ni);
+ }
+
+ nlog_err(ni, "Panic page write failed at address 0x%08llx\n", addr);
+
+ return false;
+}
+
+/*
+ * nmbm_erase_phys_block - Erase a block with retry
+ * @ni: NMBM instance structure
+ * @addr: Linear address
@ -752,7 +783,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ addr = ba2addr(ni, ba);
+
+ for (off = 0; off < ni->lower.erasesize; off += ni->lower.writesize) {
+ schedule();
+ WATCHDOG_RESET();
+
+ ret = nmbm_read_phys_page(ni, addr + off, ni->page_cache, NULL,
+ NMBM_MODE_PLACE_OOB);
@ -791,7 +822,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ bool success;
+
+ while (ba < limit) {
+ schedule();
+ WATCHDOG_RESET();
+
+ if (nmbm_get_block_state(ni, ba) != BLOCK_ST_GOOD)
+ goto next_block;
@ -842,7 +873,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ addr = ba2addr(ni, ba);
+
+ for (off = 0; off < ni->lower.erasesize; off += ni->lower.writesize) {
+ schedule();
+ WATCHDOG_RESET();
+
+ /* Prepare page data. fill 0xff to unused region */
+ memcpy(ni->page_cache, data, size);
@ -886,7 +917,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ bool success;
+
+ while (ba > limit) {
+ schedule();
+ WATCHDOG_RESET();
+
+ if (nmbm_get_block_state(ni, ba) != BLOCK_ST_GOOD)
+ goto next_block;
@ -941,7 +972,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ int ret;
+
+ while (sizeremain) {
+ schedule();
+ WATCHDOG_RESET();
+
+ leading = off & ni->writesize_mask;
+ chunksize = ni->lower.writesize - leading;
@ -991,7 +1022,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ int ret;
+
+ while (sizeremain) {
+ schedule();
+ WATCHDOG_RESET();
+
+ leading = off & ni->writesize_mask;
+ chunksize = ni->lower.writesize - leading;
@ -1047,7 +1078,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ bool success;
+
+ while (sizeremain && ba < limit) {
+ schedule();
+ WATCHDOG_RESET();
+
+ chunksize = sizeremain;
+ if (chunksize > ni->lower.erasesize)
@ -1309,7 +1340,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+
+ /* Try to write new info table next to the existing table */
+ while (write_ba >= ni->mapping_blocks_ba) {
+ schedule();
+ WATCHDOG_RESET();
+
+ success = nmbm_write_info_table(ni, write_ba,
+ ni->mapping_blocks_top_ba,
@ -1428,7 +1459,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+
+ /* Try to write temporary info table into spare unmapped blocks */
+ while (write_ba >= ni->mapping_blocks_ba) {
+ schedule();
+ WATCHDOG_RESET();
+
+ success = nmbm_write_info_table(ni, write_ba,
+ ni->mapping_blocks_top_ba,
@ -1514,7 +1545,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+
+ /* Write new backup info table. */
+ while (write_ba >= main_table_end_ba) {
+ schedule();
+ WATCHDOG_RESET();
+
+ success = nmbm_write_info_table(ni, write_ba,
+ ni->mapping_blocks_top_ba,
@ -1903,7 +1934,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ int ret;
+
+ while (sizeremain && ba < limit) {
+ schedule();
+ WATCHDOG_RESET();
+
+ if (nmbm_get_block_state(ni, ba) != BLOCK_ST_GOOD)
+ goto next_block;
@ -1996,7 +2027,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ bool success;
+
+ while (ba < limit - size2blk(ni, ni->info_table_size)) {
+ schedule();
+ WATCHDOG_RESET();
+
+ success = nmbm_try_load_info_table(ni, ba, table_end_ba,
+ write_count,
@ -2208,7 +2239,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ limit = block_count - ni->lower.max_reserved_blocks;
+
+ while (ba >= limit) {
+ schedule();
+ WATCHDOG_RESET();
+
+ ba--;
+ addr = ba2addr(ni, ba);
@ -2222,7 +2253,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ */
+ for (off = 0; off < ni->lower.erasesize;
+ off += ni->lower.writesize) {
+ schedule();
+ WATCHDOG_RESET();
+
+ ret = nmbn_read_data(ni, addr + off, &sig,
+ sizeof(sig));
@ -2281,7 +2312,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ return false;
+ }
+
+ if (!nld->oobsize || !is_power_of_2(nld->oobsize)) {
+ if (!nld->oobsize) {
+ nmbm_log_lower(nld, NMBM_LOG_ERR,
+ "Page spare size %u is not valid\n", nld->oobsize);
+ return false;
@ -2594,7 +2625,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ end_ba = addr2ba(ni, addr + size - 1);
+
+ while (start_ba <= end_ba) {
+ schedule();
+ WATCHDOG_RESET();
+
+ ret = nmbm_erase_logic_block(ni, start_ba);
+ if (ret) {
@ -2726,7 +2757,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ }
+
+ while (sizeremain) {
+ schedule();
+ WATCHDOG_RESET();
+
+ leading = off & ni->writesize_mask;
+ chunksize = ni->lower.writesize - leading;
@ -2822,6 +2853,53 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+}
+
+/*
+ * nmbm_panic_write_logic_page - Panic write page based on logic address
+ * @ni: NMBM instance structure
+ * @addr: logic linear address
+ * @data: buffer contains main data. optional.
+ */
+static int nmbm_panic_write_logic_page(struct nmbm_instance *ni, uint64_t addr,
+ const void *data)
+{
+ uint32_t lb, pb, offset;
+ uint64_t paddr;
+ bool success;
+
+ /* Extract block address and in-block offset */
+ lb = addr2ba(ni, addr);
+ offset = addr & ni->erasesize_mask;
+
+ /* Map logic block to physical block */
+ pb = ni->block_mapping[lb];
+
+ /* Whether the logic block is good (has valid mapping) */
+ if ((int32_t)pb < 0) {
+ nlog_debug(ni, "Logic block %u is a bad block\n", lb);
+ return -EIO;
+ }
+
+ /* Fail if physical block is marked bad */
+ if (nmbm_get_block_state(ni, pb) == BLOCK_ST_BAD)
+ return -EIO;
+
+ /* Assemble new address */
+ paddr = ba2addr(ni, pb) + offset;
+
+ success = nmbm_panic_write_phys_page(ni, paddr, data);
+ if (success)
+ return 0;
+
+ /*
+ * Do not remap bad block here. Just mark this block in state table.
+ * Remap this block on erasing.
+ */
+ nmbm_set_block_state(ni, pb, BLOCK_ST_NEED_REMAP);
+ nmbm_update_info_table(ni);
+
+ return -EIO;
+}
+
+/*
+ * nmbm_write_single_page - Write one page based on logic address
+ * @ni: NMBM instance structure
+ * @addr: logic linear address
@ -2851,6 +2929,32 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+}
+
+/*
+ * nmbm_panic_write_single_page - Panic write one page based on logic address
+ * @ni: NMBM instance structure
+ * @addr: logic linear address
+ * @data: buffer contains main data. optional.
+ */
+int nmbm_panic_write_single_page(struct nmbm_instance *ni, uint64_t addr,
+ const void *data)
+{
+ if (!ni)
+ return -EINVAL;
+
+ /* Sanity check */
+ if (ni->protected || (ni->lower.flags & NMBM_F_READ_ONLY)) {
+ nlog_debug(ni, "Device is forced read-only\n");
+ return -EROFS;
+ }
+
+ if (addr >= ba2addr(ni, ni->data_block_count)) {
+ nlog_err(ni, "Address 0x%llx is invalid\n", addr);
+ return -EINVAL;
+ }
+
+ return nmbm_panic_write_logic_page(ni, addr, data);
+}
+
+/*
+ * nmbm_write_range - Write data without oob
+ * @ni: NMBM instance structure
+ * @addr: logic linear address
@ -2893,7 +2997,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ }
+
+ while (sizeremain) {
+ schedule();
+ WATCHDOG_RESET();
+
+ leading = off & ni->writesize_mask;
+ chunksize = ni->lower.writesize - leading;
@ -3250,7 +3354,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+#endif /* _NMBM_PRIVATE_H_ */
--- /dev/null
+++ b/include/nmbm/nmbm-os.h
@@ -0,0 +1,66 @@
@@ -0,0 +1,68 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2020 MediaTek Inc. All Rights Reserved.
@ -3265,7 +3369,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+
+#include <div64.h>
+#include <stdbool.h>
+#include <watchdog.h>
+#include <cyclic.h>
+#include <u-boot/crc.h>
+#include <linux/errno.h>
+#include <linux/log2.h>
@ -3316,10 +3420,12 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+#define NMBM_DEFAULT_LOG_LEVEL 1
+#endif
+
+#define WATCHDOG_RESET schedule
+
+#endif /* _NMBM_OS_H_ */
--- /dev/null
+++ b/include/nmbm/nmbm.h
@@ -0,0 +1,102 @@
@@ -0,0 +1,105 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
+/*
+ * Copyright (C) 2020 MediaTek Inc. All Rights Reserved.
@ -3374,6 +3480,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ */
+ int (*read_page)(void *arg, uint64_t addr, void *buf, void *oob, enum nmbm_oob_mode mode);
+ int (*write_page)(void *arg, uint64_t addr, const void *buf, const void *oob, enum nmbm_oob_mode mode);
+ int (*panic_write_page)(void *arg, uint64_t addr, const void *buf);
+ int (*erase_block)(void *arg, uint64_t addr);
+
+ int (*is_bad_block)(void *arg, uint64_t addr);
@ -3410,6 +3517,8 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+int nmbm_write_single_page(struct nmbm_instance *ni, uint64_t addr,
+ const void *data, const void *oob,
+ enum nmbm_oob_mode mode);
+int nmbm_panic_write_single_page(struct nmbm_instance *ni, uint64_t addr,
+ const void *data);
+int nmbm_write_range(struct nmbm_instance *ni, uint64_t addr, size_t size,
+ const void *data, enum nmbm_oob_mode mode,
+ size_t *retlen);

View File

@ -13,7 +13,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -372,6 +372,20 @@ static int initr_nand(void)
@@ -381,6 +381,20 @@ static int initr_nand(void)
}
#endif
@ -34,7 +34,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
#if defined(CONFIG_CMD_ONENAND)
/* go init the NAND */
static int initr_onenand(void)
@@ -663,6 +677,9 @@ static init_fnc_t init_sequence_r[] = {
@@ -694,6 +708,9 @@ static init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_CMD_ONENAND
initr_onenand,
#endif

View File

@ -15,7 +15,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1465,6 +1465,12 @@ config CMD_NAND_TORTURE
@@ -1492,6 +1492,12 @@ config CMD_NAND_TORTURE
endif # CMD_NAND
@ -35,9 +35,9 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
obj-$(CONFIG_CMD_MUX) += mux.o
obj-$(CONFIG_CMD_NAND) += nand.o
+obj-$(CONFIG_CMD_NMBM) += nmbm.o
obj-$(CONFIG_CMD_NET) += net.o
obj-$(CONFIG_ENV_SUPPORT) += nvedit.o
obj-$(CONFIG_CMD_NVEDIT_EFI) += nvedit_efi.o
ifdef CONFIG_NET
obj-$(CONFIG_CMD_NET) += net.o net-common.o
else ifdef CONFIG_NET_LWIP
--- /dev/null
+++ b/cmd/nmbm.c
@@ -0,0 +1,327 @@

View File

@ -20,7 +20,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
--- a/cmd/mtd.c
+++ b/cmd/mtd.c
@@ -721,6 +721,42 @@ out_put_mtd:
@@ -730,6 +730,42 @@ out_put_mtd:
return CMD_RET_SUCCESS;
}
@ -63,7 +63,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
#ifdef CONFIG_AUTO_COMPLETE
static int mtd_name_complete(int argc, char *const argv[], char last_char,
int maxv, char *cmdv[])
@@ -768,6 +804,7 @@ U_BOOT_LONGHELP(mtd,
@@ -777,6 +813,7 @@ U_BOOT_LONGHELP(mtd,
"\n"
"Specific functions:\n"
"mtd bad <name>\n"
@ -71,7 +71,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
#if CONFIG_IS_ENABLED(CMD_MTD_OTP)
"mtd otpread <name> [u|f] <off> <size>\n"
"mtd otpwrite <name> <off> <hex string>\n"
@@ -808,4 +845,6 @@ U_BOOT_CMD_WITH_SUBCMDS(mtd, "MTD utils"
@@ -817,4 +854,6 @@ U_BOOT_CMD_WITH_SUBCMDS(mtd, "MTD utils"
U_BOOT_SUBCMD_MKENT_COMPLETE(erase, 4, 0, do_mtd_erase,
mtd_name_complete),
U_BOOT_SUBCMD_MKENT_COMPLETE(bad, 2, 1, do_mtd_bad,

View File

@ -7,29 +7,29 @@ Add an env driver for NMBM upper MTD layer
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
cmd/nvedit.c | 3 +-
env/Kconfig | 19 ++++-
env/Makefile | 1 +
env/env.c | 3 +
env/nmbm.c | 155 +++++++++++++++++++++++++++++++++++++++++
include/env_internal.h | 1 +
tools/Makefile | 1 +
7 files changed, 180 insertions(+), 3 deletions(-)
6 files changed, 178 insertions(+), 2 deletions(-)
create mode 100644 env/nmbm.c
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -59,6 +59,7 @@ config ENV_IS_DEFAULT
def_bool y if !ENV_IS_IN_EEPROM && !ENV_IS_IN_EXT4 && \
!ENV_IS_IN_FAT && !ENV_IS_IN_FLASH && \
@@ -61,7 +61,7 @@ config ENV_IS_DEFAULT
!ENV_IS_IN_MMC && !ENV_IS_IN_NAND && \
+ !ENV_IS_IN_NMBM && \
!ENV_IS_IN_NVRAM && !ENV_IS_IN_ONENAND && \
!ENV_IS_IN_REMOTE && !ENV_IS_IN_SPI_FLASH && \
!ENV_IS_IN_UBI && !ENV_IS_IN_MTD
@@ -315,6 +316,21 @@ config ENV_RANGE
Specifying a range with more erase blocks than are needed to hold
CONFIG_ENV_SIZE allows bad blocks within the range to be avoided.
- !ENV_IS_IN_UBI && !ENV_IS_IN_MTD
+ !ENV_IS_IN_UBI && !ENV_IS_IN_NMBM && !ENV_IS_IN_MTD
select ENV_IS_NOWHERE
config ENV_IS_NOWHERE
@@ -305,6 +305,21 @@ config ENV_IS_IN_NAND
Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
using CONFIG_ENV_OFFSET_OOB.
+config ENV_IS_IN_NMBM
+ bool "Environment in a NMBM upper MTD layer"
@ -46,10 +46,10 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+ area within the first NAND device. CONFIG_ENV_OFFSET must be
+ aligned to an erase block boundary.
+
config ENV_IS_IN_NVRAM
bool "Environment in a non-volatile RAM"
depends on !CHAIN_OF_TRUST
@@ -591,7 +607,7 @@ config ENV_MTD_NAME
config ENV_RANGE
hex "Length of the region in which the environment can be written"
depends on ENV_IS_IN_NAND
@@ -591,7 +606,7 @@ config ENV_MTD_NAME
config ENV_OFFSET
hex "Environment offset"
depends on ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \
@ -60,13 +60,13 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
default 0xF0000 if ARCH_SUNXI
--- a/env/Makefile
+++ b/env/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_FAT) +
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_EXT4) += ext4.o
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_MTD) += mtd.o
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_NAND) += nand.o
+obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_NMBM) += nmbm.o
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_SPI_FLASH) += sf.o
obj-$(CONFIG_$(SPL_TPL_)ENV_IS_IN_FLASH) += flash.o
@@ -26,6 +26,7 @@ obj-$(CONFIG_$(PHASE_)ENV_IS_IN_FAT) +=
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_EXT4) += ext4.o
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_MTD) += mtd.o
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_NAND) += nand.o
+obj-$(CONFIG_$(PHASE_)ENV_IS_IN_NMBM) += nmbm.o
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_SPI_FLASH) += sf.o
obj-$(CONFIG_$(PHASE_)ENV_IS_IN_FLASH) += flash.o
--- a/env/env.c
+++ b/env/env.c
@ -240,7 +240,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
+};
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -109,6 +109,7 @@ enum env_location {
@@ -110,6 +110,7 @@ enum env_location {
ENVL_MMC,
ENVL_MTD,
ENVL_NAND,

View File

@ -26,7 +26,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -1465,6 +1465,14 @@ config CMD_NAND_TORTURE
@@ -1492,6 +1492,14 @@ config CMD_NAND_TORTURE
endif # CMD_NAND
@ -49,8 +49,8 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
obj-$(CONFIG_CMD_NAND) += nand.o
+obj-$(CONFIG_CMD_NAND_EXT) += nand-ext.o
obj-$(CONFIG_CMD_NMBM) += nmbm.o
obj-$(CONFIG_CMD_NET) += net.o
obj-$(CONFIG_ENV_SUPPORT) += nvedit.o
ifdef CONFIG_NET
obj-$(CONFIG_CMD_NET) += net.o net-common.o
--- /dev/null
+++ b/cmd/nand-ext.c
@@ -0,0 +1,1062 @@

View File

@ -13,7 +13,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -2958,6 +2958,100 @@ static int spi_nor_init_params(struct sp
@@ -3248,6 +3248,100 @@ static int spi_nor_init_params(struct sp
return 0;
}
@ -114,7 +114,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
static int spi_nor_hwcaps2cmd(u32 hwcaps, const int table[][2], size_t size)
{
size_t i;
@@ -4077,6 +4171,7 @@ int spi_nor_scan(struct spi_nor *nor)
@@ -4450,6 +4544,7 @@ int spi_nor_scan(struct spi_nor *nor)
nor->write = spi_nor_write_data;
nor->read_reg = spi_nor_read_reg;
nor->write_reg = spi_nor_write_reg;
@ -124,7 +124,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -29,6 +29,7 @@
@@ -32,6 +32,7 @@
#define SNOR_MFR_SPANSION CFI_MFR_AMD
#define SNOR_MFR_SST CFI_MFR_SST
#define SNOR_MFR_WINBOND 0xef /* Also used by some Spansion */
@ -132,7 +132,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
#define SNOR_MFR_CYPRESS 0x34
/*
@@ -567,6 +568,7 @@ struct spi_nor {
@@ -590,6 +591,7 @@ struct spi_nor {
void (*unprepare)(struct spi_nor *nor, enum spi_nor_ops ops);
int (*read_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, int len);
int (*write_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, int len);

View File

@ -12,7 +12,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -413,6 +413,14 @@ static int do_spi_protect(int argc, char
@@ -421,6 +421,14 @@ static int do_spi_protect(int argc, char
return ret == 0 ? 0 : 1;
}
@ -27,7 +27,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
enum {
STAGE_ERASE,
STAGE_CHECK,
@@ -607,6 +615,8 @@ static int do_spi_flash(struct cmd_tbl *
@@ -615,6 +623,8 @@ static int do_spi_flash(struct cmd_tbl *
ret = do_spi_flash_erase(argc, argv);
else if (IS_ENABLED(CONFIG_SPI_FLASH_LOCK) && strcmp(cmd, "protect") == 0)
ret = do_spi_protect(argc, argv);
@ -36,11 +36,14 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
else if (IS_ENABLED(CONFIG_CMD_SF_TEST) && !strcmp(cmd, "test"))
ret = do_spi_flash_test(argc, argv);
else
@@ -637,6 +647,7 @@ U_BOOT_LONGHELP(sf,
#ifdef CONFIG_CMD_SF_TEST
"\nsf test offset len - run a very basic destructive test"
@@ -643,8 +653,9 @@ U_BOOT_LONGHELP(sf,
" at address 'sector'"
#endif
+ "sf uuid - read uuid from flash"
#ifdef CONFIG_CMD_SF_TEST
- "\nsf test offset len - run a very basic destructive test"
+ "\nsf test offset len - run a very basic destructive test"
#endif
+ "\nsf uuid - read uuid from flash"
);
U_BOOT_CMD(

View File

@ -7,48 +7,24 @@ Add ability to use shortkey to select item for bootmenu command
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
---
cmd/bootmenu.c | 34 ++++++++++++++++++++++++-----
common/menu.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++--
include/menu.h | 12 +++++++----
3 files changed, 93 insertions(+), 11 deletions(-)
cmd/bootmenu.c | 28 +++++++++++++++++++++++---
common/menu.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++
include/cli.h | 2 ++
include/menu.h | 3 +++
4 files changed, 84 insertions(+), 3 deletions(-)
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -88,6 +88,7 @@ static char *bootmenu_choice_entry(void
struct bootmenu_data *menu = data;
struct bootmenu_entry *iter;
enum bootmenu_key key = BKEY_NONE;
+ int choice = -1;
int i;
cli_ch_init(cch);
@@ -95,10 +96,10 @@ static char *bootmenu_choice_entry(void
while (1) {
if (menu->delay >= 0) {
/* Autoboot was not stopped */
- key = bootmenu_autoboot_loop(menu, cch);
+ key = bootmenu_autoboot_loop(menu, cch, &choice);
} else {
/* Some key was pressed, so autoboot was stopped */
- key = bootmenu_loop(menu, cch);
+ key = bootmenu_loop(menu, cch, &choice);
}
switch (key) {
@@ -114,6 +115,12 @@ static char *bootmenu_choice_entry(void
@@ -114,6 +114,8 @@ static char *bootmenu_choice_entry(void
++menu->active;
/* no menu key selected, regenerate menu */
return NULL;
+ case BKEY_CHOICE:
+ menu->active = choice;
+ if (!menu->last_choiced) {
+ menu->last_choiced = true;
+ return NULL;
+ }
+ menu->active = cch->choice;
case BKEY_SELECT:
iter = menu->first;
for (i = 0; i < menu->active; ++i)
@@ -182,6 +189,9 @@ static int prepare_bootmenu_entry(struct
@@ -182,6 +184,9 @@ static int prepare_bootmenu_entry(struct
unsigned short int i = *index;
struct bootmenu_entry *entry = NULL;
struct bootmenu_entry *iter = *current;
@ -58,24 +34,28 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
while ((option = bootmenu_getoption(i))) {
@@ -196,11 +206,24 @@ static int prepare_bootmenu_entry(struct
@@ -196,11 +201,28 @@ static int prepare_bootmenu_entry(struct
if (!entry)
return -ENOMEM;
- entry->title = strndup(option, sep - option);
+ /* Add KEY_CHOICE support: '%d. %s\0' : len --> len + 4 */
+ /* Add BKEY_CHOICE support: '%c. %s\0' : len --> len + 4 */
+ len = sep - option + 4;
+
+ choice_option = malloc(len);
+ if (!choice_option) {
+ free(entry->title);
+ free(entry);
+ return -ENOMEM;
+ }
+
+ if (!get_choice_char(i, &choice_char))
+ len = snprintf(choice_option, len, "%c. %s", choice_char, option);
+ else
+ len = snprintf(choice_option, len, " %s", option);
+
+ entry->title = strndup(choice_option, len);
+
if (!entry->title) {
free(entry);
return -ENOMEM;
@ -84,15 +64,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
entry->command = strdup(sep + 1);
if (!entry->command) {
@@ -347,6 +370,7 @@ static struct bootmenu_data *bootmenu_cr
menu->active = 0;
menu->last_active = -1;
menu->first = NULL;
+ menu->last_choiced = false;
default_str = env_get("bootmenu_default");
if (default_str)
@@ -382,9 +406,9 @@ static struct bootmenu_data *bootmenu_cr
@@ -382,9 +404,9 @@ static struct bootmenu_data *bootmenu_cr
/* Add Quit entry if exiting bootmenu is disabled */
if (!IS_ENABLED(CONFIG_BOOTMENU_DISABLE_UBOOT_CONSOLE))
@ -106,7 +78,15 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
free(entry);
--- a/common/menu.c
+++ b/common/menu.c
@@ -49,6 +49,33 @@ struct menu {
@@ -8,6 +8,7 @@
#include <cli.h>
#include <malloc.h>
#include <errno.h>
+#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/list.h>
#include <watchdog.h>
@@ -49,6 +50,33 @@ struct menu {
int item_cnt;
};
@ -140,185 +120,87 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
/*
* An iterator function for menu items. callback will be called for each item
* in m, with m, a pointer to the item, and extra being passed to callback. If
@@ -437,7 +464,7 @@ int menu_destroy(struct menu *m)
}
enum bootmenu_key bootmenu_autoboot_loop(struct bootmenu_data *menu,
- struct cli_ch_state *cch)
+ struct cli_ch_state *cch, int *choice)
@@ -441,6 +469,7 @@ enum bootmenu_key bootmenu_autoboot_loop
{
enum bootmenu_key key = BKEY_NONE;
int i, c;
@@ -472,6 +499,19 @@ enum bootmenu_key bootmenu_autoboot_loop
break;
default:
key = BKEY_NONE;
+ if (cch->esc_len || !choice)
+ break;
+
+ *choice = find_choice(c);
+ if ((*choice >= 0 &&
+ *choice < menu->count - 1)) {
+ key = BKEY_CHOICE;
+ } else if (c == '0') {
+ *choice = menu->count - 1;
+ key = BKEY_CHOICE;
+ } else {
+ key = BKEY_NONE;
+ }
break;
}
break;
@@ -492,7 +532,8 @@ enum bootmenu_key bootmenu_autoboot_loop
return key;
}
+ int choice;
-enum bootmenu_key bootmenu_conv_key(int ichar)
+enum bootmenu_key bootmenu_conv_key(struct bootmenu_data *menu, int ichar,
+ int *choice)
{
enum bootmenu_key key;
while (menu->delay > 0) {
if (ansi)
@@ -458,6 +487,18 @@ enum bootmenu_key bootmenu_autoboot_loop
menu->delay = -1;
c = getchar();
@@ -524,6 +565,20 @@ enum bootmenu_key bootmenu_conv_key(int
case ' ':
key = BKEY_SPACE;
break;
+ case '0' ... '9':
+ case 'a' ... 'z':
+ if (choice && menu) {
+ *choice = find_choice(ichar);
+ if ((*choice >= 0 && *choice < menu->count - 1)) {
+ choice = find_choice(c);
+ if ((choice >= 0 &&
+ choice < menu->count - 1)) {
+ cch->choice = choice;
+ key = BKEY_CHOICE;
+ break;
+ } else if (ichar == '0') {
+ *choice = menu->count - 1;
+ } else if (c == '0') {
+ cch->choice = menu->count - 1;
+ key = BKEY_CHOICE;
+ break;
+ }
+ }
+ fallthrough;
default:
key = BKEY_NONE;
break;
@@ -533,11 +588,17 @@ enum bootmenu_key bootmenu_conv_key(int
}
+
ichar = cli_ch_process(cch, c);
enum bootmenu_key bootmenu_loop(struct bootmenu_data *menu,
- struct cli_ch_state *cch)
+ struct cli_ch_state *cch,
+ int *choice)
switch (ichar) {
@@ -537,6 +578,7 @@ enum bootmenu_key bootmenu_loop(struct b
{
enum bootmenu_key key;
int c, errchar = 0;
+ int choice;
+ if (menu->last_choiced) {
+ menu->last_choiced = false;
+ return BKEY_SELECT;
+ }
+
c = cli_ch_process(cch, 0);
if (!c) {
while (!c && !tstc()) {
@@ -552,7 +613,7 @@ enum bootmenu_key bootmenu_loop(struct b
@@ -548,6 +590,18 @@ enum bootmenu_key bootmenu_loop(struct b
}
if (!c) {
c = getchar();
+
+ choice = find_choice(c);
+ if ((choice >= 0 &&
+ choice < menu->count - 1)) {
+ cch->choice = choice;
+ return BKEY_CHOICE;
+
+ } else if (c == '0') {
+ cch->choice = menu->count - 1;
+ return BKEY_CHOICE;
+ }
+
c = cli_ch_process(cch, c);
}
}
- key = bootmenu_conv_key(c);
+ key = bootmenu_conv_key(menu, c, choice);
return key;
}
--- a/include/menu.h
+++ b/include/menu.h
@@ -6,6 +6,8 @@
#ifndef __MENU_H__
#define __MENU_H__
+#include <linux/ctype.h>
+
struct cli_ch_state;
struct menu;
@@ -20,6 +22,8 @@ int menu_get_choice(struct menu *m, void
int menu_item_add(struct menu *m, char *item_key, void *item_data);
int menu_destroy(struct menu *m);
int menu_default_choice(struct menu *m, void **choice);
+/* Add KEY_CHOICE support */
+int get_choice_char(int index, char *result);
/**
* menu_show() Show a boot menu
@@ -43,6 +47,7 @@ struct bootmenu_data {
int last_active; /* last active menu entry */
int count; /* total count of menu entries */
struct bootmenu_entry *first; /* first menu entry */
+ bool last_choiced;
--- a/include/cli.h
+++ b/include/cli.h
@@ -23,6 +23,8 @@ struct cli_ch_state {
char esc_save[8];
int emit_upto;
bool emitting;
+ /* mediatek bootmenu choice feature */
+ char choice;
};
/** enum bootmenu_key - keys that can be returned by the bootmenu */
@@ -53,6 +58,7 @@ enum bootmenu_key {
/**
--- a/include/menu.h
+++ b/include/menu.h
@@ -37,6 +37,8 @@ int menu_default_choice(struct menu *m,
*/
int menu_show(int bootdelay);
+int get_choice_char(int index, char *result);
+
struct bootmenu_data {
int delay; /* delay for autoboot */
int active; /* active menu entry */
@@ -51,6 +53,7 @@ enum bootmenu_key {
BKEY_UP,
BKEY_DOWN,
BKEY_SELECT,
+ BKEY_CHOICE,
BKEY_QUIT,
BKEY_SAVE,
+ BKEY_CHOICE,
/* 'extra' keys, which are used by menus but not cedit */
BKEY_PLUS,
@@ -83,7 +89,7 @@ enum bootmenu_key {
* anything else: KEY_NONE
*/
enum bootmenu_key bootmenu_autoboot_loop(struct bootmenu_data *menu,
- struct cli_ch_state *cch);
+ struct cli_ch_state *cch, int *choice);
/**
* bootmenu_loop() - handle waiting for a keypress when autoboot is disabled
@@ -109,7 +115,7 @@ enum bootmenu_key bootmenu_autoboot_loop
* Space: BKEY_SPACE
*/
enum bootmenu_key bootmenu_loop(struct bootmenu_data *menu,
- struct cli_ch_state *cch);
+ struct cli_ch_state *cch, int *choice);
/**
* bootmenu_conv_key() - Convert a U-Boot keypress into a menu key
@@ -117,6 +123,7 @@ enum bootmenu_key bootmenu_loop(struct b
* @ichar: Keypress to convert (ASCII, including control characters)
* Returns: Menu key that corresponds to @ichar, or BKEY_NONE if none
*/
-enum bootmenu_key bootmenu_conv_key(int ichar);
+enum bootmenu_key bootmenu_conv_key(struct bootmenu_data *menu, int ichar,
+ int *choice);
#endif /* __MENU_H__ */
--- a/cmd/eficonfig.c
+++ b/cmd/eficonfig.c
@@ -239,7 +239,7 @@ char *eficonfig_choice_entry(void *data)
cli_ch_init(cch);
while (1) {
- key = bootmenu_loop((struct bootmenu_data *)efi_menu, cch);
+ key = bootmenu_loop((struct bootmenu_data *)efi_menu, cch, NULL);
switch (key) {
case BKEY_UP:
@@ -1881,7 +1881,7 @@ char *eficonfig_choice_change_boot_order
cli_ch_init(cch);
while (1) {
- key = bootmenu_loop(NULL, cch);
+ key = bootmenu_loop(NULL, cch, NULL);
switch (key) {
case BKEY_PLUS:
--- a/boot/bootflow_menu.c
+++ b/boot/bootflow_menu.c
@@ -240,7 +240,7 @@ int bootflow_menu_run(struct bootstd_pri
key = 0;
if (ichar) {
- key = bootmenu_conv_key(ichar);
+ key = bootmenu_conv_key(NULL, ichar, NULL);
if (key == BKEY_NONE)
key = ichar;
}

View File

@ -30,7 +30,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
};
--- a/arch/arm/dts/mt7622.dtsi
+++ b/arch/arm/dts/mt7622.dtsi
@@ -77,6 +77,22 @@
@@ -53,6 +53,22 @@
#size-cells = <0>;
};
@ -55,7 +55,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
reg = <0x11014000 0x1000>;
--- a/configs/mt7622_rfb_defconfig
+++ b/configs/mt7622_rfb_defconfig
@@ -22,6 +22,7 @@ CONFIG_SYS_PROMPT="MT7622> "
@@ -20,6 +20,7 @@ CONFIG_SYS_PROMPT="MT7622> "
CONFIG_SYS_MAXARGS=8
CONFIG_CMD_BOOTMENU=y
CONFIG_CMD_MMC=y
@ -63,7 +63,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
CONFIG_CMD_PCI=y
CONFIG_CMD_SF_TEST=y
CONFIG_CMD_PING=y
@@ -42,6 +43,9 @@ CONFIG_CLK=y
@@ -37,6 +38,9 @@ CONFIG_CLK=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
CONFIG_MTD=y

View File

@ -18,7 +18,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -1190,6 +1190,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
@@ -1195,6 +1195,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt7623n-bananapi-bpi-r2.dtb \
mt7629-rfb.dtb \
mt7981-rfb.dtb \

View File

@ -13,7 +13,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/drivers/mtd/spi/spi-nor-core.c
+++ b/drivers/mtd/spi/spi-nor-core.c
@@ -697,6 +697,7 @@ static int set_4byte(struct spi_nor *nor
@@ -758,6 +758,7 @@ static int set_4byte(struct spi_nor *nor
case SNOR_MFR_ISSI:
case SNOR_MFR_MACRONIX:
case SNOR_MFR_WINBOND:
@ -23,17 +23,18 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/drivers/mtd/spi/spi-nor-ids.c
+++ b/drivers/mtd/spi/spi-nor-ids.c
@@ -83,7 +83,8 @@ const struct flash_info spi_nor_ids[] =
@@ -83,7 +83,9 @@ const struct flash_info spi_nor_ids[] =
{ INFO("en25q32b", 0x1c3016, 0, 64 * 1024, 64, 0) },
{ INFO("en25q64", 0x1c3017, 0, 64 * 1024, 128, SECT_4K) },
{ INFO("en25q128b", 0x1c3018, 0, 64 * 1024, 256, 0) },
- { INFO("en25qh128", 0x1c7018, 0, 64 * 1024, 256, 0) },
+ { INFO("en25qh128", 0x1c7018, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
+ { INFO("en25qx128", 0x1c7118, 0, 64 * 1024, 256, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB) },
+ { INFO("en25qh256", 0x1c7019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
{ INFO("en25s64", 0x1c3817, 0, 64 * 1024, 128, SECT_4K) },
#endif
#ifdef CONFIG_SPI_FLASH_GIGADEVICE /* GIGADEVICE */
@@ -149,6 +150,11 @@ const struct flash_info spi_nor_ids[] =
@@ -149,6 +151,11 @@ const struct flash_info spi_nor_ids[] =
{INFO("gd55x02g", 0xc8481C, 0, 64 * 1024, 4096, SECT_4K |
SPI_NOR_OCTAL_READ | SPI_NOR_4B_OPCODES)},
{
@ -45,7 +46,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
INFO("gd25lq128", 0xc86018, 0, 64 * 1024, 256,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
@@ -490,6 +496,16 @@ const struct flash_info spi_nor_ids[] =
@@ -520,6 +527,16 @@ const struct flash_info spi_nor_ids[] =
SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
},
{
@ -62,7 +63,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
INFO("w25q128jw", 0xef8018, 0, 64 * 1024, 256,
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ |
SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
@@ -549,6 +565,11 @@ const struct flash_info spi_nor_ids[] =
@@ -583,6 +600,11 @@ const struct flash_info spi_nor_ids[] =
SPI_NOR_HAS_LOCK | SPI_NOR_HAS_TB)
},
{ INFO("w25q256", 0xef4019, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

View File

@ -15,7 +15,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -864,6 +864,14 @@ config MMC_MTK
@@ -876,6 +876,14 @@ config MMC_MTK
This is needed if support for any SD/SDIO/MMC devices is required.
If unsure, say N.
@ -32,7 +32,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
config FSL_SDHC_V2_3
--- a/drivers/mmc/Makefile
+++ b/drivers/mmc/Makefile
@@ -83,3 +83,7 @@ obj-$(CONFIG_RENESAS_SDHI) += tmio-comm
@@ -84,3 +84,7 @@ obj-$(CONFIG_RENESAS_SDHI) += tmio-comm
obj-$(CONFIG_MMC_BCM2835) += bcm2835_sdhost.o
obj-$(CONFIG_MMC_MTK) += mtk-sd.o
obj-$(CONFIG_MMC_SDHCI_F_SDH30) += f_sdh30.o

View File

@ -14,7 +14,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -212,8 +212,8 @@ bad:
@@ -213,8 +213,8 @@ bad:
return err;
}
@ -25,7 +25,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
{
struct ubi_mkvol_req req;
int err;
@@ -246,7 +246,7 @@ static int ubi_create_vol(char *volume,
@@ -247,7 +247,7 @@ static int ubi_create_vol(char *volume,
return ubi_create_volume(ubi, &req);
}
@ -34,7 +34,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
{
struct ubi_volume *vol;
int i;
@@ -261,7 +261,7 @@ static struct ubi_volume *ubi_find_volum
@@ -262,7 +262,7 @@ static struct ubi_volume *ubi_find_volum
return NULL;
}

View File

@ -12,7 +12,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -225,7 +225,11 @@ int ubi_create_vol(char *volume, int64_t
@@ -226,7 +226,11 @@ int ubi_create_vol(char *volume, int64_t
req.vol_id = vol_id;
req.alignment = 1;

View File

@ -14,7 +14,7 @@ Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -689,6 +689,12 @@ config ENV_UBI_VOLUME_REDUND
@@ -688,6 +688,12 @@ config ENV_UBI_VOLUME_REDUND
help
Name of the redundant volume that you want to store the environment in.

View File

@ -12,7 +12,7 @@ Subject: [PATCH] board: mediatek: wire-up NMBM support
--- a/board/mediatek/mt7622/mt7622_rfb.c
+++ b/board/mediatek/mt7622/mt7622_rfb.c
@@ -9,6 +9,11 @@
@@ -9,9 +9,47 @@
#include <init.h>
#include <asm/global_data.h>
@ -24,8 +24,7 @@ Subject: [PATCH] board: mediatek: wire-up NMBM support
DECLARE_GLOBAL_DATA_PTR;
int board_init(void)
@@ -22,3 +27,36 @@ int board_late_init(void)
env_relocate();
{
return 0;
}
+

View File

@ -0,0 +1,149 @@
From 49c8e854869d673df8452f24dfa8989cd0f615a8 Mon Sep 17 00:00:00 2001
From: Martin Kurbanov <mmkurbanov@salutedevices.com>
Date: Mon, 2 Oct 2023 17:04:58 +0300
Subject: [PATCH] mtd: spinand: add support for FORESEE F35SQA002G
Add support for FORESEE F35SQA002G SPI NAND.
Datasheet:
https://www.longsys.com/uploads/LM-00006FORESEEF35SQA002GDatasheet_1650183701.pdf
Signed-off-by: Martin Kurbanov <mmkurbanov@salutedevices.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20231002140458.147605-1-mmkurbanov@salutedevices.com
---
drivers/mtd/nand/spi/Makefile | 2 +-
drivers/mtd/nand/spi/core.c | 1 +
drivers/mtd/nand/spi/foresee.c | 95 ++++++++++++++++++++++++++++++++++
include/linux/mtd/spinand.h | 1 +
4 files changed, 98 insertions(+), 1 deletion(-)
create mode 100644 drivers/mtd/nand/spi/foresee.c
--- a/drivers/mtd/nand/spi/Makefile
+++ b/drivers/mtd/nand/spi/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
-spinand-objs := core.o esmt.o etron.o gigadevice.o macronix.o micron.o paragon.o
+spinand-objs := core.o esmt.o foresee.o etron.o gigadevice.o macronix.o micron.o paragon.o
spinand-objs += toshiba.o winbond.o xtx.o
obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
--- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c
@@ -834,6 +834,7 @@ static const struct spinand_manufacturer
&toshiba_spinand_manufacturer,
&winbond_spinand_manufacturer,
&esmt_c8_spinand_manufacturer,
+ &foresee_spinand_manufacturer,
&xtx_spinand_manufacturer,
};
--- /dev/null
+++ b/drivers/mtd/nand/spi/foresee.c
@@ -0,0 +1,97 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2023, SberDevices. All Rights Reserved.
+ *
+ * Author: Martin Kurbanov <mmkurbanov@salutedevices.com>
+ */
+
+#ifndef __UBOOT__
+#include <linux/device.h>
+#include <linux/kernel.h>
+#endif
+#include <linux/mtd/spinand.h>
+
+#define SPINAND_MFR_FORESEE 0xCD
+
+static SPINAND_OP_VARIANTS(read_cache_variants,
+ SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0),
+ SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0),
+ SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0),
+ SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0));
+
+static SPINAND_OP_VARIANTS(write_cache_variants,
+ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0),
+ SPINAND_PROG_LOAD(true, 0, NULL, 0));
+
+static SPINAND_OP_VARIANTS(update_cache_variants,
+ SPINAND_PROG_LOAD_X4(false, 0, NULL, 0),
+ SPINAND_PROG_LOAD(false, 0, NULL, 0));
+
+static int f35sqa002g_ooblayout_ecc(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
+{
+ return -ERANGE;
+}
+
+static int f35sqa002g_ooblayout_free(struct mtd_info *mtd, int section,
+ struct mtd_oob_region *region)
+{
+ if (section)
+ return -ERANGE;
+
+ /* Reserve 2 bytes for the BBM. */
+ region->offset = 2;
+ region->length = 62;
+
+ return 0;
+}
+
+static const struct mtd_ooblayout_ops f35sqa002g_ooblayout = {
+ .ecc = f35sqa002g_ooblayout_ecc,
+ .rfree = f35sqa002g_ooblayout_free,
+};
+
+static int f35sqa002g_ecc_get_status(struct spinand_device *spinand, u8 status)
+{
+ struct nand_device *nand = spinand_to_nand(spinand);
+
+ switch (status & STATUS_ECC_MASK) {
+ case STATUS_ECC_NO_BITFLIPS:
+ return 0;
+
+ case STATUS_ECC_HAS_BITFLIPS:
+ return 1;
+
+ default:
+ break;
+ }
+
+ /* More than 1-bit error was detected in one or more sectors and
+ * cannot be corrected.
+ */
+ return -EBADMSG;
+}
+
+static const struct spinand_info foresee_spinand_table[] = {
+ SPINAND_INFO("F35SQA002G",
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x72, 0x72),
+ NAND_MEMORG(1, 2048, 64, 64, 2048, 40, 1, 1, 1),
+ NAND_ECCREQ(1, 512),
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+ &write_cache_variants,
+ &update_cache_variants),
+ SPINAND_HAS_QE_BIT,
+ SPINAND_ECCINFO(&f35sqa002g_ooblayout,
+ f35sqa002g_ecc_get_status)),
+};
+
+static const struct spinand_manufacturer_ops foresee_spinand_manuf_ops = {
+};
+
+const struct spinand_manufacturer foresee_spinand_manufacturer = {
+ .id = SPINAND_MFR_FORESEE,
+ .name = "FORESEE",
+ .chips = foresee_spinand_table,
+ .nchips = ARRAY_SIZE(foresee_spinand_table),
+ .ops = &foresee_spinand_manuf_ops,
+};
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -252,6 +252,7 @@ extern const struct spinand_manufacturer
extern const struct spinand_manufacturer toshiba_spinand_manufacturer;
extern const struct spinand_manufacturer winbond_spinand_manufacturer;
extern const struct spinand_manufacturer esmt_c8_spinand_manufacturer;
+extern const struct spinand_manufacturer foresee_spinand_manufacturer;
extern const struct spinand_manufacturer xtx_spinand_manufacturer;
/**

View File

@ -0,0 +1,38 @@
From ae461cde5c559675fc4c0ba351c7c31ace705f56 Mon Sep 17 00:00:00 2001
From: Bohdan Chubuk <chbgdn@gmail.com>
Date: Sun, 10 Nov 2024 22:50:47 +0200
Subject: [PATCH] mtd: spinand: add support for FORESEE F35SQA001G
Add support for FORESEE F35SQA001G SPI NAND.
Similar to F35SQA002G, but differs in capacity.
Datasheet:
- https://cdn.ozdisan.com/ETicaret_Dosya/704795_871495.pdf
Tested on Xiaomi AX3000T flashed with OpenWRT.
Signed-off-by: Bohdan Chubuk <chbgdn@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
drivers/mtd/nand/spi/foresee.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/drivers/mtd/nand/spi/foresee.c
+++ b/drivers/mtd/nand/spi/foresee.c
@@ -83,6 +83,16 @@ static const struct spinand_info foresee
SPINAND_HAS_QE_BIT,
SPINAND_ECCINFO(&f35sqa002g_ooblayout,
f35sqa002g_ecc_get_status)),
+ SPINAND_INFO("F35SQA001G",
+ SPINAND_ID(SPINAND_READID_METHOD_OPCODE_DUMMY, 0x71, 0x71),
+ NAND_MEMORG(1, 2048, 64, 64, 1024, 20, 1, 1, 1),
+ NAND_ECCREQ(1, 512),
+ SPINAND_INFO_OP_VARIANTS(&read_cache_variants,
+ &write_cache_variants,
+ &update_cache_variants),
+ SPINAND_HAS_QE_BIT,
+ SPINAND_ECCINFO(&f35sqa002g_ooblayout,
+ f35sqa002g_ecc_get_status)),
};
static const struct spinand_manufacturer_ops foresee_spinand_manuf_ops = {

View File

@ -10,20 +10,20 @@
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ /* 64 KiB reserved for ramoops/pstore */
+ ramoops@42ff0000 {
+ compatible = "ramoops";
+ reg = <0 0x42ff0000 0 0x10000>;
+ reg = <0x42ff0000 0x10000>;
+ record-size = <0x1000>;
+ };
+
+ /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
+ secmon_reserved: secmon@43000000 {
+ reg = <0 0x43000000 0 0x30000>;
+ reg = <0x43000000 0x30000>;
+ no-map;
+ };
+ };

View File

@ -10,26 +10,26 @@
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ /* 64 KiB reserved for ramoops/pstore */
+ ramoops@42ff0000 {
+ compatible = "ramoops";
+ reg = <0 0x42ff0000 0 0x10000>;
+ reg = <0x42ff0000 0x10000>;
+ record-size = <0x1000>;
+ };
+
+ /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
+ secmon_reserved: secmon@43000000 {
+ reg = <0 0x43000000 0 0x30000>;
+ reg = <0x43000000 0x30000>;
+ no-map;
+ };
+
+ wmcpu_emi: wmcpu-reserved@4fc00000 {
+ no-map;
+ reg = <0 0x4fc00000 0 0x00100000>;
+ reg = <0x4fc00000 0x00100000>;
+ };
+ };
+

View File

@ -10,26 +10,26 @@
+ };
+
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ /* 64 KiB reserved for ramoops/pstore */
+ ramoops@42ff0000 {
+ compatible = "ramoops";
+ reg = <0 0x42ff0000 0 0x10000>;
+ reg = <0x42ff0000 0x10000>;
+ record-size = <0x1000>;
+ };
+
+ /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
+ secmon_reserved: secmon@43000000 {
+ reg = <0 0x43000000 0 0x30000>;
+ reg = <0x43000000 0x30000>;
+ no-map;
+ };
+
+ wmcpu_emi: wmcpu-reserved@4fc00000 {
+ no-map;
+ reg = <0 0x4fc00000 0 0x00100000>;
+ reg = <0x4fc00000 0x00100000>;
+ };
+ };
+

View File

@ -1,324 +1,272 @@
--- a/configs/mt7988_sd_rfb_defconfig
+++ b/configs/mt7988_sd_rfb_defconfig
@@ -11,6 +11,23 @@ CONFIG_DEBUG_UART_BASE=0x11000000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART=y
@@ -5,37 +5,76 @@ CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x41e00000
CONFIG_SYS_MALLOC_F_LEN=0x4000
CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_SIZE=0x40000
+CONFIG_ENV_OFFSET=0x400000
CONFIG_DEFAULT_DEVICE_TREE="mt7988-sd-rfb"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_SMBIOS_PRODUCT_NAME=""
+CONFIG_CFB_CONSOLE_ANSI=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_GPIO_HOG=y
+CONFIG_CMD_ENV_FLAGS=y
CONFIG_TARGET_MT7988=y
CONFIG_SYS_LOAD_ADDR=0x46000000
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
CONFIG_DEBUG_UART_BASE=0x11000000
CONFIG_DEBUG_UART_CLOCK=40000000
+CONFIG_ENV_OFFSET_REDUND=0x440000
+CONFIG_PCI=y
CONFIG_DEBUG_UART=y
# CONFIG_EFI_LOADER is not set
+CONFIG_FIT=y
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+CONFIG_SPI_BOOT=y
+CONFIG_SD_BOOT=y
+CONFIG_BOOTSTD_DEFAULTS=y
+CONFIG_BOOTSTD_FULL=y
+CONFIG_SD_BOOT=y
+CONFIG_SPI_BOOT=y
# CONFIG_AUTOBOOT is not set
CONFIG_DEFAULT_FDT_FILE="mt7988-sd-rfb"
CONFIG_SYS_CBSIZE=512
@@ -22,15 +39,118 @@ CONFIG_SYS_PROMPT="MT7988> "
CONFIG_SYS_PBSIZE=1049
CONFIG_LOGLEVEL=7
+CONFIG_PRE_CONSOLE_BUFFER=y
CONFIG_LOG=y
+CONFIG_BOARD_LATE_INIT=y
CONFIG_SYS_PROMPT="MT7988> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
# CONFIG_BOOTM_NETBSD is not set
# CONFIG_BOOTM_PLAN9 is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
-# CONFIG_CMD_ELF is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_BOOTP=y
+CONFIG_CMD_BUTTON=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_CPU=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_ELF=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ENV_READMEM=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FDT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_FS_UUID=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
CONFIG_CMD_CLK=y
CONFIG_CMD_DM=y
CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_ITEST=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_NAND_TRIMFFS=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
CONFIG_CMD_PWM=y
+CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_MTD=y
CONFIG_CMD_PING=y
+CONFIG_CMD_SF=y
CONFIG_CMD_SMC=y
+CONFIG_CMD_TFTPBOOT=y
-CONFIG_CMD_PING=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
CONFIG_CMD_SMC=y
-CONFIG_DOS_PARTITION=y
-CONFIG_EFI_PARTITION=y
+CONFIG_CMD_FS_UUID=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBI_RENAME=y
+CONFIG_CMD_UBIFS=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_SETEXPR=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_SOURCE=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_UUID=y
+CONFIG_DISPLAY_CPUINFO=y
+CONFIG_DM_MMC=y
+CONFIG_DM_MTD=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_USB=y
+CONFIG_DM_PWM=y
+CONFIG_PWM_MTK=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_PARTITION_UUIDS=y
+CONFIG_NETCONSOLE=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_SCSI=y
+CONFIG_PHY=y
+CONFIG_PHY_MTK_TPHY=y
+CONFIG_PCI=y
+CONFIG_MTD=y
+CONFIG_MTD_UBI_FASTMAP=y
+# CONFIG_MTD_RAW_NAND is not set
+CONFIG_DM_PCI=y
+CONFIG_PCIE_MEDIATEK=y
+CONFIG_PINCTRL_MT7988=y
+CONFIG_PRE_CONSOLE_BUFFER=y
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_MTK_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_MTK_SPI_NAND=y
+CONFIG_MTK_SPI_NAND_MTD=y
+CONFIG_SYSRESET_WATCHDOG=y
+CONFIG_WDT_MTK=y
+CONFIG_LZO=y
+CONFIG_ZSTD=y
+CONFIG_HEXDUMP=y
+CONFIG_RANDOM_UUID=y
+CONFIG_REGEX=y
+CONFIG_USB=y
+CONFIG_USB_HOST=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_MTK=y
+CONFIG_USB_STORAGE=y
CONFIG_PARTITION_TYPE_GUID=y
+CONFIG_OF_EMBED=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_MMC=y
+CONFIG_ENV_OFFSET=0x400000
+CONFIG_ENV_OFFSET_REDUND=0x440000
+CONFIG_ENV_SIZE=0x40000
+CONFIG_ENV_SIZE_REDUND=0x40000
CONFIG_DOS_PARTITION=y
CONFIG_EFI_PARTITION=y
CONFIG_PARTITION_TYPE_GUID=y
@@ -46,6 +166,9 @@ CONFIG_PROT_TCP=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
+CONFIG_MMC=y
+CONFIG_MMC_DEFAULT_DEV=1
+CONFIG_MMC_SUPPORTS_TUNING=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
CONFIG_MTD=y
--- a/configs/mt7988_rfb_defconfig
+++ b/configs/mt7988_rfb_defconfig
@@ -11,7 +11,23 @@ CONFIG_DEBUG_UART_BASE=0x11000000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART=y
-# CONFIG_AUTOBOOT is not set
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_SMBIOS_PRODUCT_NAME=""
+CONFIG_CFB_CONSOLE_ANSI=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_NETCONSOLE=y
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.168.1.1"
CONFIG_USE_NETMASK=y
@@ -44,28 +83,43 @@ CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.168.1.2"
CONFIG_PROT_TCP=y
CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_REGMAP=y
-CONFIG_SYSCON=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_FIT=y
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+CONFIG_SPI_BOOT=y
+CONFIG_SD_BOOT=y
+CONFIG_BOOTSTD_DEFAULTS=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_UBI_FASTMAP=y
CONFIG_PHY_FIXED=y
CONFIG_MEDIATEK_ETH=y
+CONFIG_PCIE_MEDIATEK=y
+CONFIG_PHY=y
+CONFIG_PHY_MTK_TPHY=y
CONFIG_PINCTRL=y
CONFIG_PINCONF=y
CONFIG_PINCTRL_MT7988=y
CONFIG_POWER_DOMAIN=y
CONFIG_MTK_POWER_DOMAIN=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_PWM=y
CONFIG_PWM_MTK=y
CONFIG_RAM=y
CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
CONFIG_MTK_SERIAL=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_MTK_SPIM=y
-CONFIG_LZO=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_MTK=y
+CONFIG_ZSTD=y
CONFIG_HEXDUMP=y
--- a/configs/mt7988_rfb_defconfig
+++ b/configs/mt7988_rfb_defconfig
@@ -6,36 +6,76 @@ CONFIG_TEXT_BASE=0x41e00000
CONFIG_SYS_MALLOC_F_LEN=0x4000
CONFIG_NR_DRAM_BANKS=1
CONFIG_DEFAULT_DEVICE_TREE="mt7988-rfb"
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_TARGET_MT7988=y
CONFIG_SYS_LOAD_ADDR=0x44000000
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
CONFIG_DEBUG_UART_BASE=0x11000000
CONFIG_DEBUG_UART_CLOCK=40000000
+CONFIG_PCI=y
CONFIG_DEBUG_UART=y
# CONFIG_EFI_LOADER is not set
-# CONFIG_AUTOBOOT is not set
+CONFIG_FIT=y
+CONFIG_BOOTSTD_FULL=y
+CONFIG_SD_BOOT=y
+CONFIG_SPI_BOOT=y
+CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DEFAULT_FDT_FILE="mt7988-rfb"
CONFIG_SYS_CBSIZE=512
CONFIG_SYS_PBSIZE=1049
@@ -22,15 +38,120 @@ CONFIG_SYS_PROMPT="MT7988> "
CONFIG_LOGLEVEL=7
+CONFIG_PRE_CONSOLE_BUFFER=y
CONFIG_LOG=y
+CONFIG_BOARD_LATE_INIT=y
CONFIG_SYS_PROMPT="MT7988> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
# CONFIG_BOOTM_NETBSD is not set
# CONFIG_BOOTM_PLAN9 is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
-# CONFIG_CMD_ELF is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_BOOTP=y
+CONFIG_CMD_BUTTON=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_CPU=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_ELF=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ENV_READMEM=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_EXT4=y
+CONFIG_CMD_FAT=y
+CONFIG_CMD_FDT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_FS_UUID=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
CONFIG_CMD_CLK=y
CONFIG_CMD_DM=y
CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_ITEST=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_NAND_TRIMFFS=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
CONFIG_CMD_PWM=y
+CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
CONFIG_CMD_MTD=y
CONFIG_CMD_PING=y
+CONFIG_CMD_SF=y
CONFIG_CMD_SMC=y
+CONFIG_CMD_TFTPBOOT=y
-CONFIG_CMD_PING=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
CONFIG_CMD_SMC=y
-CONFIG_DOS_PARTITION=y
-CONFIG_EFI_PARTITION=y
+CONFIG_CMD_FS_UUID=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBI_RENAME=y
+CONFIG_CMD_UBIFS=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_SETEXPR=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_SOURCE=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_UUID=y
+CONFIG_DISPLAY_CPUINFO=y
+CONFIG_DM_MMC=y
+CONFIG_DM_MTD=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_DM_USB=y
+CONFIG_DM_PWM=y
+CONFIG_PWM_MTK=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_PARTITION_UUIDS=y
+CONFIG_NETCONSOLE=y
+CONFIG_DM_GPIO=y
+CONFIG_DM_SCSI=y
+CONFIG_PHY=y
+CONFIG_PHY_MTK_TPHY=y
+CONFIG_PCI=y
+CONFIG_MTD=y
+CONFIG_MTD_UBI_FASTMAP=y
+# CONFIG_MTD_RAW_NAND is not set
+CONFIG_DM_PCI=y
+CONFIG_PCIE_MEDIATEK=y
+CONFIG_PINCTRL_MT7988=y
+CONFIG_PRE_CONSOLE_BUFFER=y
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_MTK_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_MTK_SPI_NAND=y
+CONFIG_MTK_SPI_NAND_MTD=y
+CONFIG_SYSRESET_WATCHDOG=y
+CONFIG_WDT_MTK=y
+CONFIG_LZO=y
+CONFIG_ZSTD=y
+CONFIG_HEXDUMP=y
+CONFIG_RANDOM_UUID=y
+CONFIG_REGEX=y
+CONFIG_USB=y
+CONFIG_USB_HOST=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_MTK=y
+CONFIG_USB_STORAGE=y
CONFIG_PARTITION_TYPE_GUID=y
+CONFIG_OF_EMBED=y
+CONFIG_OF_SYSTEM_SETUP=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_UBI_PART="ubi"
+CONFIG_ENV_SIZE=0x1f000
+CONFIG_ENV_SIZE_REDUND=0x1f000
+CONFIG_ENV_UBI_VOLUME="ubootenv"
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
CONFIG_DOS_PARTITION=y
CONFIG_EFI_PARTITION=y
CONFIG_PARTITION_TYPE_GUID=y
@@ -46,6 +167,9 @@ CONFIG_PROT_TCP=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_NETCONSOLE=y
CONFIG_USE_IPADDR=y
CONFIG_IPADDR="192.168.1.1"
CONFIG_USE_NETMASK=y
@@ -44,9 +84,13 @@ CONFIG_USE_SERVERIP=y
CONFIG_SERVERIP="192.168.1.2"
CONFIG_PROT_TCP=y
CONFIG_NET_RANDOM_ETHADDR=y
-CONFIG_REGMAP=y
-CONFIG_SYSCON=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
CONFIG_CLK=y
+CONFIG_MMC=y
+CONFIG_MMC_DEFAULT_DEV=1
+CONFIG_MMC_SUPPORTS_TUNING=y
+CONFIG_GPIO_HOG=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
CONFIG_MTD=y
@@ -64,20 +108,31 @@ CONFIG_SPI_FLASH_WINBOND=y
CONFIG_SPI_FLASH_XMC=y
CONFIG_SPI_FLASH_XTX=y
CONFIG_SPI_FLASH_MTD=y
+CONFIG_MTD_UBI_FASTMAP=y
CONFIG_PHY_FIXED=y
CONFIG_MEDIATEK_ETH=y
+CONFIG_PCIE_MEDIATEK=y
+CONFIG_PHY=y
+CONFIG_PHY_MTK_TPHY=y
CONFIG_PINCTRL=y
CONFIG_PINCONF=y
CONFIG_PINCTRL_MT7988=y
CONFIG_POWER_DOMAIN=y
CONFIG_MTK_POWER_DOMAIN=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
CONFIG_DM_PWM=y
CONFIG_PWM_MTK=y
CONFIG_RAM=y
CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
CONFIG_MTK_SERIAL=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_MTK_SPIM=y
-CONFIG_LZO=y
+CONFIG_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_MTK=y
+CONFIG_ZSTD=y
CONFIG_HEXDUMP=y
--- a/arch/arm/dts/mt7988-rfb.dts
+++ b/arch/arm/dts/mt7988-rfb.dts
@@ -144,6 +144,23 @@
compatible = "spi-nand";
reg = <0>;
@@ -195,6 +195,23 @@
spi-max-frequency = <52000000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
+
+ partitions {
+ compatible = "fixed-partitions";

View File

@ -1,6 +1,6 @@
--- a/configs/mt7981_rfb_defconfig
+++ b/configs/mt7981_rfb_defconfig
@@ -30,6 +30,9 @@ CONFIG_CMD_MTD=y
@@ -31,6 +31,9 @@ CONFIG_CMD_MTD=y
CONFIG_CMD_SF_TEST=y
CONFIG_CMD_PING=y
CONFIG_CMD_SMC=y

View File

@ -1,472 +1,452 @@
--- a/configs/mt7981_emmc_rfb_defconfig
+++ b/configs/mt7981_emmc_rfb_defconfig
@@ -13,7 +13,22 @@ CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART=y
-# CONFIG_AUTOBOOT is not set
@@ -8,37 +8,56 @@ CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x80000
CONFIG_ENV_OFFSET=0x300000
CONFIG_DEFAULT_DEVICE_TREE="mt7981-emmc-rfb"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_SMBIOS_PRODUCT_NAME=""
+CONFIG_CFB_CONSOLE_ANSI=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_GPIO_HOG=y
+CONFIG_CMD_ENV_FLAGS=y
CONFIG_TARGET_MT7981=y
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_DEBUG_UART=y
# CONFIG_EFI_LOADER is not set
-# CONFIG_AUTOBOOT is not set
+CONFIG_FIT=y
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+CONFIG_MMC_BOOT=y
+CONFIG_BOOTSTD_DEFAULTS=y
+CONFIG_BOOTSTD_FULL=y
+CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DEFAULT_FDT_FILE="mt7981-emmc-rfb"
CONFIG_SYS_CBSIZE=512
CONFIG_SYS_PBSIZE=1049
@@ -24,9 +39,23 @@ CONFIG_SYS_PROMPT="MT7981> "
CONFIG_LOGLEVEL=7
CONFIG_LOG=y
+CONFIG_BOARD_LATE_INIT=y
CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
# CONFIG_BOOTM_NETBSD is not set
# CONFIG_BOOTM_PLAN9 is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
-# CONFIG_CMD_ELF is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
# CONFIG_CMD_UNLZ4 is not set
# CONFIG_CMD_UNZIP is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_BOOTP=y
+CONFIG_CMD_BUTTON=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_CPU=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_ELF=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ENV_READMEM=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_FDT=y
+CONFIG_CMD_FS_UUID=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_GPT_RENAME=y
@@ -36,13 +65,35 @@ CONFIG_CMD_PART=y
CONFIG_CMD_LSBLK=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_PART=y
CONFIG_CMD_READ=y
CONFIG_CMD_PING=y
CONFIG_CMD_SMC=y
+CONFIG_CMD_TFTPBOOT=y
-CONFIG_CMD_PING=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_SETEXPR=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_SOURCE=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_UUID=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_ITEST=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_SF=y
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
CONFIG_CMD_SMC=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_FS_UUID=y
CONFIG_PARTITION_TYPE_GUID=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
@@ -46,7 +65,13 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGEX=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
--- a/configs/mt7981_rfb_defconfig
+++ b/configs/mt7981_rfb_defconfig
@@ -11,7 +11,22 @@ CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART=y
-# CONFIG_AUTOBOOT is not set
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_SMBIOS_PRODUCT_NAME=""
+CONFIG_CFB_CONSOLE_ANSI=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_FIT=y
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
CONFIG_PHY_FIXED=y
@@ -59,6 +84,7 @@ CONFIG_MTK_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
CONFIG_MTK_SERIAL=y
CONFIG_FAT_WRITE=y
CONFIG_HEXDUMP=y
--- a/configs/mt7981_rfb_defconfig
+++ b/configs/mt7981_rfb_defconfig
@@ -6,39 +6,79 @@ CONFIG_TEXT_BASE=0x41e00000
CONFIG_SYS_MALLOC_F_LEN=0x4000
CONFIG_NR_DRAM_BANKS=1
CONFIG_DEFAULT_DEVICE_TREE="mt7981-rfb"
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_TARGET_MT7981=y
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_DEBUG_UART=y
# CONFIG_EFI_LOADER is not set
-# CONFIG_AUTOBOOT is not set
+CONFIG_FIT=y
+CONFIG_SPI_BOOT=y
+CONFIG_BOOTSTD_DEFAULTS=y
+CONFIG_BOOTSTD_FULL=y
+CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DEFAULT_FDT_FILE="mt7981-rfb"
CONFIG_SYS_CBSIZE=512
CONFIG_SYS_PBSIZE=1049
@@ -22,23 +37,74 @@ CONFIG_SYS_PROMPT="MT7981> "
CONFIG_LOGLEVEL=7
CONFIG_LOG=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_HUSH_PARSER=y
CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
# CONFIG_BOOTM_NETBSD is not set
# CONFIG_BOOTM_PLAN9 is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
-# CONFIG_CMD_ELF is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
# CONFIG_CMD_UNLZ4 is not set
# CONFIG_CMD_UNZIP is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_BOOTP=y
+CONFIG_CMD_BUTTON=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_CPU=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_ELF=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ENV_READMEM=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_FDT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_FS_UUID=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_MTD=y
-CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_ITEST=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_NAND=y
+# CONFIG_MTD_RAW_NAND is not set
+CONFIG_CMD_NAND_TRIMFFS=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DNS=y
CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
CONFIG_CMD_SMC=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_FS_UUID=y
CONFIG_CMD_UBI=y
CONFIG_CMD_UBI_RENAME=y
+CONFIG_CMD_UBIFS=y
+CONFIG_CMD_TFTPBOOT=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_SETEXPR=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_SOURCE=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_UUID=y
CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_UBI_PART="ubi"
+CONFIG_ENV_SIZE=0x1f000
+CONFIG_ENV_SIZE_REDUND=0x1f000
+CONFIG_ENV_UBI_VOLUME="ubootenv"
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_ENV_OVERWRITE=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGEX=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
# CONFIG_MMC is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_SPI_NAND=y
--- a/configs/mt7981_sd_rfb_defconfig
+++ b/configs/mt7981_sd_rfb_defconfig
@@ -13,7 +13,22 @@ CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART=y
-# CONFIG_AUTOBOOT is not set
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_SMBIOS_PRODUCT_NAME=""
+CONFIG_CFB_CONSOLE_ANSI=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_FIT=y
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+CONFIG_MMC_BOOT=y
+CONFIG_BOOTSTD_DEFAULTS=y
# CONFIG_MMC is not set
CONFIG_MTD=y
CONFIG_DM_MTD=y
@@ -63,6 +103,7 @@ CONFIG_PINCTRL_MT7981=y
CONFIG_POWER_DOMAIN=y
CONFIG_MTK_POWER_DOMAIN=y
CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
CONFIG_MTK_SERIAL=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
--- a/configs/mt7981_sd_rfb_defconfig
+++ b/configs/mt7981_sd_rfb_defconfig
@@ -8,37 +8,56 @@ CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x80000
CONFIG_ENV_OFFSET=0x300000
CONFIG_DEFAULT_DEVICE_TREE="mt7981-sd-rfb"
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_TARGET_MT7981=y
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_DEBUG_UART=y
# CONFIG_EFI_LOADER is not set
-# CONFIG_AUTOBOOT is not set
+CONFIG_FIT=y
+CONFIG_BOOTSTD_FULL=y
+CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DEFAULT_FDT_FILE="mt7981-sd-rfb"
CONFIG_SYS_CBSIZE=512
CONFIG_SYS_PBSIZE=1049
@@ -24,9 +39,23 @@ CONFIG_SYS_PROMPT="MT7981> "
CONFIG_LOGLEVEL=7
CONFIG_LOG=y
+CONFIG_BOARD_LATE_INIT=y
CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
# CONFIG_BOOTM_NETBSD is not set
# CONFIG_BOOTM_PLAN9 is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
-# CONFIG_CMD_ELF is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
# CONFIG_CMD_UNLZ4 is not set
# CONFIG_CMD_UNZIP is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_BOOTP=y
+CONFIG_CMD_BUTTON=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_CPU=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_ELF=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ENV_READMEM=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_FDT=y
+CONFIG_CMD_FS_UUID=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_GPT=y
CONFIG_CMD_GPT_RENAME=y
@@ -36,13 +65,35 @@ CONFIG_CMD_PART=y
CONFIG_CMD_LSBLK=y
CONFIG_CMD_MMC=y
-CONFIG_CMD_PART=y
CONFIG_CMD_READ=y
CONFIG_CMD_PING=y
CONFIG_CMD_SMC=y
+CONFIG_CMD_TFTPBOOT=y
-CONFIG_CMD_PING=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_SETEXPR=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_SOURCE=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_UUID=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_ITEST=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_SF=y
+CONFIG_CMD_SF_TEST=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
CONFIG_CMD_SMC=y
-CONFIG_CMD_FAT=y
-CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_FS_UUID=y
CONFIG_PARTITION_TYPE_GUID=y
CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
@@ -46,7 +65,13 @@ CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGEX=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
CONFIG_PHY_FIXED=y
@@ -59,6 +84,7 @@ CONFIG_MTK_POWER_DOMAIN=y
CONFIG_DM_REGULATOR=y
CONFIG_DM_REGULATOR_FIXED=y
CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
CONFIG_MTK_SERIAL=y
CONFIG_FAT_WRITE=y
CONFIG_HEXDUMP=y
--- a/configs/mt7981_snfi_nand_rfb_defconfig
+++ b/configs/mt7981_snfi_nand_rfb_defconfig
@@ -12,7 +12,22 @@ CONFIG_DEBUG_UART_BASE=0x11002000
@@ -6,37 +6,73 @@ CONFIG_TEXT_BASE=0x41e00000
CONFIG_SYS_MALLOC_F_LEN=0x4000
CONFIG_NR_DRAM_BANKS=1
CONFIG_DEFAULT_DEVICE_TREE="mt7981-snfi-nand-rfb"
-CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_TARGET_MT7981=y
+CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_SYS_LOAD_ADDR=0x46000000
-CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART=y
-# CONFIG_AUTOBOOT is not set
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_SMBIOS_PRODUCT_NAME=""
+CONFIG_CFB_CONSOLE_ANSI=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_GPIO_HOG=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_FIT=y
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+CONFIG_SPI_BOOT=y
+CONFIG_BOOTSTD_DEFAULTS=y
+CONFIG_BOOTSTD_FULL=y
+CONFIG_SPI_BOOT=y
+CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DEFAULT_FDT_FILE="mt7981-snfi-nand-rfb"
CONFIG_LOGLEVEL=7
CONFIG_LOG=y
@@ -22,22 +37,73 @@ CONFIG_SYS_PBSIZE=1049
-CONFIG_LOGLEVEL=7
-CONFIG_LOG=y
CONFIG_SYS_CBSIZE=512
CONFIG_SYS_PBSIZE=1049
+CONFIG_LOGLEVEL=7
+CONFIG_LOG=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
# CONFIG_BOOTM_NETBSD is not set
# CONFIG_BOOTM_PLAN9 is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
-# CONFIG_CMD_ELF is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
# CONFIG_CMD_UNLZ4 is not set
# CONFIG_CMD_UNZIP is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_BOOTP=y
+CONFIG_CMD_BUTTON=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_CPU=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_ELF=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ENV_READMEM=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_FDT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_FS_UUID=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_MTD=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_ITEST=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_NAND=y
+# CONFIG_MTD_RAW_NAND is not set
+CONFIG_CMD_NAND_TRIMFFS=y
-CONFIG_CMD_PING=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_SF=y
+CONFIG_CMD_SF_TEST=y
CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
CONFIG_CMD_SMC=y
+CONFIG_CMD_FS_UUID=y
CONFIG_CMD_UBI=y
CONFIG_CMD_UBI_RENAME=y
+CONFIG_CMD_UBIFS=y
+CONFIG_CMD_TFTPBOOT=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_SETEXPR=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_SOURCE=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_UUID=y
CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_UBI_PART="ubi"
+CONFIG_ENV_SIZE=0x1f000
+CONFIG_ENV_SIZE_REDUND=0x1f000
+CONFIG_ENV_UBI_VOLUME="ubootenv"
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGEX=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
CONFIG_CLK=y
# CONFIG_MMC is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTK_SPI_NAND=y
--- a/configs/mt7981_nor_rfb_defconfig
+++ b/configs/mt7981_nor_rfb_defconfig
@@ -12,7 +12,22 @@ CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART=y
-# CONFIG_AUTOBOOT is not set
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_SMBIOS_PRODUCT_NAME=""
+CONFIG_CFB_CONSOLE_ANSI=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_FIT=y
+CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+CONFIG_SPI_BOOT=y
+CONFIG_BOOTSTD_DEFAULTS=y
# CONFIG_MMC is not set
CONFIG_MTD=y
CONFIG_DM_MTD=y
@@ -50,6 +86,6 @@ CONFIG_PINCTRL_MT7981=y
CONFIG_POWER_DOMAIN=y
CONFIG_MTK_POWER_DOMAIN=y
CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
CONFIG_MTK_SERIAL=y
CONFIG_HEXDUMP=y
-CONFIG_LMB_MAX_REGIONS=64
--- a/configs/mt7981_nor_rfb_defconfig
+++ b/configs/mt7981_nor_rfb_defconfig
@@ -5,37 +5,74 @@ CONFIG_ARCH_MEDIATEK=y
CONFIG_TEXT_BASE=0x41e00000
CONFIG_SYS_MALLOC_F_LEN=0x4000
CONFIG_NR_DRAM_BANKS=1
+CONFIG_ENV_SIZE=0x4000
+CONFIG_ENV_OFFSET=0x0
CONFIG_DEFAULT_DEVICE_TREE="mt7981-rfb"
-CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_TARGET_MT7981=y
+CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART_BASE=0x11002000
CONFIG_DEBUG_UART_CLOCK=40000000
-CONFIG_SYS_LOAD_ADDR=0x46000000
CONFIG_DEBUG_UART=y
-# CONFIG_AUTOBOOT is not set
+CONFIG_FIT=y
+CONFIG_BOOTSTD_FULL=y
+CONFIG_SPI_BOOT=y
+CONFIG_OF_SYSTEM_SETUP=y
CONFIG_DEFAULT_FDT_FILE="mt7981-rfb"
CONFIG_LOGLEVEL=7
CONFIG_LOG=y
@@ -22,21 +37,66 @@ CONFIG_SYS_PBSIZE=1049
-CONFIG_LOGLEVEL=7
-CONFIG_LOG=y
CONFIG_SYS_CBSIZE=512
CONFIG_SYS_PBSIZE=1049
+CONFIG_LOGLEVEL=7
+CONFIG_LOG=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
# CONFIG_BOOTM_NETBSD is not set
# CONFIG_BOOTM_PLAN9 is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not set
-# CONFIG_CMD_ELF is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
# CONFIG_CMD_UNLZ4 is not set
# CONFIG_CMD_UNZIP is not set
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_BOOTP=y
+CONFIG_CMD_BUTTON=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_CPU=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_ELF=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ENV_READMEM=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_FDT=y
+CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_FS_UUID=y
CONFIG_CMD_GPIO=y
CONFIG_CMD_MTD=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_ITEST=y
+CONFIG_CMD_LED=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_PCI=y
CONFIG_CMD_SF_TEST=y
-CONFIG_CMD_PING=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_SF=y
CONFIG_CMD_SF_TEST=y
CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
CONFIG_CMD_SMC=y
+CONFIG_CMD_TFTPBOOT=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_SETEXPR=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_SOURCE=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
CONFIG_CMD_SMC=y
+CONFIG_CMD_FS_UUID=y
CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_MTD=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_MTD_NAME="u-boot-env"
+CONFIG_ENV_SIZE_REDUND=0x4000
+CONFIG_ENV_SIZE=0x4000
+CONFIG_ENV_OFFSET=0x0
CONFIG_ENV_OVERWRITE=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_REGEX=y
CONFIG_REGMAP=y
CONFIG_SYSCON=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
# CONFIG_MMC is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_MTD=y
CONFIG_DM_MTD=y
CONFIG_MTD_SPI_NAND=y
@@ -60,9 +97,9 @@ CONFIG_PINCTRL_MT7981=y
CONFIG_POWER_DOMAIN=y
CONFIG_MTK_POWER_DOMAIN=y
CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
CONFIG_MTK_SERIAL=y
CONFIG_SPI=y
CONFIG_DM_SPI=y
CONFIG_MTK_SPIM=y
CONFIG_HEXDUMP=y
-CONFIG_LMB_MAX_REGIONS=64

View File

@ -1,9 +1,9 @@
--- a/arch/arm/dts/mt7981-rfb.dts
+++ b/arch/arm/dts/mt7981-rfb.dts
@@ -143,6 +143,37 @@
compatible = "spi-nand";
reg = <0>;
@@ -153,6 +153,37 @@
spi-max-frequency = <52000000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
+
+ partitions {
+ compatible = "fixed-partitions";
@ -38,10 +38,10 @@
};
};
@@ -164,6 +195,37 @@
compatible = "jedec,spi-nor";
reg = <0>;
@@ -176,6 +207,37 @@
spi-max-frequency = <52000000>;
spi-rx-bus-width = <4>;
spi-tx-bus-width = <4>;
+
+ partitions {
+ compatible = "fixed-partitions";

View File

@ -1,6 +1,6 @@
--- a/Makefile
+++ b/Makefile
@@ -1085,7 +1085,7 @@ quiet_cmd_pad_cat = CAT $@
@@ -1094,7 +1094,7 @@ quiet_cmd_pad_cat = CAT $@
cmd_pad_cat = $(cmd_objcopy) && $(append) || { rm -f $@; false; }
quiet_cmd_lzma = LZMA $@

View File

@ -70,7 +70,7 @@
{
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -2046,6 +2046,47 @@ static const char *fit_get_image_type_pr
@@ -2047,6 +2047,47 @@ static const char *fit_get_image_type_pr
return "unknown";
}
@ -120,7 +120,7 @@
int arch, int ph_type, int bootstage_id,
--- a/include/image.h
+++ b/include/image.h
@@ -1124,6 +1124,7 @@ int fit_parse_subimage(const char *spec,
@@ -1112,6 +1112,7 @@ int fit_parse_subimage(const char *spec,
ulong *addr, const char **image_name);
int fit_get_subimage_count(const void *fit, int images_noffset);

View File

@ -1,6 +1,6 @@
--- a/cmd/bootmenu.c
+++ b/cmd/bootmenu.c
@@ -465,7 +465,11 @@ static void menu_display_statusline(stru
@@ -463,7 +463,11 @@ static void menu_display_statusline(stru
printf(ANSI_CURSOR_POSITION, 1, 1);
puts(ANSI_CLEAR_LINE);
printf(ANSI_CURSOR_POSITION, 2, 3);
@ -13,7 +13,7 @@
puts(ANSI_CLEAR_LINE_TO_END);
printf(ANSI_CURSOR_POSITION, 3, 1);
puts(ANSI_CLEAR_LINE);
@@ -550,6 +554,7 @@ static enum bootmenu_ret bootmenu_show(i
@@ -548,6 +552,7 @@ static enum bootmenu_ret bootmenu_show(i
return BOOTMENU_RET_FAIL;
}
@ -23,11 +23,11 @@
goto cleanup;
--- a/include/menu.h
+++ b/include/menu.h
@@ -47,6 +47,7 @@ struct bootmenu_data {
@@ -45,6 +45,7 @@ struct bootmenu_data {
int last_active; /* last active menu entry */
int count; /* total count of menu entries */
struct bootmenu_entry *first; /* first menu entry */
+ char *mtitle; /* custom menu title */
bool last_choiced;
};
/** enum bootmenu_key - keys that can be returned by the bootmenu */

View File

@ -1,6 +1,6 @@
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -683,6 +683,12 @@ config CMD_ENV_EXISTS
@@ -692,6 +692,12 @@ config CMD_ENV_EXISTS
Check if a variable is defined in the environment for use in
shell scripting.
@ -15,7 +15,7 @@
help
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -273,6 +273,60 @@ int do_env_ask(struct cmd_tbl *cmdtp, in
@@ -273,6 +273,60 @@ static int do_env_ask(struct cmd_tbl *cm
}
#endif

View File

@ -16,7 +16,7 @@ Reviewed-by: Tom Rini <trini@konsulko.com>
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -617,6 +617,12 @@ int image_setup_libfdt(struct bootm_head
@@ -612,6 +612,12 @@ int image_setup_libfdt(struct bootm_head
images->fit_uname_cfg,
strlen(images->fit_uname_cfg) + 1, 1);

View File

@ -18,7 +18,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
#include <dt-bindings/clock/mt7981-clk.h>
#include <dt-bindings/reset/mt7629-reset.h>
#include <dt-bindings/pinctrl/mt65xx.h>
@@ -342,4 +343,50 @@
@@ -346,4 +347,50 @@
status = "disabled";
};
@ -31,11 +31,11 @@ Signed-off-by: John Crispin <john@phrozen.org>
+ interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
+ phys = <&u2port0 PHY_TYPE_USB2>,
+ <&u3port0 PHY_TYPE_USB3>;
+ clocks = <&infracfg_ao CK_INFRA_IUSB_SYS_CK>,
+ <&infracfg_ao CK_INFRA_IUSB_CK>,
+ <&infracfg_ao CK_INFRA_IUSB_133_CK>,
+ <&infracfg_ao CK_INFRA_IUSB_66M_CK>,
+ <&topckgen CK_TOP_U2U3_XHCI_SEL>;
+ clocks = <&infracfg CLK_INFRA_IUSB_SYS_CK>,
+ <&infracfg CLK_INFRA_IUSB_CK>,
+ <&infracfg CLK_INFRA_IUSB_133_CK>,
+ <&infracfg CLK_INFRA_IUSB_66M_CK>,
+ <&topckgen CLK_TOP_U2U3_XHCI_SEL>;
+ clock-names = "sys_ck",
+ "ref_ck",
+ "mcu_ck",
@ -54,7 +54,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+
+ u2port0: usb-phy@11e10000 {
+ reg = <0x11e10000 0x700>;
+ clocks = <&topckgen CK_TOP_USB_FRMCNT_SEL>;
+ clocks = <&topckgen CLK_TOP_USB_FRMCNT_SEL>;
+ clock-names = "ref";
+ #phy-cells = <1>;
+ status = "okay";
@ -62,7 +62,7 @@ Signed-off-by: John Crispin <john@phrozen.org>
+
+ u3port0: usb-phy@11e10700 {
+ reg = <0x11e10700 0x900>;
+ clocks = <&topckgen CK_TOP_USB3_PHY_SEL>;
+ clocks = <&topckgen CLK_TOP_USB3_PHY_SEL>;
+ clock-names = "ref";
+ #phy-cells = <1>;
+ status = "okay";

Some files were not shown because too many files have changed in this diff Show More