Compare commits

...

1425 Commits

Author SHA1 Message Date
coolsnowwolf
0bc87353e5 Version update to R25.4.145 2025-04-16 12:11:08 +08:00
aiamadeus
ebbde708c8 uboot-rockchip: bump to 2025.04 2025-04-15 20:00:20 +08:00
coolsnowwolf
34e8beace9 kernel: bump 6.x to latest HEAD 2025-04-14 10:00:19 +08:00
Andre Heider
91d0fd154f hostapd: update to 2023-06-22
Removed, merged upstream:
- 170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch

Manually refreshed:
- 040-mesh-allow-processing-authentication-frames-in-block.patch
- 600-ubus_support.patch
- 761-shared_das_port.patch

Fixes: a091a96 ("hostapd: always enable nl80211 driver support")
Signed-off-by: Andre Heider <a.heider@gmail.com>
2025-04-13 16:30:05 +08:00
Felix Fietkau
c61ceffddb iwinfo: add multi-radio support
Fix the path to the hostapd config file for queries

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-04-13 16:26:01 +08:00
Christian Marangi
25ebc3de2e generic: fix no previous prototype
It seems new kernel version introduced -Wmissing-prototypes. This new
warning reported drivers that define non static function that are used
statically in the driver.

Fix this by declaring making those function actually static if not
defined in any header and not used outside of the single driver.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-13 16:20:18 +08:00
coolsnowwolf
1d300215e5 mac80211: backport EHT API support 2025-04-13 16:18:08 +08:00
coolsnowwolf
4a21ec3e4f mt76: update to Git HEAD (2024-05-17) 2025-04-12 21:20:21 +08:00
Robert Marko
55e46bb63c iwinfo: update to Git HEAD (2025-02-06)
94b3a3c1a6c4 devices: add device id for Qualcomm Atheros IPQ5018
9cec6b4dd2df devices: add device id for Qualcomm Atheros QCN6122

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-12 16:38:30 +08:00
Felix Fietkau
3750142bb6 udebug: update to Git HEAD (2023-12-06)
6d3f51f9fda7 ucode: check for errors in ftruncate()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-04-12 16:30:05 +08:00
Felix Fietkau
8ce3d7e91f ucode: update to Git HEAD (2025-03-24)
2824982da336 ubus: fix broken uc_ubus_defer()

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-04-12 16:28:16 +08:00
Robert Marko
9da01c6b7b rpcd: update to Git HEAD (2024-12-02)
cc9a471c32e1 rpc-sys: rework packagelist call for apk

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-12 16:21:15 +08:00
John Audia
ad4f5990fc linux-firmware: update to 20250311
Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2025-04-11 15:10:26 +08:00
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
59540554ee package: add kmod-r8127 ethernet driver
r8127 is an out of tree driver provided by Realtek for RTL8127 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-04-11 15:00:30 +08:00
coolsnowwolf
e61334eee7 ipq-wifi: update to Git HEAD (2025-04-08) 2025-04-10 12:08:43 +08:00
Shiji Yang
71813b0d03 generic: crypto: fix jitterentropy initialization failed issue
Sync jitterentropy source code with linux-6.12 to solve the
issue of jitterentropy initialization failed:

[ 9.523489] jitterentropy: Initialization failed with host not compliant with requirements: 9
[ 9.661916] kmodloader: 1 module could not be probed
[ 9.662377] kmodloader: - jitterentropy_rng - 0

In linux upstream commit cf27d9475f37 ("crypto: jitter - use
permanent health test storage"), when FIPS crypto is disabled,
the health test results are always explicitly skipped. That means
it will never return error code 9 (health test failed) again.

Fixes: https://github.com/openwrt/openwrt/issues/16684
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18399
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-10 11:59:41 +08:00
coolsnowwolf
7495ac1b63 kernel: bump 6.x to latest HEAD 2025-04-10 11:57:12 +08:00
Florian Maurer
ba66096756 mediatek: netgear-wax206 fix wifi leds
The wifi leds of the wax206 were not reacting. This patch enables
the green leds to show activity, as the blue ones are very bright.
Also set the label-mac to the gmac0.

Signed-off-by: Florian Maurer <f.maurer@outlook.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-09 22:10:18 +08:00
Andrew LaMarche
a7a6707213 airoha: an7581: fix phy2 led1 function
PHY2 led1 is configured to control PHY1's LED. Change it to PHY2.

Signed-off-by: Andrew LaMarche <andrewjlamarche@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-08 22:20:01 +08:00
coolsnowwolf
b50369007d filogic: improve HUASIFEI WH3000 support 2025-04-07 21:00:02 +08:00
Michel Lespinasse
8c11125e5e rockchip: show boot stages on nanopi r6
Some checks failed
OpenWrt-CI / Build OpenWrt Firmware (push) Failing after 5s
Set up openwrt to show boot progress on the nanopi r6s/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>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-05 22:10:09 +08:00
coolsnowwolf
7eb42a3618 rockchip: add support for Radxa ROCK 5B
Some checks failed
OpenWrt-CI / Build OpenWrt Firmware (push) Failing after 6s
2025-04-04 20:40:25 +08:00
coolsnowwolf
d0efae101c rockchip: sync rk3588 dts with upstream
Some checks failed
OpenWrt-CI / Build OpenWrt Firmware (push) Failing after 4s
Fixes: #13425
2025-04-03 20:00:15 +08:00
Álvaro Fernández Rojas
efbab19385 generic: backport gpio-regmap ops patch
Some checks failed
OpenWrt-CI / Build OpenWrt Firmware (push) Failing after 3s
This patch has been accepted for linux v6.14
so we can move it from pending to backport.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-04-02 22:10:16 +08:00
Daniel Golle
60824ec6a6 mediatek: mt7622: fix SATA on BPi-R64
Some checks failed
OpenWrt-CI / Build OpenWrt Firmware (push) Failing after 4s
Two commits which made their way into Linux stable broke the SATA
support on the BPi-R64.

Fix this by reverting a node rename which broke DT-overlay application
and import a (still pending) patch re-adding the 'syscon' compatible
to the pciesys clock-controller which also contains phy-mode bits
referenced by the ahci_mtk driver expecting to access them using
syscon_regmap_lookup_by_phandle().

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-04-01 22:00:19 +08:00
Mieczyslaw Nalewaj
ae810b9dd6 kernel: remove unused settings and depends
Remove settings and depends that are not used anywhere.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-31 22:40:05 +08:00
Rui Salvaterra
8808906a7d kernel: usb: simplify r8152 dependencies
Some checks failed
OpenWrt-CI / Build OpenWrt Firmware (push) Failing after 5s
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-30 23:08:25 +08:00
Martin Schiller
129f2e50f1 generic: backport some copper SFP fixes
Some checks failed
OpenWrt-CI / Build OpenWrt Firmware (push) Failing after 6s
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-29 22:10:38 +08:00
aiamadeus
3cfb3952dd rockchip: add support for h29k hw v1.3
Some checks failed
OpenWrt-CI / Build OpenWrt Firmware (push) Failing after 5s
2025-03-28 20:30:18 +08:00
aiamadeus
ece23788a7 mediatek: add FM25S01BI3 flash support
Some checks failed
OpenWrt-CI / Build OpenWrt Firmware (push) Failing after 23s
Import patch from MediaTek's SDK to support FM25S01B flash.
Also fixes DS35Q1GA flash support in kernel 6.1.

Fixes: c2a01cf ("mediatek: sync kernel 6.1 from upstream")
2025-03-27 15:30:02 +08:00
Stephen Howell
ebe6852c1d 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>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-26 18:36:27 +08:00
coolsnowwolf
840b076139 kernel: bump 6.12 to 6.12.20 2025-03-25 01:45:26 +08:00
coolsnowwolf
f03f0f54b5 mac80211: fix build on linux kernel 5.4.291+ 2025-03-25 01:40:34 +08:00
coolsnowwolf
391830f91c kernel: bump 6.6 to 6.6.84 2025-03-25 01:04:12 +08:00
coolsnowwolf
43473ebd4f Revert "rockchip: fix RK3399 PCIE reboot issues"
This reverts commit e43d4db7c0.
This commit breaks nvme support for rk3399.
2025-03-24 20:00:03 +08:00
Willem Lee
6e84aeb589
ath79: add support for Alibaba AP121-DB (#13417) 2025-03-23 22:10:28 +08:00
IDeLoveYou
d7d4bcc86d
toolchain: glibc: Fix build with autoconf 2.71
Fixes: #13308
2025-03-22 22:00:03 +08:00
Rui Salvaterra
7866838873 kernel: igc: enable HW vlan tag by default
Add a pending patch [1] in order to do so. This will be moved to the backports
section as soon as we know on which Linux version it will be merged.

[1] https://lore.kernel.org/netdev/20250313093615.8037-1-rsalvaterra@gmail.com/

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-21 22:20:26 +08:00
coolsnowwolf
97d3d1c6aa mt76: fix mt7916 160Mhz support in kernel 5.4 2025-03-20 12:54:19 +08:00
Willem Lee
4d0cc6c14c
filogic: add support for KANKA KOMI A31 2025-03-20 11:30:05 +08:00
coolsnowwolf
c638a07dac busybox: update to 1.36.1 2025-03-19 16:46:54 +08:00
coolsnowwolf
e43d4db7c0 rockchip: fix RK3399 PCIE reboot issues 2025-03-18 18:20:22 +08:00
coolsnowwolf
d4831d96b7 mediatek: add support for CMCC A10 2025-03-18 18:10:30 +08:00
coolsnowwolf
83134525fd rockchip: sync base with upstream
Fixes: #13402
2025-03-16 22:20:02 +08:00
coolsnowwolf
9914389a8d treewide: update dts for switch 2025-03-15 18:18:08 +08:00
coolsnowwolf
3f938d01a6 kernel: bump all to latest HEAD 2025-03-14 16:02:08 +08:00
coolsnowwolf
e005f3b627 kernel: bump 5.x to latest HEAD 2025-03-13 13:00:19 +08:00
coolsnowwolf
74aa05a408 kernel: bump 6.1 to 6.1.130 2025-03-13 12:57:08 +08:00
coolsnowwolf
0c58045b0e Version update to R25.3.15 2025-03-13 12:42:04 +08:00
coolsnowwolf
75f99ed4fd kernel: bump 6.6 to 6.6.82 2025-03-13 12:39:59 +08:00
Christian Marangi
f352df1dc2 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.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-03-12 22:20:29 +08:00
Willem Lee
0fae2aafdb
ipq40xx: fixes Alibaba AP4220 support 2025-03-11 21:01:03 +08:00
coolsnowwolf
fd54fed45c kernel: bump 6.12 to 6.12.18 2025-03-10 16:01:28 +08:00
aiamadeus
00eb500306 rockchip: sync rk3528 with upstream
Switch to the mainline pcie driver.
2025-03-09 18:30:08 +08:00
coolsnowwolf
46e9727846
luci-app-fogvdn: fix wrong typo 2025-03-08 17:08:17 +08:00
Willem Lee
2f337aa482
ipq40xx:add support for Alibaba AP4220 (#13385) 2025-03-08 17:06:18 +08:00
sfwtw
ec108ac504 rockchip: improve support for fine3399 2025-03-08 16:18:18 +08:00
coolsnowwolf
543621f9d6 luci-app-fogvdn: add fogvdn new package 2025-03-07 15:10:15 +08:00
coolsnowwolf
fe71259e68 uboot-rockchip: update rk3528 support
Fixes: #13380
2025-03-07 13:01:25 +08:00
Ahmed Naseef
c65c2ad5b0 kernel: usbnet: Restore usb%d naming
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>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-06 23:08:30 +08:00
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
ae9e8d4c84 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-03-05 23:01:19 +08:00
Álvaro Fernández Rojas
d0fa42a6bc 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-03-05 23:00:30 +08:00
aiamadeus
2fe48cd61a rockchip: remove dwcmshc hack for rk3528
This hack is only needed when running sdk u-boot.
2025-03-04 20:00:16 +08:00
aiamadeus
36b2cd19df uboot-rockchip: add pending rk3528 support 2025-03-03 21:00:02 +08:00
aiamadeus
324daf1e8e rockchip: improve rk3528/rk3568 support 2025-03-03 20:38:09 +08:00
coolsnowwolf
2dc0ff4f66 quectel_MHI: fix complie with ipq807x 2025-03-02 15:28:19 +08:00
libriunk
461364a4f4 mediatek: fixes gpio for netcore n60 pro 2025-03-01 23:20:08 +08:00
tuzhis
0146ee1968
mediatek: add support for netcore n60 pro 2025-02-28 20:10:03 +08:00
coolsnowwolf
b55bb8004d quectel-cm: update to version 1.6.7 2025-02-27 22:02:26 +08:00
coolsnowwolf
04b8d9bdd6 package/wwan: remove outdated packages 2025-02-27 22:00:05 +08:00
coolsnowwolf
0608f510fc intel-microcode: update to version 20250211
Fixes: #13366
2025-02-26 17:20:08 +08:00
tabudz
8a984fc1dd
mt7603e: fix possible infinite loop in BN_mod_sqrt() (#13368)
The calculation in some cases does not finish for non-prime p.

This fixes CVE-2022-0778.

Based on patch by David Benjamin <davidben@google.com>.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
2025-02-26 16:44:12 +08:00
Internet1235
84884dd637
openssl: update to 3.0.16 (#13363) 2025-02-25 18:23:25 +08:00
coolsnowwolf
c44f45dfe6 aic8800: rename usb module to avoild conflicts 2025-02-25 14:43:53 +08:00
coolsnowwolf
6fbd06a3a0 kernel: bump 6.12 to 6.12.16 2025-02-25 14:12:02 +08:00
coolsnowwolf
b32c0de796 linux: add module package crypto-lib-aescfb for 6.12 2025-02-24 17:42:56 +08:00
coolsnowwolf
dedff78f07 uboot-rk35xx: fix MangoPi M28C support 2025-02-24 17:41:11 +08:00
77160860
a050110bb9
armbian-firmware: add BCM43430B0 FullMac SDIO firmware
rockchop:fine3399 wifi support
2025-02-24 11:49:25 +08:00
Chuanhong Guo
6bfda9d7d9 Add new package for usb gadget setup
Setting up usb gadgets using g_* kernel modules are considered a
legacy approach, but the usb_gadget configfs is a bit annoying
to use directly.
The usb_gadget configfs works by creating magic directories
and writing to magic files under /sys/kernel/config/usbgadget.
This new package is an init script to setup usb_gadget configfs
using uci. In the config file, gadget/configuration/function
sections create corresponding directories. UCI options are magic
files available in the configfs and strings/0x409 directories,
grabbed with a 'find' command. UDC option in gadget writes
the UDC file under the 'gadget' directory to attach the
generated gadget config.

It's also possible to apply pre-made config templates under
/usr/share/usbgadget. The templates use the same UCI config
format, with the 'gadget' entry named 'g1'. Currently, there
are templates for CDC-ACM and CDC-NCM gadgets written based
on existing g_*.ko module code.

Certain SBCs come with only a USB device port (e.g. Raspberry Pi
Zero). With this script, it's now possible to perform initial
setup on them by adding a default NCM gadget.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2025-02-23 23:00:19 +08:00
Christian Marangi
8b14c27843 airoha: Introduce 7581 SoC support
Introduce EN7581 SoC support with currently rfb board supported.

This is a new 64bit SoC from Airoha that is currently almost fully
supported upstream with only the DTS missing. Setting source-only
waiting for the full upstream support to be completed.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-02-22 23:01:06 +08:00
Daniel Golle
228b0ce955 linux-firmware: update to 20250211
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-21 21:30:20 +08:00
aiamadeus
3f00869321 tools: add xxhash package for ccache 2025-02-20 21:10:10 +08:00
aiamadeus
55c1cfedcc aic8800: add support for usb cards 2025-02-19 20:30:02 +08:00
aiamadeus
4a126e07b7 usb-modeswitch: add aic8800 support 2025-02-19 20:20:20 +08:00
coolsnowwolf
36c00a4209 ipq-wifi: update to version 2025-02-16 2025-02-18 11:25:00 +08:00
John Audia
d989a3256a 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>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-18 11:00:26 +08:00
coolsnowwolf
8311a3f316 generic: add more switch port link speed nested attributes 2025-02-17 16:59:22 +08:00
tabudz
6c30ff6831
mt7615d: fix possible infinite loop in BN_mod_sqrt() (#13346)
The calculation in some cases does not finish for non-prime p.

This fixes CVE-2022-0778.

Based on patch by David Benjamin <davidben@google.com>.

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>

Co-authored-by: Su Yindu <yindusu@smu.edu.sg>
2025-02-17 10:57:45 +08:00
coolsnowwolf
b00deea1b7 mac80211: ath: add qcom-qmi-helpers as package 2025-02-16 16:28:26 +08:00
Felix Fietkau
81419528c1 kernel: backport MHI patch required by an upcoming mac80211 update
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2025-02-16 16:22:39 +08:00
coolsnowwolf
0631178b1e ipq-wifi: rename jdcloud ax6600 to re-cs-02 2025-02-16 11:33:57 +08:00
coolsnowwolf
58b8d3234a qualcommax: ipq807x: add support for Zbtlink Z800AX 2025-02-15 22:10:25 +08:00
George Moussalem
dbd654f22b 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-15 08:34:54 +08:00
Mieczyslaw Nalewaj
8730dc18a4 kernel: rtl8367: detect rtl8367d chip family
Detect the RTL8367D chip family and set the appropriate extif

Co-authored-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-14 20:26:16 +08:00
Luiz Angelo Daros de Luca
0263cb3835 kernel: 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>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-14 20:10:08 +08:00
coolsnowwolf
bf665a29b2 qualcommax: ipq50xx: add CMCC RAX3000Q support 2025-02-13 18:17:57 +08:00
coolsnowwolf
9dc66796d5 qualcommax: ipq50xx : temporarily disable tcsr_q6_block 2025-02-13 16:48:41 +08:00
coolsnowwolf
108da88bad kernel: netfilter: fix ipt-ipopt depends
Fixes: #13336
2025-02-12 22:00:20 +08:00
coolsnowwolf
36fac63d85 qualcommax: 6.6: add ipq60xx pwm support 2025-02-12 16:26:00 +08:00
aiamadeus
84c08cc0c4 ipq60xx: replace cpufreq with latest series 2025-02-11 22:09:01 +08:00
aiamadeus
64ed83cc0e mac80211/ath11k: temporarily disable DBS mode 2025-02-10 21:30:16 +08:00
Robert Marko
f8b9349cb8 qualcommax: move generic image recipes target
These recipes are generic and will be used for other subtargets, so lets
move them to the target Makefile so they can reused.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-09 17:38:10 +08:00
Joe Zheng
7b1175e882 kernel: add package for Intel VPU/NPU driver
Intel NPU device is an AI inference accelerator integrated with Intel
client CPUs, starting from Intel Core Ultra generation of CPUs
(formerly known as Meteor Lake). It enables energy-efficient execution
of artificial neural network tasks.

The full device name is Neural Processing Unit, but the Linux kernel
driver uses the older name - Versatile Processing Unit (VPU).

This package is for NPU/VPU firmware.

Details in https://github.com/intel/linux-npu-driver

Signed-off-by: Joe Zheng <joe.zheng@intel.com>
2025-02-09 17:10:16 +08:00
Robert Marko
719b7258f6 qualcommax: replace SPINAND to 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.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-09 17:06:02 +08:00
Christian Marangi
d5b41ff34f generic: move Qcom SNAND driver to backports
Add patch to fix Qcom SNAND driver and move the SNAND patches to
backports directory as they are shared between qualcommax and qualcommbe
target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-09 17:00:16 +08:00
coolsnowwolf
76271e77fd ath11k-firmware: add QCN6122 wifi firmware 2025-02-08 20:18:05 +08:00
coolsnowwolf
6754876c3c ipq-package: add linux 6.6 support for nss 2025-02-08 20:10:20 +08:00
coolsnowwolf
b45bbd008a qualcommax: add nss support for linux 6.6 2025-02-08 20:02:10 +08:00
aiamadeus
b9e8fb3049 qualcommax: fixes Aliyun AP8220 support 2025-02-08 18:18:03 +08:00
coolsnowwolf
922b9fd73b qualcommax: sync ipq50xx with upstream 2025-02-07 12:04:28 +08:00
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
a0dbcae1dd 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-07 12:00:06 +08:00
coolsnowwolf
111e93f75d kernel: bump 6.x to latest HEAD 2025-02-06 19:40:05 +08:00
coolsnowwolf
e905fdb169 OpenWrt v24.10.0: adjust config defaults 2025-02-06 19:35:15 +08:00
coolsnowwolf
be22644b67 kernel: add option to disable legacy cgroup v1 2025-02-06 19:28:18 +08:00
守望
cadb05400b
dnsmasq: add option to expose additional paths 2025-02-06 12:30:04 +08:00
Daniel Golle
8858bea842 generic: net: phy: realtek: various improvements
Follow the advise of Russell King allows to greatly improve the driver
for RealTek's 1G and 2.5G Ethernet PHYs. The results are full/half
duplex as well as Gbit master/slave property being read from PHY
Specific Status Register (PHYSR), and fixes regarding link-partner
advertisement.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-05 18:30:03 +08:00
Daniel Golle
3b3ed936ec generic: net: phy: mxl-gpy: add support for PHY LEDs
Add driver support for PHY LEDs for MaxLinear/Intel GPY Ethernet PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-03 23:02:26 +08:00
Daniel Golle
5c7361ebdc generic: net: phy: intel-way: add support for PHY LEDs
Add driver support for PHY LEDs for MaxLinear/Intel/Lantiq XWAY
Ethernet PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-03 23:00:09 +08:00
Daniel Golle
82a54c3179 generic: net: phy: use all SerDes MAC interface modes
Instead of forcing 2.5G PHYs into rate-adapter mode which results higher
energy consumption, lack of support for half-duplex modes and typically
worse performance when linked at speeds less than 2.5G, use SGMII mode
which allows the MAC to follow the PHY speed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-02-02 23:40:02 +08:00
coolsnowwolf
62329a55f8 qualcommax: ipq807x: improve support for Aliyun AP8220 2025-01-31 23:00:09 +08:00
coolsnowwolf
c14fe39288 qualcommbe: ipq95xx: add qualcomm wifi7 be target support 2025-01-31 16:17:05 +08:00
coolsnowwolf
d49a280942 kernel: bump 5.x to latest HEAD 2025-01-31 15:55:16 +08:00
coolsnowwolf
fac8d770bf kernel: bump 6.x to latest HEAD 2025-01-31 15:51:42 +08:00
coolsnowwolf
f4a80a4ce1 filogic: fixes huasifei wh3000 led 2025-01-30 12:40:16 +08:00
aiamadeus
424c43cafd rockchip: add MangoPi M28C support 2025-01-28 23:01:25 +08:00
coolsnowwolf
171cb58c1d gpio-button-hotplug: sync upstream 2025-01-27 23:10:02 +08:00
coolsnowwolf
19978f14dc autocore: update index page 2025-01-25 23:00:05 +08:00
coolsnowwolf
a6b29fbae9 generic: fix linux 6.12 build 2025-01-24 23:00:16 +08:00
coolsnowwolf
c15d43eaec
kernel: bump 6.6 to 6.6.73 2025-01-23 04:23:52 +08:00
coolsnowwolf
08296f25e8
gpio-button-hotplug: fix for linux 6.12 2025-01-23 04:20:57 +08:00
coolsnowwolf
89624f51bc kernel: bump 6.12 to 6.12.10 2025-01-23 02:43:23 +08:00
Internet1235
1999fa3f2d
apk: bump to Git HEAD 2024-10-28 (#13304)
Fixes: https://github.com/coolsnowwolf/lede/issues/13299
2025-01-22 21:46:55 +08:00
coolsnowwolf
4514a62beb cryptodev-linux: fix for linux 6.12 2025-01-21 21:36:19 +08:00
aiamadeus
6488a08057 mac80211: backport QCA2066 support 2025-01-20 22:10:06 +08:00
kcro227
b2cdb3a102
mediatek: add for cmcc xr30 support 2025-01-19 23:20:10 +08:00
Internet1235
10cd0f0831
action: update apt dependencies 2025-01-17 21:20:04 +08:00
Willem Lee
c2a9a0cfec
ath79: add support for Zte E8820 2025-01-16 20:02:01 +08:00
aiamadeus
90de065709 uboot-rockchip: bump to 2025.01 2025-01-15 22:08:27 +08:00
coolsnowwolf
d2bbf8b912 generic: add missing kconfig 2025-01-14 22:20:28 +08:00
coolsnowwolf
002ab96412
Update openwrt-ci.yml 2025-01-13 15:20:23 +08:00
coolsnowwolf
062f52320b kernel: bump 6.x to latest HEAD 2025-01-13 14:36:31 +08:00
Kien Truong
80ccee5b7e rockchip: disable all kernel preemption
This setting is more suitable for device running OpenWRT.
Most OpenWRT targets are already default to this configuration,
and it has shown better performance in VPN (wireguard).

Signed-off-by: Kien Truong <duckientruong@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-12 22:20:09 +08:00
Christian Marangi
eda8bc8395 generic: backport BLOCK OF support patch
Backport BLOCK OF support patch merged upstream and refresh pending
BLOCK patches.

This is a new way to declare partition table for BLOCK device (eMMC
currently supported) with the use of DTS.

Current pending patch are adapted to not cause regression with current
downstream implementation of a similar functionality.

Also enable the new OF_PARTITION config by default.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-01-10 20:30:02 +08:00
Daniel Golle
343d814968 mtd-utils: add ubihealthd to nand-utils
Add ubihealthd to the nand-utils package, auto-create UCI config for
each UBI device and launch the daemon on boot.

The default time interval between scrubbing a random PED is 120 seconds
which means that a fully used 128 MiB flash chip gets scrubbed in about
a day and a half. The interval can be adjusted in UCI using the
'interval' option.

Suggested-by: Rodrigo Balerdi <lanchon@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-01-09 23:10:09 +08:00
Daniel Golle
d3002da4e5 mediatek: update MediaTek PHY patchset
The previous iteration of MediaTek's PHY patches caused various weird bugs.
Drop culprit patch 733-10-net-phy-mediatek-Extend-1G-TX-RX-link-pulse-time.patch
and use the most recent iteration of the patchset which has been posted to the
netdev mailing list.

Link: https://patchwork.kernel.org/project/netdevbpf/list/?series=895513&state=*
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-01-08 21:16:28 +08:00
Daniel Golle
77c3d74088 mediatek: apply pending PHY driver fixes
Apply changes suggested by SkyLake Huang for pending series improving
MediaTek Ethernet PHY drivers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2025-01-08 21:10:16 +08:00
Robert Marko
e59a6368cc ath10k-ct: select mac80211 debugfs support
Trying to compile ath10k-ct without mac80211 debugfs support will result in:
 8083 | #warning Please enable ATH10K-DEBUGFS kernel option for optimal support for CT firmware.
      |  ^~~~~~~
cc1: all warnings being treated as errors

So, since the driver itself is saying that debugfs is required, then
lets make ath10k-ct select mac80211 debugfs support which is selected
by default anyway.

Fixes: #11687, #12363
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-01-07 22:30:16 +08:00
coolsnowwolf
e1204bd00d Version update to 24.10.0-rc5 2025-01-06 20:30:00 +08:00
aiamadeus
330cb1ea52 rockchip: sync upstream fixes 2025-01-06 18:28:06 +08:00
coolsnowwolf
be3442766f
kernel: bump 6.6 to 6.6.69 2025-01-05 20:39:19 +08:00
coolsnowwolf
cbd8e21246
kernel: bump 6.12 to 6.12.8 2025-01-05 20:37:59 +08:00
coolsnowwolf
bac0af3dec uboot-rockchip: fix rk3399 boot issue 2025-01-04 16:03:09 +08:00
coolsnowwolf
ccb92beeda ramips: adapted cevt-r4k irq patches
Fixes: #13251
2025-01-03 20:06:08 +08:00
coolsnowwolf
b522d5bdb9 README(EN/JA): sync build dependency
Fixes: #13249
2025-01-02 23:02:10 +08:00
aiamadeus
d379cee203 aic8800: update to version 20240327
Fixes build for kernel 6.12.
2025-01-02 11:38:20 +08:00
Jonas Jelonek
f3e56a87e7 kernel: add Broadcom NetXtreme-C/E driver
Package bnxt_en kernel module for Broadcom NetXtreme-C/E based
Ethernet network chips like BCM573xx and BCM574xx.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-31 22:00:08 +08:00
Jack Sun
774d694812 package: busybox: update download link
There is no file named busybox-1.36.1.tar.bz2 in the root directory of the website
The actual download link is “https://sources.buildroot.net/busybox/busybox-1.36.1.tar.bz2”

Signed-off-by: Jack Sun <sunjiazheng321521@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-30 22:30:16 +08:00
Rani Hod
e14a7bfece linux-firmware: package MT7925 firmware
Package firmware for MediaTek MT7925 Bluetooth from `linux-firmware`.

Signed-off-by: Rani Hod <rani.hod@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-29 23:16:28 +08:00
coolsnowwolf
f2815ef000 ramips: add support for Huasifei WHF283 2024-12-28 18:00:10 +08:00
coolsnowwolf
817dfb5381 filogic: add support for HUASIFEI WH3000 2024-12-28 17:50:06 +08:00
Beginner
1fcb93df27
kernel: bump 6.6 to 6.6.67 (#13239) 2024-12-27 15:01:04 +08:00
Beginner
abac351b33
kernel: refresh 6.1 patches (#13240) 2024-12-27 10:30:06 +08:00
Beginner
6d2364bf77
kernel: refresh 6.12 patches (#13238) 2024-12-27 10:00:36 +08:00
coolsnowwolf
ae997a86d8 kernel: bump 5.10 to 5.10.232 2024-12-26 11:44:22 +08:00
coolsnowwolf
27cc9c7468 kernel: bump 5.15 to 5.15.175 2024-12-26 11:33:30 +08:00
coolsnowwolf
8289e89f90 kernel: bump 5.4 to 5.4.288 2024-12-26 11:32:37 +08:00
coolsnowwolf
1776f07f5d kernel: bump 6.1 to 6.1.121 2024-12-26 11:31:23 +08:00
coolsnowwolf
f3bb851821 kernel: bump 6.12 to 6.12.6 2024-12-26 11:30:08 +08:00
Joe Zheng
55be1d688c x86: make i915 as a kmod with required firmware
i915 driver requires to load correct firmware to work on latest x86
GPU, it is more reasonable to make it as a kernel module, so that
initramfs is not required, and it can also save some space from the
kernel image comparing being a built-in driver

Signed-off-by: Joe Zheng <joe.zheng@intel.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-25 22:30:40 +08:00
David Bauer
aeac24fb69 net: phy: broadcom: update dependency condition
The broadcom PHY driver only has to depend upon PTP_1588_CLOCK_OPTIONAL
if NETWORK_PHY_TIMESTAMPING is enabled. The PTP functionality is stubbed
in this case.

Reflect this circumstance in the dependence condition. This allows to
build the driver as a built-in module even if PTP is built as a module.

This is required to include the broadcom PHY module regardless of the
built-setting of the PTP subsystem. On ath79 (and probably more)
targets with Broadcom PHY, Gigabit operation is currently broken as the
PHY driver is only built as a module in case all kernel-packages are
built. Due to this circumstance, affected devices fall back to using the
generic PHY driver.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-12-25 22:01:02 +08:00
Marco von Rosenberg
b20c1bceba generic: fix BCM54612E ethernet backport patch
This backport patch inserted suspend/resume callbacks
for the wrong PHY driver.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-12-24 22:36:03 +08:00
cn-shell
f21df97339
uboot-rockchip: fix NanoPi-R3S defconfig (#13232)
Fixes: #12491, #13001
2024-12-23 22:30:09 +08:00
coolsnowwolf
7953c94b31 kernel: kstrtox: revert strtobool() in linux 6.12 2024-12-23 13:39:14 +08:00
coolsnowwolf
651cc85470
openwrt-ci.yml : update profile 2024-12-23 13:02:09 +08:00
aiamadeus
3790f4f134 kernel: fixes some modules build on 6.12
Fixes: #13224
2024-12-22 19:20:38 +08:00
aiamadeus
47cfbf7d9b generic: add missing kconfig for kernel 6.x 2024-12-21 23:00:29 +08:00
coolsnowwolf
b49e92a28c default-settings: also including english lang po 2024-12-20 18:56:19 +08:00
coolsnowwolf
d6c6378869 rockchip: add 6.12 testing kernel support 2024-12-20 16:00:04 +08:00
coolsnowwolf
f0424787f1 rockchip: kernel 6.12: add rk3576 soc support 2024-12-19 22:20:09 +08:00
coolsnowwolf
37330800b4 rockchip: add ondemand cpu freq gov as default 2024-12-19 15:45:57 +08:00
coolsnowwolf
d5fc5fc430 kernel: bump 5.15 to 5.15.174 2024-12-18 22:11:53 +08:00
coolsnowwolf
33e376de95 kernel: bump 5.4 to 5.4.287 2024-12-18 21:56:26 +08:00
coolsnowwolf
c1846ee3f8 mac80211: fix build with kernel 5.10.230+ 2024-12-18 21:11:33 +08:00
coolsnowwolf
ea8c0bcaa0 ksmbd: fix build with kernel 5.10 2024-12-18 21:05:45 +08:00
coolsnowwolf
cab2ab7d58 kernel: bump 5.10 to 5.10.231 2024-12-18 13:06:41 +08:00
coolsnowwolf
af0a4aa4a4 rockchip: update rk3399 soc support 2024-12-17 21:40:15 +08:00
coolsnowwolf
927e1b695c generic: 6.12: fixes broken patches 2024-12-17 21:36:05 +08:00
Beginner
23d466fba0
kernel: bump 6.6 to 6.6.66 (#13214) 2024-12-16 20:30:22 +08:00
Beginner
b7305e23ef
kernel: bump 6.1 to 6.1.120 (#13215) 2024-12-16 16:00:10 +08:00
coolsnowwolf
0a3cb8e16a ramips: add setmac and getmac scripts 2024-12-16 11:21:10 +08:00
Beginner
4fb48d3e6f
kernel: bump 6.12 to 6.12.5 (#13216) 2024-12-16 10:00:16 +08:00
aiamadeus
f449329de6 trusted-firmware-a.mk: fix release download URL 2024-12-15 18:38:35 +08:00
aiamadeus
062dc20078 arm-trusted-firmware-rockchip: update to v2.12
Switch rk3588 to the mainline atf.
Fixes: #13211
2024-12-15 18:36:21 +08:00
Bohdan Chubuk
d6318bba0f generic: mtd: spinand: add support for 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: Christian Marangi <ansuelsmth@gmail.com>
2024-12-14 22:40:08 +08:00
Bohdan Chubuk
79545017e8 generic: mtd: spinand: add support for F35SQA002G
Add support for FORESEE F35SQA002G SPI NAND.
Datasheet:
  https://www.longsys.com/uploads/LM-00006FORESEEF35SQA002GDatasheet_1650183701.pdf

Refresh all affected patch with make target/linux/refresh.

Signed-off-by: Bohdan Chubuk <chbgdn@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-12-14 22:35:30 +08:00
aiamadeus
764b5a63d1 mediatek: add u-boot mod version for Cudy TR3000 2024-12-13 21:20:15 +08:00
Jianyu Zhuang
23a4c1fb90 mediatek: filogic: add support for Tenbay WR3000K
Tenbay WR3000K is an 802.11ax (Wi-Fi 6) router, based on MediaTek MT7981B.

- SoC: MetiaTek MT7981B
- RAM: Hynex H5TQ2G863GFR 512MiB
- Flash: Winbond W25N01GVZEIG 128MiB
- Wi-Fi: MediaTek MT7976C (2.4GHz/5GHz, 802.11ax, 2x2 MIMO, AX3000)
- MediaTek MT7915E: 2.4GHz and 5GHz
- Ethernet: 1x 10/100/1000 Mbps WAN + 3x 10/100/1000 Mbps LAN
- Switch: MediaTek MT7531AE
- UART: J4 (115200 baud)
- LEDs: Power
- Buttons: Reset, WPS
- PWR: 12V/1A DC, 5.5×2.1 connector

Signed-off-by: Jianyu Zhuang <xzjianyu@gmail.com>
2024-12-13 21:01:20 +08:00
Oleg S
21eb7bf2ae mediatek: expand kernel size to 6MiB for Xiaomi AX6S
Expand kernel partition size on Xiaomi AX6S for the kernel larger than
4 MiB. Manual upgrade from OpenWRT to new OpenWRT:

cd /tmp
dd if=factory.bin bs=1M count=4 | mtd write - kernel
dd if=factory.bin bs=1M skip=4 count=2 | mtd write - ubi
dd if=factory.bin bs=1M skip=6  | mtd -p 2097152 write - ubi

Signed-off-by: Oleg S <remittor@gmail.com>
2024-12-12 21:18:25 +08:00
coolsnowwolf
d242992f65 base-files: allow override model name from uboot env 2024-12-11 19:28:11 +08:00
Luis Mita
41e0c30d82 mediatek: add Cudy TR3000 v1 support
Hardware:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 128 MiB SPI NAND
 - RAM: 512 MiB
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
 - Ethernet: 1x 10/100/1000/2500 Mbps WAN, 1x10/100/1000 Mbps LAN
 - USB 3.0 port
 - Buttons: 1 Reset button, 1 slider button
 - LEDs: 1x Red, 1x White
 - Serial console: internal test points, 115200 8n1
 - Power: 5 VDC, 3 A

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

To install using TFTP:
1. Connect to UART.
2. With the router off, press the RESET button. While the router is turning
   on, the button should continue to be pressed for at least 5 seconds.
3. A u-boot shell will automatically open.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a
   TFTP server and an OpenWrt initramfs-kernel.bin firmware file.
5. Run these steps in u-boot using the name of your file.

setenv bootfile initramfs-kernel.bin
tftpboot
bootm

6. If you can reach LuCI or SSH now, just use the sysupgrade image
   with the 'Keep settings' option turned off.

Signed-off-by: Luis Mita <luis@luismita.com>
2024-12-10 17:30:36 +08:00
Beginner
da0bc37b19
kernel: bump 6.6 to 6.6.64 (#13195) 2024-12-10 10:10:12 +08:00
mars-m9
e87df11ac5
intel-microcode: update to 20241112 (#13193) 2024-12-09 23:10:07 +08:00
coolsnowwolf
eb12799875 uboot-rk35xx: fixes build with gcc13
Fixes: #13191
2024-12-09 23:06:21 +08:00
Beginner
e66ffaf37c
kernel: bump 6.1 to 6.1.119 (#13185) 2024-12-08 16:01:09 +08:00
Beginner
fd9b9cc78b
kernel: refresh 6.6 patches (#13179) 2024-12-07 15:13:57 +08:00
Beginner
d83ce75e31
kernel: refresh 6.12 patches (#13178) 2024-12-07 10:56:20 +08:00
coolsnowwolf
cb4244db53 ksmbd: add SMB v1 support 2024-12-06 18:13:53 +08:00
coolsnowwolf
9e010ff34a kernel: bump 6.12 to 6.12.3 2024-12-06 16:45:13 +08:00
coolsnowwolf
2778ccf7a3 Revert "tools: update versions"
This reverts commit ff5046f.
2024-12-06 11:40:05 +08:00
coolsnowwolf
06366c30e7 uqmi: update to latest HEAD 2024-12-06 11:30:08 +08:00
coolsnowwolf
ef272b46c0 noddos: fix gcc 13 building 2024-12-05 19:32:39 +08:00
coolsnowwolf
d06838b449 libreadlne: create symlinks for .so 2024-12-04 22:36:03 +08:00
coolsnowwolf
0ab7c18f48 ksmbd: update to Git HEAD (2024-12-02) 2024-12-04 13:55:27 +08:00
coolsnowwolf
228c3c4403 Revert "ksmbd: move to in tree kernel buidin module"
This reverts commit f09fb1ac12.
2024-12-04 13:01:29 +08:00
coolsnowwolf
2ce0dfdc41 elfutils: fix build with gcc 8 2024-12-03 22:27:16 +08:00
coolsnowwolf
0c725fe51b ubus: update to Git HEAD (2024-10-20) 2024-12-03 20:42:54 +08:00
coolsnowwolf
e59c30afbb libubox: update to Git HEAD (2024-03-29) 2024-12-03 20:05:32 +08:00
coolsnowwolf
3409218cf9 README.md: update host apt install package 2024-12-03 18:08:22 +08:00
coolsnowwolf
0e2c0a340c meson: allow using staging python 2024-12-03 14:27:03 +08:00
coolsnowwolf
e67c755180 autosamba: allow select samba server type 2024-12-03 14:26:15 +08:00
coolsnowwolf
841d082824 target.mk: improve ipv6 support package 2024-12-03 13:55:08 +08:00
coolsnowwolf
3022abc26c procd: use standard POSIX header for basename() 2024-12-03 13:28:24 +08:00
coolsnowwolf
4ebc73897e elfutils: Update to 0.192 2024-12-03 13:14:16 +08:00
coolsnowwolf
6c2883702c toolchain/musl: Update to 1.2.5 2024-12-03 12:58:46 +08:00
coolsnowwolf
326599e3d0 toolchain: gcc: switch default to 13 2024-12-03 12:31:48 +08:00
Michael Pratt
003a084905 build: add default host build recipes for gnulib
Add generic recipes for incorporating gnulib into a build
for simplification and readability of the individual build Makefile.

Recipes for configuring and installing are purposefully missing
since "configuring" gnulib is done with standard autoreconf
and gnulib is not a final build target meant for installing.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15853
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-12-02 21:56:35 +08:00
Christian Marangi
70c103fda7 host-build: always define Host/Prepare/Default
We currently skip defining Host/Prepare/Default if HOST_UNPACK is not
defined.

This is mostly the case for Host packages that just provide files with
the src directory and don't need to be downloaded/extracted.

This was probably done lots of times ago due to quilt causing error as
the patches directory wasn't present.
This has changed now and quilt can correctly detect if no patches needs
to be applied (instead of terminating with error)

Always define Host/Prepare/Default to make tools/refresh correctly works
as HOST_QUILT is hardcoded enabled for this make target and will
complain for tool not prepared for quilt patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-12-02 21:55:40 +08:00
coolsnowwolf
fbc2865461 Release: v24.10.0-rc1: adjust config defaults 2024-12-02 19:28:12 +08:00
coolsnowwolf
7f19e32c4a Version update to R24.12.12 2024-12-02 19:22:30 +08:00
Georgi Valkov
72bab93bc3 toolchain/gcc: fix build errors on macOS with Xcode 15.3
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:550:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
    _LIBCPP_INLINE_VISIBILITY
    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
 #  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                    ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))

Fixed using backport of upstream commits [1-2] as discussed here
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632#c21

[1] Include safe-ctype.h after C++ standard headers, to avoid over-poisoning
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9970b576b7e4ae337af1268395ff221348c4b34a

[2] libcc1: fix <vector> include
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5213047b1d50af63dfabb5e5649821a6cb157e33

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
2024-12-02 18:56:09 +08:00
coolsnowwolf
ff5046fa7c tools: update versions and sync with upstream v24.10 2024-12-02 18:53:09 +08:00
Michael Pratt
17731641e4 tools: add gnulib source
By having a local copy of gnulib, we can:
import the latest macro fixes into any package,
get rid of some statically stored macros that were otherwise missing,
bootstrap GNU tools with the latest relevant source
without having to wait for a release or rely on git submodules,
and possibly more...

The patch assists in bootstrapping by ignoring
the building of po files using gettext,
and also to allow a user-defined path to a program
to include parameters.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2024-12-02 13:00:13 +08:00
Internet1235
28e46bb611
openssl: make compatible with v1.1 pkg (#13143) 2024-12-01 22:23:53 +08:00
coolsnowwolf
007d406efc rockchip: refine fan speed for mmbox anas3035 2024-11-29 18:31:31 +08:00
coolsnowwolf
1609903030 mt76: add kernel 6.12 support 2024-11-29 17:20:57 +08:00
Daniel Golle
efce6b6392 generic: 6.6: update block nvmem patchset
While discussions are still ongoing, update the block NVMEM provider
patchset to the level submitted upstream to allow testing and validation.

Link: https://patchwork.kernel.org/project/linux-block/list/?series=875202
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-11-27 22:01:05 +08:00
Álvaro Fernández Rojas
446d071896 generic: backport upstream r8169 patches
These patches have been added in linux v6.12 release.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-11-27 21:40:20 +08:00
Marty Jones
c6de673aa5 linux-firmware: update to 20241110
linux-firmware update to 20241110
Move WCN6750 firmware to the device-specific subdir

Signed-off-by: Marty Jones <mj8263788@gmail.com>
2024-11-26 23:00:20 +08:00
aiamadeus
61b26c92f8 uboot-rockchip: disable optee client
Fixes: #13129
2024-11-26 22:30:17 +08:00
coolsnowwolf
a87916d4c1 README: add llvm as build dependency 2024-11-25 23:06:26 +08:00
John Audia
4d0b9caf5f kernel: bump 6.6 to 6.6.63 (#16997)
Manually rebased:
	bcm27xx/patches-6.6/950-0297-staging-vchiq_arm-Add-36-bit-address-support.patch

All other patches automatically rebased. Fix: #13121

Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-25 18:16:27 +08:00
aiamadeus
3d32cf1756 rockchip: fixes rk3588 usb3 init issue 2024-11-24 22:30:05 +08:00
coolsnowwolf
9bfa3a936d r8125/r8126: improve transmit performance 2024-11-24 22:28:16 +08:00
coolsnowwolf
468d14896b kernel: disable kmod-fs-ntfs for Linux 6.12 2024-11-23 11:25:46 +08:00
coolsnowwolf
3346bf1ee2 kernel: bump 6.12 to 6.12.1 2024-11-23 01:35:01 +08:00
coolsnowwolf
0a6ea7cfbf rockchip: add support for MMBOX ANAS3035 2024-11-23 01:02:34 +08:00
coolsnowwolf
27a261c8df r8125: support devname configuration from OF 2024-11-23 01:01:23 +08:00
coolsnowwolf
030f6f6ec6 rockchip: enable support for disk led trigger 2024-11-23 01:00:37 +08:00
coolsnowwolf
f031685a8c kmod-sound-hda-core: fix build with linux 6.12 2024-11-23 00:58:43 +08:00
coolsnowwolf
fd656efbc3 kernel: bump 6.6 to 6.6.63 2024-11-23 00:31:00 +08:00
coolsnowwolf
85d99596b4 generic: fix netfilter xtables NFLOG and MARK not load on IPv4 on linux 6.6 2024-11-22 23:57:01 +08:00
coolsnowwolf
26cc6f2a46 ipq807x: add Arcadyan AW1000 support 2024-11-22 21:59:04 +08:00
coolsnowwolf
f09fb1ac12 ksmbd: move to in tree kernel buidin module 2024-11-22 21:05:17 +08:00
coolsnowwolf
676db02019 modules: kmod-fs-cifs fix build with kernel 6.12 2024-11-22 16:32:44 +08:00
coolsnowwolf
af207e5f62 uboot-rockchip: update rkbin and add rk3576 support 2024-11-22 13:00:18 +08:00
coolsnowwolf
0c80cdd186 rockchip: add ArmSoM Sige5 (RK3576, 8 Cores) board support 2024-11-22 12:50:27 +08:00
coolsnowwolf
ab8cac3519 rockchip: backport upstream rk3576 support for kernel 6.6 2024-11-22 10:57:43 +08:00
coolsnowwolf
8decff2d88 toolchain: fix gcc 11 build error with host gcc-14 2024-11-22 10:43:46 +08:00
coolsnowwolf
32dc417ef8 ksmbd: fix build with kernel 6.12 2024-11-22 10:37:04 +08:00
coolsnowwolf
af098a176f kmod-tpm: fix linux 6.12 support 2024-11-21 23:02:51 +08:00
coolsnowwolf
6b5e1a552f x86: add kconfig for linux 6.12 2024-11-21 14:25:25 +08:00
coolsnowwolf
a6567a2415 autocore: fix kernel 6.12 x86 board name display 2024-11-21 13:17:45 +08:00
coolsnowwolf
53e61ac527 kernel: add linux kernel 6.12 support 2024-11-21 13:16:25 +08:00
coolsnowwolf
be8fee09fb mac80211: add kernel build with 6.11+ support 2024-11-21 12:27:34 +08:00
coolsnowwolf
28f226a038 r8125: fix build with linux 6.9+ 2024-11-21 12:20:47 +08:00
coolsnowwolf
a816cede4d r8168: fix build with linux 6.9+ 2024-11-21 12:14:51 +08:00
coolsnowwolf
826816c208 r8126: fix build with linux 6.9+ 2024-11-21 12:13:54 +08:00
coolsnowwolf
418c887452 generic: sync genlmsg_mcast patch with upstream with kernel 6.6.59+ 2024-11-21 12:10:10 +08:00
aiamadeus
71196b2724 kernel: video: add ST7789V LCD driver 2024-11-20 22:36:09 +08:00
aiamadeus
c74ed3282c rockchip: add HINLINK H29K CPE Board 2024-11-20 22:26:09 +08:00
coolsnowwolf
44ac9994fe rockchip: add NanoPi R2C Plus support 2024-11-19 12:30:32 +08:00
coolsnowwolf
bafb6af955 rockchip: move nanopi r2s plus dts to common dts files 2024-11-19 12:14:25 +08:00
coolsnowwolf
d72ea8c7b6 ramips: mt7621: fix Huasifei MT7621 DTU led status 2024-11-19 11:10:10 +08:00
coolsnowwolf
54aae07290 rockchip: Add support for FriendlyElec NanoPi R2S Plus 2024-11-18 22:09:35 +08:00
coolsnowwolf
655367c488 rockchip: add Radxa ROCK 5A support 2024-11-18 21:56:45 +08:00
coolsnowwolf
4db4344cac kernel: bump 6.1 to 6.1.118 2024-11-18 15:24:26 +08:00
coolsnowwolf
b743ccd20c kernel: bump 5.15 to 5.15.173 2024-11-18 15:13:42 +08:00
coolsnowwolf
0004a5c57f kernel: bump 6.6 to 6.6.62 2024-11-18 14:52:26 +08:00
coolsnowwolf
bdc94f7fd2 kernel: bump 6.1 to 6.1.117 2024-11-18 00:31:56 +08:00
coolsnowwolf
20b3f20e53 kernel: bump 6.6 to 6.6.61 2024-11-17 23:23:59 +08:00
coolsnowwolf
29c13455d2 kernel: Split kmod-video-dma into two kmods 2024-11-17 23:09:09 +08:00
coolsnowwolf
d17b0026c2 LEDE v24.10: set branch defaults 2024-11-17 23:02:41 +08:00
Patryk Kowalczyk
4a7dd142ff filogic: add support for ASUS TUF AX6000
Hardware
========
SOC: MediaTek MT7986
RAM: 512MB DDR3
FLASH: 256MB SPI-NAND
WIFI: Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz 4T4R
ETH: MediaTek MT7530 Switch (LAN)
MaxLinear GPY211C 2.5 N-Base-T PHY (WAN)
MaxLinear GPY211C 2.5 N-Base-T PHY (LAN)
UART: 3V3 115200 8N1 (Do not connect VCC)
USB 3.1

Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
2024-11-17 21:01:20 +08:00
coolsnowwolf
8a28dd39d4 ipq60xx: add alt name to JDCloud routers 2024-11-17 16:16:06 +08:00
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
94c4c1331a bcm27xx: switch default kernel to 6.6
Update default kernel version to 6.6 for the Raspberry Pi devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-11-17 16:06:03 +08:00
coolsnowwolf
0c5fee5ec2 mediatek: add BananaPi BPi-R3 mini 2024-11-16 18:20:10 +08:00
coolsnowwolf
7b605254b7 ubnt-ledbar: adapt for kernel v6.1 2024-11-16 18:00:03 +08:00
John Audia
44a23972ec kernel: bump 6.6 to 6.6.60
All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2024-11-15 16:40:05 +08:00
Beginner
eba03073ab kernel: bump 6.6 to 6.6.59 2024-11-15 16:18:19 +08:00
coolsnowwolf
9b5d129bec Version update to R24.11.11 2024-11-14 14:14:42 +08:00
coolsnowwolf
1063641e6e branding: add LEDE branding 2024-11-14 13:14:47 +08:00
coolsnowwolf
5cd761710a ath10k-ct: fix build with some target 2024-11-14 12:53:29 +08:00
coolsnowwolf
0404234acb ubnt-ledbar: fix compilation error 2024-11-14 11:31:21 +08:00
coolsnowwolf
cb33d17dba Revert "rkbin: update to latest git HEAD" 2024-11-13 23:38:08 +08:00
coolsnowwolf
128d3289dd kernel: remove obsolete rtl8812au driver 2024-11-13 23:36:23 +08:00
Til Kaiser
ec78ad954a kernel: netdevices: adjust mlxsw network drivers
* Adds the x86_64 dependency for mlxsw_core

* Removes the redundant mlxsw_core dependency
from mlxsw-minimal and mlxsw-spectrum

* Removes the DCB configuration symbols because
they were moved into the generic configuration

Signed-off-by: Til Kaiser <mail@tk154.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-12 23:05:23 +08:00
Til Kaiser
55afdb73c6 kernel: modules: add boot flag to igc, mlx4/5 drivers
Set the boot flag for the igc, mlx4-core, and mlx5-core network device drivers
to load them at a more early stage of the boot process.

This is required for network drivers whose network interface PCI paths are set
via ucidef_set_network_device_path inside the 02_network script since it is
called after kernel modules are loaded from modules-boot.d but before they are
loaded from the modules.d directory.

Signed-off-by: Til Kaiser <mail@tk154.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-11-12 23:01:36 +08:00
asushugo
dd5c39cbab qualcommax: ipq60xx: add support for JDCloud RE-CS-07 2024-11-11 05:22:04 +00:00
coolsnowwolf
17cbfefbe1 qualcommax: ipq50xx: add support for GL.iNet GL-B3000 2024-11-10 23:25:26 +08:00
coolsnowwolf
86b0876324 kernel: qca-ssdk/qca-nss-dp: fixes kernel 6.1 support 2024-11-10 23:16:10 +08:00
coolsnowwolf
2b10822e1b kernel: qca-ssdk/qca-nss-dp: update to 12.5 for kernel 6.6 support 2024-11-09 23:01:43 +08:00
coolsnowwolf
f2e1532a7c qualcommax: add support for JDCloud AX3000 2024-11-09 15:36:01 +08:00
coolsnowwolf
a6ea160b40 ath11k-firmware: add IPQ5018 wifi firmware 2024-11-09 15:20:15 +08:00
coolsnowwolf
105f4fd96a qualcommax: add ipq50xx target init support 2024-11-09 11:20:25 +08:00
Álvaro Fernández Rojas
c5a7f6cde1 kernel: r8126: update to v10.014.01
Changelog: https://github.com/openwrt/rtl8126/compare/10.013.00...10.014.01

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-11-08 23:10:29 +08:00
Álvaro Fernández Rojas
7702e88e60 kernel: r8125: update to v9.014.01
Changelog: https://github.com/openwrt/rtl8125/compare/9.013.02...9.014.01

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-11-08 23:09:05 +08:00
Álvaro Fernández Rojas
a5eeb5700e kernel: r8168: update to v8.054.00
Changelog: https://github.com/openwrt/rtl8168/compare/8.053.00...8.054.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-11-08 23:06:03 +08:00
aiamadeus
19649ea2dc r8152: update to version 2.19.2 2024-11-07 21:36:03 +08:00
aiamadeus
f0ab317249 rkbin: update to latest git HEAD 2024-11-07 21:26:16 +08:00
aiamadeus
44cccd68f5 rtw88-usb: update to latest git HEAD 2024-11-06 21:06:18 +08:00
aiamadeus
7ce7dc32e0 linux-firmware: update RTW88/89 firmware 2024-11-06 21:00:26 +08:00
aiamadeus
d83c55af85 rockchip: enable lcd/pwm-fan for srcm3588 2024-11-05 20:36:08 +08:00
aiamadeus
6cbe4f5135 ipq60xx: fixes usb3 power for jdc ax6600
Fixes: #12396
2024-11-05 20:30:10 +08:00
喵二
4915cc9ed2
leigod-acc: update binary program (#12608)
leigod-acc: fixed bind issues & use fail issues
2024-11-04 10:08:08 +08:00
Daniel Golle
9630906317 mediatek: mt7988: fix peripheral SPI busses
The clocks for SPI busses were named wrongly which resulted in the
spi-mt65xx driver not requesting them. This has apparently been
worked around by marking the clocks required for SPI0 which is used
for SPI-NOR and SPI-NAND flash chips as critical.
Fix the device tree for all 3 generic SPI host controllers and no
longer mark clocks as critical.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-11-04 10:01:00 +08:00
Daniel Golle
f942a330fe mediatek: filogic: BPi-R4: wire up pinctrl for pwm-fan
Assign pwm function of PWM0 pin to the pwm-fan.
This is mostly just cosmetics as it basically reflects the default
setting of that pin.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-11-03 23:01:21 +08:00
Daniel Golle
6bcceed653 mediatek: pinctrl-mt7988: add missing PWM pingroups
Add additionals possible pinctrl group for pwm2~7 on pins
pin  4 (GPIO_A)        pwm7
pin 58 (JTAG_JTDI)     pwm2
pin 59 (JTAG_JTDO)     pwm3
pin 60 (JTAG_JTMS)     pwm4
pin 61 (JTAG_JTCLK)    pwm5
pin 62 (JTAG_JTRST_N)  pwm6

They can be useful e.g. on the BPi-R4 as in that way pwm2~6 can be exposed
on the 26-pin header (pwm6 always, pwm2~5 instead of the full UART).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-11-03 23:00:07 +08:00
Daniel Golle
011c3ad78d mediatek: backport pending Ethernet PHY driver patches
Use pending patchset for 2.5GE PHY driver, unifying LED handling
accross all MediaTek Ethernet PHYs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-11-02 22:16:02 +08:00
Daniel Golle
4078885193 generic: backport pending driver for Winchip CH348 USB
Import patch and package kernel module for Winchip CH348
USB-to-8x-UART chip.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-11-02 22:00:28 +08:00
Daniel Golle
897572506f generic: phy: aquantia: correctly describe LED polarity
Backport newly introduced support for 'active-high' property and use
it to correctly implement polarity assignment for Aquantia PHY LEDs.
Previously the 'active-low' property was used to switch a LED PIN to
active-high ("drive VDD" in Aquantia-speak) mode.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-11-01 13:00:09 +08:00
Robert Marko
e5c20ddcd0 generic: add fix for AQR113 PMD Global Transmit Disable bit
PMD Global Transmit Disable bit should be cleared for normal operation.
This should be HW default, however I found that on Asus RT-AX89X that uses
AQR113C PHY and firmware 5.4 this bit is set by default.

With this bit set the AQR cannot achieve a link with its link-partner and
it took me multiple hours of digging through the vendor GPL source to find
this out, so lets always clear this bit during .config_init() to avoid a
situation like this in the future.

aqr107_wait_processor_intensive_op() is moved up because datasheet notes
that any changes to this bit are processor intensive.

This is a modified version of patch that got merged upstream as AQR113C
has a separate config_init() upstream.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-11-01 12:38:20 +08:00
coolsnowwolf
bd85b63920 build: correctly ignore Initramfs image might fail as it's too big 2024-10-31 17:11:03 +08:00
coolsnowwolf
568395dbbd ramips: switch to kernel 5.10 2024-10-31 17:03:54 +08:00
coolsnowwolf
f3d6035d78 kernel: bump 5.10 to 5.10.221 2024-10-31 16:53:49 +08:00
coolsnowwolf
ecd7193bd2 Revert "tools/libtool: bump to 2.4.6"
This reverts commit 906045201f.
2024-10-30 22:23:29 +08:00
coolsnowwolf
3e24ca1105 kernel: fix rtw88x kernel 6.x build 2024-10-30 21:04:40 +08:00
coolsnowwolf
3a31a9cf67 feeds.conf.default: swtich to custom telephony feeds 2024-10-30 16:06:27 +08:00
coolsnowwolf
3f0ed51973 ath10k-ct: fix build with arm/mips 2024-10-30 15:54:28 +08:00
coolsnowwolf
e40fe43e49 gpio-nct5104d: fix kernel 6.x build 2024-10-30 15:03:38 +08:00
coolsnowwolf
906045201f tools/libtool: bump to 2.4.6 2024-10-30 11:57:42 +08:00
coolsnowwolf
35cc3202be luci-app-spdmodem: remove spdmodem package 2024-10-30 11:19:26 +08:00
coolsnowwolf
2d97f3db67 sprd_pcie: remove package in replace of kernel buildin 2024-10-30 11:18:34 +08:00
coolsnowwolf
b926a6f9cb rockchip: refresh uboot devices config
Fixes: #12621
2024-10-30 10:36:28 +08:00
coolsnowwolf
a82c6fd5f9 drm-nouveau: fix build with kernel 6.x 2024-10-29 20:25:38 +08:00
coolsnowwolf
a091a96c87 hostapd: always enable nl80211 driver support 2024-10-29 15:45:10 +08:00
coolsnowwolf
7e49db2e33 ddns-scripts_dnspod: update with luci upstream 2024-10-29 03:31:19 +08:00
coolsnowwolf
68d77afcac ddns-scripts_aliyun: update with luci upstream 2024-10-29 03:23:43 +08:00
Daniel Golle
b1684789ed mediatek: mt7988: add DT entries for WED
Add memory regions and devices used for wireless offloading to the
device tree for MT7988.

This allows using WED on devices with MT7988 SoC and MT7995E, MT7996E or
MT7992E wireless controllers.

Devices with 4 GiB of RAM (or more) will still need ajustments to avoid
running out of swiotlb entries.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-28 10:06:12 +08:00
Daniel Golle
e1b895b3cb generic: mtk_wed: fix path of MT7988 WO firmware
commit eee3c695f3 ("linux-firmware: add offloading firmware for MT7988")
added mt7988_wo_{0,1}.bin in the 'mediatek/mt7988' directory while driver
currently expects the files in the 'mediatek' directory.

Import pending patch which changes the path in the driver header now
that the firmware has been added.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-28 10:05:19 +08:00
Daniel Golle
e0f6d6b7ea kernel: add MultiPath TCP diag kernel module
Add INET diag socket monitoring interface module for MultiPath TCP.
It allows using native Linux socket diagnostic tools such as 'ss' for
Multipath TCP connections.

Co-authored-by: Rodrigo B. de Sousa Martins <rodrigo.sousa.577@gmail.com>
Signed-off-by: sKy King <29267720+sKyissKy@users.noreply.github.com>
Link: https://github.com/openwrt/openwrt/pull/12884
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-27 06:52:18 +08:00
Daniel Golle
33cec3d343 kernel: enable Multi-Path TCP for !SMALL_FLASH targets
Expose Kernel's CONFIG_MPTCP option and enable it by default for
!SMALL_FLASH targets.

The idea behind enabling it by default is to allow users of the binary
distribution to make use of MPTCP tunneling for link aggregation.

Using MPTCP for link aggregation is an often discussed topic in the
forum and there is even a whole OpenWrt fork (MPTCPRouter) just for that.

Enabling the kernel-side of the story by default will allow using MPTCP
on vanilla OpenWrt without having to build anything from source.

See also https://openwrt.org/docs/guide-user/network/mptcp

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-27 06:51:53 +08:00
coolsnowwolf
b84bb53053 luci-app-leigod-acc: fix zh_Hans with luci js i18n 2024-10-27 06:48:17 +08:00
coolsnowwolf
17e8a30dbc Version: Celebrate 24/1024 Programmers Day 2024-10-27 06:22:32 +08:00
coolsnowwolf
e5706cfa80 linux-firmware: add offloading firmware for MT7988 2024-10-27 05:19:28 +08:00
coolsnowwolf
2f58aa6006 Version update to R24.10.1 2024-10-26 18:40:06 +08:00
Stefan Lippers-Hollmann
6969af9b5e linux-firmware: Update to version 20241017
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-26 18:36:06 +08:00
Tianling Shen
02c320a0cf
mediatek: minor fixes for openembed som7981 (#12598)
Signed-off-by: Tianling Shen <i@cnsztl.eu.org>
2024-10-25 21:20:26 +08:00
aiamadeus
972664bd05 Revert "kernel: bump 6.1 to 6.1.111"
This reverts commit 718ac376b9.
2024-10-25 21:00:16 +08:00
Beginner
ce88975693
kernel: bump 6.6 to 6.6.58 (#12593) 2024-10-24 22:16:05 +08:00
aiamadeus
3a4c5001b3 rockchip: move rk3328 dmc node to dtsi 2024-10-23 21:20:08 +08:00
coolsnowwolf
9a93c4cc0c rockchip: add OrangePi 5 Plus support 2024-10-23 00:05:28 +08:00
coolsnowwolf
cf4723548d rockchip: add OrangePi 5 support 2024-10-22 23:53:51 +08:00
coolsnowwolf
f0f8f53e51 rockchip: add FriendlyElec NanoPi R3S support 2024-10-22 23:41:31 +08:00
aiamadeus
9f65b6fb9e rockchip: add seewo srcm3588/expand support 2024-10-22 23:26:26 +08:00
coolsnowwolf
2eb18369f8 rockchip: add FriendlyARM NanoPi/PC devices 2024-10-22 10:36:06 +08:00
aiamadeus
2c463fa4fb uboot-rockchip: update to version 2024.10
Fixes: #12572
2024-10-22 10:18:10 +08:00
coolsnowwolf
d1ef46c5dd autocore: add getCPUUsage for ubus reading 2024-10-21 21:26:18 +08:00
coolsnowwolf
cb77f7a857 ipq-wifi: update to latest version 2024-10-08 2024-10-21 10:14:24 +08:00
Beginner
e325c0a2db
kernel: bump 6.6 to 6.6.57 (#12556) 2024-10-20 18:20:19 +08:00
coolsnowwolf
f1b0e6c52e qualcommax: net: QCA NSS MCS support 2024-10-20 15:12:48 +08:00
Daniel Golle
b3eded6f1c generic: phy: aquantia: move accepted patches to backport-6.6
Move patches accepted upstream from pending-6.6 to backport-6.6.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-19 21:29:16 +08:00
Daniel Golle
151296d52b generic: phy: aquantia: add pending patch to force MDI pair order
Import pending patch to force MDI pair order.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-19 21:28:07 +08:00
coolsnowwolf
eaa043c4cf mediatek: Add support for GL.iNet X3000 (Spitz AX) and XE3000 (Puli AX) 2024-10-18 17:33:52 +08:00
喵二
b9910de8d9
luci-app-leigod-acc: add scheduled pause (#12404)
* Leigod-Acc: Add Scheduled Pause

* luci-app-leigod-acc: add scheduled pause

---------

Co-authored-by: 喵二 <2860950766@qq.com>
2024-10-18 16:44:42 +08:00
coolsnowwolf
28e2e4d04a autocore: fix tempinfo path 2024-10-18 15:10:00 +08:00
coolsnowwolf
e2ebf13c36 Version update to R24.10.24 2024-10-17 21:24:12 +08:00
coolsnowwolf
3f4f0ccac9 autocore: implement tempinfo display for luci js 2024-10-17 19:26:28 +08:00
coolsnowwolf
b7cf62b3a8 base-files: improve Luci2 js support 2024-10-17 19:05:31 +08:00
Hauke Mehrtens
8f378b3297 base-files: failsafe: Remove the VLAN modifier from interface name
Some interfaces have a VLAN modifier like :t in lan1:t, this modifier
should be removed from the interface before calling preinit_ip_config().

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-17 17:22:09 +08:00
Arınç ÜNAL
05979aadf6 base-files: add protocol ncm support for ucidef_set_interface()
Make it possible to set up a default network (interface) for devices with
cellular modems using NCM.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
2024-10-17 17:19:39 +08:00
coolsnowwolf
2757124d34 procd: move service command to procd 2024-10-17 17:12:14 +08:00
coolsnowwolf
9f40de14ca base-files: simplify restorecon logic 2024-10-17 17:04:21 +08:00
coolsnowwolf
8527c75281 base-files: ipcalc.sh: check for params before calculating start/end 2024-10-17 16:51:29 +08:00
coolsnowwolf
864e344469 base-files: stage2: add 'tail' to sysupgrade environment 2024-10-17 16:46:31 +08:00
coolsnowwolf
1175c829e6 base-files: rework mtd_get_mac_text() 2024-10-17 16:34:38 +08:00
Luiz Angelo Daros de Luca
1627fd2c74 base-files: bring up vlan interface too
Vlan subinterface was never brought up when using vlan-based preinit network.
Tested forcing ifname="" before preinit_ip() on a Tp-Link Archer C5v4.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2024-10-17 16:09:49 +08:00
Mark Baker
508dd96b84 base-files: add support for retrieving IPv6 assignments
In DHCPv6-PD enabled environments, addresses are assigned to interfaces.
These new functions retrieve the IPv6 assigned prefix(es).

Signed-off-by: Mark Baker <mark@vpost.net>
2024-10-17 16:06:09 +08:00
Karel Kočí
1c2a7462df base-files: fix enabled for services with only STOP
There are services that have only STOP value set. They are executed only
on shutdown and it is common to use them for system cleanup. There is
one such service shipped directly with base-files, it is 'umount'. Those
work the same way as those with START but enabled does not report them
as enabled although it should have as they can be enabled and disabled
as any other service.

This also changes check from check for executable to check for symbolic
link. The implementation depends on those being links to service file
and it is much cleaner and direct to check for them being links.

Signed-off-by: Karel Kočí <karel.koci@nic.cz>
2024-10-17 16:03:37 +08:00
Florian Eckert
bd8d34909d base-files: fix service_running check
The following command checks if a instance of a service is running.
/etc/init.d/<service> running <instance>

 In the variable `$@`, which is passed to the function
`service_running`, the first argument is always the `instance` which
should be checked. Because all other variables where removed from `$@`
with `shift`.

Before this change the first argument of `$@` was set to the `$service`
Variable. So the function does not work as expected. The `$service`
variable was always the instance which should be checked. This is not
what we want.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Reviewed-by: Sungbo Eo <mans0n@gorani.run>
2024-10-17 16:02:48 +08:00
Florian Eckert
b498e0ac33 base-files: add wrapper for procd service list command
A service managed by procd does have a json object with usefull information.
This information could by dumped with the following command.

ubus call service list "{ 'verbose':true, 'name': '<service-name>)'". }"

This line is long and complicated to enter. This commit adds a wrapper
call to the procd service section tool to simplify the input and get the
output faster.

We could now enter the command /etc/initd/<service> info to get the info
faster.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-10-17 16:01:07 +08:00
Alexey Smirnov
98b97c58f2 base-files: add support for heartbeat led trigger
This patch adds support for creation heartbeat led trigger with,
for example, this command:

	ucidef_set_led_heartbeat "..." "..." "..."

from /etc/board.d/01_leds.

Signed-off-by: Alexey Smirnov <s.alexey@gmail.com>
2024-10-17 15:42:50 +08:00
Olliver Schinagl
8f7e660d4d base-files: LED/trigger/heartbeat: Add support for inversion
The heartbeat trigger has the option to be inverted, however
openwrt/uci/luci have no way to set this.

This patch adds this support.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2024-10-17 15:39:53 +08:00
Olliver Schinagl
cf0d45e534 base-files: LED/gpio: Ensure inverted is read as a boolean
The sysfs interface for the GPIO takes a boolean value. Ensure we get
one from uci.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2024-10-17 15:39:13 +08:00
Mark Mentovai
a4c100df52 failsafe: run on all consoles listed in /proc/cmdline
On x86, when both CONFIG_GRUB_CONSOLE and CONFIG_GRUB_SERIAL are set (as
they are by default), the kernel command line will have two console=
entries, such as

    console=tty0 console=ttyS0,115200n8

Failsafe was only running a shell on the first defined console, the VGA
console. This is a problem for devices like apu2, where there is only a
serial console and it appears on ttyS0.

Moreover, the console prompt to enter failsafe during boot was delivered
to, and its input read from, the last console= on the kernel command
line. So while the failsafe shell was on the first defined console, only
the last defined console could be used to enter failsafe during boot.

In contrast, the x86 bootloader (GRUB) operates on both the serial
console and the VGA console by virtue of "terminal_{input,output}
console serial". GRUB also provided an alternate means to enter failsafe
from either console. The presence of two console= kernel command line
parameters causes kernel messages to be delivered to both. Under normal
operation (not failsafe), procd runs login in accordance with inittab,
which on x86 specifies ttyS0, hvc0, and tty1, allowing login through any
of serial, hypervisor, or VGA console. Thus, serial access was
consistently available on x86 devices with serial consoles under normal
operation, except for shell access in failsafe mode (without editing the
kernel command line).

By presenting the failsafe prompt, reading failsafe prompt input, and
running failsafe shells on all consoles listed in /proc/cmdline,
failsafe mode will work correctly on devices with a serial console (like
apu2), and the same image without any need for reconfiguration can be
shared by devices with the more traditional (for x86) VGA console. This
improvement should benefit any system with multiple console= arguments,
including x86 and bcm27xx (Raspberry Pi).

Signed-off-by: Mark Mentovai <mark at moxienet.com>
2024-10-17 15:07:03 +08:00
Matthias Schiffer
75663fdd70 base-files: fix merge of passwd/shadow/group lines with trailing colons
Empty trailing fields get lost when the lines are split and merged again
at colons, resulting in unparsable entries. Only use the split fields for
matching against the other file, but emit the original line unchanged
to fix the issue.

Fixes: de7ca7dafadf ("base-files: merge /etc/passwd et al at sysupgrade config restore")
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
2024-10-17 15:03:52 +08:00
Shiji Yang
a4b597b221 base-files: support parse DT LED color and function
The 'label' property in led node has been deprecated and we'd better
to avoid using it. This patch allows us to extract DT OF LED name
from the newly introduced LED properties "color", "function" and
"function-enumerator".

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-10-17 15:00:48 +08:00
Philip Prindeville
1172e4c4b6 busybox: preserve crontabs
/etc/syslog.conf is used by sysklogd, and /etc/crontabs is used
by crond, both features of busybox.  Given this, ownership for
these files should be bound to busybox, especially if one day
there's a way to do an in-place opkg update of busybox.

There's also the busybox provided syslogd which uses this file
if CONFIG_BUSYBOX_FEATURE_SYSLOGD_CFG is set.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2024-10-17 14:54:38 +08:00
Tony Ambardar
da4a165063 base-files: enable BPF JIT kallsyms by default
Set net.core.bpf_jit_kallsyms=1 in /etc/sysctl.d/10-default.conf.

For privileged users, this exports addresses of JIT-compiled programs to
appear in /proc/kallsyms when present, allowing their use for debugging
and in traces.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2024-10-17 14:53:07 +08:00
David Bauer
1af9ce7777 base-files: allow ignoring minor compat-version check
Downstream projects might re-generate device-specific configuration
based on OpenWrt's defaults on each upgrade, thus being unaffected by
forward- as well as backwards-breaking configuration.

Add a new sysupgrade parameter, which allows sysupgrades between minor
compat-versions. Upgrades will still fail upon mismatching major compat
versions.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-10-17 14:47:58 +08:00
Andre Heider
f6243f2bb4 base-files: add 'isup' to the wifi script
This is a silent command that allows easy wifi up/down automation for
scripts.

It takes one or multiple devices as arguments (or all if none are passed),
and the exit code indicates if any of those is not up.

E.g.:
wifi isup && echo "all wifi devices are up"
wifi isup radio0 || echo "this wifi is down"

Signed-off-by: Andre Heider <a.heider@gmail.com>
2024-10-17 14:46:48 +08:00
coolsnowwolf
68e1f16060 rockchip: sync kernel 6.x with upstream 2024-10-17 11:20:08 +08:00
coolsnowwolf
21bbc6fbed ipq807x: add support for Aliyun AP8220 2024-10-16 23:10:43 +08:00
aiamadeus
fd1b694242 rockchip: 6.6: fixes rk3568 pcie msi issue 2024-10-16 21:18:28 +08:00
coolsnowwolf
4f77bbc4a4 uboot-rockchip: refresh rk3399 devices config
Fixes: #12538
2024-10-15 19:40:18 +08:00
Mieczyslaw Nalewaj
339673597b kernel: rtl8367b: store chip in smi->rtl8367b_chip
Store the chip type in smi->rtl8367b_chip, fix #12537

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-14 23:10:21 +08:00
coolsnowwolf
3f4efb6c4f rockchip: fix some devices support
Fixes: #12533
2024-10-13 21:36:06 +08:00
Beginner
ecaf84009c
kernel: bump 6.6 to 6.6.56 (#12530) 2024-10-12 10:10:41 +08:00
Robert Marko
0b75ecd310 generic: 5.15: add Winbond W25N01KV support
It seems that some Xiaomi AX3000T boards changed to using Winbond W25N01KV
SPI-NAND which is not supported in OpenWrt 23.05 but only in main.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-12 10:01:05 +08:00
Daniel Golle
2d6568c5d4 generic: 6.6: backport pending fix for Aquantia PHY LEDs
The 'active-low' property was not applied correctly and two fixes
are required to make inverted LEDs work as expected.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-10-11 22:16:03 +08:00
coolsnowwolf
1c8d69465e README.md: drop python2 as build environment requirement 2024-10-10 00:52:09 +08:00
Mieczyslaw Nalewaj
57abb30ed3 generic: mtd: winbond: more serial NAND flash types
Add support for W25N01JW, W25N02JWZEIF, W25N512GW, W25N02KWZEIR and W25N01GWZEIG.
Add support for W25N04KV.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-09 22:20:09 +08:00
Tianling Shen
8061c8b8f9
mediatek: add support for OpenEmbed SOM7981 (#12524)
* kernel: crypto: add atmel i2c hw accelerator support

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>

* kernel: add led act/polarity select for rtl8221 phy

Signed-off-by: Tianling Shen <cnsztl@gmail.com>

* mediatek: add support for OpenEmbed SOM7981

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 256 MiB SPI-NAND
  RAM: 0.5/1 GB DDR4
  Ethernet: 1x 1GbE, 1x 2.5GbE (RTL8221B)
  WiFi: MediaTek MT7976C
  USB: 1x M.2 B-Key
  GPIO: 26-Pin header
  UART: 6 GND, 8 TX, 10 RX (in Pin header)
  Button: Reset

Installation:
The board comes with a third-party custom OpenWrt image, you can upload
sysupgrade image via LuCI directly WITHOUT keeping configurations.

Or power on the board with pressing reset button for 5 second, then visit
http://192.168.1.1 and upload -factory.bin firmware.

Signed-off-by: Tianling Shen <cnsztl@gmail.com>

---------

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2024-10-08 19:42:37 +08:00
coolsnowwolf
9a4a925205 generic: add missing kernel config 2024-10-06 22:08:18 +08:00
Beginner
6df0b2d9f4
kernel: bump 6.6 to 6.6.54 (#12519) 2024-10-05 01:55:15 +08:00
John Audia
ff581ad03b x86: generic: 6.6: refresh config
Add CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y which was introduced
back in April of this year[1]

1. ce0abef6a1

Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-10-04 23:08:10 +08:00
coolsnowwolf
af37c0ffb4 atf-rockchip: update rk3568 support 2024-10-03 22:00:09 +08:00
aiamadeus
c54f4958dc r8152: add support for r8157 2024-10-02 23:00:03 +08:00
coolsnowwolf
b99d532315 kernel: bump 5.4 to 5.4.284 2024-10-01 14:11:04 +08:00
Beginner
d1ebc2ca7d
kernel: bump 6.6 to 6.6.53 (#12509) 2024-10-01 12:25:04 +08:00
Beginner
1a1b7da30d
kernel: bump 6.1 to 6.1.112 (#12510) 2024-10-01 12:20:19 +08:00
coolsnowwolf
fac34a2dfe rockchip: sync upstream 6.6 source code 2024-09-30 10:38:28 +08:00
coolsnowwolf
55b08d2052 bcm27xx: fix linux 6.1 compile issues 2024-09-29 18:54:51 +08:00
syb999
02f936358c usb-audio: add kernel 6.6 dependency 2024-09-28 20:09:39 +08:00
Oskari Lemmela
91b20eaedb kernel: netdevices: add dsa support
Add support for building DSA switch drivers as kernel modules.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-27 19:15:22 +08:00
Oskari Lemmela
42d626f8d8 kernel: netdevices: add leds support
Compile LED support to swconfig and phy modules

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-26 23:27:17 +08:00
Oskari Lemmela
d51d4477e3 kernel: netdevices: add phy modules
Add support for building multiple phy drivers as kernel modules

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-26 23:25:22 +08:00
Oskari Lemmela
6ca5e85514 kernel: modules: add irq support for pca953x
Enable interrupt controller support for PCA953x kernel module

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-26 23:21:06 +08:00
coolsnowwolf
a75453bbc9 rtw88-usb: fix rtw8703b build with kernel 6.6+ 2024-09-25 15:39:42 +08:00
coolsnowwolf
297d4adf02 Update README_EN.md 2024-09-25 13:39:22 +08:00
coolsnowwolf
af5276890c README.md: update Armsom Sige Board series info 2024-09-24 16:40:57 +08:00
coolsnowwolf
3d47ebac7b rockchip: add ArmSoM Sige7 (RK3588 ARM64 8 cores) support 2024-09-24 15:15:27 +08:00
Hauke Mehrtens
90131838f3 linux-firmware: Update to version 20240909
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-23 19:38:19 +08:00
Chuanhong Guo
0dc62d9d8b siflower: new target for Siflower SF19A2890
Siflower SF19A2890 is an SoC with:
Dual-core MIPS InterAptiv at 800MHz
DDR3 controller
One Gigabit Ethernet MAC with RGMII and IPv4 HNAT engine
Built-in 2x2 11N + 2x2 11AC WiFi radio
USB 2.0 OTG
I2C/SPI/GPIO and various other peripherals

This adds support for SF19A2890 EVB with ethernet support.

EVB spec:
Memory: DDR3 128M
Ethernet: RTL8367RB 5-port gigabit switch
Flash: 16M NOR
Others: MicroUSB OTG, LED x 1, Reset button x1

The built image can be flashed using u-boot recovery.

This target is marked as source-only until support for a commercial
router board comes.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2024-09-22 23:25:18 +08:00
Chuanhong Guo
a5d881f3a3 package: busybox: disable mips16 on hard-float
The busybox built with mips16 enabled has broken seq command.
Disassembling shows that the call to hard-float strtod in mips16
code is generated without the __call_stub_fp.

As a result, strtod returns the result in float point registers
while the calling mips16 code expect the result in v0/v1.

Disable mips16 on hard-float targets for now. The built .ipk goes
from 213316 bytes to 251419 bytes.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2024-09-22 23:21:02 +08:00
coolsnowwolf
5ea6cb7c37 rockchip: backport driver updates for rk3588 2024-09-21 17:22:54 +08:00
aiamadeus
801f345131 kernel: refresh 6.1 patches
Fixes: 718ac37 ("kernel: bump 6.1 to 6.1.111")
Closed: #12487
2024-09-21 15:16:16 +08:00
coolsnowwolf
6dc420855a kernel: bump 6.6 to 6.6.52 2024-09-19 22:24:09 +08:00
coolsnowwolf
718ac376b9 kernel: bump 6.1 to 6.1.111 2024-09-19 22:14:36 +08:00
John Audia
6da40576e0 kernel: bump 6.6 to 6.6.51 (#16370)
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.51

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-09-19 15:10:28 +08:00
coolsnowwolf
fa54bfe3db rockchip: fixes r8125 nic support 2024-09-19 15:06:09 +08:00
coolsnowwolf
53661b6a15 rockchip: add RUMU3F FINE 3399 support 2024-09-18 17:14:00 +08:00
coolsnowwolf
92d4a09c0a Version update to R24.9.18 2024-09-18 17:01:32 +08:00
coolsnowwolf
dc8ed6a7bd rockchip: switch to kernel 6.6 2024-09-18 15:08:32 +08:00
coolsnowwolf
2ad20218e5 uboot-rockchip: add ArmSoM Sige7 support 2024-09-18 15:01:54 +08:00
coolsnowwolf
98e2f0b48b rockchip: add ArmSom Sige3 RK3568 (ARM64 4 cores) support 2024-09-18 14:05:09 +08:00
aiamadeus
3aad94cd07 r8125/r8126: conflicts with rss 2024-09-16 23:30:30 +08:00
coolsnowwolf
a3ca5c60f0 rkbin: remove tfa references
Fixes: #12465
This is closed source, no need.
2024-09-15 19:10:21 +08:00
Ivan Pavlov
a45c291927 openssl: update to 3.0.15
OpenSSL 3.0.15 is a security patch release.
The most severe CVE fixed in this release is Moderate.

This release incorporates the following bug fixes and mitigations:

  * Fixed possible denial of service in X.509 name checks (CVE-2024-6119)

  * Fixed possible buffer overread in SSL_select_next_proto() (CVE-2024-5535)

Added github releases url as source mirror

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-15 19:00:05 +08:00
Chuanhong Guo
dcb074e9d3 ipset: update to version 7.21
release notes:
7.21: https://www.spinics.net/lists/netfilter-devel/msg85299.html
7.20: https://www.spinics.net/lists/netfilter-devel/msg85120.html
7.19: https://www.spinics.net/lists/netfilter-devel/msg82985.html

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2024-09-14 22:20:16 +08:00
Chuanhong Guo
6d659cd7fd ipset: include libgen.h for basename
musl dropped the GNU version of basename prototype from string.h
in 1.2.5.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2024-09-14 22:16:29 +08:00
coolsnowwolf
136890c672 Update README.md for macOS 2024-09-13 22:02:26 +08:00
aiamadeus
49910e1e4c generic: refresh kernel 6.6 patches 2024-09-12 23:00:10 +08:00
John Audia
530265022e kernel: bump 6.6 to 6.6.50 (#16351)
All patch automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-09-12 22:40:09 +08:00
coolsnowwolf
c9c95be315 uboot-rockchip: update rkbin dependencies 2024-09-11 22:16:08 +08:00
coolsnowwolf
95c79b7036 atf-rockchip: add support for rk3568/rk3588 2024-09-11 22:10:12 +08:00
aiamadeus
9fcac0612c rockchip: rk-rng: simplify with dev_err_probe 2024-09-10 22:36:05 +08:00
aiamadeus
eb08cc889a rockchip: improve some rk3528 devices support
- Fixes reboot issues with radxa e20c
  - Enable ssd1306 for mangopi-m28k pro
2024-09-10 22:30:21 +08:00
Zheng Zhang
0c35082a17 mediatek: fix wed use-after-free kernel panic
Fix a use-after-free bug in mtk_wed_setup_tc_block_cb()
which leads to kernel panic when setup multiple ap
interfaces on one band of mt798x.

Signed-off-by: Zheng Zhang <everything411@qq.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-09-09 23:36:05 +08:00
Álvaro Fernández Rojas
83273215e8 generic: 6.6: backport upstream r8169 patches
- improve RTL8411b phy-down fixup
- remove not needed check in rtl_fw_write_firmware
- remove multicast filter limit
- improve handling task scheduling
- simplify EEE handling
- simplify code by using core-provided pcpu stats allocation
- add generic rtl_set_eee_txidle_timer function
- support setting the EEE tx idle timer on RTL8168h
- add support for returning tx_lpi_timer in ethtool get_eee
- annotate writes on dev->mtu from ndo_change_mtu()
- disable interrupt source RxOverflow
- remove detection of chip version 11 (early RTL8168b)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-09-08 22:08:04 +08:00
Álvaro Fernández Rojas
821b80c796 generic: 6.6: backport upstream Realtek PHY patch
- Fix setting of PHY LEDs Mode B bit on RTL8211F.
- Rename pending Realtek PHY patches.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-09-07 21:16:17 +08:00
Álvaro Fernández Rojas
92ccb72981 generic: 6.6: backport realtek phy patches from 6.11
- add support for rtl8224 2.5Gbps PHY
- add support for PHY LEDs on RTL8211F

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-09-06 23:28:22 +08:00
Álvaro Fernández Rojas
bbe8198ea5 generic: 6.6: backport upstream RealTek PHY patches
Replace downstream RealTek PHY patches with backported ones.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-09-05 22:00:09 +08:00
coolsnowwolf
9ed955ab9b ramips: mt7621: improve Huasifei MT7621 DTU support 2024-09-04 21:16:08 +08:00
coolsnowwolf
0736e2feec x86: add support for iKOOLCORE R2 Max 2024-09-03 23:28:18 +08:00
Florian Eckert
68828f1f80 kernel: usb: remove deprecated option
The Kconfig option 'CONFIG_USB_XHCI_HCD_DEBUGGING' has been removed with the
following commit upstream in the Linux kernel.

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b2497509df002e9a09c8550cd0ecd2f77c9640d8

This Kconfig option is therefore no longer valid for the kernel version
5.4 and could be removed.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-09-02 23:01:08 +08:00
Til Kaiser
7b3297e6ad generic: 6.x: add missing DCB symbols
Disables Data Center Bridging support for some network drivers by
default to avoid compilation errors when CONFIG_DCB is enabled.

Signed-off-by: Til Kaiser <mail@tk154.de>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-09-01 23:00:28 +08:00
Robert Marko
740b33dd7c generic: filter out CONFIG_FRAME_WARN
CONFIG_FRAME_WARN value is set by config/Config-kernel.in based on the
target type dynamically since commit:
16a2051 ("kernel: Set CONFIG_FRAME_WARN depending on target").

However, CONFIG_FRAME_WARN was not set to get filtered out so it ended up
in multiple target configs during refreshes.
So, lets filter out CONFIG_FRAME_WARN as its set dynamically to prevent it
ending up in more target configs.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2024-08-31 23:30:09 +08:00
Mieczyslaw Nalewaj
09375a2f7b kernel: rtl8367b: remove rlvid analysis
Remove the rlvid analysis because for the rtl8367b family chips supported
by the driver (rtl8367rb and rtl8367r-vb), rlvid is always equal to 1.
So the code for rlvid equal to 0 is completely unnecessary.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-08-30 22:36:21 +08:00
aiamadeus
3c9bacd390 rockchip: backport 6.11 rk3568 gpufreq fix
Some cost down devices require this fixes.
2024-08-29 23:02:29 +08:00
Robert Marko
3e637c9fc8 generic: 6.6: add Winbond W25N01KV support
It seems that some Xiaomi AX3000T boards changed to using Winbond W25N01KV
SPI-NAND which is not supported in OpenWrt nor upstream kernel.

So, add a pending patch to support it as upstream supports rest of the KV
revision models.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-08-28 22:40:20 +08:00
Daniel Pawlik
2fdd47aff0 mt76: Add firmware files into mt7925 package
The firmware binaries were missing in kmod-mt7925-firmware package.
There was a typo done for mt7925e and mt7925u in the KernelPackage
definitions, which caused the system to load the wrong kernel modules.

Signed-off-by: Daniel Pawlik <pawlik.dan@gmail.com>
2024-08-27 21:30:15 +08:00
aiamadeus
4f9d051c8e package: add driver for aic8800 sdio wifi 2024-08-27 20:02:21 +08:00
aiamadeus
6c15bad147 rockchip: add some rk3528 devices support 2024-08-26 22:30:18 +08:00
aiamadeus
be32bce9df rockchip: add basic support for RK3528(A)
RK3528 is a cost down SoC with high CPU performance.
However, it has poor PCIe performance (same for RK3576).
Also CPU 0/1 can't get any rest due to rkbin limitation.

Some code references: https://github.com/warpme/minimyth2
2024-08-26 20:10:04 +08:00
coolsnowwolf
6149067618 armbian-firmware: add bcm sdio fw package 2024-08-25 22:38:09 +08:00
coolsnowwolf
d856657965 generic: kernel 6.6: fixes thermal driver 2024-08-25 22:30:13 +08:00
coolsnowwolf
166b4bd84e mediatek: add missing wifi for hf-m7986r1 2024-08-23 23:15:19 +08:00
coolsnowwolf
fd25a03bef uboot-rk35xx: add new package for rk3528 2024-08-23 23:10:29 +08:00
aiamadeus
12641b1ce1 rockchip: refresh rk3568 devices support 2024-08-22 21:38:26 +08:00
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
68ec0da1d5 package: add kmod-r8126 ethernet driver
r8126 is an out of tree driver provided by Realtek for RTL8126 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[Refresh our patch, disable aspm]
Signed-off-by: AnYun <amadeus@openjmu.xyz>
2024-08-21 20:53:10 +08:00
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
b53ecbb75a package: add kmod-r8125 ethernet driver
r8125 is an out of tree driver provided by Realtek for RTL8125 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[Refresh our patch, disable aspm]
Signed-off-by: AnYun <amadeus@openjmu.xyz>
2024-08-21 20:50:16 +08:00
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
0061cb8a1f package: add kmod-r8168 ethernet driver
r8168 is an out of tree driver provided by Realtek for RTL8168 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
[Refresh our patch]
Signed-off-by: AnYun <amadeus@openjmu.xyz>
2024-08-21 20:40:21 +08:00
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
1ba4b04f46 package: add kmod-r8101 ethernet driver
r8101 is an out of tree driver provided by Realtek for RTL8101 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-08-21 20:28:36 +08:00
aiamadeus
6da30838ca rockchip: add support for Radxa ROCK 3C 2024-08-20 23:30:23 +08:00
aiamadeus
c35bad3287 ipq40xx: use old upgrade scripts for asus ac42u/ac58u 2024-08-18 23:40:24 +08:00
aakkll
a6c9d54925 kernel: bump 6.6 to 6.6.46 and update config (#12413) 2024-08-17 18:40:01 +08:00
coolsnowwolf
a66cf5fe24 rockchip: fixes build for rk3328 and rk3399 devices 2024-08-15 23:50:23 +08:00
coolsnowwolf
d3bc57db55 arm-trusted-firmware-rockchip-vendor: rename to rkbin 2024-08-15 22:38:35 +08:00
coolsnowwolf
793679209f arm-trusted-firmware-rockchip-vendor: bump to latest git HEAD 2024-08-13 23:05:26 +08:00
coolsnowwolf
26a04de18b ramips: add Huasifei MT7621 DTU network and wwan cpe settings 2024-08-12 16:52:24 +08:00
coolsnowwolf
912cb4bdc1 sendat: add AT Commnad package 2024-08-12 16:30:47 +08:00
coolsnowwolf
6df7d6894f ramips: add Huasifei MT7621 DTU support 2024-08-11 15:22:19 +08:00
Mieczyslaw Nalewaj
9cb68c2e60 kernel: 6.6: modules: lan743x: add missing dependency
Fix error: Package kmod-lan743x is missing dependencies
for the following libraries: fixed_phy.ko

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-08-10 23:16:08 +08:00
left_left
2593995b8e autocore: fix CPU usage display with procps (#12399) 2024-08-09 21:40:05 +08:00
coolsnowwolf
3341f523c2 update default packages for filogic and ipq60xx, x86
Fixes: #12388
2024-08-08 22:08:37 +08:00
coolsnowwolf
bb208b0974 rockchip: add ScenSmart SV901 EAIO Replica Board support 2024-08-07 21:30:26 +08:00
coolsnowwolf
1640f5708e Revert "luci-app-leigod-acc: add scheduled pause (#12378)"
This reverts commit 33188e1cc5.
2024-08-06 00:25:46 +08:00
Stijn Tintel
bb839963b1 kernel: add missing BTF symbol for 6.6
Enabling KERNEL_DEBUG_INFO_BTF and KERNEL_KPROBE_EVENTS on 6.6 exposes
CONFIG_PROBE_EVENTS_BTF_ARGS in the kernel config. Add a build option
for it to fix build failures with KERNEL_DEBUG_INFO_BTF and
KERNEL_KPROBE_EVENTS enabled on targets using the 6.6 kernel.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2024-08-05 22:50:11 +08:00
Marek Behún
2c6595fa43 gpio-button-hotplug: add vendor button
Handle the KEY_VENDOR key in gpio-button-hotplug driver.
This is used by Turris Omnia.

Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-08-04 23:35:33 +08:00
aiamadeus
d0aedf02ff libcryptopp: rewrite compilation process
This makes it easier to upgrade version.
Fixes: #12380
2024-08-03 23:50:08 +08:00
喵二
33188e1cc5
luci-app-leigod-acc: add scheduled pause (#12378) 2024-08-02 22:10:06 +08:00
coolsnowwolf
0d4e0de6a1 luci-app-leigod-acc: add tun mode support 2024-08-02 16:37:53 +08:00
喵二
e53905ae41
leigod-acc: fix typo and add conntrack depends (#12376)
* Update: Leigod Acc

* Update: Leigod Acc Depends conntrackd

* fix: zh-cn

* Update leigo-acc.po

---------

Co-authored-by: coolsnowwolf <31687149+coolsnowwolf@users.noreply.github.com>
2024-08-02 01:49:26 +08:00
coolsnowwolf
e958c5f2b3 leigod-acc: add Leigod Game Accelerater package and luci 2024-08-01 18:32:40 +08:00
coolsnowwolf
576235b0f1 phy-aquantia: fix build with 6.1.100+ 2024-08-01 11:29:55 +08:00
Álvaro Fernández Rojas
31c0baa4db generic: 6.6: backport upstream r8169 patches
Backport a bunch of upstream r8169 patches:
- RTL8168/RTL8101 LEDs support.
- RTL8126A support.
- RTL8125/RTL8126 LEDs support.
- RTL8168M support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-08-01 11:25:50 +08:00
coolsnowwolf
75c1433842 Version update to R24.8.1 2024-07-31 10:52:47 +08:00
coolsnowwolf
a5cb49ea42 autocore: fix AMD Ryzen AI 300 Series Processors CPU temp display 2024-07-31 10:52:00 +08:00
coolsnowwolf
b55f5d84a0 x86: use kernel 6.6 by default 2024-07-31 10:47:20 +08:00
coolsnowwolf
625dbc3505 linux-firmware: amd64-microcode: add AMD Ryzen AI 300 Series Processors ucode support 2024-07-31 10:46:10 +08:00
Daniel Golle
a03505e141 mediatek: fix PCIe #PERST de-asserted too early
The driver for MediaTek gen3 PCIe hosts de-asserts all reset
signals at the same time using a single register write operation.
Delay the de-assertion of the #PERST signal by 100ms as some PCIe
devices fail to come up otherwise.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-30 23:20:19 +08:00
Daniel Golle
88450c61a3 kernel: backport fixes for MTK Ethernet driver
Fix PSE port assignment for 3rd GMAC on MT7988 and make sure dma_addr
is always initialized to prevent potentially accessing uninitialized
stack memory in the error path.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-30 23:15:19 +08:00
aiamadeus
deb218ea2e generic: 6.1/6.6: remove gro improvement patch
Avoid unstable situations, closed: #12331
2024-07-29 22:06:27 +08:00
XIE Zhibang
f252f21b3d netfilter: kmod-nft-netdev: add egress support
The netdev egress hook was added in Linux kernel 5.16.

Signed-off-by: XIE Zhibang <Yeking@Red54.com>
2024-07-28 23:36:04 +08:00
Yogi Hermawan
3bbf603357
ramips: fix Bolt BL201 support (#12361)
Changes:
1. Update device baud rate.
2. Modify LED and button GPIO values and names.
3. Adjust partition layout to match the stock configuration.
4. Add missing package dependencies for USB.
5. Include device UIMAGE Magic value.
6. Revise switch layout.
7. Assign different MAC addresses.
2024-07-27 18:01:35 +08:00
coolsnowwolf
1faba8061d apk: move package to core 2024-07-26 17:00:34 +08:00
coolsnowwolf
8c14a219b1 kmod-switch-bcm53xx: fixes build on kernel 5.4 2024-07-26 16:36:04 +08:00
coolsnowwolf
5859fc60a4 config: revert to use GRUB_SERIAL 2024-07-25 20:35:07 +08:00
coolsnowwolf
ff2689bd48 mediatek: fixes kernel 5.15 build
Fixes: #12356
2024-07-24 21:30:03 +08:00
John Audia
062d85f8fd kernel: bump 6.6 to 6.6.40 (#15956)
All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-23 22:00:08 +08:00
Zxl hhyccc
f9f1a684ea kernel: bump 6.1 to 6.1.100 (#15973)
All patches automatically rebased.

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
2024-07-23 21:50:28 +08:00
coolsnowwolf
150b745250 mt76: fixes build for older kernel
Fixes: #12343
2024-07-22 20:35:30 +08:00
coolsnowwolf
2dde298ca1 config: sync with upstream source code 2024-07-22 20:32:48 +08:00
John Audia
f316dcb0a4 modules: change package definition for fb
This commit accomplishes three goals:
1. bump 6.6 to 6.6.33
2. kernel: modules: video: change package definition for fb for
   upstream changes[1]
3. kernel/multiple subtargets: add CONFIG_FB_IOMEM_FOPS=y to all
   subtargets which also set CONFIG_FB_CORE=y.

Fixes: #12344
Tested-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: John Audia <therealgraysky@proton.me>
2024-07-21 22:16:03 +08:00
aiamadeus
e7646d45d5 generic: add missing realtek phy led patches 2024-07-19 23:02:05 +08:00
aiamadeus
64b80093dd mediatek: replace mac-address-increment hack 2024-07-19 23:00:27 +08:00
秋野かえで
d4b2121ac2
config: add xdp-sockets-diag support (#12341) 2024-07-18 21:10:10 +08:00
Robert Marko
e725c6198c kernel: fix x86 compilation on macOS
Trying to compile x86 or x86_64 on macOS will fail with:
openwrt/build_dir/target-x86_64_musl/linux-x86_64/linux-6.6.36/tools/include/linux/rbtree.h:21:10: fatal error: 'linux/stddef.h' file not found

After some digging, it seems that we dropped the old 212-tools_portability
patch when 6.6 x86 support was added, then Felix added back some parts of
it in ("kernel: fix tools build breakage on macos with x86") but trying to
build x86 kernels will still fail.

So, lets add more of the required changes from the 212-tools_portability
patch so that x86 kernels build on macOS.

Fixes: 69b145188f1a ("generic: 6.6: Removal of tools_portability.patch already included in kernel 6.6")
Link: https://github.com/openwrt/openwrt/pull/15904
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-07-18 13:12:11 +08:00
John Audia
410fe9f49b kernel: bump 6.6 to 6.6.38
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.38

Removed target/linux/generic/hack-6.6/900-fix-build-to-handle-return-value.patch
which was introduced as a hacky attempt to fix an upstream issue related to 6.6.37.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/15879
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-18 13:10:24 +08:00
Rosen Penev
02c176caaf lua: fix CVE-2014-5461 (Buffer overflow)
Patch taken from Debian.

Refresh patches

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-07-15 22:06:06 +08:00
Zxl hhyccc
991451d002 kernel: bump 6.1 to 6.1.98 (#15935) 2024-07-14 23:15:14 +08:00
coolsnowwolf
665cedd251 mt76: fixes build error for mt7925
Fixes: #12328
2024-07-13 23:02:08 +08:00
Robert Marko
b3de7a9adf config: add ARM PMUv3 for kernel 6.6
Kernel 6.6 has moved the ARM PMUv3 driver to drivers/perf and now once
KERNEL_ARM_PMU is selected trying to build the kernel will stop with:
ARM PMUv3 support (ARM_PMUV3) [N/y/?] (NEW)

So, lets enable ARM_PMUV3 for ARMv7 and ARMv8 architectures if
KERNEL_PERF_EVENTS is selected.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-07-12 22:25:20 +08:00
coolsnowwolf
54ad1c5009 rockchip: fix sata support for rk3568 2024-07-11 22:20:06 +08:00
coolsnowwolf
8a8bf45736 mediatek: filogic: fix HF-M7986R1 typo 2024-07-11 22:10:15 +08:00
aiamadeus
6a9ab8e562 sunxi: backport H616 cpufreq support 2024-07-10 22:18:14 +08:00
Álvaro Fernández Rojas
33489cf2e7 linux-firmware: add RTL8126 firmware
This commit adds RTL8126 firmwares to r8169-firmware package.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-07-09 22:08:07 +08:00
coolsnowwolf
83fc42fcdb build: enable ipv6 support by default 2024-07-09 22:04:57 +08:00
Beginner
8cf859bf01
kernel: bump 5.15 to 5.15.162 (#12317) 2024-07-08 14:57:44 +08:00
Daniel Golle
e693552f7f generic: 6.6: mtk_eth_soc: import accepted patches
Import two imported patches accepted upstream.
Move from pending:
 - net: ethernet: mtk_eth_soc: implement .{get,set}_pauseparam ethtool ops

Initial import:
 - net: ethernet: mtk_ppe: Change PPE entries number to 16K

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-08 11:30:46 +08:00
Daniel Golle
ded1993bd6 generic: 6.6: mtk_eth_soc: add support for flow-control settings
Add patch implementing operations to get and set flow-control link
parameters of mtk_eth_soc via ethtool.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-08 11:25:29 +08:00
coolsnowwolf
ae0e24c157 qualcommax: ipq60xx: fix squashfs configuration for emmc image 2024-07-08 10:25:16 +08:00
Martin Schiller
a0cb802ac6 generic: 6.6: backport fix for broken cmdline "nosmp" and "maxcpus=0"
This backports the fix for the broken "nosmp" and "maxcpus=0" cmdline
params.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/15811
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-07-07 22:23:24 +08:00
Qingfang Deng
adfb25ecd0 mediatek: fit: fix use of uninitialized variable
When building the kernel with -Wmaybe-uninitialized, GCC reports this
warning:

block/partitions/fit.c: In function 'parse_fit_partitions':
block/partitions/fit.c:164:3: warning: 'images' may be used uninitialized in this function [-Wmaybe-uninitialized]
  164 |   printk(KERN_ERR "FIT: Cannot find %s node: %d\n", FIT_CONFS_PATH, images);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It appears to be a copy paste error. It's the "config" variable that is
supposed to be printed.

Fixes: e6aac8d98f56 ("image: add support for building FIT image with filesystem")
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
2024-07-07 22:23:03 +08:00
Chuanhong Guo
44e17fac52 kernel: mtdsplit: fix fit rootfs_data split
fit size should be rounded up instead of rounding down first and adding
a block. Otherwise the calculated size is one block more than needed
when fit size is exactly multiples of one block size.

Fixes: 9a863f803ec1 ("kernel: mtdsplit: add support for FIT image")
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Signed-off-by: Qingfang Deng <qingfang.deng@siflower.com.cn>
2024-07-07 22:22:42 +08:00
coolsnowwolf
ca094bc318 generic: fix compilation warning for ar8xxx swconfig for kernel 5.4/5.10 2024-07-07 22:21:10 +08:00
Beginner
f3887ab8b7
kernel: bump 6.6 to 6.6.37 (#12313) 2024-07-07 17:11:27 +08:00
Beginner
6b275d3f2f
kernel: bump 6.1 to 6.1.97 (#12312) 2024-07-07 17:11:09 +08:00
Miles Poupart
87cc82ea69
autocore: add missing CPU frequency info (#12314)
Fix CPU frequency info for rockchip
2024-07-07 16:18:13 +08:00
aiamadeus
ddaa6722f4 base-files: move ntp server to default settings 2024-07-06 23:05:37 +08:00
aiamadeus
a68bae1b95 qualcommax: fixes dts part for some devices
Fixes: #12309
2024-07-06 23:02:18 +08:00
Christian Lamparter
34a261f30e firmware: intel-microcode: update to 20240531
Debian changelog:

intel-microcode (3.20240531.1) unstable; urgency=medium

  * New upstream microcode datafile 20240531
    * Fix unspecified functional issues on Pentium Silver N/J5xxx,
      Celeron N/J4xxx
    * Updated Microcodes:
      sig 0x000706a1, pf_mask 0x01, 2024-04-19, rev 0x0042, size 76800
  * source: update symlinks to reflect id of the latest release, 20240531

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-07-05 22:36:10 +08:00
Daniel Golle
cc3b73156f generic: fitblk: typo in dmesg output
Fix spelling in dmesg output during boot when using the fitblk driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-05 22:30:10 +08:00
coolsnowwolf
7ecb40bb3a quectel_QMI_WWAN: bump to v3.0-2 2024-07-04 13:47:52 +08:00
coolsnowwolf
983de37cf8 mt76: update to Git HEAD (2024-05-17) 2024-07-04 13:36:18 +08:00
coolsnowwolf
df4e307b30 mediatek: fix PWM fan on BPi-R4 for 6.1 kernel 2024-07-04 02:51:44 +08:00
coolsnowwolf
c672c2da4e Version update to R24.7.7 2024-07-04 02:48:38 +08:00
coolsnowwolf
4c5284498f autocore: add mediatek mt7988 cpufreq display 2024-07-04 02:46:17 +08:00
coolsnowwolf
c2a01cf771 mediatek: sync kernel 6.1 from upstream 2024-07-04 02:26:54 +08:00
coolsnowwolf
382d2c2e3d mediatek: filogic: fix HF-M7986R1 reset button 2024-07-04 01:11:24 +08:00
coolsnowwolf
b4fe0e2919 mediatek: filogic: add HF-M7986R1 emmc sysupgrade support 2024-07-03 20:13:09 +08:00
Sean Khan
ade3055089 f2fs-tools: Add missing 'f2fslabel' symlink
`f2fslabel` is already built into `f2fs.fsck`, but is missing its symlink
in the final package.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/15851
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-07-03 18:51:51 +08:00
coolsnowwolf
0397de1060 mt76: add MediaTek MT7996 (PCIe) support 2024-07-03 14:34:32 +08:00
coolsnowwolf
3a5a4986fa mac80211: Add EHT UL MU-MIMO flag in ieee80211_bss_conf 2024-07-03 14:27:19 +08:00
coolsnowwolf
5d1aadf436 mt76: update to Git HEAD (2024-04-19) 2024-07-03 13:42:54 +08:00
Beginner
12be5cfdd6
kernel: bump 6.1 to 6.1.96 (#12298) 2024-07-03 13:12:10 +08:00
Beginner
79c106c720
kernel: bump 6.6 to 6.6.36 (#12299) 2024-07-03 12:10:03 +08:00
coolsnowwolf
6dfcc5e782 Revert "mediatek: backport a hell of thermal commits"
This reverts commit e1132c36d9.
2024-07-02 23:31:41 +08:00
coolsnowwolf
e5017ff7ca mt76: fix linux kernel 6.1 support for mediatek 2024-07-02 15:58:53 +08:00
coolsnowwolf
e1132c36d9 mediatek: backport a hell of thermal commits 2024-07-02 15:55:07 +08:00
coolsnowwolf
b3e60d1892 generic: sync kernel 6.1 from upstream 2024-07-02 15:24:05 +08:00
coolsnowwolf
2f7ba54f99 mediatek: include fitblk package for subtargets 2024-07-02 13:44:11 +08:00
coolsnowwolf
b9b078da8e base-files: upgrade: nand.sh: mute umount error 2024-07-02 13:16:51 +08:00
coolsnowwolf
319b46b4bd base-files: recognize bootdevice on devices using fitblk 2024-07-02 13:14:41 +08:00
Daniel Golle
ea86509cd1 generic: 6.6: net: ethernet: mediatek: Allow gaps in MAC allocation
Some devices with MediaTek SoCs don't use the first but only the second
MAC in the chip. Especially with MT7981 which got a built-in 1GE PHY
connected to the second MAC this is quite common.
Make sure to reset and enable PSE also in those cases by skipping gaps
using 'continue' instead of aborting the loop using 'break'.

Fixes: 75081235b8 ("generic: 6.6: (re-)add support multiple PPE to mtk_eth_soc")
Reported-by: Daniel Suchy <danny@danysek.cz>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-02 13:02:58 +08:00
Shiji Yang
eb6cb4abf8 kernel: mtd: ubi: avoid attaching "linux,ubi" mtd again
"linux,ubi" compatible MTD device can be automatically attached early
since commit fc153aa8d94f. Therefore, there is no need to attach MTD
devices named "ubi" or "data" again.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-07-02 13:02:40 +08:00
coolsnowwolf
d0c0f941ad generic: kernel add 6.6 missing symbols 2024-07-02 13:01:05 +08:00
coolsnowwolf
f2d670b67f fstools: update to Git HEAD (2024-01-22) 2024-07-02 12:33:45 +08:00
coolsnowwolf
02b1ec2525 target: x86: add intel-microcode for Intel CPU microcode update 2024-07-02 12:26:11 +08:00
coolsnowwolf
05d2fc3d9b autocore: disable gso offload for some x86 network card hw issue 2024-07-02 12:22:58 +08:00
coolsnowwolf
4d50adb8ef mediatek: filogic: add HF-M7986R1 EMMC Version support 2024-07-02 12:09:12 +08:00
coolsnowwolf
03835617b9 cryptodev-linux: fix build with linux-5.10.220+ 2024-07-01 22:41:46 +08:00
coolsnowwolf
141a53a029 mediatek: filogic: enable HF-M7986R1 emmc support 2024-07-01 16:39:42 +08:00
Daniel Golle
08aaf074b9 mediatek: add support for BananaPi BPI-R4 board
Hardware
--------
SOC:    MediaTek MT7988A (4x Cortex-A73)
RAM:    4 GiB DDR4
Flash:  128 MiB Winbond SPI-NAND
MMC:    8 GiB eMMC *or* microSD (cannot be used both)
ETH:    4x 1GE (1x WAN, 3x LAN)
        2x SFP+ (10G, 5G, 2.5G, 1G)
USB:    on-board USB 3.2 4-port hub
        1x USB 3.2 port (type A connector)
        1x M.2 for 4G/5G modem
        2x mPCIe for additional modems
WiFi:   optional MediaTek MT7996 Wi-Fi 7 module
        (using 2x PCIe gen3 x2 on the mPCIe slots and 12V power)

Installation
------------
1. Decompress and write the sdcard image to a micro SD card and use that
to boot the R4 (both dip switches in upper position).

2. Use the bootloader menu accessible via the serial console to install
to SPI-NAND.

3. Switch to boot from SPI-NAND and install to eMMC.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-01 13:36:10 +08:00
Daniel Golle
21ab9a9f1a uboot-mediatek: update to U-Boot 2024.01 release
Rebase local patches on top of quarterly timed release, allowing to
drop numerous patches which have been accepted upstream since the
release of U-Boot 2023.07.02.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-01 12:33:07 +08:00
Daniel Golle
15d850a5ef arm-trusted-firmware-mediatek: use UBI on new NAND targets
Make use of recently added UBI support in MediaTek's ARM
TrustedFirmware-A on new MT7988 SoC.

Load fip from static UBI volume instead of fixed offset on SPIM-NAND
and SNFI.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-01 12:20:28 +08:00
Daniel Golle
052d09668b package: add fitblk util to release /dev/fit* devices
Add minimalistic tool to allow releasing /dev/fit* devices which is
needed on sysupgrade when using the fitblk driver.
The package is hidden in menuconfig, it should only be selected by
adding it to the default package selection of boards using it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-01 12:16:32 +08:00
Daniel Golle
8acf60b77e kernel: add pending fitblk uImage.FIT sub-image block driver
Add 'fitblk' driver to replace the rejected/deprecated uImage.FIT
partition parser.
To use the new driver, add phandle /chosen/rootdisk and point it to
the MTD partition, UBI volume or block device holding the uImage.FIT.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-01 12:11:00 +08:00
Daniel Golle
2dd024a02e kernel: allow skipping deprecated uImage.FIT partition parser
In order to allow gradually migrating the boards currently using the
uImage.FIT partition (deprecated/rejected) parser to the new fitblk
driver, skip the partition parser code in case the new fitblk driver
(which serves the same purpose) is used.

As an indicator for the use of the new fitblk driver, check if the
/chosen/rootdisk property is present in the Device Tree.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-01 10:51:32 +08:00
Daniel Golle
b763c5cb75 kernel: move uImage.FIT partition parser to mediatek target
The partition parser approach has been rejected upstream, it will be
replaced by a small block driver which is the solution suggestion by
upstream maintainers.
As the partition parser has only been used by the mediatek target, as
a first step, move it there.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-07-01 10:39:51 +08:00
coolsnowwolf
78c0839c9b mediatek: filogic: add HF-M7986R1 support 2024-06-30 13:27:48 +08:00
coolsnowwolf
6924a18f35 mt76: add linux kernel 6.6 support for mediatek 2024-06-30 11:12:58 +08:00
coolsnowwolf
aea7d683f1 mediatek: 6.6: refresh patches 2024-06-30 10:44:13 +08:00
Daniel Golle
487e180766 generic: 6.6: (re-)add support multiple PPE to mtk_eth_soc
Now that the issue with WED has been sorted out, re-add support for
multiple PPE to the mtk_eth_soc driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-29 22:56:13 +08:00
Liu Tie
7ea44fc419
doc: update the documentation for Mac (#12278) 2024-06-28 23:08:02 +08:00
coolsnowwolf
b75357d1a0 generic: sync kernel 6.6 from upstream 2024-06-27 15:57:09 +08:00
coolsnowwolf
a9dd459fa8 mediatek: switch to Linux version 6.1 2024-06-26 20:13:50 +08:00
Tony Ambardar
d96fcb36df toolchain/musl: add support for renameat2()
Backport an upstream patch to support the renameat2 syscall, added in Linux
3.15 and supported by glibc since 2.28. It is commonly used in filesystem
or security contexts, and needed building upstream kernel bpf selftests.

Link:
https://inbox.vuxu.org/musl/20240421153640.379015-1-Tony.Ambardar@gmail.com/

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15697
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-25 13:45:16 +08:00
coolsnowwolf
b7c03c0fc9 feeds.conf.default: adjust config defaults 2024-06-25 12:17:21 +08:00
Beginner
cd3fe52be6
kernel: bump 5.10 to 5.10.220 (#12265) 2024-06-24 10:01:08 +08:00
coolsnowwolf
2ef8b6a614 fullconenat: make xt_FULLCONENAT autoload 2024-06-23 02:39:58 +08:00
coolsnowwolf
d1bc8d77c6 fullconenat: add libxtables dependence 2024-06-23 02:20:18 +08:00
coolsnowwolf
f06cea1eed qca-nss-ecm: enable iptables NAT loopback 2024-06-22 18:29:27 +08:00
coolsnowwolf
9728c59e9b firewall: add iptables-mod-conntrack-extra by default 2024-06-22 18:16:32 +08:00
coolsnowwolf
39a4bb9bb8 csstidy: move to luci feed 2024-06-22 17:55:14 +08:00
coolsnowwolf
809deeee20 Revert "qca-nss-ecm: add kmod-nat46 as dependencies package"
This reverts commit a93701bee4.
2024-06-22 17:50:09 +08:00
Beginner
847b81b679
kernel: bump 6.6 to 6.6.35 (#12256) 2024-06-22 04:14:04 +08:00
Beginner
0e02e8ae03
kernel: bump 6.1 to 6.1.95 (#12257) 2024-06-22 04:13:43 +08:00
coolsnowwolf
8482b89587 cpufreq: add CPU Scaling adjustment tool 2024-06-21 20:45:27 +08:00
coolsnowwolf
a93701bee4 qca-nss-ecm: add kmod-nat46 as dependencies package 2024-06-21 19:04:56 +08:00
coolsnowwolf
dfa2935600 base-files: add TARGET_DEFAULT_LAN_IP_FROM_PREINIT for setting the default LAN IP address and netmask 2024-06-21 18:37:12 +08:00
coolsnowwolf
f2f2ca1e5c quectel_QMI_WWAN: add linux 6.6 kernel support 2024-06-21 18:09:43 +08:00
Beginner
de0b0aa0b7
kernel: bump 6.6 to 6.6.34 (#12252) 2024-06-21 10:01:05 +08:00
John Audia
6ba427f2f3 openssl: update to 3.0.14
Major changes between OpenSSL 3.0.13 and OpenSSL 3.0.14 [04-Jun-2024]

* Fixed potential use after free after SSL_free_buffers() is called.
  [CVE-2024-4741]
* Fixed checking excessively long DSA keys or parameters may be very slow.
  [CVE-2024-4603]
* Fixed an issue where some non-default TLS server configurations can cause
  unbounded memory growth when processing TLSv1.3 sessions. An attacker may
  exploit certain server configurations to trigger unbounded memory growth that
  would lead to a Denial of Service.  [CVE-2024-2511]
* New atexit configuration switch, which controls whether the OPENSSL_cleanup
  is registered when libcrypto is unloaded. This can be used on platforms
  where using atexit() from shared libraries causes crashes on exit

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-06-20 23:10:26 +08:00
coolsnowwolf
6f4bb7ec57 ipq-wifi: JDCloud AX6600 bdf file 2024-06-19 21:53:05 +08:00
coolsnowwolf
32c934ed2c ipq-wifi: add JDCloud AX1800 Pro bdf file 2024-06-19 19:18:05 +08:00
coolsnowwolf
88d69f5edc package: nss-firmware: add Qualcomm IPQ5018 support 2024-06-18 15:05:11 +08:00
coolsnowwolf
a95c23c180 qualcommax: ipq60xx: add JDCloud AX1800 Pro and AX6600 support 2024-06-18 15:02:07 +08:00
coolsnowwolf
0f039195d0 qualcommax: ipq807x: fix IPQ807x devices NSS build and nss-firmware 2024-06-17 15:10:08 +08:00
coolsnowwolf
edb64fde27 qualcommax: ipq807x: add IPQ807x devices NSS support 2024-06-17 14:43:14 +08:00
Beginner
c1573c8ac8
kernel: bump 6.1 to 6.1.94 (#12245) 2024-06-17 14:15:10 +08:00
Beginner
5e947a9df9
kernel: bump 5.4 to 5.4.278 (#12247) 2024-06-17 12:30:01 +08:00
Beginner
781b3b4c0b
kernel: bump 5.10 to 5.10.219 (#12246) 2024-06-17 10:00:02 +08:00
Beginner
330337a644
kernel: bump 5.15 to 5.15.161 (#12243) 2024-06-16 22:41:02 +08:00
Beginner
89db9c4050
kernel: bump 6.6 to 6.6.33 (#12236) 2024-06-16 18:35:31 +08:00
Christian Marangi
a8156c5d10 generic: 6.1: backport patch adding support for LED PHY
Backport patch adding support for LED PHY directly in PHY ops struct.
Add new PHYLIB_LEDS config and refresh patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-16 17:26:04 +08:00
Christian Marangi
8340d2f0ea generic: 6.1: backport LEDs patch adding modes
Backport LEDs patch adding additional modes for split link speed and
half/full duplex state.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-16 17:23:40 +08:00
Christian Marangi
df60447f3e generic: 5.15: qca8k: backport code split patch
Backport upstream code split patch for qca8k needed for ipq40xx target
to correctly implement a DSA driver.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-16 17:20:26 +08:00
Christian Marangi
fb661b4744 generic: backport initial LEDs hw control support
Backport initial LEDs hw control support. Currently this is limited to
only rx/tx and link events for the netdev trigger but the API got
accepted and the additional modes are working on and will be backported
later.

Refresh every patch and add the additional config flag for QCA8K new
LEDs support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-06-16 17:16:13 +08:00
coolsnowwolf
eb557774e2 qualcommax: add ipq8074-nss.dtsi for IPQ807x devices NSS support 2024-06-15 23:22:45 +08:00
coolsnowwolf
7b6fe1d69a qualcommax: ipq60xx: add Xiaomi RM1800 (AX5) wireless support 2024-06-15 23:07:03 +08:00
coolsnowwolf
ca0d93bec8 Version update to R24.6.6 2024-06-15 18:00:04 +08:00
coolsnowwolf
e7b75aae80 package: qca: fix target dependencies 2024-06-15 17:50:02 +08:00
coolsnowwolf
aeb660ba58 autocore: add nss usage display on index 2024-06-14 17:50:11 +08:00
coolsnowwolf
2fc5d80589 qualcommax: fix mmc upgrade for ipq60xx 2024-06-14 17:31:25 +08:00
coolsnowwolf
809226391c qualcommax: add all nss support package 2024-06-14 17:26:00 +08:00
coolsnowwolf
568f5ab87c package: add nss packages for qualcommax 2024-06-14 17:15:13 +08:00
coolsnowwolf
935b13b61e qualcommax: add qca-nss-ecm kernel support 2024-06-14 16:50:09 +08:00
Daniel Golle
fb42176cd1 generic: sync MediaTek Ethernet driver with upstream
Import commits from upstream Linux replacing some downstream patches.
Move accepted patches from pending-{5.15,6.1} to backport-{5.15,6.1}.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-13 22:20:05 +08:00
Daniel Golle
e5dffcaddd mediatek: generate bootloader artifacts for mt7988_rfb
Switch to OpenWrt uImage.FIT bootmethod and include various bootloader
artifacts with the generated binaries.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-12 23:02:49 +08:00
Daniel Golle
176eb7d8ef generic: 6.6: net: sfp-bus: fix SFP mode detect from bitrate
Backport commit fixing detection of SFP modules which has been broken
since Linux 6.4 for some modules.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-11 23:00:24 +08:00
Daniel Golle
a07fca99cb kernel: serial: 8250_mtk: track busclk state to avoid bus error
UARTs not used as boot console are currently broken on some MediaTek
targets due to register access depending on the bus clock being enabled.
Add patch to make sure this dependency is always met.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-11 22:52:17 +08:00
Daniel Golle
dbf65dd826 arm-trusted-firmware-mediatek: import patchset for Fidelix flash on SNFI
Import pending patches to set pinconf settings for SPI-NAND pins on
MT7622 identical to what the old proprietary preloader did.

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

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-10 23:08:07 +08:00
Daniel Golle
d5ae67bea0 arm-trusted-firmware-mediatek: update to MediaTek-patched v2.10.0
Update ARM TrustedFirmware-A to the most recent release of
MediaTek downstream patched version released 2024-01-17.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-10 23:05:03 +08:00
IFV
94f8d8b735
autoconf-archive: fix ax_c_float_words_bigendian fails when lto enabled (#12227)
See 23be7ccd7f
2024-06-09 18:59:02 +08:00
Daniel Golle
be9a399019 uboot-mediatek: snfi: FM35Q1GA is x4-only
Dont allow x2 read and cache read operations on FM35Q1GA as they seem
to be unstable. Also the Linux drivers does not allow x2 ops.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-08 22:30:09 +08:00
Daniel Golle
b3bbc4b90d mediatek: improve reliability of Fidelix SPI-NAND
Prior to performing a PROGRAM LOAD RANDOM DATA operation, a WRITE
ENABLE (06h) command must be issued to change the contents of the
memory array. Following a WRITE ENABLE (06) command, **first a PROGRAM
LOAD (02h or 32h) command must be issued to reset the cache**, then
issue a PROGRAM LOAD RANDOM DATA (84h or 34h) command

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

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

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

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-06-08 22:26:03 +08:00
coolsnowwolf
5c11df48ac qualcommax: ipq60xx: add reserved NSS memory nodes 2024-06-07 12:48:08 +08:00
aiamadeus
a87cb8cd96 rockchip: sync rk3568 upstream dts changes 2024-06-06 23:01:16 +08:00
aiamadeus
cb1f2c6a58 rockchip: fix rk3568 nvme detection issue
Fixes: #12149
2024-06-05 16:30:30 +08:00
Hao Guan
a5af3cafa2
tools: fix build on macOS Sonoma (#12212)
* tools/coreutils: update to 9.3

* tools/cpio: update to 2.15

* libjson-c: update to 0.17

* gettext-full: fix clang build errors

* toolchain: gcc: update to 13.3

* tools: b43-tools: fix compilation with GCC14
2024-06-05 00:18:09 +08:00
aiamadeus
8d664879c5 ramips: mt7621: fixes gpio config
Fixes: 4561705 ("ramips: add support for OpenFi 5Pro")
2024-06-03 22:28:03 +08:00
coolsnowwolf
3d715feecc elfutils: fix build with GCC 12/13 2024-06-01 13:10:06 +08:00
Hauke Mehrtens
9042bd040a x86: 6.6: Activate CONFIG_FB_DEVICE
This adds the legacy /dev/fb* device file for kernel 6.6 again.
Linux upstream commit 701d2054fa31 ("fbdev: Make support for
userspace interfaces configurable") made this configurable and we
deactivated this option by default for kernel 6.6. On x86 we are
not space constrained and some users need this legacy interface.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-31 22:36:26 +08:00
Hauke Mehrtens
258e84d30d kernel: Add CONFIG_FB_DEVICE to kmod-fb
At least kmod-fb-tft depends on CONFIG_FB_DEVICE
and can not be activated without it.

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

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-05-31 22:22:30 +08:00
Sheng Huang
3b8e07ae19 ramips: add support for JDCloud RE-CP-02
- Soc: MediaTek MT7621AT
- RAM: 512 MB (DDR3)
- Flash: 16 MB (SPI NOR)
- WiFi: MediaTek MT7905DAN, MediaTek MT7975DN
- Ethernet: 1 WAN, 3 LAN (Gigabit)
- Buttons: Reset, Joylink
- LEDs: (red, blue, green), routed to one indicator in the top of the
  device
- Power: DC 12V 1A tip positive
- 1 TF Card Slot

Co-Authored-By: Jianti Chen <clbcjt@outlook.com>
Signed-off-by: Sheng Huang <shenghuang147@gmail.com>
2024-05-30 23:00:02 +08:00
Michael Lyle
22f1e5eabf ramips: gl-mt1300: downclock SPI to 50MHz
The SPI max frequency was set to 80MHz, considerably higher than the
vendor clocks it in their firmware (10MHz).  Multiple users reported
jffs2 corruption/instability.

My unit has a W25Q256; datasheet specifies maximum SPI frequency for
read command of 50MHz.

Signed-off-by: Michael Lyle <mlyle@lyle.org>
2024-05-30 22:56:23 +08:00
coolsnowwolf
0186d52076 build: introduce PKG_BUILD_FLAGS 2024-05-29 10:35:11 +08:00
Sven Huang
4561705e1b
ramips: add support for OpenFi 5Pro (#12196)
OpenFi 5Pro is a 2.4/5 GHz band 11ac router, based on MT7621A.

Specification:

- SoC               : MediaTek MT7621A
- RAM               : DDR3 512 MB
- Flash             : SPI-NOR 64MB (W25Q512)
- WLAN              : 2.4/5 GHz 2T2R (MT7603/MT7613)
- Ethernet          : 2x 10/100/1000 Mbps
- LEDs/Keys (GPIO)  : 3x/2x
- UART              : 1xUART
  - settings        : 115200n8

How to upgrade image in uboot:

1. press reset button when boot for 5sec.
2. access 192.168.21.1 in web ui.
3. select image and upload
2024-05-28 23:30:02 +08:00
coolsnowwolf
d447f22e74 hostapd: fix mbo module build 2024-05-27 00:03:38 +08:00
Beginner
13931a492e
kernel: bump 6.6 to 6.6.32 (#12186) 2024-05-26 23:50:41 +08:00
Beginner
4819907434
kernel: bump 6.1 to 6.1.92 (#12187) 2024-05-26 23:50:17 +08:00
coolsnowwolf
d88c0116f3 mtd: spi-nor: add support for Winbond W25Q512 2024-05-26 23:29:20 +08:00
coolsnowwolf
a459786ac2 mvebu: add support for QNAP QHora-321/322 with commo image 2024-05-26 23:19:20 +08:00
coolsnowwolf
57c907ddb6 base-files: add legacy-sdcard sysupgrade support 2024-05-26 23:16:05 +08:00
Beginner
86b8e436b7
kernel: bump 5.4 to 5.4.277 (#12191) 2024-05-26 20:30:07 +08:00
Beginner
d57b79961b
kernel: bump 5.10 to 5.10.218 (#12190) 2024-05-26 18:30:08 +08:00
Beginner
73d37cb1d2
kernel: bump 5.15 to 5.15.160 (#12188) 2024-05-26 18:00:11 +08:00
Shiji Yang
63af18b5a9 ramips: add support for H3C TX180x series devices
H3C TX180x series WiFi6 routers are customized by different carrier.
While these three devices look different, they use the same motherboard
inside. Another minor difference comes from the model name definition
in the u-boot environment variable.

Specifications:
 SOC:      MT7621 + MT7915
 ROM:      128 MiB
 RAM:      256 MiB
 LED:      status *2
 Button:   reset *1 + wps/mesh *1
 Ethernet:        lan *3 + wan *1 (10/100/1000Mbps)
 TTL Baudrate:    115200
 TFTP server IP:  192.168.124.99

Compatibility mode is used to guarantee the connection of old devices
that only support WiFi4 or WiFi5.

TFTP + TTL Installation:
Although a TTL connection is required for installation, we do not need
to tear down it. We can find the TTL port from the cooling hole at the
bottom. It is located below LAN3 and the pins are defined as follows:
|LAN1|LAN2|LAN3|----|WAN|
--------------------
    |GND|TX|RX|VCC|

1. Set tftp server IP to 192.168.124.99 and put initramfs firmware in
   server's root directory, rename it to a simple name "initramfs.bin".
2. Plug in the power supply and wait for power on, connect the TTL cable
   and open a TTL session, enter "reboot", then enter "Y" to confirm.
   Finally push "0" to interruput boot while booting.
3. Execute command to install a initramfs system:
   # tftp 0x80010000 192.168.124.99:initramfs.bin
   # bootm 0x80010000
4. Backup nand flash by OpenWrt LuCI or dd instruction. We need those
   partitions if we want to back to stock firmwre due to official
   website does not provide download link.
   # dd if=/dev/mtd1 of=/tmp/u-boot-env.bin
   # dd if=/dev/mtd4 of=/tmp/firmware.bin
5. Edit u-boot env to ensure use default bootargs and first image slot:
   # fw_setenv bootargs
   # fw_setenv bootflag 0
6. Upgrade sysupgrade firmware.
7. About restore stock firmware: flash the "firmware" and "u-boot-env"
   partitions that we backed up in step 4.
   # mtd write /tmp/u-boot-env.bin u-boot-env
   # mtd write /tmp/firmware.bin firmware

Additional Info:
The H3C stock firmware has a 160-byte firmware header that appears to
use a non-standard CRC32 verification algorithm. For this part of the
data, the u-boot does not check it so we can just directly replace it
with a placeholder.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2024-05-25 22:25:15 +08:00
Rany Hany
b49e163a99 mediatek: fix broken PCIe caused by kernel update
The patch "710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch"
makes use of "syscon_regmap_lookup_by_phandle" which requires that
"syscon" be in the compatible list.

Without this patch, PCIe probe will fail with the following error:

[    1.287467] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    1.294019] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    1.299901] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
[    1.307954] mtk-pcie 1a143000.pcie: missing hifsys node
[    1.313185] mtk-pcie: probe of 1a143000.pcie failed with error -22

Fixes: #12182
Fixes: 1b3612a ("kernel: bump 5.15 to 5.15.158")
Signed-off-by: Rany Hany <rany_hany@riseup.net>
2024-05-24 23:10:05 +08:00
Rui Salvaterra
813a3468eb linux-firmware: realtek: update rtl8821ae firmware
A newer version, rtl8821aefw_29.bin, has been available for over 7 years.
Let's use it.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2024-05-24 23:05:58 +08:00
Daniel Golle
1144959ad8 mediatek: filogic: mt7988: mark RTC clock as critical
A dependency of the MT7988 MMC host controller on the SoC's RTC clock
being running has been discovered. Mark RTC clock as critical to fix
MMC host on MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-23 23:38:05 +08:00
Daniel Golle
f643c08df8 generic: 5.15: rename patches to match correct version
Rename two patches which were only accepted in Linux 6.2, but were
marked as if they were accepted in Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-23 23:36:12 +08:00
Daniel Golle
8f988ed371 mediatek: filogic: enable driver for MediaTek XS-PHY
Enable driver for MediaTek SuperSpeedPlus XS-PHY transceiver
for the USB3.1 GEN2 controllers found in the MT7988 SoC.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-22 23:38:42 +08:00
John Crispin
563de907f6 arm-trusted-firmware-mediatek: add mt7981 ddr4 builds
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-22 23:36:15 +08:00
coolsnowwolf
8ccd96e80a kernel: asymmetric: Add missing dependency on CRYPTO_SIG for 6.6 2024-05-21 20:55:12 +08:00
coolsnowwolf
5376eb13b3 ramips: improve AP-MT7621A-V60 EVB support 2024-05-21 20:49:55 +08:00
Beginner
c188b9f52e
kernel: bump 5.4 to 5.4.276 (#12175) 2024-05-21 00:35:59 +08:00
Beginner
ad11245663
kernel: bump 5.10 to 5.10.217 (#12174) 2024-05-20 23:40:29 +08:00
Beginner
bcbc08ab45
kernel: bump 6.6 to 6.6.31 (#12164)
delete target/linux/generic/backport-6.6/600-v6.9-01-net-gro-parse-ipv6-ext-headers-without-frag0-invalid.patch
 delete target/linux/generic/backport-6.6/600-v6.9-02-net-gro-fix-udp-bad-offset-in-socket-lookup-by-addin.patch
 delete target/linux/generic/backport-6.6/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
 delete target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
 delete target/linux/generic/pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
 delete target/linux/generic/pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
 delete target/linux/generic/pending-6.6/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
2024-05-18 15:50:32 +08:00
Beginner
638fe853a7
kernel: bump 6.1 to 6.1.91 (#12165)
delete target/linux/bcm27xx/patches-6.1/950-0270-net-bcmgenet-Reset-RBUF-on-first-open.patch
 delete target/linux/generic/backport-6.1/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
 delete target/linux/generic/pending-6.1/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
 delete target/linux/generic/pending-6.1/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
 delete target/linux/generic/pending-6.1/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
2024-05-18 15:50:13 +08:00
Beginner
19e494cfe7
kernel: bump 5.15 to 5.15.159 (#12166) 2024-05-18 06:30:07 +08:00
Álvaro Fernández Rojas
4172836243 image: add missing DTC include directory
include-prefixes were moved to a common directory in linux v4.12, see
d5d332d3f7

This is needed for bcm27xx kernel v6.6 support.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-05-13 18:30:08 +08:00
Álvaro Fernández Rojas
a9ce86f16b kernel: add missing kernel 6.6 symbols
Add missing kernel 6.6 symbols for bcm27xx.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-05-13 18:28:26 +08:00
coolsnowwolf
c6bb9a7912 target.mk: remove luci-newapi 2024-05-09 22:11:31 +08:00
coolsnowwolf
1531aa758e feeds.conf.default: add option switch to luci-23.05 2024-05-08 13:15:25 +08:00
coolsnowwolf
918879abc7 default-settings: compatibility with luci-23.05 2024-05-08 13:14:10 +08:00
coolsnowwolf
1b7087bae5 firewall/firewall4: provide uci-firewall 2024-05-08 12:55:32 +08:00
coolsnowwolf
2e865ac654 unetd: add WireGuard based VPN connection manager for OpenWrt 2024-05-08 12:26:19 +08:00
coolsnowwolf
7db3f7518c r8126: add Realtek RLT8126 5gb NIC support 2024-05-07 23:06:09 +08:00
coolsnowwolf
1b3612a289 kernel: bump 5.15 to 5.15.158 2024-05-07 10:13:18 +08:00
coolsnowwolf
4e3d253ef9 kernel: bump 5.10 to 5.10.216 2024-05-07 10:00:13 +08:00
coolsnowwolf
e87716ac87 kernel: bump 5.4 to 5.4.275 2024-05-07 09:44:13 +08:00
Antonio Flores
77a790bd2d kernel: add kmod-ata-ahci-dwc
Add kmod-ata-ahci-dwc for the rockchip target.

33629d3509

Signed-off-by: Antonio Flores <antflores627@gmail.com>
2024-05-06 14:35:13 +08:00
Felix Fietkau
c7d931e7b6 kernel: fix corrupted ethernet header on bridge multicast-to-unicast
Fixes: 45a8e962a591 ("kernel: fix crash with multicast-to-unicast and fraglist GRO")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-05-06 14:32:01 +08:00
coolsnowwolf
179329cbba Version update to R24.5.1 2024-05-06 05:57:17 +08:00
coolsnowwolf
6e604e9875 amlogic: add mesongx Phicomm N1 support 2024-05-06 05:53:58 +08:00
coolsnowwolf
dde01c597c kernel: remove 640-bridge-only-accept-EAP-locally.patch 2024-05-05 20:04:10 +08:00
coolsnowwolf
524107deb5 Revert "kernel: bump 5.15 to 5.15.158 (#12126)"
This reverts commit 0f35cfbb60.
2024-05-05 14:25:14 +08:00
coolsnowwolf
89a6a0c63b Revert "kernel: bump 5.10 to 5.10.216 (#12127)"
This reverts commit e5c26e9039.
2024-05-05 14:25:06 +08:00
coolsnowwolf
cf57cfaeeb Revert "kernel: bump 5.4 to 5.4.275 (#12128)"
This reverts commit 23a35d1ef0.
2024-05-05 14:24:57 +08:00
coolsnowwolf
e5d8feddc3 kernel: backport upstream GRO fixes 2024-05-05 14:23:46 +08:00
coolsnowwolf
542de0b0ac kernel: add missing check for TCP GRO 2024-05-05 13:33:15 +08:00
Beginner
8c6cc8f468
kernel: bump 6.1 to 6.1.90 (#12125) 2024-05-05 10:00:11 +08:00
Beginner
722c2739ba
kernel: bump 6.6 to 6.6.30 (#12123) 2024-05-05 06:00:32 +08:00
Beginner
23a35d1ef0
kernel: bump 5.4 to 5.4.275 (#12128) 2024-05-04 16:01:03 +08:00
Beginner
e5c26e9039
kernel: bump 5.10 to 5.10.216 (#12127) 2024-05-04 11:00:08 +08:00
Beginner
0f35cfbb60
kernel: bump 5.15 to 5.15.158 (#12126) 2024-05-04 10:10:03 +08:00
Daniel Golle
8f593dd700 mediatek: filogic: update MT7988 device tree
* move ethernet to mt7988a.dtsi
 * move switch definition to mt7988a.dtsi
 * add PHY LEDs

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-05-03 22:54:18 +08:00
Beginner
87d7c07cfa
kernel: bump 5.15 to 5.15.157 (#12108) 2024-05-01 20:00:14 +08:00
Beginner
76c97b741b
kernel: bump 6.1 to 6.1.89 (#12107)
Removed upstreamed:
	target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch
	target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch
	target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch
	target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch
2024-05-01 18:10:10 +08:00
Beginner
eef66478a4
kernel: refresh 6.6 patches (#12113) 2024-05-01 15:00:15 +08:00
Beginner
fcd30851f7
kernel: bump 6.6 to 6.6.28 (#12106) 2024-04-30 23:32:40 +08:00
aiamadeus
b760a6f166 uboot-sunxi: drop broken patches
These patches break boot, link: #12104
2024-04-30 20:21:23 +08:00
aiamadeus
54bb95de0f target: add some missing patches 2024-04-30 20:19:35 +08:00
Felix Fietkau
bdcee653dc kernel: backport flow offload pppoe fix
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-04-30 10:00:10 +08:00
Daniel Golle
61bc98ea14 arm-trusted-firmware-tools: update to version 2.9
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-04-29 21:25:10 +08:00
Daniel Golle
07afd0f581 generic: 6.1: fix uImage.FIT partitions on mtdblock and ubiblock
When refreshing the hack patches for Linux 6.1 the part of the uImage.FIT
partition parser patch which takes care of allowing mtdblock and ubiblock
devices to have partitions has been dropped, supposedly by accident.
Re-add a that part to the patch, so devices using a uImage.FIT filesystem
sub-image as rootfs can work with Linux 6.1.

Fixes: 19a246bb65 ("generic: 6.1: manually refresh hack patches")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-04-29 21:21:32 +08:00
Daniel Golle
e72f8049c7 arm-trusted-firmware-mediatek: update to release 2023-10-13
Drop local patches now upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-04-28 21:15:06 +08:00
coolsnowwolf
80fdc8951d
kernel: modules: jitterentropy_rng requires SHA3 support for kernel 6.1.87+ 2024-04-28 00:07:57 +08:00
coolsnowwolf
5ebdcf2f4b atf-rockchip-vendor: add rk3528 support 2024-04-27 23:18:04 +08:00
Zoltan HERPAI
52a7bf68d5 sunxi: add and set 6.6 testing kernel
Allow selecting 6.6 as testing kernel on sunxi.

Runtime-tested:
 - Linksprite pcDuino (cortexa8)
 - Olimex A20 Micro (cortexa7)
 - Pine64 SoM (cortexa53)

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2024-04-26 21:36:12 +08:00
Beginner
75b424cc1c
kernel: bump 5.4 to 5.4.274 (#12096) 2024-04-25 09:10:23 +08:00
Beginner
c2f35f6547
kernel: bump 5.10 to 5.10.215 (#12095) 2024-04-25 00:10:11 +08:00
lean
0b74998c3a arm-trusted-firmware-rockchip-vendor: revert version 2024-04-24 23:57:06 +08:00
Beginner-Go
8200c9e45b r8168: update to version 8.053.00 2024-04-23 10:15:24 +08:00
Beginner-Go
ed47ab6c42 r8125: update to version 9.013.02-2 2024-04-23 10:08:18 +08:00
Christian Lamparter
ec63924daa intel-microcode: update to 20240312
intel-microcode (3.20240312.1) unstable; urgency=medium

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2024-04-21 22:39:45 +08:00
coolsnowwolf
57050f9951 ipq-wifi: update to version 2024-04-16 2024-04-21 22:35:21 +08:00
Beginner
849b8c3dbc
kernel: bump 5.15 to 5.15.156 (#12082) 2024-04-20 00:10:53 +08:00
aakkll
9546676d1f
kernel: bump 6.6 to 6.6.28 (#12079)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2024-04-19 03:08:59 +08:00
Beginner
5a6426b34f
kernel: bump 6.1 to 6.1.87 (#12081) 2024-04-19 03:08:41 +08:00
Hauke Mehrtens
cba1493388 linux-firmware: update to 20240220
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-04-18 23:01:50 +08:00
aiamadeus
1216535698 rtw88-usb: update to latest git HEAD 2024-04-18 22:16:40 +08:00
coolsnowwolf
a263b22cee generic: add missing kconfig for 6.x 2024-04-17 21:50:53 +08:00
aiamadeus
01c841d07c rockchip: enable hdmi console output 2024-04-16 21:35:28 +08:00
aiamadeus
7a4a98ec71 kernel: modules: sync upstream fixes 2024-04-16 21:28:54 +08:00
Beginner
fd8808e403
kernel: bump 5.15 to 5.15.155 (#12076) 2024-04-15 10:10:29 +08:00
Beginner
0328537087
kernel: bump 6.1 to 6.1.86 (#12075) 2024-04-15 10:00:38 +08:00
Beginner
c44b8f56de
kernel: bump 6.6 to 6.6.27 (#12074)
* kernel: bump 6.6 to 6.6.27

* kernel: Reorder kernel 6.6 config
2024-04-14 23:37:18 +08:00
coolsnowwolf
5966985c19 kernel: modules: netdevices: adapt for loongarch64 2024-04-14 22:54:30 +08:00
Daniel Golle
27a7480dc1 mediatek: filogic: restore non-const type in pinctrl-mt7988 driver
When building with Linux 5.15 the 'const' type results in warnings.
Restore the original non-const type in those cases.

Fixes: 36d0aa9c2d ("mediatek: filogic: sync pinctrl-mt7988 with MediaTek SDK")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-04-14 22:15:08 +08:00
Daniel Golle
e89c9e5880 mediatek: filogic: sync pinctrl-mt7988 with MediaTek SDK
Update pinctrl driver for the MT7988 with driver from mtk-openwrt-feeds.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-04-14 22:12:32 +08:00
coolsnowwolf
784b562e90 USB: serial: option: add MEDIATEK FM350-GL module usb mode support 2024-04-13 11:03:00 +08:00
Beginner
9e29b15c05
kernel: refresh 6.6 patches (#12069) 2024-04-13 10:57:10 +08:00
Beginner
0bc2188f41
kernel: refresh 6.1 patches (#12068) 2024-04-13 10:56:47 +08:00
coolsnowwolf
373bf02149 Version update to R24.4.4 2024-04-11 14:09:38 +08:00
coolsnowwolf
a66f5342cd kernel: bump 6.1 to 6.1.85 2024-04-11 08:14:17 +08:00
coolsnowwolf
14f04764c8 kernel: bump 6.6 to 6.6.26 2024-04-11 08:07:13 +08:00
coolsnowwolf
e703f844c8 uboot-rockchip: update rk3566 ATF and DDR version 2024-04-11 07:58:28 +08:00
coolsnowwolf
ad5d57cd81 uboot-rockchip: update rk356x ATF and DDR version 2024-04-10 16:59:16 +08:00
coolsnowwolf
e4172db5da sunxi: add F1C100/200 (arm926ej-s) support 2024-04-10 08:50:23 +08:00
coolsnowwolf
259cf72476 r8125: bump to 9.012.04 2024-04-10 08:39:48 +08:00
coolsnowwolf
c897f32a45 tools/automake: bump to 1.16.5 2024-04-09 23:28:22 +08:00
Rodrigo Balerdi
d3ab2cd000 base-files: minor fix to mmc_mac_ascii function
This is mostly a cosmetic cleanup. The absence of
the return statement was not causing any problems.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
2024-04-09 21:50:04 +08:00
coolsnowwolf
f788f35b36 closed-arm-firmware-rockchip: bump to 2024-02-22 2024-04-09 21:45:43 +08:00
Weijie Gao
0983191cb6 gpio-button-hotplug: fix linux 6.2 build failure
devm_gpiod_get_from_of_node() was removed since linux 6.2.
devm_fwnode_gpiod_get() is the recommended replacement.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-04-08 19:28:28 +08:00
Qingfang Deng
9415e0a37d kernel: xt_FLOWOFFLOAD: fix use of uninitialized dir variable
The dir variable has been used uninitialized since the port to 5.10, and
somehow this remains undetected by GCC.

Fixes: b10d6044599d ("kernel: add linux 5.10 support")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-04-08 19:26:34 +08:00
Daniel Golle
3de103535a generic: 6.1: backport support for various MHI 5G modems
* Dell DW5932e
  * Foxconn T99W175 (HP variant)
  * Foxconn T99W510
  * Generic SDX75-based
  * Quectel EM160R-GL (newer variants)
  * Quectel RM520
  * Quectel RM520N-GL (Lenovo variant)
  * SC8280XP Compute Reference Design
  * Telit FE990

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-04-06 19:37:57 +08:00
Daniel Golle
7e90035c77 generic: 6.6: backport support for SDX75-based MHI 5G modems
Also backport most recent MHI modem additions to Linux 6.6.
Adds support for generic SDX75-based modems.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-04-06 19:35:31 +08:00
Daniel Golle
0273ba389f kernel: modules: package driver for MediaTek T7xx PCIe 5G modem
Build and package driver for MediaTek PCIe 5G WWAN modem T7xx device
available in Linux 6.1 and 6.6 as kmod-mtk-t7xx.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-04-06 19:32:35 +08:00
coolsnowwolf
3b68197250 arm-trusted-firmware-rockchip-vendor: add RK3528/RK3588 support 2024-04-05 18:22:48 +08:00
coolsnowwolf
a771805649 uboot-sunxi: fix h2 without SPL I2C failed to build 2024-04-05 17:48:16 +08:00
Lollipop907
6586685561
rockchip: Add support for Advantech RSB4810 (#12031) 2024-04-05 16:57:42 +08:00
Beginner
f221abf682
kernel: bump 6.6 to 6.6.25 (#12052) 2024-04-05 16:10:08 +08:00
Beginner
7727540c1c
kernel: bump 5.15 to 5.15.153 (#12048) 2024-04-04 15:00:40 +08:00
Beginner
a5922c08f2
kernel: bump 5.10 to 5.10.214 (#12049) 2024-04-04 12:10:06 +08:00
Beginner
7b24bf9a5c
kernel: bump 5.4 to 5.4.273 (#12050) 2024-04-04 12:00:39 +08:00
Beginner
b171813f46
kernel: bump 6.1 to 6.1.84 (#12046) 2024-04-04 00:20:30 +08:00
Beginner
7d7e578142
kernel: bump 6.6 to 6.6.24 (#12047) 2024-04-04 00:10:16 +08:00
Florian Eckert
05c7666b4d tools: add tmon package
Add the 'tmon' packages. This is as a tool to help visualize,
tune, and test the complex thermal subsystem.

We get a compile warning for the tool that the printf format does not
fit. This commit contains a patch that fixes this warning. This patch
has also been sent upstream to the Linux kernel [1].

Links:
[1] https://lore.kernel.org/all/20231204141335.2798194-1-fe@dev.tdt.de/

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2024-04-02 21:56:25 +08:00
Rosen Penev
d3c28faf88 kernel: backport ethtool_puts
Will be used for conversions in the following commit.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2024-04-02 21:50:46 +08:00
Qingfang Deng
5d367a85be kernel: support RISC-V PMU
Add RISC-V PMU config symbols and enable them for riscv64.

Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2024-04-01 21:31:46 +08:00
Felix Fietkau
b5c1277609 perf: fix build on linux 6.6
- use Makefile.perf to prevent overriding MAKEFLAGS
- fix path to PKG_CONFIG
- link libstdc++ statically (only used for demangling)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-04-01 21:23:45 +08:00
aiamadeus
917b787887 ipq60xx: rework cpufreq support
Some cost down devices like jdc
do not have the pmic chips.
2024-03-31 22:35:21 +08:00
Beginner
bcd9f26694
kernel: bump 6.1 to 6.1.83 (#12036)
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.83

Manually rebased:
  mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch
  generic/pending-6.1/737-07-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
2024-03-29 10:21:13 +08:00
Beginner
f56c9ece3c
kernel: bump 6.6 to 6.6.23 (#12034) 2024-03-29 00:26:13 +08:00
coolsnowwolf
3e5300b8ee sunxi: port sunxi_get_soc_chipid / sunxi_get_serial from SDK 2024-03-28 18:10:09 +08:00
coolsnowwolf
0d1280a187 uboot-sunxi: add support for H618 x98h 2024-03-28 18:00:02 +08:00
coolsnowwolf
5c5b7af071 uboot-sunxi: add ac200/ac300 with internal eth phy support 2024-03-28 17:56:26 +08:00
Hauke Mehrtens
3f061d4220 libnl-tiny: update to latest git HEAD
d433990 Make struct nla_policy and struct nlattr const

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-27 22:58:12 +08:00
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?=
19c63babfe iwinfo: update to latest git HEAD
Adds MediaTek MT7916AN and Cypress CYW43455 (Raspberry Pi 5) devices.

a34977c devices: add device id for Cypress CYW43455
3eb34df devices: add device id for MediaTek MT7916AN

This contains an ABI change, increase the ABI version too.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2024-03-27 22:54:32 +08:00
coolsnowwolf
b479194652 vsftpd-alt: Pass TARGET_CPPFLAGS 2024-03-26 04:05:39 +08:00
coolsnowwolf
c7b64067f2 vsftpd: fix compilation with musl 1.2.4 2024-03-26 02:06:41 +08:00
coolsnowwolf
86abbb7834 generic: 6.6: add missing kconfig 2024-03-25 22:15:06 +08:00
aiamadeus
af6fdbd097 rockchip: add kernel 6.6 support 2024-03-24 17:00:19 +08:00
aiamadeus
38ed25d038 rockchip: use upstream rfkill patches 2024-03-24 16:56:22 +08:00
aiamadeus
2a4194fa4b mediatek: add Nokia EA0326GMP support 2024-03-22 19:50:10 +08:00
aiamadeus
4af62c65cb generic: 6.1: backport AXP PMIC support 2024-03-22 19:38:15 +08:00
sKyissKy
36e6d2962f
ramips : fix zte e8820s upgrade (#12021) 2024-03-21 21:25:10 +08:00
coolsnowwolf
1dce308893 quectel-cm: update to version 1.6.5 2024-03-21 20:02:02 +08:00
coolsnowwolf
68253688d8 quectel_MHI: add support Linux Kernel 6.1+ 2024-03-21 19:50:43 +08:00
aiamadeus
9d50fcccf0 sunxi: h616: cpufreq and thermal support 2024-03-20 20:28:26 +08:00
aiamadeus
f69a1db025 sunxi: add support for Orange Pi Zero 3 2024-03-20 20:25:26 +08:00
AmadeusGhost
b0516a441f target: 5.15/6.1: fix broken patches
Fixes: c336930 ("kernel: bump 6.1 to 6.1.80")
2024-03-19 20:38:05 +08:00
AmadeusGhost
0716d8c540 rockchip: refresh kernel 6.1 config 2024-03-19 20:15:40 +08:00
pc.xue
a4880e2ffa
strace: bump to version 6.6 (#12012)
Fixes: #12011
2024-03-18 15:06:01 +08:00
Beginner
a30f300333
kernel: bump 6.6 to 6.6.22 (#12003) 2024-03-17 18:20:51 +08:00
Beginner
1d96ca70bf
kernel: bump 6.1 to 6.1.82 (#12002) 2024-03-17 18:15:42 +08:00
Beginner
524175abb0
kernel: bump 5.4 to 5.4.272 (#12007) 2024-03-17 15:30:06 +08:00
Beginner
78375ff400
kernel: bump 5.10 to 5.10.213 (#12006) 2024-03-17 15:25:09 +08:00
Beginner
5f3d8d4647
kernel: bump 5.15 to 5.15.152 (#12005) 2024-03-17 15:20:10 +08:00
Daniel Golle
4fb3ef8364 uboot-mediatek: update to version 2023.07.02
Release 2023.07 got tagged wrongly and replaced by follow-up release
2023.07.02.

Now using upstream DTS for BPi-R3.
Removed two patches which made it upstream, refreshed the rest.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-16 20:39:45 +08:00
Daniel Golle
d95acb11e0 arm-trusted-firmware-mediatek: update to sources of 2023-07-24
Use updated Trusted Firmware-A sources from MediaTek, now stacked
on top of the ARM Trusted Firmware-A v2.9 release.
Add builds for the newly added MT7988 SoC.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-03-16 20:36:52 +08:00
coolsnowwolf
3b5f54d82f generic: 6.6: revert genetlink: remove userhdr from struct genl_info 2024-03-15 14:24:06 +08:00
coolsnowwolf
5fea82cd1e generic: 6.6: revert 6.5 deprecated API support for backport 6.1 2024-03-15 03:23:30 +08:00
coolsnowwolf
722f169265 kernel: crypto: fix geniv build as a separate module for 5.4 2024-03-15 03:19:19 +08:00
aiamadeus
9a345491df generic: 6.1: backport AXP313a PMIC support 2024-03-14 22:00:14 +08:00
coolsnowwolf
df237c7e3f generic: add missing kernel 6.6 patches 2024-03-14 11:24:09 +08:00
coolsnowwolf
6f205863c1 modules: fixes build for x86 platform 2024-03-13 16:03:53 +08:00
aiamadeus
58147ef0f6 kernel/modules: sync from upstream source 2024-03-13 10:26:08 +08:00
Beginner-Go
3089e0e022 kernel: refresh all 6.6 patches (#11979)
Fixes:  #11978
2024-03-12 18:39:10 +08:00
coolsnowwolf
6eba666e73 target: move motorcomm driver to generic 2024-03-12 18:35:50 +08:00
coolsnowwolf
ce6d48a35d generic: sync kernel 6.6 from upstream 2024-03-12 15:15:28 +08:00
Beginner
bc21d2c7d6
x86: fix build on kernel 5.10.211 (#11972) 2024-03-11 18:08:15 +08:00
Missing
a4bb24ad80
package: add ipip6 support (#11970)
Add IPIP6(RFC2473) support.
2024-03-11 10:08:38 +08:00
coolsnowwolf
525b77c08b sunxi: add kernel 6.1 support 2024-03-09 21:01:07 +08:00
coolsnowwolf
6b306de18b uboot-sunxi: bump to version 2024.01 2024-03-09 20:57:39 +08:00
Beginner
2923d86419
kernel: bump 5.15 to 5.15.151 (#11958) 2024-03-08 10:18:19 +08:00
Beginner
8c403eca0e
kernel: bump 5.10 to 5.10.212 (#11961) 2024-03-08 10:16:26 +08:00
Beginner
651cda2805
kernel: bump 6.1 to 6.1.81 (#11955) 2024-03-07 20:28:14 +08:00
Beginner
50d484f3b1
kernel: bump 6.6 to 6.6.21 (#11954) 2024-03-07 20:26:23 +08:00
coolsnowwolf
85291c2a25 kernel: modules: remove dsmark support
Fixes: #11952
2024-03-06 23:18:53 +08:00
coolsnowwolf
262c581ece ramips: add support for Huasifei WS1208V2 2024-03-06 00:38:22 +08:00
coolsnowwolf
20239689fd rockchip: rename LYT T68M eth ports to lanx 2024-03-05 22:40:04 +08:00
coolsnowwolf
de9f57fc50 rockchip: stmmac: add devname configuration from OF 2024-03-05 18:14:47 +08:00
coolsnowwolf
892b843ec5 r8125: add support for reading devname configuration from dts OF 2024-03-05 18:11:59 +08:00
coolsnowwolf
4de28071b2 Revert "kernel: dsmark support in kernel 5.4/5.10"
This reverts commit 6c3044be09.
2024-03-05 18:09:02 +08:00
coolsnowwolf
6ff88a72c7 rockchip: add reset gpio button for T68M 2024-03-04 15:30:18 +08:00
coolsnowwolf
6c3044be09 kernel: dsmark support in kernel 5.4/5.10 2024-03-04 12:41:42 +08:00
Hauke Mehrtens
4e9456453d kernel: Remove dsmark support
dsmark support was removed in kernel 5.15.150 and 6.1.80.
Remove it from the kmod package as well.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-03-04 10:36:28 +08:00
coolsnowwolf
e612846e1b target: generic: fixes dst_release issue 2024-03-04 10:32:59 +08:00
coolsnowwolf
f903cc8970 target: generic: fix xt_FLOWOFFLOAD patches
Fixes: #11939, #11943
2024-03-03 15:53:49 +08:00
Beginner
d75705cfc4
kernel: bump 5.15 to 5.15.150 (#11938) 2024-03-03 00:10:26 +08:00
Beginner
256ab6f77f
kernel: bump 5.4 to 5.4.270 (#11942) 2024-03-03 00:01:06 +08:00
Beginner
c33693071d
kernel: bump 6.1 to 6.1.80 (#11934)
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.80

Manually rebased:
	rockchip/patches-6.1/102-net-phy-realtek-RTL8211-add-LED-configuration-from-OF.patch

Build system: x86/64
2024-03-02 16:55:46 +08:00
Beginner
ca1355ce87
kernel: bump 6.6 to 6.6.19 (#11933) 2024-03-02 15:25:33 +08:00
aiamadeus
e15446b4ce ipq60xx: add support for CMIOT AX18 2024-02-29 22:00:06 +08:00
coolsnowwolf
08ebc6e104 kernel: add support for mem2mem devices 2024-02-28 22:06:42 +08:00
coolsnowwolf
aef5c79f19 bcm27xx: add wireless support for Raspberry Pi 5 2024-02-28 14:19:49 +08:00
Mieczyslaw Nalewaj
05390b546e kernel: support for RTL8367C/S switch
From driver point of view no differance between rtl8367b and rtl8367s
if it connected through EXT2 (rgmii only).
So this trivial patch add some identification and initialization only.
SGMII/HSGMII mode for EXT1 is not implemented for the sake of patch
clairity.

Signed-off-by: Serge Vasilugin <vasilugin@yandex.ru>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
2024-02-27 22:00:14 +08:00
coolsnowwolf
06b4e7d34f package: bump up broadcom firmware 2024-02-26 21:38:13 +08:00
coolsnowwolf
92238a38e6 bcm27xx: switch to kernel v6.1
This patch adds support for Raspberry Pi 5.
2024-02-26 21:23:45 +08:00
Beginner
5945bf489f
kernel: bump 5.15 to 5.15.149 (#11915) 2024-02-25 00:10:19 +08:00
Beginner
5373f82d2c
kernel: bump 5.10 to 5.10.210 (#11914) 2024-02-25 00:06:04 +08:00
Beginner
4bd8570032
kernel: bump 5.4 to 5.4.269 (#11913) 2024-02-25 00:01:17 +08:00
Beginner
560cae946c
kernel: bump 6.6 to 6.6.18 (#11917) 2024-02-24 23:08:41 +08:00
Beginner
14468698a1
kernel: bump 6.1 to 6.1.79 (#11916) 2024-02-24 23:00:03 +08:00
Daniel Golle
5a1eaf2a0b mediatek: improve mt7981.dtsi
* re-factor WED components to boot fine also on limited loaders
 * add LEDs of integrated GE PHY

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-23 22:52:15 +08:00
Daniel Golle
40bd975f27 mediatek: filogic: improve pinctrl drivers
Set correct pull-type data and add additional uart groups for MT7981.
Assign functions to configure pin bias for MT7986.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-23 22:50:03 +08:00
Daniel Golle
eeae80a9d0 mediatek: replace hack for MaxLinear 2.5G PHY
Replace hack with proper patch also for Linux 5.15.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-22 23:06:24 +08:00
Daniel Golle
02c78e823a mediatek: dts: mt7988a: remove boottrap hack
The PHY driver now uses regmap created from pio syscon, we no longer
need the boottrap device.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-22 23:05:11 +08:00
coolsnowwolf
a61217134d kmod-crypto-sha512: fix kernel 6.6 support 2024-02-21 14:41:41 +08:00
coolsnowwolf
ca76a0ba65 qualcommax: ipq60xx: fixes boot issues 2024-02-20 20:20:10 +08:00
coolsnowwolf
1c57996f6f target: enable crypto-sha512 by default 2024-02-20 00:44:02 +08:00
coolsnowwolf
7f7562ee7c grub2: fix EFI support for armvirt 2024-02-20 00:18:02 +08:00
Christian Marangi
586df29178 kernel-build.mk: add support for compiling only DTS
Add support for compiling DTS for the selected target. This can be
useful for testing if the DTS correctly compile and doesn't produce any
error.

This adds a new make target. To compile only DTS use:

make target/linux/dtb

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-02-19 23:30:11 +08:00
Janusz Dziedzic
eaa0b4f0c3 linux-firmware: intel: add BE200 wifi firmware
Add option to install Intel BE200 firmware
required by iwlwifi driver and Wifi7 hardware.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@gmail.com>
2024-02-19 23:23:24 +08:00
coolsnowwolf
2948e7995a qualcommax: ipq60xx: add Redmi AX5 JDCloud support 2024-02-19 16:07:47 +08:00
coolsnowwolf
2229a47aee qualcommax: ipq60xx: add ZN M2 support 2024-02-19 15:35:33 +08:00
coolsnowwolf
98184c52b9 qualcommax: ipq60xx: add Xiaomi RM1800 (aka AX5) support 2024-02-19 15:00:00 +08:00
Beginner
0ea4b64304
kernel: bump 6.6 to 6.6.17 (#11895) 2024-02-17 19:30:11 +08:00
Beginner
6255b11d57
kernel: bump 6.1 to 6.1.78 (#11894) 2024-02-17 19:28:03 +08:00
Tony91590
735ea0d11e
mediatek: filogic: set special upgrade for Asus AX4200 (#11893) 2024-02-16 22:40:15 +08:00
Daniel Golle
87fe8bb382 mediatek: re-add missing patch for Linux 6.1
The patch was wrongly tagged as being part of Linux 6.0 even though it
was only committed with Linux 6.2 and hence needs to be backported for
Linux 6.1.

Fixes: fa79baf4a6 ("generic: copy backport, hack, pending patch and config from 5.15 to 6.1")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-15 23:05:35 +08:00
Daniel Golle
d6bd2cab60 mediatek: re-add dropped properties on BPi-R3
Unfortunately some device tree properties have slipped under the table
when switching from our downstream device tree.

Bring back 3W power for SFP cages and restore thermal trip points to
make sense again.

Fixes: 7a0ec001ff ("mediatek: sync MT7986 device trees with upstream")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-15 22:56:36 +08:00
Daniel Golle
12c2bc20d1 mediatek: use backported Ethernet PHY driver also for 5.15
Backport in-SoC Gigabit Ethernet PHY driver instead of carrying the
driver in files-5.15.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-14 22:51:25 +08:00
Daniel Golle
a7509fafb9 mediatek: dts: mt7988a: wire-up mediatek,pio for PHY LEDs
The PHY driver needs to read a register containing the values of the
bootstrap pins (which happen to be the PHY LEDs) to determine the LED
polarities. Allow regmap access to first pinctrl bank by adding the
'syscon' compatible, and reference the pinctrl in the MDIO bus where
the PHY driver will look for it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-14 22:46:26 +08:00
Daniel Golle
ebbf939276 mediatek: expose testing Linux 6.1 testing kernel
Set KERNEL_TESTING_PATCHVER:=6.1 to allow building all subtargets with
Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-13 22:11:05 +08:00
Daniel Golle
f2be6935f8 mediatek: adapt kernel configuration for Linux 6.1
Update kernel configuration to build Linux 6.1 for all subtargets.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-13 22:09:10 +08:00
Daniel Golle
1eef526cb9 mediatek: copy config-5.15 to config-6.1 for all subtargets
To ease review, first copy all subtargets' kernel config-5.15 to the
to-be-adapted config-6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-12 22:54:20 +08:00
Daniel Golle
e4165bcd1d mediatek: prepare old rtk switch driver for use with Linux 6.1
The old RealTek RTL8367S switch driver which is used for some MT7622
devices needs to be modified to no longer free the GPIO after reset
has completed.
This is due to Linux 5.19 removing devm_gpio_free via commit
2b038e786f83 ("gpiolib: devres: Get rid of unused devm_gpio_free()")

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-12 22:51:59 +08:00
Daniel Golle
a47cff2bc4 mediatek: use DEVICE_DTC_FLAGS and drop DTC_FLAGS
The MT7986 RFB was intended to use device tree overlays and for that
reason modified DTC_FLAGS. zyxel_ex5601-t0-stock later on probably
copied it from there. Both boards do not actually use device tree
overlays, so remove setting DTC_FLAGS from both.

The BPi-R3 does use device tree overlays, use DEVICE_DTC_FLAGS to give
it an extra 4kb of padding for overlays to be applied.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-11 23:10:55 +08:00
Daniel Golle
5f201f97e8 mediatek: use DEVICE_DTC_FLAGS for BPi-R64
Make sure there is an extra 4kb of padding to apply device tree overlays
on the BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-11 23:09:27 +08:00
Daniel Golle
2d309fec97 image: introduce DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS
Handle compiling device tree overlay blobs separate to allow for
overlays being compiled with different parameters, mostly to safe
space.
Allow defining DEVICE_DTC_FLAGS and DEVICE_DTCO_FLAGS as per-device
parameters to be passed to dtc. Previously some boards directly used
DTC_FLAGS in their build recipe which then also affected other boards.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-11 23:07:11 +08:00
Daniel Golle
b018b4df31 mediatek: set new compat version if booted on R64 and R3
If the board comes up with OpenWrt that means that the bootloader is
recent enough and knows about the new device tree overlays.

Using /etc/board.d/ is not enough in this case because it doesn't
overwrite existing configuration which may exist (and is fine to exist)
if the user updated with 'sysupgrade -F *.itb' and has kept
configuration. They would still need to manually set compat_version
even though the fact that the bootloader env has been updated can be
implied by the fact that the system has started.

Hence we can always set compat_version=1.1 for those two boards using
uci-defaults.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-11 23:05:20 +08:00
Daniel Golle
4115f464ae generic: use only first element in bootconf for uImage.FIT
Now that it is possible to load several device tree overlays by
appending their config names to bootconf the uImage.FIT partition
parser need to discard everything after the first '#' character in
bootconf when looking up the config node to be used.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-10 22:55:04 +08:00
Daniel Golle
9f86d11f16 kernel: update FIT partition parser to new property name
The commit "uboot-mediatek: replace patch with accepted commit" changed
the name of the boot configuration property from 'bootconf' to
'u-boot,bootconf'. Reflect this change in the FIT partition parser.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-10 22:52:26 +08:00
Daniel Golle
801b8fdb85 mediatek: adapt files and patches for Linux 6.1
With Linux 6.1 many of our downstream patches and out-of-tree files
can be removed or at least replaced by backported upstream commits.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[fix CMDLINE_OVERRIDE for arm64]
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2024-02-09 21:06:36 +08:00
Daniel Golle
69ebf02aa6 mediatek: copy patches and files for Linux 6.1
First step only copies patches-5.15 and files-5.15 to
patches-6.1 and files-6.1 respectively.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-09 21:02:10 +08:00
Daniel Golle
1dbf719902 mediatek: sync MT7986 device trees with upstream
Sync device tree files for MT7986 boards with what landed in upstream
Linux tree to easy maintainance and also allow for a smooth update to
Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-08 21:21:12 +08:00
Daniel Golle
db27068259 kernel: generic: improve FIT partition parser
* only map filesystems configured in 'loadables'
 * allow mapping more than one filesystem (e.g. customization/branding
   or localization in addition to rootfs)
 * small cleaning here and there

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-08 20:56:37 +08:00
arrio464
24e2cfc64f
upx: bump to v4.2.2 (#11878) 2024-02-07 19:41:57 +08:00
Beginner
0d84afc31a
kernel: bump 6.6 to 6.6.16 (#11875) 2024-02-07 12:07:27 +08:00
Beginner
2e862778a3
kernel: bump 6.1 to 6.1.77 (#11874) 2024-02-07 12:02:03 +08:00
Daniel Golle
0e8b0cf63d image: improve uImage.FIT device tree overlay support
Instead of generating full config nodes incl. kernel, generate minimal
config nodes for device tree overlays to be applied to the main config.
In this way, multiple device tree overlays can be applied more easily.
While at it change filenames to upstream style, ie. use dtso and dtbo
suffix for device tree overlays.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-06 13:38:35 +08:00
Daniel Golle
b87a11fc43 kernel: generic: use chosen bootconf in FIT partition parser
If the selected boot configuration is stored by U-Boot in '/chosen'
node as 'bootconf' attribute, use that configuration to resolve the
block device used as rootfs. Fall back to use the default configuration
in case 'bootconf' is not present.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-05 23:00:35 +08:00
Daniel Golle
9072333533 generic: deny write to uImage.FIT sub-image partitions
Set policy bit to force read-only mode on uImage.FIT filesystem
sub-images mapped as block partitions by the FIT partition parser.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-05 22:58:59 +08:00
Daniel Golle
9ea2a9923a mediatek: use updated device tree overlay mechanism for BPi-R64
Use new device tree overlay mechanism for the BananaPi BPi-R64 board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-04 22:54:40 +08:00
Daniel Golle
faded141e2 uboot-mediatek: adapt BPi-R3 and BPi-R64 to new device tree overlay
Update bootloader environment for BPi-R3 and BPi-R64 to adapt to new
device tree overlay mechanism now that support for multiple device
tree overlays has been added.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-04 22:50:57 +08:00
coolsnowwolf
eb3e9ad2e3 mediatek: filogic: add support for CMCC RAX3000M (NAND and eMMC version) 2024-02-03 21:31:05 +08:00
aiamadeus
6606bb39b6 mediatek: add support for ABT ASR3000 2024-02-03 15:10:15 +08:00
Ivan Pavlov
64f24a2334 openssl: update to 3.0.13
Major changes between OpenSSL 3.0.12 and OpenSSL 3.0.13 [30 Jan 2024]

  * Fixed PKCS12 Decoding crashes
    ([CVE-2024-0727])
  * Fixed Excessive time spent checking invalid RSA public keys
    ([CVE-2023-6237])
  * Fixed POLY1305 MAC implementation corrupting vector registers on PowerPC
    CPUs which support PowerISA 2.07
    ([CVE-2023-6129])
  * Fix excessive time spent in DH check / generation with large Q parameter
    value ([CVE-2023-5678])

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2024-02-03 15:03:01 +08:00
coolsnowwolf
9ccbfda2bb Version update to R24.2.2 2024-02-02 22:26:03 +08:00
Beginner
458735dec7
kernel: bump 6.6 to 6.6.15 (#11857) 2024-02-02 11:01:16 +08:00
Beginner
e3811adc69
kernel: bump 6.1 to 6.1.76 (#11858) 2024-02-02 11:00:06 +08:00
Daniel Golle
d1f7b7d26d kernel: modules: package MT7986 audio drivers
Packages the audio drivers for the MediaTek MT7986 SoC used with
Wolfson WM8960 codec.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-01 22:19:58 +08:00
Daniel Golle
e930707404 kernel: modules: break-out WM8960 codec module
Package codec module for WM8960 in its own package to be used by more
than one target.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-02-01 22:15:16 +08:00
Arimune
299db83def
Add support for Marvell 88W8897 SDIO (#11853) 2024-01-31 12:26:54 +08:00
aiamadeus
2843c0b911 gpio-button-hotplug: fix probe failed 2024-01-31 11:20:35 +08:00
aiamadeus
e0ea643c5b ipq60xx: add 1.5GHz CPU frequency 2024-01-31 11:18:11 +08:00
aiamadeus
6c52d1ded1 ipq60xx: add GL.iNet GL-AX1800 support 2024-01-31 00:30:15 +08:00
coolsnowwolf
e4dedaf402 Add support to build qualcommax image 2024-01-30 18:04:25 +08:00
coolsnowwolf
5a74937732 ath11k-firmware: add ipq6018 support 2024-01-30 17:50:32 +08:00
coolsnowwolf
b7fcf33b05 ipq60xx: rename target to qualcommax 2024-01-30 17:30:36 +08:00
coolsnowwolf
8fcf7f0915 ipq807x: rename target to qualcommax 2024-01-30 11:38:39 +08:00
coolsnowwolf
cabbb92abd mac80211: ath11k: add ipq60xx support 2024-01-29 21:50:11 +08:00
coolsnowwolf
8bad26fbd3 package: support qualcommax target 2024-01-29 21:30:23 +08:00
coolsnowwolf
2feb51efeb Fix k3-firmware dependencies 2024-01-29 21:24:06 +08:00
coolsnowwolf
8a89f464cb x86: fix sysupgrade failure 2024-01-28 16:09:53 +08:00
coolsnowwolf
7fd1b241b4 Fix photonicat-firmware dependencies 2024-01-28 15:40:16 +08:00
Beginner
053f193d01
kernel: bump 6.1 to 6.1.75 (#11830) 2024-01-27 08:03:21 +08:00
Beginner
ab07e6a93e
kernel: bump 5.4 to 5.4.268 (#11834) 2024-01-27 08:02:23 +08:00
Beginner
edb87675dd
kernel: bump 5.15 to 5.15.148 (#11832) 2024-01-27 08:01:24 +08:00
Beginner
a96f1c3ec1
kernel: bump 5.10 to 5.10.209 (#11833) 2024-01-27 08:00:35 +08:00
coolsnowwolf
87b840818c mt76: add linux kernel 6.6 support 2024-01-26 17:58:35 +08:00
coolsnowwolf
460dc30390 rockchip: add photonicat-firmware for photonicat wireless 2024-01-26 17:42:01 +08:00
coolsnowwolf
4b0ca23c81 kernel: refresh kernel 6.6 config 2024-01-26 13:13:56 +08:00
aakkll
781ce8d148
kernel: bump 6.6 to 6.6.14 (#11827)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2024-01-26 12:42:34 +08:00
coolsnowwolf
14e928eeaf modules: fix usb-net support for kernel 6.6 2024-01-25 20:29:27 +08:00
coolsnowwolf
e7298575b9 modules: fix nfs and ksmbd build with kernel 6.6 2024-01-25 20:17:05 +08:00
coolsnowwolf
6022ecc6bc modules: fix nls.mk support for linux 6.6 2024-01-25 20:00:54 +08:00
coolsnowwolf
9745339664 x86: add linux kernel 6.6 support 2024-01-25 12:02:56 +08:00
coolsnowwolf
7515f84eae ipq806x: switch to kernel 5.10 2024-01-24 15:25:36 +08:00
coolsnowwolf
b23965cfb7 linux-firmware: update to 20231211 2024-01-24 15:08:25 +08:00
Beginner
a5823d43b1
kernel: bump 6.6 to 6.6.13 (#11817) 2024-01-23 00:30:12 +08:00
Beginner
b15250f0b3
kernel: bump 5.10 to 5.10.208 (#11815) 2024-01-23 00:20:07 +08:00
coolsnowwolf
1975f13219 umbim/uqmi: sync with upstream 2024-01-22 19:28:44 +08:00
coolsnowwolf
311b20a4cd uqmi: fix build with arm64 in GCC11 2024-01-22 14:39:21 +08:00
HHJLKK
ce91432bb0
mediatek: add support for IMOU LC-HX3001 (#11812) 2024-01-21 16:00:17 +08:00
CheWei Chien
64ed808de5 kernel: add kmod-leds-lp5562 and lp55xx-common
Add kernel module for lp5562 LED driver.
The kmod-leds-lp5562 depends on kmod-leds-lp55xx-common.

Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
2024-01-21 15:00:34 +08:00
coolsnowwolf
627477a4f7 toolchain: gdb: fix optional python support 2024-01-20 21:43:17 +08:00
GaoJinpei
9219eb1d1d
uqmi: fix build errors (#11801) 2024-01-18 17:40:58 +08:00
coolsnowwolf
ab582e396e
Update README.md for Phytium 2024-01-18 15:18:55 +08:00
HunZI
a462d2b757
target: add phytium support (#11798)
* target: add phytium support

* kernel/video: add phytium platform ARM GPU support

* config: add EFI support to phytium armv8

* target: phytium: remove rtl8821cs driver

* target: phytium: refresh dts
2024-01-18 15:16:24 +08:00
John Audia
03b416d21f kernel: bump 5.15 to 5.15.147
Manually rebased:
	generic/backport-5.15/005-v5.17-01-Kbuild-use-Wdeclaration-after-statement.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-18 11:05:16 +08:00
Christian Marangi
390d8c540e generic: 6.1: backport FIELD_PREP_CONST patch
Backport FIELD_PREP_CONST patch needed for at803x backport patches to
correctly compile and work.

This MACRO is needed to treat values derived from FIELD_PREP usage as
const to be used by switch case or other needed usage.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-18 11:00:57 +08:00
Christian Marangi
386201a323 generic: 6.1: renumber MediaTek SGMII PCS patch
Renumber MediaTek SGMII PCS patch to make space for upcoming at803x
backport patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2024-01-18 10:58:12 +08:00
Chen Minqiang
93fc272fcb kernel: ksmbd: only v2 leases handle the directory
This backport a fix for ksmbd.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2024-01-18 10:56:14 +08:00
Miles Poupart
5ed3a14e0d
bpf-headers: Fix download URL with kernel 6.1 (#11794)
This fixes the download of the kernel 5.15 for the bpf-headers when
kernel 6.1 is build for the target.

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

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

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2024-01-17 08:09:51 +08:00
aakkll
eb030b2124
kernel: bump 5.4 to 5.4.267 (#11795) 2024-01-17 01:28:41 +08:00
coolsnowwolf
9d7e32349c kernel: bump 6.1 to 6.1.73 2024-01-16 23:00:01 +08:00
Miles Poupart
19dba8a52e
dwarves: bump to 1.25 (#11793)
* dwarves: bump to 1.25

* tools: update elf.h

OpenWrt contains a 2012 copy of glibc's elf.h, which predates the
introduction of some newer architectures like Arm64 and RISC-V.

Linux 5.13 introduced the "gen-hyprel" tool into the kernel compile
(when virtualization/KVM is enabled) which requires EM_AARCH64 to be
defined.

arch/arm64/kvm/hyp/nvhe/gen-hyprel.c: In function 'init_elf':
arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:289:43: error: 'EM_AARCH64'
  undeclared (first use in this function); did you mean 'EM_IA_64'?
  289 |  assert_eq(elf16toh(elf.ehdr->e_machine), EM_AARCH64, "%u");
      |                                           ^~~~~~~~~~

Update the copy of elf.h from the latest glibc to fix this.

Compile-tested: ath79, armvirt, mpc85xx, x86
Run-tested: armvirt

Signed-off-by: Mathew McBride <matt@traverse.com.au>

---------

Signed-off-by: Mathew McBride <matt@traverse.com.au>
Co-authored-by: Mathew McBride <matt@traverse.com.au>
2024-01-16 22:48:52 +08:00
coolsnowwolf
32a89b611e generic: fix kernel 6.1 FLOWOFFLOAD for iptables support 2024-01-16 22:28:12 +08:00
coolsnowwolf
e302ace38d generic: refresh xt_FLOWOFFLOAD patch with new API 2024-01-15 17:40:44 +08:00
aakkll
cac1207d80 kernel: bump 6.1 to 6.1.72 (#11769) 2024-01-15 17:29:43 +08:00
coolsnowwolf
156a1b67dd netsupport.mk: add missing Kconfig for sched 2024-01-15 17:28:00 +08:00
coolsnowwolf
4ad82acf0e revert: package: adds pcre2 to base 2024-01-15 02:43:54 +08:00
coolsnowwolf
766b0bc369 Version update to R24.1.13 2024-01-15 02:37:48 +08:00
coolsnowwolf
1f7b499eb1 Revert "kernel: bump 6.1 to 6.1.72 (#11769)"
This reverts commit 2c67f6832d.
2024-01-15 02:15:50 +08:00
coolsnowwolf
945b472e91
Update README.md loongarch64 info 2024-01-15 01:40:12 +08:00
coolsnowwolf
c2b9dbf31a loongarch64: add wireless support by default 2024-01-15 01:27:42 +08:00
coolsnowwolf
c24837295d mac80211: add loongarch64 and kernle 6.6 support 2024-01-15 01:15:20 +08:00
coolsnowwolf
f1803bc468 loongarch64: fix image build 2024-01-14 23:35:58 +08:00
coolsnowwolf
4fb7370e09 generic: fix loogarch64 kernel modules build 2024-01-14 23:16:29 +08:00
coolsnowwolf
eadf20fda4 toolchain/musl: add loogarch64 support 2024-01-14 22:45:29 +08:00
coolsnowwolf
f4405a9597 tools/zstd: update to 1.5.5 2024-01-14 21:47:34 +08:00
aakkll
2c67f6832d
kernel: bump 6.1 to 6.1.72 (#11769) 2024-01-14 18:08:32 +08:00
coolsnowwolf
6c05d9908c package: fix compilation with musl 1.2.4 2024-01-13 23:21:42 +08:00
coolsnowwolf
b1816c7d0c gpio-button-hotplug: fix kernel 5.4 support 2024-01-13 13:50:40 +08:00
coolsnowwolf
ce521963da package: adds pcre2 to base 2024-01-13 13:43:43 +08:00
coolsnowwolf
648202bb8a e2fsprogs: Update to 1.45.6 2024-01-13 13:23:49 +08:00
coolsnowwolf
87b3c3e105 kernel: bump 5.4 to 5.4.266 2024-01-13 12:57:22 +08:00
coolsnowwolf
bfb12d78cd toolchain/musl: update to 1.2.4 2024-01-12 14:20:18 +08:00
coolsnowwolf
51459ab19e toolchain: gdb: Add optional python support 2024-01-12 13:28:00 +08:00
coolsnowwolf
f426fce6c1 video.mk: add AMD Displaycard (RX580) support for loongarch64 2024-01-12 10:34:28 +08:00
coolsnowwolf
a5a63865ff target: add loongarch64 support 2024-01-12 10:23:48 +08:00
coolsnowwolf
b055b3b409 generic: init linux kernel 6.6 support 2024-01-12 10:18:22 +08:00
coolsnowwolf
c6c5c79e3d target.mk: add GRUB2 EFI support for loongarch64 2024-01-12 10:13:05 +08:00
coolsnowwolf
9c8d196759 toolchain/gcc: add loongarch64 new target 2024-01-11 21:14:49 +08:00
coolsnowwolf
253878b854 include: add loongarch64 new target 2024-01-11 20:56:50 +08:00
coolsnowwolf
4103edf7b6 tools: add util-linux 2024-01-11 20:45:33 +08:00
coolsnowwolf
01edff43e4 gpio-button-hotplug: fix kernel 6.2+ build failure 2024-01-11 20:38:46 +08:00
coolsnowwolf
29c2367cac cryptodev-linux: update to 1.13 2024-01-11 20:36:11 +08:00
coolsnowwolf
7fa5e13df5 openssl: add linux64-loongarch64 into the targets list 2024-01-11 20:31:15 +08:00
coolsnowwolf
39d6ad7040 grub2: add loongarch64 support 2024-01-11 20:18:46 +08:00
coolsnowwolf
df3c79e2b4 toolchain/binutils: switch to version 2.40 by default 2024-01-11 20:12:59 +08:00
coolsnowwolf
c0bfa64daa toolchain: glibc: Update to glibc 2.37 2024-01-11 11:40:01 +08:00
coolsnowwolf
229e5e43f2 binutils: update to 2.41 2024-01-11 11:30:49 +08:00
coolsnowwolf
321f1572f4 toolchain/binutils: add support for version 2.41 2024-01-11 11:27:44 +08:00
coolsnowwolf
be9cb16c86 toolchain: gcc: add support for GCC 13 2024-01-11 11:22:30 +08:00
David Bauer
cbcb695937 mac80211: avoid crashing on invalid band info
Frequent crashes have been observed on MT7916 based platforms. While the
root of these crashes are currently unknown, they happen when decoding
rate information of connected STAs in AP mode. The rate-information is
associated with a band which is not available on the PHY.

Check for this condition in order to avoid crashing the whole system.
This patch should be removed once the roout cause has been found and
fixed.

Signed-off-by: David Bauer <mail@david-bauer.net>
2024-01-10 22:24:11 +08:00
Felix Fietkau
6f40d7387d mediatek: fix BPI-R3 wifi mac address
Setting/clearing bits on the first byte of the mac address causes collisions
when using multiple SSIDs on both PHYs. Change the allocation to alter the
last byte instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2024-01-10 22:18:51 +08:00
John Audia
135a4e9540 kernel: bump 5.15 to 5.15.146
Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.146

All other patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-01-09 22:58:11 +08:00
aiamadeus
89e25b571e mediatek: add missing nmbm for RG-X60 Pro
The original firmware has nmbm enabled.
2024-01-09 22:51:07 +08:00
Ashley Lee
e2a09540eb
mediatek: add support for Ruijie RG-X60 Pro (#11745)
Informations:
- SoC       : MediaTek MT7986A 2.0GHz
- RAM       : DDR3 512MiB (W634GU6QB)
- Flash     : SPI-NAND 128 MiB (W25N01GVZEIG)
- WLAN      : MediaTek MT7986A integration dual-band WiFi 6
  - 2.4 GHz : b/g/n/ax, MIMO 4x4
  - 5 GHz   : a/n/ac/ax, MIMO 4x4
- Ethernet  : 10/100/1000 Mbps x4 (MediaTek MT7531AE)
              2500Mbps x 1 (Realtek RTL8221B-VB-CG)
- UART      : through-hole on PCB
  - [J500] GND, TX, RX, 3.3V (115200n1)
- Buttons   : Mesh, Reset
- LEDs      : 1x Power (Blue)
                  1x Turbo (Purple)
- Power     : 12 VDC, 3 A

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

Signed-off-by: Ashley Lee <code@emtips.net>
2024-01-05 18:30:25 +08:00
Daniel Golle
4fa8c8b72f kernel: include MT7988 Ethernet support in Linux 6.1
Import pending patches adding Ethernet support for MT7988 which are
already present in pending-5.15 also to pending-6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-01-03 21:38:29 +08:00
Daniel Golle
7f1d1eed6f kernel: backport MT7988 DSA support for Linux 6.1
Patches adding DSA support for MT7988 have been backported to
Linux 5.15 but not to Linux 6.1. Import backports also to Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2024-01-03 21:32:57 +08:00
Hex
606b5ae2ee
x86: increase bios boot partition to 1 MiB (#11741) 2023-12-31 12:40:25 +08:00
Daniel Golle
0609f6dbc4 mediatek: use cpufreq fix suggested by MediaTek
Use suggested fix for mediatek-cpufreq, patch will also be sent
upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-29 22:30:08 +08:00
Sam Shih
d58209efb8 mediatek: add basic mt7988 device tree support
This add basic device tree support for mediatek MT7988 SoC

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-29 22:28:01 +08:00
Sam Shih
bd6b41e301 mediatek: add mt7988 pinctrl driver support
This adds provisional pinctrl driver support for the MediaTek MT7988 SoC.

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-28 23:28:24 +08:00
Sam Shih
ba49394aee mediatek: add mt7988 clock drivers support
This adds clock drivers for the MediaTek MT7988 SoC

Signed-off-by: Sam Shih <sam.shih@mediatek.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-28 23:26:48 +08:00
Miles Poupart
4a683e0510
kmod-media-core: update kconfig (#11735) 2023-12-25 22:40:15 +08:00
aiamadeus
4d6eb48844 github: update issue and pr template 2023-12-25 22:09:03 +08:00
Beginner
138efb16b4
kernel: bump 5.15 to 5.15.145 (#11733) 2023-12-24 00:25:24 +08:00
Beginner
60707924cc
kernel: bump 5.15 to 5.15.144 (#11728)
Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com>
2023-12-22 15:47:09 +08:00
Beginner
d0f140b6c3
kernel: bump 5.10 to 5.10.205 (#11730)
Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com>
2023-12-22 15:43:59 +08:00
Beginner
ccadf36e98
kernel: bump 5.4 to 5.4.265 (#11723) 2023-12-22 10:30:11 +08:00
Beginner
6731232433
kernel: bump 6.1 to 6.1.69 (#11729) 2023-12-22 10:26:57 +08:00
aiamadeus
14fb304fd4 mac80211: refresh all patches
Signed-off-by: AnYun <amadeus@openjmu.xyz>
2023-12-21 22:15:19 +08:00
aiamadeus
794fa1345e mac80211: ath11k: sync with upstream linux
Signed-off-by: AnYun <amadeus@openjmu.xyz>
2023-12-21 22:09:13 +08:00
Daniel Golle
46583553b7 base-files: add mmc_get_mac_ascii function
Similar to the *_get_mac_binary function, also split the common parts
off mtd_get_mac_ascii into new get_mac_ascii function and introduce
mmc_get_mac_ascii which uses it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-12-20 23:10:30 +08:00
Martin Schiller
c7ee906425 u-boot.mk: do not force parallel build
Some patched u-boots may have problems with parallel build.
Do not enforce parallel build here so one can set PKG_BUILD_PARALLEL:=0
in the specific u-boot Makefile also before including the u-boot.mk.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
2023-12-20 23:06:58 +08:00
lunatickochiya
2baf4cdc28
fibocom_qmi: fixes build error (#11718) 2023-12-19 15:10:25 +08:00
Beginner
ba3c8ab2f3
kernel: bump 5.10 to 5.10.204 (#11721) 2023-12-19 10:30:35 +08:00
Beginner-Go
b36db4e355 kernel: refresh 5.15 patches (#11715) 2023-12-18 22:25:24 +08:00
Beginner
fae6bc8dd8
kernel: refresh 5.10 patches (#11719)
Fixes: #11712
2023-12-18 10:25:13 +08:00
coolsnowwolf
67dcd38678 kernel: bump 5.15 to 5.15.143 2023-12-17 15:38:17 +08:00
HHJLKK
783f460c97
kernel: fixes usb-audio depends (#11713)
Fixes: #11703
2023-12-17 12:25:25 +08:00
aakkll
a316972306
kernel: bump 6.1 to 6.1.68 (#11708) 2023-12-16 12:08:02 +08:00
aakkll
0d2cce288a
kernel: bump 5.4 to 5.4.264 (#11711) 2023-12-16 12:06:10 +08:00
Beginner
37d1429872
kernel: bump 5.10 to 5.10.201 (#11710) 2023-12-16 12:04:17 +08:00
Beginner
3358c91e43
kernel: bump 5.15 to 5.15.142 (#11709) 2023-12-16 12:02:58 +08:00
aiamadeus
1cd3b4e4d0 mediatek: add support for FZS P3 2023-12-15 21:08:13 +08:00
coolsnowwolf
ed7014bfe0 doc: update build dependence 2023-12-13 22:01:28 +08:00
coolsnowwolf
65d8795b3d rockchip: fix kernel 6.1 patch for dfi 2023-12-10 03:00:16 +08:00
coolsnowwolf
3f6bb72ee8 rockchip: add more opp-microvol for new(?) type NanoPi R2S 2023-12-10 02:26:58 +08:00
aakkll
4efca503b9
kernel: bump 5.4 to 5.4.263 (#11695) 2023-12-09 13:09:25 +08:00
aakkll
93443d24b4
kernel: bump 6.1 to 6.1.66 (#11694) 2023-12-09 13:08:34 +08:00
Ikko Eltociear Ashimine
62daffa7a2
docs: add Japanese readme (#11693) 2023-12-08 15:09:24 +08:00
coolsnowwolf
22134ba184 ipq95xx: add initial target support 2023-12-07 22:40:13 +08:00
coolsnowwolf
276ea289ec mediatek: add device pacakges for JDCloud AX6000 2023-12-07 17:34:12 +08:00
coolsnowwolf
09d5ae78b4 mediatek: add support for JDCloud AX6000 2023-12-06 22:08:30 +08:00
Marty Jones
8c95f404aa kernel: backport fixes for realtek r8152
Fixes issues with RTL8156 2.5G USB adapters

- # ethtool eth1
Settings for eth1:
        Supported ports: [ ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Supported FEC modes: Not reported
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        MDI-X: Unknown
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes
- #

- r8152: break the loop when the budget is exhausted
- r8152: Block future register access if register access fails
- r8152: Rename RTL8152_UNPLUG to RTL8152_INACCESSIBLE
- r8152: add vendor/device ID pair for D-Link DUB-E250
- r8152: try to use a normal budget
- r8152: set bp in bulk
- r8152: adjust generic_ocp_write function
- r8152: fix the autosuspend doesn't work
- r8152: Add __GFP_NOWARN to big allocations
- r8152: reduce the control transfer of rtl8152_get_version()
- r8152: remove rtl_vendor_mode function
- r8152: avoid to change cfg for all devices
- r8152: add USB device driver for config selection
- r8152: use napi_gro_frags
- cdc_ether: no need to blacklist any r8152 devices
- cdc_ether: add u-blox 0x1313 composition

Build system: x86_64
Build-tested: bcm2711, rockchip, x86/64
Run-tested: bcm2711/RPi4B, rockchip/nanopi r2s, x86/64

Signed-off-by: Marty Jones <mj8263788@gmail.com>
2023-12-05 22:14:38 +08:00
David Bauer
d7d01fb74d uboot-envtools: fix GL-MT2500 offset
The previous offsets did also work, as they've wrapped back to 0x0.
However, in reality the environment starts at offset 0x0 of the
u-boot-env MMC partition.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-12-04 21:36:56 +08:00
shiyu1314
f3df2a6bd3
meson: auto-repartition for EMMC (#11679) 2023-12-02 16:08:05 +08:00
John Audia
b512ed9bbb x86/64: set CONFIG_NVME_HWMON=y
CONFIG_NVME_HWMON exposes /sys/class/nvme/nvme0/device/hwmon
to allow sensors (and others) to see NVMe drive health
2023-11-29 22:50:03 +08:00
aiamadeus
1c5492a0c4 x86: increase default swiotlb size to 64MB
Since 802.11be is available, increased default swiotlb size from
32 to 64MB to support up to 2x Qualcomm WiFi 6E/7 network cards.
2023-11-29 22:40:45 +08:00
John Audia
91bce87de4 x86: set CONFIG_X86_AMD_PLATFORM_DEVICE
Needed by AMD processors using Carrizo and later chipsets

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-11-28 22:59:02 +08:00
Jitao Lu
fc458fe8c3 linux-firmware: intel: add firmware for AX101
iwlwifi from 6.5 supports API version up to 83, but 81 is the latest one
available from linux-firmware 20230804.

Signed-off-by: Jitao Lu <dianlujitao@gmail.com>
2023-11-28 22:40:22 +08:00
Carter Wang
54d1ca443d uboot-mediatek: Fix ubi command in commands
Fix typo 'ubi remote ...' -> 'ubi remove ...'.

Signed-off-by: Carter Wang <carter.wang@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-27 22:16:05 +08:00
David Bauer
4fa8f64776 mediatek: add support for GL.iNet GL-MT2500
Hardware
--------
SoC:  MediaTek MT7981BA
RAM:  1GB DDR4 (NANYA NT5AD512M16C4-JR)
MMC:  8GB eMMC (Samsung 8GTF4R)
ETH:  1000Base-T LAN (ePHY)
      2500Base-T WAN (MaxLinear GPY211C)
BTN:  1x Reset Button
LED:  System (blue/white)
      VPN (white)
USB:  1x USB-A (USB 3.0)
UART: 115200 8N1 - Pinout on board next to LAN port
      Don't connect 3.3V!

Known Issues
------------
U-Boot vendor recovery does not seem to accept any images, neither
GL.iNet images nor OpenWrt images. Recovery requires serial access!

Installation
------------
Upload the OpenWrt sysupgrade image to the Gl.iNet Web-UI. Make sure to
not retain existing settings.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-27 22:10:03 +08:00
Daniel Golle
16a099f5d6 mediatek: sync MT7988 USXGMII with SDK driver
The USXGMII driver in SDK was heavily refactored, some bugs have been
fixed and it has switched to use phylink_pcs. Follow up with changes
in SDK driver and sync our on-top-of-mainline driver with the SDK
driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-24 23:22:37 +08:00
Daniel Golle
4b44ca4957 mediatek: add driver for built-in 2.5G Ethernet PHY
Add driver for the built-in 2.5G Ethernet PHY found in the MT7988 SoC.
To function the PHY also needs firmware files which have not yet been
published via linux-firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-24 23:20:03 +08:00
Daniel Golle
cce9d689eb mediatek: update pending SoC Ethernet PHY driver
Update driver for MediaTek's built-in Gigabit Ethernet PHYs which can be
found in the MT7981 and MT7988 SoCs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-24 23:18:04 +08:00
Daniel Golle
a4956e53d0 mediatek: fix, clean and unify SD card image generation
Make sure sub-images on the SD card are size-checked, allow
generating SD card without squashfs and/or initramfs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-23 22:30:10 +08:00
Daniel Golle
c10f7e39e6 mediatek: mt7623: build SD card without all filesystems
Allow building SD card images without having both initramfs and squashfs
present on the card, just like it has already been done for the mt7622
and filogic subtargets.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-23 22:28:55 +08:00
Daniel Golle
0ad15c2b02 mediatek: backport cpufreq changes to support MT7988
Backport cpufreq changes from upstream so that the MediaTek MT7988 SoC
can be supported.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-22 22:59:06 +08:00
Daniel Golle
ac4e3b75ad mediatek: filogic: add driver for Richtek RT5190A regulator
The Richtek RT5190A is used on the MT7988 reference board. Backport and
enable the driver on the filogic subtarget, so we can support cpufreq
on the MT7988 reference board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-22 22:56:08 +08:00
Daniel Golle
36fccf085d generic: mt7530: backport support for the MT7988 built-in switch
Backport commits adding support for the MT7988 built-in switch to the
mt7530 driver.

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

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

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-21 22:32:40 +08:00
Daniel Golle
40e94fc5fd generic: add support for MediaTek NETSYS v3
In order to support Ethernet on the MT7988 SoC add support for NETSYS v3
as well as new paths and USXGMII SerDes to the mtk_eth_soc driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-21 22:20:37 +08:00
coolsnowwolf
de47a6a5c4 rockchip: add uboot-envtools support for T68M 2023-11-20 13:25:09 +08:00
Ilya Katsnelson
a4c684fd02 build: replace true with a custom noop script
`true` might be a shell built-in, or simply not accessible in the hardcoded locations.
Replace it with a custom script that does nothing.

Signed-off-by: Ilya Katsnelson <me@0upti.me>
2023-11-19 22:54:50 +08:00
Daniel Golle
1c4dfe2b19 kernel: add support MeigLink SLM828 modem
Another Qualcomm-based USB-connected modem, offering endpoints
 0 : rndis_host (link to voip subsystem listening on 169.254.5.100)
 1 : rndis_host (?)
 2 : option (?)
 3 : option (at)
 4 : option (at)
 5 : option (?)
 6 : GobiNet (qmi)
 7 : ?

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

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-11-19 22:51:46 +08:00
coolsnowwolf
8578eed80e Revert "autocore: unify wifi signal view"
This reverts commit 30783ee204.
2023-11-17 14:28:30 +08:00
coolsnowwolf
b2baa9ea19 treewide: disable GL.iNet’s devices support
This is required by their group admin, since
they can represent the GL.iNet official.
2023-11-17 14:25:01 +08:00
coolsnowwolf
e14b03b6c2 kernel: fix linux 5.4 hash typo
Fixes: #11661
2023-11-14 20:09:47 +08:00
aakkll
d8ad8adc3b
kernel: bump 5.15 to 5.15.138 (#11658)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-11-13 17:47:28 +08:00
aakkll
b9ceecfd2c
kernel: bump 6.1 to 6.1.62 (#11656)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-11-13 17:35:13 +08:00
aakkll
03ef1793db
kernel: bump 5.4 to 5.4.260 (#11657)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-11-13 17:34:53 +08:00
Rani Hod
59e66205ed bcm53xx: build a single device per profile
So far every build of a single bcm53xx Target Profile (it means: when
NOT using CONFIG_TARGET_MULTI_PROFILE) resulted in all target devices
images being built. Now it only builds the one matching selected
profile.

Suggested-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Rani Hod <rani.hod@gmail.com>
[rmilecki: update commit subject + body & move PROFILES line]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2023-11-12 00:10:31 +08:00
David Bauer
fbaaae5d55 ramips: fix mt7621 kernel compilation
The OF LED configuration patch fails on MT7621, as the necessary headers
were only included for the mediatek subtarget with an additional patch.

Fixes: 242fe8634eba ("generic: add hack for MT753x LED configuration")

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-11 23:58:28 +08:00
David Bauer
b8fe2aca01 mediatek: configure TUF-AX4200 LAN LEDs
As we can now configure the switch LED configuration, write the switch
LED configuration values from the vendor firmware to the switch-IC.

Previously, the switch-LEDs did not show any acitvity or link-status
whatsoever.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-11 23:57:51 +08:00
David Bauer
bcef100d36 mediatek: apply stock configuration for WAN-LED
Apply the same LED configuration used by the vendor-firmware for the
GPY211 controlled WAN LED in OpenWrt.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-11 23:56:29 +08:00
David Bauer
74d0214003 generic: add hack for MT753x LED configuration
This adds a small hack similar to the one used for ar8xxx switches to
read a reg:value map for configuring the LED configuration registers.

This allows OpenWrt to write device-specific LED action as well as blink
configurations. It is unlikely to be accepted upstream, as upstream
plans on integrating their own framework for handling these LEDs.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-11 23:55:20 +08:00
David Bauer
39b2d130e5 generic: mt7530: enable PHY configuration using OF
The MT753x switches provide a switch-internal MDIO bus for the embedded
PHYs.

Register a OF sub-node on the switch OF-node for this internal MDIO bus.
This allows to configure the embedded PHYs using device-tree.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-11-11 23:54:04 +08:00
aiamadeus
bc4708a64c r8125: update to 9.012.03-1
Closed: #11646
2023-11-07 22:40:35 +08:00
aiamadeus
3dac5fb33d r8152: update to 2.17.1-3 2023-11-07 22:39:05 +08:00
aiamadeus
a1a1c8a10c r8168: update to 8.052.01 2023-11-07 22:37:05 +08:00
coolsnowwolf
f852316284 mediatek: fix gl-mt6000 wireless 2023-11-06 22:15:40 +08:00
aakkll
2e5b2e92c3
kernel: bump 6.1 to 6.1.61 (#11637)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-11-05 02:22:20 +08:00
coolsnowwolf
30783ee204 autocore: unify wifi signal view 2023-11-04 15:35:01 +08:00
coolsnowwolf
8a4651f110 mediatek: add led aliases for GL.iNet GL-MT6000 2023-11-04 15:24:57 +08:00
Brian Norris
104c0575ef base-files: Align rootfs_data upgrades to 64KiB on eMMC
Rootfs overlays get created at a ROOTDEV_OVERLAY_ALIGN (64KiB)
alignment after the rootfs, but emmc_do_upgrade() is assuming
it comes at the very next 512-byte sector.

Suggested-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
(move spaces around, mention fstools' libtoolfs)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-11-04 15:21:58 +08:00
coolsnowwolf
07c7f456d5 Version update to R23.11.11 2023-11-04 14:24:04 +08:00
coolsnowwolf
a3c464f06c mediatek: add default package 2023-11-04 14:23:11 +08:00
zheshifandian
a2c8782d53
mediatek: improve GL-MT6000 support (#11636)
* mediatek: fix sysupgrade for gl-mt6000

* mediatek: add u-boot support for gl-mt6000

* mediatek: fix lan port for gl-mt6000

* mediatek: fix wifi mac for gl-mt6000
2023-11-04 14:19:47 +08:00
Hauke Mehrtens
cd7cbee6b1 kernel: bump 5.10 to 5.10.199
All patches automatically rebased.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-11-03 23:28:39 +08:00
aiamadeus
a8ddfc2e10 mediatek: add Netcore N60 support
Connect to the router using ssh or telnet,
username: useradmin, password is the web
login password of the router.

Signed-off-by: AnYun <amadeus@openjmu.xyz>
2023-11-01 22:28:50 +08:00
aiamadeus
6939d662fb mediatek: add TP-Link TL-XTR8488 support
The TP-Link TL-XTR8488 has the same hardware as the
TP-Link TL-XDR6088 except for the wifi and ram part.

RAM: MT40A512M16TB DDR4 1GB
WiFi1: MT7976GN 2.4GHz 4T4R
WiFi2: MT7976AN 5.2GHz 4T4R
WiFi3: MT7915AN 5.8GHz 4T4R

Signed-off-by: AnYun <amadeus@openjmu.xyz>
2023-11-01 22:16:26 +08:00
aiamadeus
c8e9d227fd kernel/video: add ARM GPU drivers 2023-10-30 22:54:05 +08:00
Liangbin Lian
fd7b5ec17a kernel: usb-audio remove Kconfig USB_AUDIO
CONFIG_USB_AUDIO is a "USB Audio Gadget" driver, not a usb device driver

CONFIG_USB_AUDIO is "USB Audio support" before linux 2.6

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
2023-10-29 23:40:07 +08:00
Luca Barbato
7d7743dade kernel: Enable hwmon for nvme
Expose the temperature sensors as hwmon, it improves the overall
user experience since on tiny boards the nvme can become a substantial
source of heat.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-10-29 23:38:15 +08:00
Hauke Mehrtens
aa6a5f292a openssl: update to 3.0.12
Major changes between OpenSSL 3.0.11 and OpenSSL 3.0.12 [24 Oct 2023]
 * Mitigate incorrect resize handling for symmetric cipher keys and IVs. (CVE-2023-5363)

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-10-26 23:38:50 +08:00
aakkll
85323635c0
kernel: bump 6.1 to 6.1.60 (#11620) 2023-10-26 10:09:23 +08:00
Rahul Thakur
2d8ac40752 dnsmasq: add support for RA option 31
The option 31 in the RA specifies the DNS search list, the support
to configure this via UCI is missing in case dnsmasq-dhcpv6 is used.

This commit uses the uci option domain (same as is done by odhcpd) to
read and pass the DNS search list to dnsmasq, which is then used by RA.

Hence, with this commit, we are able to configure DNS search list for the
RA messages via the uci config when dnsmsaq-dhcpv6 is used.

Signed-off-by: Rahul Thakur <rahul.thakur@iopsys.eu>
2023-10-24 18:34:01 +08:00
coolsnowwolf
eded1ca5d1 kernel: fix linux 5.4 hash typo 2023-10-24 14:18:42 +08:00
coolsnowwolf
e803f566e5 Version: Celebrate 1024 Programmers Day 2023-10-24 07:40:25 +08:00
coolsnowwolf
6a9018096b kernel: bump version 2023-10-24 07:38:02 +08:00
cjp_jx
d18c930914
autocore/x86: Fixes CPU usage display issue (#11614)
Fix: #11603
2023-10-22 23:10:23 +08:00
coolsnowwolf
0f4df4fa22 kernel: fix kmod-video-core on linux kernel 6.1+ 2023-10-21 22:02:30 +08:00
coolsnowwolf
7af4aa447c kernel: bump 5.15 to 5.15.136 2023-10-21 10:24:44 +08:00
John Audia
05fae0397d kernel: bump 6.1 to 6.1.57
All other patches automatically rebased.

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

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
2023-10-20 23:09:40 +08:00
John Audia
21c3e8e4a1 kernel: bump 5.15 to 5.15.135
All patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-10-20 23:03:30 +08:00
Daniel Golle
64e7a9de3b generic: backport fix for Winbond SPI NAND
Avoid using stack allocated memory for DMA operations.

Fixes: 156c00dedc ("generic: backport Winbond W25N02KV SPI-NAND support")
Fixes: b71c870caa ("generic: 6.1: re-add two Winbond nand fixes")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-10-19 21:58:38 +08:00
Bjørn Mork
d63dcc20b2 generic: 6.1: re-add two Winbond nand fixes
These patches were earlier mislabled as v6.1 and
 therefore dropped. They are in fact from v6.2.

Fixes boot failure on ASUS TUF-AX4200

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
2023-10-19 21:57:03 +08:00
coolsnowwolf
b29bd49781 arm-trusted-firmware-rockchip-vendor: update PKG_MIRROR_HASH 2023-10-18 23:16:08 +08:00
coolsnowwolf
8c39e48514 base-files: create empty coremark file
Fixes: #11590
2023-10-16 21:50:53 +08:00
woOzZ2
daacfa7071
base-files: fix OpenWrt with Docker will cause NAT loopback (#11588)
Fixed the problem that even if br-netfilter is disabled in package/kernel/linux/files/sysctl-br-netfilter.conf, NAT loopback will still fail. This applies to OpenWrt with Docker
2023-10-15 23:05:01 -05:00
Hauke Mehrtens
4bb635d3a0 mbedtls: Update to version 2.28.5
This fixes some minor security problems.
Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-2.28.5

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-10-15 23:30:08 +08:00
John Audia
f0d72c0be6 config-6.1: disable CONFIG_ARM64_ERRATUM_2966298
Disable new ksym globally as OpenWrt does not have any targets that
use A520 cores.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
2023-10-15 23:28:27 +08:00
shiyu1314
788fa9127f
meson: Kernel supports docker (#11591) 2023-10-13 13:53:09 +08:00
shiyu1314
55f3d9f530
meson: remove some unnecessary patches (#11584) 2023-10-11 12:16:25 +08:00
shiyu1314
4065f3bb22
meson: fix: Fail to register VCC_CORE regulator (#11583)
Clean up some kernel configurations
2023-10-11 08:18:02 +08:00
AmadeusGhost
f6f51c076b ipq40xx: add back YYeTs LE1 support 2023-10-10 23:54:22 +08:00
AmadeusGhost
7deff88709 ipq40xx: fixes k5.10 boot issue
Fixes: #11530
2023-10-10 23:52:39 +08:00
coolsnowwolf
f0879e3818 kernel: bump 6.1 to 6.1.56 2023-10-09 01:14:35 +08:00
雷耀
36278047cf
rockchip: add support for seewo sv21-rk3568 (#11567) 2023-10-08 10:51:40 +08:00
shiyu1314
597b88e925
meson: bump to 6.1 kernel, drop mesongx (#11570)
Make it into a direct brush package, making it convenient for software to brush into EMMC without the need for SD or USB drive

u-boot: https://github.com/shiyu1314/u-boot-onecloud/releases

SD firmware conversion to direct flash firmware: https://github.com/shiyu1314/openwrt-onecloud

Signed-off-by: Li Xueli <1052672227@qq.com>
2023-10-05 22:00:36 +08:00
coolsnowwolf
e9ca86b670 generic: fix up backport of interconnect teach in kernel 5.15 2023-10-03 12:03:55 +08:00
coolsnowwolf
b0ea62c2c9 Revert "mt76: update to the latest version"
This reverts commit 16005ae688.
2023-10-03 11:39:42 +08:00
lean
16005ae688 mt76: update to the latest version 2023-09-30 17:44:03 +08:00
lean
040575e75f Version update to R23.10.1 2023-09-30 16:48:09 +08:00
lean
979ee6c715 kernel: bump 5.4 to 5.4.257 2023-09-30 16:45:55 +08:00
lean
e09c0f02cf kernel: bump 5.10 to 5.10.197 2023-09-30 16:43:14 +08:00
lean
d2dacaa22a kernel: bump 5.15 to 5.15.133 2023-09-30 16:35:15 +08:00
lean
9f1e059f89 kernel: bump 6.1 to 6.1.55 2023-09-30 16:32:49 +08:00
Ivan Pavlov
f35d972136 openssl: update to 3.0.11
Changes between 3.0.10 and 3.0.11 [19 Sep 2023]
 * Fix POLY1305 MAC implementation corrupting XMM registers on Windows. ([CVE-2023-4807])

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
2023-09-29 23:05:58 +08:00
Christian Marangi
f36566e734 generic: add patch for GPON-ONU-34-20BI quirk
Backport patch merged upstream adding quirk for SFP GPON-ONU-34-20BI.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-09-29 23:01:57 +08:00
aiamadeus
8eb70b65a3 rockchip: update GbE led for some board 2023-09-26 23:00:35 +08:00
aiamadeus
d3d38a20cb rockchip: rk3568: sync upstream dts changes
Fixes: #11547
2023-09-26 22:55:22 +08:00
Chen Minqiang
b28274ea5f mediatek: fix the name of buswidth to bus-width
Fix the issue of dts buswidth cannot be applied properly with spi driver.
Fix the name of buswidth to bus-width in dts in order to fit the format
in linux spi kernel so that spi-tx-bus-width & spi-rx-bus-width can be
parsed properly.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2023-09-25 22:00:27 +08:00
AmadeusGhost
02b57804f8 mediatek: add Xiaomi AX3000T support 2023-09-25 21:56:38 +08:00
AmadeusGhost
36bd1e35ad mediatek: filogic: sync upstream dts changes 2023-09-24 22:59:00 +08:00
Patricia Lee
2fdceb465c mediatek: add support for Cetron CT3003
**Hardware specification:**

- SoC: MediaTek MT7981B 2x A53
- Flash: ESMT F50L1G41LB 128MB
- RAM: Nanya NT5CC128M16JR-EK 256MB
- Ethernet: 4 x 10/100/1000 Mbps
- Switch: MediaTek MT7531AE
- WiFi: MediaTek MT7976C
- Button: Reset, Mesh
- Power: DC 12V 1A
- UART: 3.3v, 115200n8

**Flash instructions:**

1. Rename `openwrt-mediatek-filogic-cetron_ct3003-squashfs-factory.bin` to `factory.bin`.
2. Upload the `factory.bin` using the device's Web interface.
3. Click the upgrade button and wait for the process to finish.
4. Access the OpenWrt interface using the same password.
5. Use the 'Restore' function to reset the firmware to its initial state.

**Notes:**

If you plan to recovery the stock firmware in the future, it's advisable
to connect the device via the serial port and enter failsafe mode to
back up all the MTD partitions before proceeding the steps above.

Signed-off-by: Patricia Lee <patricialee320@gmail.com>
2023-09-24 22:51:33 +08:00
Daniel Golle
407fe3d689 mediatek: use existing I2C clock names
PCK and MCK should really be P=PMIC and M=MEM, which means that they
should effectively be CLK_PMIC and CLK_ARB.

Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-09-23 22:06:51 +08:00
Daniel Golle
cad44d24f7 mediatek: cleanly backport and add fix for I2C driver
Pick accepted patches from upstream Linux tree instead of having to
maintain our slightly different downstream patches.
Import pending patch fixing I2C on MT7981 by making sure all clocks
are enabled before accessing I2C registers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-09-23 22:04:44 +08:00
lean
a462ab958e Merge branch 'master' of https://github.com/coolsnowwolf/lede 2023-09-22 19:09:03 +08:00
lean
e8d03d317b rockchip: phy: rockchip-snps-pcie3: update fw when init 2023-09-22 19:08:52 +08:00
sKyissKy
06556882d6
Fix ipq807x qca-nss-ecm bonding error (#11542) 2023-09-22 18:36:37 +08:00
David Bauer
876ee0d189 scripts: use sep-char for hash nodes
U-Boot with enabled secure-boot will not boot images with the
@-character used for hash node-names.

Use the existing separation character configurable for each device.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-09-21 22:38:21 +08:00
zhusir
dd3dddafcf
fix: cpu usage display (#11537) 2023-09-20 19:49:08 +04:00
lean
7a04c52544 Version update to R23.9.18 2023-09-19 18:45:53 +08:00
lean
f56df16317 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2023-09-17 04:11:21 +08:00
lean
61625a6cf9 openssl: make compatible with v1.1 pkg 2023-09-17 04:11:12 +08:00
aiamadeus
ad98915e76 ipq40xx: try to fixes booting issue
No testing since there is no board.
2023-09-16 19:23:55 +08:00
Hauke Mehrtens
45107fc446 mbedtls: Update to version 2.28.4
This only fixes minor problems.
Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.4

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-09-16 19:20:36 +08:00
Daniel Maslowski
7acf8fc20e kernel: decouple 9P virtio from 9P net
General support for 9P is desirable on platforms without virtualization.
This decouples the 9P general networking support for use on more platforms.

Signed-off-by: Daniel Maslowski <info@orangecms.org>
2023-09-15 10:28:14 +08:00
Eneas U de Queiroz
7494eb1618 openssl: bump to 3.0.10
This is a major update to the current LTS version, supported until
2026-09-07.

Changelog:
https://github.com/openssl/openssl/blob/openssl-3.0.10/CHANGES.md

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2023-09-15 10:25:17 +08:00
coolsnowwolf
a2a0e5b9f6 ipq-wifi: bump to latest git HEAD 2023-09-14 13:55:54 +08:00
coolsnowwolf
eb0d35f0b7 Revert "r8125: bump to version 9.011.00-1"
This reverts commit b570280edf.
2023-09-14 13:35:24 +08:00
coolsnowwolf
f12c5e76d2
Update README.md 2023-09-09 19:45:24 +04:00
lean
34ac92f6cc ipq40xx: switch to kernel 5.10 2023-09-09 23:36:45 +08:00
lean
61d090cddb mediatek: fix build with glinet gl mt6000 2023-09-09 22:41:52 +08:00
lean
77abd0b975 filogic: add support for GL.iNet GL-MT6000 support 2023-09-08 16:33:49 +08:00
Kivinsae Fang
191a5b1ba4
fix: Add the missing content to README_EN (#11520)
* doc: Sync'ed README_EN.md to the latest commit

* fix: Add the missing content to README_EN

---------

Co-authored-by: KKtheGhost <im@kivinsae.com>
2023-09-08 12:20:41 +04:00
aakkll
e4838f140b
kernel: bump 6.1 to 6.1.52 (#11517)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-09-07 10:41:42 +04:00
zhusir
5ae20da72e
fibocom_qmi: fixes build error (#11516)
Fixed #11374
2023-09-06 22:08:03 +08:00
Felix Fietkau
8e4e1a06be mt76: update to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-09-05 21:36:39 +08:00
好想告诉你
007b9dd0e2
action: remove unused package moby* (#11502) 2023-09-04 10:05:00 +08:00
Hauke Mehrtens
65b9b129d1 linux-firmware: update to 20230804
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-09-03 17:35:30 +08:00
Hauke Mehrtens
4013351243 linux-firmware: Update Intel AX200 and AX210 firmware
This updates the Intel iwlwifi firmware for AX200 and AX210 from version
66 to version 72. Version 72 is the latest version supported by iwlwifi
from kernel 6.1.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Reviewed-by: Robert Marko <robimarko@gmail.com>
2023-09-03 17:31:38 +08:00
Hannu Nyman
565ff98e01 scripts/download.pl: remove stale GNOME download sites
Remove stale sites from @GNOME alias:
* remove 2 sites that have stale 3 years old content
* remove 2 sites that have dropped GNOME
* convert 2 sites from FTP to HTTP

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2023-09-02 18:28:38 +08:00
AmadeusGhost
b570280edf r8125: bump to version 9.011.00-1 2023-09-02 18:24:57 +08:00
aakkll
198e536d15
kernel: bump to 5.4.255, 6.1.50 (#11497) 2023-08-31 15:20:11 +08:00
coolsnowwolf
7460dcc802 uboot-rockchip: update rkbin version
Fixes: #11488, #11489
2023-08-27 19:30:22 +08:00
oct-month
1fd443d852
ip60xx: fix build issue (#11486) 2023-08-26 12:14:41 +08:00
John Audia
cfea6db248 kernel: bump 5.15 to 5.15.126
1. Disable unneeded errata Kconfig symbols
2. Update kernel

All patches automatically rebased.
Fixes: #11427, #11451, #11476

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-08-25 21:19:45 +08:00
1582130940
2f7f6cf0c4 ip60xx/ipq807x: Drop upstream patch
Already fixed in upstream kernel (5.10.191/5.15.127)
2023-08-25 21:01:03 +08:00
coolsnowwolf
5eda7bd591 closed-rockchip-vendor: bump to v2023-07-26 2023-08-24 20:15:41 +08:00
coolsnowwolf
97c30dc620 Version update to R23.8.23 2023-08-24 14:29:52 +08:00
coolsnowwolf
7d88ab0e62 kernel: bump version with upstream 2023-08-24 14:27:37 +08:00
晓东
f676db7af3
meson: Onecloud: Fix first USB not available (#11479)
* Fix first USB not available

* Fix first USB not available

* Fix first USB not available
2023-08-23 19:10:10 +08:00
晓东
aa7601b13f
meson: add 5.15 kernel support (#11477) 2023-08-23 15:16:23 +08:00
coolsnowwolf
2f9daaaf34 Revert "update dropbear version (#11467)"
This reverts commit b428d5e6c1.
2023-08-21 17:00:18 +08:00
coolsnowwolf
a653cfbdda Merge branch 'master' of https://github.com/coolsnowwolf/lede 2023-08-21 13:36:44 +08:00
coolsnowwolf
b1142d41f2 r8152: fix compatibility with kernel 5.4.251+ 2023-08-21 13:36:36 +08:00
Phoenix
b428d5e6c1
update dropbear version (#11467)
* Update Makefile

* Update dropbear.init
2023-08-21 13:25:45 +08:00
Kivinsae Fang
3eb61cfd0c
doc: added a workaround for non-sensitive fs on WSL/WSL2 (#11465)
Co-authored-by: KKtheGhost <im@kivinsae.com>
2023-08-21 13:24:32 +08:00
Kivinsae Fang
81565cb91f
doc: sync README_EN.md to latest (#11466)
Co-authored-by: KKtheGhost <im@kivinsae.com>
2023-08-20 23:30:25 +08:00
aakkll
38595344c2
kernel: bump to 5.4.254, 6.1.46 (#11460) 2023-08-18 21:08:34 +08:00
coolsnowwolf
c5efeaff69 kernel: bump 5.10 to 5.10.190 2023-08-16 15:46:28 +08:00
Hauke Mehrtens
4fd8d7b7f8 openssl: bump to 1.1.1v
Major changes between OpenSSL 1.1.1u and OpenSSL 1.1.1v [1 Aug 2023]

    o Fix excessive time spent checking DH q parameter value (CVE-2023-3817)
    o Fix DH_check() excessive time with over sized modulus (CVE-2023-3446)

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-08-16 15:13:01 +08:00
aakkll
8069a49467
kernel: bump to 5.4.253, 6.1.45 (#11455)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-08-15 22:23:26 +08:00
晓东
4e7c56f9f3
Support emmc for Thunder OneCloud (#11453) 2023-08-15 14:32:55 +08:00
coolsnowwolf
961ee0e81e r8152: fix build with kernel 5.10+ 2023-08-13 11:40:42 +08:00
coolsnowwolf
bdb3b96718 r8152: rework eth hw addr set for kernel 5.4 2023-08-12 22:17:18 +08:00
coolsnowwolf
38bca36d20 mac80211: rework eth hw addr set for kernel 5.4 2023-08-10 19:42:15 +08:00
aakkll
3441bc5588
kernel: bump 5.4 to 5.4.252 (#11436) 2023-08-09 16:25:17 +08:00
aakkll
5f9a1cae43
kernel: bump 6.1 to 6.1.44 (#11435) 2023-08-09 10:03:13 +08:00
coolsnowwolf
20f23ca93b package/wwan: update dependes 2023-08-04 23:51:02 +08:00
aakkll
3882194f9f
kernel: bump 6.1 to 6.1.43 (#11423) 2023-08-03 20:35:26 +08:00
Felix Fietkau
bbebb4beab mac80211: fix mesh fast tx cache issues
Split the cache by tx type in order to avoid packet drop issues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-02 21:35:31 +08:00
Felix Fietkau
0d0d065707 mac80211: fix HE issues with AP_VLAN interfaces
Fixes issues with aggregation

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-02 21:32:56 +08:00
Felix Fietkau
965f4854a5 mt76: update to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-08-01 20:09:31 +08:00
Christian Marangi
1cf01f7dbf ath10k-ct: add patch fixing compilation warning for debug level
Add patch fixing compilation warning for debug level read.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-08-01 20:02:30 +08:00
aiamadeus
2abe7192ff generic: add more usb modem support 2023-07-31 22:06:00 +08:00
aiamadeus
b9905af673 uboot-rockchip: bump to v2023.07
Drop upstream patches as bug fixed on rk3568.
2023-07-31 22:00:53 +08:00
aakkll
e7e8eb963f
kernel: bump 6.1 to 6.1.42 (#11410) 2023-07-28 08:10:44 +00:00
coolsnowwolf
37eaf33035 autocore-x86: advertise 2.5G/5G link modes for Intel x550 2023-07-26 22:57:19 +08:00
coolsnowwolf
2b743dbff0 kernel: bump version with upstream 2023-07-26 22:41:19 +08:00
aakkll
b828e123c6
kernel: bump to 5.4.249, 6.1.40 (#11404)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-07-26 22:25:00 +08:00
David Bauer
14cc6d5a6d mac80211: partly revert force-mac80211 loss detection
This patch will only force mac80211 loss detection upon ath10k by
masking the driver-specific loss-detection bit.

Ref: commit ed816f6ba8b5 ("mac80211: always use mac80211 loss detection")

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-07-26 21:28:47 +08:00
David Bauer
6c0363e78c mac80211: always use mac80211 loss detection
ath10k does not report excessive loss in case of broken block-ack
sessions. The loss is communicated to the host-os, but ath10k does not
trigger a low-ack events by itself.

The mac80211 framework for loss detection however detects this
circumstance well in case of ath10k. So use it regardless of ath10k's
own loss detection mechanism.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-07-26 21:26:31 +08:00
Robert Marko
64002d3a24 mac80211: ath11k: sync with ath-next
Synchronize the ath11k backports with the current ath-next tree.

This introduces support for MBSSID and EMA, adds factory test mode and
some new HTT stats.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-07-25 22:39:22 +08:00
Robert Marko
b93186df5d mac80211: backport EMA beacon support
Backport EMA beacon support from kernel 6.4.
It is required for MBSSID/EMA suport in ath11k that will follow.

Tested-by: Francisco G Luna <frangonlun@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-07-25 22:38:23 +08:00
Robert Marko
c72c8f58a7 mac80211: backport merged version of A-MSDU mesh patch
This issue was fixed in the final version of
("wifi: mac80211: fix receiving A-MSDU frames on mesh interfaces") that was
merged upstream but we have a older version that is using:
memcpy(&payload.eth.h_dest, mesh_addr, 2 * ETH_ALEN);
instead of:
memcpy(&payload.eth, mesh_addr, 2 * ETH_ALEN);

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

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-07-25 22:37:11 +08:00
aiamadeus
266036e667 rockchip: add h68k/h69k hardware v3 support 2023-07-24 21:38:29 +08:00
Testeera
279cda2a4c
kernel: bump 6.1 to 6.1.39 (#11396)
Link: https://lore.kernel.org/r/20230716194923.861634455@linuxfoundation.org
Link: https://lore.kernel.org/r/20230717185609.886113843@linuxfoundation.org
Link: https://lore.kernel.org/r/20230717201547.359923764@linuxfoundation.org

Signed-off-by: Marty Jones <mj8263788@gmail.com>
Co-authored-by: Marty Jones <mj8263788@gmail.com>
2023-07-20 15:50:19 +08:00
coolsnowwolf
dff0d3553d rockchip: add wireless support for LYT T68M 2023-07-18 15:49:54 +08:00
coolsnowwolf
2bacbb31a5 uboot-rockchip: fix Panther x2 uboot name 2023-07-16 17:59:04 +08:00
Daniel Golle
e7d391d0ba kernel: add two missing symbols in 6.1
Two more new symbols were discovered when building mediatek targets
with CONFIG_ALL_KMODS=y.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-15 23:52:02 +08:00
Daniel Golle
a1c87e7c74 kernel: leds-ws2812b: fix build with Linux >= 5.18
The return value of the .remove function pointer has changed from
int to void with Linux 5.18. Use a precompiler macro to allow building
the leds-ws2812b module with both, Linux 5.15 and Linux 6.1.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-07-15 23:46:56 +08:00
John Audia
d3e80e6e60 linux-firmware: update to 20230625
Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-14 22:08:15 +08:00
Davide Fioravanti
f6c316d52e base-files: add minimal mmc support
Added minimal mmc support for helper functions.

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
[replace dd with caldata_dd, moved sysupgrade mmc to orbi]
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-07-14 21:59:15 +08:00
Lollipop907
99ef55e814
rockchip: Add support for Codinge Xiaobao NAS-I (#11383) 2023-07-13 09:22:46 +08:00
雷耀
f6bb67f147
rockchip: add new device panther x2 (#11380)
* uboot-rockchip: fix rk3566 support

* rockchip: add support for Panther X2
2023-07-12 13:17:28 +08:00
John Thomson
761b79a272 kernel: fix KernelPackage when all KCONFIG are versioned
If a kernel package was defined where all KCONFIG symbols were dynamic,
and versioned, no FILES would be installed, as the foreach evaluation was
providing the value of the variable defined by the KCONFIG symbol name
including the version test

Fix this by calling the version_filter function on the list of KCONFIG
variable names run through by foreach

Example, kernel 6.1:
KCONFIG:=CONFIG_OLD@lt6.1 CONFIG_NEW@ge6.1
filter-out any KCONFIG settings forced by package:
CONFIG_OLD@lt6.1 CONFIG_NEW@ge6.1
there are dynamic settings, so for each of them,
get the value of the make variable defined by symbol name:
    CONFIG_OLD@lt6.1 is not set
    CONFIG_NEW@ge6.1 is not set
  versus
    CONFIG_OLD is not set
    CONFIG_NEW=m
test if any of these are m, or y
if yes, install files, otherwise, nothing to install

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
2023-07-11 21:54:03 +08:00
Mathew McBride
472c17ae4e linux-firmware: ibt-firmware: install sfi/ddc files for AX210 card
When using an Intel AX210 card, the Bluetooth hci interface failed
to start due to a missing "ibt-0041-0041.sfi" file.

Bluetooth: hci0: Failed to load Intel firmware file intel/ibt-0041-0041.sfi (-2)

A device specific configuration file (DDC) is also required:
Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi
Bluetooth: hci0: Waiting for firmware download to complete
...
Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-0041-0041.ddc
Bluetooth: hci0: Applying Intel DDC parameters completed
Bluetooth: hci0: Firmware timestamp 2023.13 buildtype 1 build 62562

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-07-11 21:50:04 +08:00
John Audia
92265caaa7 kernel: modules: fs: adapt for kernel 6.1.36
Acknowledgment to john-tho for the changes to fs.mk to accommodate new paths
introduced in 29429a1f58

Fixes: #11375
Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-10 22:30:17 +08:00
John Audia
df978f7dd1 kernel: add CONFIG_LOCK_MM_AND_FIND_VMA
6.1.37 introduces a new symbol[1]

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-07-10 22:28:00 +08:00
lean
710fec8fc4 kernel: fix 5.15 outdated patche 2023-07-08 21:10:01 +08:00
lunatickochiya
5a0e9d95e4 generic: 6.1: drop outdated patches 2023-07-08 18:19:16 +08:00
lean
61e557fee9 kernel: bump 5.15 to 5.15.120 2023-07-08 15:58:52 +08:00
lean
56a0d2a24f kernel: bump 6.1 to 6.1.38 2023-07-08 15:56:38 +08:00
coolsnowwolf
bafee3f48c mt76: enable wed wireless acc for filogic target by default 2023-07-07 00:19:58 +08:00
coolsnowwolf
b201c29fa2 Version bumpt to R23.7.7 2023-07-07 00:18:40 +08:00
coolsnowwolf
663be7c70c mediatek: add CETRON CT3003 support 2023-07-05 19:34:20 +08:00
AmadeusGhost
9191c4b139 r8101: update to version 1.038.02 2023-07-04 23:38:10 +08:00
AmadeusGhost
9c0329ad5e rtw88-usb: bump to latest git HEAD
Fixes: #11331
2023-07-04 23:34:05 +08:00
Stalker
8d2d9dd648
add missing ssb and bcma (#11343)
Signed-off-by: xiangfeidexiaohuo <jsjson@163.com>
2023-07-03 17:12:47 +08:00
汐音柠柠
99c73daeae
add python3-setuptools (#11345) 2023-07-03 17:11:01 +08:00
anjue39
642003629f
bcm53xx: 5.4: add missing kconfig (#11341) 2023-07-03 00:54:25 +00:00
anjue39
cf9e26af8e
bcm53xx: add missing kconfig (#11340)
fix crypto/sha1-arm.ko' is missing
2023-07-02 15:26:38 +08:00
coolsnowwolf
a14bb92a80 mediatek: add JCG Q30 (Pro) support 2023-06-30 12:02:12 +08:00
AmadeusGhost
e00aa77d0e rockchip: add support for LYT T68M 2023-06-29 22:01:08 +08:00
AmadeusGhost
fa7f6dd960 rtl8211f: add LED configuration from OF 2023-06-29 21:57:57 +08:00
Jitao Lu
effbf668ad openssl: passing cflags to configure
openssl sets additional cflags in its configuration script. We need to
make it aware of our custom cflags to avoid adding conflicting cflags.

Signed-off-by: Jitao Lu <dianlujitao@gmail.com>
2023-06-28 23:38:20 +08:00
AmadeusGhost
654f7ab462 mediatek: add H3C Magic NX30 Pro support 2023-06-27 23:08:57 +08:00
AmadeusGhost
defd518694 mediatek: add Xiaomi WR30U support 2023-06-27 23:05:18 +08:00
AmadeusGhost
5f59c3dea6 mediatek: add Qihoo 360T7 support 2023-06-27 23:03:09 +08:00
AmadeusGhost
c22e0ea323 generic: fixes 6.1 nf-flow support with fw3
Fixes: #11325
2023-06-26 22:13:26 +08:00
AmadeusGhost
e7bd136138 mediate: filogic: sync upstream dts changes 2023-06-26 22:02:36 +08:00
Christian Marangi
3e35e07760 netfilter: fix typo in nf-socket and nf-tproxy kconfig
Fix a typo where the wrong KCONFIG was used and fix selecting the
correct kernel config option to use these packages.

Fixes: 4f443c885ded ("netfilter: separate packages for kmod-ipt-socket and kmod-ipt-tproxy")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-06-25 20:53:12 +08:00
coolsnowwolf
398eece1d6 generic: sync 6.1 patches from official source
Closed: #11208
2023-06-25 20:38:37 +08:00
sKyissKy
3ef1f5ade3
kernel: add MultiPath TCP kernel config & module (#11298) 2023-06-24 23:10:36 +08:00
Yangyu Chen
981c497ae4 net: phy: realtek: add led-link-select for RTL8221
RTL8221B PHYs will select the different speeds for 3 LEDs to 10M/100M/1G
respectively by default. Some devices like TP-LINK TL-XDR6088/TL-XDR6086
have only one LED connects to the PHY chip LED0. If we didn't change the
default settings, the LED will only blink at 10M speed.

This patch allows configuring LED link select bitmask from DT. And it
has been tested with TP-Link XDR6088 with different DT configurations.

Signed-off-by: Yangyu Chen <cyy@cyyself.name>
2023-06-24 23:00:05 +08:00
Florian Eckert
21364cecb2 base-files: change logging for upgrade on stage2
Remove vn call in favour of v call. This commit serves as preparation
for removing the vn function call.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
2023-06-24 22:58:17 +08:00
Daniel Golle
c735c19bf8 mac80211: fix mt7601u firmware path and refresh patches
Import patch fixing the updated firmware path of mt7601u.bin.
Refresh patches while at it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-24 22:56:16 +08:00
Daniel Golle
8d33a61407 mediatek: no longer hard-code WAN PHY of Netgear WAX206
The RealTek 2.5G PHY providing the WAN port of the Netgear WAX206 has
previously been hard-coded in the device tree. Now that the PHY can be
probed correctly also via Clause-45 MDIO, use that instead.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-23 23:28:14 +08:00
Daniel Golle
697ea1d8fc generic: net: phy: realtek: detect early version of RTL8221B
Early versions (?) of the RTL8221B PHY cannot be identified in a regular
Clause-45 bus scan as the PHY doesn't report the implemented MMDs
correctly but returns 0 instead.
Implement custom identify function using the PKGID instead of iterating
over the implemented MMDs to work-around this problem.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-23 23:27:14 +08:00
Daniel Golle
e0fd382892 kernel: net: phy: realtek: fix NULL pointer dereference
The previous attempt to replace an open coded paged read in the RealTek
Ethernet PHY driver was too naive and resulted in breaking the r8169
PCIe Ethernet driver which also makes use of the RealTek Ethernet PHY
driver.
Fix this by instead of using the (not yet populated) paged operations
rather use rtl821x_write_page and protect the whole paged read operation
using the MDIO bus mutex.

Fixes: 998b973157 ("kernel: net: phy: realtek: improve RealTek 2.5G PHY driver")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-23 23:26:18 +08:00
Daniel Golle
664b181256 kernel: net: phy: realtek: improve RealTek 2.5G PHY driver
* use interface mode switching only when operating in C45 mode
   Linux prevents switching the interface mode when using C22 MDIO,
   hence use rate-adapter mode in case the PHY controlled via C22.

 * use phy_read_paged where appropriate

 * use existing generic inline functions to handle 10GbE advertisements
   instead of redundantly defining register macros in realtek.c which
   are not actually vendor-specific.

 * make sure 10GbE advertisement is valid, preventing false-positive
   warning "Downshift occurred from negotiated speed 2.5Gbps to actual
   speed 1Gbps, check cabling!" with some link-partners using 1G mode.

 * Support Link Down Power Saving Mode (ALDPS)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-23 23:25:18 +08:00
Daniel Golle
06158f1c7a generic: disable SGMII in-band AN for RealTek 2.5G PHYs
MAC drivers don't use SGMII in-band autonegotiation unless told to do so
in device tree using 'managed = "in-band-status"'. When using MDIO to
access a PHY, in-band-status is unneeded as we have link-status via
MDIO. Switch off SGMII in-band autonegotiation using magic values.

Reported-by: Chen Minqiang <ptpt52@gmail.com>
Reported-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
Tested-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-23 23:24:18 +08:00
Daniel Golle
b238fdb0b6 generic: use genphy_soft_reset for RealTek 2.5G PHYs
Some vendor bootloaders do weird things with those PHYs which result in
link modes being reported wrongly. Start from a clean sheet by resetting
the PHY.

Reported-by: Yevhen Kolomeiko <jarvis2709@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-23 23:23:20 +08:00
Daniel Golle
bf62addd61 mediatek: mt7981: setup all clocks needed for eMMC
Setup all necessary clocks to get MMC to work on MT7981, similar to
how it is done also on MT7986.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-22 23:26:36 +08:00
Daniel Golle
1edf909182 mediatek: update patch add PWM support for MT7981
Update patch with version submitted upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-22 23:25:01 +08:00
Daniel Golle
911a5f623e mediatek: add support for the GL.iNet GL-MT3000
The MT-3000 is a pocket-sized Wi-Fi 6 router based on MediaTek MT7981.

Specification:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 256 MiB Macronix SPI NAND
 - RAM: 512 MiB Nanya DDR4
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN)
 - Ethernet:
    - 1x 10/100/1000 Mbps built-in PHY (LAN)
    - 1x 10/100/1000/2500 Mbps MaxLinear GPY211 PHY (WAN)
 - USB 3.0 port
 - Buttons: 1 button, 1 switch
 - LEDs: 1x light-blue, 1x warm-white
 - Serial console: internal 4-pin header, 115200 8n1
 - PWM controlled fan with tacho
 - Power: 5 VDC, 3 A (USB Type-C)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-21 23:30:02 +08:00
Daniel Golle
4efcefe8de generic: mtk_eth_soc: don't crash if WO firmware is missing
Import patch to prevent crashes in case WO firmware is missing on devices
with only a single frontend (eg. MT7981+MT7976).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-21 23:28:51 +08:00
Daniel Golle
e59909d212 generic: add support for wireless offloading on MT7981
Load appropriate firmware for wireless offloading on MT7981.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-21 23:27:37 +08:00
Daniel Golle
4df739da74 mediatek: sync pinctrl-mt7981 and pinctrl-mt7986 drivers
Now that new pinconf features have been backported sync pinctrl-mt7981
and pinctrl-m7986 with bleeding-edge upstream versions.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-20 23:18:08 +08:00
Daniel Golle
8522798ddf mediatek: backport new pinctrl features
Backport new features for MediaTek pinctrl/pinconf drivers from upstream.
This will serve as the base to improve pinconf bias/pull-up/pull-down on
MT7981 and MT7986, and also prepare for upcoming support for MT7988.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-20 23:16:58 +08:00
Felix Fietkau
a1429324e3 kernel: fix mtk_eth_soc flow accounting for MT7986
This was accidentally dropped when MT7981 support was added

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-06-19 23:15:14 +08:00
Felix Fietkau
17f02fb364 kernel: fix mtk_eth_soc throughput regressions on gigabit PHY ports
Fixes issues on MT7621 and MT7623 switch ports, and PHY ports on all SoC

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-06-19 23:14:37 +08:00
Daniel Golle
4c48c9a80f mediatek: filogic: update kernel config-5.15
Expose thermal-zone as hwmon sensor, remove thermal emulation driver
and add some missing symbols.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-18 22:56:54 +08:00
aakkll
4f0462516a
kernel: bump to 5.4.247, 6.1.34 (#11314)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-06-18 01:07:34 +08:00
Daniel Golle
357222b386 mediatek: broaden filogic target description
The filogic subtarget now also supports MT7981 and will in future
also support MT7988. Reflect that in the target description.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-17 19:26:10 +08:00
Daniel Golle
0025044d0a mediatek: add device tree include for the MT7981 SoC
Add mt7981.dtsi so we can start adding MT7981 devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-17 19:25:33 +08:00
Daniel Golle
60f04d0f6a mediatek: add support for SPI calibration
Newer MediaTek's SoCs need SPI calibration routines for SPI to work
reliably. Import patches for that from MediaTek's SDK.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-17 19:24:15 +08:00
Daniel Golle
980c3ada51 mediatek: add PWM support for MT7981 SoC
Add patch to support PWM on the MT7981 SoC.
This patch will also be submitted to upstream Linux soon.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-17 19:23:20 +08:00
Daniel Golle
d4f04f7995 mediatek: add I2C for MT7981 SoC
Add patch to support I2C on the MT7981 SoC.
This change will also be submitted to upstream Linux soon.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-17 19:22:12 +08:00
Daniel Golle
8e0a86e6a1 mediatek: simplify MaxLinear GPY PHY driver
The mxl-gpy driver apparently was built in the assumption that SGMII
auto-negotiation is always switched on at the MAC. This may be true for
few rather recent drivers (why?), but certainly isn't for most drivers
unless 'managed = "in-band-status"' is set in device tree. Add patch to
the mediatek target which reduces mxl-gpy to behave more like an
ordinary PHY driver using out-of-band status.

This allows to use these PHYs without rate-adaptation which seems to be
at least partially broken/racy in some revisions of the PHY and/or
internal PHY firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-17 19:21:21 +08:00
Daniel Golle
c75138adae generic: dsa: make use of pcs-mtk-lynxi also for mt7530
The MT7531 switch IC comes with SerDes ports with PCS identical to
what is also used in MediaTek's SoCs. Make use of the shared driver
to ease maintainance and reduce code duplication.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-16 19:57:18 +08:00
Daniel Golle
b53177e6c4 generic: backport regmap reg_base and downshift features
Backport new regmap features from Linux 5.18 which are needed to let
mt7530 use pcs-mtk-lynxi.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-16 19:56:04 +08:00
Daniel Golle
120e04cd5e generic: mtk_eth_soc: switch to external PCS driver
Backport patch to make use of the new PCS driver in mtk_eth_soc.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-16 19:55:13 +08:00
Daniel Golle
3903ca066f generic: pcs-mtk-lynxi: add hack to use 2500Base-X without AN
Using 2500Base-T SFP modules e.g. on the BananaPi R3 requires manually
disabling auto-negotiation, e.g. using ethtool. While a proper fix
using SFP quirks is being discussed upstream, bring a work-around to
restore user experience to what it was before the switch to the
dedicated SGMII PCS driver.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-16 19:54:20 +08:00
Daniel Golle
bee8c8a8cf generic: net: pcs: add driver for MediaTek SGMII PCS
Backport dedicated PCS driver for MediaTek LynxI SGMII/SerDes unit.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-16 19:53:43 +08:00
Daniel Golle
93e24c37dd generic: mtk_eth_soc: allow setting MDIO clock frequency
Backport patch allowing to set the MDIO bus clock frequency.
By default the MDIO bus clock runs on 2.5 MHz, allow increasing it
up to 25 MHz.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-16 19:52:46 +08:00
Daniel Golle
995f53f723 mediatek: add support for built-in GE PHYs of newer SoCs
MT7981 and the upcoming MT7988 have built-in Gigabit Ethernet PHYs.
While they share some design properties with the PHYs present in
MT753x, they do need calibration data from the SoC's efuse.

Add driver to support them. Upstreaming it is planned, but there are
still some ongoing discussions with MediaTek.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-15 23:09:55 +08:00
Daniel Golle
83bdbba5bc generic: backport support for MT7981 Ethernet
Backport support for the MT7981 SoC to mtk_eth_soc.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-15 23:09:00 +08:00
Daniel Golle
d4339fda71 mediatek: backport pinctrl driver for MT7981 SoC
Backport the pinctrl driver for the MT7981 SoC. The driver has also
been submitted upstream and is part of Linux 6.3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-15 23:07:49 +08:00
Daniel Golle
7c648c2ff2 mediatek: backport clk driver for MT7981 SoC
Backport driver for common clocks in MT7981 SoC. The driver has also
been submitted upstream and became part of Linux 6.3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-15 23:06:13 +08:00
Daniel Golle
9c394de00d generic: replace mtk_sgmii patches with versions accepted upstream
Replace patches for MediaTek Ethernet driver SGMII/SerDes unit with
their corresponding upstream patches. Not all of the patches in our
tree went upstream as-is, some are slightly different implementations,
and they require the phylink_pcs helpers now made available.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-15 23:05:15 +08:00
Daniel Golle
020a90522c generic: backport some phylink helper functions
It isn't feasible to literally backport all upstream phylink_pcs changes
down to Linux 5.15: It's just too many patches, and many downstream
drivers and hacks are likely to break. We are too close to branching off
to risk this, and it's also just too much work.
Instead just add helper functions used by modern PCS drivers while keeping
the original functions instact as well. While this may add a kilobyte or
two of extra kernel size, it has the advantage that we get the best of both
worlds: None of the existing codepaths are touched, but yet we have the
option to backport singular improvements to Ethernet drivers where needed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-06-15 23:04:22 +08:00
John Audia
86545f1f15 kernel: add CONFIG_DRM_RCAR_USE_LVDS is not set
Added missing symbol.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-06-14 22:10:58 +08:00
ShireCiel
0606279e9f
X86/64: 6.1: Disable intel ibt to avoid kernel panic (#11311)
If intel ibt enable. It will cause kernel panic
when load "compat.ko" kernel module(a part of cfg80211)

Signed-off-by: Jax Jiang <jax.jiang.007@gmail.com>
2023-06-14 16:15:36 +08:00
Hauke Mehrtens
bcb4ed1466 openssl: bump to 1.1.1u
Major changes between OpenSSL 1.1.1t and OpenSSL 1.1.1u [30 May 2023]

    o Mitigate for very slow `OBJ_obj2txt()` performance with gigantic
      OBJECT IDENTIFIER sub-identities.  (CVE-2023-2650)
    o Fixed documentation of X509_VERIFY_PARAM_add0_policy() (CVE-2023-0466)
    o Fixed handling of invalid certificate policies in leaf certificates
      (CVE-2023-0465)
    o Limited the number of nodes created in a policy tree ([CVE-2023-0464])

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-13 23:19:01 +08:00
Zy143L
6f6278dc2b
ramips: add support for NRadio WT6285 (#11304) 2023-06-13 00:10:45 +08:00
Linhui Liu
4b89d5db8b
kernel: bump 5.10 to 5.10.183 (#11301) 2023-06-12 12:08:04 +08:00
Linhui Liu
a8788c3123
kernel: bump 5.15 to 5.15.116 (#11299) 2023-06-12 11:05:43 +08:00
Luiz Angelo Daros de Luca
919d3485d1 kernel: modules: fix mdio-bus-mux description
Simple error during copy/paste

Fixes: 2dbeb607251b ("kernel: add mdio-bus-mux support")
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2023-06-11 23:15:20 +08:00
aakkll
a6053a03f9
kernel: bump to 5.4.246, 6.1.33 (#11296) 2023-06-11 14:38:44 +08:00
sKyissKy
6ad67fdf12 ramips: improve zte e8820s support
Closed: #11292
2023-06-10 15:12:51 +08:00
coolsnowwolf
62d9f8261a README: add RK3588 Release support 2023-06-09 03:22:36 +08:00
coolsnowwolf
b65b15a30e update README.md 2023-06-09 03:08:07 +08:00
Zoltan HERPAI
b8fd566c17 sifiveu: add new target for SiFive U-based boards
RISC-V is a new CPU architecture aimed to be fully free and open. This
target will add support for it, based on 5.15.

Supports running on:
 - HiFive Unleashed - FU540, first generation
 - HiFive Unmatched - FU740, current latest generation, PCIe

SD-card images are generated, where the partitions are required to have
specific type codes. As it is commonplace nowadays, OpenSBI is used as the
first stage, with U-boot following as the proper bootloader.

Specifications:

HiFive Unleashed:
 - CPU: SiFive FU540 quad-core RISC-V (U54, RV64IMAFDC or RV64GC)
 - Memory: 8Gb
 - Ethernet: 1x 10/100/1000
 - Console: via microUSB

HiFive Unmatched:
 - CPU: SiFive FU740 quad-core RISC-V (U74, RV64IMAFDCB or RV64GCB)
 - Memory: 16Gb
 - Ethernet: 1x 10/100/1000
 - USB: 4x USB 3.2
 - PCIe:  - 1x PCIe Gen3 x8
          - 1x M.2 key M (PCIe x4)
          - 1x M.2 Key E (PCIe x1 / USB2.0)
 - Console: via microUSB

Installation:
Standard SD-card installation via dd-ing the generated image to
an SD-card of at least 256Mb.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-06-08 23:53:10 +08:00
Zoltan HERPAI
e5bf447f61 uboot-sifiveu: add bootloader package for SiFive Ux40 boards
Add new package for building bootloader for the SiFive U-series boards. Supported
boards at this stage are the HiFive Unleashed and HiFive Unmatched.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-06-08 23:51:32 +08:00
Zoltan HERPAI
32948caa36 firmware-utils: ptgen: add SiFive-related GUID types
Add patch until it gets accepted in firmware-utils upstream.

The SiFive RISC-V SoCs use two special partition types in the boot process.
As a first step, the ZSBL (zero-stage bootloader) in the CPU looks for a
partition with a GUID of 5B193300-FC78-40CD-8002-E86C45580B47 to load the
first-stage bootloader - which in OpenWrt's case is an SPL image. The FSBL
(SPL) then looks for a partition with a GUID of
2E54B353-1271-4842-806F-E436D6AF6985 to load the SSBL which is usually an
u-boot.

With ptgen already supporting GPT partition creation, add the required GUID
types and name them accordingly to be invoked with the '-T <GPT partition
type>' parameter.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-06-08 23:49:28 +08:00
Zoltan HERPAI
ea24dc735b openssl: add linux-riscv64 into the targets list
Add "linux-riscv64-openwrt" into openssl configurations to enable building
on riscv64.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-06-08 23:47:03 +08:00
Zoltan HERPAI
6b61dd4345 opensbi: add package for RISC-V
OpenSBI is a form of a first-stage bootloader, which initializes
certain parts of an SoC and then passes on control to the second
stage bootloader i.e. an u-boot image.

We're introducing the package with release v1.2, which provides
SBI v0.3 and the SBI SRST extensions which helps to gracefully
reboot/shutdown various HiFive-U SoCs.

Tested on SiFive Unleashed and Unmatched boards.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-06-08 23:45:08 +08:00
Zoltan HERPAI
b52418d1c6 generic: groundwork for RISC-V
Add build infrastructure for RISC-V.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
2023-06-08 23:43:19 +08:00
David Yang
c9f287599f build: Allow specifying uImage time
Some U-Boot checks for a specified uImage time and refuses to boot if
mismatched. This patch fixes it by recognizing UIMAGE_TIME parameter.

Signed-off-by: David Yang <mmyangfl@gmail.com>
2023-06-07 21:17:28 +08:00
AmadeusGhost
eff960303d rockchip: sync upstream emmc fixes from k6.4 2023-06-07 21:15:48 +08:00
cnzgray
c120cd1177
sunxi: make use of 'rootfs-part' feature (#11280)
sync with upstream commit.

d05ac928f6
2023-06-06 13:03:43 +08:00
aakkll
ed153bc3e4
kernel: bump to 5.4.245, 6.1.32 (#11279) 2023-06-06 00:38:26 +08:00
Hauke Mehrtens
b8253a8eaf airoha: spi-en7523: Fix compile warning
The set_spi_clock_speed() function is not used, this causes a compile
warning which results in a build error with -WError.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-05 23:54:00 +08:00
Ikko Eltociear Ashimine
58145e9906
realtek: fix typo in rtl838x.h (#11273)
Addres -> Address
2023-06-05 11:01:22 +08:00
AmadeusGhost
e56218bff2 ramips: add HT-JSH-0211 support
Replace the boot loader to the breed of K2P.
2023-06-04 23:16:12 +08:00
coolsnowwolf
29cf09f335 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2023-06-04 16:07:58 +08:00
coolsnowwolf
3e43f9fa10 Version update to R23.6.6 2023-06-04 16:07:50 +08:00
Mathew McBride
028f75ac9a kernel: add mdio-bus-mux support
The MDIO bus multiplexing framework is used by some drivers
such as dwmac-sun8i.

As this is a per-driver requirement, set it to be hidden in the menu.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
2023-06-03 21:53:19 +08:00
Hauke Mehrtens
324be47ffd kernel: Set CONFIG_FRAME_WARN depending on target
This set the CONFIG_FRAME_WARN option depending on some target settings.
It will use the default from the upstream kernel and not the hard coded
value of 1024 now.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-06-03 21:50:27 +08:00
ricksuzade-maker
9b3ae943e3
Update netdevices.mk to fix qlogic device support (#11270) 2023-06-02 09:00:49 +08:00
Tony Ambardar
24f841e8b3 kernel: 6.1: add missing CONFIG_TEST_DYNAMIC_DEBUG option
This new option (default N) will generate prompts building with OpenWrt
configs that set CONFIG_KERNEL_DYNAMIC_DEBUG=y. Fix this by adding the
disabled option to the generic config.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
2023-06-01 15:32:23 +08:00
Christian Marangi
df4389a5e1 kernel: fix wrong detection of Linux-Testing-Version in makefile DUMP
When the split was done, the case for testing kernel version wasn't
handled and only the to-be-compiled kernel version details files was
included. This cause the kernel Linux-Testing-Version output from
makefile target DUMP to report only the kernel version without the minor
version (example 6.1 instead of 6.1.29).

This value is expected with the full kernel version and this cause the
dump-target-info.pl script to not correctly identify if a target have a
testing kernel for the kernels calls.

Fix this regression by correctly including the kernel details files if
the target declare support for a testing kernel version.

Fixes: 0765466a42f4 ("kernel: split kernel version to dedicated files")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-06-01 15:29:41 +08:00
aakkll
1858af4e68
kernel: bump to 5.4.244, 6.1.31 (#11265) 2023-05-31 09:03:59 +08:00
Yogi Hermawan
2c0b86e3f2
ramips: fix bolt_bl201 network config (#11263)
To fix error in old devices version
2023-05-30 19:35:53 +08:00
AmadeusGhost
4eb245c4b5 ramips: switch back to kernel 5.4
Fixes: #11222
2023-05-30 15:38:30 +08:00
AmadeusGhost
c993397693 Revert "mt76: drop upstream patches"
Fixes: #11256
2023-05-29 23:50:19 +08:00
Christian 'Ansuel' Marangi
05fce869f4 kernel: modules: make ar8216/8327 modularizable
Make ar8216/8327 swconfig driver modularizable and add
entry to the netdevices.mk kernel modules file.

Fixes: #11250
Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
2023-05-29 00:27:19 +08:00
Yogi Hermawan
2f8f4dacf3
ramips: fixes bolt_bl201 support (#11253) 2023-05-28 21:30:48 +08:00
ricksuzade-maker
7cbe26964d
Update netdevices.mk to fix depends (#11252) 2023-05-28 14:12:10 +08:00
Lu jicong
0d1a56f76f generic: refresh 5.15 kernel config
Enable CONFIG_ARM_CRYPTO on these targets.

Fixes: #11247
Signed-off-by: Lu jicong <jiconglu58@gmail.com>
2023-05-28 00:05:02 +08:00
Nick Hainke
8033f13058 nettle: update to 3.9
Changelog:
26cd0222fd/NEWS

Refresh patch:
- 100-portability.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-05-27 23:53:13 +08:00
coolsnowwolf
7aa4a44266 kernel: update linux 6.1 to 6.1.30 2023-05-27 14:38:12 +08:00
John Audia
2524f41b7f x86: disable CONFIG_X86_PLATFORM_DRIVERS_HP
New config option defaulted to N for this bump.

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-05-26 23:39:54 +08:00
AmadeusGhost
b290c66615 kernel/modules: refresh kernel limit judgment
Fixes: #11245
2023-05-26 23:33:56 +08:00
AmadeusGhost
aab8a05684 kernel/modules: sync from official source
This reduces the build bugs and brings more bugs.
2023-05-25 23:29:17 +08:00
coolsnowwolf
eeac3fd81e bcm27xx: sync upstream patches
Fixes: #11243
2023-05-25 22:27:05 +08:00
Christian Marangi
d52eb58fca kernel: modules: adapt for kernel 6.1
Adapt kernel modules to support kernel 6.1.

Fixes: #11210
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-05-24 22:25:21 +08:00
chaichunyang
a0948d91a1
kernel: refresh 5.15 patches (#11235)
Fixes: cc22efe ("kernel: bump 5.15 to 5.15.112")
Fixes: #11226, #11228
Closed: #11232
2023-05-24 17:15:17 +08:00
ricksuzade-maker
5c93ec63c2
intel-microcode: fix file name (#11233)
Fixes: #11229
2023-05-23 15:06:40 +08:00
zclkkk
3c488e7b98
generic: 5.10: drop upstream patch (#11231)
Fixes: #11227
2023-05-23 10:02:55 +08:00
coolsnowwolf
013f981342 x64: add support to load GuC and HuC firmware for DG1/DG1 Max 2023-05-22 13:16:02 +08:00
coolsnowwolf
7431dcc9ef Revert "shortcut-fe: use tcp_be_liberal (#11188)"
This reverts commit 258cc2154e.
2023-05-22 12:45:34 +08:00
coolsnowwolf
cc22efe713 kernel: bump 5.15 to 5.15.112 2023-05-22 12:05:59 +08:00
coolsnowwolf
39b9f3b633 kernel: bump 5.10 to 5.10.180 2023-05-22 12:04:14 +08:00
coolsnowwolf
016d1d231f kernel: Add iommu_v2 driver for AMD/Intel 2023-05-22 12:01:49 +08:00
coolsnowwolf
79cd677bce Revert "bcm53xx: switch to 5.10"
This reverts commit dc4d37c714.
2023-05-22 11:53:41 +08:00
coolsnowwolf
45a15113ad rockchip: use generate_mac_from_mmc_cid for emmc target 2023-05-22 11:52:50 +08:00
Tiago Gaspar
7e397cd22f kernel: net: add support for kernel tls
Add ktls (Kernel TLS) kmods to enable TLS support
in kernel (allowing TLS offload when the network
card supports it)

Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
(added disabled symbols)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-21 23:21:32 +08:00
Christian Lamparter
1c3ef99b52 firmware: intel-microcode: update to 20230512
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-05-21 23:18:18 +08:00
Daniel Golle
fdee542235 generic: fix Macronix SPI-NAND driver
Use scratch buffer for DMA operetations. Passing a pointer to a stack
variable won't work and results in bogus bit flips being reported.

Patch was submitted upstream and is part of Linux 6.3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-20 23:35:14 +08:00
Daniel Golle
b3d39df1af mediatek: bpi-r3: allow up to 3W per SFP module
According to SinoVoip up to 3A @ 3.3V are available for both
SFP modules together. Raise energy limit from 1W (default) to 3W,
however, be aware that using modules consuming more than 1W will
require active cooling!

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-20 23:33:43 +08:00
AmadeusGhost
5b6c90520b mac80211: fixes nl80211 support in kernel 5.4
Run-tested-on: P&W R619AC 128M
Fixes: #11172, #11191
2023-05-19 22:27:54 +08:00
aakkll
d11884d08b
kernel: bump to 5.4.243, 6.1.29 (#11221) 2023-05-19 18:50:11 +08:00
David Bauer
52f16db9e4 iwinfo: update to latest HEAD
c9f5c3f devices: add MediaTek MT7981 WMAC compatible
b3888b2 devices: add compatible strings for Ralink WiSoCs

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-05-18 23:53:21 +08:00
David Bauer
1b65d382b2 mediatek: fix typo
Signed-off-by: David Bauer <mail@david-bauer.net>
2023-05-18 23:50:43 +08:00
Koen Vandeputte
a6f1cc5b59 kernel: add missing symbols in 5.15
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2023-05-17 13:25:11 +08:00
AmadeusGhost
88c143124a kernel: fixes 5.15/6.1 build error
Sorry for the delay, I was scolded all night
and I could only fix it until now.

Fixes: #11209, #11213, #11214
2023-05-17 01:40:15 +08:00
Daniel Golle
7640b82748 linux-firmware: move firmware file for mt7601u
The firmware file for mt7601u (MediaTek MT7601U Wireless MACs) has
been moved to the mediatek/ folder by commit
 8451c2b1 mt76xx: Move the old Mediatek WiFi firmware to mediatek

Address this by updating the location of the firmware file in our
linux-firmware Makefile generating the mt7601u-firmware package.

All other MediaTek Wi-Fi firmware files are supplied by OpenWrt's
own repository rather than being taken from linux-firmware.

Fixes: d53fe5d9ce ("linux-firmware: update to 20230515")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-16 23:54:37 +08:00
Daniel Golle
d3c7646942 linux-firmware: update to 20230515
Package offloading firmware for MT7981 which has been added to
linux-firmware recently and became available in this release.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-16 23:53:02 +08:00
shi JiaY
154993916a mt76: fix filogic target support 2023-05-15 23:28:11 +08:00
Felix Fietkau
50ce7409a3 bridger: update to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-15 23:25:13 +08:00
Daniel Golle
2cabe4faf4 kernel: backport fix for recently introduced UBI bug
Import commit "ubi: Fix failure attaching when vid_hdr offset equals to
(sub)page size" which did not yet make it to stable upstream Linux trees.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-15 23:22:28 +08:00
AmadeusGhost
1769c5dfa2 rockchip: update mmc aliases for rk3568 boards 2023-05-14 22:58:51 +08:00
AmadeusGhost
9efea60e99 mt76: drop upstream patches 2023-05-14 22:56:12 +08:00
coolsnowwolf
c79f780fca
x86: switch to 6.1 2023-05-13 15:42:45 +08:00
coolsnowwolf
dc4d37c714
bcm53xx: switch to 5.10 2023-05-13 15:38:25 +08:00
coolsnowwolf
572eb1dc9d
kernel: bump 6.1 to 6.1.28 2023-05-13 15:13:38 +08:00
coolsnowwolf
52223ba9d6
rockchip: fix 5.15 pwm pinctrl-names 2023-05-12 14:55:48 +08:00
Felix Fietkau
bcc1a60fe8 kernel: remove unnecessary change from backlog threading fix
Fixes: f1c9bd6f6f41 ("kernel: fix kernel warning and network issue in the backlog threading patch")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-11 23:15:19 +08:00
Felix Fietkau
94eb140716 kernel: fix kernel warning and network issue in the backlog threading patch
Fixes enabling it early during the boot

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-11 23:13:29 +08:00
Jan-Niklas Burfeind
d9c821597d sunxi: ensure NanoPi R1 has unique MAC address
Ensure the MAC address for all NanoPi R1 boards is assigned uniquely for
each board.

The vendor ships the device in two variants; one with and one without
eMMC; but both without static mac-addresses.
In order to assign both board types unique MAC addresses, fall back on
the same method used for the NanoPi R2S and R4S in case the EEPROM
chip is not present by generating the board MAC from the SD card CID.

[0] https://wiki.friendlyelec.com/wiki/index.php/NanoPi_R1#Hardware_Spec

Similar too and based on:

commit b5675f500daf ("rockchip: ensure NanoPi R4S has unique MAC address")

Co-authored-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
2023-05-11 23:10:55 +08:00
Robert Marko
4fc044df14 mac80211: ath11k: sync with ath-next
Synchronize the ath11k backports with the current ath-next tree.

This replaces the 160MHz with the upstreamed one, fixes 6GHz only WIPHY
registration, allows SAR usage on WCN6750 and plenty of REO fixes.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-10 22:00:09 +08:00
Kabuli Chana
71a836b056 mwlwifi: update to version 10.3.9.1-20230429
resolve disconnect issue, upstream PR412

Signed-off-by: Kabuli Chana <newtownBuild@gmail.com>
2023-05-10 21:57:16 +08:00
AmadeusGhost
07ad0eefeb autocore: ethinfo: add dsa display support
Support display any interface name for dsa.
Drop ipq sfp workaround which is not needed.
Add workaround for br* (only this repo needs).
2023-05-09 23:57:26 +08:00
AmadeusGhost
416eefadb9 mtwifi/mt7603e: enable wifi led by default 2023-05-09 23:50:22 +08:00
AmadeusGhost
0f270a2436 ramips: 5.10: add basic dsa offload for mt7621 2023-05-09 00:29:19 +08:00
AmadeusGhost
ef12a97354 ramips: mt7621: add kernel 5.10 support with mtk_hnat 2023-05-08 23:50:09 +08:00
Shiji Yang
0db2337562 ramips: backport mt7621 PCIs initialization delay patch
The sender domain has a DMARC Reject/Quarantine policy which disallows
sending mailing list messages using the original "From" header.

To mitigate this problem, the original message has been wrapped
automatically by the mailing list software.
Some devices like ZBT WE1326 and ZBT WF3526-P and some Netgear models need
to delay phy port initialization after calling the mt7621_pcie_init_port()
driver function to get into reliable boots for both warm and hard resets.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-05-08 23:38:36 +08:00
Chuanhong Guo
990cd1b3f1 ramips: mt7621: do memory detection on KSEG1
It's reported that current memory detection code occasionally detects
larger memory under some bootloaders.
Current memory detection code tests whether address space wraps around
on KSEG0, which is unreliable because it's cached.

Rewrite memory size detection to perform the same test on KSEG1 instead.
While at it, this patch also does the following two things:
1. use a fixed pattern instead of a random function pointer as the magic
   value.
2. add an additional memory write and a second comparison as part of the
   test to prevent possible smaller memory detection result due to
   leftover values in memory.

Fixes: 6d91ddf517 ("ramips: mt7621: add support for memory detection")
Reported-by: Rui Salvaterra <rsalvaterra@gmail.com>
Tested-by: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2023-05-08 23:35:21 +08:00
zxlhhyccc
258cc2154e
shortcut-fe: use tcp_be_liberal (#11188) 2023-05-07 23:50:45 +08:00
coolsnowwolf
4fbb5202f4 mt76: reseve for kernel 5.4 2023-05-07 02:00:08 +08:00
Daniel Golle
4fc24cc4ad mt76: add support for MT7981
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-05-06 00:18:36 +08:00
AmadeusGhost
081798a6ff mt76: add back kernel 5.4 support
Also refresh all patches.
2023-05-06 00:16:39 +08:00
coolsnowwolf
22de4c9868 kernel: bump 5.15 to 5.15.110 2023-05-05 13:37:38 +08:00
coolsnowwolf
f953b064c8 generic: 6.1: add MHI SBL callback for ath11k 2023-05-05 13:11:46 +08:00
Robert Marko
6402a2fa03 generic: 5.15: add MHI SBL callback for ath11k
This adds the MHI SBL callback that ath11k will utilize in order to
support multiple PCI cards or AHB+PCI combo which currently does not
work due to QRTR ID-s conflicting.

This is a prerequisite for the mac80211 patch targeting ath11k as it
uses MHI from kernel.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-05-05 12:38:14 +08:00
Eneas U de Queiroz
4155fca311 openssl: fix variable reference in conffiles
Fix the trivial abscence of $() when assigning engine config files to
the main libopenssl-config package even if the corresponding engines
were not built into the main library.

This is mostly cosmetic, since scripts/ipkg-build tests the file's
presence before it is actually included in the package's conffiles.

Fixes: 30b0351039 "openssl: configure engine packages during install"
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2023-05-05 12:36:22 +08:00
Eneas U de Queiroz
99a4abd0ff openssl: fix CVE-2023-464 and CVE-2023-465
Apply two patches fixing low-severity vulnerabilities related to
certificate policies validation:

- Excessive Resource Usage Verifying X.509 Policy Constraints
  (CVE-2023-0464)
  Severity: Low
  A security vulnerability has been identified in all supported versions
  of OpenSSL related to the verification of X.509 certificate chains
  that include policy constraints.  Attackers may be able to exploit
  this vulnerability by creating a malicious certificate chain that
  triggers exponential use of computational resources, leading to a
  denial-of-service (DoS) attack on affected systems.
  Policy processing is disabled by default but can be enabled by passing
  the `-policy' argument to the command line utilities or by calling the
  `X509_VERIFY_PARAM_set1_policies()' function.

- Invalid certificate policies in leaf certificates are silently ignored
  (CVE-2023-0465)
  Severity: Low
  Applications that use a non-default option when verifying certificates
  may be vulnerable to an attack from a malicious CA to circumvent
  certain checks.
  Invalid certificate policies in leaf certificates are silently ignored
  by OpenSSL and other certificate policy checks are skipped for that
  certificate.  A malicious CA could use this to deliberately assert
  invalid certificate policies in order to circumvent policy checking on
  the certificate altogether.
  Policy processing is disabled by default but can be enabled by passing
  the `-policy' argument to the command line utilities or by calling the
  `X509_VERIFY_PARAM_set1_policies()' function.

Note: OpenSSL also released a fix for low-severity security advisory
CVE-2023-466.  It is not included here because the fix only changes the
documentation, which is not built nor included in any OpenWrt package.

Due to the low-severity of these issues, there will be not be an
immediate new release of OpenSSL.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2023-05-05 12:35:32 +08:00
AmadeusGhost
679e2ae168 iwinfo: refresh ralink patch 2023-05-04 17:26:04 +08:00
AmadeusGhost
2b5fdd941c network: sync wireless source code 2023-05-04 17:23:39 +08:00
Felix Fietkau
3167333946 mac80211: update to v6.1.24
Drop patches accepted upstream

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-05-04 17:20:37 +08:00
AmadeusGhost
26f3634631 rockchip: add h68k/h69k hardware v2 support
Hard-coded PHY id due to hardware problem.
2023-05-01 21:08:28 +08:00
AmadeusGhost
27cc27f2ac rockchip: enable photonicat modem power
Fixes: #10859
2023-05-01 21:05:12 +08:00
coolsnowwolf
7c84256de9 Version update to R23.5.1 2023-04-29 13:18:37 +08:00
aakkll
4f7eb15359
kernel: bump to 5.4.242, 6.1.26 (#11163)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-04-29 13:13:03 +08:00
Felix Fietkau
585c2ca50e kernel: backport fix for a page pool related race condition
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-28 00:05:38 +08:00
Felix Fietkau
b204228846 kernel: fix mtk flow offload list corruption issue with l2 flows
The same node was accidentally used for two different lists, causing an
invalid pointer chain.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-28 00:03:16 +08:00
Felix Fietkau
28961f404c kernel: add support for threaded network backlog processing
This can improve load balancing by pushing backlog (and RPS) processing
to separate threads, allowing the scheduler to distribute the load.
It can be enabled with: echo 1 > /proc/sys/net/core/backlog_threaded

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-28 00:01:34 +08:00
Felix Fietkau
cc968a5b63 kernel: enable conntrack counter updates for iptables xt_FLOWOFFLOAD
Ensures that packet/byte counters in /proc/net/nf_conntrack are updated

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-27 00:08:06 +08:00
Felix Fietkau
3a82ee8b05 kernel: fix mediatek ppe flow accounting for mt7622 and older
v1 hardware uses a different enable bit for hardware counters

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-27 00:05:25 +08:00
Felix Fietkau
2352fe0f39 kernel: report mediatek ppe flow stats incrementally
Fixes wrong counter values in conntrack stats

Fixes: aa2777145f8d ("kernel: improve mtk ppe flow accounting")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-27 00:03:22 +08:00
Felix Fietkau
6fe2a421cc kernel: improve mtk ppe flow accounting
Properly track L2 flows, and ensure that stale data gets cleared

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-27 00:01:09 +08:00
Felix Fietkau
c39fd09bc1 mediatek: add kernel code for supporting offloading wlan->eth and wlan->wlan flows
Will be enabled by an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-26 23:58:23 +08:00
Felix Fietkau
991dd40dbc kernel: update mtk ppe flow accounting patch to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-26 23:56:13 +08:00
Felix Fietkau
640d665ce5 kernel: update flow offload fix based on upstream suggestions
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-26 23:55:06 +08:00
Felix Fietkau
85663da356 kernel: move mediatek flow offload refcount fix and fix a logic error
Move it to pending, since it wasn't actually accepted upstream yet.
Fixes potential issues when doing offload between multiple MACs.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-26 23:54:22 +08:00
Felix Fietkau
a213014d18 mediatek: add missing DTS entries for WED on MT7986
Needed to support WLAN offloading

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-25 23:56:21 +08:00
Lorenzo Bianconi
4db1ff2145 mediatek: filogic: move ilm, dlm and cpu_boot in dedicated nodes
This fixes issues with legacy boot loaders that don't process reserved memory
regions outside of system RAM

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-25 23:54:50 +08:00
coolsnowwolf
d86f684586 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2023-04-24 15:02:41 +08:00
coolsnowwolf
e3e13ed422 target: add EFI support to armvirt 2023-04-24 15:02:30 +08:00
Felix Fietkau
433de917cc mediatek: backport more WED upstream fixes
Fixes hang if the WO firmware can't be loaded

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-24 00:05:08 +08:00
Felix Fietkau
55b0ae4d4e kernel: backport upstream mtk_eth_soc fixes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-24 00:03:07 +08:00
Felix Fietkau
0807295426 kernel: move accepted mtk_eth_soc patches to generic-backport
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-24 00:01:34 +08:00
Felix Fietkau
c9a0d92a3c kernel: fix mtk dsa tag padding
The padding intended to avoid corrupted non-zero padding payload was
accidentally adding too many padding bytes, tripping up some setups.
Fix this by using eth_skb_pad instead.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-23 23:55:08 +08:00
Felix Fietkau
464d31eaa7 kernel: fix corrupted padding on small packets with mt753x dsa
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-04-23 23:53:19 +08:00
Andrew Sim
702087ab30 ksmbd: update to latest 3.4.8 release
Changelog: https://github.com/cifsd-team/ksmbd/releases/tag/3.4.8

Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
2023-04-22 23:54:32 +08:00
billclock
55e6f10375
linux-firmware: add missing files for i915-firmware 2023-04-22 23:32:20 +08:00
John Audia
9d124b9936 kernel: bump 5.15 to 5.15.105
All other patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-04-21 00:11:35 +08:00
aakkll
0a2b5b6076 kernel: bump to 5.4.241, 6.1.25 2023-04-21 00:09:22 +08:00
Lollipop907
344b7901ab
rockchip: add support for dilusense dlfr100 (#11106)
* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip: add support for dilusense dlfr100

* rockchip: add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* rockchip:add support for dilusense dlfr100

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Update rk3399-dlfr100.dts

* Add files via upload
2023-04-20 15:20:52 +08:00
coolsnowwolf
46625ee4ba Merge branch 'master' of https://github.com/coolsnowwolf/lede 2023-04-20 15:06:01 +08:00
coolsnowwolf
2fd68feff6 x64: enable x64 CRYPTO_XTS_AES_SYNC support on N5105/N100/N300/AMD Ryzen etc. 2023-04-20 15:05:50 +08:00
littoy
ae5505832e
x86:Add net.ipv4.tcp_collapse_max_bytes option from Cloudflare and CRYPTO_XTS_AES_SYNC (#11128)
* x86: intel 10gen GPU i915 guc patch refresh

* intel-microcode: 3.20230214.1

* x86: add tcp_collapse option support
2023-04-20 15:00:42 +08:00
Hauke Mehrtens
3713f8b5b1 mbedtls: Update to version 2.28.3
This only fixes minor problems.
Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.3

The 100-fix-compile.patch patch was merged upstream.
The code style of all files in mbedtls 2.28.3 was changed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-04-19 23:56:38 +08:00
Glenn Strauss
b06d1b8ec6 mbedtls: x509 crt verify SAN iPAddress
Signed-off-by: Glenn Strauss <gstrauss@gluelogic.com>
2023-04-19 23:54:21 +08:00
Nick Hainke
39ee2e1f98 libcap: update to 2.68
Release Notes:
https://sites.google.com/site/fullycapable/release-notes-for-libcap#h.vdh3d47czmle

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-04-18 23:59:16 +08:00
Husky
4bba40608b
uboot-rockchip: revert use of standard boot (#11121) 2023-04-17 23:38:51 +08:00
AmadeusGhost
4647696044 uboot-rockchip: refresh rk3399 defconfig
Fixes: #11118
2023-04-16 23:53:45 +08:00
Husky
64a79c9734
uboot-rockchip: fix python link path (#11117)
Fix: #11101
2023-04-16 10:28:44 +08:00
Robert Marko
0385722fc8 kernel: filter out pahole version
Pahole version is being autodetected during runtime since kernel 5.15.96
via in-kernel scripts/pahole-version.sh so add CONFIG_PAHOLE_VERSION to
kernel filter in order to prevent it from being added to target configs.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-04-15 23:50:12 +08:00
Joe Mullally
65699f26ff kernel: add support for XMC XM25QH64C
The XMC XM25QH64C is a 8MB SPI NOR chip. The patch is verified on TL-WPA8631P v3.
Datasheet available at https://www.xmcwh.com/uploads/442/XM25QH64C.pdf

Signed-off-by: Joe Mullally <jwmullally@gmail.com>
2023-04-15 23:48:46 +08:00
Daniel Golle
4b09a33498 generic: move accepted patch to backport-5.15
The patch adding SFP quirk for MXPD 483II was accepted upstream and
will be part of Linux v6.3:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=ad651d68cee75e9ac20002254c4e5d09ee67a84b

Move the patch from pending-5.15 to backport-5.15.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-15 23:45:53 +08:00
AmadeusGhost
61b7a5aa75 Revert "rockchip: rk3568 overclock to 2.2GHz"
This reverts commit c28b7a5625.
2023-04-14 23:54:06 +08:00
AmadeusGhost
36a2481b9a uboot-rockchip: revert to vendor atf
Since rockchip is so closed, we have no choice.
2023-04-14 23:45:12 +08:00
aakkll
8a9cd422ff
kernel: bump 6.1 to 6.1.24 (#11110) 2023-04-14 15:10:41 +08:00
coolsnowwolf
8f42e0d971 firewall: fix firewall reload lock 2023-04-13 17:33:33 +08:00
coolsnowwolf
a4426eb5a4 firewall: fix TCP MSS settings issue 2023-04-12 16:44:19 +08:00
AmadeusGhost
c28b7a5625 rockchip: rk3568 overclock to 2.2GHz
No sense, use at your own risk.
2023-04-12 00:29:13 +08:00
AmadeusGhost
bb084c1d09 uboot-rockchip: bump to v2023.04
For the python problem, just make clean.
Skip the gpio patch due to it may broken boot.
2023-04-12 00:15:03 +08:00
AmadeusGhost
88989f2722 arm-trusted-firmware-rockchip: update to release 2.8
Also added basic rk3568 support from rockchip.
2023-04-12 00:09:22 +08:00
AmadeusGhost
e9553e8101 README: update build dependence 2023-04-11 23:58:53 +08:00
AmadeusGhost
49c46be877 Revert "arm-trusted-firmware-rockchip-vendor: rk3568 atf revert to v1.28"
This reverts commit 1cde7fcb20.
2023-04-11 23:56:14 +08:00
coolsnowwolf
f57ce2a85e rockchip: add USB3.0 phy support for RK3328 2023-04-11 16:36:24 +08:00
AmadeusGhost
e4901141b5 mediatek: add support for TP-Link TL-XDR4288
The TP-Link TL-XDR4288 has the same hardware as the
TP-Link TL-XDR6088 except for the wireless part.

Note: WiFi: MT7976DAN (2.4G 2T2R, 5G 3T3R)

Signed-off-by: AnYun <amadeus@openjmu.xyz>
2023-04-09 23:18:51 +08:00
Daniel Golle
4552e6a16c mediatek: introduce KERNEL_LOADADDR to Device/Default template
We need to reset KERNEL_LOADADDR if we use it on a per-device base.
Otherwise the previous value will be kept in case a device doesn't
define KERNEL_LOADADDR and relies on the default.

Move initializing KERNEL_LOADADDR to target/linux/mediatek/image/Makefile,
similar to how it's done also on the ramips target.

This fixes image size related breakage on devices which rely on the
default value of KERNEL_LOADADDR.

While at it use 0x48000000 which is more common than the previous default
0x44000000 for the filogic subtarget.

Fixed: e7c399bee6 ("filogic: add support for ASUS TUF-AX4200")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-04-09 23:16:05 +08:00
David Bauer
98539e91b2 mediatek: make TUF-AX4200 KERNEL simply expanded
The KERNEL variable was recursively expanded, breaking other devices.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-04-09 23:13:06 +08:00
XiaoBinin
0d498429b5
rockchip: fix wan port for nanopi r2c (#11091)
Fixes: #11074
2023-04-08 21:28:32 +08:00
coolsnowwolf
04147dcaf5 linux: fir kernel 6.1 upsteam patch 2023-04-07 19:45:34 +08:00
coolsnowwolf
4ae5efe494 kernel: bump 6.1 to 6.1.23 2023-04-07 14:45:50 +08:00
coolsnowwolf
c41a641c37 rockchip: fix FriendlyArm R5C wan/lan LEDs 2023-04-07 00:23:20 +08:00
coolsnowwolf
5b862342c7 kernel: bump 5.4 to 5.4.240 2023-04-06 23:22:43 +08:00
coolsnowwolf
7b25a55620 Revert "ramips: switch to kernel 5.10"
This reverts commit 977bf86ccd.
2023-04-04 22:53:21 +08:00
Fluxxy
5f8538b5cc
ramips: add support for Bolt BL201 board (#11078)
CPU: MT7620A
RAM: DDR2 64MB
ROM: SPI 16MB
WIFI 5G: MT7612E
2023-04-04 11:38:40 +08:00
zfdx
12e94bfc9c
ramips: kernel 5.10: add mt7620-nand driver(#11076) 2023-04-04 11:35:34 +08:00
Liangbin Lian
e69815120a
package/mt7615d: fix dbdc channel no apply (#11070) 2023-04-03 03:15:01 +08:00
Lollipop907
4cbbcf90ba
rockchip:add sharevdi H3399PC support (#11053)
* add sharevdi h3399pc

* Update Makefile

* Add files via upload

* Add files via upload

* rockchip:add sharevdi h3399pc

* rockchip:add sharevdi h3399pc

* rockchip:add sharevdi h3399pc

* rockchip:add sharevdi h3399pc

* Update rk3399-h3399pc.dts

* Update rk3399-h3399pc.dts

* Fix indentation issues

* merge some patches

* merge some patches

* merge some patches

* merge some patches

* merge some patches

* merge some patches

* merge some patches

* merge some patches

* Update rk3399-h3399pc.dts
2023-04-03 03:13:37 +08:00
aiamadeus
e036c0650f
Merge pull request #11064 from jjm2473/k2p_apcli 2023-04-02 18:30:49 +08:00
jjm2473
674632f6fb package/mt7615d: support apcli bridge eth port 2023-04-02 15:24:04 +08:00
jjm2473
4f19c02b85 package/mt7615d: support client mode on dbdc driver 2023-04-02 10:31:47 +08:00
1054009064
d2a4fb1c89
package/qca: update the download URL (#11055)
Fixes: #11048
2023-04-01 22:06:55 +08:00
zfdx
bad53b1207
ramips: fix HiWIFI R33 WIFI Weak signal (#11051) 2023-04-01 15:17:55 +08:00
8990 changed files with 1124711 additions and 550229 deletions

View File

@ -1,20 +0,0 @@
反馈bug/问题模板,提建议请删除
## 1.关于你要提交的问题
Q是否搜索了issue (使用 "x" 选择)
* [ ] 没有类似的issue
## 2. 详细叙述
### (1) 具体问题
A
### (2) 路由器型号和固件版本
A
### (3) 详细日志
A

32
.github/ISSUE_TEMPLATE/bug-report.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: 问题描述
description: 反馈问题模板
body:
- type: textarea
id: description
attributes:
label: 详细叙述
description: 详细叙述问题
validations:
required: true
- type: checkboxes
id: duplicate_issue
attributes:
label: 重复 issue
description: 是否搜索了 issues
options:
- label: 没有类似的 issue
required: true
- type: input
id: model_name
attributes:
label: 具体型号
description: 硬件型号
validations:
required: true
- type: textarea
id: details_log
attributes:
label: 详细日志
description: make V=s -j1 时的问题日志
validations:
required: true

6
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,6 @@
---
blank_issues_enabled: false
contact_links:
- name: discussion
url: https://github.com/coolsnowwolf/lede/discussions
about: Please ask and answer questions here.

View File

@ -1,2 +1,4 @@
Q你知道这是`pull request`吗?(使用 "x" 选择) # Pull Request 规则,创建时请删除
* [ ] 我知道
- 禁止有关 "GitHub Actions" 的提交
- 禁止使用 users.noreply.github.com 提交

View File

@ -20,7 +20,7 @@ jobs:
name: Build OpenWrt Firmware name: Build OpenWrt Firmware
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- name: Space cleanup and Initialization environment - name: Space cleanup and Initialization environment
@ -31,16 +31,16 @@ jobs:
sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android sudo -E rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/apt/sources.list.d /usr/local/lib/android
sudo -E apt-mark hold grub-efi-amd64-signed sudo -E apt-mark hold grub-efi-amd64-signed
sudo -E apt update sudo -E apt update
sudo -E apt -y purge azure-cli* docker* ghc* zulu* llvm* firefox google* dotnet* powershell* openjdk* mysql* php* mongodb* dotnet* moby* snap* sudo -E apt -y purge azure-cli* docker* ghc* zulu* llvm* firefox google* dotnet* powershell* openjdk* mysql* php* mongodb* dotnet* snap*
sudo -E apt -y full-upgrade sudo -E apt -y full-upgrade
sudo -E apt -y install ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python3 python3-pip libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev sudo -E apt -y install ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache clang cmake cpio curl device-tree-compiler flex gawk gcc-multilib g++-multilib gettext genisoimage git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev libssl-dev libtool llvm lrzsz msmtp ninja-build p7zip p7zip-full patch pkgconf python3 python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
sudo -E systemctl daemon-reload sudo -E systemctl daemon-reload
sudo -E apt -y autoremove --purge sudo -E apt -y autoremove --purge
sudo -E apt clean sudo -E apt clean
sudo -E timedatectl set-timezone "Asia/Shanghai" sudo -E timedatectl set-timezone "Asia/Shanghai"
- name: Checkout OpenWrt - name: Checkout OpenWrt
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Update feeds - name: Update feeds
run: | run: |
@ -75,19 +75,19 @@ jobs:
cp -rf $(find ./bin/targets/ -type f -name "*.buildinfo" -o -name "*.manifest") ./artifact/buildinfo/ cp -rf $(find ./bin/targets/ -type f -name "*.buildinfo" -o -name "*.manifest") ./artifact/buildinfo/
- name: Upload buildinfo - name: Upload buildinfo
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: OpenWrt_buildinfo name: OpenWrt_buildinfo
path: ./artifact/buildinfo/ path: ./artifact/buildinfo/
- name: Upload package - name: Upload package
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: OpenWrt_package name: OpenWrt_package
path: ./artifact/package/ path: ./artifact/package/
- name: Upload firmware - name: Upload firmware
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: OpenWrt_firmware name: OpenWrt_firmware
path: ./bin/targets/ path: ./bin/targets/

View File

@ -2,7 +2,7 @@
# #
# Copyright (C) 2006-2013 OpenWrt.org # Copyright (C) 2006-2013 OpenWrt.org
mainmenu "OpenWrt Configuration" mainmenu "LEDE Configuration"
config MODULES config MODULES
modules modules

View File

@ -10,11 +10,13 @@ export TOPDIR LC_ALL LANG TZ
empty:= empty:=
space:= $(empty) $(empty) space:= $(empty) $(empty)
$(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt directory must not include any spaces)) $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the LEDE directory must not include any spaces))
world: world:
DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1) DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -e '/usr' -e '/nix/store' -m 1)
export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH))
export PATH:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host/bin),$(TOPDIR)/staging_dir/host/bin):$(PATH) export PATH:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host/bin),$(TOPDIR)/staging_dir/host/bin):$(PATH)
ifneq ($(OPENWRT_BUILD),1) ifneq ($(OPENWRT_BUILD),1)
@ -38,6 +40,9 @@ else
include tools/Makefile include tools/Makefile
include toolchain/Makefile include toolchain/Makefile
# Include the test suite Makefile if it exists
-include tests/Makefile
$(toolchain/stamp-compile): $(tools/stamp-compile) $(if $(CONFIG_BUILDBOT),toolchain_rebuild_check) $(toolchain/stamp-compile): $(tools/stamp-compile) $(if $(CONFIG_BUILDBOT),toolchain_rebuild_check)
$(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared $(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared
$(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)

View File

@ -1,15 +1,25 @@
# 欢迎来到 Lean 的 LEDE 源码仓库 # 欢迎来到 Lean 的 LEDE 源码仓库
如何编译自己需要的 LEDE 固件 [How to build your LEDE firmware](./README_EN.md) 为国产龙芯 LOONGSON SoC loongarch64 / 飞腾 Phytium 腾锐 D2000 系列架构添加支持
I18N: [English](README_EN.md) | [简体中文](README.md) | [日本語](README_JA.md)
## 官方讨论群 ## 官方讨论群
如有技术问题需要讨论或者交流,欢迎加入以下群:
1. QQ 讨论群: Op固件技术研究群 ,号码 891659613 ,加群链接:[点击加入](https://jq.qq.com/?_wv=1027&k=XL8SK5aC "Op固件技术研究群")
2. TG 讨论群: OP 编译官方大群 ,加群链接:[点击加入](https://t.me/JhKgAA6Hx1 "OP 编译官方大群")
3. Rockchip RK3568 预编译固件发布 Release 下载更新地址 (包括 H68K )<https://github.com/coolsnowwolf/lede/releases/tag/20220716>
<a href ="https://item.taobao.com/item.htm?spm=a230r.1.14.11.4bb55247rdHEAP&id=702787603594&ns=1&abbucket=17#detail 如有技术问题需要讨论或者交流,欢迎加入以下群:
"><img src="https://github.com/coolsnowwolf/lede/blob/master/doc/h68k.jpg?raw=true" width=600 /></a>
1. QQ 讨论群Op 固件技术研究群,号码 891659613加群链接[点击加入](https://qm.qq.com/q/IMa6Yf2SgC "Op固件技术研究群")
2. TG 讨论群OP 编译官方大群,加群链接:[点击加入](https://t.me/JhKgAA6Hx1 "OP 编译官方大群")
## 软路由 ArmSoM Sige 系列介绍
ArmSoM-Sige 系列:软路由、单板计算机、小型服务器与智能家居的全能之选。
[商品介绍页面 - ArmSom 品牌店](https://shop518100695.taobao.com/)
购买链接:
[![sige1-zh](doc/sige-zh.jpg)](https://item.taobao.com/item.htm?id=721197662185)
## 注意 ## 注意
@ -19,19 +29,20 @@
## 编译命令 ## 编译命令
1. 首先装好 Linux 系统,推荐 Debian 11 或 Ubuntu LTS 1. 首先装好 Linux 系统,推荐 Debian 或 Ubuntu LTS
2. 安装编译依赖 2. 安装编译依赖
```bash ```bash
sudo apt update -y sudo apt update -y
sudo apt full-upgrade -y sudo apt full-upgrade -y
sudo apt install -y ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison build-essential \ sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ bzip2 ccache clang cmake cpio curl device-tree-compiler flex gawk gcc-multilib g++-multilib gettext \
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ genisoimage git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev \
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev \
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip libpython3-dev qemu-utils \ libreadline-dev libssl-dev libtool llvm lrzsz msmtp ninja-build p7zip p7zip-full patch pkgconf \
rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev python3 python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion \
swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
``` ```
3. 下载源代码,更新 feeds 并选择配置 3. 下载源代码,更新 feeds 并选择配置
@ -52,7 +63,7 @@
make V=s -j1 make V=s -j1
``` ```
本套代码保证肯定可以编译成功。里面包括了 R23 所有源代码,包括 IPK 的。 本套代码保证肯定可以编译成功。里面包括了 R24 所有源代码,包括 IPK 的。
你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作! 你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作!
@ -71,14 +82,14 @@ make V=s -j$(nproc)
如果需要重新配置: 如果需要重新配置:
```bash ```bash
rm -rf ./tmp && rm -rf .config rm -rf .config
make menuconfig make menuconfig
make V=s -j$(nproc) make V=s -j$(nproc)
``` ```
编译完成后输出路径bin/targets 编译完成后输出路径bin/targets
### 如果你使用 WSL/WSL2 进行编译 ### 使用 WSL/WSL2 进行编译
由于 WSL 的 PATH 中包含带有空格的 Windows 路径,有可能会导致编译失败,请在 `make` 前面加上: 由于 WSL 的 PATH 中包含带有空格的 Windows 路径,有可能会导致编译失败,请在 `make` 前面加上:
@ -86,6 +97,23 @@ make V=s -j$(nproc)
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
``` ```
由于默认情况下,装载到 WSL 发行版的 NTFS 格式的驱动器将不区分大小写,因此大概率在 WSL/WSL2 的编译检查中会返回以下错误:
```txt
Build dependency: OpenWrt can only be built on a case-sensitive filesystem
```
一个比较简洁的解决方法是,在 `git clone` 前先创建 Repository 目录,并为其启用大小写敏感:
```powershell
# 以管理员身份打开终端
PS > fsutil.exe file setCaseSensitiveInfo <your_local_lede_path> enable
# 将本项目 git clone 到开启了大小写敏感的目录 <your_local_lede_path>
PS > git clone https://github.com/coolsnowwolf/lede <your_local_lede_path>
```
> 对已经 `git clone` 完成的项目目录执行 `fsutil.exe` 命令无法生效,大小写敏感只对新增的文件变更有效。
### macOS 原生系统进行编译 ### macOS 原生系统进行编译
1. 在 AppStore 中安装 Xcode 1. 在 AppStore 中安装 Xcode
@ -93,10 +121,10 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2. 安装 Homebrew 2. 安装 Homebrew
```bash ```bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
``` ```
3. 使用 Homebrew 安装工具链、依赖与基础软件包: 3. 使用 Homebrew 安装工具链、依赖与基础软件包
```bash ```bash
brew unlink awk brew unlink awk
@ -106,6 +134,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
4. 然后输入以下命令,添加到系统环境变量中: 4. 然后输入以下命令,添加到系统环境变量中:
- intel 芯片的 mac
```bash ```bash
echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc echo 'export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
@ -116,11 +146,23 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
echo 'export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc echo 'export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
``` ```
- apple 芯片的 mac
```zsh
echo 'export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
```
5. 重新加载一下 shell 启动文件 `source ~/.bashrc`,然后输入 `bash` 进入 bash shell就可以和 Linux 一样正常编译了 5. 重新加载一下 shell 启动文件 `source ~/.bashrc`,然后输入 `bash` 进入 bash shell就可以和 Linux 一样正常编译了
## 特别提示 ## 特别提示
1. 源代码中绝不含任何后门和可以监控或者劫持你的 HTTPS 的闭源软件, SSL 安全是互联网最后的壁垒。安全干净才是固件应该做到的; 1. 源代码中绝不含任何后门和可以监控或者劫持你的 HTTPS 的闭源软件, SSL 安全是互联网最后的壁垒,安全干净才是固件应该做到的。
2. 想学习 OpenWrt 开发,但是摸不着门道?自学没毅力?基础太差?怕太难学不会?跟着佐大学 OpenWrt 开发入门培训班助你能学有所成 2. 想学习 OpenWrt 开发,但是摸不着门道?自学没毅力?基础太差?怕太难学不会?跟着佐大学 OpenWrt 开发入门培训班助你能学有所成
报名地址:[点击报名](http://forgotfun.org/2018/04/openwrt-training-2018.html "报名") 报名地址:[点击报名](http://forgotfun.org/2018/04/openwrt-training-2018.html "报名")
@ -129,18 +171,8 @@ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
4. 存档版本仓库地址:<https://github.com/coolsnowwolf/openwrt> 4. 存档版本仓库地址:<https://github.com/coolsnowwolf/openwrt>
## 软路由介绍
iKOOLCORE 硬酷R1 多网口小主机 - N5105/N6005 : Cube box, rest fun. 方寸之间,尽享乐趣
(商品介绍页面 - 硬酷科技(支持花呗))
[优惠券链接](https://taoquan.taobao.com/coupon/unify_apply.htm?sellerId=2208215115814&activityId=85fbaf791c4b45e9aaf5ec8e3d1cb2a9)
[下单链接](https://item.taobao.com/item.htm?ft=t&id=682987219699)
[![r1](doc/r1.jpg)](https://item.taobao.com/item.htm?ft=t&id=682025492099)
## 捐贈 ## 捐贈
如果你觉得此项目对你有帮助,可以捐助我们,以鼓励项目能持续发展,更加完善 如果你觉得此项目对你有帮助,可以捐助我们,以鼓励项目能持续发展,更加完善
![star](doc/star.png) ![star](doc/star.png)

View File

@ -1,88 +1,201 @@
Welcome to Lean's git source of OpenWrt and packages # Welcome to Lean's git source of OpenWrt and packages
=
I18N: [English](README_EN.md) | [简体中文](README.md) | [日本語](README_JA.md)
How to build your Openwrt firmware.
- ## Official Channels
Note:
-- If you have technical questions for discussion or sharing, feel free to join the following channels:
1. DO **NOT** USE **root** USER FOR COMPILING!!!
1. QQ Group: *OpenWRT Firmware Technical Research Group*, Group Number is `891659613`.
2. Users within China should prepare proxy before building. Join the group: [Link](https://jq.qq.com/?_wv=1027&k=XL8SK5aC "Op固件技术研究群").
- [Click to download QQ client](https://im.qq.com/pcqq).
3. Web admin panel default IP is 192.168.1.1 and default password is "password".
2. Telegram Group: *OpenWRT Firmware Technical Research Group*.
Let's start! Join the group: [Link](https://t.me/JhKgAA6Hx1 "OP 编译官方大群").
---
1. First, install Ubuntu 64bit (Ubuntu 20.04 LTS x86 is recommended). ## ArmSoM Sige Board Series Introduction
2. Run `sudo apt-get update` in the terminal, and then run ArmSoM-Sige Series: Your All-in-One Powerhouse for Soft Routing, SBCs, Mini Servers, and Home Automation.
`
sudo apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 python2.7 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler g++-multilib antlr3 gperf wget curl swig rsync [ArmSoM Store](https://www.aliexpress.com/store/1102800175)
`
Buy Link
3. Run `git clone https://github.com/coolsnowwolf/lede` to clone the source code, and then `cd lede` to enter the directory [![sige1-en](doc/sige-en.jpg)](https://aliexpress.com/item/3256807356692995.html)
4. ```bash ## Notice
./scripts/feeds update -a
./scripts/feeds install -a 1. **Never compile OpenWRT as `root`**
make menuconfig 2. If you are living in mainland China, please make sure you could visit the **REAL** Internet.
``` 3. Default login IP is `192.168.1.1`, password is `password`.
5. Run `make -j8 download V=s` to download libraries and dependencies (user in China should use global proxy when possible) ## How to Compile
6. Run `make -j1 V=s` (integer following -j is the thread count, single-thread is recommended for the first build) to start building your firmware. 1. Install a Linux distribution, Debian or Ubuntu LTS is recommended.
This source code is promised to be compiled successfully. 2. Install dependencies:
You can use this source code freely, but please link this GitHub repository when redistributing. Thank you for your cooperation! ```bash
= sudo apt update -y
sudo apt full-upgrade -y
Rebuild: sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
```bash bzip2 ccache clang cmake cpio curl device-tree-compiler flex gawk gcc-multilib g++-multilib gettext \
cd lede git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev \
git pull libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev \
./scripts/feeds update -a && ./scripts/feeds install -a libssl-dev libtool llvm lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python3 \
make defconfig python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo \
make -j8 download uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
make -j$(($(nproc) + 1)) V=s ```
```
3. Clone the source code, update `feeds` and configure:
If reconfiguration is need:
```bash ```bash
rm -rf ./tmp && rm -rf .config git clone https://github.com/coolsnowwolf/lede
make menuconfig cd lede
make -j$(($(nproc) + 1)) V=s ./scripts/feeds update -a
``` ./scripts/feeds install -a
make menuconfig
Build result will be produced to `bin/targets` directory. ```
Special tips: 4. Download libraries and compile firmware
------ > (`-j` is the thread count, single-thread is recommended for the first build):
1. This source code doesn't contain any backdoors or close source applications that can monitor/capture your HTTPS traffic, SSL is the final castle of cyber security. Safety is what a firmware should achieve.
```bash
2. If you have any technical problem, you may join the QQ discussion group: 297253733, link: click [here](https://jq.qq.com/?_wv=1027&k=5yCRuXL) make download -j8
make V=s -j1
3. Want to learn OpenWrt development but don't know how? Can't motivate yourself for self-learning? Not enough fundamental knowledge? Learn OpenWrt development with Mr. Zuo through his Beginner OpenWrt Training Course. Click [here](http://forgotfun.org/2018/04/openwrt-training-2018.html) to register. ```
## Router Recommendation These commands are supposed to compile the source code successfully.
Not Sponsored: If you are finding a low power consumption, small and performance promising x86/x64 router, I personally recommend the All source code of R23 is included, including IPK.
EZPROv1 Alumium Edition (N3710 4000M): [Details](https://item.taobao.com/item.htm?spm=a230r.1.14.20.144c763fRkK0VZ&id=561126544764)
You can use this source code freely, but please link this GitHub repository when redistributing.
![xm1](doc/xm5.jpg) Thank you for your cooperation!
![xm2](doc/xm6.jpg)
Rebuild:
## Donation
```bash
If this project does help you, please consider donating to support the development of this project. cd lede
git pull
### Alipay ./scripts/feeds update -a
./scripts/feeds install -a
![alipay](doc/alipay_donate.jpg) make defconfig
make download -j8
### WeChat make V=s -j$(nproc)
```
![wechat](doc/wechat_donate.jpg)
If reconfiguration is need:
## Note: Addition Lean's private package source code in `./package/lean` directory. Use it under GPL v3.
```bash
## GPLv3 is compatible with more licenses than GPLv2: it allows you to make combinations with code that has specific kinds of additional requirements that are not in GPLv3 itself. Section 7 has more information about this, including the list of additional requirements that are permitted. rm -rf ./tmp && rm -rf .config
make menuconfig
make V=s -j$(nproc)
```
Build artifacts will be outputted to `bin/targets` directory.
### If you are using WSL/WSL2 as your build environment
WSL's `PATH` potentially contain Windows paths with spaces, which may cause compilation failure.
Please add the following lines to your local environment profiles before compiling:
```bash
# Update and reload your profile, ~/.bashrc for example.
cat << EOF >> ~/.bashrc
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
EOF
source ~/.bashrc
```
NTFS-formatted drives mounted to a WSL distribution will be case-insensitive by default.
This will cause the following error when compiling in WSL/WSL2:
```txt
Build dependency: OpenWrt can only be built on a case-sensitive filesystem
```
A simple solution is to create a case-sensitive directory for the repository before `git clone`:
```powershell
# Open a terminal as administrator
PS > fsutil.exe file setCaseSensitiveInfo <your_local_lede_path> enable
# Clone this repository to the case-sensitive directory <your_local_lede_path>
PS > git clone git@github.com:coolsnowwolf/lede.git <your_local_lede_path>
```
> For directories that have already been `git clone`, `fsutil.exe` will not take effect.
> Case sensitivity will only be enabled for new changes in the directory.
### macOS Compilation
1. Install Xcode from AppStore
2. Install Homebrew:
```bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
3. Install toolchain, dependencies and packages with Homebrew:
```bash
brew unlink awk
brew install coreutils diffutils findutils gawk gnu-getopt gnu-tar grep make ncurses pkg-config wget quilt xz
brew install gcc@11
```
4. Update your system environment:
- mac with intel chip
```bash
echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
```
- mac with apple chip
```zsh
echo 'export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
```
5. Reload your shell profile `source ~/.bashrc && bash`, then you can compile normally like Linux.
## Declaration
1. This source code doesn't contain any backdoors or closed source applications that can monitor/capture your HTTPS traffic. SSL security is the final castle of cyber security. Safety is what a firmware should do.
2. Want to learn OpenWRT development but don't know how to start? Can't motivate yourself for self-learning? Do not have enough fundamental knowledge? Learn OpenWRT development with Mr. Zuo through his Beginner OpenWRT Training Course. Click [here](http://forgotfun.org/2018/04/openwrt-training-2018.html) to register.
3. QCA IPQ60xx open source repository: <https://github.com/coolsnowwolf/openwrt-gl-ax1800>
4. OpenWRT Archive repository: <https://github.com/coolsnowwolf/openwrt>
## Introduction to Software Routers
Yingku R2 - N95/N300 Mini Four-Network HomeLab Server
(Introduction page - Yingku Technology (support AliPay Huabei)):
[Pre-sale link](https://item.taobao.com/item.htm?ft=t&id=719159813003)
<div align="left">
<a href="https://item.taobao.com/item.htm?ft=t&id=719159813003">
<img src="doc/r1.jpg" width = "600" alt="" align=center />
</a>
</div>
<br>
## Donation
If this project did helped you, please consider donating to support the development of this project.
<div align="left">
<img src="./doc/star.png" width = "400" alt="" align=center />
</div>
<br>

191
README_JA.md Normal file
View File

@ -0,0 +1,191 @@
# OpenWrt とパッケージの Lean の git ソースへようこそ
I18N: [English](README_EN.md) | [简体中文](README.md) | [日本語](README_JA.md)
## 公式チャンネル
ディスカッションや共有したい技術的な質問がある場合は、以下のチャンネルにお気軽にご参加ください:
1. QQ グループ: *OpenWRT ファームウェア技術研究グループ*、グループ番号は `891659613` です。
グループに参加する: [リンク](https://jq.qq.com/?_wv=1027&k=XL8SK5aC "Op固件技术研究群")。
- [クリックして QQ クライアントをダウンロードする](https://im.qq.com/pcqq)。
2. Telegram グループ: *OpenWRT ファームウェア技術研究グループ*。グループに参加する: [リンク](https://t.me/JhKgAA6Hx1 "OP 编译官方大群")。
## 注意
1. **OpenWRT を決して `root` としてコンパイルしないこと**
2. 中国本土にお住まいの方は、ぜひ **REAL** インターネットをご覧ください。
3. デフォルトのログイン IP は `192.168.1.1` で、パスワードは `password` です。
## コンパイル方法
1. Linuxディストリビューションをインストールし、Debian または Ubuntu LTS を推奨します。
2. 依存関係をインストールする:
```bash
sudo apt update -y
sudo apt full-upgrade -y
sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \
bzip2 ccache clang cmake cpio curl device-tree-compiler flex gawk gcc-multilib g++-multilib gettext \
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev \
libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev \
libssl-dev libtool llvm lrzsz mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python3 \
python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo \
uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
```
3. ソースコードをクローンし、`feeds` を更新し、設定する:
```bash
git clone https://github.com/coolsnowwolf/lede
cd lede
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
```
4. ライブラリのダウンロードとファームウェアのコンパイル
> (`-j` はスレッドカウント、最初のビルドはシングルスレッドを推奨):
```bash
make download -j8
make V=s -j1
```
これらのコマンドは、ソースコードを正常にコンパイルするためのものです。
R23 のソースコードは IPK を含めてすべて含まれています。
このソースコードはご自由にお使いいただけますが、再配布の際はこの GitHub リポジトリをリンクしてください。
ご協力ありがとうございました!
リビルド:
```bash
cd lede
git pull
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
make download -j8
make V=s -j$(nproc)
```
再設定が必要な場合:
```bash
rm -rf ./tmp && rm -rf .config
make menuconfig
make V=s -j$(nproc)
```
ビルドの成果物は `bin/targets` ディレクトリに出力されます。
### WSL/WSL2 をビルド環境として使用している場合
WSL の `PATH` には、Windows のパスが空白で含まれている可能性があり、コンパイルに失敗することがあります。
コンパイルする前に、ローカルの環境プロファイルに以下の行を追加してください:
```bash
# 例えば、~/.bashrc などのプロファイルを更新した後、再読み込みを行う。
cat << EOF >> ~/.bashrc
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH"
EOF
source ~/.bashrc
```
WSL ディストリビューションにマウントされた NTFS フォーマットのドライブは、デフォルトで大文字と小文字が区別されません。
このため、WSL/WSL2 でコンパイルすると、次のようなエラーが発生します:
```txt
Build dependency: OpenWrt can only be built on a case-sensitive filesystem
```
単純な解決策は、`git clone` の前に大文字小文字を区別してリポジトリ用のディレクトリを作成することです:
```powershell
# 管理者としてターミナルを開く
PS > fsutil.exe file setCaseSensitiveInfo <your_local_lede_path> enable
# 大文字と小文字を区別して、このリポジトリを <your_local_lede_path> ディレクトリにクローンする
PS > git clone git@github.com:coolsnowwolf/lede.git <your_local_lede_path>
```
> すでに `git clone` されたディレクトリでは、`fsutil.exe` は有効になりません。
> 大文字小文字の区別はディレクトリの新しい変更に対してのみ有効になります。
### macOS コンパイル
1. AppStore から Xcode をインストールする
2. Homebrew をインストールする:
```bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```
3. Homebrew でツールチェーン、依存関係、パッケージをインストールする:
```bash
brew unlink awk
brew install coreutils diffutils findutils gawk gnu-getopt gnu-tar grep make ncurses pkg-config wget quilt xz
brew install gcc@11
```
4. システム環境のアップデート:
- MacのIntelシリコンバージョン
```bash
echo 'export PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/usr/local/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
```
- MacのAppleシリコンバージョン
```zsh
echo 'export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/findutils/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/gnu-getopt/bin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/gnu-tar/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/grep/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"' >> ~/.bashrc
echo 'export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"' >> ~/.bashrc
```
5. シェルプロファイル `source ~/.bashrc && bash` を再読み込みすれば、Linux のように普通にコンパイルできます。
## 宣言
1. このソースコードには、HTTPS トラフィックを監視キャプチャできるバックドアやクローズドソースアプリケーションは含まれていません。SSL セキュリティはサイバーセキュリティの最後の城です。安全性はファームウェアがすべきことです。
2. OpenWRT の開発を学びたいが、何から始めたらいいかわからないですか?自己学習のモチベーションが上がらない?基礎知識が足りない?ズオ氏の初心者 OpenWRT トレーニングコースで一緒に OpenWRT 開発を学びましょう。お申し込みは[こちら](http://forgotfun.org/2018/04/openwrt-training-2018.html)をクリックしてください。
3. QCA IPQ60xx オープンソースリポジトリ: <https://github.com/coolsnowwolf/openwrt-gl-ax1800>
4. OpenWRT アーカイブリポジトリ: <https://github.com/coolsnowwolf/openwrt>
## ソフトウェアルーター入門
Yingku R2 - N95/N300 Mini Four-Network HomeLab Server
(紹介ページ - Yingku Technology (support AliPay Huabei)):
[先行販売リンク](https://item.taobao.com/item.htm?ft=t&id=719159813003)
<div align="left">
<a href="https://item.taobao.com/item.htm?ft=t&id=719159813003">
<img src="doc/r1.jpg" width = "600" alt="" align=center />
</a>
</div>
<br>
## 寄付
このプロジェクトがあなたのお役に立てたのであれば、このプロジェクトの発展を支援するための寄付をご検討ください。
<div align="left">
<img src="./doc/star.png" width = "400" alt="" align=center />
</div>
<br>

View File

@ -5,7 +5,6 @@
config EXPERIMENTAL config EXPERIMENTAL
bool "Enable experimental features by default" bool "Enable experimental features by default"
default n
help help
Set this option to build with latest bleeding edge features Set this option to build with latest bleeding edge features
which may or may not work as expected. which may or may not work as expected.
@ -27,6 +26,14 @@ menu "Global build settings"
directory containing machine readable list of built profiles directory containing machine readable list of built profiles
and resulting images. and resulting images.
config JSON_CYCLONEDX_SBOM
bool "Create CycloneDX SBOM JSON"
default BUILDBOT
help
Create a JSON files *.bom.cdx.json in the build
directory containing Software Bill Of Materials in CycloneDX
format.
config ALL_NONSHARED config ALL_NONSHARED
bool "Select all target specific packages by default" bool "Select all target specific packages by default"
select ALL_KMODS select ALL_KMODS
@ -42,7 +49,6 @@ menu "Global build settings"
config BUILDBOT config BUILDBOT
bool "Set build defaults for automatic builds (e.g. via buildbot)" bool "Set build defaults for automatic builds (e.g. via buildbot)"
default n
help help
This option changes several defaults to be more suitable for This option changes several defaults to be more suitable for
automatic builds. This includes the following changes: automatic builds. This includes the following changes:
@ -62,6 +68,11 @@ menu "Global build settings"
bool "Enable TLS certificate verification during package download" bool "Enable TLS certificate verification during package download"
default y default y
config USE_APK
imply PACKAGE_apk-mbedtls
bool "Use APK instead of OPKG to build distribution (BROKEN)"
depends on BROKEN
comment "General build options" comment "General build options"
config TESTING_KERNEL config TESTING_KERNEL
@ -75,10 +86,8 @@ menu "Global build settings"
config DISPLAY_SUPPORT config DISPLAY_SUPPORT
bool "Show packages that require graphics support (local or remote)" bool "Show packages that require graphics support (local or remote)"
default n
config BUILD_PATENTED config BUILD_PATENTED
default n
bool "Compile with support for patented functionality" bool "Compile with support for patented functionality"
help help
When this option is disabled, software which provides patented functionality When this option is disabled, software which provides patented functionality
@ -86,7 +95,6 @@ menu "Global build settings"
functionality, this optional support will get disabled for this package. functionality, this optional support will get disabled for this package.
config BUILD_NLS config BUILD_NLS
default n
bool "Compile with full language support" bool "Compile with full language support"
help help
When this option is enabled, packages are built with the full versions of When this option is enabled, packages are built with the full versions of
@ -100,7 +108,6 @@ menu "Global build settings"
config CLEAN_IPKG config CLEAN_IPKG
bool bool
prompt "Remove ipkg/opkg status data files in final images" prompt "Remove ipkg/opkg status data files in final images"
default n
help help
This removes all ipkg/opkg status data files from the target directory This removes all ipkg/opkg status data files from the target directory
before building the root filesystem. before building the root filesystem.
@ -108,14 +115,13 @@ menu "Global build settings"
config IPK_FILES_CHECKSUMS config IPK_FILES_CHECKSUMS
bool bool
prompt "Record files checksums in package metadata" prompt "Record files checksums in package metadata"
default n depends on !USE_APK
help help
This makes file checksums part of package metadata. It increases size This makes file checksums part of package metadata. It increases size
but provides you with pkg_check command to check for flash corruptions. but provides you with pkg_check command to check for flash corruptions.
config INCLUDE_CONFIG config INCLUDE_CONFIG
bool "Include build configuration in firmware" if DEVEL bool "Include build configuration in firmware" if DEVEL
default n
help help
If enabled, buildinfo files will be stored in /etc/build.* of firmware. If enabled, buildinfo files will be stored in /etc/build.* of firmware.
@ -149,10 +155,37 @@ menu "Global build settings"
config DEBUG config DEBUG
bool bool
prompt "Compile packages with debugging info" prompt "Compile packages with debugging info"
default n
help help
Adds -g3 to the CFLAGS. Adds -g3 to the CFLAGS.
config USE_GC_SECTIONS
bool
prompt "Dead code and data elimination for all packages (EXPERIMENTAL)"
help
Places functions and data items into its own sections to use the linker's
garbage collection capabilites.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-gc-sections
config USE_LTO
bool
prompt "Use the link-time optimizer for all packages (EXPERIMENTAL)"
help
Adds LTO flags to the CFLAGS and LDFLAGS.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-lto
config MOLD
depends on (aarch64 || arm || i386 || i686 || m68k || powerpc || powerpc64 || sh4 || x86_64)
depends on !GCC_USE_VERSION_11
def_bool $(shell, ./config/check-hostcxx.sh 10 2 12)
config USE_MOLD
bool
prompt "Use the mold linker for all packages"
depends on MOLD
help
Link packages with mold, a modern linker
Packages can opt-out via setting PKG_BUILD_FLAGS:=no-mold
config IPV6 config IPV6
def_bool y def_bool y
@ -176,7 +209,6 @@ menu "Global build settings"
help help
This will install binaries stripped using strip from binutils. This will install binaries stripped using strip from binutils.
config USE_SSTRIP config USE_SSTRIP
bool "sstrip" bool "sstrip"
depends on !USE_GLIBC depends on !USE_GLIBC
@ -193,16 +225,16 @@ menu "Global build settings"
help help
Specifies arguments passed to the strip command when stripping binaries. Specifies arguments passed to the strip command when stripping binaries.
config SSTRIP_ARGS config SSTRIP_DISCARD_TRAILING_ZEROES
string bool "Strip trailing zero bytes"
prompt "Sstrip arguments" depends on USE_SSTRIP && !USE_MOLD
depends on USE_SSTRIP default y
default "-z"
help help
Specifies arguments passed to the sstrip command when stripping binaries. Use sstrip's -z option to discard trailing zero bytes
config STRIP_KERNEL_EXPORTS config STRIP_KERNEL_EXPORTS
bool "Strip unnecessary exports from the kernel image" bool "Strip unnecessary exports from the kernel image"
depends on BROKEN
help help
Reduces kernel size by stripping unused kernel exports from the kernel Reduces kernel size by stripping unused kernel exports from the kernel
image. Note that this might make the kernel incompatible with any kernel image. Note that this might make the kernel incompatible with any kernel
@ -264,10 +296,22 @@ menu "Global build settings"
Enable GCC Stack Smashing Protection (SSP) for userspace applications Enable GCC Stack Smashing Protection (SSP) for userspace applications
config PKG_CC_STACKPROTECTOR_NONE config PKG_CC_STACKPROTECTOR_NONE
bool "None" bool "None"
help
No stack smashing protection.
config PKG_CC_STACKPROTECTOR_REGULAR config PKG_CC_STACKPROTECTOR_REGULAR
bool "Regular" bool "Regular"
help
Protects functions with vulnerable objects.
This includes functions with buffers larger than 8 bytes or calls to alloca.
config PKG_CC_STACKPROTECTOR_STRONG config PKG_CC_STACKPROTECTOR_STRONG
bool "Strong" bool "Strong"
help
Like Regular, but also protects functions with
local arrays or references to local frame addresses.
config PKG_CC_STACKPROTECTOR_ALL
bool "All"
help
Protects all functions.
endchoice endchoice
choice choice
@ -277,10 +321,18 @@ menu "Global build settings"
Enable GCC Stack-Smashing Protection (SSP) for the kernel Enable GCC Stack-Smashing Protection (SSP) for the kernel
config KERNEL_CC_STACKPROTECTOR_NONE config KERNEL_CC_STACKPROTECTOR_NONE
bool "None" bool "None"
help
No stack smashing protection.
config KERNEL_CC_STACKPROTECTOR_REGULAR config KERNEL_CC_STACKPROTECTOR_REGULAR
bool "Regular" bool "Regular"
help
Protects functions with vulnerable objects.
This includes functions with buffers larger than 8 bytes or calls to alloca.
config KERNEL_CC_STACKPROTECTOR_STRONG config KERNEL_CC_STACKPROTECTOR_STRONG
bool "Strong" bool "Strong"
help
Like Regular, but also protects functions with
local arrays or references to local frame addresses.
endchoice endchoice
config KERNEL_STACKPROTECTOR config KERNEL_STACKPROTECTOR

View File

@ -4,11 +4,9 @@
menuconfig DEVEL menuconfig DEVEL
bool "Advanced configuration options (for developers)" bool "Advanced configuration options (for developers)"
default n
config BROKEN config BROKEN
bool "Show broken platforms / packages / devices" if DEVEL bool "Show broken platforms / packages / devices" if DEVEL
default n
config BINARY_FOLDER config BINARY_FOLDER
string "Binary folder" if DEVEL string "Binary folder" if DEVEL
@ -53,7 +51,6 @@ menuconfig DEVEL
config AUTOREMOVE config AUTOREMOVE
bool "Automatic removal of build directories" if DEVEL bool "Automatic removal of build directories" if DEVEL
default n
help help
Automatically delete build directories after make target completed. Automatically delete build directories after make target completed.
This allows you to symlink build_dir into a scratch location, e.g. a ramdisk, This allows you to symlink build_dir into a scratch location, e.g. a ramdisk,
@ -61,7 +58,6 @@ menuconfig DEVEL
config BUILD_ALL_HOST_TOOLS config BUILD_ALL_HOST_TOOLS
bool "Compile all host tools" if DEVEL bool "Compile all host tools" if DEVEL
default n
help help
Compile all host host tools even if not needed. This is needed to prepare a Compile all host host tools even if not needed. This is needed to prepare a
universal precompiled host tools archive to use in another buildroot. universal precompiled host tools archive to use in another buildroot.
@ -84,7 +80,6 @@ menuconfig DEVEL
config CCACHE config CCACHE
bool "Use ccache" if DEVEL bool "Use ccache" if DEVEL
default n
help help
Compiler cache; see https://ccache.samba.org/ Compiler cache; see https://ccache.samba.org/

View File

@ -17,7 +17,7 @@ menu "Target Images"
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ipq40xx default TARGET_INITRAMFS_COMPRESSION_ZSTD if TARGET_qualcommax
default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS
default TARGET_INITRAMFS_COMPRESSION_NONE default TARGET_INITRAMFS_COMPRESSION_NONE
depends on TARGET_ROOTFS_INITRAMFS depends on TARGET_ROOTFS_INITRAMFS
@ -157,7 +157,7 @@ menu "Target Images"
depends on TARGET_ROOTFS_SQUASHFS depends on TARGET_ROOTFS_SQUASHFS
default 64 if LOW_MEMORY_FOOTPRINT default 64 if LOW_MEMORY_FOOTPRINT
default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT) default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
default 1024 default 256
help help
Select squashfs block size, must be one of: Select squashfs block size, must be one of:
4, 8, 16, 32, 64, 128, 256, 512, 1024 4, 8, 16, 32, 64, 128, 256, 512, 1024
@ -198,18 +198,23 @@ menu "Target Images"
default "" default ""
config GRUB_IMAGES config GRUB_IMAGES
bool "Build GRUB images (Linux x86 or x86_64 host only)" bool "Build GRUB images"
depends on TARGET_x86 depends on TARGET_x86
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2 select PACKAGE_grub2
select PACKAGE_grub2-bios-setup
default n default n
config GRUB_EFI_IMAGES config GRUB_EFI_IMAGES
bool "Build GRUB EFI images (Linux x86 or x86_64 host only)" bool "Build GRUB EFI images"
depends on TARGET_x86 depends on TARGET_x86 || TARGET_armvirt || TARGET_loongarch64 || TARGET_phytium
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2 select PACKAGE_grub2 if TARGET_x86
select PACKAGE_grub2-efi select PACKAGE_grub2-efi if TARGET_x86
select PACKAGE_grub2-bios-setup if TARGET_x86
select PACKAGE_grub2-efi-arm if TARGET_armvirt
select PACKAGE_grub2-efi-arm if TARGET_phytium_armv8
select PACKAGE_grub2-efi-loongarch64 if TARGET_loongarch64
select PACKAGE_kmod-fs-vfat select PACKAGE_kmod-fs-vfat
default y default y
@ -274,9 +279,8 @@ menu "Target Images"
config VMDK_IMAGES config VMDK_IMAGES
bool "Build VMware image files (VMDK)" bool "Build VMware image files (VMDK)"
depends on TARGET_x86 depends on TARGET_x86 || TARGET_armvirt
depends on GRUB_IMAGES || GRUB_EFI_IMAGES depends on GRUB_IMAGES || GRUB_EFI_IMAGES
default y
select PACKAGE_kmod-e1000 select PACKAGE_kmod-e1000
config VHDX_IMAGES config VHDX_IMAGES
@ -287,25 +291,28 @@ menu "Target Images"
config TARGET_IMAGES_GZIP config TARGET_IMAGES_GZIP
bool "GZip images" bool "GZip images"
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta || TARGET_loongarch64
default y default y
comment "Image Options" comment "Image Options"
source "target/linux/*/image/Config.in" source "target/linux/*/image/Config.in"
source "target/linux/*/*/image/Config.in"
config TARGET_KERNEL_PARTSIZE config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MiB)" int "Kernel partition size (in MiB)"
depends on USES_BOOT_PART depends on USES_BOOT_PART
default 8 if TARGET_apm821xx_sata default 8 if TARGET_apm821xx_sata
default 64 if TARGET_bcm27xx default 64 if TARGET_bcm27xx
default 128 if TARGET_armvirt
default 32 if TARGET_rockchip default 32 if TARGET_rockchip
default 16 default 16
config TARGET_ROOTFS_PARTSIZE config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MiB)" int "Root filesystem partition size (in MiB)"
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
default 400 if TARGET_x86 default 232 if TARGET_loongarch64
default 448 if TARGET_mediatek || TARGET_x86
default 160 default 160
help help
Select the root filesystem partition size. Select the root filesystem partition size.

View File

@ -47,12 +47,25 @@ config KERNEL_MIPS_FP_SUPPORT
config KERNEL_ARM_PMU config KERNEL_ARM_PMU
bool bool
default n default y if TARGET_armsr_armv8
depends on (arm || aarch64) depends on (arm || aarch64)
config KERNEL_ARM_PMUV3
bool
default y if TARGET_armsr_armv8
depends on (arm_v7 || aarch64) && LINUX_6_6
config KERNEL_RISCV_PMU
bool
select KERNEL_RISCV_PMU_SBI
depends on riscv64
config KERNEL_RISCV_PMU_SBI
bool
depends on riscv64
config KERNEL_X86_VSYSCALL_EMULATION config KERNEL_X86_VSYSCALL_EMULATION
bool "Enable vsyscall emulation" bool "Enable vsyscall emulation"
default n
depends on x86_64 depends on x86_64
help help
This enables emulation of the legacy vsyscall page. Disabling This enables emulation of the legacy vsyscall page. Disabling
@ -70,12 +83,12 @@ config KERNEL_X86_VSYSCALL_EMULATION
config KERNEL_PERF_EVENTS config KERNEL_PERF_EVENTS
bool "Compile the kernel with performance events and counters" bool "Compile the kernel with performance events and counters"
default n
select KERNEL_ARM_PMU if (arm || aarch64) select KERNEL_ARM_PMU if (arm || aarch64)
select KERNEL_ARM_PMUV3 if (arm_v7 || aarch64) && LINUX_6_6
select KERNEL_RISCV_PMU if riscv64
config KERNEL_PROFILING config KERNEL_PROFILING
bool "Compile the kernel with profiling enabled" bool "Compile the kernel with profiling enabled"
default n
select KERNEL_PERF_EVENTS select KERNEL_PERF_EVENTS
help help
Enable the extended profiling support mechanisms used by profilers such Enable the extended profiling support mechanisms used by profilers such
@ -147,7 +160,7 @@ config KERNEL_UBSAN_TRAP
config KERNEL_KASAN config KERNEL_KASAN
bool "Compile the kernel with KASan: runtime memory debugger" bool "Compile the kernel with KASan: runtime memory debugger"
select KERNEL_SLUB_DEBUG select KERNEL_SLUB_DEBUG
depends on (x86_64 || aarch64) depends on (x86_64 || aarch64 || arm || powerpc || riscv64)
help help
Enables kernel address sanitizer - runtime memory debugger, Enables kernel address sanitizer - runtime memory debugger,
designed to find out-of-bounds accesses and use-after-free bugs. designed to find out-of-bounds accesses and use-after-free bugs.
@ -160,16 +173,6 @@ config KERNEL_KASAN
Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
(the resulting kernel does not boot). (the resulting kernel does not boot).
config KERNEL_KASAN_EXTRA
bool "KAsan: extra checks"
depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL
help
This enables further checks in the kernel address sanitizer, for now
it only includes the address-use-after-scope check that can lead
to excessive kernel stack usage, frame size warnings and longer
compile time.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
config KERNEL_KASAN_VMALLOC config KERNEL_KASAN_VMALLOC
bool "Back mappings in vmalloc space with real shadow memory" bool "Back mappings in vmalloc space with real shadow memory"
depends on KERNEL_KASAN depends on KERNEL_KASAN
@ -188,16 +191,73 @@ config KERNEL_KASAN_VMALLOC
will have no effect. will have no effect.
if KERNEL_KASAN if KERNEL_KASAN
config KERNEL_KASAN_GENERIC choice
def_bool y prompt "KASAN mode"
depends on KERNEL_KASAN
default KERNEL_KASAN_GENERIC
help
KASAN has three modes:
1. Generic KASAN (supported by many architectures, enabled with
CONFIG_KASAN_GENERIC, similar to userspace ASan),
2. Software Tag-Based KASAN (arm64 only, based on software memory
tagging, enabled with CONFIG_KASAN_SW_TAGS, similar to userspace
HWASan), and
3. Hardware Tag-Based KASAN (arm64 only, based on hardware memory
tagging, enabled with CONFIG_KASAN_HW_TAGS).
config KERNEL_KASAN_GENERIC
bool "Generic KASAN"
select KERNEL_SLUB_DEBUG
help
Enables Generic KASAN.
Consumes about 1/8th of available memory at kernel start and adds an
overhead of ~50% for dynamic allocations.
The performance slowdown is ~x3.
config KERNEL_KASAN_SW_TAGS
bool "Software Tag-Based KASAN"
depends on aarch64
select KERNEL_SLUB_DEBUG
help
Enables Software Tag-Based KASAN.
Supported only on arm64 CPUs and relies on Top Byte Ignore.
Consumes about 1/16th of available memory at kernel start and
add an overhead of ~20% for dynamic allocations.
May potentially introduce problems related to pointer casting and
comparison, as it embeds a tag into the top byte of each pointer.
config KERNEL_KASAN_HW_TAGS
bool "Hardware Tag-Based KASAN"
depends on aarch64
select KERNEL_SLUB_DEBUG
select KERNEL_ARM64_MTE
help
Enables Hardware Tag-Based KASAN.
Supported only on arm64 CPUs starting from ARMv8.5 and relies on
Memory Tagging Extension and Top Byte Ignore.
Consumes about 1/32nd of available memory.
May potentially introduce problems related to pointer casting and
comparison, as it embeds a tag into the top byte of each pointer.
endchoice
config KERNEL_ARM64_MTE
def_bool n
config KERNEL_KASAN_SW_TAGS
def_bool n
endif endif
choice choice
prompt "Instrumentation type" prompt "Instrumentation type"
depends on KERNEL_KASAN depends on KERNEL_KASAN
depends on !KERNEL_KASAN_HW_TAGS
default KERNEL_KASAN_OUTLINE default KERNEL_KASAN_OUTLINE
config KERNEL_KASAN_OUTLINE config KERNEL_KASAN_OUTLINE
@ -255,7 +315,6 @@ config KERNEL_KCOV_INSTRUMENT_ALL
config KERNEL_TASKSTATS config KERNEL_TASKSTATS
bool "Compile the kernel with task resource/io statistics and accounting" bool "Compile the kernel with task resource/io statistics and accounting"
default n
help help
Enable the collection and publishing of task/io statistics and Enable the collection and publishing of task/io statistics and
accounting. Enable this option to enable i/o monitoring in system accounting. Enable this option to enable i/o monitoring in system
@ -274,6 +333,25 @@ if KERNEL_TASKSTATS
endif endif
config KERNEL_PSI
bool "Compile the kernel with pressure stall information tracking"
help
Collect metrics that indicate how overcommitted the CPU, memory,
and IO capacity are in the system.
If you say Y here, the kernel will create /proc/pressure/ with the
pressure statistics files cpu, memory, and io. These will indicate
the share of walltime in which some or all tasks in the system are
delayed due to contention of the respective resource.
In kernels with cgroup support, cgroups (cgroup2 only) will
have cpu.pressure, memory.pressure, and io.pressure files,
which aggregate pressure stalls for the grouped tasks only.
For more details see Documentation/accounting/psi.rst.
Say N if unsure.
config KERNEL_KALLSYMS config KERNEL_KALLSYMS
bool "Compile the kernel with symbol table information" bool "Compile the kernel with symbol table information"
default y if !SMALL_FLASH default y if !SMALL_FLASH
@ -283,37 +361,30 @@ config KERNEL_KALLSYMS
config KERNEL_FTRACE config KERNEL_FTRACE
bool "Compile the kernel with tracing support" bool "Compile the kernel with tracing support"
depends on !TARGET_uml depends on !TARGET_uml
default n
config KERNEL_FTRACE_SYSCALLS config KERNEL_FTRACE_SYSCALLS
bool "Trace system calls" bool "Trace system calls"
depends on KERNEL_FTRACE depends on KERNEL_FTRACE
default n
config KERNEL_ENABLE_DEFAULT_TRACERS config KERNEL_ENABLE_DEFAULT_TRACERS
bool "Trace process context switches and events" bool "Trace process context switches and events"
depends on KERNEL_FTRACE depends on KERNEL_FTRACE
default n
config KERNEL_FUNCTION_TRACER config KERNEL_FUNCTION_TRACER
bool "Function tracer" bool "Function tracer"
depends on KERNEL_FTRACE depends on KERNEL_FTRACE
default n
config KERNEL_FUNCTION_GRAPH_TRACER config KERNEL_FUNCTION_GRAPH_TRACER
bool "Function graph tracer" bool "Function graph tracer"
depends on KERNEL_FUNCTION_TRACER depends on KERNEL_FUNCTION_TRACER
default n
config KERNEL_DYNAMIC_FTRACE config KERNEL_DYNAMIC_FTRACE
bool "Enable/disable function tracing dynamically" bool "Enable/disable function tracing dynamically"
depends on KERNEL_FUNCTION_TRACER depends on KERNEL_FUNCTION_TRACER
default n
config KERNEL_FUNCTION_PROFILER config KERNEL_FUNCTION_PROFILER
bool "Function profiler" bool "Function profiler"
depends on KERNEL_FUNCTION_TRACER depends on KERNEL_FUNCTION_TRACER
default n
config KERNEL_IRQSOFF_TRACER config KERNEL_IRQSOFF_TRACER
bool "Interrupts-off Latency Tracer" bool "Interrupts-off Latency Tracer"
@ -364,7 +435,6 @@ config KERNEL_HIST_TRIGGERS
config KERNEL_DEBUG_KERNEL config KERNEL_DEBUG_KERNEL
bool bool
default n
config KERNEL_DEBUG_INFO config KERNEL_DEBUG_INFO
bool "Compile the kernel with debug information" bool "Compile the kernel with debug information"
@ -374,9 +444,7 @@ config KERNEL_DEBUG_INFO
This will compile your kernel and modules with debug information. This will compile your kernel and modules with debug information.
config KERNEL_DEBUG_INFO_BTF config KERNEL_DEBUG_INFO_BTF
bool "Enable additional BTF type information" bool "Enable additional BTF type information"
default n
depends on !HOST_OS_MACOS depends on !HOST_OS_MACOS
depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
select DWARVES select DWARVES
@ -387,6 +455,20 @@ config KERNEL_DEBUG_INFO_BTF
Required to run BPF CO-RE applications. Required to run BPF CO-RE applications.
config KERNEL_DEBUG_INFO_BTF_MODULES
def_bool y
depends on KERNEL_DEBUG_INFO_BTF
config KERNEL_MODULE_ALLOW_BTF_MISMATCH
bool "Allow loading modules with non-matching BTF type info"
depends on KERNEL_DEBUG_INFO_BTF_MODULES
help
For modules whose split BTF does not match vmlinux, load without
BTF rather than refusing to load. The default behavior with
module BTF enabled is to reject modules with such mismatches;
this option will still load module BTF where possible but ignore
it when a mismatch is found.
config KERNEL_DEBUG_INFO_REDUCED config KERNEL_DEBUG_INFO_REDUCED
bool "Reduce debugging information" bool "Reduce debugging information"
default y default y
@ -401,6 +483,21 @@ config KERNEL_DEBUG_INFO_REDUCED
DEBUG_INFO build and compile times are reduced too. DEBUG_INFO build and compile times are reduced too.
Only works with newer gcc versions. Only works with newer gcc versions.
config KERNEL_FRAME_WARN
int
range 0 8192
default 1280 if KERNEL_KASAN && !ARCH_64BIT
default 1024 if !ARCH_64BIT
default 2048 if ARCH_64BIT
help
Tell the compiler to warn at build time for stack frames larger than this.
Setting this too low will cause a lot of warnings.
Setting it to 0 disables the warning.
# KERNEL_DEBUG_LL symbols must have the default value set as otherwise
# KConfig wont evaluate them unless KERNEL_EARLY_PRINTK is selected
# which means that buildroot wont override the DEBUG_LL symbols in target
# kernel configurations and lead to devices that dont have working console
config KERNEL_DEBUG_LL_UART_NONE config KERNEL_DEBUG_LL_UART_NONE
bool bool
default n default n
@ -417,7 +514,6 @@ config KERNEL_DEBUG_LL
config KERNEL_DEBUG_VIRTUAL config KERNEL_DEBUG_VIRTUAL
bool "Compile the kernel with VM translations debugging" bool "Compile the kernel with VM translations debugging"
select KERNEL_DEBUG_KERNEL select KERNEL_DEBUG_KERNEL
default n
help help
Enable checks sanity checks to catch invalid uses of Enable checks sanity checks to catch invalid uses of
virt_to_phys()/phys_to_virt() against the non-linear address space. virt_to_phys()/phys_to_virt() against the non-linear address space.
@ -425,7 +521,6 @@ config KERNEL_DEBUG_VIRTUAL
config KERNEL_DYNAMIC_DEBUG config KERNEL_DYNAMIC_DEBUG
bool "Compile the kernel with dynamic printk" bool "Compile the kernel with dynamic printk"
select KERNEL_DEBUG_FS select KERNEL_DEBUG_FS
default n
help help
Compiles debug level messages into the kernel, which would not Compiles debug level messages into the kernel, which would not
otherwise be available at runtime. These messages can then be otherwise be available at runtime. These messages can then be
@ -437,7 +532,6 @@ config KERNEL_DYNAMIC_DEBUG
config KERNEL_EARLY_PRINTK config KERNEL_EARLY_PRINTK
bool "Compile the kernel with early printk" bool "Compile the kernel with early printk"
default y if TARGET_bcm53xx default y if TARGET_bcm53xx
default n
depends on arm depends on arm
select KERNEL_DEBUG_KERNEL select KERNEL_DEBUG_KERNEL
select KERNEL_DEBUG_LL if arm select KERNEL_DEBUG_LL if arm
@ -448,7 +542,6 @@ config KERNEL_EARLY_PRINTK
config KERNEL_KPROBES config KERNEL_KPROBES
bool "Compile the kernel with kprobes support" bool "Compile the kernel with kprobes support"
default n
select KERNEL_FTRACE select KERNEL_FTRACE
select KERNEL_PERF_EVENTS select KERNEL_PERF_EVENTS
help help
@ -465,7 +558,6 @@ config KERNEL_KPROBE_EVENTS
config KERNEL_BPF_EVENTS config KERNEL_BPF_EVENTS
bool "Compile the kernel with BPF event support" bool "Compile the kernel with BPF event support"
default n
select KERNEL_KPROBES select KERNEL_KPROBES
help help
Allows to attach BPF programs to kprobe, uprobe and tracepoint events. Allows to attach BPF programs to kprobe, uprobe and tracepoint events.
@ -473,10 +565,14 @@ config KERNEL_BPF_EVENTS
for sending data from BPF programs to user-space for post-processing for sending data from BPF programs to user-space for post-processing
or logging. or logging.
config KERNEL_PROBE_EVENTS_BTF_ARGS
bool "Support BTF function arguments for probe events"
depends on KERNEL_DEBUG_INFO_BTF && KERNEL_KPROBE_EVENTS && LINUX_6_6
config KERNEL_BPF_KPROBE_OVERRIDE config KERNEL_BPF_KPROBE_OVERRIDE
bool bool
default n
depends on KERNEL_KPROBES depends on KERNEL_KPROBES
default n
config KERNEL_AIO config KERNEL_AIO
bool "Compile the kernel with asynchronous IO support" bool "Compile the kernel with asynchronous IO support"
@ -484,7 +580,8 @@ config KERNEL_AIO
config KERNEL_IO_URING config KERNEL_IO_URING
bool "Compile the kernel with io_uring support" bool "Compile the kernel with io_uring support"
default y if !SMALL_FLASH depends on !SMALL_FLASH
default y if (x86_64 || aarch64)
config KERNEL_FHANDLE config KERNEL_FHANDLE
bool "Compile the kernel with support for fhandle syscalls" bool "Compile the kernel with support for fhandle syscalls"
@ -496,7 +593,6 @@ config KERNEL_FANOTIFY
config KERNEL_BLK_DEV_BSG config KERNEL_BLK_DEV_BSG
bool "Compile the kernel with SCSI generic v4 support for any block device" bool "Compile the kernel with SCSI generic v4 support for any block device"
default n
config KERNEL_TRANSPARENT_HUGEPAGE config KERNEL_TRANSPARENT_HUGEPAGE
bool bool
@ -520,7 +616,6 @@ config KERNEL_HUGETLB_PAGE
bool "Compile the kernel with HugeTLB support" bool "Compile the kernel with HugeTLB support"
select KERNEL_TRANSPARENT_HUGEPAGE select KERNEL_TRANSPARENT_HUGEPAGE
select KERNEL_HUGETLBFS select KERNEL_HUGETLBFS
default n
config KERNEL_MAGIC_SYSRQ config KERNEL_MAGIC_SYSRQ
bool "Compile the kernel with SysRq support" bool "Compile the kernel with SysRq support"
@ -545,7 +640,6 @@ config KERNEL_ELF_CORE
config KERNEL_PROVE_LOCKING config KERNEL_PROVE_LOCKING
bool "Enable kernel lock checking" bool "Enable kernel lock checking"
select KERNEL_DEBUG_KERNEL select KERNEL_DEBUG_KERNEL
default n
config KERNEL_SOFTLOCKUP_DETECTOR config KERNEL_SOFTLOCKUP_DETECTOR
bool "Compile the kernel with detect Soft Lockups" bool "Compile the kernel with detect Soft Lockups"
@ -559,6 +653,18 @@ config KERNEL_SOFTLOCKUP_DETECTOR
chance to run. The current stack trace is displayed upon chance to run. The current stack trace is displayed upon
detection and the system will stay locked up. detection and the system will stay locked up.
config KERNEL_HARDLOCKUP_DETECTOR
bool "Compile the kernel with detect Hard Lockups"
depends on KERNEL_DEBUG_KERNEL
help
Say Y here to enable the kernel to act as a watchdog to detect
hard lockups.
Hardlockups are bugs that cause the CPU to loop in kernel mode
for more than 10 seconds, without letting other interrupts have a
chance to run. The current stack trace is displayed upon detection
and the system will stay locked up.
config KERNEL_DETECT_HUNG_TASK config KERNEL_DETECT_HUNG_TASK
bool "Compile the kernel with detect Hung Tasks" bool "Compile the kernel with detect Hung Tasks"
depends on KERNEL_DEBUG_KERNEL depends on KERNEL_DEBUG_KERNEL
@ -608,10 +714,23 @@ config KERNEL_PRINTK_TIME
default y default y
config KERNEL_SLUB_DEBUG config KERNEL_SLUB_DEBUG
bool bool "Enable SLUB debugging support"
help
This enables various debugging features:
- Accepts "slub_debug" kernel parameter
- Provides caches debugging options (e.g. tracing, validating)
- Adds /sys/kernel/slab/ attrs for reading amounts of *objects*
- Enables /proc/slabinfo support
- Prints info when running out of memory
Enabling this can result in a significant increase of code size.
config KERNEL_SLUB_DEBUG_ON config KERNEL_SLUB_DEBUG_ON
bool depends on KERNEL_SLUB_DEBUG
bool "Boot kernel with basic caches debugging enabled"
help
This enables by default sanity_checks, red_zone, poison and store_user
debugging options for all caches.
config KERNEL_SLABINFO config KERNEL_SLABINFO
select KERNEL_SLUB_DEBUG select KERNEL_SLUB_DEBUG
@ -643,16 +762,13 @@ config KERNEL_CRASH_DUMP
config USE_RFKILL config USE_RFKILL
bool "Enable rfkill support" bool "Enable rfkill support"
default y if TARGET_rockchip
default RFKILL_SUPPORT default RFKILL_SUPPORT
config USE_SPARSE config USE_SPARSE
bool "Enable sparse check during kernel build" bool "Enable sparse check during kernel build"
default n
config KERNEL_DEVTMPFS config KERNEL_DEVTMPFS
bool "Compile the kernel with device tmpfs enabled" bool "Compile the kernel with device tmpfs enabled"
default n
help help
devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
devices nodes for all registered devices to simplify boot, but leaves more devices nodes for all registered devices to simplify boot, but leaves more
@ -662,7 +778,6 @@ if KERNEL_DEVTMPFS
config KERNEL_DEVTMPFS_MOUNT config KERNEL_DEVTMPFS_MOUNT
bool "Automatically mount devtmpfs after root filesystem is mounted" bool "Automatically mount devtmpfs after root filesystem is mounted"
default n
endif endif
@ -673,17 +788,14 @@ config KERNEL_KEYS
config KERNEL_PERSISTENT_KEYRINGS config KERNEL_PERSISTENT_KEYRINGS
bool "Enable kernel persistent keyrings" bool "Enable kernel persistent keyrings"
depends on KERNEL_KEYS depends on KERNEL_KEYS
default n
config KERNEL_KEYS_REQUEST_CACHE config KERNEL_KEYS_REQUEST_CACHE
bool "Enable temporary caching of the last request_key() result" bool "Enable temporary caching of the last request_key() result"
depends on KERNEL_KEYS depends on KERNEL_KEYS
default n
config KERNEL_BIG_KEYS config KERNEL_BIG_KEYS
bool "Enable large payload keys on kernel keyrings" bool "Enable large payload keys on kernel keyrings"
depends on KERNEL_KEYS depends on KERNEL_KEYS
default n
# #
# CGROUP support symbols # CGROUP support symbols
@ -697,7 +809,6 @@ if KERNEL_CGROUPS
config KERNEL_CGROUP_DEBUG config KERNEL_CGROUP_DEBUG
bool "Example debug cgroup subsystem" bool "Example debug cgroup subsystem"
default n
help help
This option enables a simple cgroup subsystem that This option enables a simple cgroup subsystem that
exports useful debugging information about the cgroups exports useful debugging information about the cgroups
@ -708,7 +819,6 @@ if KERNEL_CGROUPS
config KERNEL_CGROUP_FREEZER config KERNEL_CGROUP_FREEZER
bool "legacy Freezer cgroup subsystem" bool "legacy Freezer cgroup subsystem"
default n
select KERNEL_FREEZER select KERNEL_FREEZER
help help
Provides a way to freeze and unfreeze all tasks in a Provides a way to freeze and unfreeze all tasks in a
@ -718,7 +828,6 @@ if KERNEL_CGROUPS
config KERNEL_CGROUP_DEVICE config KERNEL_CGROUP_DEVICE
bool "legacy Device controller for cgroups" bool "legacy Device controller for cgroups"
default n
help help
Provides a cgroup implementing whitelists for devices which Provides a cgroup implementing whitelists for devices which
a process in the cgroup can mknod or open. a process in the cgroup can mknod or open.
@ -726,7 +835,6 @@ if KERNEL_CGROUPS
config KERNEL_CGROUP_HUGETLB config KERNEL_CGROUP_HUGETLB
bool "HugeTLB controller" bool "HugeTLB controller"
default n
select KERNEL_HUGETLB_PAGE select KERNEL_HUGETLB_PAGE
config KERNEL_CGROUP_PIDS config KERNEL_CGROUP_PIDS
@ -753,9 +861,19 @@ if KERNEL_CGROUPS
Memory Nodes and assigning tasks to run only within those sets. Memory Nodes and assigning tasks to run only within those sets.
This is primarily useful on large SMP or NUMA systems. This is primarily useful on large SMP or NUMA systems.
config KERNEL_CPUSETS_V1
bool "Legacy cgroup v1 cpusets controller"
depends on KERNEL_CPUSETS
default n
help
Legacy cgroup v1 cpusets controller which has been deprecated by
cgroup v2 implementation. The v1 is there for legacy applications
which haven't migrated to the new cgroup v2 interface yet. If you
do not have any such application then you are completely fine leaving
this option disabled.
config KERNEL_PROC_PID_CPUSET config KERNEL_PROC_PID_CPUSET
bool "Include legacy /proc/<pid>/cpuset file" bool "Include legacy /proc/<pid>/cpuset file"
default n
depends on KERNEL_CPUSETS depends on KERNEL_CPUSETS
config KERNEL_CGROUP_CPUACCT config KERNEL_CGROUP_CPUACCT
@ -821,7 +939,6 @@ if KERNEL_CGROUPS
config KERNEL_MEMCG_SWAP_ENABLED config KERNEL_MEMCG_SWAP_ENABLED
bool "Memory Resource Controller Swap Extension enabled by default" bool "Memory Resource Controller Swap Extension enabled by default"
default n
depends on KERNEL_MEMCG_SWAP depends on KERNEL_MEMCG_SWAP
help help
Memory Resource Controller Swap Extension comes with its price in Memory Resource Controller Swap Extension comes with its price in
@ -847,10 +964,24 @@ if KERNEL_CGROUPS
the kmem extension can use it to guarantee that no group of processes the kmem extension can use it to guarantee that no group of processes
will ever exhaust kernel resources alone. will ever exhaust kernel resources alone.
config KERNEL_MEMCG_V1
bool "Legacy cgroup v1 memory controller"
default n
depends on KERNEL_MEMCG
help
Legacy cgroup v1 memory controller which has been deprecated by
cgroup v2 implementation. The v1 is there for legacy applications
which haven't migrated to the new cgroup v2 interface yet. If you
do not have any such application then you are completely fine leaving
this option disabled.
Please note that feature set of the legacy memory controller is likely
going to shrink due to deprecation process. New deployments with v1
controller are highly discouraged.
config KERNEL_CGROUP_PERF config KERNEL_CGROUP_PERF
bool "Enable perf_event per-cpu per-container group (cgroup) monitoring" bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
select KERNEL_PERF_EVENTS select KERNEL_PERF_EVENTS
default n
help help
This option extends the per-cpu mode to restrict monitoring to This option extends the per-cpu mode to restrict monitoring to
threads which belong to the cgroup specified and run on the threads which belong to the cgroup specified and run on the
@ -927,7 +1058,6 @@ if KERNEL_CGROUPS
config KERNEL_DEBUG_BLK_CGROUP config KERNEL_DEBUG_BLK_CGROUP
bool "Enable Block IO controller debugging" bool "Enable Block IO controller debugging"
default n
depends on KERNEL_BLK_CGROUP depends on KERNEL_BLK_CGROUP
help help
Enable some debugging help. Currently it exports additional stat Enable some debugging help. Currently it exports additional stat
@ -935,15 +1065,12 @@ if KERNEL_CGROUPS
config KERNEL_NET_CLS_CGROUP config KERNEL_NET_CLS_CGROUP
bool "legacy Control Group Classifier" bool "legacy Control Group Classifier"
default n
config KERNEL_CGROUP_NET_CLASSID config KERNEL_CGROUP_NET_CLASSID
bool "legacy Network classid cgroup" bool "legacy Network classid cgroup"
default n
config KERNEL_CGROUP_NET_PRIO config KERNEL_CGROUP_NET_PRIO
bool "legacy Network priority cgroup" bool "legacy Network priority cgroup"
default n
endif endif
@ -1105,9 +1232,17 @@ endif
config KERNEL_NET_L3_MASTER_DEV config KERNEL_NET_L3_MASTER_DEV
bool "L3 Master device support" bool "L3 Master device support"
default y if !SMALL_FLASH
help help
This module provides glue between core networking code and device This module provides glue between core networking code and device
drivers to support L3 master devices like VRF. drivers to support L3 master devices like VRF.
Increases the compressed kernel size by ~4kB (as of Linux 6.6).
config KERNEL_XDP_SOCKETS
bool "XDP sockets support"
help
XDP sockets allows a channel between XDP programs and
userspace applications.
config KERNEL_PAGE_POOL config KERNEL_PAGE_POOL
def_bool n def_bool n
@ -1115,7 +1250,20 @@ config KERNEL_PAGE_POOL
config KERNEL_PAGE_POOL_STATS config KERNEL_PAGE_POOL_STATS
bool "Page pool stats support" bool "Page pool stats support"
depends on KERNEL_PAGE_POOL depends on KERNEL_PAGE_POOL
depends on !(LINUX_5_4||LINUX_5_10)
config KERNEL_MPTCP
bool "Multi-Path TCP support"
default y if !SMALL_FLASH
help
Select this option to enable support for Multi-Path TCP.
Increases the compressed kernel size by ~214kB (as of Linux 6.6).
if KERNEL_IPV6
config KERNEL_MPTCP_IPV6
bool "IPv6 support for Multipath TCP"
depends on KERNEL_MPTCP
default KERNEL_MPTCP
endif
# #
# NFS related symbols # NFS related symbols
@ -1151,14 +1299,20 @@ if KERNEL_IP_PNP
endif endif
config KERNEL_BTRFS_FS
bool "Compile the kernel with built-in BTRFS support"
help
Say Y here if you want to make the kernel to be able to boot off a
BTRFS partition.
menu "Filesystem ACL and attr support options" menu "Filesystem ACL and attr support options"
config USE_FS_ACL_ATTR config USE_FS_ACL_ATTR
bool "Use filesystem ACL and attr support by default" bool "Use filesystem ACL and attr support by default"
default n default y if !SMALL_FLASH
help help
Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
for kernel and packages, except tmpfs, flash filesystems, for kernel and packages, except old NFS.
and old NFS. Also enable userspace extended attribute support Also enable userspace extended attribute support
by default. (OpenWrt already has an expection it will be by default. (OpenWrt already has an expection it will be
present in the kernel). present in the kernel).
@ -1179,17 +1333,17 @@ menu "Filesystem ACL and attr support options"
config KERNEL_F2FS_FS_POSIX_ACL config KERNEL_F2FS_FS_POSIX_ACL
bool "Enable POSIX ACL for F2FS Filesystems" bool "Enable POSIX ACL for F2FS Filesystems"
select KERNEL_FS_POSIX_ACL select KERNEL_FS_POSIX_ACL
default n default y if USE_FS_ACL_ATTR
config KERNEL_JFFS2_FS_POSIX_ACL config KERNEL_JFFS2_FS_POSIX_ACL
bool "Enable POSIX ACL for JFFS2 Filesystems" bool "Enable POSIX ACL for JFFS2 Filesystems"
select KERNEL_FS_POSIX_ACL select KERNEL_FS_POSIX_ACL
default n default y if USE_FS_ACL_ATTR
config KERNEL_TMPFS_POSIX_ACL config KERNEL_TMPFS_POSIX_ACL
bool "Enable POSIX ACL for TMPFS Filesystems" bool "Enable POSIX ACL for TMPFS Filesystems"
select KERNEL_FS_POSIX_ACL select KERNEL_FS_POSIX_ACL
default n default y if USE_FS_ACL_ATTR
config KERNEL_CIFS_ACL config KERNEL_CIFS_ACL
bool "Enable CIFS ACLs" bool "Enable CIFS ACLs"
@ -1212,15 +1366,12 @@ menu "Filesystem ACL and attr support options"
config KERNEL_NFS_V3_ACL_SUPPORT config KERNEL_NFS_V3_ACL_SUPPORT
bool "Enable ACLs for NFSv3" bool "Enable ACLs for NFSv3"
default n
config KERNEL_NFSD_V2_ACL_SUPPORT config KERNEL_NFSD_V2_ACL_SUPPORT
bool "Enable ACLs for NFSDv2" bool "Enable ACLs for NFSDv2"
default n
config KERNEL_NFSD_V3_ACL_SUPPORT config KERNEL_NFSD_V3_ACL_SUPPORT
bool "Enable ACLs for NFSDv3" bool "Enable ACLs for NFSDv3"
default n
config KERNEL_REISER_FS_POSIX_ACL config KERNEL_REISER_FS_POSIX_ACL
bool "Enable POSIX ACLs for ReiserFS" bool "Enable POSIX ACLs for ReiserFS"
@ -1329,12 +1480,30 @@ config KERNEL_LSM
config KERNEL_EXT4_FS_SECURITY config KERNEL_EXT4_FS_SECURITY
bool "Ext4 Security Labels" bool "Ext4 Security Labels"
default y if !SMALL_FLASH
config KERNEL_F2FS_FS_SECURITY config KERNEL_F2FS_FS_SECURITY
bool "F2FS Security Labels" bool "F2FS Security Labels"
default y if !SMALL_FLASH
config KERNEL_UBIFS_FS_SECURITY config KERNEL_UBIFS_FS_SECURITY
bool "UBIFS Security Labels" bool "UBIFS Security Labels"
default y if !SMALL_FLASH
config KERNEL_JFFS2_FS_SECURITY config KERNEL_JFFS2_FS_SECURITY
bool "JFFS2 Security Labels" bool "JFFS2 Security Labels"
default y if !SMALL_FLASH
config KERNEL_WERROR
bool "Compile the kernel with warnings as errors"
help
A kernel build should not cause any compiler warnings, and this
enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
to enforce that rule by default. Certain warnings from other tools
such as the linker may be upgraded to errors with this option as
well.
However, if you have a new (or very old) compiler or linker with odd
and unusual warnings, or you have some architecture with problems,
you may need to disable this config option in order to
successfully build the kernel.

12
config/check-hostcxx.sh Executable file
View File

@ -0,0 +1,12 @@
cat << EOF | "$STAGING_DIR_HOST/bin/g++" -c -x c++ -o /dev/null - >/dev/null 2>&1
#if __clang__
#if __clang_major__ < $3
#error "clang too old"
#endif
#else
#if __GNUC__ < $1 || (__GNUC__ == $1 && (__GNUC_MINOR__ < $2))
#error "gcc too old"
#endif
#endif
EOF
[ $? -eq 0 ] && echo y || echo n

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 50 KiB

BIN
doc/sige-en.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
doc/sige-zh.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

@ -1,7 +1,8 @@
src-git packages https://github.com/coolsnowwolf/packages src-git packages https://github.com/coolsnowwolf/packages
src-git luci https://github.com/coolsnowwolf/luci #src-git luci https://github.com/coolsnowwolf/luci
src-git luci https://github.com/coolsnowwolf/luci.git;openwrt-23.05
src-git routing https://github.com/coolsnowwolf/routing src-git routing https://github.com/coolsnowwolf/routing
src-git telephony https://git.openwrt.org/feed/telephony.git src-git telephony https://github.com/coolsnowwolf/telephony.git
#src-git helloworld https://github.com/fw876/helloworld.git #src-git helloworld https://github.com/fw876/helloworld.git
#src-git oui https://github.com/zhaojh329/oui.git #src-git oui https://github.com/zhaojh329/oui.git
#src-git video https://github.com/openwrt/video.git #src-git video https://github.com/openwrt/video.git

View File

@ -23,7 +23,8 @@ AM_TOOL_PATHS:= \
LIBTOOLIZE=$(STAGING_DIR_HOST)/bin/libtoolize \ LIBTOOLIZE=$(STAGING_DIR_HOST)/bin/libtoolize \
LIBTOOL=$(STAGING_DIR_HOST)/bin/libtool \ LIBTOOL=$(STAGING_DIR_HOST)/bin/libtool \
M4=$(STAGING_DIR_HOST)/bin/m4 \ M4=$(STAGING_DIR_HOST)/bin/m4 \
AUTOPOINT=true AUTOPOINT=true \
GTKDOCIZE=true
# 1: build dir # 1: build dir
# 2: remove files # 2: remove files

View File

@ -34,18 +34,25 @@ include $(INCLUDE_DIR)/autotools.mk
_host_target:=$(if $(HOST_QUILT),,.) _host_target:=$(if $(HOST_QUILT),,.)
Host/Patch:=$(Host/Patch/Default) Host/Patch:=$(Host/Patch/Default)
ifneq ($(strip $(HOST_UNPACK)),) define Host/Prepare/Default
define Host/Prepare/Default $(if $(strip $(HOST_UNPACK)),$(HOST_UNPACK))
$(HOST_UNPACK)
[ ! -d ./src/ ] || $(CP) ./src/* $(HOST_BUILD_DIR) [ ! -d ./src/ ] || $(CP) ./src/* $(HOST_BUILD_DIR)
$(Host/Patch) $(Host/Patch)
endef endef
endif
define Host/Prepare define Host/Prepare
$(call Host/Prepare/Default) $(call Host/Prepare/Default)
endef endef
define Host/Gnulib/Prepare
$(STAGING_DIR_HOST)/bin/gnulib-tool \
--local-dir=$(STAGING_DIR_HOST)/share/gnulib \
--source-base=$(PKG_GNULIB_BASE) \
$(PKG_GNULIB_ARGS) \
$(PKG_GNULIB_MODS) \
;
endef
HOST_CONFIGURE_VARS = \ HOST_CONFIGURE_VARS = \
CC="$(HOSTCC)" \ CC="$(HOSTCC)" \
CFLAGS="$(HOST_CFLAGS)" \ CFLAGS="$(HOST_CFLAGS)" \
@ -109,6 +116,10 @@ define Host/Compile
$(call Host/Compile/Default) $(call Host/Compile/Default)
endef endef
define Host/Gnulib/Compile
$(call Host/Compile/Default,SUBDIRS='$$$$(wildcard $(PKG_GNULIB_BASE))')
endef
define Host/Install/Default define Host/Install/Default
$(call Host/Compile/Default,install) $(call Host/Compile/Default,install)
endef endef

View File

@ -300,7 +300,7 @@ define Build/fit
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \ $(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
$(if $(DEVICE_DTS_DELIMITER),-l $(DEVICE_DTS_DELIMITER)) \ $(if $(DEVICE_DTS_DELIMITER),-l $(DEVICE_DTS_DELIMITER)) \
$(if $(DEVICE_DTS_LOADADDR),-s $(DEVICE_DTS_LOADADDR)) \ $(if $(DEVICE_DTS_LOADADDR),-s $(DEVICE_DTS_LOADADDR)) \
$(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtb)) \ $(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtbo)) \
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \ -c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION) -A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\ PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\
@ -581,6 +581,7 @@ define Build/tplink-v2-image
endef endef
define Build/uImage define Build/uImage
$(if $(UIMAGE_TIME),SOURCE_DATE_EPOCH="$(UIMAGE_TIME)") \
mkimage \ mkimage \
-A $(LINUX_KARCH) \ -A $(LINUX_KARCH) \
-O linux \ -O linux \

View File

@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
# #
# Copyright (C) 2006-2020 OpenWrt.org # Copyright (C) 2006-2020 LEDE.org
override TARGET_BUILD= override TARGET_BUILD=
include $(INCLUDE_DIR)/prereq.mk include $(INCLUDE_DIR)/prereq.mk
@ -146,7 +146,7 @@ endif
# Disable noisy checks by default as in upstream # Disable noisy checks by default as in upstream
DTC_FLAGS += \ DTC_WARN_FLAGS := \
-Wno-unit_address_vs_reg \ -Wno-unit_address_vs_reg \
-Wno-simple_bus_reg \ -Wno-simple_bus_reg \
-Wno-unit_address_format \ -Wno-unit_address_format \
@ -159,6 +159,9 @@ DTC_FLAGS += \
-Wno-graph_port \ -Wno-graph_port \
-Wno-unique_unit_address -Wno-unique_unit_address
DTC_FLAGS += $(DTC_WARN_FLAGS)
DTCO_FLAGS += $(DTC_WARN_FLAGS)
define Image/pad-to define Image/pad-to
dd if=$(1) of=$(1).new bs=$(2) conv=sync dd if=$(1) of=$(1).new bs=$(2) conv=sync
mv $(1).new $(1) mv $(1).new $(1)
@ -174,21 +177,30 @@ endef
# $(2) target dtb file # $(2) target dtb file
# $(3) extra CPP flags # $(3) extra CPP flags
# $(4) extra DTC flags # $(4) extra DTC flags
define Image/BuildDTB define Image/BuildDTB/sub
$(TARGET_CROSS)cpp -nostdinc -x assembler-with-cpp \ $(TARGET_CROSS)cpp -nostdinc -x assembler-with-cpp \
$(DTS_CPPFLAGS) \ $(DTS_CPPFLAGS) \
-I$(DTS_DIR) \ -I$(DTS_DIR) \
-I$(DTS_DIR)/include \ -I$(DTS_DIR)/include \
-I$(LINUX_DIR)/include/ \ -I$(LINUX_DIR)/include/ \
-I$(LINUX_DIR)/scripts/dtc/include-prefixes \
-undef -D__DTS__ $(3) \ -undef -D__DTS__ $(3) \
-o $(2).tmp $(1) -o $(2).tmp $(1)
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \ $(LINUX_DIR)/scripts/dtc/dtc -O dtb \
-i$(dir $(1)) $(DTC_FLAGS) $(4) \ -i$(dir $(1)) $(4) \
$(if $(CONFIG_HAS_DT_OVERLAY_SUPPORT),-@) \ $(if $(CONFIG_HAS_DT_OVERLAY_SUPPORT),-@) \
-o $(2) $(2).tmp -o $(2) $(2).tmp
$(RM) $(2).tmp $(RM) $(2).tmp
endef endef
define Image/BuildDTB
$(call Image/BuildDTB/sub,$(1),$(2),$(3),$(DTC_FLAGS) $(DEVICE_DTC_FLAGS) $(4))
endef
define Image/BuildDTBO
$(call Image/BuildDTB/sub,$(1),$(2),$(3),$(DTCO_FLAGS) $(DEVICE_DTCO_FLAGS) $(4))
endef
define Image/mkfs/jffs2/sub-raw define Image/mkfs/jffs2/sub-raw
$(STAGING_DIR_HOST)/bin/mkfs.jffs2 \ $(STAGING_DIR_HOST)/bin/mkfs.jffs2 \
$(2) \ $(2) \
@ -400,11 +412,14 @@ define Device/Init
DEVICE_DTS_LOADADDR := DEVICE_DTS_LOADADDR :=
DEVICE_DTS_OVERLAY := DEVICE_DTS_OVERLAY :=
DEVICE_FDT_NUM := DEVICE_FDT_NUM :=
DEVICE_DTC_FLAGS :=
DEVICE_DTCO_FLAGS :=
SOC := SOC :=
BOARD_NAME := BOARD_NAME :=
UIMAGE_MAGIC := UIMAGE_MAGIC :=
UIMAGE_NAME := UIMAGE_NAME :=
UIMAGE_TIME :=
DEVICE_COMPAT_VERSION := 1.0 DEVICE_COMPAT_VERSION := 1.0
DEVICE_COMPAT_MESSAGE := DEVICE_COMPAT_MESSAGE :=
SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
@ -421,11 +436,11 @@ endef
DEFAULT_DEVICE_VARS := \ DEFAULT_DEVICE_VARS := \
DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \ DEVICE_NAME KERNEL KERNEL_INITRAMFS KERNEL_INITRAMFS_IMAGE KERNEL_SIZE \
CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \ CMDLINE UBOOTENV_IN_UBI KERNEL_IN_UBI BLOCKSIZE PAGESIZE SUBPAGESIZE \
VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTS \ VID_HDR_OFFSET UBINIZE_OPTS UBINIZE_PARTS MKUBIFS_OPTS DEVICE_DTC_FLAGS \
DEVICE_DTS_CONFIG DEVICE_DTS_DELIMITER DEVICE_DTS_DIR DEVICE_DTS_OVERLAY \ DEVICE_DTCO_FLAGS DEVICE_DTS DEVICE_DTS_CONFIG DEVICE_DTS_DELIMITER \
DEVICE_DTS_LOADADDR \ DEVICE_DTS_DIR DEVICE_DTS_OVERLAY DEVICE_DTS_LOADADDR \
DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \ DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \ UIMAGE_TIME SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
UBOOT_PATH IMAGE_SIZE \ UBOOT_PATH IMAGE_SIZE \
FACTORY_IMG_NAME FACTORY_SIZE \ FACTORY_IMG_NAME FACTORY_SIZE \
DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \ DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \
@ -487,6 +502,9 @@ define Device/Build/initramfs
$(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare $(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare
$(1)-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)) $(1)-images: $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
.IGNORE: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE) $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)
cp $$^ $$@ cp $$^ $$@
@ -550,19 +568,36 @@ define Device/Build/dtb
$(KDIR)/image-$(1).dtb: FORCE $(KDIR)/image-$(1).dtb: FORCE
$(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@) $(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@)
image_prepare: $(KDIR)/image-$(1).dtb compile-dtb: $(KDIR)/image-$(1).dtb
endif
endef
define Device/Build/dtbo
ifndef BUILD_DTSO_$(1)
BUILD_DTSO_$(1) := 1
$(KDIR)/image-$(1).dtbo: FORCE
$(call Image/BuildDTBO,$(strip $(2))/$(strip $(3)).dtso,$$@)
compile-dtb: $(KDIR)/image-$(1).dtbo
endif endif
endef endef
endif endif
define Device/Build/kernel define Device/Build/kernel
$$(eval $$(foreach dts,$$(DEVICE_DTS) $$(DEVICE_DTS_OVERLAY), \ $$(eval $$(foreach dts,$$(DEVICE_DTS), \
$$(call Device/Build/dtb,$$(notdir $$(dts)), \ $$(call Device/Build/dtb,$$(notdir $$(dts)), \
$$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \ $$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
$$(dts) \ $$(dts) \
) \ ) \
)) ))
$$(eval $$(foreach dtso,$$(DEVICE_DTS_OVERLAY), \
$$(call Device/Build/dtbo,$$(notdir $$(dtso)), \
$$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
$$(dtso) \
) \
))
$(KDIR)/$$(KERNEL_NAME):: image_prepare $(KDIR)/$$(KERNEL_NAME):: image_prepare
$$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE)) $$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
@ -781,18 +816,20 @@ define BuildImage
download: download:
prepare: prepare:
compile: compile:
compile-dtb:
clean: clean:
image_prepare: image_prepare:
ifeq ($(IB),) ifeq ($(IB),)
.PHONY: download prepare compile clean image_prepare kernel_prepare install install-images .PHONY: download prepare compile compile-dtb clean image_prepare kernel_prepare install install-images
compile: compile:
$(call Build/Compile) $(call Build/Compile)
clean: clean:
$(call Build/Clean) $(call Build/Clean)
image_prepare: compile compile-dtb:
image_prepare: compile compile-dtb
mkdir -p $(BIN_DIR) $(KDIR)/tmp mkdir -p $(BIN_DIR) $(KDIR)/tmp
rm -rf $(BUILD_DIR)/json_info_files rm -rf $(BUILD_DIR)/json_info_files
$(call Image/Prepare) $(call Image/Prepare)

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .176 LINUX_VERSION-5.10 = .235
LINUX_KERNEL_HASH-5.10.176 = ce072c60ba04173e05b2a1de3fefdeba5ac8b28b1958d92d21bdbf9b736ef793 LINUX_KERNEL_HASH-5.10.235 = 953be3931101a94a93a644c1283ca41a7e567447ca87d3069ed4dd712dc1f1cc

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .104 LINUX_VERSION-5.15 = .179
LINUX_KERNEL_HASH-5.15.104 = 71c532ce09992e470f3259ffeb38d2b5bba990c243a559e4726a57412bd36b54 LINUX_KERNEL_HASH-5.15.179 = 9319a47b1e9b5d344ff6015431856d0c9640e4faedc527c87f9129061a27136f

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .238 LINUX_VERSION-5.4 = .291
LINUX_KERNEL_HASH-5.4.238 = 70a2b2da85598eba6a73cdc0749e441cbdf3011d9babcb7028a46aa8d98aa91f LINUX_KERNEL_HASH-5.4.291 = b3ad64a4476a7c5450b92eab9a888b84ecb64dc613fcb0128f653f58e958ef6e

View File

@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .22 LINUX_VERSION-6.1 = .134
LINUX_KERNEL_HASH-6.1.22 = 2be89141cef74d0e5a55540d203eb8010dfddb3c82d617e66b058f20b19cfda8 LINUX_KERNEL_HASH-6.1.134 = 60c70cdd70ddee384c004242e67844e3dd1fe28f75b26b3586859fff0a07bd23

2
include/kernel-6.12 Normal file
View File

@ -0,0 +1,2 @@
LINUX_VERSION-6.12 = .23
LINUX_KERNEL_HASH-6.12.23 = d8d95404f8deeb7ff6992c0df855025062e9e8182bca6daa27ef2e9275d27749

2
include/kernel-6.6 Normal file
View File

@ -0,0 +1,2 @@
LINUX_VERSION-6.6 = .87
LINUX_KERNEL_HASH-6.6.87 = 8957e5c2dacdbc47a16dbf1f6303ca7088409be6197a3881f752313275357ac6

View File

@ -156,6 +156,10 @@ define BuildKernel
compile: $(LINUX_DIR)/.modules compile: $(LINUX_DIR)/.modules
$(MAKE) -C image compile TARGET_BUILD= $(MAKE) -C image compile TARGET_BUILD=
dtb: $(STAMP_CONFIGURED)
$(_SINGLE)$(KERNEL_MAKE) scripts_dtc
$(MAKE) -C image compile-dtb TARGET_BUILD=
oldconfig menuconfig nconfig xconfig: $(STAMP_PREPARED) $(STAMP_CHECKED) FORCE oldconfig menuconfig nconfig xconfig: $(STAMP_PREPARED) $(STAMP_CHECKED) FORCE
rm -f $(LINUX_DIR)/.config.prev rm -f $(LINUX_DIR)/.config.prev
rm -f $(STAMP_CONFIGURED) rm -f $(STAMP_CONFIGURED)

View File

@ -75,6 +75,7 @@ endif
rm -f $(LINUX_DIR)/.config.prev rm -f $(LINUX_DIR)/.config.prev
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
$(call Kernel/SetInitramfs/PreConfigure) $(call Kernel/SetInitramfs/PreConfigure)
echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> $(LINUX_DIR)/.config
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y) ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config
echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config
@ -99,6 +100,7 @@ define Kernel/SetNoInitramfs
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config.set grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config.set
echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config.set echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config.set
echo '# CONFIG_INITRAMFS_FORCE is not set' >> $(LINUX_DIR)/.config.set echo '# CONFIG_INITRAMFS_FORCE is not set' >> $(LINUX_DIR)/.config.set
echo "# CONFIG_INITRAMFS_PRESERVE_MTIME is not set" >> $(LINUX_DIR)/.config.set
endef endef
define Kernel/Configure/Default define Kernel/Configure/Default

View File

@ -13,6 +13,15 @@ endif
include $(KERNEL_DETAILS_FILE) include $(KERNEL_DETAILS_FILE)
ifdef KERNEL_TESTING_PATCHVER
KERNEL_TESTING_DETAILS_FILE=$(INCLUDE_DIR)/kernel-$(KERNEL_TESTING_PATCHVER)
ifeq ($(wildcard $(KERNEL_TESTING_DETAILS_FILE)),)
$(error Missing kernel version/hash file for $(KERNEL_TESTING_PATCHVER). Please create $(KERNEL_TESTING_DETAILS_FILE))
endif
include $(KERNEL_TESTING_DETAILS_FILE)
endif
remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1)))) remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1))))))) sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

View File

@ -86,10 +86,14 @@ else ifneq (,$(findstring $(ARCH) , arceb ))
LINUX_KARCH := arc LINUX_KARCH := arc
else ifneq (,$(findstring $(ARCH) , armeb )) else ifneq (,$(findstring $(ARCH) , armeb ))
LINUX_KARCH := arm LINUX_KARCH := arm
else ifneq (,$(findstring $(ARCH) , loongarch64 ))
LINUX_KARCH := loongarch
else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el )) else ifneq (,$(findstring $(ARCH) , mipsel mips64 mips64el ))
LINUX_KARCH := mips LINUX_KARCH := mips
else ifneq (,$(findstring $(ARCH) , powerpc64 )) else ifneq (,$(findstring $(ARCH) , powerpc64 ))
LINUX_KARCH := powerpc LINUX_KARCH := powerpc
else ifneq (,$(findstring $(ARCH) , riscv64 ))
LINUX_KARCH := riscv
else ifneq (,$(findstring $(ARCH) , sh2 sh3 sh4 )) else ifneq (,$(findstring $(ARCH) , sh2 sh3 sh4 ))
LINUX_KARCH := sh LINUX_KARCH := sh
else ifneq (,$(findstring $(ARCH) , i386 x86_64 )) else ifneq (,$(findstring $(ARCH) , i386 x86_64 ))
@ -234,7 +238,7 @@ $(call KernelPackage/$(1)/config)
$(call KernelPackage/depends) $(call KernelPackage/depends)
$(call KernelPackage/hooks) $(call KernelPackage/hooks)
ifneq ($(if $(filter-out %=y %=n %=m,$(KCONFIG)),$(filter m y,$(foreach c,$(filter-out %=y %=n %=m,$(KCONFIG)),$($(c)))),.),) ifneq ($(if $(filter-out %=y %=n %=m,$(KCONFIG)),$(filter m y,$(foreach c,$(call version_filter,$(filter-out %=y %=n %=m,$(KCONFIG))),$($(c)))),.),)
define Package/kmod-$(1)/install define Package/kmod-$(1)/install
@for mod in $$(call version_filter,$$(FILES)); do \ @for mod in $$(call version_filter,$$(FILES)); do \
if grep -q "$$$$$$$${mod##$(LINUX_DIR)/}" "$(LINUX_DIR)/modules.builtin"; then \ if grep -q "$$$$$$$${mod##$(LINUX_DIR)/}" "$(LINUX_DIR)/modules.builtin"; then \

View File

@ -55,8 +55,14 @@ else
MESON_CPU:="$(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))" MESON_CPU:="$(CPU_TYPE)$(if $(CPU_SUBTYPE),+$(CPU_SUBTYPE))"
endif endif
ifeq ($(MESON_USE_STAGING_PYTHON),)
PYTHON_BIN:=$(STAGING_DIR_HOST)/bin/$(PYTHON)
else
PYTHON_BIN:=$(STAGING_DIR_HOSTPKG)/bin/$(PYTHON)
endif
define Meson define Meson
$(2) $(STAGING_DIR_HOST)/bin/$(PYTHON) $(STAGING_DIR_HOST)/bin/meson.py $(1) $(2) $(PYTHON_BIN) $(STAGING_DIR_HOST)/bin/meson.py $(1)
endef endef
define Meson/CreateNativeFile define Meson/CreateNativeFile
@ -65,7 +71,7 @@ define Meson/CreateNativeFile
-e "s|@CXX@|$(foreach BIN,$(HOSTCXX),'$(BIN)',)|" \ -e "s|@CXX@|$(foreach BIN,$(HOSTCXX),'$(BIN)',)|" \
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \ -e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \ -e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
-e "s|@PYTHON@|$(STAGING_DIR_HOST)/bin/python3|" \ -e "s|@PYTHON@|$(PYTHON_BIN)|" \
-e "s|@CFLAGS@|$(foreach FLAG,$(HOST_CFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@CFLAGS@|$(foreach FLAG,$(HOST_CFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@CXXFLAGS@|$(foreach FLAG,$(HOST_CXXFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@CXXFLAGS@|$(foreach FLAG,$(HOST_CXXFLAGS) $(HOST_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@LDFLAGS@|$(foreach FLAG,$(HOST_LDFLAGS),'$(FLAG)',)|" \ -e "s|@LDFLAGS@|$(foreach FLAG,$(HOST_LDFLAGS),'$(FLAG)',)|" \
@ -78,12 +84,13 @@ define Meson/CreateCrossFile
$(STAGING_DIR_HOST)/bin/sed \ $(STAGING_DIR_HOST)/bin/sed \
-e "s|@CC@|$(foreach BIN,$(TARGET_CC),'$(BIN)',)|" \ -e "s|@CC@|$(foreach BIN,$(TARGET_CC),'$(BIN)',)|" \
-e "s|@CXX@|$(foreach BIN,$(TARGET_CXX),'$(BIN)',)|" \ -e "s|@CXX@|$(foreach BIN,$(TARGET_CXX),'$(BIN)',)|" \
-e "s|@LD@|$(foreach FLAG,$(TARGET_LINKER),'$(FLAG)',)|" \
-e "s|@AR@|$(TARGET_AR)|" \ -e "s|@AR@|$(TARGET_AR)|" \
-e "s|@STRIP@|$(TARGET_CROSS)strip|" \ -e "s|@STRIP@|$(TARGET_CROSS)strip|" \
-e "s|@NM@|$(TARGET_NM)|" \ -e "s|@NM@|$(TARGET_NM)|" \
-e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \ -e "s|@PKGCONFIG@|$(PKG_CONFIG)|" \
-e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \ -e "s|@CMAKE@|$(STAGING_DIR_HOST)/bin/cmake|" \
-e "s|@PYTHON@|$(STAGING_DIR_HOST)/bin/python3|" \ -e "s|@PYTHON@|$(PYTHON_BIN)|" \
-e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@CFLAGS@|$(foreach FLAG,$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \ -e "s|@CXXFLAGS@|$(foreach FLAG,$(TARGET_CXXFLAGS) $(EXTRA_CXXFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS),'$(FLAG)',)|" \
-e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \ -e "s|@LDFLAGS@|$(foreach FLAG,$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS),'$(FLAG)',)|" \
@ -97,7 +104,9 @@ endef
define Host/Configure/Meson define Host/Configure/Meson
$(call Meson/CreateNativeFile,$(HOST_BUILD_DIR)/openwrt-native.txt) $(call Meson/CreateNativeFile,$(HOST_BUILD_DIR)/openwrt-native.txt)
$(call Meson, \ $(call Meson, \
setup \
--native-file $(HOST_BUILD_DIR)/openwrt-native.txt \ --native-file $(HOST_BUILD_DIR)/openwrt-native.txt \
-Ddefault_library=static \
$(MESON_HOST_ARGS) \ $(MESON_HOST_ARGS) \
$(MESON_HOST_BUILD_DIR) \ $(MESON_HOST_BUILD_DIR) \
$(MESON_HOST_BUILD_DIR)/.., \ $(MESON_HOST_BUILD_DIR)/.., \
@ -105,7 +114,7 @@ define Host/Configure/Meson
endef endef
define Host/Compile/Meson define Host/Compile/Meson
+$(NINJA) -C $(MESON_HOST_BUILD_DIR) $(1) +$(MESON_HOST_VARS) $(NINJA) -C $(MESON_HOST_BUILD_DIR) $(1)
endef endef
define Host/Install/Meson define Host/Install/Meson
@ -120,9 +129,11 @@ define Build/Configure/Meson
$(call Meson/CreateNativeFile,$(PKG_BUILD_DIR)/openwrt-native.txt) $(call Meson/CreateNativeFile,$(PKG_BUILD_DIR)/openwrt-native.txt)
$(call Meson/CreateCrossFile,$(PKG_BUILD_DIR)/openwrt-cross.txt) $(call Meson/CreateCrossFile,$(PKG_BUILD_DIR)/openwrt-cross.txt)
$(call Meson, \ $(call Meson, \
--buildtype plain \ setup \
--buildtype $(if $(CONFIG_DEBUG),debug,plain) \
--native-file $(PKG_BUILD_DIR)/openwrt-native.txt \ --native-file $(PKG_BUILD_DIR)/openwrt-native.txt \
--cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \ --cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \
-Ddefault_library=both \
$(MESON_ARGS) \ $(MESON_ARGS) \
$(MESON_BUILD_DIR) \ $(MESON_BUILD_DIR) \
$(MESON_BUILD_DIR)/.., \ $(MESON_BUILD_DIR)/.., \
@ -130,7 +141,7 @@ define Build/Configure/Meson
endef endef
define Build/Compile/Meson define Build/Compile/Meson
+$(NINJA) -C $(MESON_BUILD_DIR) $(1) +$(MESON_VARS) $(NINJA) -C $(MESON_BUILD_DIR) $(1)
endef endef
define Build/Install/Meson define Build/Install/Meson

View File

@ -1,50 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2022 Enéas Ulir de Queiroz
ENGINES_DIR=engines-1.1
define Package/openssl/engine/Default
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=SSL
DEPENDS:=libopenssl @OPENSSL_ENGINE +libopenssl-conf
endef
# 1 = engine name
# 2 - package name, defaults to libopenssl-$(1)
define Package/openssl/add-engine
OSSL_ENG_PKG:=$(if $(2),$(2),libopenssl-$(1))
Package/$$(OSSL_ENG_PKG)/conffiles:=/etc/ssl/engines.cnf.d/$(1).cnf
define Package/$$(OSSL_ENG_PKG)/install
$$(INSTALL_DIR) $$(1)/usr/lib/$(ENGINES_DIR)
$$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/lib/$(ENGINES_DIR)/$(1).so \
$$(1)/usr/lib/$(ENGINES_DIR)
$$(INSTALL_DIR) $$(1)/etc/ssl/engines.cnf.d
$$(INSTALL_DATA) ./files/$(1).cnf $$(1)/etc/ssl/engines.cnf.d/
endef
define Package/$$(OSSL_ENG_PKG)/postinst :=
#!/bin/sh
OPENSSL_UCI="$$$${IPKG_INSTROOT}/etc/config/openssl"
[ -z "$$$${IPKG_INSTROOT}" ] && uci -q get openssl.$(1) >/dev/null && exit 0
cat << EOF >> "$$$${OPENSSL_UCI}"
config engine '$(1)'
option enabled '1'
EOF
[ -n "$$$${IPKG_INSTROOT}" ] || /etc/init.d/openssl reload
endef
define Package/$$(OSSL_ENG_PKG)/postrm :=
#!/bin/sh
[ -n "$$$${IPKG_INSTROOT}" ] && exit 0
uci delete openssl.$(1)
uci commit openssl
/etc/init.d/openssl reload
endef
endef

79
include/openssl-module.mk Normal file
View File

@ -0,0 +1,79 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2022-2023 Enéas Ulir de Queiroz
ENGINES_DIR=engines-3
define Package/openssl/module/Default
SECTION:=libs
CATEGORY:=Libraries
SUBMENU:=SSL
DEPENDS:=libopenssl +libopenssl-conf
endef
define Package/openssl/engine/Default
$(Package/openssl/module/Default)
DEPENDS+=@OPENSSL_ENGINE
endef
# 1 = moudule type (engine|provider)
# 2 = module name
# 3 = directory to save .so file
# 4 = [ package name, defaults to libopenssl-$(2) ]
define Package/openssl/add-module
$(eval MOD_TYPE:=$(1))
$(eval MOD_NAME:=$(2))
$(eval MOD_DIR:=$(3))
$(eval OSSL_PKG:=$(if $(4),$(4),libopenssl-$(MOD_NAME)))
$(info Package/openssl/add-module 1='$(1)'; 2='$(2)'; 3='$(3)' 4='$(4)')
$(info MOD_TYPE='$(MOD_TYPE)'; MOD_NAME='$(MOD_NAME)'; MOD_DIR='$(MOD_DIR)' OSSL_PKG='$(OSSL_PKG)')
Package/$(OSSL_PKG)/conffiles:=/etc/ssl/modules.cnf.d/$(MOD_NAME).cnf
define Package/$(OSSL_PKG)/install
$$(INSTALL_DIR) $$(1)/$(MOD_DIR)
$$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/$(MOD_DIR)/$(MOD_NAME).so \
$$(1)/$(MOD_DIR)
$$(INSTALL_DIR) $$(1)/etc/ssl/modules.cnf.d
$$(INSTALL_DATA) ./files/$(MOD_NAME).cnf $$(1)/etc/ssl/modules.cnf.d/
endef
define Package/$(OSSL_PKG)/postinst
#!/bin/sh
OPENSSL_UCI="$$$${IPKG_INSTROOT}/etc/config/openssl"
[ -z "$$$${IPKG_INSTROOT}" ] \
&& uci -q get openssl.$(MOD_NAME) >/dev/null \
&& exit 0
cat << EOF >> "$$$${OPENSSL_UCI}"
config $(MOD_TYPE) '$(MOD_NAME)'
option enabled '1'
EOF
[ -n "$$$${IPKG_INSTROOT}" ] || /etc/init.d/openssl reload
exit 0
endef
define Package/$(OSSL_PKG)/postrm
#!/bin/sh
[ -n "$$$${IPKG_INSTROOT}" ] && exit 0
uci -q delete openssl.$(MOD_NAME) && uci commit openssl
/etc/init.d/openssl reload
exit 0
endef
endef
# 1 = engine name
# 2 - package name, defaults to libopenssl-$(1)
define Package/openssl/add-engine
$(call Package/openssl/add-module,engine,$(1),/usr/lib/$(ENGINES_DIR),$(2))
endef
# 1 = provider name
# 2 = [ package name, defaults to libopenssl-$(1) ]
define Package/openssl/add-provider
$(call Package/openssl/add-module,provider,$(1),/usr/lib/ossl-modules,$(2))
endef

View File

@ -11,8 +11,6 @@ include $(INCLUDE_DIR)/download.mk
PKG_BUILD_DIR ?= $(BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION)) PKG_BUILD_DIR ?= $(BUILD_DIR)/$(if $(BUILD_VARIANT),$(PKG_NAME)-$(BUILD_VARIANT)/)$(PKG_NAME)$(if $(PKG_VERSION),-$(PKG_VERSION))
PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install PKG_INSTALL_DIR ?= $(PKG_BUILD_DIR)/ipkg-install
PKG_BUILD_PARALLEL ?= PKG_BUILD_PARALLEL ?=
PKG_USE_MIPS16 ?= 1
PKG_IREMAP ?= 1
PKG_SKIP_DOWNLOAD=$(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT) PKG_SKIP_DOWNLOAD=$(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT)
MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j)) MAKE_J:=$(if $(MAKE_JOBSERVER),$(MAKE_JOBSERVER) $(if $(filter 3.% 4.0 4.1,$(MAKE_VERSION)),-j))
@ -24,17 +22,52 @@ PKG_JOBS?=-j1
else else
PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL),$(MAKE_J),-j1) PKG_JOBS?=$(if $(PKG_BUILD_PARALLEL),$(MAKE_J),-j1)
endif endif
ifdef CONFIG_USE_MIPS16
ifeq ($(strip $(PKG_USE_MIPS16)),1) PKG_BUILD_FLAGS?=
TARGET_ASFLAGS_DEFAULT = $(filter-out -mips16 -minterlink-mips16,$(TARGET_CFLAGS)) # TODO remove this when all packages moved to PKG_BUILD_FLAGS=no-mips16
TARGET_CFLAGS += -mips16 -minterlink-mips16 PKG_USE_MIPS16?=1
endif ifneq ($(strip $(PKG_USE_MIPS16)),1)
PKG_BUILD_FLAGS+=no-mips16
endif endif
ifeq ($(strip $(PKG_IREMAP)),1)
__unknown_flags=$(filter-out no-iremap no-mips16 gc-sections no-gc-sections lto no-lto no-mold,$(PKG_BUILD_FLAGS))
ifneq ($(__unknown_flags),)
$(error unknown PKG_BUILD_FLAGS: $(__unknown_flags))
endif
# $1=flagname, $2=default (0/1)
define pkg_build_flag
$(if $(filter no-$(1),$(PKG_BUILD_FLAGS)),0,$(if $(filter $(1),$(PKG_BUILD_FLAGS)),1,$(2)))
endef
ifeq ($(call pkg_build_flag,iremap,1),1)
IREMAP_CFLAGS = $(call iremap,$(PKG_BUILD_DIR),$(notdir $(PKG_BUILD_DIR))) IREMAP_CFLAGS = $(call iremap,$(PKG_BUILD_DIR),$(notdir $(PKG_BUILD_DIR)))
TARGET_CFLAGS += $(IREMAP_CFLAGS) TARGET_CFLAGS += $(IREMAP_CFLAGS)
endif endif
ifdef CONFIG_USE_MIPS16
ifeq ($(call pkg_build_flag,mips16,1),1)
TARGET_ASFLAGS_DEFAULT = $(filter-out -mips16 -minterlink-mips16,$(TARGET_CFLAGS))
TARGET_CFLAGS += -mips16 -minterlink-mips16
TARGET_CXXFLAGS += -mips16 -minterlink-mips16
endif
endif
ifeq ($(call pkg_build_flag,gc-sections,$(if $(CONFIG_USE_GC_SECTIONS),1,0)),1)
TARGET_CFLAGS+= -ffunction-sections -fdata-sections
TARGET_CXXFLAGS+= -ffunction-sections -fdata-sections
TARGET_LDFLAGS+= -Wl,--gc-sections
endif
ifeq ($(call pkg_build_flag,lto,$(if $(CONFIG_USE_LTO),1,0)),1)
TARGET_CFLAGS+= -flto=auto -fno-fat-lto-objects
TARGET_CXXFLAGS+= -flto=auto -fno-fat-lto-objects
TARGET_LDFLAGS+= -flto=auto -fuse-linker-plugin
endif
ifdef CONFIG_USE_MOLD
ifeq ($(call pkg_build_flag,mold,1),1)
TARGET_LINKER:=mold
endif
endif
include $(INCLUDE_DIR)/hardening.mk include $(INCLUDE_DIR)/hardening.mk
include $(INCLUDE_DIR)/prereq.mk include $(INCLUDE_DIR)/prereq.mk
include $(INCLUDE_DIR)/unpack.mk include $(INCLUDE_DIR)/unpack.mk

View File

@ -15,7 +15,7 @@ $(eval $(call TestHostCommand,working-make, \
$(MAKE) -v | grep -E 'Make (4\.[1-9]|[5-9]\.)')) $(MAKE) -v | grep -E 'Make (4\.[1-9]|[5-9]\.)'))
$(eval $(call TestHostCommand,case-sensitive-fs, \ $(eval $(call TestHostCommand,case-sensitive-fs, \
OpenWrt can only be built on a case-sensitive filesystem, \ LEDE can only be built on a case-sensitive filesystem, \
rm -f $(TMP_DIR)/test.*; touch $(TMP_DIR)/test.fs; \ rm -f $(TMP_DIR)/test.*; touch $(TMP_DIR)/test.fs; \
test ! -f $(TMP_DIR)/test.FS)) test ! -f $(TMP_DIR)/test.FS))
@ -229,4 +229,4 @@ prereq: $(STAGING_DIR_HOST)/bin/mkhash $(STAGING_DIR_HOST)/bin/xxd
# Install ldconfig stub # Install ldconfig stub
$(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \ $(eval $(call TestHostCommand,ldconfig-stub,Failed to install stub, \
$(LN) $(firstword $(wildcard /bin/true /usr/bin/true)) $(STAGING_DIR_HOST)/bin/ldconfig)) $(LN) $(SCRIPT_DIR)/noop.sh $(STAGING_DIR_HOST)/bin/ldconfig))

30
include/site/loongarch64 Normal file
View File

@ -0,0 +1,30 @@
#!/bin/sh
. $TOPDIR/include/site/linux
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
ac_cv_sizeof___int64=0
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=8
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=8
ac_cv_sizeof_off_t=8
ac_cv_sizeof_short_int=2
ac_cv_sizeof_short=2
ac_cv_sizeof_size_t=8
ac_cv_sizeof_ssize_t=8
ac_cv_sizeof_u_int16_t=2
ac_cv_sizeof_u_int32_t=4
ac_cv_sizeof_u_int64_t=8
ac_cv_sizeof_uint16_t=2
ac_cv_sizeof_uint32_t=4
ac_cv_sizeof_uint64_t=8
ac_cv_sizeof_unsigned_int=4
ac_cv_sizeof_unsigned_long=8
ac_cv_sizeof_unsigned_long_long=8
ac_cv_sizeof_unsigned_short=2
ac_cv_sizeof_void_p=8

30
include/site/riscv64 Normal file
View File

@ -0,0 +1,30 @@
#!/bin/sh
. $TOPDIR/include/site/linux
ac_cv_c_littleendian=${ac_cv_c_littleendian=yes}
ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
ac_cv_sizeof___int64=8
ac_cv_sizeof_char=1
ac_cv_sizeof_int=4
ac_cv_sizeof_int16_t=2
ac_cv_sizeof_int32_t=4
ac_cv_sizeof_int64_t=8
ac_cv_sizeof_long_int=8
ac_cv_sizeof_long_long=8
ac_cv_sizeof_long=8
ac_cv_sizeof_off_t=8
ac_cv_sizeof_short_int=2
ac_cv_sizeof_short=2
ac_cv_sizeof_size_t=8
ac_cv_sizeof_ssize_t=8
ac_cv_sizeof_u_int16_t=2
ac_cv_sizeof_u_int32_t=4
ac_cv_sizeof_u_int64_t=8
ac_cv_sizeof_uint16_t=2
ac_cv_sizeof_uint32_t=4
ac_cv_sizeof_uint64_t=8
ac_cv_sizeof_unsigned_int=4
ac_cv_sizeof_unsigned_long=8
ac_cv_sizeof_unsigned_long_long=8
ac_cv_sizeof_unsigned_short=2
ac_cv_sizeof_void_p=8

View File

@ -5,6 +5,9 @@
ifeq ($(MAKECMDGOALS),prereq) ifeq ($(MAKECMDGOALS),prereq)
SUBTARGETS:=prereq SUBTARGETS:=prereq
PREREQ_ONLY:=1 PREREQ_ONLY:=1
# For target/linux related target add dtb to selectively compile dtbs
else ifneq ($(filter target/linux/%,$(MAKECMDGOALS)),)
SUBTARGETS:=$(DEFAULT_SUBDIR_TARGETS) dtb
else else
SUBTARGETS:=$(DEFAULT_SUBDIR_TARGETS) SUBTARGETS:=$(DEFAULT_SUBDIR_TARGETS)
endif endif

View File

@ -53,9 +53,9 @@ DEFAULT_PACKAGES.nas:=\
mdadm mdadm
# For router targets # For router targets
DEFAULT_PACKAGES.router:=\ DEFAULT_PACKAGES.router:=\
dnsmasq-full firewall iptables ppp ppp-mod-pppoe \ dnsmasq-full firewall iptables ppp ppp-mod-pppoe odhcp6c odhcpd-ipv6only ip6tables libip6tc kmod-ipt-nat6 \
block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw kmod-tun \ block-mount coremark kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw kmod-tun \
iptables-mod-tproxy iptables-mod-extra ipset ip-full default-settings luci luci-newapi \ iptables-mod-tproxy iptables-mod-extra ipset ip-full default-settings luci luci-proto-ipv6 \
ddns-scripts_aliyun ddns-scripts_dnspod luci-app-ddns luci-app-upnp luci-app-autoreboot \ ddns-scripts_aliyun ddns-scripts_dnspod luci-app-ddns luci-app-upnp luci-app-autoreboot \
luci-app-arpbind luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-vlmcsd \ luci-app-arpbind luci-app-filetransfer luci-app-vsftpd luci-app-ssr-plus luci-app-vlmcsd \
luci-app-accesscontrol luci-app-nlbwmon luci-app-turboacc luci-app-wol curl ca-certificates luci-app-accesscontrol luci-app-nlbwmon luci-app-turboacc luci-app-wol curl ca-certificates
@ -258,6 +258,15 @@ ifeq ($(DUMP),1)
CPU_CFLAGS_arc700 = -mcpu=arc700 CPU_CFLAGS_arc700 = -mcpu=arc700
CPU_CFLAGS_archs = -mcpu=archs CPU_CFLAGS_archs = -mcpu=archs
endif endif
ifeq ($(ARCH),riscv64)
CPU_TYPE ?= riscv64
CPU_CFLAGS_riscv64:=-mabi=lp64d -march=rv64imafdc
endif
ifeq ($(ARCH),loongarch64)
CPU_TYPE ?= generic
CPU_CFLAGS := -O2 -pipe
CPU_CFLAGS_generic:=-march=loongarch64
endif
ifneq ($(CPU_TYPE),) ifneq ($(CPU_TYPE),)
ifndef CPU_CFLAGS_$(CPU_TYPE) ifndef CPU_CFLAGS_$(CPU_TYPE)
$(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type) $(warning CPU_TYPE "$(CPU_TYPE)" doesn't correspond to a known type)

View File

@ -3,7 +3,7 @@ PKG_CPE_ID ?= cpe:/a:arm:trusted_firmware-a
ifndef PKG_SOURCE_PROTO ifndef PKG_SOURCE_PROTO
PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz PKG_SOURCE = trusted-firmware-a-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot PKG_SOURCE_URL:=https://codeload.github.com/TrustedFirmware-A/trusted-firmware-a/tar.gz/v$(PKG_VERSION)?
endif endif
PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DIR = $(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)

View File

@ -16,7 +16,7 @@ PKG_FLAGS:=nonshared
PKG_LICENSE:=GPL-2.0 GPL-2.0+ PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=Licenses/README PKG_LICENSE_FILES:=Licenses/README
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL ?= 1
export GCC_HONOUR_COPTS=s export GCC_HONOUR_COPTS=s

View File

@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1)))) sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER)) VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),SNAPSHOT) VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10.0)
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE)) VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION)) VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO)) VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/snapshots) VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/24.10.0)
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST)) VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt) VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)

View File

@ -23,6 +23,7 @@ PKG_LICENSE:=GPL-2.0
PKG_CONFIG_DEPENDS += \ PKG_CONFIG_DEPENDS += \
CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \ CONFIG_SIGNED_PACKAGES CONFIG_TARGET_INIT_PATH CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE \
CONFIG_NAND_SUPPORT \ CONFIG_NAND_SUPPORT \
CONFIG_LEGACY_SDCARD_SUPPORT \
CONFIG_EMMC_SUPPORT \ CONFIG_EMMC_SUPPORT \
CONFIG_CLEAN_IPKG \ CONFIG_CLEAN_IPKG \
CONFIG_PER_FEED_REPO \ CONFIG_PER_FEED_REPO \
@ -39,7 +40,7 @@ define Package/base-files
SECTION:=base SECTION:=base
CATEGORY:=Base system CATEGORY:=Base system
DEPENDS:=+netifd +libc +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool DEPENDS:=+netifd +libc +jsonfilter +SIGNED_PACKAGES:usign +SIGNED_PACKAGES:openwrt-keyring +NAND_SUPPORT:ubi-utils +fstools +fwtool
TITLE:=Base filesystem for OpenWrt TITLE:=Base filesystem for LEDE
URL:=http://openwrt.org/ URL:=http://openwrt.org/
VERSION:=$(PKG_RELEASE)-$(REVISION) VERSION:=$(PKG_RELEASE)-$(REVISION)
endef endef
@ -48,7 +49,6 @@ define Package/base-files/conffiles
/etc/config/ /etc/config/
/etc/config/network /etc/config/network
/etc/config/system /etc/config/system
/etc/crontabs/
/etc/dropbear/ /etc/dropbear/
/etc/ethers /etc/ethers
/etc/group /etc/group
@ -89,6 +89,19 @@ define ImageConfigOptions
echo 'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf echo 'pi_preinit_net_messages="$(CONFIG_TARGET_PREINIT_SHOW_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf echo 'pi_preinit_no_failsafe_netmsg="$(CONFIG_TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG)"' >>$(1)/lib/preinit/00_preinit.conf
echo 'pi_preinit_no_failsafe="$(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE)"' >>$(1)/lib/preinit/00_preinit.conf echo 'pi_preinit_no_failsafe="$(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE)"' >>$(1)/lib/preinit/00_preinit.conf
ifeq ($(CONFIG_TARGET_DEFAULT_LAN_IP_FROM_PREINIT),y)
mkdir -p $(1)/etc/board.d
echo '. /lib/functions/uci-defaults.sh' >$(1)/etc/board.d/99-lan-ip
echo 'logger -t 99-lan-ip "setting custom default LAN IP"' >>$(1)/etc/board.d/99-lan-ip
echo 'board_config_update' >>$(1)/etc/board.d/99-lan-ip
echo 'json_select network' >>$(1)/etc/board.d/99-lan-ip
echo 'json_select lan' >>$(1)/etc/board.d/99-lan-ip
echo 'json_add_string ipaddr $(if $(CONFIG_TARGET_PREINIT_IP),$(CONFIG_TARGET_PREINIT_IP),"192.168.1.1")' >>$(1)/etc/board.d/99-lan-ip
echo 'json_add_string netmask $(if $(CONFIG_TARGET_PREINIT_NETMASK),$(CONFIG_TARGET_PREINIT_NETMASK),"255.255.255.0")' >>$(1)/etc/board.d/99-lan-ip
echo 'json_select ..' >>$(1)/etc/board.d/99-lan-ip
echo 'json_select ..' >>$(1)/etc/board.d/99-lan-ip
echo 'board_config_flush' >>$(1)/etc/board.d/99-lan-ip
endif
endef endef
define Build/Prepare define Build/Prepare
@ -125,6 +138,12 @@ ifeq ($(CONFIG_NAND_SUPPORT),)
endef endef
endif endif
ifeq ($(CONFIG_LEGACY_SDCARD_SUPPORT),)
define Package/base-files/legacy-sdcard-support
rm -f $(1)/lib/upgrade/legacy-sdcard.sh
endef
endif
ifeq ($(CONFIG_EMMC_SUPPORT),) ifeq ($(CONFIG_EMMC_SUPPORT),)
define Package/base-files/emmc-support define Package/base-files/emmc-support
rm -f $(1)/lib/upgrade/emmc.sh rm -f $(1)/lib/upgrade/emmc.sh
@ -135,6 +154,7 @@ define Package/base-files/install
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
$(Package/base-files/install-key) $(Package/base-files/install-key)
$(Package/base-files/nand-support) $(Package/base-files/nand-support)
$(Package/base-files/legacy-sdcard-support)
$(Package/base-files/emmc-support) $(Package/base-files/emmc-support)
if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \ if [ -d $(GENERIC_PLATFORM_DIR)/base-files/. ]; then \
$(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \ $(CP) $(GENERIC_PLATFORM_DIR)/base-files/* $(1)/; \
@ -218,6 +238,10 @@ endif
$(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \ $(if $(CONFIG_TARGET_PREINIT_DISABLE_FAILSAFE), \
rm -f $(1)/etc/banner.failsafe,) rm -f $(1)/etc/banner.failsafe,)
if [ -f $(TOPDIR)/feeds/luci/package.json ]; then \
$(CP) ./luci2/* $(1)/; \
fi
endef endef
ifneq ($(DUMP),1) ifneq ($(DUMP),1)

View File

@ -193,6 +193,7 @@ generate_network() {
} }
;; ;;
ncm|\
qmi|\ qmi|\
mbim) mbim)
uci -q batch <<-EOF uci -q batch <<-EOF
@ -295,7 +296,7 @@ generate_static_system() {
uci -q batch <<-EOF uci -q batch <<-EOF
delete system.@system[0] delete system.@system[0]
add system system add system system
set system.@system[-1].hostname='OpenWrt' set system.@system[-1].hostname='LEDE'
set system.@system[-1].timezone='UTC' set system.@system[-1].timezone='UTC'
set system.@system[-1].ttylogin='0' set system.@system[-1].ttylogin='0'
set system.@system[-1].log_size='64' set system.@system[-1].log_size='64'
@ -305,10 +306,10 @@ generate_static_system() {
set system.ntp='timeserver' set system.ntp='timeserver'
set system.ntp.enabled='1' set system.ntp.enabled='1'
set system.ntp.enable_server='1' set system.ntp.enable_server='1'
add_list system.ntp.server='ntp.aliyun.com' add_list system.ntp.server='time.apple.com'
add_list system.ntp.server='time1.cloud.tencent.com' add_list system.ntp.server='time.google.com'
add_list system.ntp.server='time.ustc.edu.cn' add_list system.ntp.server='time.windows.com'
add_list system.ntp.server='cn.pool.ntp.org' add_list system.ntp.server='time.cloudflare.com'
EOF EOF
if json_is_a system object; then if json_is_a system object; then

View File

@ -1,6 +1,5 @@
#!/bin/sh #!/usr/bin/awk -f
awk -f - $* <<EOF
function bitcount(c) { function bitcount(c) {
c=and(rshift(c, 1),0x55555555)+and(c,0x55555555) c=and(rshift(c, 1),0x55555555)+and(c,0x55555555)
c=and(rshift(c, 2),0x33333333)+and(c,0x33333333) c=and(rshift(c, 2),0x33333333)+and(c,0x33333333)
@ -11,14 +10,20 @@ function bitcount(c) {
} }
function ip2int(ip) { function ip2int(ip) {
for (ret=0,n=split(ip,a,"\."),x=1;x<=n;x++) ret=or(lshift(ret,8),a[x]) ret=0
n=split(ip,a,"\\.")
for (x=1;x<=n;x++)
ret=or(lshift(ret,8),a[x])
return ret return ret
} }
function int2ip(ip,ret,x) { function int2ip(ip,ret,x) {
ret=and(ip,255) ret=and(ip,255)
ip=rshift(ip,8) ip=rshift(ip,8)
for(;x<3;ret=and(ip,255)"."ret,ip=rshift(ip,8),x++); for(;x<3;x++) {
ret=and(ip,255)"."ret
ip=rshift(ip,8)
}
return ret return ret
} }
@ -44,28 +49,40 @@ BEGIN {
} }
network=and(ipaddr,netmask) network=and(ipaddr,netmask)
prefix=32-bitcount(compl32(netmask))
broadcast=or(network,compl32(netmask)) broadcast=or(network,compl32(netmask))
start=or(network,and(ip2int(ARGV[3]),compl32(netmask)))
limit=network+1
if (start<limit) start=limit
end=start+ARGV[4]
limit=or(network,compl32(netmask))-1
if (end>limit) end=limit
print "IP="int2ip(ipaddr) print "IP="int2ip(ipaddr)
print "NETMASK="int2ip(netmask) print "NETMASK="int2ip(netmask)
print "BROADCAST="int2ip(broadcast) print "BROADCAST="int2ip(broadcast)
print "NETWORK="int2ip(network) print "NETWORK="int2ip(network)
print "PREFIX="32-bitcount(compl32(netmask)) print "PREFIX="prefix
# range calculations: # range calculations:
# ipcalc <ip> <netmask> <start> <num> # ipcalc <ip> <netmask> <start> <num>
if (ARGC > 3) { if (ARGC <= 3)
print "START="int2ip(start) exit(0)
print "END="int2ip(end)
start=or(network,and(ip2int(ARGV[3]),compl32(netmask)))
limit=network+1
if (start<limit) start=limit
if (start==ipaddr) start=ipaddr+1
end=start+ARGV[4]
limit=or(network,compl32(netmask))-1
if (end>limit) end=limit
if (end==ipaddr) end=ipaddr-1
if (start>end) {
print "network ("int2ip(network)"/"prefix") too small" > "/dev/stderr"
exit(1)
} }
if (ipaddr > start && ipaddr < end) {
print "warning: ipaddr inside range - this might not be supported in future releases of Openwrt" > "/dev/stderr"
}
print "START="int2ip(start)
print "END="int2ip(end)
} }
EOF

View File

@ -29,7 +29,7 @@ load_led() {
config_get delay $1 delay "150" config_get delay $1 delay "150"
config_get message $1 message "" config_get message $1 message ""
config_get gpio $1 gpio "0" config_get gpio $1 gpio "0"
config_get inverted $1 inverted "0" config_get_bool inverted $1 inverted "0"
# execute application led trigger # execute application led trigger
[ -f "/usr/libexec/led-trigger/${trigger}" ] && { [ -f "/usr/libexec/led-trigger/${trigger}" ] && {
@ -69,6 +69,10 @@ load_led() {
return 1 return 1
} }
case "$trigger" in case "$trigger" in
"heartbeat")
echo "${inverted}" > "/sys/class/leds/${sysfs}/invert"
;;
"netdev") "netdev")
[ -n "$dev" ] && { [ -n "$dev" ] && {
echo $dev > /sys/class/leds/${sysfs}/device_name echo $dev > /sys/class/leds/${sysfs}/device_name

View File

@ -6,7 +6,7 @@ USE_PROCD=1
validate_system_section() { validate_system_section() {
uci_load_validate system system "$1" "$2" \ uci_load_validate system system "$1" "$2" \
'hostname:string:OpenWrt' \ 'hostname:string:LEDE' \
'conloglevel:uinteger' \ 'conloglevel:uinteger' \
'buffersize:uinteger' \ 'buffersize:uinteger' \
'timezone:string:UTC' \ 'timezone:string:UTC' \

View File

@ -55,7 +55,12 @@ enable() {
enabled() { enabled() {
name="$(basename "${initscript}")" name="$(basename "${initscript}")"
[ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ] name="${name##[SK][0-9][0-9]}"
{
[ -z "${START:-}" ] || [ -L "$IPKG_INSTROOT/etc/rc.d/S${START}$name" ]
} && {
[ -z "${STOP:-}" ] || [ -L "$IPKG_INSTROOT/etc/rc.d/K${STOP}$name" ]
}
} }
depends() { depends() {
@ -100,9 +105,9 @@ service_data() {
} }
service_running() { service_running() {
local service="${1:-$(basename $initscript)}" local instance="${1:-*}"
local instance="${2:-*}"
procd_running "$service" "$instance" "$@" procd_running "$(basename $initscript)" "$instance"
} }
${INIT_TRACE:+set -x} ${INIT_TRACE:+set -x}
@ -121,6 +126,7 @@ extra_command "enabled" "Check if service is started on boot"
extra_command "running" "Check if service is running" extra_command "running" "Check if service is running"
extra_command "status" "Service status" extra_command "status" "Service status"
extra_command "trace" "Start with syscall trace" extra_command "trace" "Start with syscall trace"
extra_command "info" "Dump procd service info"
. $IPKG_INSTROOT/lib/functions/procd.sh . $IPKG_INSTROOT/lib/functions/procd.sh
basescript=$(readlink "$initscript") basescript=$(readlink "$initscript")
@ -144,6 +150,13 @@ extra_command "enabled" "Check if service is started on boot"
start "$@" start "$@"
} }
info() {
json_init
json_add_string name "$(basename ${basescript:-$initscript})"
json_add_boolean verbose "1"
_procd_ubus_call list
}
stop() { stop() {
procd_lock procd_lock
stop_service "$@" stop_service "$@"

View File

@ -8,26 +8,5 @@ alias ll='ls -alF --color=auto'
[ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; } [ -x /usr/bin/arp -o -x /sbin/arp ] || arp() { cat /proc/net/arp; }
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; } [ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
service() {
if [ -f "/etc/init.d/$1" ]; then
/etc/init.d/$@
else
echo "Usage: service <service> [command]"
if [ -n "$1" ]; then
echo "Service "'"'"$1"'"'" not found, the following services are available:"
else
echo "The following services are available:"
fi
for F in /etc/init.d/* ; do
printf "%-30s\t%10s\t%10s\n" "$F" \
$( $($F enabled) && echo "enabled" || echo "disabled" ) \
$( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \
| jsonfilter -q -e "@['$(basename $F)'].instances[*].running" | uniq)" = "true" ] \
&& echo "running" || echo "stopped" )
done;
return 1
fi
}
[ -n "$KSH_VERSION" -o \! -s "$HOME/.shinit" ] || . "$HOME/.shinit" [ -n "$KSH_VERSION" -o \! -s "$HOME/.shinit" ] || . "$HOME/.shinit"
[ -z "$KSH_VERSION" -o \! -s "$HOME/.mkshrc" ] || . "$HOME/.mkshrc" [ -z "$KSH_VERSION" -o \! -s "$HOME/.mkshrc" ] || . "$HOME/.mkshrc"

View File

@ -1 +1,5 @@
# Defaults are configured in /etc/sysctl.d/* and can be customized in this file # Defaults are configured in /etc/sysctl.d/* and can be customized in this file
net.bridge.bridge-nf-call-arptables = 0
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0

View File

@ -9,6 +9,7 @@ fs.protected_hardlinks=1
fs.protected_symlinks=1 fs.protected_symlinks=1
net.core.bpf_jit_enable=1 net.core.bpf_jit_enable=1
net.core.bpf_jit_kallsyms=1
net.ipv4.conf.default.arp_ignore=1 net.ipv4.conf.default.arp_ignore=1
net.ipv4.conf.all.arp_ignore=1 net.ipv4.conf.all.arp_ignore=1

View File

@ -209,10 +209,10 @@ add_group_and_user() {
if [ -n "$rusers" ]; then if [ -n "$rusers" ]; then
local tuple oIFS="$IFS" local tuple oIFS="$IFS"
for tuple in $rusers; do for tuple in $rusers; do
local uid gid uname gname local uid gid uname gname addngroups addngroup addngname addngid
IFS=":" IFS=":"
set -- $tuple; uname="$1"; gname="$2" set -- $tuple; uname="$1"; gname="$2"; addngroups="$3"
IFS="=" IFS="="
set -- $uname; uname="$1"; uid="$2" set -- $uname; uname="$1"; uid="$2"
set -- $gname; gname="$1"; gid="$2" set -- $gname; gname="$1"; gid="$2"
@ -232,7 +232,24 @@ add_group_and_user() {
group_add_user "$gname" "$uname" group_add_user "$gname" "$uname"
fi fi
unset uid gid uname gname if [ -n "$uname" ] && [ -n "$addngroups" ]; then
oIFS="$IFS"
IFS=","
for addngroup in $addngroups ; do
IFS="="
set -- $addngroup; addngname="$1"; addngid="$2"
if [ -n "$addngid" ]; then
group_exists "$addngname" || group_add "$addngname" "$addngid"
else
group_add_next "$addngname"
fi
group_add_user "$addngname" "$uname"
done
IFS="$oIFS"
fi
unset uid gid uname gname addngroups addngroup addngname addngid
done done
fi fi
} }
@ -245,11 +262,6 @@ default_postinst() {
add_group_and_user "${pkgname}" add_group_and_user "${pkgname}"
if [ -f "$root/usr/lib/opkg/info/${pkgname}.postinst-pkg" ]; then
( . "$root/usr/lib/opkg/info/${pkgname}.postinst-pkg" )
ret=$?
fi
if [ -d "$root/rootfs-overlay" ]; then if [ -d "$root/rootfs-overlay" ]; then
cp -R $root/rootfs-overlay/. $root/ cp -R $root/rootfs-overlay/. $root/
rm -fR $root/rootfs-overlay/ rm -fR $root/rootfs-overlay/
@ -275,6 +287,11 @@ default_postinst() {
rm -f /tmp/luci-indexcache rm -f /tmp/luci-indexcache
fi fi
if [ -f "$root/usr/lib/opkg/info/${pkgname}.postinst-pkg" ]; then
( . "$root/usr/lib/opkg/info/${pkgname}.postinst-pkg" )
ret=$?
fi
local shell="$(command -v bash)" local shell="$(command -v bash)"
for i in $(grep -s "^/etc/init.d/" "$root$filelist"); do for i in $(grep -s "^/etc/init.d/" "$root$filelist"); do
if [ -n "$root" ]; then if [ -n "$root" ]; then
@ -354,7 +371,7 @@ group_add_next() {
return return
fi fi
gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group) gids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/group)
gid=65536 gid=32768
while echo "$gids" | grep -q "^$gid$"; do while echo "$gids" | grep -q "^$gid$"; do
gid=$((gid + 1)) gid=$((gid + 1))
done done
@ -369,6 +386,9 @@ group_add_user() {
echo "$grp" | grep -q ":$" && delim="" echo "$grp" | grep -q ":$" && delim=""
[ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd [ -n "$IPKG_INSTROOT" ] || lock /var/lock/passwd
sed -i "s/$grp/$grp$delim$2/g" ${IPKG_INSTROOT}/etc/group sed -i "s/$grp/$grp$delim$2/g" ${IPKG_INSTROOT}/etc/group
if [ -z "$IPKG_INSTROOT" ] && [ -x /usr/sbin/selinuxenabled ] && selinuxenabled; then
restorecon /etc/group
fi
[ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd [ -n "$IPKG_INSTROOT" ] || lock -u /var/lock/passwd
} }
@ -382,7 +402,7 @@ user_add() {
local rc local rc
[ -z "$uid" ] && { [ -z "$uid" ] && {
uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd) uids=$(cut -d: -f3 ${IPKG_INSTROOT}/etc/passwd)
uid=65536 uid=32768
while echo "$uids" | grep -q "^$uid$"; do while echo "$uids" | grep -q "^$uid$"; do
uid=$((uid + 1)) uid=$((uid + 1))
done done

View File

@ -11,6 +11,36 @@ get_dt_led_path() {
echo "$ledpath" echo "$ledpath"
} }
get_dt_led_color_func() {
local enum
local func
local idx
local label
[ -e "$1/function" ] && func=$(cat "$1/function")
[ -e "$1/color" ] && idx=$((0x$(hexdump -n 4 -e '4/1 "%02x"' "$1/color")))
[ -e "$1/function-enumerator" ] && \
enum=$((0x$(hexdump -n 4 -e '4/1 "%02x"' "$1/function-enumerator")))
[ -z "$idx" ] && [ -z "$func" ] && return 2
if [ -n "$idx" ]; then
for color in "white" "red" "green" "blue" "amber" \
"violet" "yellow" "ir" "multicolor" "rgb" \
"purple" "orange" "pink" "cyan" "lime"
do
[ $idx -eq 0 ] && label="$color" && break
idx=$((idx-1))
done
fi
label="$label:$func"
[ -n "$enum" ] && label="$label-$enum"
echo "$label"
return 0
}
get_dt_led() { get_dt_led() {
local label local label
local ledpath=$(get_dt_led_path $1) local ledpath=$(get_dt_led_path $1)
@ -18,6 +48,7 @@ get_dt_led() {
[ -n "$ledpath" ] && \ [ -n "$ledpath" ] && \
label=$(cat "$ledpath/label" 2>/dev/null) || \ label=$(cat "$ledpath/label" 2>/dev/null) || \
label=$(cat "$ledpath/chan-name" 2>/dev/null) || \ label=$(cat "$ledpath/chan-name" 2>/dev/null) || \
label=$(get_dt_led_color_func "$ledpath") || \
label=$(basename "$ledpath") label=$(basename "$ledpath")
echo "$label" echo "$label"

View File

@ -90,6 +90,13 @@ network_get_prefix6() {
__network_ifstatus "$1" "$2" "['ipv6-prefix'][0]['address','mask']" "/" __network_ifstatus "$1" "$2" "['ipv6-prefix'][0]['address','mask']" "/"
} }
# determine first IPv6 prefix assignment of given logical interface
# 1: destination variable
# 2: interface
network_get_prefix_assignment6() {
__network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][0]['address','mask']" "/"
}
# determine all IPv4 addresses of given logical interface # determine all IPv4 addresses of given logical interface
# 1: destination variable # 1: destination variable
# 2: interface # 2: interface
@ -187,6 +194,13 @@ network_get_prefixes6() {
__network_ifstatus "$1" "$2" "['ipv6-prefix'][*]['address','mask']" "/ " __network_ifstatus "$1" "$2" "['ipv6-prefix'][*]['address','mask']" "/ "
} }
# determine all IPv6 prefix assignments of given logical interface
# 1: destination variable
# 2: interface
network_get_prefix_assignments6() {
__network_ifstatus "$1" "$2" "['ipv6-prefix-assignment'][*]['address','mask']" "/ "
}
# determine IPv4 gateway of given logical interface # determine IPv4 gateway of given logical interface
# 1: destination variable # 1: destination variable
# 2: interface # 2: interface

View File

@ -61,11 +61,21 @@ find_mtd_chardev() {
echo "${INDEX:+$PREFIX$INDEX}" echo "${INDEX:+$PREFIX$INDEX}"
} }
get_mac_ascii() {
local part="$1"
local key="$2"
local mac_dirty
mac_dirty=$(strings "$part" | sed -n 's/^'"$key"'=//p')
# "canonicalize" mac
[ -n "$mac_dirty" ] && macaddr_canonicalize "$mac_dirty"
}
mtd_get_mac_ascii() { mtd_get_mac_ascii() {
local mtdname="$1" local mtdname="$1"
local key="$2" local key="$2"
local part local part
local mac_dirty
part=$(find_mtd_part "$mtdname") part=$(find_mtd_part "$mtdname")
if [ -z "$part" ]; then if [ -z "$part" ]; then
@ -73,35 +83,75 @@ mtd_get_mac_ascii() {
return return
fi fi
mac_dirty=$(strings "$part" | sed -n 's/^'"$key"'=//p') get_mac_ascii "$part" "$key"
# "canonicalize" mac
[ -n "$mac_dirty" ] && macaddr_canonicalize "$mac_dirty"
} }
mtd_get_mac_ascii_mmc() { mtd_get_mac_encrypted_arcadyan() {
local mtdname="$1" local iv="00000000000000000000000000000000"
local key="$2" local key="2A4B303D7644395C3B2B7053553C5200"
local part
local mac_dirty local mac_dirty
local mtdname="$1"
local part
local size
part=$(find_mmc_part "$mtdname") part=$(find_mtd_part "$mtdname")
if [ -z "$part" ]; then if [ -z "$part" ]; then
echo "mtd_get_mac_ascii: partition $mtdname not found!" >&2 echo "mtd_get_mac_encrypted_arcadyan: partition $mtdname not found!" >&2
return return
fi fi
mac_dirty=$(strings "$part" | sed -n 's/^'"$key"'=//p') # Config decryption and getting mac. Trying uencrypt and openssl utils.
size=$((0x$(dd if=$part skip=9 bs=1 count=4 2>/dev/null | hexdump -v -e '1/4 "%08x"')))
if [[ -f "/usr/bin/uencrypt" ]]; then
mac_dirty=$(dd if=$part bs=1 count=$size skip=$((0x100)) 2>/dev/null | \
uencrypt -d -n -k $key -i $iv | grep mac | cut -c 5-)
elif [[ -f "/usr/bin/openssl" ]]; then
mac_dirty=$(dd if=$part bs=1 count=$size skip=$((0x100)) 2>/dev/null | \
openssl aes-128-cbc -d -nopad -K $key -iv $iv | grep mac | cut -c 5-)
else
echo "mtd_get_mac_encrypted_arcadyan: Neither uencrypt nor openssl was found!" >&2
return
fi
# "canonicalize" mac # "canonicalize" mac
[ -n "$mac_dirty" ] && macaddr_canonicalize "$mac_dirty" [ -n "$mac_dirty" ] && macaddr_canonicalize "$mac_dirty"
} }
mtd_get_mac_encrypted_deco() {
local mtdname="$1"
if ! [ -e "$mtdname" ]; then
echo "mtd_get_mac_encrypted_deco: file $mtdname not found!" >&2
return
fi
tplink_key="3336303032384339"
key=$(dd if=$mtdname bs=1 skip=16 count=8 2>/dev/null | \
uencrypt -n -d -k $tplink_key -c des-ecb | hexdump -v -n 8 -e '1/1 "%02x"')
macaddr=$(dd if=$mtdname bs=1 skip=32 count=8 2>/dev/null | \
uencrypt -n -d -k $key -c des-ecb | hexdump -v -n 6 -e '5/1 "%02x:" 1/1 "%02x"')
echo $macaddr
}
mtd_get_mac_uci_config_ubi() {
local volumename="$1"
. /lib/upgrade/nand.sh
local ubidev=$(nand_attach_ubi $CI_UBIPART)
local part=$(nand_find_volume $ubidev $volumename)
cat "/dev/$part" | sed -n 's/^\s*option macaddr\s*'"'"'\?\([0-9A-F:]\+\)'"'"'\?/\1/Ip'
}
mtd_get_mac_text() { mtd_get_mac_text() {
local mtdname=$1 local mtdname="$1"
local offset=$(($2)) local offset=$((${2:-0}))
local length="${3:-17}"
local part local part
local mac_dirty
part=$(find_mtd_part "$mtdname") part=$(find_mtd_part "$mtdname")
if [ -z "$part" ]; then if [ -z "$part" ]; then
@ -109,15 +159,9 @@ mtd_get_mac_text() {
return return
fi fi
if [ -z "$offset" ]; then [ $((offset + length)) -le $(mtd_get_part_size "$mtdname") ] || return
echo "mtd_get_mac_text: offset missing!" >&2
return
fi
mac_dirty=$(dd if="$part" bs=1 skip="$offset" count=17 2>/dev/null) macaddr_canonicalize $(dd bs=1 if="$part" skip="$offset" count="$length" 2>/dev/null)
# "canonicalize" mac
[ -n "$mac_dirty" ] && macaddr_canonicalize "$mac_dirty"
} }
mtd_get_mac_binary() { mtd_get_mac_binary() {
@ -141,15 +185,6 @@ mtd_get_mac_binary_ubi() {
get_mac_binary "/dev/$part" "$offset" get_mac_binary "/dev/$part" "$offset"
} }
mtd_get_mac_binary_mmc() {
local mtdname="$1"
local offset="$2"
local part
part=$(find_mmc_part "$mtdname")
get_mac_binary "$part" "$offset"
}
mtd_get_part_size() { mtd_get_part_size() {
local part_name=$1 local part_name=$1
local first dev size erasesize name local first dev size erasesize name
@ -162,6 +197,29 @@ mtd_get_part_size() {
done < /proc/mtd done < /proc/mtd
} }
mmc_get_mac_ascii() {
local part_name="$1"
local key="$2"
local part
part=$(find_mmc_part "$part_name")
if [ -z "$part" ]; then
echo "mmc_get_mac_ascii: partition $part_name not found!" >&2
return
fi
get_mac_ascii "$part" "$key"
}
mmc_get_mac_binary() {
local part_name="$1"
local offset="$2"
local part
part=$(find_mmc_part "$part_name")
get_mac_binary "$part" "$offset"
}
macaddr_add() { macaddr_add() {
local mac=$1 local mac=$1
local val=$2 local val=$2
@ -172,6 +230,14 @@ macaddr_add() {
echo $oui:$nic echo $oui:$nic
} }
macaddr_generate_from_mmc_cid() {
local mmc_dev=$1
local sd_hash=$(sha256sum /sys/class/block/$mmc_dev/device/cid)
local mac_base=$(macaddr_canonicalize "$(echo "${sd_hash}" | dd bs=1 count=12 2>/dev/null)")
echo "$(macaddr_unsetbit_mc "$(macaddr_setbit_la "${mac_base}")")"
}
macaddr_geteui() { macaddr_geteui() {
local mac=$1 local mac=$1
local sep=$2 local sep=$2

View File

@ -418,6 +418,15 @@ ucidef_set_led_default() {
json_select .. json_select ..
} }
ucidef_set_led_heartbeat() {
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string trigger heartbeat
json_select ..
json_select ..
}
ucidef_set_led_gpio() { ucidef_set_led_gpio() {
local gpio="$4" local gpio="$4"
local inverted="$5" local inverted="$5"

View File

@ -18,6 +18,9 @@ preinit_ip_config() {
fi fi
ip link set dev $netdev up ip link set dev $netdev up
if [ -n "$vid" ]; then
ip link set dev $1 up
fi
ip -4 address add $pi_ip/$pi_netmask broadcast $pi_broadcast dev $1 ip -4 address add $pi_ip/$pi_netmask broadcast $pi_broadcast dev $1
} }
@ -91,6 +94,8 @@ preinit_config_board() {
else else
# trim any vlan ids # trim any vlan ids
ifname=${ifname%\.*} ifname=${ifname%\.*}
# trim any vlan modifiers like :t
ifname=${ifname%\:*}
fi fi
pi_ifname=$ifname pi_ifname=$ifname

View File

@ -40,35 +40,39 @@ fs_wait_for_key () {
rm -f $keypress_wait rm -f $keypress_wait
} & } &
[ "$pi_preinit_no_failsafe" != "y" ] && echo "Press the [$1] key and hit [enter] $2" local consoles="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | sed -e 's/^console=//' -e 's/,.*//')"
echo "Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level" [ -n "$consoles" ] || consoles=console
# if we're on the console we wait for input for console in $consoles; do
{ [ -c "/dev/$console" ] || continue
while [ -r $keypress_wait ]; do [ "$pi_preinit_no_failsafe" != "y" ] && echo "Press the [$1] key and hit [enter] $2" > "/dev/$console"
timer="$(cat $keypress_sec)" echo "Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level" > "/dev/$console"
{
while [ -r $keypress_wait ]; do
timer="$(cat $keypress_sec)"
[ -n "$timer" ] || timer=1 [ -n "$timer" ] || timer=1
timer="${timer%%\ *}" timer="${timer%%\ *}"
[ $timer -ge 1 ] || timer=1 [ $timer -ge 1 ] || timer=1
do_keypress="" do_keypress=""
{ {
read -t "$timer" do_keypress read -t "$timer" do_keypress < "/dev/$console"
case "$do_keypress" in case "$do_keypress" in
$1) $1)
echo "true" >$keypress_true echo "true" >$keypress_true
;; ;;
1 | 2 | 3 | 4) 1 | 2 | 3 | 4)
echo "$do_keypress" >/tmp/debug_level echo "$do_keypress" >/tmp/debug_level
;; ;;
*) *)
continue; continue;
;; ;;
esac esac
lock -u $keypress_wait lock -u $keypress_wait
rm -f $keypress_wait rm -f $keypress_wait
} }
done done
} } &
done
lock -w $keypress_wait lock -w $keypress_wait
keypressed=1 keypressed=1

View File

@ -9,7 +9,7 @@ missing_lines() {
IFS=":" IFS=":"
while read line; do while read line; do
set -- $line set -- $line
grep -q "^$1:" "$file2" || echo "$*" grep -q "^$1:" "$file2" || echo "$line"
done < "$file1" done < "$file1"
IFS="$oIFS" IFS="$oIFS"
} }
@ -17,10 +17,7 @@ missing_lines() {
do_mount_root() { do_mount_root() {
mount_root mount_root
boot_run_hook preinit_mount_root boot_run_hook preinit_mount_root
have_ro_ext4=$(/bin/cat /proc/mounts |/bin/grep ' / ext4'|/bin/grep 'ro'|/usr/bin/wc -l) [ ! -f /etc/bench.log ] && touch /etc/bench.log
if [ "$have_ro_ext4" != "0" ]; then
/usr/bin/mount -o remount,rw,noatime /
fi
[ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && { [ -f /sysupgrade.tgz -o -f /tmp/sysupgrade.tar ] && {
echo "- config restore -" echo "- config restore -"
cp /etc/passwd /etc/group /etc/shadow /tmp cp /etc/passwd /etc/group /etc/shadow /tmp

View File

@ -2,13 +2,14 @@
# Copyright (C) 2010 Vertical Communications # Copyright (C) 2010 Vertical Communications
failsafe_shell() { failsafe_shell() {
local console="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | head -1 | sed -e 's/^console=//' -e 's/,.*//')" local consoles="$(sed -e 's/ /\n/g' /proc/cmdline | grep '^console=' | sed -e 's/^console=//' -e 's/,.*//')"
[ -n "$console" ] || console=console [ -n "$consoles" ] || consoles=console
[ -c "/dev/$console" ] || return 0 for console in $consoles; do
while true; do [ -c "/dev/$console" ] && while true; do
ash --login <"/dev/$console" >"/dev/$console" 2>"/dev/$console" ash --login <"/dev/$console" >"/dev/$console" 2>"/dev/$console"
sleep 1 sleep 1
done & done &
done
} }
boot_hook_add failsafe failsafe_shell boot_hook_add failsafe failsafe_shell

View File

@ -165,6 +165,23 @@ part_magic_fat() {
[ "$magic" = "FAT" ] || [ "$magic_fat32" = "FAT32" ] [ "$magic" = "FAT" ] || [ "$magic_fat32" = "FAT32" ]
} }
fitblk_get_bootdev() {
[ -e /sys/firmware/devicetree/base/chosen/rootdisk ] || return
local rootdisk="$(cat /sys/firmware/devicetree/base/chosen/rootdisk)"
local handle bootdev
for handle in /sys/class/block/*/of_node/phandle /sys/class/block/*/device/of_node/phandle; do
[ ! -e "$handle" ] && continue
if [ "$rootdisk" = "$(cat $handle)" ]; then
bootdev="${handle%/of_node/phandle}"
bootdev="${bootdev%/device}"
bootdev="${bootdev#/sys/class/block/}"
echo "$bootdev"
break
fi
done
}
export_bootdevice() { export_bootdevice() {
local cmdline uuid blockdev uevent line class local cmdline uuid blockdev uevent line class
local MAJOR MINOR DEVNAME DEVTYPE local MAJOR MINOR DEVNAME DEVTYPE
@ -196,6 +213,7 @@ export_bootdevice() {
done done
;; ;;
/dev/*) /dev/*)
[ "$rootpart" = "/dev/fit0" ] && rootpart="$(fitblk_get_bootdev)"
uevent="/sys/class/block/${rootpart##*/}/../uevent" uevent="/sys/class/block/${rootpart##*/}/../uevent"
;; ;;
0x[a-f0-9][a-f0-9][a-f0-9] | 0x[a-f0-9][a-f0-9][a-f0-9][a-f0-9] | \ 0x[a-f0-9][a-f0-9][a-f0-9] | 0x[a-f0-9][a-f0-9][a-f0-9][a-f0-9] | \

View File

@ -19,8 +19,11 @@ emmc_upgrade_tar() {
[ "$has_kernel" = 1 -a "$EMMC_KERN_DEV" ] && [ "$has_kernel" = 1 -a "$EMMC_KERN_DEV" ] &&
export EMMC_KERNEL_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/kernel -O | dd of="$EMMC_KERN_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) export EMMC_KERNEL_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/kernel -O | dd of="$EMMC_KERN_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1)))
[ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] && [ "$has_rootfs" = 1 -a "$EMMC_ROOT_DEV" ] && {
export EMMC_ROOTFS_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/root -O | dd of="$EMMC_ROOT_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1))) export EMMC_ROOTFS_BLOCKS=$(($(tar xf "$tar_file" ${board_dir}/root -O | dd of="$EMMC_ROOT_DEV" bs=512 2>&1 | grep "records out" | cut -d' ' -f1)))
# Account for 64KiB ROOTDEV_OVERLAY_ALIGN in libfstools
EMMC_ROOTFS_BLOCKS=$(((EMMC_ROOTFS_BLOCKS + 127) & ~127))
}
if [ -z "$UPGRADE_BACKUP" ]; then if [ -z "$UPGRADE_BACKUP" ]; then
if [ "$EMMC_DATA_DEV" ]; then if [ "$EMMC_DATA_DEV" ]; then
@ -55,7 +58,7 @@ emmc_copy_config() {
} }
emmc_do_upgrade() { emmc_do_upgrade() {
local file_type=$(identify $1) local file_type=$(identify_magic_long "$(get_magic_long "$1")")
case "$file_type" in case "$file_type" in
"fit") emmc_upgrade_fit $1;; "fit") emmc_upgrade_fit $1;;

View File

@ -71,6 +71,7 @@ fwtool_check_image() {
# minor compat version -> sysupgrade with -n required # minor compat version -> sysupgrade with -n required
if [ "${devicecompat#.*}" != "${imagecompat#.*}" ] && [ "$SAVE_CONFIG" = "1" ]; then if [ "${devicecompat#.*}" != "${imagecompat#.*}" ] && [ "$SAVE_CONFIG" = "1" ]; then
[ "$IGNORE_MINOR_COMPAT" = 1 ] && return 0
v "The device is supported, but the config is incompatible to the new image ($devicecompat->$imagecompat). Please upgrade without keeping config (sysupgrade -n)." v "The device is supported, but the config is incompatible to the new image ($devicecompat->$imagecompat). Please upgrade without keeping config (sysupgrade -n)."
[ -n "$compatmessage" ] && v "$compatmessage" [ -n "$compatmessage" ] && v "$compatmessage"
return 1 return 1

View File

@ -0,0 +1,91 @@
legacy_sdcard_check_image() {
local file="$1"
local diskdev partdev diff
export_bootdevice && export_partdevice diskdev 0 || {
v "Unable to determine upgrade device"
return 1
}
get_partitions "/dev/$diskdev" bootdisk
v "Extract boot sector from the image"
get_image_dd "$1" of=/tmp/image.bs count=1 bs=512b
get_partitions /tmp/image.bs image
#compare tables
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
rm -f /tmp/image.bs /tmp/partmap.bootdisk /tmp/partmap.image
if [ -n "$diff" ]; then
v "Partition layout has changed. Full image will be written."
ask_bool 0 "Abort" && exit 1
return 0
fi
}
legacy_sdcard_do_upgrade() {
local board=$(board_name)
local diskdev partdev diff
export_bootdevice && export_partdevice diskdev 0 || {
v "Unable to determine upgrade device"
return 1
}
sync
if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then
get_partitions "/dev/$diskdev" bootdisk
v "Extract boot sector from the image"
get_image_dd "$1" of=/tmp/image.bs count=1 bs=512b
get_partitions /tmp/image.bs image
#compare tables
diff="$(grep -F -x -v -f /tmp/partmap.bootdisk /tmp/partmap.image)"
else
diff=1
fi
if [ -n "$diff" ]; then
get_image_dd "$1" of="/dev/$diskdev" bs=4096 conv=fsync
# Separate removal and addtion is necessary; otherwise, partition 1
# will be missing if it overlaps with the old partition 2
partx -d - "/dev/$diskdev"
partx -a - "/dev/$diskdev"
else
v "Writing bootloader to /dev/$diskdev"
get_image_dd "$1" of="$diskdev" bs=512 skip=1 seek=1 count=2048 conv=fsync
#iterate over each partition from the image and write it to the boot disk
while read part start size; do
if export_partdevice partdev $part; then
v "Writing image to /dev/$partdev..."
get_image_dd "$1" of="/dev/$partdev" ibs="512" obs=1M skip="$start" count="$size" conv=fsync
else
v "Unable to find partition $part device, skipped."
fi
done < /tmp/partmap.image
v "Writing new UUID to /dev/$diskdev..."
get_image_dd "$1" of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
fi
sleep 1
}
legacy_sdcard_copy_config() {
local partdev
if export_partdevice partdev 1; then
mkdir -p /boot
[ -f /boot/kernel.img ] || mount -o rw,noatime /dev/$partdev /boot
cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE"
sync
umount /boot
fi
}

View File

@ -7,6 +7,8 @@
CI_KERNPART="${CI_KERNPART:-kernel}" CI_KERNPART="${CI_KERNPART:-kernel}"
# 'ubi' partition on NAND contains UBI # 'ubi' partition on NAND contains UBI
# There are also CI_KERN_UBIPART and CI_ROOT_UBIPART if kernel
# and rootfs are on separated UBIs.
CI_UBIPART="${CI_UBIPART:-ubi}" CI_UBIPART="${CI_UBIPART:-ubi}"
# 'rootfs' UBI volume on NAND contains the rootfs # 'rootfs' UBI volume on NAND contains the rootfs
@ -26,7 +28,7 @@ ubi_mknod() {
nand_find_volume() { nand_find_volume() {
local ubidevdir ubivoldir local ubidevdir ubivoldir
ubidevdir="/sys/devices/virtual/ubi/$1" ubidevdir="/sys/class/ubi/"
[ ! -d "$ubidevdir" ] && return 1 [ ! -d "$ubidevdir" ] && return 1
for ubivoldir in $ubidevdir/${1}_*; do for ubivoldir in $ubidevdir/${1}_*; do
[ ! -d "$ubivoldir" ] && continue [ ! -d "$ubivoldir" ] && continue
@ -39,13 +41,12 @@ nand_find_volume() {
} }
nand_find_ubi() { nand_find_ubi() {
local ubidevdir ubidev mtdnum local ubidevdir ubidev mtdnum cmtdnum
mtdnum="$( find_mtd_index $1 )" mtdnum="$( find_mtd_index $1 )"
[ ! "$mtdnum" ] && return 1 [ ! "$mtdnum" ] && return 1
for ubidevdir in /sys/devices/virtual/ubi/ubi*; do for ubidevdir in /sys/class/ubi/ubi*; do
[ ! -d "$ubidevdir" ] && continue [ ! -e "$ubidevdir/mtd_num" ] && continue
cmtdnum="$( cat $ubidevdir/mtd_num )" cmtdnum="$( cat $ubidevdir/mtd_num )"
[ ! "$mtdnum" ] && continue
if [ "$mtdnum" = "$cmtdnum" ]; then if [ "$mtdnum" = "$cmtdnum" ]; then
ubidev=$( basename $ubidevdir ) ubidev=$( basename $ubidevdir )
ubi_mknod "$ubidevdir" ubi_mknod "$ubidevdir"
@ -56,128 +57,175 @@ nand_find_ubi() {
} }
nand_get_magic_long() { nand_get_magic_long() {
dd if="$1" skip=$2 bs=4 count=1 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"' (${3}cat "$1" | dd bs=4 "skip=${2:-0}" count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null
} }
get_magic_long_tar() { get_magic_long_tar() {
( tar xf $1 $2 -O | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null (tar xO${3}f "$1" "$2" | dd bs=4 count=1 | hexdump -v -n 4 -e '1/1 "%02x"') 2> /dev/null
} }
identify_magic() {
local magic=$1
case "$magic" in
"55424923")
echo "ubi"
;;
"31181006")
echo "ubifs"
;;
"68737173")
echo "squashfs"
;;
"d00dfeed")
echo "fit"
;;
"4349"*)
echo "combined"
;;
*)
echo "unknown $magic"
;;
esac
}
identify() { identify() {
identify_magic $(nand_get_magic_long "$1" "${2:-0}") identify_magic_long $(nand_get_magic_long "$@")
} }
identify_tar() { identify_tar() {
identify_magic $(get_magic_long_tar "$1" "$2") identify_magic_long $(get_magic_long_tar "$@")
}
identify_if_gzip() {
if [ "$(identify "$1")" = gzip ]; then echo -n z; fi
} }
nand_restore_config() { nand_restore_config() {
sync local ubidev=$( nand_find_ubi "${CI_ROOT_UBIPART:-$CI_UBIPART}" )
local ubidev=$( nand_find_ubi $CI_UBIPART )
local ubivol="$( nand_find_volume $ubidev rootfs_data )" local ubivol="$( nand_find_volume $ubidev rootfs_data )"
[ ! "$ubivol" ] && if [ ! "$ubivol" ]; then
ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )" ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )"
if [ ! "$ubivol" ]; then
echo "cannot find ubifs data volume"
return 1
fi
fi
mkdir /tmp/new_root mkdir /tmp/new_root
if ! mount -t ubifs /dev/$ubivol /tmp/new_root; then if ! mount -t ubifs /dev/$ubivol /tmp/new_root; then
echo "mounting ubifs $ubivol failed" echo "cannot mount ubifs volume $ubivol"
rmdir /tmp/new_root rmdir /tmp/new_root
return 1 return 1
fi fi
mv "$1" "/tmp/new_root/$BACKUP_FILE" if mv "$1" "/tmp/new_root/$BACKUP_FILE"; then
umount /tmp/new_root if umount /tmp/new_root; then
sync echo "configuration saved"
rmdir /tmp/new_root
return 0
fi
else
umount /tmp/new_root
fi
echo "could not save configuration to ubifs volume $ubivol"
rmdir /tmp/new_root rmdir /tmp/new_root
return 1
}
nand_remove_ubiblock() {
local ubivol="$1"
local ubiblk="ubiblock${ubivol:3}"
if [ -e "/dev/$ubiblk" ]; then
umount "/dev/$ubiblk" && echo "unmounted /dev/$ubiblk" || :
if ! ubiblock -r "/dev/$ubivol"; then
echo "cannot remove $ubiblk"
return 1
fi
fi
}
nand_attach_ubi() {
local ubipart="$1"
local has_env="${2:-0}"
local mtdnum="$( find_mtd_index "$ubipart" )"
if [ ! "$mtdnum" ]; then
>&2 echo "cannot find ubi mtd partition $ubipart"
return 1
fi
local ubidev="$( nand_find_ubi "$ubipart" )"
if [ ! "$ubidev" ]; then
>&2 ubiattach -m "$mtdnum"
ubidev="$( nand_find_ubi "$ubipart" )"
if [ ! "$ubidev" ]; then
>&2 ubiformat /dev/mtd$mtdnum -y
>&2 ubiattach -m "$mtdnum"
ubidev="$( nand_find_ubi "$ubipart" )"
if [ ! "$ubidev" ]; then
>&2 echo "cannot attach ubi mtd partition $ubipart"
return 1
fi
if [ "$has_env" -gt 0 ]; then
>&2 ubimkvol /dev/$ubidev -n 0 -N ubootenv -s 1MiB
>&2 ubimkvol /dev/$ubidev -n 1 -N ubootenv2 -s 1MiB
fi
fi
fi
echo "$ubidev"
return 0
}
nand_detach_ubi() {
local ubipart="$1"
local mtdnum="$( find_mtd_index "$ubipart" )"
if [ ! "$mtdnum" ]; then
echo "cannot find ubi mtd partition $ubipart"
return 1
fi
local ubidev="$( nand_find_ubi "$ubipart" )"
if [ "$ubidev" ]; then
for ubivol in $(find /dev -name "${ubidev}_*" -maxdepth 1 | sort); do
ubivol="${ubivol:5}"
nand_remove_ubiblock "$ubivol" || :
umount "/dev/$ubivol" && echo "unmounted /dev/$ubivol" || :
done
if ! ubidetach -m "$mtdnum"; then
echo "cannot detach ubi mtd partition $ubipart"
return 1
fi
fi
} }
nand_upgrade_prepare_ubi() { nand_upgrade_prepare_ubi() {
local rootfs_length="$1" local rootfs_length="$1"
local rootfs_type="$2" local rootfs_type="$2"
local rootfs_data_max="$(fw_printenv -n rootfs_data_max 2>/dev/null)" local rootfs_data_max="$(fw_printenv -n rootfs_data_max 2> /dev/null)"
[ -n "$rootfs_data_max" ] && rootfs_data_max=$((rootfs_data_max)) [ -n "$rootfs_data_max" ] && rootfs_data_max=$((rootfs_data_max))
local kernel_length="$3" local kernel_length="$3"
local has_env="${4:-0}" local has_env="${4:-0}"
local kern_ubidev
local root_ubidev
[ -n "$rootfs_length" -o -n "$kernel_length" ] || return 1 [ -n "$rootfs_length" -o -n "$kernel_length" ] || return 1
local mtdnum="$( find_mtd_index "$CI_UBIPART" )" if [ -n "$CI_KERN_UBIPART" -a -n "$CI_ROOT_UBIPART" ]; then
if [ ! "$mtdnum" ]; then kern_ubidev="$( nand_attach_ubi "$CI_KERN_UBIPART" "$has_env" )"
echo "cannot find ubi mtd partition $CI_UBIPART" [ -n "$kern_ubidev" ] || return 1
return 1 root_ubidev="$( nand_attach_ubi "$CI_ROOT_UBIPART" )"
[ -n "$root_ubidev" ] || return 1
else
kern_ubidev="$( nand_attach_ubi "$CI_UBIPART" "$has_env" )"
[ -n "$kern_ubidev" ] || return 1
root_ubidev="$kern_ubidev"
fi fi
local ubidev="$( nand_find_ubi "$CI_UBIPART" )" local kern_ubivol="$( nand_find_volume $kern_ubidev "$CI_KERNPART" )"
if [ ! "$ubidev" ]; then local root_ubivol="$( nand_find_volume $root_ubidev "$CI_ROOTPART" )"
ubiattach -m "$mtdnum" local data_ubivol="$( nand_find_volume $root_ubidev rootfs_data )"
sync [ "$root_ubivol" = "$kern_ubivol" ] && root_ubivol=
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
fi
if [ ! "$ubidev" ]; then # remove ubiblocks
ubiformat /dev/mtd$mtdnum -y [ "$kern_ubivol" ] && { nand_remove_ubiblock $kern_ubivol || return 1; }
ubiattach -m "$mtdnum" [ "$root_ubivol" ] && { nand_remove_ubiblock $root_ubivol || return 1; }
sync [ "$data_ubivol" ] && { nand_remove_ubiblock $data_ubivol || return 1; }
ubidev="$( nand_find_ubi "$CI_UBIPART" )"
[ "$has_env" -gt 0 ] && {
ubimkvol /dev/$ubidev -n 0 -N ubootenv -s 1MiB
ubimkvol /dev/$ubidev -n 1 -N ubootenv2 -s 1MiB
}
fi
local kern_ubivol="$( nand_find_volume $ubidev $CI_KERNPART )"
local root_ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )"
local data_ubivol="$( nand_find_volume $ubidev rootfs_data )"
local ubiblk ubiblkvol
for ubiblk in /dev/ubiblock*_? ; do
[ -e "$ubiblk" ] || continue
echo "removing ubiblock${ubiblk:13}"
ubiblkvol=ubi${ubiblk:13}
if ! ubiblock -r /dev/$ubiblkvol; then
echo "cannot remove $ubiblk"
return 1
fi
done
# kill volumes # kill volumes
[ "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N $CI_KERNPART || true [ "$kern_ubivol" ] && ubirmvol /dev/$kern_ubidev -N "$CI_KERNPART" || :
[ "$root_ubivol" -a "$root_ubivol" != "$kern_ubivol" ] && ubirmvol /dev/$ubidev -N $CI_ROOTPART || true [ "$root_ubivol" ] && ubirmvol /dev/$root_ubidev -N "$CI_ROOTPART" || :
[ "$data_ubivol" ] && ubirmvol /dev/$ubidev -N rootfs_data || true [ "$data_ubivol" ] && ubirmvol /dev/$root_ubidev -N rootfs_data || :
# update kernel # create kernel vol
if [ -n "$kernel_length" ]; then if [ -n "$kernel_length" ]; then
if ! ubimkvol /dev/$ubidev -N $CI_KERNPART -s $kernel_length; then if ! ubimkvol /dev/$kern_ubidev -N "$CI_KERNPART" -s $kernel_length; then
echo "cannot create kernel volume" echo "cannot create kernel volume"
return 1; return 1;
fi fi
fi fi
# update rootfs # create rootfs vol
if [ -n "$rootfs_length" ]; then if [ -n "$rootfs_length" ]; then
local rootfs_size_param local rootfs_size_param
if [ "$rootfs_type" = "ubifs" ]; then if [ "$rootfs_type" = "ubifs" ]; then
@ -185,157 +233,224 @@ nand_upgrade_prepare_ubi() {
else else
rootfs_size_param="-s $rootfs_length" rootfs_size_param="-s $rootfs_length"
fi fi
if ! ubimkvol /dev/$ubidev -N $CI_ROOTPART $rootfs_size_param; then if ! ubimkvol /dev/$root_ubidev -N "$CI_ROOTPART" $rootfs_size_param; then
echo "cannot create rootfs volume" echo "cannot create rootfs volume"
return 1; return 1;
fi fi
fi fi
# create rootfs_data for non-ubifs rootfs # create rootfs_data vol for non-ubifs rootfs
if [ "$rootfs_type" != "ubifs" ]; then if [ "$rootfs_type" != "ubifs" ]; then
local availeb=$(cat /sys/devices/virtual/ubi/$ubidev/avail_eraseblocks)
local ebsize=$(cat /sys/devices/virtual/ubi/$ubidev/eraseblock_size)
local avail_size=$((availeb * ebsize))
local rootfs_data_size_param="-m" local rootfs_data_size_param="-m"
if [ -n "$rootfs_data_max" ] && if [ -n "$rootfs_data_max" ]; then
[ "$rootfs_data_max" != "0" ] &&
[ "$rootfs_data_max" -le "$avail_size" ]; then
rootfs_data_size_param="-s $rootfs_data_max" rootfs_data_size_param="-s $rootfs_data_max"
fi fi
if ! ubimkvol /dev/$ubidev -N rootfs_data $rootfs_data_size_param; then if ! ubimkvol /dev/$root_ubidev -N rootfs_data $rootfs_data_size_param; then
echo "cannot initialize rootfs_data volume" if ! ubimkvol /dev/$root_ubidev -N rootfs_data -m; then
return 1 echo "cannot initialize rootfs_data volume"
return 1
fi
fi fi
fi fi
sync
return 0 return 0
} }
nand_do_upgrade_success() { # Write the UBI image to MTD ubi partition
local conf_tar="/tmp/sysupgrade.tgz"
sync
[ -f "$conf_tar" ] && nand_restore_config "$conf_tar"
echo "sysupgrade successful"
umount -a
reboot -f
}
# Flash the UBI image to MTD partition
nand_upgrade_ubinized() { nand_upgrade_ubinized() {
local ubi_file="$1" local ubi_file="$1"
local mtdnum="$(find_mtd_index "$CI_UBIPART")" local gz="$2"
[ ! "$mtdnum" ] && { local ubi_length=$( (${gz}cat "$ubi_file" | wc -c) 2> /dev/null)
CI_UBIPART="rootfs"
mtdnum="$(find_mtd_index "$CI_UBIPART")"
}
if [ ! "$mtdnum" ]; then nand_detach_ubi "$CI_UBIPART" || return 1
echo "cannot find mtd device $CI_UBIPART"
umount -a
reboot -f
fi
local mtddev="/dev/mtd${mtdnum}" local mtdnum="$( find_mtd_index "$CI_UBIPART" )"
ubidetach -p "${mtddev}" || true ${gz}cat "$ubi_file" | ubiformat "/dev/mtd$mtdnum" -S "$ubi_length" -y -f - && ubiattach -m "$mtdnum"
sync
ubiformat "${mtddev}" -y -f "${ubi_file}"
ubiattach -p "${mtddev}"
nand_do_upgrade_success
} }
# Write the UBIFS image to UBI volume # Write the UBIFS image to UBI rootfs volume
nand_upgrade_ubifs() { nand_upgrade_ubifs() {
local rootfs_length=$( (cat $1 | wc -c) 2> /dev/null) local ubifs_file="$1"
local gz="$2"
nand_upgrade_prepare_ubi "$rootfs_length" "ubifs" "" "" local ubifs_length=$( (${gz}cat "$ubifs_file" | wc -c) 2> /dev/null)
nand_upgrade_prepare_ubi "$ubifs_length" "ubifs" "" "" || return 1
local ubidev="$( nand_find_ubi "$CI_UBIPART" )" local ubidev="$( nand_find_ubi "$CI_UBIPART" )"
local root_ubivol="$(nand_find_volume $ubidev $CI_ROOTPART)" local root_ubivol="$(nand_find_volume $ubidev "$CI_ROOTPART")"
ubiupdatevol /dev/$root_ubivol -s $rootfs_length $1 ${gz}cat "$ubifs_file" | ubiupdatevol /dev/$root_ubivol -s "$ubifs_length" -
nand_do_upgrade_success
} }
# Write the FIT image to UBI kernel volume
nand_upgrade_fit() { nand_upgrade_fit() {
local fit_file="$1" local fit_file="$1"
local fit_length="$(wc -c < "$fit_file")" local gz="$2"
nand_upgrade_prepare_ubi "" "" "$fit_length" "1" local fit_length=$( (${gz}cat "$fit_file" | wc -c) 2> /dev/null)
nand_upgrade_prepare_ubi "" "" "$fit_length" "1" || return 1
local fit_ubidev="$(nand_find_ubi "$CI_UBIPART")" local fit_ubidev="$(nand_find_ubi "$CI_UBIPART")"
local fit_ubivol="$(nand_find_volume $fit_ubidev "$CI_KERNPART")" local fit_ubivol="$(nand_find_volume $fit_ubidev "$CI_KERNPART")"
ubiupdatevol /dev/$fit_ubivol -s $fit_length $fit_file ${gz}cat "$fit_file" | ubiupdatevol /dev/$fit_ubivol -s "$fit_length" -
nand_do_upgrade_success
} }
# Write images in the TAR file to MTD partitions and/or UBI volumes as required
nand_upgrade_tar() { nand_upgrade_tar() {
local tar_file="$1" local tar_file="$1"
local kernel_mtd="$(find_mtd_index $CI_KERNPART)" local gz="$2"
local jffs2_markers="${CI_JFFS2_CLEAN_MARKERS:-0}"
local board_dir=$(tar tf "$tar_file" | grep -m 1 '^sysupgrade-.*/$') # WARNING: This fails if tar contains more than one 'sysupgrade-*' directory.
board_dir=${board_dir%/} local board_dir="$(tar t${gz}f "$tar_file" | grep -m 1 '^sysupgrade-.*/$')"
board_dir="${board_dir%/}"
kernel_length=$( (tar xf "$tar_file" ${board_dir}/kernel -O | wc -c) 2> /dev/null) local kernel_mtd kernel_length
local has_rootfs=0 if [ "$CI_KERNPART" != "none" ]; then
local rootfs_length kernel_mtd="$(find_mtd_index "$CI_KERNPART")"
kernel_length=$( (tar xO${gz}f "$tar_file" "$board_dir/kernel" | wc -c) 2> /dev/null)
[ "$kernel_length" = 0 ] && kernel_length=
fi
local rootfs_length=$( (tar xO${gz}f "$tar_file" "$board_dir/root" | wc -c) 2> /dev/null)
[ "$rootfs_length" = 0 ] && rootfs_length=
local rootfs_type local rootfs_type
[ "$rootfs_length" ] && rootfs_type="$(identify_tar "$tar_file" "$board_dir/root" "$gz")"
tar tf "$tar_file" ${board_dir}/root 1>/dev/null 2>/dev/null && has_rootfs=1 local ubi_kernel_length
[ "$has_rootfs" = "1" ] && { if [ "$kernel_length" ]; then
rootfs_length=$( (tar xf "$tar_file" ${board_dir}/root -O | wc -c) 2> /dev/null) if [ "$kernel_mtd" ]; then
rootfs_type="$(identify_tar "$tar_file" ${board_dir}/root)" # On some devices, the raw kernel and ubi partitions overlap.
} # These devices brick if the kernel partition is erased.
# Hence only invalidate kernel for now.
dd if=/dev/zero bs=4096 count=1 2> /dev/null | \
mtd write - "$CI_KERNPART"
else
ubi_kernel_length="$kernel_length"
fi
fi
local has_kernel=1
local has_env=0 local has_env=0
nand_upgrade_prepare_ubi "$rootfs_length" "$rootfs_type" "$ubi_kernel_length" "$has_env" || return 1
[ "$kernel_length" != 0 -a -n "$kernel_mtd" ] && { if [ "$rootfs_length" ]; then
tar xf "$tar_file" ${board_dir}/kernel -O | mtd write - $CI_KERNPART local ubidev="$( nand_find_ubi "${CI_ROOT_UBIPART:-$CI_UBIPART}" )"
} local root_ubivol="$( nand_find_volume $ubidev "$CI_ROOTPART" )"
[ "$kernel_length" = 0 -o ! -z "$kernel_mtd" ] && has_kernel= tar xO${gz}f "$tar_file" "$board_dir/root" | \
ubiupdatevol /dev/$root_ubivol -s "$rootfs_length" -
fi
if [ "$kernel_length" ]; then
if [ "$kernel_mtd" ]; then
if [ "$jffs2_markers" = 1 ]; then
flash_erase -j "/dev/mtd${kernel_mtd}" 0 0
tar xO${gz}f "$tar_file" "$board_dir/kernel" | \
nandwrite "/dev/mtd${kernel_mtd}" -
else
tar xO${gz}f "$tar_file" "$board_dir/kernel" | \
mtd write - "$CI_KERNPART"
fi
else
local ubidev="$( nand_find_ubi "${CI_KERN_UBIPART:-$CI_UBIPART}" )"
local kern_ubivol="$( nand_find_volume $ubidev "$CI_KERNPART" )"
tar xO${gz}f "$tar_file" "$board_dir/kernel" | \
ubiupdatevol /dev/$kern_ubivol -s "$kernel_length" -
fi
fi
nand_upgrade_prepare_ubi "$rootfs_length" "$rootfs_type" "${has_kernel:+$kernel_length}" "$has_env" return 0
}
local ubidev="$( nand_find_ubi "$CI_UBIPART" )" nand_verify_if_gzip_file() {
[ "$has_kernel" = "1" ] && { local file="$1"
local kern_ubivol="$( nand_find_volume $ubidev $CI_KERNPART )" local gz="$2"
tar xf "$tar_file" ${board_dir}/kernel -O | \
ubiupdatevol /dev/$kern_ubivol -s $kernel_length -
}
[ "$has_rootfs" = "1" ] && { if [ "$gz" = z ]; then
local root_ubivol="$( nand_find_volume $ubidev $CI_ROOTPART )" echo "verifying compressed sysupgrade file integrity"
tar xf "$tar_file" ${board_dir}/root -O | \ if ! gzip -t "$file"; then
ubiupdatevol /dev/$root_ubivol -s $rootfs_length - echo "corrupted compressed sysupgrade file"
} return 1
nand_do_upgrade_success fi
fi
}
nand_verify_tar_file() {
local file="$1"
local gz="$2"
echo "verifying sysupgrade tar file integrity"
if ! tar xO${gz}f "$file" > /dev/null; then
echo "corrupted sysupgrade tar file"
return 1
fi
}
nand_do_flash_file() {
local file="$1"
local gz="$(identify_if_gzip "$file")"
local file_type="$(identify "$file" "" "$gz")"
[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART=rootfs
case "$file_type" in
"fit")
nand_verify_if_gzip_file "$file" "$gz" || return 1
nand_upgrade_fit "$file" "$gz"
;;
"ubi")
nand_verify_if_gzip_file "$file" "$gz" || return 1
nand_upgrade_ubinized "$file" "$gz"
;;
"ubifs")
nand_verify_if_gzip_file "$file" "$gz" || return 1
nand_upgrade_ubifs "$file" "$gz"
;;
*)
nand_verify_tar_file "$file" "$gz" || return 1
nand_upgrade_tar "$file" "$gz"
;;
esac
}
nand_do_restore_config() {
local conf_tar="/tmp/sysupgrade.tgz"
[ ! -f "$conf_tar" ] || nand_restore_config "$conf_tar"
} }
# Recognize type of passed file and start the upgrade process # Recognize type of passed file and start the upgrade process
nand_do_upgrade() { nand_do_upgrade() {
local file_type=$(identify $1) local file="$1"
[ ! "$(find_mtd_index "$CI_UBIPART")" ] && CI_UBIPART="rootfs" sync
nand_do_flash_file "$file" && nand_do_upgrade_success
case "$file_type" in nand_do_upgrade_failed
"fit") nand_upgrade_fit $1;;
"ubi") nand_upgrade_ubinized $1;;
"ubifs") nand_upgrade_ubifs $1;;
*) nand_upgrade_tar $1;;
esac
} }
# Check if passed file is a valid one for NAND sysupgrade. Currently it accepts nand_do_upgrade_success() {
# 3 types of files: if nand_do_restore_config && sync; then
# 1) UBI - should contain an ubinized image, header is checked for the proper echo "sysupgrade successful"
# MAGIC umount -a
# 2) UBIFS - should contain UBIFS partition that will replace "rootfs" volume, reboot -f
# header is checked for the proper MAGIC fi
# 3) TAR - archive has to include "sysupgrade-BOARD" directory with a non-empty nand_do_upgrade_failed
# "CONTROL" file (at this point its content isn't verified) }
nand_do_upgrade_failed() {
sync
echo "sysupgrade failed"
# Should we reboot or bring up some failsafe mode instead?
umount -a
reboot -f
}
# Check if passed file is a valid one for NAND sysupgrade.
# Currently it accepts 4 types of files:
# 1) UBI: a ubinized image containing required UBI volumes.
# 2) UBIFS: a UBIFS rootfs volume image.
# 3) FIT: a FIT image containing kernel and rootfs.
# 4) TAR: an archive that includes directory "sysupgrade-${BOARD_NAME}" containing
# a non-empty "CONTROL" file and required partition and/or volume images.
# #
# You usually want to call this function in platform_check_image. # You usually want to call this function in platform_check_image.
# #
@ -343,14 +458,25 @@ nand_do_upgrade() {
# $(2): file to be checked # $(2): file to be checked
nand_do_platform_check() { nand_do_platform_check() {
local board_name="$1" local board_name="$1"
local tar_file="$2" local file="$2"
local control_length=$( (tar xf $tar_file sysupgrade-$board_name/CONTROL -O | wc -c) 2> /dev/null)
local file_type="$(identify $2)"
[ "$control_length" = 0 -a "$file_type" != "ubi" -a "$file_type" != "ubifs" -a "$file_type" != "fit" ] && { local gz="$(identify_if_gzip "$file")"
echo "Invalid sysupgrade file." local file_type="$(identify "$file" "" "$gz")"
return 1 local control_length=$( (tar xO${gz}f "$file" "sysupgrade-${board_name//,/_}/CONTROL" | wc -c) 2> /dev/null)
}
if [ "$control_length" = 0 ]; then
control_length=$( (tar xO${gz}f "$file" "sysupgrade-${board_name//_/,}/CONTROL" | wc -c) 2> /dev/null)
fi
if [ "$control_length" != 0 ]; then
nand_verify_tar_file "$file" "$gz" || return 1
else
nand_verify_if_gzip_file "$file" "$gz" || return 1
if [ "$file_type" != "fit" -a "$file_type" != "ubi" -a "$file_type" != "ubifs" ]; then
echo "invalid sysupgrade file"
return 1
fi
fi
return 0 return 0
} }

View File

@ -39,20 +39,26 @@ switch_to_ramfs() {
for binary in \ for binary in \
/bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount \ /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount \
pivot_root mount_root reboot sync kill sleep \ pivot_root mount_root reboot sync kill sleep \
md5sum hexdump cat zcat bzcat dd tar \ md5sum hexdump cat zcat dd tar gzip \
ls basename find cp mv rm mkdir rmdir mknod touch chmod \ ls basename find cp mv rm mkdir rmdir mknod touch chmod \
'[' printf wc grep awk sed cut \ '[' printf wc grep awk sed cut sort tail \
mtd partx losetup mkfs.ext4 nandwrite flash_erase \ mtd partx losetup mkfs.ext4 nandwrite flash_erase \
ubiupdatevol ubiattach ubiblock ubiformat \ ubiupdatevol ubiattach ubiblock ubiformat \
ubidetach ubirsvol ubirmvol ubimkvol \ ubidetach ubirsvol ubirmvol ubimkvol \
snapshot snapshot_tool date \ snapshot snapshot_tool date logger \
/usr/sbin/fw_printenv /usr/bin/fwtool \
$RAMFS_COPY_LOSETUP $RAMFS_COPY_LVM \ $RAMFS_COPY_LOSETUP $RAMFS_COPY_LVM \
$RAMFS_COPY_BIN $RAMFS_COPY_BIN
do do
local file="$(command -v "$binary" 2>/dev/null)" local file="$(command -v "$binary" 2>/dev/null)"
[ -n "$file" ] && install_bin "$file" [ -n "$file" ] && install_bin "$file"
done done
install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh /lib/upgrade/*.sh /lib/upgrade/do_stage2 /usr/share/libubox/jshn.sh $RAMFS_COPY_DATA install_file /etc/resolv.conf /lib/*.sh /lib/functions/*.sh \
/lib/upgrade/*.sh /lib/upgrade/do_stage2 \
/usr/share/libubox/jshn.sh /usr/sbin/fw_setenv \
/etc/fw_env.config $RAMFS_COPY_DATA
mkdir -p $RAM_ROOT/var/lock
[ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64 [ -L "/lib64" ] && ln -s /lib $RAM_ROOT/lib64
@ -64,6 +70,10 @@ switch_to_ramfs() {
/bin/mount -o remount,ro /mnt /bin/mount -o remount,ro /mnt
/bin/umount -l /mnt /bin/umount -l /mnt
grep -e "^/dev/dm-.*" -e "^/dev/loop.*" /proc/mounts | while read bdev mp _r; do
umount $mp
done
[ "$RAMFS_COPY_LOSETUP" ] && losetup -D [ "$RAMFS_COPY_LOSETUP" ] && losetup -D
[ "$RAMFS_COPY_LVM" ] && { [ "$RAMFS_COPY_LVM" ] && {
mkdir -p /tmp/lvm/cache mkdir -p /tmp/lvm/cache
@ -85,7 +95,7 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
local stat local stat
local proc_ppid=$(cut -d' ' -f4 /proc/$$/stat) local proc_ppid=$(cut -d' ' -f4 /proc/$$/stat)
vn "Sending $sig to remaining processes ..." v "Sending $sig to remaining processes ..."
while $run; do while $run; do
run=false run=false
@ -93,45 +103,62 @@ kill_remaining() { # [ <signal> [ <loop> ] ]
[ -f "$stat" ] || continue [ -f "$stat" ] || continue
local pid name state ppid rest local pid name state ppid rest
read pid name state ppid rest < $stat read pid rest < $stat
name="${name#(}"; name="${name%)}" name="${rest#\(}" ; rest="${name##*\) }" ; name="${name%\)*}"
set -- $rest ; state="$1" ; ppid="$2"
# Skip PID1, our parent, ourself and our children # Skip PID1, our parent, ourself and our children
[ $pid -ne 1 -a $pid -ne $proc_ppid -a $pid -ne $$ -a $ppid -ne $$ ] || continue [ $pid -ne 1 -a $pid -ne $proc_ppid -a $pid -ne $$ -a $ppid -ne $$ ] || continue
[ -f "/proc/$pid/cmdline" ] || continue
local cmdline local cmdline
read cmdline < /proc/$pid/cmdline read cmdline < /proc/$pid/cmdline
# Skip kernel threads # Skip kernel threads
[ -n "$cmdline" ] || continue [ -n "$cmdline" ] || continue
_vn " $name" v "Sending signal $sig to $name ($pid)"
kill -$sig $pid 2>/dev/null kill -$sig $pid 2>/dev/null
[ $loop -eq 1 ] && run=true [ $loop -eq 1 ] && sleep 2 && run=true
done done
let loop_limit-- let loop_limit--
[ $loop_limit -eq 0 ] && { [ $loop_limit -eq 0 ] && {
_v
v "Failed to kill all processes." v "Failed to kill all processes."
exit 1 exit 1
} }
done done
_v
} }
indicate_upgrade indicate_upgrade
killall -9 telnetd while read -r a b c; do
killall -9 dropbear case "$a" in
killall -9 ash MemT*) mem="$b" ;; esac
done < /proc/meminfo
[ "$mem" -gt 32768 ] && \
skip_services="dnsmasq log network"
for service in /etc/init.d/*; do
service=${service##*/}
case " $skip_services " in
*" $service "*) continue ;; esac
ubus call service delete '{ "name": "'"$service"'" }' 2>/dev/null
done
killall -9 telnetd 2>/dev/null
killall -9 dropbear 2>/dev/null
killall -9 ash 2>/dev/null
kill_remaining TERM kill_remaining TERM
sleep 3 sleep 4
kill_remaining KILL 1 kill_remaining KILL 1
sleep 1 sleep 6
echo 3 > /proc/sys/vm/drop_caches echo 3 > /proc/sys/vm/drop_caches

View File

@ -19,6 +19,7 @@ export CONF_IMAGE=
export CONF_BACKUP_LIST=0 export CONF_BACKUP_LIST=0
export CONF_BACKUP= export CONF_BACKUP=
export CONF_RESTORE= export CONF_RESTORE=
export IGNORE_MINOR_COMPAT=0
export NEED_IMAGE= export NEED_IMAGE=
export HELP=0 export HELP=0
export FORCE=0 export FORCE=0
@ -44,6 +45,7 @@ while [ -n "$1" ]; do
-F|--force) export FORCE=1;; -F|--force) export FORCE=1;;
-T|--test) export TEST=1;; -T|--test) export TEST=1;;
-h|--help) export HELP=1; break;; -h|--help) export HELP=1; break;;
--ignore-minor-compat-version) export IGNORE_MINOR_COMPAT=1;;
-*) -*)
echo "Invalid option: $1" >&2 echo "Invalid option: $1" >&2
exit 1 exit 1
@ -80,6 +82,8 @@ upgrade-option:
Verify image and config .tar.gz but do not actually flash. Verify image and config .tar.gz but do not actually flash.
-F | --force -F | --force
Flash image even if image checks fail, this is dangerous! Flash image even if image checks fail, this is dangerous!
--ignore-minor-compat-version
Flash image even if the minor compat version is incompatible.
-q less verbose -q less verbose
-v more verbose -v more verbose
-h | --help display this help -h | --help display this help

View File

@ -6,7 +6,7 @@
usage() { usage() {
cat <<EOF cat <<EOF
Usage: $0 [config|up|down|reconf|reload|status] Usage: $0 [config|up|down|reconf|reload|status|isup]
enables (default), disables or configures devices not yet configured. enables (default), disables or configures devices not yet configured.
EOF EOF
exit 1 exit 1
@ -21,6 +21,22 @@ ubus_wifi_cmd() {
ubus call network.wireless "$1" "$(json_dump)" ubus call network.wireless "$1" "$(json_dump)"
} }
wifi_isup() {
local dev="$1"
json_load "$(ubus_wifi_cmd "status" "$dev")"
json_get_keys devices
for device in $devices; do
json_select "$device"
json_get_var up up
[ $up -eq 0 ] && return 1
json_select ..
done
return 0
}
find_net_config() {( find_net_config() {(
local vif="$1" local vif="$1"
local cfg local cfg
@ -245,6 +261,7 @@ case "$1" in
detect) wifi_detect_notice ;; detect) wifi_detect_notice ;;
config) wifi_config ;; config) wifi_config ;;
status) ubus_wifi_cmd "status" "$2";; status) ubus_wifi_cmd "status" "$2";;
isup) wifi_isup "$2"; exit $?;;
reload) wifi_reload "$2";; reload) wifi_reload "$2";;
reload_legacy) wifi_reload_legacy "$2";; reload_legacy) wifi_reload_legacy "$2";;
--help|help) usage;; --help|help) usage;;

View File

@ -5,6 +5,13 @@
# See /LICENSE for more information. # See /LICENSE for more information.
# #
config TARGET_DEFAULT_LAN_IP_FROM_PREINIT
bool "Use preinit IP configuration as default LAN IP" if IMAGEOPT
default n
help
Enabling this will set the default LAN IP address and netmask
to the preinit values set in the image config.
menuconfig PREINITOPT menuconfig PREINITOPT
bool "Preinit configuration options" if IMAGEOPT bool "Preinit configuration options" if IMAGEOPT
default n default n
@ -158,7 +165,7 @@ if VERSIONOPT
config VERSION_DIST config VERSION_DIST
string string
prompt "Release distribution" prompt "Release distribution"
default "OpenWrt" default "LEDE"
help help
This is the name of the release distribution. This is the name of the release distribution.
If unspecified, it defaults to OpenWrt. If unspecified, it defaults to OpenWrt.
@ -183,7 +190,7 @@ if VERSIONOPT
config VERSION_REPO config VERSION_REPO
string string
prompt "Release repository" prompt "Release repository"
default "https://downloads.openwrt.org/snapshots" default "https://downloads.openwrt.org/releases/24.10.0"
help help
This is the repository address embedded in the image, it defaults This is the repository address embedded in the image, it defaults
to the trunk snapshot repo; the url may contain the following placeholders: to the trunk snapshot repo; the url may contain the following placeholders:
@ -192,13 +199,13 @@ if VERSIONOPT
%v .. Configured release version number or "snapshot", lowercase %v .. Configured release version number or "snapshot", lowercase
%C .. Configured release revision code or value of %R, uppercase %C .. Configured release revision code or value of %R, uppercase
%c .. Configured release revision code or value of %R, lowercase %c .. Configured release revision code or value of %R, lowercase
%D .. Distribution name or "OpenWrt", uppercase %D .. Distribution name or "LEDE", uppercase
%d .. Distribution name or "openwrt", lowercase %d .. Distribution name or "lede", lowercase
%T .. Target name %T .. Target name
%S .. Target/Subtarget name %S .. Target/Subtarget name
%A .. Package architecture %A .. Package architecture
%t .. Build taint flags, e.g. "no-all busybox" %t .. Build taint flags, e.g. "no-all busybox"
%M .. Manufacturer name or "OpenWrt" %M .. Manufacturer name or "LEDE"
%P .. Product name or "Generic" %P .. Product name or "Generic"
%h .. Hardware revision or "v0" %h .. Hardware revision or "v0"
@ -259,7 +266,7 @@ if VERSIONOPT
config VERSION_CODE_FILENAMES config VERSION_CODE_FILENAMES
bool bool
prompt "Revision code in filenames" prompt "Revision code in filenames"
default y default n
help help
Enable this to include the revision identifier or the configured Enable this to include the revision identifier or the configured
version code into the firmware image, SDK- and Image Builder archive version code into the firmware image, SDK- and Image Builder archive

View File

@ -0,0 +1,542 @@
#!/bin/sh
CFG=/etc/board.json
. /usr/share/libubox/jshn.sh
[ -s $CFG ] || /bin/board_detect || exit 1
[ -s /etc/config/network -a -s /etc/config/system ] && exit 0
generate_bridge() {
local name=$1
local macaddr=$2
uci -q batch <<-EOF
set network.$name=device
set network.$name.name=$name
set network.$name.type=bridge
EOF
if [ -n "$macaddr" ]; then
uci -q batch <<-EOF
set network.$name.macaddr=$macaddr
EOF
fi
}
bridge_vlan_id=0
generate_bridge_vlan() {
local name=$1_vlan
local device=$2
local ports="$3"
local vlan="$4"
uci -q batch <<-EOF
set network.$name=bridge-vlan
set network.$name.device='$device'
set network.$name.vlan='$vlan'
set network.$name.ports='$ports'
EOF
}
generate_static_network() {
uci -q batch <<-EOF
delete network.loopback
set network.loopback='interface'
set network.loopback.device='lo'
set network.loopback.proto='static'
set network.loopback.ipaddr='127.0.0.1'
set network.loopback.netmask='255.0.0.0'
EOF
[ -e /proc/sys/net/ipv6 ] && {
uci -q batch <<-EOF
delete network.globals
set network.globals='globals'
set network.globals.ula_prefix='auto'
EOF
}
if json_is_a dsl object; then
json_select dsl
if json_is_a atmbridge object; then
json_select atmbridge
local vpi vci encaps payload nameprefix
json_get_vars vpi vci encaps payload nameprefix
uci -q batch <<-EOF
delete network.atm
set network.atm='atm-bridge'
set network.atm.vpi='$vpi'
set network.atm.vci='$vci'
set network.atm.encaps='$encaps'
set network.atm.payload='$payload'
set network.atm.nameprefix='$nameprefix'
EOF
json_select ..
fi
if json_is_a modem object; then
json_select modem
local type annex firmware tone xfer_mode
json_get_vars type annex firmware tone xfer_mode
uci -q batch <<-EOF
delete network.dsl
set network.dsl='dsl'
set network.dsl.annex='$annex'
set network.dsl.firmware='$firmware'
set network.dsl.tone='$tone'
set network.dsl.xfer_mode='$xfer_mode'
EOF
json_select ..
fi
json_select ..
fi
}
addr_offset=2
generate_network() {
local ports device macaddr protocol type ipaddr netmask vlan
local bridge=$2
json_select network
json_select "$1"
json_get_vars device macaddr metric protocol ipaddr netmask vlan
json_get_values ports ports
json_select ..
json_select ..
[ -n "$device" -o -n "$ports" ] || return
# Force bridge for "lan" as it may have other devices (e.g. wireless)
# bridged
[ "$1" = "lan" -a -z "$ports" ] && {
ports="$device"
}
[ -n "$ports" -a -z "$bridge" ] && {
uci -q batch <<-EOF
add network device
set network.@device[-1].name='br-$1'
set network.@device[-1].type='bridge'
EOF
for port in $ports; do uci add_list network.@device[-1].ports="$port"; done
[ -n "$macaddr" ] && {
for port in $ports; do
uci -q batch <<-EOF
add network device
set network.@device[-1].name='$port'
set network.@device[-1].macaddr='$macaddr'
EOF
done
}
device=br-$1
type=
macaddr=""
}
[ -n "$bridge" ] && {
[ -z "$ports" ] && ports="$device"
if [ -z "$vlan" ]; then
bridge_vlan_id=$((bridge_vlan_id + 1))
vlan=$bridge_vlan_id
fi
generate_bridge_vlan $1 $bridge "$ports" $vlan
device=$bridge.$vlan
type=""
}
if [ -n "$macaddr" ]; then
uci -q batch <<-EOF
add network device
set network.@device[-1].name='$device'
set network.@device[-1].macaddr='$macaddr'
EOF
fi
uci -q batch <<-EOF
delete network.$1
set network.$1='interface'
set network.$1.type='$type'
set network.$1.device='$device'
set network.$1.metric='$metric'
set network.$1.proto='none'
EOF
case "$protocol" in
static)
local ipad
case "$1" in
lan) ipad=${ipaddr:-"192.168.1.1"} ;;
*) ipad=${ipaddr:-"192.168.$((addr_offset++)).1"} ;;
esac
netm=${netmask:-"255.255.255.0"}
uci -q batch <<-EOF
set network.$1.proto='static'
set network.$1.ipaddr='$ipad'
set network.$1.netmask='$netm'
EOF
[ -e /proc/sys/net/ipv6 ] && uci set network.$1.ip6assign='60'
;;
dhcp)
# fixup IPv6 slave interface if parent is a bridge
[ "$type" = "bridge" ] && device="br-$1"
uci set network.$1.proto='dhcp'
[ -e /proc/sys/net/ipv6 ] && {
uci -q batch <<-EOF
delete network.${1}6
set network.${1}6='interface'
set network.${1}6.device='$device'
set network.${1}6.proto='dhcpv6'
EOF
}
;;
pppoe)
uci -q batch <<-EOF
set network.$1.proto='pppoe'
set network.$1.username='username'
set network.$1.password='password'
EOF
[ -e /proc/sys/net/ipv6 ] && {
uci -q batch <<-EOF
set network.$1.ipv6='1'
delete network.${1}6
set network.${1}6='interface'
set network.${1}6.device='@${1}'
set network.${1}6.proto='dhcpv6'
EOF
}
;;
ncm|\
qmi|\
mbim)
uci -q batch <<-EOF
set network.$1.proto='${protocol}'
set network.$1.pdptype='ipv4'
EOF
;;
esac
}
generate_switch_vlans_ports() {
local switch="$1"
local port ports role roles num attr val
#
# autogenerate vlans
#
if json_is_a roles array; then
json_get_keys roles roles
json_select roles
for role in $roles; do
json_select "$role"
json_get_vars ports
json_select ..
uci -q batch <<-EOF
add network switch_vlan
set network.@switch_vlan[-1].device='$switch'
set network.@switch_vlan[-1].vlan='$role'
set network.@switch_vlan[-1].ports='$ports'
EOF
done
json_select ..
fi
#
# write port specific settings
#
if json_is_a ports array; then
json_get_keys ports ports
json_select ports
for port in $ports; do
json_select "$port"
json_get_vars num
if json_is_a attr object; then
json_get_keys attr attr
json_select attr
uci -q batch <<-EOF
add network switch_port
set network.@switch_port[-1].device='$switch'
set network.@switch_port[-1].port=$num
EOF
for attr in $attr; do
json_get_var val "$attr"
uci -q set network.@switch_port[-1].$attr="$val"
done
json_select ..
fi
json_select ..
done
json_select ..
fi
}
generate_switch() {
local key="$1"
local vlans
json_select switch
json_select "$key"
json_get_vars enable reset blinkrate cpu_port \
ar8xxx_mib_type ar8xxx_mib_poll_interval
uci -q batch <<-EOF
add network switch
set network.@switch[-1].name='$key'
set network.@switch[-1].reset='$reset'
set network.@switch[-1].enable_vlan='$enable'
set network.@switch[-1].blinkrate='$blinkrate'
set network.@switch[-1].ar8xxx_mib_type='$ar8xxx_mib_type'
set network.@switch[-1].ar8xxx_mib_poll_interval='$ar8xxx_mib_poll_interval'
EOF
generate_switch_vlans_ports "$1"
json_select ..
json_select ..
}
generate_static_system() {
uci -q batch <<-EOF
delete system.@system[0]
add system system
set system.@system[-1].hostname='LEDE'
set system.@system[-1].timezone='UTC'
set system.@system[-1].ttylogin='0'
set system.@system[-1].log_size='64'
set system.@system[-1].urandom_seed='0'
delete system.ntp
set system.ntp='timeserver'
set system.ntp.enabled='1'
set system.ntp.enable_server='0'
add_list system.ntp.server='0.openwrt.pool.ntp.org'
add_list system.ntp.server='1.openwrt.pool.ntp.org'
add_list system.ntp.server='2.openwrt.pool.ntp.org'
add_list system.ntp.server='3.openwrt.pool.ntp.org'
EOF
if json_is_a system object; then
json_select system
local hostname
if json_get_var hostname hostname; then
uci -q set "system.@system[-1].hostname=$hostname"
fi
local compat_version
if json_get_var compat_version compat_version; then
uci -q set "system.@system[-1].compat_version=$compat_version"
else
uci -q set "system.@system[-1].compat_version=1.0"
fi
if json_is_a ntpserver array; then
local keys key
json_get_keys keys ntpserver
json_select ntpserver
uci -q delete "system.ntp.server"
for key in $keys; do
local server
if json_get_var server "$key"; then
uci -q add_list "system.ntp.server=$server"
fi
done
json_select ..
fi
json_select ..
fi
}
generate_rssimon() {
local key="$1"
local cfg="rssid_$key"
local refresh threshold
json_select rssimon
json_select "$key"
json_get_vars refresh threshold
json_select ..
json_select ..
uci -q batch <<-EOF
delete system.$cfg
set system.$cfg='rssid'
set system.$cfg.dev='$key'
set system.$cfg.refresh='$refresh'
set system.$cfg.threshold='$threshold'
EOF
}
generate_led() {
local key="$1"
local cfg="led_$key"
json_select led
json_select "$key"
json_get_vars name sysfs type trigger default
uci -q batch <<-EOF
delete system.$cfg
set system.$cfg='led'
set system.$cfg.name='$name'
set system.$cfg.sysfs='$sysfs'
set system.$cfg.trigger='$trigger'
set system.$cfg.default='$default'
EOF
case "$type" in
gpio)
local gpio inverted
json_get_vars gpio inverted
uci -q batch <<-EOF
set system.$cfg.trigger='gpio'
set system.$cfg.gpio='$gpio'
set system.$cfg.inverted='$inverted'
EOF
;;
netdev)
local device mode
json_get_vars device mode
uci -q batch <<-EOF
set system.$cfg.trigger='netdev'
set system.$cfg.mode='$mode'
set system.$cfg.dev='$device'
EOF
;;
usb)
local device
json_get_vars device
uci -q batch <<-EOF
set system.$cfg.trigger='usbdev'
set system.$cfg.interval='50'
set system.$cfg.dev='$device'
EOF
;;
usbport)
local ports port
json_get_values ports ports
uci set system.$cfg.trigger='usbport'
for port in $ports; do
uci add_list system.$cfg.port=$port
done
;;
rssi)
local iface minq maxq offset factor
json_get_vars iface minq maxq offset factor
uci -q batch <<-EOF
set system.$cfg.trigger='rssi'
set system.$cfg.iface='rssid_$iface'
set system.$cfg.minq='$minq'
set system.$cfg.maxq='$maxq'
set system.$cfg.offset='$offset'
set system.$cfg.factor='$factor'
EOF
;;
switch)
local port_mask speed_mask mode
json_get_vars port_mask speed_mask mode
uci -q batch <<-EOF
set system.$cfg.port_mask='$port_mask'
set system.$cfg.speed_mask='$speed_mask'
set system.$cfg.mode='$mode'
EOF
;;
portstate)
local port_state
json_get_vars port_state
uci -q batch <<-EOF
set system.$cfg.port_state='$port_state'
EOF
;;
timer|oneshot)
local delayon delayoff
json_get_vars delayon delayoff
uci -q batch <<-EOF
set system.$cfg.trigger='$type'
set system.$cfg.delayon='$delayon'
set system.$cfg.delayoff='$delayoff'
EOF
;;
esac
json_select ..
json_select ..
}
generate_gpioswitch() {
local cfg="$1"
json_select gpioswitch
json_select "$cfg"
local name pin default
json_get_vars name pin default
uci -q batch <<-EOF
delete system.$cfg
set system.$cfg='gpio_switch'
set system.$cfg.name='$name'
set system.$cfg.gpio_pin='$pin'
set system.$cfg.value='$default'
EOF
json_select ..
json_select ..
}
json_init
json_load "$(cat ${CFG})"
umask 077
if [ ! -s /etc/config/network ]; then
bridge_name=""
touch /etc/config/network
generate_static_network
json_get_vars bridge
[ -n "$bridge" ] && {
json_select bridge
json_get_vars name macaddr
generate_bridge "$name" "$macaddr"
json_select ..
bridge_name=$name
}
json_get_keys keys network
for key in $keys; do generate_network $key $bridge_name; done
json_get_keys keys switch
for key in $keys; do generate_switch $key; done
fi
if [ ! -s /etc/config/system ]; then
touch /etc/config/system
generate_static_system
json_get_keys keys rssimon
for key in $keys; do generate_rssimon $key; done
json_get_keys keys gpioswitch
for key in $keys; do generate_gpioswitch $key; done
json_get_keys keys led
for key in $keys; do generate_led $key; done
fi
uci commit

View File

@ -0,0 +1,681 @@
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
json_select_array() {
local _json_no_warning=1
json_select "$1"
[ $? = 0 ] && return
json_add_array "$1"
json_close_array
json_select "$1"
}
json_select_object() {
local _json_no_warning=1
json_select "$1"
[ $? = 0 ] && return
json_add_object "$1"
json_close_object
json_select "$1"
}
ucidef_set_interface() {
local network=$1; shift
[ -z "$network" ] && return
json_select_object network
json_select_object "$network"
while [ -n "$1" ]; do
local opt=$1; shift
local val=$1; shift
[ -n "$opt" -a -n "$val" ] || break
[ "$opt" = "device" -a "$val" != "${val/ //}" ] && {
json_select_array "ports"
for e in $val; do json_add_string "" "$e"; done
json_close_array
} || {
json_add_string "$opt" "$val"
}
done
if ! json_is_a protocol string; then
case "$network" in
lan) json_add_string protocol static ;;
wan) json_add_string protocol dhcp ;;
*) json_add_string protocol none ;;
esac
fi
json_select ..
json_select ..
}
ucidef_set_board_id() {
json_select_object model
json_add_string id "$1"
json_select ..
}
ucidef_set_model_name() {
json_select_object model
json_add_string name "$1"
json_select ..
}
ucidef_set_compat_version() {
json_select_object system
json_add_string compat_version "${1:-1.0}"
json_select ..
}
ucidef_set_interface_lan() {
ucidef_set_interface "lan" device "$1" protocol "${2:-static}"
}
ucidef_set_interface_wan() {
ucidef_set_interface "wan" device "$1" protocol "${2:-dhcp}"
}
ucidef_set_interfaces_lan_wan() {
local lan_if="$1"
local wan_if="$2"
ucidef_set_interface_lan "$lan_if"
ucidef_set_interface_wan "$wan_if"
}
ucidef_set_bridge_device() {
json_select_object bridge
json_add_string name "${1:-switch0}"
json_select ..
}
ucidef_set_bridge_mac() {
json_select_object bridge
json_add_string macaddr "${1}"
json_select ..
}
ucidef_set_network_device_mac() {
json_select_object "network_device"
json_select_object "${1}"
json_add_string macaddr "${2}"
json_select ..
json_select ..
}
ucidef_set_network_device_path() {
json_select_object "network_device"
json_select_object "$1"
json_add_string path "$2"
json_select ..
json_select ..
}
_ucidef_add_switch_port() {
# inherited: $num $device $need_tag $want_untag $role $index $prev_role
# inherited: $n_cpu $n_ports $n_vlan $cpu0 $cpu1 $cpu2 $cpu3 $cpu4 $cpu5
n_ports=$((n_ports + 1))
json_select_array ports
json_add_object
json_add_int num "$num"
[ -n "$device" ] && json_add_string device "$device"
[ -n "$need_tag" ] && json_add_boolean need_tag "$need_tag"
[ -n "$want_untag" ] && json_add_boolean want_untag "$want_untag"
[ -n "$role" ] && json_add_string role "$role"
[ -n "$index" ] && json_add_int index "$index"
json_close_object
json_select ..
# record pointer to cpu entry for lookup in _ucidef_finish_switch_roles()
[ -n "$device" ] && {
export "cpu$n_cpu=$n_ports"
n_cpu=$((n_cpu + 1))
}
# create/append object to role list
[ -n "$role" ] && {
json_select_array roles
if [ "$role" != "$prev_role" ]; then
json_add_object
json_add_string role "$role"
json_add_string ports "$num"
json_close_object
prev_role="$role"
n_vlan=$((n_vlan + 1))
else
json_select_object "$n_vlan"
json_get_var port ports
json_add_string ports "$port $num"
json_select ..
fi
json_select ..
}
}
_ucidef_finish_switch_roles() {
# inherited: $name $n_cpu $n_vlan $cpu0 $cpu1 $cpu2 $cpu3 $cpu4 $cpu5
local index role roles num device need_tag want_untag port ports
json_select switch
json_select "$name"
json_get_keys roles roles
json_select ..
json_select ..
for index in $roles; do
eval "port=\$cpu$(((index - 1) % n_cpu))"
json_select switch
json_select "$name"
json_select ports
json_select "$port"
json_get_vars num device need_tag want_untag
json_select ..
json_select ..
if [ ${need_tag:-0} -eq 1 -o ${want_untag:-0} -ne 1 ]; then
num="${num}t"
device="${device}.${index}"
fi
json_select roles
json_select "$index"
json_get_vars role ports
json_add_string ports "$ports $num"
json_add_string device "$device"
json_select ..
json_select ..
json_select ..
json_select ..
json_select_object network
local devices
json_select_object "$role"
# attach previous interfaces (for multi-switch devices)
json_get_var devices device
if ! list_contains devices "$device"; then
devices="${devices:+$devices }$device"
fi
json_select ..
json_select ..
ucidef_set_interface "$role" device "$devices"
done
}
ucidef_set_ar8xxx_switch_mib() {
local name="$1"
local type="$2"
local interval="$3"
json_select_object switch
json_select_object "$name"
json_add_int ar8xxx_mib_type $type
json_add_int ar8xxx_mib_poll_interval $interval
json_select ..
json_select ..
}
ucidef_add_switch() {
local name="$1"; shift
local port num role device index need_tag prev_role
local cpu0 cpu1 cpu2 cpu3 cpu4 cpu5
local n_cpu=0 n_vlan=0 n_ports=0
json_select_object switch
json_select_object "$name"
json_add_boolean enable 1
json_add_boolean reset 1
for port in "$@"; do
case "$port" in
[0-9]*@*)
num="${port%%@*}"
device="${port##*@}"
need_tag=0
want_untag=0
[ "${num%t}" != "$num" ] && {
num="${num%t}"
need_tag=1
}
[ "${num%u}" != "$num" ] && {
num="${num%u}"
want_untag=1
}
;;
[0-9]*:*:[0-9]*)
num="${port%%:*}"
index="${port##*:}"
role="${port#[0-9]*:}"; role="${role%:*}"
;;
[0-9]*:*)
num="${port%%:*}"
role="${port##*:}"
;;
esac
if [ -n "$num" ] && [ -n "$device$role" ]; then
_ucidef_add_switch_port
fi
unset num device role index need_tag want_untag
done
json_select ..
json_select ..
_ucidef_finish_switch_roles
}
ucidef_add_switch_attr() {
local name="$1"
local key="$2"
local val="$3"
json_select_object switch
json_select_object "$name"
case "$val" in
true|false) [ "$val" != "true" ]; json_add_boolean "$key" $? ;;
[0-9]) json_add_int "$key" "$val" ;;
*) json_add_string "$key" "$val" ;;
esac
json_select ..
json_select ..
}
ucidef_add_switch_port_attr() {
local name="$1"
local port="$2"
local key="$3"
local val="$4"
local ports i num
json_select_object switch
json_select_object "$name"
json_get_keys ports ports
json_select_array ports
for i in $ports; do
json_select "$i"
json_get_var num num
if [ -n "$num" ] && [ $num -eq $port ]; then
json_select_object attr
case "$val" in
true|false) [ "$val" != "true" ]; json_add_boolean "$key" $? ;;
[0-9]) json_add_int "$key" "$val" ;;
*) json_add_string "$key" "$val" ;;
esac
json_select ..
fi
json_select ..
done
json_select ..
json_select ..
json_select ..
}
ucidef_set_interface_macaddr() {
local network="$1"
local macaddr="$2"
ucidef_set_interface "$network" macaddr "$macaddr"
}
ucidef_set_label_macaddr() {
local macaddr="$1"
json_select_object system
json_add_string label_macaddr "$macaddr"
json_select ..
}
ucidef_add_atm_bridge() {
local vpi="$1"
local vci="$2"
local encaps="$3"
local payload="$4"
local nameprefix="$5"
json_select_object dsl
json_select_object atmbridge
json_add_int vpi "$vpi"
json_add_int vci "$vci"
json_add_string encaps "$encaps"
json_add_string payload "$payload"
json_add_string nameprefix "$nameprefix"
json_select ..
json_select ..
}
ucidef_add_adsl_modem() {
local annex="$1"
local firmware="$2"
json_select_object dsl
json_select_object modem
json_add_string type "adsl"
json_add_string annex "$annex"
json_add_string firmware "$firmware"
json_select ..
json_select ..
}
ucidef_add_vdsl_modem() {
local annex="$1"
local tone="$2"
local xfer_mode="$3"
json_select_object dsl
json_select_object modem
json_add_string type "vdsl"
json_add_string annex "$annex"
json_add_string tone "$tone"
json_add_string xfer_mode "$xfer_mode"
json_select ..
json_select ..
}
ucidef_set_led_ataport() {
_ucidef_set_led_trigger "$1" "$2" "$3" ata"$4"
}
_ucidef_set_led_common() {
local cfg="led_$1"
local name="$2"
local sysfs="$3"
json_select_object led
json_select_object "$1"
json_add_string name "$name"
json_add_string sysfs "$sysfs"
}
ucidef_set_led_default() {
local default="$4"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string default "$default"
json_select ..
json_select ..
}
ucidef_set_led_heartbeat() {
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string trigger heartbeat
json_select ..
json_select ..
}
ucidef_set_led_gpio() {
local gpio="$4"
local inverted="$5"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string trigger "$trigger"
json_add_string type gpio
json_add_int gpio "$gpio"
json_add_boolean inverted "$inverted"
json_select ..
json_select ..
}
ucidef_set_led_ide() {
_ucidef_set_led_trigger "$1" "$2" "$3" disk-activity
}
ucidef_set_led_netdev() {
local dev="$4"
local mode="${5:-link tx rx}"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string type netdev
json_add_string device "$dev"
json_add_string mode "$mode"
json_select ..
json_select ..
}
ucidef_set_led_oneshot() {
_ucidef_set_led_timer $1 $2 $3 "oneshot" $4 $5
}
ucidef_set_led_portstate() {
local port_state="$4"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string trigger port_state
json_add_string type portstate
json_add_string port_state "$port_state"
json_select ..
json_select ..
}
ucidef_set_led_rssi() {
local iface="$4"
local minq="$5"
local maxq="$6"
local offset="${7:-0}"
local factor="${8:-1}"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string type rssi
json_add_string name "$name"
json_add_string iface "$iface"
json_add_string minq "$minq"
json_add_string maxq "$maxq"
json_add_string offset "$offset"
json_add_string factor "$factor"
json_select ..
json_select ..
}
ucidef_set_led_switch() {
local trigger_name="$4"
local port_mask="$5"
local speed_mask="$6"
local mode="$7"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string trigger "$trigger_name"
json_add_string type switch
json_add_string mode "$mode"
json_add_string port_mask "$port_mask"
json_add_string speed_mask "$speed_mask"
json_select ..
json_select ..
}
_ucidef_set_led_timer() {
local trigger_name="$4"
local delayon="$5"
local delayoff="$6"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string type "$trigger_name"
json_add_string trigger "$trigger_name"
json_add_int delayon "$delayon"
json_add_int delayoff "$delayoff"
json_select ..
json_select ..
}
ucidef_set_led_timer() {
_ucidef_set_led_timer $1 $2 $3 "timer" $4 $5
}
_ucidef_set_led_trigger() {
local trigger_name="$4"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string trigger "$trigger_name"
json_select ..
json_select ..
}
ucidef_set_led_usbdev() {
local dev="$4"
_ucidef_set_led_common "$1" "$2" "$3"
json_add_string type usb
json_add_string device "$dev"
json_select ..
json_select ..
}
ucidef_set_led_usbhost() {
_ucidef_set_led_trigger "$1" "$2" "$3" usb-host
}
ucidef_set_led_usbport() {
local obj="$1"
local name="$2"
local sysfs="$3"
shift
shift
shift
_ucidef_set_led_common "$obj" "$name" "$sysfs"
json_add_string type usbport
json_select_array ports
for port in "$@"; do
json_add_string port "$port"
done
json_select ..
json_select ..
json_select ..
}
ucidef_set_led_wlan() {
_ucidef_set_led_trigger "$1" "$2" "$3" "$4"
}
ucidef_set_rssimon() {
local dev="$1"
local refresh="$2"
local threshold="$3"
json_select_object rssimon
json_select_object "$dev"
[ -n "$refresh" ] && json_add_int refresh "$refresh"
[ -n "$threshold" ] && json_add_int threshold "$threshold"
json_select ..
json_select ..
}
ucidef_add_gpio_switch() {
local cfg="$1"
local name="$2"
local pin="$3"
local default="${4:-0}"
json_select_object gpioswitch
json_select_object "$cfg"
json_add_string name "$name"
json_add_string pin "$pin"
json_add_int default "$default"
json_select ..
json_select ..
}
ucidef_set_hostname() {
local hostname="$1"
json_select_object system
json_add_string hostname "$hostname"
json_select ..
}
ucidef_set_ntpserver() {
local server
json_select_object system
json_select_array ntpserver
for server in "$@"; do
json_add_string "" "$server"
done
json_select ..
json_select ..
}
ucidef_add_wlan() {
local path="$1"; shift
ucidef_wlan_idx=${ucidef_wlan_idx:-0}
json_select_object wlan
json_select_object "wl$ucidef_wlan_idx"
json_add_string path "$path"
json_add_fields "$@"
json_select ..
json_select ..
ucidef_wlan_idx="$((ucidef_wlan_idx + 1))"
}
board_config_update() {
json_init
[ -f ${CFG} ] && json_load "$(cat ${CFG})"
# auto-initialize model id and name if applicable
if ! json_is_a model object; then
json_select_object model
[ -f "/tmp/sysinfo/board_name" ] && \
json_add_string id "$(cat /tmp/sysinfo/board_name)"
[ -f "/tmp/sysinfo/model" ] && \
json_add_string name "$(cat /tmp/sysinfo/model)"
json_select ..
fi
}
board_config_flush() {
json_dump -i -o ${CFG}
}

View File

@ -0,0 +1,207 @@
# Copyright (C) 2006 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
preinit_ip_config() {
local netdev vid
netdev=${1%\.*}
vid=${1#*\.}
if [ "$vid" = "$netdev" ]; then
vid=
fi
grep -q "$netdev" /proc/net/dev || return
if [ -n "$vid" ]; then
ip link add link $netdev name $1 type vlan id $vid
fi
ip link set dev $netdev up
if [ -n "$vid" ]; then
ip link set dev $1 up
fi
ip -4 address add $pi_ip/$pi_netmask broadcast $pi_broadcast dev $1
}
preinit_config_switch() {
local role roles ports device enable reset
local name=$1
local lan_if=$2
json_select switch
json_select $name
json_get_vars enable reset
if [ "$reset" -eq "1" ]; then
swconfig dev $name set reset
fi
swconfig dev $name set enable_vlan $enable
if json_is_a roles array; then
json_get_keys roles roles
json_select roles
for role in $roles; do
json_select "$role"
json_get_vars ports device
json_select ..
if [ "$device" = "$lan_if" ]; then
swconfig dev $name vlan $role set ports "$ports"
fi
done
json_select ..
fi
swconfig dev $name set apply
json_select ..
json_select ..
}
preinit_config_port() {
local original
local netdev="$1"
local path="$2"
[ -d "/sys/devices/$path/net" ] || return
original="$(ls "/sys/devices/$path/net" | head -1)"
[ "$netdev" = "$original" ] && return
ip link set "$original" name "$netdev"
}
preinit_config_board() {
/bin/board_detect /tmp/board.json
[ -f "/tmp/board.json" ] || return
. /usr/share/libubox/jshn.sh
json_init
json_load "$(cat /tmp/board.json)"
# Find the current highest eth*
max_eth=$(grep -o '^ *eth[0-9]*:' /proc/net/dev | tr -dc '[0-9]\n' | sort -n | tail -1)
# Find and move netdevs using eth*s we are configuring
json_get_keys keys "network_device"
for netdev in $keys; do
json_select "network_device"
json_select "$netdev"
json_get_vars path path
if [ -n "$path" -a -h "/sys/class/net/$netdev" ]; then
ip link set "$netdev" down
ip link set "$netdev" name eth$((++max_eth))
fi
json_select ..
json_select ..
done
# Move interfaces by path to their netdev name
json_get_keys keys "network_device"
for netdev in $keys; do
json_select "network_device"
json_select "$netdev"
json_get_vars path path
[ -n "$path" ] && preinit_config_port "$netdev" "$path"
json_select ..
json_select ..
done
json_select network
json_select "lan"
json_get_vars device
json_get_values ports ports
json_select ..
json_select ..
[ -n "$device" -o -n "$ports" ] || return
# swconfig uses $device and DSA uses ports
[ -z "$ports" ] && {
ports="$device"
}
# only use the first one
ifname=${ports%% *}
if [ -x /sbin/swconfig ]; then
# configure the switch, if present
json_get_keys keys switch
for key in $keys; do
preinit_config_switch $key $ifname
done
else
# trim any vlan ids
ifname=${ifname%\.*}
# trim any vlan modifiers like :t
ifname=${ifname%\:*}
fi
pi_ifname=$ifname
preinit_ip_config $pi_ifname
}
preinit_ip() {
[ "$pi_preinit_no_failsafe" = "y" ] && return
# if the preinit interface isn't specified and ifname is set in
# preinit.arch use that interface
if [ -z "$pi_ifname" ]; then
pi_ifname=$ifname
fi
if [ -n "$pi_ifname" ]; then
preinit_ip_config $pi_ifname
elif [ -d "/etc/board.d/" ]; then
preinit_config_board
fi
preinit_net_echo "Doing OpenWrt Preinit\n"
}
preinit_ip_deconfig() {
[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
local netdev vid
netdev=${pi_ifname%\.*}
vid=${pi_ifname#*\.}
if [ "$vid" = "$netdev" ]; then
vid=
fi
ip -4 address flush dev $pi_ifname
ip link set dev $netdev down
if [ -n "$vid" ]; then
ip link delete $pi_ifname
fi
}
}
preinit_net_echo() {
[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
{
[ "$pi_preinit_net_messages" = "y" ] || {
[ "$pi_failsafe_net_message" = "true" ] &&
[ "$pi_preinit_no_failsafe_netmsg" != "y" ]
}
} && netmsg $pi_broadcast "$1"
}
}
pi_indicate_preinit() {
set_state preinit
}
boot_hook_add preinit_main preinit_ip
boot_hook_add preinit_main pi_indicate_preinit

View File

@ -1,6 +1,6 @@
# #
# Copyright (C) 2017 Hauke Mehrtens # Copyright (C) 2017 Hauke Mehrtens
# Copyright (C) 2021 Daniel Golle # Copyright (C) 2021-2023 Daniel Golle
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -9,13 +9,13 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-mediatek PKG_NAME:=arm-trusted-firmware-mediatek
PKG_RELEASE:=$(AUTORELEASE) PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
PKG_SOURCE_DATE:=2022-08-31 PKG_SOURCE_DATE:=2024-01-17
PKG_SOURCE_VERSION:=7539348480af57c6d0db95aba6381f3ee7483779 PKG_SOURCE_VERSION:=bacca82a8cac369470df052a9d801a0ceb9b74ca
PKG_MIRROR_HASH:=125090124d77753acc379b3b124100978c1ecb3da37c4983ba9644b433b7eb08 PKG_MIRROR_HASH:=d035c1b63a9bd71d752c90540361b66d290e7cf42dcca73259d0950af3569c79
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org> PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
@ -30,6 +30,9 @@ define Trusted-Firmware-A/Default
DDR3_FLYBY:= DDR3_FLYBY:=
DDR_TYPE:= DDR_TYPE:=
NAND_TYPE:= NAND_TYPE:=
BOARD_QFN:=
DRAM_USE_COMB:=
USE_UBI:=
endef endef
define Trusted-Firmware-A/mt7622-nor-1ddr define Trusted-Firmware-A/mt7622-nor-1ddr
@ -54,6 +57,14 @@ define Trusted-Firmware-A/mt7622-snand-1ddr
BOOT_DEVICE:=snand BOOT_DEVICE:=snand
endef endef
define Trusted-Firmware-A/mt7622-snand-ubi-1ddr
NAME:=MediaTek MT7622 (SPI-NAND using UBI, 1x DDR3)
BUILD_SUBTARGET:=mt7622
PLAT:=mt7622
BOOT_DEVICE:=snand
USE_UBI:=1
endef
define Trusted-Firmware-A/mt7622-snand-2ddr define Trusted-Firmware-A/mt7622-snand-2ddr
NAME:=MediaTek MT7622 (SPI-NAND, 2x DDR3) NAME:=MediaTek MT7622 (SPI-NAND, 2x DDR3)
BUILD_SUBTARGET:=mt7622 BUILD_SUBTARGET:=mt7622
@ -62,6 +73,15 @@ define Trusted-Firmware-A/mt7622-snand-2ddr
DDR3_FLYBY:=1 DDR3_FLYBY:=1
endef endef
define Trusted-Firmware-A/mt7622-snand-ubi-2ddr
NAME:=MediaTek MT7622 (SPI-NAND using UBI, 2x DDR3)
BUILD_SUBTARGET:=mt7622
PLAT:=mt7622
BOOT_DEVICE:=snand
DDR3_FLYBY:=1
USE_UBI:=1
endef
define Trusted-Firmware-A/mt7622-emmc-1ddr define Trusted-Firmware-A/mt7622-emmc-1ddr
NAME:=MediaTek MT7622 (eMMC, 1x DDR3) NAME:=MediaTek MT7622 (eMMC, 1x DDR3)
BUILD_SUBTARGET:=mt7622 BUILD_SUBTARGET:=mt7622
@ -92,6 +112,79 @@ define Trusted-Firmware-A/mt7622-sdmmc-2ddr
DDR3_FLYBY:=1 DDR3_FLYBY:=1
endef endef
define Trusted-Firmware-A/mt7981-nor-ddr4
NAME:=MediaTek MT7981 (SPI-NOR, DDR4)
BOOT_DEVICE:=nor
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
endef
define Trusted-Firmware-A/mt7981-emmc-ddr4
NAME:=MediaTek MT7981 (eMMC, DDR4)
BOOT_DEVICE:=emmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
endef
define Trusted-Firmware-A/mt7981-spim-nand-ddr4
NAME:=MediaTek MT7981 (SPI-NAND via SPIM, DDR4)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
endef
define Trusted-Firmware-A/mt7981-nor-ddr3
NAME:=MediaTek MT7981 (SPI-NOR, DDR3)
BOOT_DEVICE:=nor
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7981-emmc-ddr3
NAME:=MediaTek MT7981 (eMMC, DDR3)
BOOT_DEVICE:=emmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7981-sdmmc-ddr3
NAME:=MediaTek MT7981 (SD card, DDR3)
BOOT_DEVICE:=sdmmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7981-snand-ddr3
NAME:=MediaTek MT7981 (SPI-NAND via SNFI, DDR3)
BOOT_DEVICE:=snand
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7981-spim-nand-ddr3
NAME:=MediaTek MT7981 (SPI-NAND via SPIM, DDR3)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7981-spim-nand-ubi-ddr4
NAME:=MediaTek MT7981 (SPI-NAND via SPIM, DDR4)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7981
DDR_TYPE:=ddr4
USE_UBI:=1
endef
define Trusted-Firmware-A/mt7986-nor-ddr4 define Trusted-Firmware-A/mt7986-nor-ddr4
NAME:=MediaTek MT7986 (SPI-NOR, DDR4) NAME:=MediaTek MT7986 (SPI-NOR, DDR4)
BOOT_DEVICE:=nor BOOT_DEVICE:=nor
@ -133,6 +226,25 @@ define Trusted-Firmware-A/mt7986-spim-nand-ddr4
NAND_TYPE:=spim:2k+64 NAND_TYPE:=spim:2k+64
endef endef
define Trusted-Firmware-A/mt7986-spim-nand-ubi-ddr4
NAME:=MediaTek MT7986 (SPI-NAND via SPIM using UBI, DDR4)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7986
DDR_TYPE:=ddr4
NAND_TYPE:=spim:2k+64
USE_UBI:=1
endef
define Trusted-Firmware-A/mt7986-spim-nand-4k-ddr4
NAME:=MediaTek MT7986 (SPI-NAND via SPIM, DDR4)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7986
DDR_TYPE:=ddr4
NAND_TYPE:=spim:4k+256
endef
define Trusted-Firmware-A/mt7986-nor-ddr3 define Trusted-Firmware-A/mt7986-nor-ddr3
NAME:=MediaTek MT7986 (SPI-NOR, DDR3) NAME:=MediaTek MT7986 (SPI-NOR, DDR3)
BOOT_DEVICE:=nor BOOT_DEVICE:=nor
@ -173,15 +285,164 @@ define Trusted-Firmware-A/mt7986-spim-nand-ddr3
DDR_TYPE:=ddr3 DDR_TYPE:=ddr3
endef endef
define Trusted-Firmware-A/mt7988-nor-ddr3
NAME:=MediaTek MT7988 (SPI-NOR, DDR3)
BOOT_DEVICE:=nor
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7988-emmc-ddr3
NAME:=MediaTek MT7988 (eMMC, DDR3)
BOOT_DEVICE:=emmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7988-sdmmc-ddr3
NAME:=MediaTek MT7988 (SD card, DDR3)
BOOT_DEVICE:=sdmmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7988-snand-ddr3
NAME:=MediaTek MT7988 (SPI-NAND via SNFI, DDR3)
BOOT_DEVICE:=snand
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7988-spim-nand-ddr3
NAME:=MediaTek MT7988 (SPI-NAND via SPIM, DDR3)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr3
endef
define Trusted-Firmware-A/mt7988-nor-ddr4
NAME:=MediaTek MT7988 (SPI-NOR, DDR4)
BOOT_DEVICE:=nor
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr4
endef
define Trusted-Firmware-A/mt7988-emmc-ddr4
NAME:=MediaTek MT7988 (eMMC, DDR4)
BOOT_DEVICE:=emmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr4
endef
define Trusted-Firmware-A/mt7988-sdmmc-ddr4
NAME:=MediaTek MT7988 (SD card, DDR4)
BOOT_DEVICE:=sdmmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr4
endef
define Trusted-Firmware-A/mt7988-snand-ddr4
NAME:=MediaTek MT7988 (SPI-NAND via SNFI, DDR4)
BOOT_DEVICE:=snand
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr4
endef
define Trusted-Firmware-A/mt7988-spim-nand-ddr4
NAME:=MediaTek MT7988 (SPI-NAND via SPIM, DDR4)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DDR_TYPE:=ddr4
endef
define Trusted-Firmware-A/mt7988-nor-comb
NAME:=MediaTek MT7988 (SPI-NOR)
BOOT_DEVICE:=nor
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DRAM_USE_COMB:=1
endef
define Trusted-Firmware-A/mt7988-emmc-comb
NAME:=MediaTek MT7988 (eMMC)
BOOT_DEVICE:=emmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DRAM_USE_COMB:=1
endef
define Trusted-Firmware-A/mt7988-sdmmc-comb
NAME:=MediaTek MT7988 (SD card)
BOOT_DEVICE:=sdmmc
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DRAM_USE_COMB:=1
endef
define Trusted-Firmware-A/mt7988-snand-comb
NAME:=MediaTek MT7988 (SPI-NAND via SNFI)
BOOT_DEVICE:=snand
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DRAM_USE_COMB:=1
endef
define Trusted-Firmware-A/mt7988-snand-ubi-comb
NAME:=MediaTek MT7988 (SPI-NAND via SNFI, UBI)
BOOT_DEVICE:=snand
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DRAM_USE_COMB:=1
USE_UBI:=1
endef
define Trusted-Firmware-A/mt7988-spim-nand-comb
NAME:=MediaTek MT7988 (SPI-NAND via SPIM)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DRAM_USE_COMB:=1
endef
define Trusted-Firmware-A/mt7988-spim-nand-ubi-comb
NAME:=MediaTek MT7988 (SPI-NAND via SPIM, UBI)
BOOT_DEVICE:=spim-nand
BUILD_SUBTARGET:=filogic
PLAT:=mt7988
DRAM_USE_COMB:=1
USE_UBI:=1
endef
TFA_TARGETS:= \ TFA_TARGETS:= \
mt7622-nor-1ddr \ mt7622-nor-1ddr \
mt7622-nor-2ddr \ mt7622-nor-2ddr \
mt7622-snand-1ddr \ mt7622-snand-1ddr \
mt7622-snand-ubi-1ddr \
mt7622-snand-2ddr \ mt7622-snand-2ddr \
mt7622-snand-ubi-2ddr \
mt7622-emmc-1ddr \ mt7622-emmc-1ddr \
mt7622-emmc-2ddr \ mt7622-emmc-2ddr \
mt7622-sdmmc-1ddr \ mt7622-sdmmc-1ddr \
mt7622-sdmmc-2ddr \ mt7622-sdmmc-2ddr \
mt7981-emmc-ddr3 \
mt7981-nor-ddr3 \
mt7981-sdmmc-ddr3 \
mt7981-snand-ddr3 \
mt7981-spim-nand-ddr3 \
mt7981-spim-nand-ubi-ddr4 \
mt7981-emmc-ddr4 \
mt7981-nor-ddr4 \
mt7981-spim-nand-ddr4 \
mt7986-emmc-ddr3 \ mt7986-emmc-ddr3 \
mt7986-nor-ddr3 \ mt7986-nor-ddr3 \
mt7986-sdmmc-ddr3 \ mt7986-sdmmc-ddr3 \
@ -191,15 +452,38 @@ TFA_TARGETS:= \
mt7986-nor-ddr4 \ mt7986-nor-ddr4 \
mt7986-sdmmc-ddr4 \ mt7986-sdmmc-ddr4 \
mt7986-snand-ddr4 \ mt7986-snand-ddr4 \
mt7986-spim-nand-ddr4 mt7986-spim-nand-ddr4 \
mt7986-spim-nand-ubi-ddr4 \
mt7986-spim-nand-4k-ddr4 \
mt7988-emmc-ddr3 \
mt7988-nor-ddr3 \
mt7988-sdmmc-ddr3 \
mt7988-snand-ddr3 \
mt7988-spim-nand-ddr3 \
mt7988-emmc-ddr4 \
mt7988-nor-ddr4 \
mt7988-sdmmc-ddr4 \
mt7988-snand-ddr4 \
mt7988-spim-nand-ddr4 \
mt7988-emmc-comb \
mt7988-nor-comb \
mt7988-sdmmc-comb \
mt7988-snand-comb \
mt7988-snand-ubi-comb \
mt7988-spim-nand-comb \
mt7988-spim-nand-ubi-comb
TFA_MAKE_FLAGS += \ TFA_MAKE_FLAGS += \
BOOT_DEVICE=$(BOOT_DEVICE) \ BOOT_DEVICE=$(BOOT_DEVICE) \
USE_MKIMAGE=1 MKIMAGE=$(STAGING_DIR_HOST)/bin/mkimage \ USE_MKIMAGE=1 MKIMAGE=$(STAGING_DIR_HOST)/bin/mkimage \
$(if $(findstring ddr4,$(DDR_TYPE)),DRAM_USE_DDR4=1) \ $(if $(findstring ddr4,$(DDR_TYPE)),DRAM_USE_DDR4=1) \
$(if $(BOARD_QFN),BOARD_QFN=1,BOARD_BGA=1) \
$(if $(NAND_TYPE),NAND_TYPE=$(NAND_TYPE)) \ $(if $(NAND_TYPE),NAND_TYPE=$(NAND_TYPE)) \
HAVE_DRAM_OBJ_FILE=yes \ HAVE_DRAM_OBJ_FILE=yes \
$(if $(DDR3_FLYBY),DDR3_FLYBY=1) \ $(if $(DDR3_FLYBY),DDR3_FLYBY=1) \
$(if $(DRAM_USE_COMB),DRAM_USE_COMB=1) \
$(if $(USE_UBI),UBI=1 $(if $(findstring mt7622,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x80000)) \
$(if $(USE_UBI),UBI=1 $(if $(findstring mt7981,$(PLAT)),OVERRIDE_UBI_START_ADDR=0x100000)) \
all all
define Package/trusted-firmware-a/install define Package/trusted-firmware-a/install

View File

@ -0,0 +1,23 @@
From fb2a2b669ec9bbf5c448d4b56499bc83de075c93 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Thu, 29 Feb 2024 18:01:08 +0000
Subject: [PATCH 1/3] mediatek: snfi: FM35Q1GA is x4-only
Dont allow x2 read and cache read operations on FM35Q1GA.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c
@@ -423,7 +423,7 @@ static const struct snand_flash_info sna
SNAND_INFO("FM35Q1GA", SNAND_ID(SNAND_ID_DYMMY, 0xe5, 0x71),
SNAND_MEMORG_1G_2K_64,
- &snand_cap_read_from_cache_x4,
+ &snand_cap_read_from_cache_x4_only,
&snand_cap_program_load_x4),
SNAND_INFO("PN26G01A", SNAND_ID(SNAND_ID_DYMMY, 0xa1, 0xe1),

View File

@ -0,0 +1,99 @@
From 6470986f037880ce76960c369d6e5a5270e7ce32 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sun, 10 Mar 2024 15:39:07 +0000
Subject: [PATCH 2/3] mediatek: snfi: adjust pin drive strength for Fidelix
SPI-NAND
It seems like we might need to adjust the pin driver strength to 12mA
for Fidelix SPI-NAND chip on MT7622 to avoid SPI data corruption on
some devices.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
.../apsoc_common/drivers/snfi/mtk-snand-def.h | 7 +++++
.../apsoc_common/drivers/snfi/mtk-snand-ids.c | 4 ++-
.../apsoc_common/drivers/snfi/mtk-snand.c | 30 +++++++++++++++++++
3 files changed, 40 insertions(+), 1 deletion(-)
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-def.h
@@ -86,6 +86,12 @@ struct snand_mem_org {
typedef int (*snand_select_die_t)(struct mtk_snand *snf, uint32_t dieidx);
+enum snand_drv {
+ SNAND_DRV_NO_CHANGE = 0,
+ SNAND_DRV_8mA = 8,
+ SNAND_DRV_12mA = 12,
+};
+
struct snand_flash_info {
const char *model;
struct snand_id id;
@@ -93,6 +99,7 @@ struct snand_flash_info {
const struct snand_io_cap *cap_rd;
const struct snand_io_cap *cap_pl;
snand_select_die_t select_die;
+ enum snand_drv drv;
};
#define SNAND_INFO(_model, _id, _memorg, _cap_rd, _cap_pl, ...) \
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c
@@ -424,7 +424,9 @@ static const struct snand_flash_info sna
SNAND_INFO("FM35Q1GA", SNAND_ID(SNAND_ID_DYMMY, 0xe5, 0x71),
SNAND_MEMORG_1G_2K_64,
&snand_cap_read_from_cache_x4_only,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("PN26G01A", SNAND_ID(SNAND_ID_DYMMY, 0xa1, 0xe1),
SNAND_MEMORG_1G_2K_128,
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand.c
@@ -1845,6 +1845,33 @@ static int mtk_snand_id_probe(struct mtk
return -EINVAL;
}
+#define MT7622_GPIO_BASE (void *)0x10211000
+#define MT7622_GPIO_DRIV(x) (MT7622_GPIO_BASE + 0x900 + 0x10 * x)
+
+void mtk_mt7622_snand_adjust_drive(void *dev, enum snand_drv drv)
+{
+ uint32_t e4, e8;
+
+ e4 = readl(MT7622_GPIO_DRIV(6)) & ~(0x3f00);
+ e8 = readl(MT7622_GPIO_DRIV(7)) & ~(0x3f00);
+
+ switch (drv) {
+ case SNAND_DRV_8mA:
+ e4 |= 0x3f00;
+ break;
+ case SNAND_DRV_12mA:
+ e8 |= 0x3f00;
+ break;
+ default:
+ return;
+ }
+
+ snand_log_chip(dev, "adjusting SPI-NAND pin drive strength to %umA\n", drv);
+
+ writel(e4, MT7622_GPIO_DRIV(6));
+ writel(e8, MT7622_GPIO_DRIV(7));
+}
+
int mtk_snand_init(void *dev, const struct mtk_snand_platdata *pdata,
struct mtk_snand **psnf)
{
@@ -1888,6 +1915,9 @@ int mtk_snand_init(void *dev, const stru
if (ret)
return ret;
+ if (pdata->soc == SNAND_SOC_MT7622 && snand_info->drv)
+ mtk_mt7622_snand_adjust_drive(dev, snand_info->drv);
+
rawpage_size = snand_info->memorg.pagesize +
snand_info->memorg.sparesize;

View File

@ -0,0 +1,135 @@
From 40a3661bebb3d738ab95b7de66e9d8382d5b9ab1 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Sun, 10 Mar 2024 17:48:09 +0000
Subject: [PATCH 3/3] mediatek: snfi: adjust drive strength to 12mA like old
loader does
In addition to FM35X1GA, also change the driver strength to 12mA for
all chips where this is done by the old/legacy U-Boot:
* Winbond 512Mb
* Winbond 1Gb
* Winbond 2Gb
* GD5F4GQ4UBYIG
* GD5F4GQ4UAYIG
* GD5F1GQ4UX
* GD5F1GQ4UE
* GD5F2GQ4UX
* GD5F2GQ4UE
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
.../apsoc_common/drivers/snfi/mtk-snand-ids.c | 59 ++++++++++++++-----
1 file changed, 44 insertions(+), 15 deletions(-)
--- a/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c
+++ b/plat/mediatek/apsoc_common/drivers/snfi/mtk-snand-ids.c
@@ -80,65 +80,94 @@ static const struct snand_flash_info sna
SNAND_INFO("W25N512GV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xaa, 0x20),
SNAND_MEMORG_512M_2K_64,
&snand_cap_read_from_cache_quad,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("W25N01GV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xaa, 0x21),
SNAND_MEMORG_1G_2K_64,
&snand_cap_read_from_cache_quad,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("W25M02GV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xab, 0x21),
SNAND_MEMORG_2G_2K_64_2D,
&snand_cap_read_from_cache_quad,
&snand_cap_program_load_x4,
- mtk_snand_winbond_select_die),
+ mtk_snand_winbond_select_die,
+ SNAND_DRV_12mA),
SNAND_INFO("W25N02KV", SNAND_ID(SNAND_ID_DYMMY, 0xef, 0xaa, 0x22),
SNAND_MEMORG_2G_2K_128,
&snand_cap_read_from_cache_quad,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F1GQ4UAWxx", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0x10),
SNAND_MEMORG_1G_2K_64,
&snand_cap_read_from_cache_quad_q2d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F1GQ4UExIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd1),
SNAND_MEMORG_1G_2K_128,
&snand_cap_read_from_cache_quad_q2d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F1GQ4UExxH", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd9),
SNAND_MEMORG_1G_2K_64,
&snand_cap_read_from_cache_quad_q2d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F1GQ4xAYIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xf1),
SNAND_MEMORG_1G_2K_64,
&snand_cap_read_from_cache_quad_q2d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F2GQ4UExIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd2),
SNAND_MEMORG_2G_2K_128,
&snand_cap_read_from_cache_quad_q2d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F2GQ5UExxH", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0x32),
SNAND_MEMORG_2G_2K_64,
&snand_cap_read_from_cache_quad_a8d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F2GQ4xAYIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xf2),
SNAND_MEMORG_2G_2K_64,
&snand_cap_read_from_cache_quad_q2d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F4GQ4UBxIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xd4),
SNAND_MEMORG_4G_4K_256,
&snand_cap_read_from_cache_quad_q2d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F4GQ4xAYIG", SNAND_ID(SNAND_ID_ADDR, 0xc8, 0xf4),
SNAND_MEMORG_4G_2K_64,
&snand_cap_read_from_cache_quad_q2d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F2GQ5UExxG", SNAND_ID(SNAND_ID_DYMMY, 0xc8, 0x52),
SNAND_MEMORG_2G_2K_128,
&snand_cap_read_from_cache_quad_a8d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("GD5F4GQ4UCxIG", SNAND_ID(SNAND_ID_DYMMY, 0xc8, 0xb4),
SNAND_MEMORG_4G_4K_256,
&snand_cap_read_from_cache_quad_q2d,
- &snand_cap_program_load_x4),
+ &snand_cap_program_load_x4,
+ NULL,
+ SNAND_DRV_12mA),
SNAND_INFO("MX35LF1GE4AB", SNAND_ID(SNAND_ID_DYMMY, 0xc2, 0x12),
SNAND_MEMORG_1G_2K_64,

View File

@ -1,81 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2022 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-rockchip-vendor
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/rockchip-linux/rkbin.git
PKG_SOURCE_DATE:=2022-08-01
PKG_SOURCE_VERSION:=b0c100f1a260d807df450019774993c761beb79d
PKG_MIRROR_HASH:=17723ac8f6ec446c759444ee29ba4fe544cebb3785e26d8e10c91c54b9df3f1a
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
MAKE_PATH:=$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/arm-trusted-firmware-rockchip-vendor
SECTION:=boot
CATEGORY:=Boot Loaders
TITLE:=ARM Trusted Firmware for Rockchip
endef
define Package/arm-trusted-firmware-rk3328
$(Package/arm-trusted-firmware-rockchip-vendor)
DEPENDS:=@TARGET_rockchip_armv8
VARIANT:=rk3328
endef
define Package/arm-trusted-firmware-rk3399
$(Package/arm-trusted-firmware-rockchip-vendor)
DEPENDS:=@TARGET_rockchip_armv8
VARIANT:=rk3399
endef
define Package/arm-trusted-firmware-rk3568
$(Package/arm-trusted-firmware-rockchip-vendor)
DEPENDS:=@TARGET_rockchip_armv8
VARIANT:=rk3568
endef
define Package/arm-trusted-firmware-rk3588
$(Package/arm-trusted-firmware-rockchip-vendor)
DEPENDS:=@TARGET_rockchip_armv8
VARIANT:=rk3588
endef
define Build/Configure
$(SED) 's,$$$$(PKG_BUILD_DIR),$(PKG_BUILD_DIR),g' $(PKG_BUILD_DIR)/trust.ini
$(SED) 's,$$$$(VARIANT),$(BUILD_VARIANT),g' $(PKG_BUILD_DIR)/trust.ini
$(call Build/Configure/Default)
endef
define Build/Compile
$(CURDIR)/pack-firmware.sh build $(BUILD_VARIANT) '$(PKG_BUILD_DIR)'
endef
define Build/InstallDev
$(CURDIR)/pack-firmware.sh install $(BUILD_VARIANT) '$(PKG_BUILD_DIR)' '$(STAGING_DIR_IMAGE)'
endef
define Package/arm-trusted-firmware-rk3328/install
endef
define Package/arm-trusted-firmware-rk3399/install
endef
define Package/arm-trusted-firmware-rk3568/install
endef
define Package/arm-trusted-firmware-rk3588/install
endef
$(eval $(call BuildPackage,arm-trusted-firmware-rk3328))
$(eval $(call BuildPackage,arm-trusted-firmware-rk3399))
$(eval $(call BuildPackage,arm-trusted-firmware-rk3568))
$(eval $(call BuildPackage,arm-trusted-firmware-rk3588))

View File

@ -1,60 +0,0 @@
#!/bin/bash
# Copyright (C) 2021 ImmortalWrt.org
ACTION="$1"
VARIANT="$2"
PKG_BUILD_DIR="$3"
STAGING_DIR_IMAGE="$4"
case "$VARIANT" in
"rk3328")
ATF="rk33/rk322xh_bl31_v1.49.elf"
DDR="rk33/rk3328_ddr_333MHz_v1.19.bin"
LOADER="rk33/rk322xh_miniloader_v2.50.bin"
;;
"rk3399")
ATF="rk33/rk3399_bl31_v1.35.elf"
DDR="rk33/rk3399_ddr_800MHz_v1.27.bin"
LOADER="rk33/rk3399_miniloader_v1.26.bin"
;;
"rk3568")
ATF="rk35/rk3568_bl31_v1.28.elf"
DDR="rk35/rk3568_ddr_1560MHz_v1.13.bin"
;;
"rk3588")
ATF="rk35/rk3588_bl31_v1.27.elf"
DDR="rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin"
;;
*)
echo -e "Not compatible with your platform: $VARIANT."
exit 1
;;
esac
set -x
if [ "$ACTION" == "build" ]; then
case "$VARIANT" in
rk33*)
"$PKG_BUILD_DIR"/tools/mkimage -n "$VARIANT" -T "rksd" -d "$PKG_BUILD_DIR/bin/$DDR" "$PKG_BUILD_DIR/$VARIANT-idbloader.bin"
cat "$PKG_BUILD_DIR/bin/$LOADER" >> "$PKG_BUILD_DIR/$VARIANT-idbloader.bin"
"$PKG_BUILD_DIR/tools/trust_merger" --replace "bl31.elf" "$PKG_BUILD_DIR/bin/$ATF" "$PKG_BUILD_DIR/trust.ini"
;;
esac
elif [ "$ACTION" == "install" ]; then
mkdir -p "$STAGING_DIR_IMAGE"
cp -fp "$PKG_BUILD_DIR/bin/$ATF" "$STAGING_DIR_IMAGE"/
case "$VARIANT" in
rk33*)
cp -fp "$PKG_BUILD_DIR/tools/loaderimage" "$STAGING_DIR_IMAGE"/
cp -fp "$PKG_BUILD_DIR/$VARIANT-idbloader.bin" "$STAGING_DIR_IMAGE"/
cp -fp "$PKG_BUILD_DIR/$VARIANT-trust.bin" "$STAGING_DIR_IMAGE"/
;;
rk35*)
cp -fp "$PKG_BUILD_DIR/bin/$DDR" "$STAGING_DIR_IMAGE"/
;;
esac
else
echo -e "Unknown operation: $ACTION."
exit 1
fi
set +x

View File

@ -7,43 +7,88 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-rockchip PKG_VERSION:=2.12
PKG_VERSION:=2.3
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE:=atf-v$(PKG_VERSION).tar.gz PKG_HASH:=b4c047493cac1152203e1ba121ae57267e4899b7bf56eb365e22a933342d31c9
PKG_SOURCE_URL:=https://github.com/atf-builds/atf/releases/download/v$(PKG_VERSION)/atf-v$(PKG_VERSION).tar.gz?
PKG_HASH:=bf352298743aed594cf2958dd588e06ab6713fc514bb6f809bf55a85a87134c1
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=license.md
PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de> PKG_MAINTAINER:=Tobias Maedel <openwrt@tbspace.de>
MAKE_PATH:=$(PKG_NAME) include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/trusted-firmware-a.mk
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
define Package/arm-trusted-firmware-rockchip define Trusted-Firmware-A/Default
SECTION:=boot NAME:=Rockchip $(1) SoCs
CATEGORY:=Boot Loaders BUILD_TARGET:=rockchip
TITLE:=ARM Trusted Firmware for Rockchip
DEPENDS:=@TARGET_rockchip_armv8
endef endef
define Build/Prepare define Trusted-Firmware-A/rk3328
$(TAR) -C $(PKG_BUILD_DIR) -xf $(DL_DIR)/$(PKG_SOURCE) BUILD_SUBTARGET:=armv8
PLAT=rk3328
endef endef
define Trusted-Firmware-A/rk3399
BUILD_SUBTARGET:=armv8
PLAT:=rk3399
endef
define Trusted-Firmware-A/rk3568
BUILD_SUBTARGET:=armv8
PLAT:=rk3568
endef
define Trusted-Firmware-A/rk3588
BUILD_SUBTARGET:=armv8
PLAT:=rk3588
endef
TFA_TARGETS:= \
rk3328 \
rk3399 \
rk3568 \
rk3588
ifeq ($(BUILD_VARIANT),rk3399)
M0_GCC_NAME:=gcc-arm
M0_GCC_RELEASE:=11.2-2022.02
M0_GCC_VERSION:=$(HOST_ARCH)-arm-none-eabi
M0_GCC_SOURCE:=$(M0_GCC_NAME)-$(M0_GCC_RELEASE)-$(M0_GCC_VERSION).tar.xz
define Download/m0-gcc
FILE:=$(M0_GCC_SOURCE)
URL:=https://developer.arm.com/-/media/Files/downloads/gnu/$(M0_GCC_RELEASE)/binrel
ifeq ($(HOST_ARCH),aarch64)
HASH:=ef1d82e5894e3908cb7ed49c5485b5b95deefa32872f79c2b5f6f5447cabf55f
else
HASH:=8c5acd5ae567c0100245b0556941c237369f210bceb196edfe5a2e7532c60326
endif
endef
define Build/Prepare
$(eval $(call Download,m0-gcc))
$(call Build/Prepare/Default)
xzcat $(DL_DIR)/$(M0_GCC_SOURCE) | $(HOST_TAR) -C $(PKG_BUILD_DIR)/ $(TAR_OPTIONS)
endef
TFA_MAKE_FLAGS+= \
M0_CROSS_COMPILE=$(PKG_BUILD_DIR)/$(M0_GCC_NAME)-$(M0_GCC_RELEASE)-$(M0_GCC_VERSION)/bin/arm-none-eabi-
endif
define Build/Compile define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
CROSS_COMPILE=$(TARGET_CROSS) \
OPENSSL_DIR=$(STAGING_DIR_HOST) \
$(if $(DTC),DTC="$(DTC)") \
PLAT=$(PLAT) \
BUILD_STRING="OpenWrt ($(VARIANT))" \
$(TFA_MAKE_FLAGS)
endef endef
define Build/InstallDev define Package/trusted-firmware-a/install
$(INSTALL_DIR) -p $(STAGING_DIR_IMAGE) $(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/rk*.elf $(STAGING_DIR_IMAGE)/ $(INSTALL_DATA) $(PKG_BUILD_DIR)/build/$(PLAT)/release/bl31/bl31.elf $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)_bl31.elf
endef endef
define Package/arm-trusted-firmware-rockchip/install $(eval $(call BuildPackage/Trusted-Firmware-A))
endef
$(eval $(call BuildPackage,arm-trusted-firmware-rockchip))

View File

@ -7,14 +7,10 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-sunxi PKG_VERSION:=2.10
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git PKG_HASH:=88215a62291b9ba87da8e50b077741103cdc08fb6c9e1ebd34dfaace746d3201
PKG_SOURCE_URL=https://github.com/ARM-software/arm-trusted-firmware
PKG_SOURCE_DATE:=2020-11-17
PKG_SOURCE_VERSION:=e2c509a39c6cc4dda8734e6509cdbe6e3603cdfc
PKG_MIRROR_HASH:=b212d369a5286ebbf6a5616486efa05fa54d4294fd6e9ba2e54fdfae9eda918d
PKG_LICENSE:=BSD-3-Clause PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=license.md PKG_LICENSE_FILES:=license.md
@ -40,9 +36,15 @@ define Trusted-Firmware-A/sunxi-h6
PLAT:=sun50i_h6 PLAT:=sun50i_h6
endef endef
define Trusted-Firmware-A/sunxi-h616
NAME:=Allwinner H616
PLAT:=sun50i_h616
endef
TFA_TARGETS:= \ TFA_TARGETS:= \
sunxi-a64 \ sunxi-a64 \
sunxi-h6 sunxi-h6 \
sunxi-h616
define Package/trusted-firmware-a/install define Package/trusted-firmware-a/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE) $(INSTALL_DIR) $(STAGING_DIR_IMAGE)

View File

@ -8,9 +8,9 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=arm-trusted-firmware-tools PKG_NAME:=arm-trusted-firmware-tools
PKG_VERSION:=2.7 PKG_VERSION:=2.9
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_HASH:=53422dc649153838e03820330ba17cb10afe3e330ecde0db11e4d5f1361a33e6 PKG_HASH:=76a66a1de0c01aeb83dfc7b72b51173fe62c6e51d6fca17cc562393117bed08b
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org> PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
PKG_HOST_ONLY:=1 PKG_HOST_ONLY:=1

View File

@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=grub PKG_NAME:=grub
PKG_VERSION:=2.06 PKG_VERSION:=2.12
PKG_RELEASE:=$(AUTORELEASE) PKG_RELEASE:=6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@GNU/grub PKG_SOURCE_URL:=@GNU/grub
PKG_HASH:=b79ea44af91b93d17cd3fe80bdae6ed43770678a9a5ae192ccea803ebb657ee1 PKG_HASH:=f3c97391f7c4eaa677a78e090c7e97e6dc47b16f655f04683ebd37bef7fe0faa
PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE:=GPL-3.0-or-later
PKG_CPE_ID:=cpe:/a:gnu:grub2 PKG_CPE_ID:=cpe:/a:gnu:grub2
@ -25,6 +25,7 @@ ifneq ($(BUILD_VARIANT),none)
endif endif
PKG_FLAGS:=nonshared PKG_FLAGS:=nonshared
PKG_BUILD_FLAGS:=no-gc-sections no-lto no-mold
include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
@ -32,14 +33,18 @@ include $(INCLUDE_DIR)/package.mk
define Package/grub2/Default define Package/grub2/Default
CATEGORY:=Boot Loaders CATEGORY:=Boot Loaders
SECTION:=boot SECTION:=boot
TITLE:=GRand Unified Bootloader ($(1)) TITLE:=GRand Unified Bootloader ($(2))
URL:=http://www.gnu.org/software/grub/ URL:=http://www.gnu.org/software/grub/
DEPENDS:=@TARGET_x86 DEPENDS:=@(TARGET_x86||TARGET_armsr||TARGET_armvirt||TARGET_phytium_armv8||TARGET_loongarch64)
VARIANT:=$(1) VARIANT:=$(2)
endef endef
Package/grub2=$(call Package/grub2/Default,pc) Package/grub2=$(call Package/grub2/Default,x86,pc)
Package/grub2-efi=$(call Package/grub2/Default,efi) Package/grub2-efi=$(call Package/grub2/Default,x86,efi)
Package/grub2-efi-arm=$(call Package/grub2/Default,armsr,efi)
Package/grub2-efi-arm=$(call Package/grub2/Default,armvirt,efi)
Package/grub2-efi-arm=$(call Package/grub2/Default,phytium_armv8,efi)
Package/grub2-efi-loongarch64=$(call Package/grub2/Default,loongarch64,efi)
define Package/grub2-editenv define Package/grub2-editenv
CATEGORY:=Utilities CATEGORY:=Utilities
@ -106,6 +111,10 @@ ifneq ($(BUILD_VARIANT),none)
MAKE_PATH := grub-core MAKE_PATH := grub-core
endif endif
ifeq ($(CONFIG_arm),y)
TARGET_CFLAGS := $(filter-out -mfloat-abi=hard,$(TARGET_CFLAGS))
endif
define Host/Configure define Host/Configure
$(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in $(SED) 's,(RANLIB),(TARGET_RANLIB),' $(HOST_BUILD_DIR)/grub-core/Makefile.in
$(Host/Configure/Default) $(Host/Configure/Default)
@ -122,14 +131,14 @@ define Package/grub2/install
-O i386-pc \ -O i386-pc \
-c $(PKG_BUILD_DIR)/grub-early.cfg \ -c $(PKG_BUILD_DIR)/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \ -o $(STAGING_DIR_IMAGE)/grub2/gpt-core.img \
at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot search serial vga at_keyboard biosdisk boot chain configfile fat linux ls part_gpt reboot search serial test vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \ $(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \ -d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \ -p /boot/grub \
-O i386-pc \ -O i386-pc \
-c ./files/grub-early.cfg \ -c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \ -o $(STAGING_DIR_IMAGE)/grub2/generic-core.img \
at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial vga at_keyboard biosdisk boot chain configfile ext2 linux ls part_msdos reboot search serial test vga
$(STAGING_DIR_HOST)/bin/grub-mkimage \ $(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \ -d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \ -p /boot/grub \
@ -154,16 +163,51 @@ define Package/grub2-efi/install
-O $(CONFIG_ARCH)-efi \ -O $(CONFIG_ARCH)-efi \
-c $(PKG_BUILD_DIR)/grub-early.cfg \ -c $(PKG_BUILD_DIR)/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_x86_64),x64,ia32).efi \ -o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_x86_64),x64,ia32).efi \
at_keyboard boot chain configfile fat linux ls part_gpt reboot serial efi_gop efi_uga at_keyboard boot chain configfile fat linux ls part_gpt reboot serial test efi_gop efi_uga
$(STAGING_DIR_HOST)/bin/grub-mkimage \ $(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \ -d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \ -p /boot/grub \
-O $(CONFIG_ARCH)-efi \ -O $(CONFIG_ARCH)-efi \
-c ./files/grub-early.cfg \ -c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/iso-boot$(if $(CONFIG_x86_64),x64,ia32).efi \ -o $(STAGING_DIR_IMAGE)/grub2/iso-boot$(if $(CONFIG_x86_64),x64,ia32).efi \
at_keyboard boot chain configfile fat iso9660 linux ls part_msdos part_gpt reboot serial test efi_gop efi_uga boot chain configfile fat iso9660 linux ls part_msdos part_gpt reboot serial test efi_gop efi_uga
endef endef
define Package/grub2-efi-arm/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)/grub2
cp ./files/grub-early-gpt.cfg $(PKG_BUILD_DIR)/grub-early.cfg
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O arm$(if $(CONFIG_aarch64),64,)-efi \
-c $(PKG_BUILD_DIR)/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/boot$(if $(CONFIG_aarch64),aa64,arm).efi \
boot chain configfile fat linux ls part_gpt part_msdos reboot search \
search_fs_uuid search_label serial efi_gop lsefi minicmd ext2
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O arm$(if $(CONFIG_aarch64),64,)-efi \
-c ./files/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/iso-bootaa$(if $(CONFIG_aarch64),aa64,arm).efi \
boot chain configfile fat iso9660 linux ls lsefi minicmd part_msdos part_gpt \
reboot serial test efi_gop
endef
define Package/grub2-efi-loongarch64/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)/grub2
cp ./files/grub-early-gpt.cfg $(PKG_BUILD_DIR)/grub-early.cfg
$(STAGING_DIR_HOST)/bin/grub-mkimage \
-d $(PKG_BUILD_DIR)/grub-core \
-p /boot/grub \
-O loongarch64-efi \
-c $(PKG_BUILD_DIR)/grub-early.cfg \
-o $(STAGING_DIR_IMAGE)/grub2/bootloongarch64.efi \
boot chain configfile fat linux ls lsefi minicmd part_gpt part_msdos reboot search \
search_fs_uuid search_label serial efi_gop all_video gfxterm ext2
endef
define Package/grub2-editenv/install define Package/grub2-editenv/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/grub-editenv $(1)/usr/sbin/
@ -177,5 +221,7 @@ endef
$(eval $(call HostBuild)) $(eval $(call HostBuild))
$(eval $(call BuildPackage,grub2)) $(eval $(call BuildPackage,grub2))
$(eval $(call BuildPackage,grub2-efi)) $(eval $(call BuildPackage,grub2-efi))
$(eval $(call BuildPackage,grub2-efi-arm))
$(eval $(call BuildPackage,grub2-efi-loongarch64))
$(eval $(call BuildPackage,grub2-editenv)) $(eval $(call BuildPackage,grub2-editenv))
$(eval $(call BuildPackage,grub2-bios-setup)) $(eval $(call BuildPackage,grub2-bios-setup))

View File

@ -0,0 +1,2 @@
search --set=root --label kernel
configfile ($root)/efi/openwrt/grub.cfg

View File

@ -0,0 +1,36 @@
From 4d4dae6a52b1749642261a15f5dcc1e3d4150b36 Mon Sep 17 00:00:00 2001
From: Julien Olivain <ju.o@free.fr>
Date: Fri, 22 Dec 2023 19:02:53 +0100
Subject: [PATCH] Add missing grub-core/extra_deps.lst file in release tarball
A file is missing in the grub-2.12 release tarballs (both .gz and .xz).
See [1]. The issue was reported in [2] and fixed upstream in [3].
This patch adds the missing file, on top of the release tarball. This
patch won't apply on upstream git, since the file is present in the
source repository. Since the issue is fixed upstream in [3], it is
expected upcoming releases tarballs will include the file.
The file content was fetched from the upstream git repo:
https://git.savannah.gnu.org/gitweb/?p=grub.git;a=blob_plain;f=grub-core/extra_deps.lst;hb=refs/tags/grub-2.12
[1] https://ftp.gnu.org/gnu/grub/grub-2.12.tar.xz
[2] https://lists.gnu.org/archive/html/grub-devel/2023-12/msg00054.html
[3] https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=b835601c7639ed1890f2d3db91900a8506011a8e
Signed-off-by: Julien Olivain <ju.o@free.fr>
Upstream: Fixed by: https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=b835601c7639ed1890f2d3db91900a8506011a8e
---
grub-core/extra_deps.lst | 1 +
1 file changed, 1 insertion(+)
create mode 100644 grub-core/extra_deps.lst
diff --git a/grub-core/extra_deps.lst b/grub-core/extra_deps.lst
new file mode 100644
index 0000000..f44ad6a
--- /dev/null
+++ b/grub-core/extra_deps.lst
@@ -0,0 +1 @@
+depends bli part_gpt
--
2.43.0

View File

@ -0,0 +1,63 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2022 OpenWrt.org
#
include $(TOPDIR)/rules.mk
PKG_NAME:=opensbi
PKG_RELEASE:=1.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/riscv/opensbi
PKG_SOURCE_DATE:=2022-12-24
PKG_SOURCE_VERSION:=6b5188ca14e59ce7bf71afe4e7d3d557c3d31bf8
PKG_MIRROR_HASH:=edcdd99da6c62975171981c0aa2b73a27091067da11ccd49816b5ad27d000858
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_TARGETS:=bin
PKG_FLAGS:=nonshared
PKG_LICENSE:=BSD-2-Clause
PKG_LICENSE_FILES:=COPYING.BSD
PKG_BUILD_PARALLEL:=1
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
include $(INCLUDE_DIR)/package.mk
define Package/opensbi
SECTION:=boot
CATEGORY:=Boot Loaders
DEPENDS:=@TARGET_sifiveu
URL:=https://github.com/riscv/opensbi/blob/master/README.md
VARIANT:=$(subst _,/,$(subst opensbi_,,$(1)))
TITLE:=OpenSBI generic
OPENSBI_IMAGE:=
PLAT:=
endef
define Package/opensbi_generic
$(Package/opensbi)
TITLE:=OpenSBI generic
OPENSBI_IMAGE:=fw_dynamic.bin
PLAT:=generic
endef
export GCC_HONOUR_COPTS=s
MAKE_VARS = \
CROSS_COMPILE="$(TARGET_CROSS)"
define Build/Compile
$(eval $(Package/opensbi_$(BUILD_VARIANT))) \
+$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) \
PLATFORM=$(PLAT)
endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/build/platform/$(PLAT)/firmware/fw_dynamic.bin $(STAGING_DIR_IMAGE)/fw_dynamic-${BUILD_VARIANT}.bin
endef
$(eval $(call BuildPackage,opensbi_generic))

View File

@ -0,0 +1,129 @@
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2021-2023 ImmortalWrt.org
include $(TOPDIR)/rules.mk
PKG_NAME:=rkbin
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/rockchip-linux/rkbin.git
PKG_SOURCE_DATE:=2024-10-18
PKG_SOURCE_VERSION:=12660714c81be85350a4092542e2ff599aa5adcb
PKG_MIRROR_HASH:=30f8ba3ca250dac4c60d1b642e7b3436daf091ace67f600a3bfdd5983bfa98a6
PKG_LICENSE_FILES:=LICENSE
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
include $(INCLUDE_DIR)/package.mk
define Build/rkbin/Target
$(eval $(call rkbin/Default,$(1)))
$(eval $(call rkbin/$(1),$(1)))
define Package/rkbin-$(1)
SECTION:=boot
CATEGORY:=Boot Loaders
TITLE:=Rockchip rkbin for $(1) SoCs
DEPENDS:=$(DEPENDS)
VARIANT:=$(1)
endef
define Package/rkbin-$(1)/install
$$(Package/rkbin/install)
endef
endef
define rkbin/rk3328
DEPENDS:=@TARGET_rockchip_armv8
ATF:=rk33/rk322xh_bl31_v1.49.elf
TPL:=rk33/rk3328_ddr_333MHz_v1.19.bin
SPL:=rk33/rk322xh_miniloader_v2.50.bin
endef
define rkbin/rk3399
DEPENDS:=@TARGET_rockchip_armv8
ATF:=rk33/rk3399_bl31_v1.36.elf
TPL:=rk33/rk3399_ddr_800MHz_v1.30.bin
SPL:=rk33/rk3399_miniloader_v1.30.bin
endef
define rkbin/rk3528
DEPENDS:=@TARGET_rockchip_armv8
ATF:=rk35/rk3528_bl31_v1.17.elf
TPL:=rk35/rk3528_ddr_1056MHz_v1.10.bin
endef
define rkbin/rk3566
DEPENDS:=@TARGET_rockchip_armv8
ATF:=rk35/rk3568_bl31_v1.44.elf
TPL:=rk35/rk3566_ddr_1056MHz_v1.23.bin
endef
define rkbin/rk3568
DEPENDS:=@TARGET_rockchip_armv8
ATF:=rk35/rk3568_bl31_v1.44.elf
TPL:=rk35/rk3568_ddr_1560MHz_v1.23.bin
endef
define rkbin/rk3576
DEPENDS:=@TARGET_rockchip_armv8
ATF:=rk35/rk3576_bl31_v1.12.elf
TPL:=rk35/rk3576_ddr_lp4_2112MHz_lp5_2736MHz_v1.08.bin
endef
define rkbin/rk3588
DEPENDS:=@TARGET_rockchip_armv8
ATF:=rk35/rk3588_bl31_v1.47.elf
TPL:=rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin
endef
VARIANTS:= \
rk3328 \
rk3399 \
rk3528 \
rk3566 \
rk3568 \
rk3576 \
rk3588
define Build/Compile
@echo Building idbLoader from Rockchip rkbin project...
ifneq ($(SPL),)
( \
pushd $(PKG_BUILD_DIR) ; \
$(SED) 's,$$$$(PKG_BUILD_DIR),$(PKG_BUILD_DIR),g' trust.ini ; \
$(SED) 's,$$$$(VARIANT),$(BUILD_VARIANT),g' trust.ini ; \
./tools/mkimage -n $(BUILD_VARIANT) -T rksd -d bin/$(TPL) \
$(BUILD_VARIANT)-idbloader.bin ; \
cat bin/$(SPL) >> $(BUILD_VARIANT)-idbloader.bin ; \
./tools/trust_merger --replace bl31.elf bin/$(ATF) trust.ini ; \
popd ; \
)
endif
endef
define BuildPackage/rkbin
$(foreach type,$(if $(DUMP),$(VARIANTS),$(BUILD_VARIANT)), \
$(eval $(call Build/rkbin/Target,$(type)))
)
$(eval $(call Build/DefaultTargets))
$(foreach type,$(if $(DUMP),$(VARIANTS),$(BUILD_VARIANT)), \
$(call BuildPackage,rkbin-$(type))
)
endef
define Package/rkbin/install
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/bin/$(ATF) $(STAGING_DIR_IMAGE)/
$(CP) $(PKG_BUILD_DIR)/bin/$(TPL) $(STAGING_DIR_IMAGE)/
ifneq ($(SPL),)
$(CP) $(PKG_BUILD_DIR)/tools/loaderimage $(STAGING_DIR_IMAGE)/
$(CP) $(PKG_BUILD_DIR)/$(BUILD_VARIANT)-idbloader.bin $(STAGING_DIR_IMAGE)/
$(CP) $(PKG_BUILD_DIR)/$(BUILD_VARIANT)-trust.bin $(STAGING_DIR_IMAGE)/
endif
endef
$(eval $(call BuildPackage/rkbin))

View File

@ -0,0 +1,57 @@
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_VERSION:=20240315
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=default
PKG_SOURCE:=ophub-uboot-prebuilt-git-$(PKG_VERSION).tar.gz
PKG_SOURCE_VERSION:=abe491ab386607f9ab0d66728e5766bc5d7e8a20
PKG_SOURCE_URL_FILE:=$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/ophub/u-boot/archive/
PKG_HASH:=3f98f5728f48d13f33cf4fd21fb6032a625ad3c61aa2e8073dda821f71f067ec
PKG_MAINTAINER:=ophub
include $(INCLUDE_DIR)/u-boot.mk
include $(INCLUDE_DIR)/package.mk
TAR_OPTIONS:=--strip-components 1 $(TAR_OPTIONS)
TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS)
define U-Boot/Default
BUILD_TARGET:=amlogic
UENV:=default
HIDDEN:=1
DEFAULT:=y
endef
define U-Boot/phicomm-n1
NAME:=Phicomm N1
OVERLAY:=u-boot-n1.bin
BUILD_SUBTARGET:=mesongx
BUILD_DEVICES:=phicomm_n1
endef
UBOOT_TARGETS := phicomm-n1
define Build/Configure
true
endef
define Build/Compile
true
endef
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
$(CP) $(PKG_BUILD_DIR)/u-boot/amlogic/overload/$(OVERLAY) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-u-boot-overlay.bin
endef
define Package/u-boot/install/default
endef
$(eval $(call BuildPackage/U-Boot))

View File

@ -19,6 +19,7 @@ alfa-network,n5q|\
alfa-network,pi-wifi4|\ alfa-network,pi-wifi4|\
alfa-network,r36a|\ alfa-network,r36a|\
alfa-network,tube-2hq|\ alfa-network,tube-2hq|\
alibaba,ap121-db|\
allnet,all-wap02860ac|\ allnet,all-wap02860ac|\
araknis,an-300-ap-i-n|\ araknis,an-300-ap-i-n|\
araknis,an-500-ap-i-ac|\ araknis,an-500-ap-i-ac|\
@ -85,6 +86,7 @@ yuncore,a930|\
yuncore,xd3200|\ yuncore,xd3200|\
yuncore,xd4200|\ yuncore,xd4200|\
ziking,cpe46b|\ ziking,cpe46b|\
zte,e8820|\
zyxel,nbg6616) zyxel,nbg6616)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000" ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x10000"
;; ;;

View File

@ -32,6 +32,8 @@ ubootenv_mtdinfo () {
case "$board" in case "$board" in
alfa-network,ap120c-ac|\ alfa-network,ap120c-ac|\
alibaba,ap4220-48m|\
alibaba,ap4220-128m|\
devolo,magic-2-wifi-next|\ devolo,magic-2-wifi-next|\
edgecore,ecw5211|\ edgecore,ecw5211|\
glinet,gl-a1300 |\ glinet,gl-a1300 |\

View File

@ -1,47 +0,0 @@
[ -e /etc/config/ubootenv ] && exit 0
touch /etc/config/ubootenv
. /lib/uboot-envtools.sh
. /lib/functions.sh
board=$(board_name)
case "$board" in
dynalink,dl-wrx36)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
;;
edgecore,eap102|\
zyxel,nbg7815)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
;;
edimax,cax1800)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
;;
redmi,ax6|\
xiaomi,ax3600|\
xiaomi,ax9000)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
idx2="$(find_mtd_index bdata)"
[ -n "$idx2" ] && \
ubootenv_add_uci_sys_config "/dev/mtd$idx2" "0x0" "0x10000" "0x20000"
;;
qnap,301w)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
;;
esac
config_load ubootenv
config_foreach ubootenv_add_app_config
exit 0

View File

@ -12,7 +12,9 @@ touch /etc/config/ubootenv
board=$(board_name) board=$(board_name)
case "$board" in case "$board" in
bananapi,bpi-r3) bananapi,bpi-r3|\
bananapi,bpi-r4|\
bananapi,bpi-r4-poe)
case "$(cmdline_get_var root)" in case "$(cmdline_get_var root)" in
/dev/mmc*) /dev/mmc*)
local envdev=$(find_mmc_part "ubootenv" $rootdev) local envdev=$(find_mmc_part "ubootenv" $rootdev)
@ -34,6 +36,24 @@ bananapi,bpi-r3)
;; ;;
esac esac
;; ;;
cetron,ct3003|\
imou,lc-hx3001)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;
glinet,gl-mt2500|\
glinet,gl-mt6000)
local envdev=$(find_mmc_part "u-boot-env")
ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
;;
glinet,gl-mt3000)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
;;
openembed,som7981)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x80000"
ubootenv_add_uci_sys_config "/dev/mtd3" "0x0" "0x100000" "0x100000"
;;
xiaomi,mi-router-wr30u|\
xiaomi,mi-router-ax3000t|\
xiaomi,redmi-router-ax6000) xiaomi,redmi-router-ax6000)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000" ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000" ubootenv_add_uci_sys_config "/dev/mtd2" "0x0" "0x10000" "0x20000"

View File

@ -0,0 +1,61 @@
[ -e /etc/config/ubootenv ] && exit 0
touch /etc/config/ubootenv
. /lib/uboot-envtools.sh
. /lib/functions.sh
board=$(board_name)
case "$board" in
compex,wpq873|\
edgecore,eap102|\
zyxel,nbg7815)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1"
;;
dynalink,dl-wrx36|\
glinet,gl-ax1800|\
glinet,gl-axt1800|\
netgear,rax120v2|\
netgear,wax218|\
netgear,wax620|\
netgear,wax630)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
;;
edimax,cax1800)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x20000"
;;
linksys,mr7350|\
linksys,mx4200v1|\
linksys,mx4200v2)
idx="$(find_mtd_index u_env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
;;
prpl,haze)
mmcpart="$(find_mmc_part 0:APPSBLENV)"
[ -n "$mmcpart" ] && \
ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x400" "0x100"
;;
qnap,301w)
idx="$(find_mtd_index 0:appsblenv)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
;;
redmi,ax5-jdcloud)
mmcpart="$(find_mmc_part 0:APPSBLENV)"
[ -n "$mmcpart" ] && \
ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x20000" "2"
;;
esac
config_load ubootenv
config_foreach ubootenv_add_app_config
exit 0

View File

@ -34,6 +34,7 @@ beeline,smartbox-turbo-plus)
;; ;;
buffalo,wsr-1166dhp|\ buffalo,wsr-1166dhp|\
buffalo,wsr-600dhp|\ buffalo,wsr-600dhp|\
huasifei,mt7621dtu|\
mediatek,linkit-smart-7688|\ mediatek,linkit-smart-7688|\
samknows,whitebox-v8|\ samknows,whitebox-v8|\
xiaomi,mi-router-4c|\ xiaomi,mi-router-4c|\
@ -42,16 +43,18 @@ zbtlink,zbt-wg2626|\
zte,mf283plus) zte,mf283plus)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000" ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x10000"
;; ;;
h3c,tx1800-plus|\
h3c,tx1801-plus|\
h3c,tx1806|\
jcg,q20)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;
hootoo,ht-tm05|\ hootoo,ht-tm05|\
ravpower,rp-wd03) ravpower,rp-wd03)
idx="$(find_mtd_index u-boot-env)" idx="$(find_mtd_index u-boot-env)"
[ -n "$idx" ] && \ [ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000" ubootenv_add_uci_config "/dev/mtd$idx" "0x4000" "0x1000" "0x1000"
;; ;;
c-life,xg1|\
jcg,q20)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
;;
linksys,ea7300-v1|\ linksys,ea7300-v1|\
linksys,ea7500-v2|\ linksys,ea7500-v2|\
linksys,ea8100-v1|\ linksys,ea8100-v1|\

View File

@ -0,0 +1,22 @@
#
# Copyright (C) 2023 OpenWrt.org
#
[ -e /etc/config/ubootenv ] && exit 0
touch /etc/config/ubootenv
. /lib/uboot-envtools.sh
. /lib/functions.sh
board=$(board_name)
case "$board" in
lyt,t68m)
ubootenv_add_uci_config "/dev/mmcblk0" "0x3f8000" "0x8000"
;;
esac
config_load ubootenv
config_foreach ubootenv_add_app_config
exit 0

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