Compare commits

..

2152 Commits

Author SHA1 Message Date
Linus Walleij
f9b1222258 kernel: modules: Fix RTL8366RB title
The title of the RTL8366RB was wrong, probably a pure
copy/paste bug by me.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2025-04-16 22:10:16 +08:00
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
coolsnowwolf
72efda15b7 Version update to R23.4.1 2023-03-31 13:49:17 +08:00
coolsnowwolf
854ee73cb6 kernel: bump to 6.1.22 2023-03-31 13:34:43 +08:00
coolsnowwolf
aaa79b3864 autocore: fix 12th/13th P cores count with HT 2023-03-31 12:54:30 +08:00
coolsnowwolf
39461eaf77 linux-firmware: add Intel 12th/13th and N95/N100/N300 video drm GuC and HuC support 2023-03-31 12:44:10 +08:00
coolsnowwolf
7088765b10 x86: add ChangWang AD12 (12th Hydrid) model support 2023-03-30 23:28:24 +08:00
coolsnowwolf
8d5e5226c4 autocore: add Intel 12/13th Hydrid P cores and E cores 2023-03-30 23:13:16 +08:00
coolsnowwolf
0747f72a7f base-files: force remount ext4 rootfs when power-off by accident last time 2023-03-29 18:32:18 +08:00
coolsnowwolf
5969d62e82 rockchip: add kernel 6.1 support for R5C 2023-03-29 18:25:11 +08:00
coolsnowwolf
e0e0e9c9cb rockchip: add FriendlyElec NanoPi R5C support 2023-03-29 18:13:02 +08:00
coolsnowwolf
977bf86ccd ramips: switch to kernel 5.10 2023-03-29 16:53:25 +08:00
Hauke Mehrtens
11a39777bc kernel: kmod-net-rtl8192su: Remove package
The R8712U driver depends on cfg80211. cfg80211 is provided by mac80211
backports, we can not build any in kernel drivers which depend on
cfg80211 which is an out of tree module in OpenWrt.

The cfg80211 dependency was added with kernel 5.9.

We could add rtl8192su to backports and build it from there.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-28 23:01:34 +08:00
Felix Fietkau
6b2559f0aa linux-firmware: add mt7986 offload firmware
This is needed for WED support on MT7986.
Enable it by default for the filogic subtarget.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-03-28 23:00:04 +08:00
Quintin Hill
f2e888d0fc linux-firmware: add rtl8761 bluetooth firmware
Realtek bluetooth devices need firmware.  Add packages for some of
these.

Tested on a WNDR3700v4 with rtl8761bu firmware.

Signed-off-by: Quintin Hill <stuff@quintin.me.uk>
2023-03-28 22:58:52 +08:00
Christian Marangi
9b338b090e generic: 5.15: refresh kernel patches
Refresh kernel patches for generic kernel 5.15 due to new backport
version of MGLRU patchset.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-03-27 23:14:03 +08:00
Kazuki H
3020cc8e7d kernel: Update MGLRU patchset
The current patches are old, update them from mainline.
Backports taken from https://github.com/yuzhaogoogle/linux/commits/mglru-5.15

Tested-by: Kazuki H <kazukih0205@gmail.com> #mt7622/Linksys E8450 UBI
Signed-off-by: Kazuki H <kazukih0205@gmail.com>
2023-03-27 23:12:43 +08:00
David Bauer
57ec2f4f11 filogic: add support for ASUS TUF-AX4200
Hardware
--------
SOC:   MediaTek MT7986
RAM:   512MB DDR3
FLASH: 256MB SPI-NAND (Winbond W25N02KV)
WIFI:  Mediatek MT7986 DBDC 802.11ax 2.4/5 GHz
ETH:   MediaTek MT7531 Switch
       MaxLinear GPY211C 2.5 N-Base-T PHY
UART:  3V3 115200 8N1 (Pinout silkscreened / Do not ocnnect VCC)

Installation
------------

1. Download the OpenWrt initramfs image. Copy the image to a TFTP server
   reachable at 192.168.1.66/24. Rename the image to tufax4200.bin.

2. Connect the TFTP server to the AX4200. Conect to the serial console,
   interrupt the autoboot process by pressing '4' when prompted.

3. Download & Boot the OpenWrt initramfs image.

   $ setenv ipaddr 192.168.1.1
   $ setenv serverip 192.168.1.66
   $ tftpboot 0x46000000 tufax4200.bin
   $ bootm 0x46000000

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

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

Missing features
----------------

 - The LAN port LEDs are driven by the switch but OpenWrt does not
   correctly configure the output.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-26 22:18:00 +08:00
David Bauer
edaba11e4b generic: mxl-gpy: allow configuring LED registers
Add a patch to allow modification of the PHY LED configuration. This is
required for boards, where the reset configuration of LED functions is
incompatibe with the usage of the device LEDs.

This is the case for the ASUS TUF-AX4200 Wireless router. It requires
modification of the LED configuration because as the WAN LED on the
front of the device is driven by the PHY. Without patching, it would
only illuminate in case the Link speed is 100 Mbit/s.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-26 22:14:05 +08:00
David Bauer
2dff7b910a mediatek: enable bootargs-override for filogic subtarget
The ASUS TUF-AX4200 bootloader adds invalid parameters for the rootfs.
Without overwriting the cmdline, the kernel crashes when trying to
attach the rootfs, as OpenWrt uses a different partition than the vendor
OS.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-26 22:12:10 +08:00
David Bauer
fb79a1059d generic: backport Winbond W25N02KV SPI-NAND support
This flash-chip is used on the Asus TUF-AX4200 and TUF-AX6000 routers.

As the filogic target only uses kernel 5.15, skip the 5.10 backport.

Signed-off-by: David Bauer <mail@david-bauer.net>
2023-03-26 22:11:35 +08:00
Kyosuke Nekoyashiki
85fc52c36e mac80211: fixes ath10k sdio support 2023-03-25 23:09:00 +08:00
aiamadeus
edcc283381 r8169: add LED configuration from OF 2023-03-25 23:05:16 +08:00
aiamadeus
ae12d2f77b rockchip: refresh kernel 5.15 config
Also fixes: #11019
2023-03-24 22:28:07 +08:00
aiamadeus
45898e59c5 rockchip: add support for HINLINK OPC-H69K 2023-03-24 22:25:08 +08:00
coolsnowwolf
abc7a549ef modules: drop bluetooth btbcm.ko as upstream 2023-03-23 20:02:03 +08:00
lovehackintosh
f4acd500a8
kernel: bump to 5.4.238, 5.10.176, 5.15.104, 6.1.21 (#11026)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-03-23 07:36:05 +00:00
AmadeusGhost
f9f0739a2b rockchip: move common used parts to dtsi for m68s 2023-03-22 23:08:19 +08:00
littoy
e140f67443
add missing glk_guc_70.1.1.bin for intel 10th gpu (#11021) 2023-03-22 20:46:49 +08:00
mleaf
229ba8e4a3
rockchip: add support for EZPRO Mrkaio M68S PLUS (#11020)
Specifications:

  CPU: RK3568B2 up to 2.0GHz
  NPU: 1TOPS
  RAM: 4GB
  Storage: 32G EMMC
  Ethernet: 2x 2.5G ports

Signed-off-by: mleaf <mleaf90@gmail.com>
2023-03-21 14:20:33 +00:00
coolsnowwolf
756cf526a6 bluetooth: fix Broadcom module 2023-03-21 15:26:12 +08:00
aiamadeus
25d3a71cbf r8152: drop local patches 2023-03-20 20:30:45 +08:00
aiamadeus
d72088314d linux-firmware: fixes broken packages 2023-03-20 20:28:13 +08:00
lovehackintosh
89e25b5a13
kernel: bump 5.15 to 5.15.103 (#11017)
Fixes sb commit: 138af4d ("kernel: refresh patch")
2023-03-19 11:31:49 +08:00
lovehackintosh
a76ac2ef41
kernel: bump to 5.4.237, 5.10.175 (#11016)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-03-18 18:08:42 +08:00
aakkll
4bb2f2f4d3
kernel: bump 6.1 to 6.1.20 (#11013) 2023-03-17 10:09:00 +00:00
Albert Xu
d6511c3f65
linux-firmware: fix ax201 firmware version (#11010)
* Adapt:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=494389cbc3b3f080bbe4ee921f1b08eae3b6fdbf
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=3435843535f747e5d68c7b084d234254dcd74f55
2023-03-17 08:27:42 +00:00
coolsnowwolf
57040c4ef2 wwan: add QUECTEL RM500U support 2023-03-16 20:50:05 +08:00
coolsnowwolf
8d64c3310c linux-firmware: add QCA9377 SDIO firmware and board data 2023-03-16 20:40:18 +08:00
骷髅头
138af4d3cf
kernel:refresh patch (#11005)
* kernel: bump 5.15 to 5.15.102

* kernel:refresh patch
2023-03-16 20:33:33 +08:00
骷髅头
53134b2571
kernel: bump 5.15 to 5.15.102 (#11003) 2023-03-16 16:32:42 +08:00
Hauke Mehrtens
5b746b27b3 kernel: kmod-wwan: Add package
This adds the kmod-wwan package. This provides the generic wwan driver
core which is needed for some existing packages.

Currently the drivers/net/wwan/wwan.ko driver is compiled into the
kernel when one of the wwan module is activated, better build it as a
kernel module.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-15 20:00:10 +08:00
Koen Vandeputte
7fc404cec0 kernel: fix missing mhi control devices
Both of these packages depend on CONFIG_WWAN
in the kernel.

Also fix the missing "wwan" subfolder in the path.

This fixes the missing devices in /dev after booting an MHI capable modem.

Fixes: 2519190fec ("kernel: package mhi wwan ctrl driver")
Fixes: 6af46796fa ("kernel: package mhi mbim driver")

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2023-03-15 19:59:21 +08:00
Koen Vandeputte
910a17aca0 kernel: package mhi mbim driver
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2023-03-15 19:59:07 +08:00
Koen Vandeputte
33829fec7e kernel: package mhi wwan ctrl driver
MHI WWAN CTRL allows QCOM-based PCIe modems to expose different modem
control protocols/ports to userspace, including AT, MBIM, QMI, DIAG
and FIREHOSE. These protocols can be accessed directly from userspace
(e.g. AT commands) or via libraries/tools (e.g. libmbim, libqmi, libqcdm)

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2023-03-15 19:58:50 +08:00
Koen Vandeputte
5d3e5c3adb kernel: package mhi network driver
Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2023-03-15 19:58:27 +08:00
Hauke Mehrtens
df9d2c9c30 kernel: kmod-phy-ax88796b: Add new PHY
This adds the AX88796B PHY which is needed by the kmod-usb-net-asix
driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-15 19:56:03 +08:00
Hauke Mehrtens
bd50b61c46 kernel: kmod-usb-dwc2-pci: Add new package
Add dwc2_pci kernel module into own kernel package.
The dwc2_pci.ko kernel module was always build when kmod-usb-dwc2
was selected, but it was not packaged.

Add the missing kmod-usb-phy-nop dependency to the kmod-usb-dwc2-pci
package too. The CONFIG_USB_DWC2_PLATFORM option is already gone for
some time.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-15 19:55:48 +08:00
Josef Schlehofer
a71542fc60 kernel: add kmod-usb-net-lan78xx
Add kernel module for Microchip LAN78XX based USB 2 & USB 3
10/100/1000 Ethernet adapters. [1]

This kernel module is required for the Seeed Studio's Mini Router
based on RPI CM4 [2].

[1] <https://cateee.net/lkddb/web-lkddb/USB_LAN78XX.html>
[2] <https://www.seeedstudio.com/Dual-GbE-Carrier-Board-with-4GB-RAM-32GB-eMMC-RPi-CM4-Case-p-5029.html>

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(added kmod-phy-microchip and kmod-fixed-phy dependencies,
rpi3 needs lan78xx but has it built-in)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-03-14 21:25:19 +08:00
Christian Lamparter
2602bc69fe kernel: provide kmod-fixed-phy as separate kmod
Almost all targets have the fixed-phy feature built into the kernel.
One big exception is x86. This caused a problem with the upcoming
LAN78xx usb driver. Hence this patch breaks out the fixed-phy from
of_mdio (which didn't include the .ko) and puts into a separate
module.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-03-14 21:24:01 +08:00
Christian Lamparter
80ac24e6a8 kernel: add kmod-phy-microchip
phy drivers for Microchip's LAN88xx PHYs.
This is needed for the "LAN7801" variant
of the upstream lan78xx usb ethernet driver.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2023-03-14 21:23:35 +08:00
Miles Poupart
bbd9ecfd95
kernel: bump 6.1 to 6.1.19 (#10995) 2023-03-14 11:41:35 +08:00
Malash
a73aec8f8d
linux-firmware: update to 20230310 (#10993) 2023-03-13 11:05:29 +00:00
Beginner
8443bb1db2 wwan/driver: code alignment 2023-03-13 12:16:02 +08:00
younger
dd7c89aa77
base-files: fixes x86 sysupgrade (#10992)
Fixes: #10986
2023-03-13 00:10:47 +08:00
aiamadeus
4d64db761e rockchip: replace yt8531 patches with upstream 2023-03-12 18:40:31 +08:00
aiamadeus
985fa051b0 kernel: rtl8367b: remove wrong parameter
This is just a workaround to light up the Ethernet port led.
Fixes: 0c40df8 ("ramips: MT7620 add Support HiWiFi R33")
2023-03-12 18:36:12 +08:00
aakkll
1e00936dbf
kernel: bump 6.1 to 6.1.18 (#10987)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-03-12 00:28:23 +08:00
qq57240
8d608bb816
ddns-scripts_dnspod: login with token (#10985) 2023-03-11 09:30:23 +00:00
aakkll
0f03d8c619
kernel: bump 6.1 to 6.1.16 (#10983)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-03-11 11:26:29 +08:00
Tim Harvey
03d0964627 kernel: modules: package Microchip LAN743x PCIe gigE driver
Package the Microchip LAN743x PCIe gigE driver

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-03-10 23:19:21 +08:00
Tim Harvey
ea31cc40cd kernel: can: fix MCP251x CAN controller module autoload
Fix autoload module name for can-mcp251x kmod.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-03-10 23:18:08 +08:00
Mehdi Ahmadi
831633b517 kernel: add Aquantia AQtion Atlantic 10Gbps Ethernet
Driver support for Aquantia AQtion Atlantic 10Gbps Ethernet NIC
with the AQC107, AQC108 and others chipsets found on:

 - TP-Link: TX401
 - Asus: XG-C100C, ROG Areion 10G NIC
 - & more ...

Signed-off-by: Mehdi Ahmadi <aphorise@gmail.com>
Reviewed-by: Robert Marko <robimarko@gmail.com>
[ fix wrong commit author as requested by author itself ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-03-10 23:17:21 +08:00
Robert Marko
e643c1b724 kernel: modules: package Aquantia PHY driver
Package the Aquantia AQR PHY driver as kmod.

This enables using the Aquantia driver with hwmon support on targets where
hwmon is not compiled-in.

Currently, in case when AQR driver is compiled-in but hwmon core is not
hwmon code in AQR driver will not get compiled because of macro
IS_REACHABLE(CONFIG_HWMON) evaluating to false.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2023-03-09 22:21:25 +08:00
Hauke Mehrtens
fe14f40413 kernel: kmod-phy-smsc: Add new PHY
This adds the SMSC PHY which is needed by the kmod-usb-net-smsc95xx
driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-03-09 22:20:01 +08:00
Rosen Penev
6cb1d7f929 tools/zstd: update to 1.5.4
Mostly performance improvements, as usual.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-09 22:12:19 +08:00
Rosen Penev
411c3c14e7 tools/zstd: build libraries as static
Enables to get rid of rpath hack for all users.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-09 22:11:25 +08:00
Nick Hainke
5bfe3bd9fe iproute2: update to 6.2
Release Notes:
https://lwn.net/Articles/923952/

Refresh patches:
- 110-darwin_fixes.patch
- 115-add-config-xtlibdir.patch
- 140-allow_pfifo_fast.patch
- 140-keep_libmnl_optional.patch
- 145-keep_libelf_optional.patch
- 150-keep_libcap_optional.patch
- 155-keep_tirpc_optional.patch
- 170-ip_tiny.patch
- 175-reduce-dynamic-syms.patch
- 180-drop_FAILED_POLICY.patch
- 190-fix-nls-rpath-link.patch
- 195-build_variant_ip_tc.patch
- 200-drop_libbsd_dependency.patch
- 300-selinux-configurable.patch

Remove upstreamed:
- 320-configure-Remove-include-sys-stat.h.patch

While working on it remove AUTORELEASE.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-03-08 21:56:24 +08:00
Nick Hainke
e053d02760 libcap: update to 2.67
Release notes:
https://sites.google.com/site/fullycapable/release-notes-for-libcap#h.o8papfkfh1x9

While working on it, remove $(AUTORELEASE).

Tested-by: Linhui Liu liulinhui36@gmail.com # Xiaomi AX3600
Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-03-08 21:54:12 +08:00
nftbty
c135796fe7
ksmbd: fix build error (#10979) 2023-03-08 10:06:48 +00:00
Rosen Penev
17ef1aa91c ksmbd: update to 3.4.7
Remove upstreamed patches.

Switch to normal tarballs. Codeload recently had a reproducibility issue.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-03-07 22:03:33 +08:00
Tim Harvey
8272d83fcf kernel: fix hwmon-gsc driver
Fix hwmon-gsc driver by replacing out-of-tree hwmon-gsc driver with in-tree
driver that was merged in Linux v5.8:
 - remove the old out-of-tree module
 - add configuration for the in-tree modules

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-03-07 22:01:36 +08:00
Tim Harvey
a1738753c9 kernel: add kmod-hwmon-max6642 support
Add package for Maxim MAX6642 i2c based temperature sensor.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-03-07 21:57:03 +08:00
Nick Hainke
8832a0b868 kernel: move CONFIG_PAGE_POOL to generic
Move "# CONFIG_PAGE_POOL is not set" to generic.

Suggested-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-03-07 21:56:21 +08:00
AmadeusGhost
1ac276866a bluetooth: add more platform support
Fixes: #10775
2023-03-06 23:28:02 +08:00
AmadeusGhost
7f1a60f322 rtw88: add rtl8821ce support
This won't work due to firmware limitations.
2023-03-06 23:20:10 +08:00
AmadeusGhost
bbdbb4e8a8 ramips/mediatek: fixes image format 2023-03-06 23:18:04 +08:00
aiamadeus
82690d6c5a rockchip: sync dts changes from upstream 2023-03-05 22:03:37 +08:00
aiamadeus
63e82f7fb2 bpf-headers: fix package category 2023-03-05 21:50:47 +08:00
coolsnowwolf
f345d0c9a1 Version update to R23.3.3 2023-03-04 10:39:24 +08:00
coolsnowwolf
9378091f42 x86: disable Energy-Efficient Ethernet (EEE) for Intel I225/I226 network dropout issues 2023-03-04 10:38:21 +08:00
coolsnowwolf
18269647e5 kernel: bump 5.15 to 5.15.98 2023-03-04 10:28:39 +08:00
aakkll
84f10c38ce
kernel: bump to 5.4.234, 5.15.97, 6.1.15 (#10959)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-03-04 10:07:21 +08:00
aakkll
d97f82d381
kernel: bump 5.15 to 5.15.96 (#10957) 2023-03-03 11:01:43 +00:00
aakkll
be949a6fed
kernel: bump 5.4 to 5.4.233 (#10955) 2023-03-03 01:55:17 +00:00
zxlhhyccc
c82dd3df02
ipq807x: fix xtr10890 calibration variant (#10954) 2023-03-03 01:54:41 +00:00
coolsnowwolf
4b4ec144ec ramips: reorder Newifi D1/D2 2023-03-02 19:54:08 +08:00
coolsnowwolf
f1edc86983 ramips: oraybox x3a: switch to new hnat driver 2023-03-02 16:15:48 +08:00
coolsnowwolf
4e53878138 wireless-tools: increase max priv ioctl 2023-03-02 15:19:27 +08:00
coolsnowwolf
ac34ab946b ramips: OrayBox X3A switch to mt7615d_dbdc wireless 2023-03-02 13:55:01 +08:00
coolsnowwolf
d5f64cca07 ipq807x: fix Zyxel Armor G5 (NBG7815) 5.15 kernel 2023-03-02 12:57:08 +08:00
Lollipop907
13c63d62db
Add GSM module support for MPC1903 (#10944)
* Update 02_network

* Add GSM Module Support

* fix build fail
2023-03-01 13:28:58 +08:00
coolsnowwolf
b631da75a0 x86: add Intel Ethernet Network Adapter E810 (100GbE) support 2023-03-01 13:22:31 +08:00
coolsnowwolf
41364f5268 ipq807x: Add Zyxel Armor G5 (NBG7815) support 2023-03-01 12:52:55 +08:00
zfdx
977be810c9
generic/5.15: fix swconfig_leds.c build (#10938)
Fixes: ebfa1b9 ("generic: fix swconfig_leds.c in 5.18")
2023-02-28 02:20:55 +00:00
Beginner
78b0142267 luci-proto-3x: move to luci feeds 2023-02-28 10:18:16 +08:00
coolsnowwolf
93f55690ed Merge branch 'master' of https://github.com/coolsnowwolf/lede 2023-02-28 00:09:46 +08:00
coolsnowwolf
012f1419de WWAN: add Fibocom linux usb QMI WWAN driver and dial app 2023-02-28 00:09:36 +08:00
qwerttvv
5cf53c1352
fix CI issues (#10937)
dpkg: error processing package grub-efi-amd64-signed (--configure)

https://github.com/coolsnowwolf/lede/actions/runs/4276705033/jobs/7444992777#step:2:1554
2023-02-27 23:35:26 +08:00
1054009064
15d1af2d95
kernel: backport 6.2 patch to fix kernel WARNING issues (#10936) 2023-02-27 21:37:53 +08:00
coolsnowwolf
21fa87f194 rockchip: add Rongpin King3399 wireless AP mode support 2023-02-27 18:02:01 +08:00
coolsnowwolf
971d690caa linux-firmware: add Rongpin King3399 ap6356s firmware 2023-02-27 17:51:24 +08:00
coolsnowwolf
745f6ec773 linux-firmware: add RealTek RTW89 firmware 2023-02-27 15:25:06 +08:00
coolsnowwolf
a2c61871bc iwlwifi: fix build with kernel 6.1 2023-02-26 16:47:48 +08:00
coolsnowwolf
21e254e7da kernel: bump 6.1 to 6.1.14 2023-02-26 16:31:11 +08:00
coolsnowwolf
79aed7f287 quectel_cm_5G: fix comple path error 2023-02-26 16:02:50 +08:00
zfdx
efb9242261
mtwifi/mt7612e: disable set/get_fs by default (#10930) 2023-02-24 11:05:51 +00:00
aakkll
53b83ba81a
kernel: bump to 5.4.232, 6.1.13 (#10922) 2023-02-23 03:02:26 +00:00
Yuan Tao
ccb04d670d base-files: sysfixtime: Fix time on the fake RTC
On some devices the chip has RTC but no battery save time.
This leads back to getting the wrong time
and skipping the check of the last file modification date.

This commit ensures that the file time is checked even
if the RTC exists.
which would ordinarily return an approbiate
system time used for e.g. certificate generation.

Tested-on: NanoPi R2S

Signed-off-by: Yuan Tao <ty@wevs.org>
2023-02-22 23:35:16 +08:00
zfdx123
d519e5fd0d Revert "ramips: ethernet: fix to interrupt handling"
Fixes 7620/7621 transmit timed out issue.
Close: #10920
2023-02-22 23:33:36 +08:00
Marcel Ziswiler
545c2478aa mediatek: add support for Netgear WAX206
Specifications:
* SoC: MediaTek MT7622BV
* RAM: DDR3 512 MiB (Nanya NT5CC256M16ER-EK)
* Flash: SPI-NAND 256 MiB (Toshiba TC58CVG1S3HRAIJ)
* Wi-Fi 2.4/5 GHz 4T4R:
  * 2.4 GHz: MediaTek MT7622BV
  * 5 GHz: MediaTek MT7915AN/MT7975AN
* Ethernet: 4x 10/100/1000 Mbps LAN,
            1x 10/100/1000/2500 Mbps WAN (Realtek RTL8221B PHY)
* Switch: MediaTek MT7531AE
* LEDs/Keys: 8/1 (Power, Internet, LAN1, LAN2, LAN3, LAN4,
             Wifin and Wifia dual-colour LEDs + Reset pin)
* UART: Marked J19 on board VCC GND TX RX, beginning from "1". 3.3v,
        115200n8
* Power: 12 VDC, 2.5 A

Installation:
* Flash the factory image through the stock web interface, or TFTP to
  the bootloader. NMRP can be used to TFTP without opening the case.
* U-Boot allows booting an initramfs image via TFTP as follows:
  setenv ipaddr 192.168.1.1
  setenv serverip 192.168.1.100
  tftpboot openwrt-mediatek-mt7622-netgear_wax206-initramfs-recovery.itb
  bootm

Known Limitations:
* The 2.5G WAN port labeled 'wan' only works for speeds up to 1G at the
  moment. If connected to a multi-gig port the speed has to be manually
  set to 1G/full either for the switch port or in OpenWrt. For example
  add the following to /etc/rc.local to set it on boot:
  /usr/sbin/ethtool -s wan speed 1000 duplex full

Revert to stock firmware:
* Flash the stock firmware to the bootloader using TFTP/NMRP.

References to WAX206 GPL source:
https://www.downloads.netgear.com/files/GPL/WAX206_V1.0.4.0_Source.rar

* openwrt/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
  DTS file for this device.
* openwrt/target/linux/mediatek/image/mt7622.mk
  Image creation code for this device

Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
[fix WAN port, adjust partition layout and image creation]
Signed-off-by: Thomas Kupper <thomas.kupper@gmail.com>
2023-02-20 23:29:12 +08:00
Daniel Golle
3732ec0ff1 kernel: import accepted MediaTek Ethernet patches
Import some accepted and pending upstream patches for mtk_eth_soc,
replacing some semantically equivalent local patches and fixing issues
when operating the PCS in 1G SGMII mode.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-02-20 23:26:40 +08:00
coolsnowwolf
7032f6d8b9 mt76: fix build errors with upsteam version 2023-02-18 20:52:42 +08:00
Felix Fietkau
45b15e953c kernel: add missing optimization for page pool
Improves performance in combination with threaded NAPI

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-17 18:25:04 +08:00
Felix Fietkau
26db249dbb mt76: import WED related mtk_eth_soc patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-17 18:24:05 +08:00
Felix Fietkau
80ea885fe3 kernel: make it possible for packages to select page pool support
Will be used by the next mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-17 18:22:48 +08:00
lovehackintosh
c3ac3c9350
kernel: bump 5.10 to 5.10.168 (#10904) 2023-02-16 12:38:17 +00:00
aakkll
a292c0e88e
kernel: bump 6.1 to 6.1.12 (#10900)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-02-16 11:19:40 +08:00
lovehackintosh
5f61ca66c8
kernel: bump to 5.15.94, 6.1.12 (#10901) 2023-02-16 09:28:24 +08:00
coolsnowwolf
f3c8c2a243 Update README.md 2023-02-15 18:26:06 +08:00
Felix Fietkau
7faea8407a kernel: add fix for a page pool related crash on GRO
Needed for upcoming mt76 page pool support

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-15 12:09:39 +08:00
Felix Fietkau
5cd7dc1d64 kernel: backport page pool fragment support from v5.15
Required for an upcoming mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-02-15 12:08:22 +08:00
Daniel Golle
47643a2ba9 mediatek: mtk_thermal: replace with upstream patch
Replace local patch adding thermal support for MT7986 with version
accepted upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-02-15 11:55:24 +08:00
AmadeusGhost
470ca53250 mediatek: add support for TP-Link TL-XDR6086/6088
Hardware specification:
  SoC: MediaTek MT7986A 4x A53
  Flash: ESMT F50L1G41LB 128MB
  RAM: ESMT M15T4G16256A 512MB
  Ethernet (Max Speed):
    XDR6086: 1x 2.5G Wan, 1x 2.5G Lan, 1x 1G Lan
    XDR6088: 1x 2.5G Wan, 1x 2.5G Lan, 4x 1G Lan
  WiFi1: MT7976GN 2.4GHz ax 4x4
  WiFi2: MT7976AN 5GHz ax 4x4
  Button: Reset, Wps, Turbo
  USB: 1 x USB 3.2
  Power: DC 12V 4A

Signed-off-by: AmadeusGhost <amadeus@openjmu.xyz>
2023-02-14 23:57:22 +08:00
AmadeusGhost
0973fa001a rtw88-usb: remove upstream patches
No functional changes.
2023-02-14 23:53:30 +08:00
AmadeusGhost
58e26ac817 default-settings: drop unneeded file 2023-02-13 23:58:12 +08:00
AmadeusGhost
b80da91037 meson: refresh kernel configuration
No test, just enable CPUFREQ and THERMAL support.
2023-02-13 23:50:15 +08:00
coolsnowwolf
edfb7ec749 kernel: add missing symbol to 5.10 config 2023-02-13 21:00:16 +08:00
John Audia
f2fed1286d openssl: bump to 1.1.1t
Removed upstreamed patch: 010-padlock.patch

Changes between 1.1.1s and 1.1.1t [7 Feb 2023]

  *) Fixed X.400 address type confusion in X.509 GeneralName.

     There is a type confusion vulnerability relating to X.400 address processing
     inside an X.509 GeneralName. X.400 addresses were parsed as an ASN1_STRING
     but subsequently interpreted by GENERAL_NAME_cmp as an ASN1_TYPE. This
     vulnerability may allow an attacker who can provide a certificate chain and
     CRL (neither of which need have a valid signature) to pass arbitrary
     pointers to a memcmp call, creating a possible read primitive, subject to
     some constraints. Refer to the advisory for more information. Thanks to
     David Benjamin for discovering this issue. (CVE-2023-0286)

     This issue has been fixed by changing the public header file definition of
     GENERAL_NAME so that x400Address reflects the implementation. It was not
     possible for any existing application to successfully use the existing
     definition; however, if any application references the x400Address field
     (e.g. in dead code), note that the type of this field has changed. There is
     no ABI change.
     [Hugo Landau]

  *) Fixed Use-after-free following BIO_new_NDEF.

     The public API function BIO_new_NDEF is a helper function used for
     streaming ASN.1 data via a BIO. It is primarily used internally to OpenSSL
     to support the SMIME, CMS and PKCS7 streaming capabilities, but may also
     be called directly by end user applications.

     The function receives a BIO from the caller, prepends a new BIO_f_asn1
     filter BIO onto the front of it to form a BIO chain, and then returns
     the new head of the BIO chain to the caller. Under certain conditions,
     for example if a CMS recipient public key is invalid, the new filter BIO
     is freed and the function returns a NULL result indicating a failure.
     However, in this case, the BIO chain is not properly cleaned up and the
     BIO passed by the caller still retains internal pointers to the previously
     freed filter BIO. If the caller then goes on to call BIO_pop() on the BIO
     then a use-after-free will occur. This will most likely result in a crash.
     (CVE-2023-0215)
     [Viktor Dukhovni, Matt Caswell]

  *) Fixed Double free after calling PEM_read_bio_ex.

     The function PEM_read_bio_ex() reads a PEM file from a BIO and parses and
     decodes the "name" (e.g. "CERTIFICATE"), any header data and the payload
     data. If the function succeeds then the "name_out", "header" and "data"
     arguments are populated with pointers to buffers containing the relevant
     decoded data. The caller is responsible for freeing those buffers. It is
     possible to construct a PEM file that results in 0 bytes of payload data.
     In this case PEM_read_bio_ex() will return a failure code but will populate
     the header argument with a pointer to a buffer that has already been freed.
     If the caller also frees this buffer then a double free will occur. This
     will most likely lead to a crash.

     The functions PEM_read_bio() and PEM_read() are simple wrappers around
     PEM_read_bio_ex() and therefore these functions are also directly affected.

     These functions are also called indirectly by a number of other OpenSSL
     functions including PEM_X509_INFO_read_bio_ex() and
     SSL_CTX_use_serverinfo_file() which are also vulnerable. Some OpenSSL
     internal uses of these functions are not vulnerable because the caller does
     not free the header argument if PEM_read_bio_ex() returns a failure code.
     (CVE-2022-4450)
     [Kurt Roeckx, Matt Caswell]

  *) Fixed Timing Oracle in RSA Decryption.

     A timing based side channel exists in the OpenSSL RSA Decryption
     implementation which could be sufficient to recover a plaintext across
     a network in a Bleichenbacher style attack. To achieve a successful
     decryption an attacker would have to be able to send a very large number
     of trial messages for decryption. The vulnerability affects all RSA padding
     modes: PKCS#1 v1.5, RSA-OEAP and RSASVE.
     (CVE-2022-4304)
     [Dmitry Belyavsky, Hubert Kario]

Signed-off-by: John Audia <therealgraysky@proton.me>
2023-02-12 11:28:05 +08:00
Michael Pratt
dfcf9963e2 Revert "tools/fakeroot: update to 1.30.1"
This reverts commit 52167feff8ae3fbd02be22dfe6021e7e9c79c599.

Fakeroot 1.30.1 broke building on certain hosts (32-bit archs).

As of 2023-01-10, this was apparently fixed in source code,
however, the version is still 1.30.1 (patch release),
so the old binaries are removed from the repository and replaced,
but the source provided by the repository remains the same.

Furthermore, there are some complicated issues blocking
the "testing" release from being bumped to a 1.30.x version.

Considering all of this, it would likely be better for this package
to follow the "testing" release instead of the "unstable" release,
which is still 1.29-1, so revert to that.

Signed-off-by: Michael Pratt <mcpratt@pm.me>
2023-02-12 11:27:41 +08:00
Oleg S
43a6b311c4 mediatek: mt7622: fix rootfs/ubi detection for Xiaomi AX6S
By specifying the flag "denx,fit" for partition "kernel", the kernel
try to find rootfs in the same partition during boot. Reality is that
the placement of rootfs is precisely determined by the name of another
partition -"ubi".
It was also found that on some device (for example devices with NAND
chips), the "Denx search engine" manages to find roots at the end of
partition "kernel", but such partition doesn't exist and is empty
there.

Fix this by removing the "denx,fit" flag from partition "kernel". With
this change the original behavior of searchif rootfs in partition "ubi"
is restored.

Signed-off-by: Oleg S <remittor@gmail.com>
2023-02-12 11:26:36 +08:00
coolsnowwolf
96a2274228 default-settings: add rules to ban Xiaomi APK install DNS redirect 2023-02-11 21:33:41 +08:00
lovehackintosh
e610757c58
kernel: bump to 5.10.167, 5.15.93, 6.1.11 (#10891) 2023-02-10 15:23:29 +08:00
Chen Minqiang
29d85f9b04 wolfssl: fix build with make < 4.2
Inline the preinst.arm-ce script. Support for including was added in
make 4.2 and is not working with older make versions.

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
2023-02-08 21:58:10 +08:00
Beginner
46f2c7e07f luci-proto-mbim: move to luci feeds 2023-02-08 21:55:36 +08:00
coolsnowwolf
4fe620f842 Revert "rockchip: add FriendlyElec NanoPi R5C support"
This reverts commit 62133a8392.
Closed: #10883, #10890
2023-02-08 21:53:57 +08:00
1054009064
8336b817ec
rockchip: fix cannot stat dtb file (#10885) 2023-02-07 23:14:20 +08:00
aakkll
bb99eaf39c
kernel: bump 5.4 to 5.4.231 (#10881)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-02-07 11:40:27 +08:00
coolsnowwolf
b52193a031 kernel: bump 6.1 to 6.1.10 2023-02-06 18:15:52 +08:00
Nuc
62133a8392
rockchip: add FriendlyElec NanoPi R5C support
* add NanoPi R5C board

* Update armv8.mk

* Delete nanopi-r5c.bootscript

---------

Co-authored-by: coolsnowwolf <31687149+coolsnowwolf@users.noreply.github.com>
2023-02-06 18:03:27 +08:00
lovehackintosh
f1cd5542cf
Openwrt-CI: small cleanup (#10848) 2023-02-06 11:44:57 +08:00
fishg
91bc6bfd32
mt76x2: fix for 6.1 (#10863) 2023-02-05 13:05:48 +08:00
Tsenghan
60178fd03d
Define domain request parameter "Line" as default (#10862)
In Action "DescribeSubDomainRecords", define argument “Line” to the specific "defalut". This is for someone who have two or more same domain names but in different dns request source(ISP), but return more than 1 record will goto print "地址需要修改".  For document of  aliyun API, set a Line parament can solve this issue because most of users just have one ISP for each domain and its value was set as "default".
2023-02-04 21:54:27 +08:00
Beginner
b597493248
wwan/app: code alignment (#10850)
Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com>
2023-02-04 21:45:21 +08:00
coolsnowwolf
1daa71c005 quectel_QMI_WWAN: port to linux 6.1 support 2023-02-02 23:55:49 +08:00
coolsnowwolf
de25320d7a Version update to R23.2.14 2023-02-02 19:50:19 +08:00
coolsnowwolf
a8b2e68da8 package: add wwan Quectel modem packages and luci 2023-02-02 19:43:57 +08:00
1054009064
f143a15985
ipq807x: add tl-er2260t dts for other device builds in 5.15 (#10846)
Only solves other device builds, doesn't support tl-er2260t running.
2023-02-02 16:39:58 +08:00
coolsnowwolf
27a331a57b autocore: fix sfp unplugged speed display 2023-02-02 12:46:12 +08:00
1054009064
f6d0acb91b
qca-ssdk: refresh patches (#10845)
Fixed patch application failure.

Fixes: 89200af ("bump qca-ssdk nss-dp and ssdk-shell, Add tplink-tl-er2260t basic support (#10777)")
Fixes: #10844
2023-02-02 12:42:41 +08:00
qlugcp
89200afb01
bump qca-ssdk nss-dp and ssdk-shell, Add tplink-tl-er2260t basic support (#10777)
* bump qca-nss-dp and ssdk ssdk-shell to 12.1

* [qca-ssdk] delete 0008 patch as 12.1 version do not need this

* [ipq807x]: Add support for tplink-tl-er2260t(basic)

* remove unused parts in 2260t.dts

* NSS:bump nss-drv64 to 12.1r2 (may affect ipq806x)

* fix nss-dp source_url

* qca-ssdk: refresh ssdk patch
2023-02-02 01:26:55 +08:00
lovehackintosh
26b859543a
kernel: bump to 5.10.166, 5.15.91, 6.1.9 (#10842)
* kernel: bump 5.15 to 5.15.91

* kernel: bump 6.1 to 6.1.9

* kernel: bump 5.10 to 5.10.166
2023-02-01 18:21:28 +08:00
coolsnowwolf
7fea68185c kernel: bump 6.1 to 6.1.9 2023-02-01 17:18:22 +08:00
coolsnowwolf
912696441b rtl8812au-ac: backport linux kernel 6.1 support 2023-01-31 15:06:50 +08:00
coolsnowwolf
fb0c3a7fde rtl8812au-ac: port RTL8812AU/21AU and RTL8814AU Wireless drivers from aircrack-ng 2023-01-31 13:27:15 +08:00
Lollipop907
ff68c93d9b
rockchip:fix build failure and change network for MPC1903 (#10837)
* Update armv8.mk

* Update 02_network
2023-01-31 12:55:50 +08:00
zfdx
0fbb5e9fd3
ramips: hiwifi-r33: fix partition and led (#10836) 2023-01-31 11:40:11 +08:00
骷髅头
e20fa327ec
uqmi:fix build failure (#10831)
ERROR: package/network/utils/uqmi failed to build.
2023-01-29 19:35:47 +08:00
Hugo Chen
7d2c1575be
ci: update upload-artifact (#10824) 2023-01-29 12:20:04 +08:00
xiaotan8
4a50778a19
uqmi: bump to latest git HEAD (#10826) 2023-01-29 12:18:40 +08:00
Nick Hainke
fec4f5df67 kernel: test for kernel version greater 5.13 to fix mmc-spi
The of_mmc_spi.o resource is provider agnostic in kernels greater 5.13
and does not depend anymore on CONFIG_OF.

Fixes: #10769

Suggested-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-27 19:53:09 +08:00
coolsnowwolf
ccc6994445 toolchain/gcc: revert to version 11 by default 2023-01-26 21:15:53 +08:00
zfdx
0c40df89d3
ramips: MT7620 add Support HiWiFi R33(C312B B52) (#10812) 2023-01-26 19:50:31 +08:00
coolsnowwolf
ae14a83450 Revert "elfutils: fix gcc8 compile"
This reverts commit 7df2cabf9a.
2023-01-26 19:49:10 +08:00
coolsnowwolf
7df2cabf9a
elfutils: fix gcc8 compile 2023-01-26 12:29:57 +08:00
coolsnowwolf
1f978b4a5e
linux-firmware: update to 20230117 2023-01-26 12:27:19 +08:00
coolsnowwolf
aa4e4dae34 ipq60xx: disable ath11k wireless temporarily 2023-01-25 20:49:18 +08:00
coolsnowwolf
6ed4335449 igb-intel: drop package 2023-01-25 20:46:54 +08:00
coolsnowwolf
c875033c44 rockchip: fix dts patch for Ariaboard Photonicat 2023-01-25 20:38:08 +08:00
lovehackintosh
51ec2f45a6
treewide: sync with upstream (#10750)
* build: fix incomplete initramfs compression options

Requires: tools/lz4, tools/lzop

complete the wiring so that these options work:
* `CONFIG_KERNEL_INITRAMFS_COMPRESSION_LZO`
* `CONFIG_KERNEL_INITRAMFS_COMPRESSION_LZ4`

Signed-off-by: Tony Butler <spudz76@gmail.com>
[remove blocking dependencies for separate ramdisk, fix lzop options]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>

* include: sync with upstream

* toolchain/binutils: add support for version 2.40

Release notes:
    https://sourceware.org/pipermail/binutils/2023-January/125671.html

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* toolchain/gcc: switch to version 12 by default

Also fix build error with gcc 12.

* toolchain/nasm: update to 2.16.01

ChangeLog:

 Version 2.16.01

       _This is a documentation update release only._

       (*) Fix the creation of the table of contents in the HTML version of
           the documentation.

 Version 2.16

       (*) Support for the `rdf' format has been discontinued and all the
           RDOFF utilities has been removed.

       (*) The `--reproducible' option now leaves the filename field in the
           COFF object format blank. This was always rather useless since
           it is only 18 characters long; as such debug formats have to
           carry their own filename information anyway.

       (*) Fix handling of MASM-syntax reserved memory (e.g. `dw ?') when
           used in structure definitions.

       (*) The preprocessor now supports functions, which can be less
           verbose and more convenient than the equivalent code implemented
           using directives. See section 4.4.

       (*) Fix the handling of `%00' in the preprocessor.

       (*) Fix incorrect handling of path names affecting error messages,
           dependency generation, and debug format output.

       (*) Support for the RDOFF output format and the RDOFF tools have
           been removed. The RDOFF tools had already been broken since at
           least NASM 2.14. For flat code the ELF output format
           recommended; for segmented code the `obj' (OMF) output format.

       (*) New facility: preprocessor functions. Preprocessor functions,
           which are expanded similarly to single-line macros, can greatly
           simplify code that in the past would have required a lengthy
           list of directives and intermediate macros. See section 4.4.

       (*) Single-line macros can now declare parameters (using a `&&'
           prefix) that creates a quoted string, but does _not_ requote an
           already quoted string. See section 4.2.1.

       (*) Instruction table updated per public information available as of
           November 2022.

       (*) All warnings in the preprocessor have now been assigned warning
           classes. See appendix A.

       (*) Fix the invalid use of `RELA'-type relocations instead of `REL'-
           type relocations when generating DWARF debug information for the
           `elf32' output format.

       (*) Fix the handling `at' in `istruc' when the structure contains
           local labels. See section 5.9.2.

       (*) When assembling with `--reproducible', don't encode the filename
           in the COFF header for the `coff', `win32' or `win64' output
           formats. The COFF header only has space for an 18-character
           filename, which makes this field rather useless in the first
           place. Debug output data, if enabled, is not affected.

       (*) Fix incorrect size calculation when using MASM syntax for non-
           byte reservations (e.g. `dw ?'.)

       (*) Allow forcing an instruction in 64-bit mode to have a (possibly
           redundant) REX prefix, using the syntax `{rex}' as a prefix.

       (*) Add a `{vex}' prefix to enforce VEX (AVX) encoding of an
           instruction, either using the 2- or 3-byte VEX prefixes.

       (*) The `CPU' directive has been augmented to allow control of
           generation of VEX (AVX) versus EVEX (AVX-512) instruction
           formats, see section 7.11.

       (*) Some recent instructions that previously have been only
           available using EVEX encodings are now also encodable using VEX
           (AVX) encodings. For backwards compatibility these encodings are
           not enabled by default, but can be generated either via an
           explicit `{vex}' prefix or by specifying either `CPU LATEVEX' or
           `CPU NOEVEX'; see section 7.11.

       (*) Document the already existing `%unimacro' directive. See section
           4.5.12.

       (*) Fix a code range generation bug in the DWARF debug format
           (incorrect information in the `DW_AT_high_pc' field) for the ELF
           output formats. This bug happened to cancel out with a bug in
           older versions of the GNU binutils linker, but breaks with other
           linkers and updated or other linkers that expect the spec to be
           followed.

       (*) Fix segment symbols with addends, e.g. `jmp _TEXT+10h:0' in
           output formats that support segment relocations, e.g. the `obj'
           format.

       (*) Fix various crashes and hangs on invalid input.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* toolchain: musl: Fix symbol loading in gdb

Fix DT_DEBUG handling on MIPS in musl libc.
With this change gdb will load the symbol files for shared libraries on MIPS too.

This patch was taken from this thread: https://www.openwall.com/lists/musl/2022/01/09/4

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>

* tools: sync with upstream

* build: fix issues with targets installed via feeds

- fix including modules.mk when a target is being replaced
- fix calling make targets from target/linux

Signed-off-by: Felix Fietkau <nbd@nbd.name>

* package: sync with upstream

Signed-off-by: Tony Butler <spudz76@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Co-authored-by: Tony Butler <spudz76@gmail.com>
Co-authored-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
Co-authored-by: Felix Fietkau <nbd@nbd.name>
2023-01-25 15:30:35 +08:00
蛋炒饭
44f20dfe69
arm-trusted-firmware-sunxi: Use common trusted-firmware-a.mk (#10804)
Make use of the definitions from trusted-firmware-a.mk to build the
Trusted firmware arm. This fixes the build with binutils 2.39.

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

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-01-25 00:35:49 +08:00
lovehackintosh
7e01fac6fc
kernel: bump to 5.4.230, 5.10.165, 5.15.90 (#10803)
* kernel: bump 5.4 to 5.4.230

* kernel: bump 5.10 to 5.10.165

* kernel: bump 5.15 to 5.15.90
2023-01-25 00:35:11 +08:00
lovehackintosh
0a113ed61b
kernel: bump 6.1 to 6.1.8 (#10802)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-24 22:02:12 +08:00
lovehackintosh
02d584f972
layerscape: sync with official source (#10801) 2023-01-24 22:00:53 +08:00
AmadeusGhost
9fe455c514 rockchip: add support for Ariaboard Photonicat
This commit add basic support for Photonicat Board.

Flash into lede:
  Run first: dd if=openwrt-xxx.img of=/dev/mmcblk0
  Then brush the img file to sdcard and insert it,
  the system will boot from above.

Note:
  Since rockchip does not release any code to power up their
  device, disabled emmc for now until we can remove rkbin.
2023-01-24 21:39:13 +08:00
AmadeusGhost
0dc779bf6c rfkill: enable for rockchip by default
This is useful for 4G modem chips. For example,
the Radxa E25 supports insert two modems.
2023-01-24 21:10:37 +08:00
Lollipop907
b77ab3b9ef rockchip: set network for MPC1903 (#10794) 2023-01-23 22:02:03 +08:00
lovehackintosh
c9e74f8630
intel-microcode: update to 20221108 (#10797)
Fixes: #10796
2023-01-23 21:50:08 +08:00
coolsnowwolf
89953ea0eb
ipset: update to 7.17 2023-01-23 13:02:42 +08:00
AmadeusGhost
034b35e9e6 uboot-rockchip: fixes spl mode for rk3568
Give spl more privileges so that it can be used at least.
Fixes: 8dbff7b ("uboot-rockchip: add rk3568 board support")
2023-01-22 22:15:12 +08:00
AmadeusGhost
8d54436f94 rockchip: cleanup device tree files 2023-01-22 22:10:52 +08:00
Lollipop907
ae17e3b40d
Add support for Rocktech MPC1903 (#10779)
* Update Makefile

Add Support For Rocktech MPC1903

* Add support for Rocktech MPC1903

* Add support for Rocktech MPC1903

* Update armv8.mk

* Add support for Rocktech MPC1903

* Add support for Rocktech MPC1903

* Update armv8.mk

* Update rk3399-mpc1903.dts

* Add support for Rocktech MPC1903

* Update rk3399-mpc1903.dts

* Add support for Rocktech MPC1903

* Add support for Rocktech MPC1903

* Update armv8.mk

* Delete mpc1903.bootscript

* Add rk3399-mpc1903.dts

* Add support for Rocktech MPC1903
2023-01-21 14:06:15 +08:00
fishg
2014b59a26
hv: CONFIG_HYPERV_UTILS depends config fix (#10790) 2023-01-20 21:29:38 +08:00
lovehackintosh
37c47e967a
kernel: bump to 5.4.229, 5.10.164, 5.15.89, 6.1.7 (#10785)
* kernel: bump 5.15 to 5.15.89

* kernel: bump 6.1 to 6.1.7

* kernel: bump 5.4 to 5.4.229

* kernel: bump 5.10 to 5.10.164
2023-01-19 14:03:33 +08:00
AmadeusGhost
dd6c384a06 rockchip: increase default cma size to 64MB 2023-01-18 21:00:54 +08:00
Hugo Chen
6ea630b1fd
Update openwrt-ci.yml (#10780)
更新chechout 版本,解决action报nodejs错误
更新apt安装组件,解决libgcc32的问题。
2023-01-18 12:10:39 +08:00
Daniel Golle
ec753a97ff kernel: fix kernel panic in mtk_ppe
The patch that adds support for hw flow-offloading counters on newer
MediaTek SoCs tries to prints acct->packets and acct->bytes in debugfs,
without checking that acct isn't null. This causes a kernel panic when
trying to read /sys/kernel/debug/ppe0/entries on older MediaTek SoCs.
Fix this by adding a check for acct.

Fixes: 9721a42a27 ("kernel: support hw flow-offloading counters on newer MediaTek SoCs")
Reported-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-01-17 21:22:37 +08:00
Daniel Golle
2b13399bb7 mediatek: filogic: fix sysupgrade on MMC on the BPi-R3
A previous attempt to simplify things went wrong and now sysupgrade
is broken on this device. Fix that.

Fixes: de94587e70 ("mediatek: filogic: don't rely on image preset in flash or sysupgrade")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-01-17 21:21:32 +08:00
Daniel Golle
55780024d3 mediatek: mt7622: fix sysupgrade on MMC on BPi-R64
A previous attempt to simplify things went wrong and now sysupgrade
is broken on this device. Fix that.

Fixes: d640cbac0e ("mediatek: mt7622: don't rely on existing image for sysupgrade")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-01-17 21:21:11 +08:00
Daniel Golle
9c56a0617d uboot-mediatek: update to U-Boot 2023.01
Support for MT7981 and MT7986 has been merged, remove patches.
Tested on a couple of MT7986, MT7622 and MT7623 boards.
MIPS builds are untested.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-01-17 21:19:50 +08:00
Linhui Liu
760b2663b5 tools/mkimage: update to 2023.01
Remove upstreamed patches:
- 020-tools-mtk_image-split-gfh-header-verification-into-a.patch
- 021-tools-mtk_image-split-the-code-of-generating-NAND-he.patch
- 022-tools-mtk_image-add-support-for-nand-headers-used-by.patch

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-17 21:15:23 +08:00
AmadeusGhost
d783ca6caa kmod-usb-net-smsc95xx: fix 6.1 dependency
Fixes: #10773
2023-01-16 12:39:31 +08:00
Petr Štetiar
faef3eb816 kernel: usb-net-asix: fix 5.15 dependency
Upstream in commit 34a1dee6bc44 ("net: usb: asix: ax88772: add generic
selftest support") in version 5.14 added dependency on generic selftest
functionality and armvirt/64 when compiled with ALL_KMODS=y reports following:

 Package kmod-usb-net-asix is missing dependencies for the following libraries:
 mdio_devres.ko
 selftests.ko

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-01-16 12:35:47 +08:00
Petr Štetiar
d34a06cb58 kernel: netdevices: add generic selftests module
Upstream in commit 3e1e58d64c3d ("net: add generic selftest support") in
version 5.13 added generic selftests module and usb-net-asix already
depends on it, in version 5.18 via commit 1710b52d7c13 ("net: usb:
smsc95xx: add generic selftest support") it will be used by
usb-net-smsc95xx as well.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2023-01-16 12:25:46 +08:00
lovehackintosh
2d986edd56
kernel: bump to 5.10.163, 5.15.88 (#10768) 2023-01-15 11:38:29 +08:00
aakkll
7fde812701
kernel: bump 6.1 to 6.1.6 (#10767)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>

Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2023-01-15 07:00:24 +08:00
1054009064
e8705bc49c
mac80211: ath11k: fix build error (#10766)
Builld-test: ipq807x/mf269
Fixes: bd7fde7 ("mac80211: ath11k: fix monitor bringup")
2023-01-14 20:55:24 +08:00
coolsnowwolf
4f183daa09 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2023-01-14 16:39:24 +08:00
coolsnowwolf
bd7fde7bb7 mac80211: ath11k: fix monitor bringup 2023-01-14 16:38:56 +08:00
lovehackintosh
68447b4218
kernel: bump 5.15.86 to 5.15.87 (#10764)
Also refresh patches for kernel 6.1.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-14 07:49:58 +08:00
coolsnowwolf
e49f3c22b2 x86: swtich kernel to 6.1 by default 2023-01-13 16:37:27 +08:00
coolsnowwolf
f67eeb41c5 kernel: bump 6.1 to 6.1.5 2023-01-13 16:36:32 +08:00
Hauke Mehrtens
6801edd8f4 ksmbd: Fix ZDI-CAN-18259
This fixes a security problem in ksmbd. It currently has the
ZDI-CAN-18259 ID assigned, but no CVE yet.

Backported from:
8824b7af40
cc4f3b5a6a

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2023-01-12 20:10:09 +08:00
Tim Harvey
72351b3ffa octeontx: add sqaushfs and ramdisk to features
Add squashfs and ramdisk to features as these are commonly used images
for the octeontx.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
2023-01-12 20:08:42 +08:00
Andrey Butirsky
9592f13790 base-files: add protocol qmi/mbim support for ucidef_set_interface()
Make it possible to setup default WAN interface for devices with built-in LTE
modems, using QMI or MBIM.

Signed-off-by: Andrey Butirsky <butirsky@gmail.com>
Reviewed-by: Lech Perczak <lech.perczak@gmail.com>
2023-01-11 19:40:05 +08:00
Felix Fietkau
2f8864218f base-files: add helper functions for adding wlan device entries to board.json
These will be used to give WLAN PHYs a specific name based on path specified
in board.json. The platform board.d script can assign a specific order based
on available slots (PCIe slots, WMAC device) and device tree configuration.

This helps with maintaining config compatibility in case the device path
changes due to kernel upgrades.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-11 19:38:11 +08:00
Vincent Tremblay
99604ea8c8 generic: fix silicon labs spidev bindings
Fix Silicon Labs bindings in the spidev driver

Some bindings for Silicon Labs chips already exists upstream.
These bindings can be found in trivial-devices.yaml.

The existing bindings are using "silabs" instead of "siliconlabs" to
identify the manufacturer.

This commit add two submitted patches for silabs chips and rename the
manufacturer in the different DTS for more coherence.

Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
2023-01-10 21:48:59 +08:00
Shiji Yang
1823afb3f0 mt76: add stand-alone MT7622 firmware package
Add a separate firmware package to avoid installing the MT7615 firmware
on all MT7622 target devices by default. Now we only add MT7615 firmware
packages for devices that use MT7615E. This commit also removes the
explicit dependency on kmod-mt7615e to refine the package dependency.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-01-09 21:19:06 +08:00
Shiji Yang
467b9218e6 mt76: add stand-alone MT7915 firmware package
The mt7915e driver supports MT7915, MT7916 and MT7986 chips. And Only
MT7915 series chips need the MT7915 firmware. To save storage, extract
them from the common code package and create a new package to provide
the firmware.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-01-09 21:17:05 +08:00
Shiji Yang
5452b45dd6 mt76: remove unnecessary dependency from mt7915e
The kmod-mt7615-common package does not contain any code that
related to mt7915e Wi-Fi6 driver, so remove it.

Tested on ramips/mt7621: SIM SIMAX1800T

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2023-01-09 21:15:02 +08:00
lovehackintosh
2751e926a0
iwinfo: backport IPQ8074 and QCNxxxx devices support (#10743)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2023-01-08 19:46:57 +08:00
coolsnowwolf
f977ed010d kernel: bump 6.1 to 6.1.4 2023-01-08 19:38:37 +08:00
Felix Fietkau
be337f9aa3 kernel: fix ethernet regression on mt7986
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-07 20:56:12 +08:00
Felix Fietkau
a2ac7bdc18 kernel: mediatek: fix WED offload regression on MT7622
Fix dealing with DSA untagging offload

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-07 20:55:31 +08:00
Felix Fietkau
297b6f78ca kernel: mediatek: improve ethernet fix for dealing with small fragments
Replace the workaround on MT7986 with a proper fix. Software workaround is
still needed on older chips.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2023-01-07 20:54:06 +08:00
Seth David Schoen
a9f98fa1b9 generic: 5.10: backport Treat IPv4 segment's lowest address as unicast
Backport patch from kernel 5.14.

Treat only the highest, not the lowest, IPv4 address within a local
subnet as a broadcast address, as subnets do not need two different
broadcast addresses and networking documentation consistently prefers
the highest address as broadcast.

This patch was merged in upstream net-next tree in May 2021 at

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=94c821c74bf5

This eventually frees up one address per subnet. It matches behavior
suggested in our Internet-Draft, and also the default behavior of OpenBSD
and FreeBSD.

Signed-off-by: Seth David Schoen <schoen@loyalty.org>
2023-01-07 20:53:12 +08:00
ZeaKyX
1e4dd74629
ddns-scripts_aliyun: update script (#10738) 2023-01-06 18:20:03 +08:00
coolsnowwolf
73de9902ed kernel: bump 6.1 to 6.1.3 2023-01-05 20:10:47 +08:00
lovehackintosh
849ae160a5
treewide: sync with upstream (#10720)
* mpc85xx: add support for cpu type 8548

8540 cpu type corresponds to e500v1 core while
8548 cpu type corresponds to e500v2 core

See https://www.nxp.com/products/processors-and-microcontrollers/legacy-mpu-mcus/powerquicc-processors:POWERQUICC_HOME#powerquicc-iii-mpc85xx
and https://www.nxp.com/docs/en/application-note/AN2807.pdf .

Co-authored-by: Josef Schlehofer <josef.schlehofer@nic.cz>
Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Šimon Bořek <simon.borek@nic.cz>

* tree-wide: Do not use package librt and libpthread

The libraries libpthread, libdl, libutil, libanl have been integrated
into the libc library in version 2.34. it is not needed to explicitly
link them any more.

Most of the functions have been moved from the librt.so into libc.so
some time ago already.

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

* toolchain/binutils: backport stable patches

Add the patches with real changes from the binutils 2.39 stable branch.
I am not aware that we ran into any of these problems, but I think it is
better to take the existing stable patches.

They were exported like this:
git format-patch binutils-2_39...origin/binutils-2_39-branch
I removed the patches changing the version numbers only.

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

* toolchain/binutils: switch to version 2.39 by default

This was build tested with all core packages on all targets
successfully.

This was run tested on the following systems:
* lantiq/xrx200 musl
* sunxi/cortex53 musl
* x86/64 musl
* x86/64 glibc

Some trusted firmware arm builds needed some fixes to build with
binutils 2.39, this was merged before.

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

* tools: Improve diffability/maintainability

There's no purpose to squish multiple tools into a single line (and
spread those out over multiple lines). It might look 'nice' in certain
conditions, but it's annoying to maintain.

For example, but not limited to:
* adding/removing tools, causes hard to read diffs
* Duplicates are harder to spot
* Sorting can not be (easily?) automated

With this proposed change, the above annoyances go away. Inserting a new
tool can be done with a single line-change-diff, sorting can be done by
any editor (in vi, select, :sort for example) and dupes are much easier
to spot.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>

* rules: drop -Wno-error additional flags from default TARGET_CFLAGS

We currently enable -Wno-error=unused-but-set-variable and
-Wno-error=unused-result by default on every compile package.

While this is (relatively) unharmful, we should follow other project
direction and starts enforcing good code quality. For example the linux
kernel recently started to enforce Wall by default and clean code is
mandatory for inclusion.

Drop for good these flags and and make it mandatory to correctly handle
return values at least with a warning log if they are not strictly error
condition.

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

* bridger: update to the latest version

def7755c459d add missing copyright headers
f68307fd96d7 add hairpin mode support
9ee8f433ba4e nl: do not pass NDA_VLAN with vid=0
978c1f9eed07 add support for the bridge port isolated flag

Signed-off-by: Felix Fietkau <nbd@nbd.name>

Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Co-authored-by: Šimon Bořek <simon.borek@nic.cz>
Co-authored-by: Josef Schlehofer <josef.schlehofer@nic.cz>
Co-authored-by: Pali Rohár <pali@kernel.org>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
Co-authored-by: Olliver Schinagl <oliver@schinagl.nl>
Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
Co-authored-by: Felix Fietkau <nbd@nbd.name>
2023-01-04 15:41:15 +08:00
AmadeusGhost
fa691af892 kmod-drm-*: fixes depends on x86 with linux 6.1
Fixes: #10721
2023-01-04 12:38:13 +08:00
Markus Stockhausen
0744781758 tools: Add gzip-libdeflate advanced compressor
Several devices provide U-Boot versions with only gzip compressed kernel
support (e.g. Realtek switches). This compression method produces larger
images than lzma. To save space on flash and avoid going the hard way with
lzma-loader we can make use of enhanced gzip tool based on libdeflate
compression library from https://github.com/ebiggers/libdeflate. It
keeps 100% deflate/gzip compatibility while improving compression ratio.
The image can be unpacked by the default inflate routines inside U-Boot.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
[Switched to v1.15 and made it work with cmake]
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Reviewed-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Rosen Penev <rosenp@gmail.com>
Reviewed-by: Sander Vanheule <sander@svanheule.net>
2023-01-04 12:35:13 +08:00
AmadeusGhost
a20ec5143d r8125: update to version 9.010.01-2 2023-01-03 20:15:41 +08:00
AmadeusGhost
7488a31bb6 rockchip: fixes drm module depends
Also refresh kernel config.
Fixes: #10715
2023-01-03 20:10:31 +08:00
Nick Hainke
fdea921ad5 wolfssl: update to 5.5.4-stable
Remove upstreamed:
- 001-Fix-enable-devcrypto-build-error.patch

Refresh patch:
- 100-disable-hardening-check.patch

Release notes:
https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.4-stable

Signed-off-by: Nick Hainke <vincent@systemli.org>
2023-01-02 18:20:08 +08:00
coolsnowwolf
8ab47a669f rockchip: fix NanoPi R2C stmmac phy 2023-01-02 18:16:54 +08:00
lovehackintosh
547fc7765c
kernel: bump 5.15 to 5.15.86 (#10708)
* kernel: bump 5.15 to 5.15.86

Removed upstreamed:
  pending-5.15/101-Use-stddefs.h-instead-of-compiler.h.patch[1]
  ipq60xx/patches-5.15/0171-arm64-dts-qcom-ipq6018-cp01-c1-use-BLSPI1-pins.patch
  ipq806x/patches-5.15/122-01-clk-qcom-clk-krait-fix-wrong-div2-functions.patch[2]
  ipq60xx/patches-5.15/0139-arm64-dts-qcom-Correct-QMP-PHY-child-node-name.patch
  ipq60xx/patches-5.15/0005-v5.16-arm64-dts-qcom-Correct-QMP-PHY-child-node-name.patch
  ipq807x/patches-5.15/0004-v5.16-arm64-dts-qcom-Correct-QMP-PHY-child-node-name.patch
  bcm27xx/patches-5.15/950-0198-drm-fourcc-Add-packed-10bit-YUV-4-2-0-format.patch[3]

Manually rebased:
  ramips/patches-5.15/100-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch[4]

Added patch/backported:
  ramips/patches-5.15/107-PCI-mt7621-Add-sentinel-to-quirks-table.patch[5]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.86&id=c160505c9b574b346031fdf2c649d19e7939ca11
2. Cannot find in the stable tree but it is here: a051e10bfc
3. ec1727f89e
4. Quilt gave this output when I applied the patch to rebase it:
% quilt push -f
Applying patch platform/100-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch
patching file arch/mips/ralink/Kconfig
patching file drivers/pci/controller/Kconfig
patching file drivers/pci/controller/Makefile
patching file drivers/staging/Kconfig
patching file drivers/staging/Makefile
patching file drivers/staging/mt7621-pci/Kconfig
patching file drivers/staging/mt7621-pci/Makefile
patching file drivers/staging/mt7621-pci/TODO
patching file drivers/staging/mt7621-pci/mediatek,mt7621-pci.txt
patching file drivers/staging/mt7621-pci/pci-mt7621.c
Hunk #1 FAILED at 1.
Not deleting file drivers/staging/mt7621-pci/pci-mt7621.c as content differs from patch
1 out of 1 hunk FAILED -- saving rejects to file drivers/staging/mt7621-pci/pci-mt7621.c.rej
patching file drivers/pci/controller/pcie-mt7621.c
Applied patch platform/100-PCI-mt7621-Add-MediaTek-MT7621-PCIe-host-controller-.patch (forced; needs refresh)

Upon inspecting drivers/staging/mt7621-pci/pci-mt7621.c.rej, it seems that
the original patch wants to delete drivers/staging/mt7621-pci/pci-mt7621.c
but upstream's version was not an exact match.  I opted to delete that file
and need some feedback.  Was that the correct course of action?

5. Suggestion by hauke: 19098934f9
"This patch is in upstream kernel, but it was backported to the old
staging driver in kernel 5.15."

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

Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* oxnas: sata_oxnas: use ata_link_err

Kernel 5.15.86 has backported ("ata: libata: move ata_{port,link,dev}_dbg
to standard pr_XXX() macros") and this is now causing compilation errors
for oxnas SATA driver due to usage of ata_link_printk().

Upstream has migrated to using the appropriate
ata_link_{err, warn, notice, info} calls a while ago so its not affected.

Lets do the same for oxnas SATA driver and use ata_link_err() instead of
ata_link_printk().

Signed-off-by: Robert Marko <robimarko@gmail.com>

Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Signed-off-by: Robert Marko <robimarko@gmail.com>
Co-authored-by: John Audia <therealgraysky@proton.me>
Co-authored-by: Robert Marko <robimarko@gmail.com>
2023-01-02 14:11:40 +08:00
coolsnowwolf
a9553c7666 Version update to R23.1.1 2023-01-01 16:44:45 +08:00
coolsnowwolf
5d4863cab0 kernel: bump 6.1 to 6.1.2 2023-01-01 16:43:19 +08:00
coolsnowwolf
55ce447162 rockchip: add usb-serial cp210x for HINLINK H66K/H68K 2023-01-01 16:18:44 +08:00
Hauke Mehrtens
2ec379df35 mbedtls: update to version 2.28.2
Changelog: https://github.com/Mbed-TLS/mbedtls/releases/tag/v2.28.2
This release of Mbed TLS provides bug fixes and minor enhancements. This
release includes fixes for security issues.

Fixes the following CVEs:
* CVE-2022-46393: Fix potential heap buffer overread and overwrite in
DTLS if MBEDTLS_SSL_DTLS_CONNECTION_ID is enabled and
MBEDTLS_SSL_CID_IN_LEN_MAX > 2 * MBEDTLS_SSL_CID_OUT_LEN_MAX.

* CVE-2022-46392: An adversary with access to precise enough information
about memory accesses (typically, an untrusted operating system
attacking a secure enclave) could recover an RSA private key after
observing the victim performing a single private-key operation if the
window size used for the exponentiation was 3 or smaller.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-31 12:19:33 +08:00
Xuefer H
8cf3c42e4e libbsd: fix libpath to not use host path
libpath.so uses host path in ld script causing other packages fail to
cross compile, e.g. perl:
"ld: cannot find /usr/lib/libbsd.so.0.11.6: No such file or directory"

Signed-off-by: Xuefer H <xuefer@gmail.com>
2022-12-31 12:18:19 +08:00
coolsnowwolf
25f88e06fd rockchip: fix hinlink_common target 2022-12-30 13:38:11 +08:00
coolsnowwolf
17b9f3bdf8 fullconenat: Make use of KERNEL_MAKE 2022-12-30 13:30:08 +08:00
AmadeusGhost
c00325af3f rockchip: add support for HINLINK OPC-H66K 2022-12-30 12:56:36 +08:00
AmadeusGhost
526fd6d342 treewide: move some patches into generic 5.15
These patchs are suitable for all targets rather
than a specific target.
2022-12-30 12:39:43 +08:00
Robert Marko
8cf4cee7d1 linux-firmware: disable stripping
It has been brought to my attention that recently added WCN6855 firmware
is broken as it is getting stripped during building due to being 2 ELF
binaries.
I am sure WCN6750 and any other ELF binaries are having the same issue,
so since stripping firmware binaries is clearly unwanted disable it.

Fixes: b4d3694f81f4 ("linux-firmware: package ath11k consumer cards firmware")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-12-30 12:36:19 +08:00
Álvaro Fernández Rojas
55eff00b5c bcm27xx: fix BCMGENET kernel config
Revert backported upstream commits 421f8663b3a7 and 8d820bc9d12b, which have
introduced a regression in BCMGENET kconfig that disabled the network driver
for the Raspberry Pi.

Fixes: 0c405bceba11 ("kernel: bump 5.15 to 5.15.85")
Fixes: e9008223268c ("kernel: bump 5.15 to 5.15.84")

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2022-12-29 11:04:15 +08:00
Robert Marko
b433821272 linux-firmware: ath11k: add symlink for WCN6855 hw2.1
WCN6855 exists in 2 HW revisions, but both use the same FW so upstream
just has a symlink for hw2.1 to hw2.0 that I forgot to make.

Fixes: b4d3694f81f4 ("linux-firmware: package ath11k consumer cards firmware")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-12-29 11:03:09 +08:00
Nick Hainke
ec0461a4fe linux-firmware: update to 20221214
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-29 11:02:20 +08:00
coolsnowwolf
8b05e418a2 ath10k-ct: add linux kernel v6.1 api update 2022-12-28 18:22:03 +08:00
Beginner
cc75f3926f
uhttpd: update to latest Git HEAD (#10685)
* uhttpd: update to latest Git HEAD

e3395cd ucode: initialize search path before VM init
8cb3f85 ucode: initialize default library search path
188dea2 utils: accept '?' as path terminator in uh_path_match()
c5eac5d file: support using dynamic script handlers as error pages
290ff88 relay: trigger close if in header read state with pending data
f9db538 ucode: ignore exit exceptions
8ba0b64 cmake: use variables and find_library for dependency

Signed-off-by: Jo-Philipp Wich <jo@mein.io>

* uhttpd: use acme hotplug

Reload uhttpd after certificates are renewed with acme.

Reviewed-by: Toke Høiland-Jørgensen <toke@toke.dk>
Signed-off-by: Glen Huang <i@glenhuang.com>

* uhttpd: use procd to reload on acme renew

Calling /etc/init.d/uhttpd reload directly in the acme hotplug script
can inadvertently start a stopped instance.

Signed-off-by: Glen Huang <i@glenhuang.com>

* uhttpd: update to latest Git HEAD

2397755 client: fix incorrectly emitting HTTP 413 for certain content lengths

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

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Glen Huang <i@glenhuang.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Co-authored-by: Jo-Philipp Wich <jo@mein.io>
Co-authored-by: Glen Huang <i@glenhuang.com>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-28 02:38:49 +08:00
lovehackintosh
b2eafb1cbc
mt76: refresh patches (#10689)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-12-28 01:15:34 +08:00
Felix Fietkau
32330e1a15 mt76: update to the latest version
a03ef0aab93e wifi: mt76: mt7921: fix deadlock in mt7921_abort_roc
5b509e80384a wifi: mt76: dma: fix a regression in adding rx buffers

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-26 20:50:22 +08:00
lovehackintosh
30955c9f61
dnsmasq: bump to v2.88 (#10683)
Most relevant feature for openwrt in this release, supports dynamically
removing hosts from 'hostsdir' supplied host files.

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
2022-12-26 20:40:31 +08:00
AmadeusGhost
81e04f0c85 Revert "mediatek: add support for Netgear WAX206"
This reverts commit e55f584896.
2022-12-25 19:20:26 +08:00
Hauke Mehrtens
cdae37f8fa ramips: Fix drivers/pwm/pwm-mediatek-ramips.c compile
The pwmchip_remove() function returns void now. Fix a compile problem in
the drivers/pwm/pwm-mediatek-ramips.c driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-25 19:13:26 +08:00
Hauke Mehrtens
80d52e735c kernel: Move CONFIG_PWM_IMG and CONFIG_PWM_MEDIATEK to generic configuration
In the build of the ramips/mt76x8 target the user gets asked about these
two configuration options, add them to the generic kernel configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-25 19:12:34 +08:00
Hauke Mehrtens
484a3fd213 kernel: Move CONFIG_DRM_XEN_FRONTEND to generic configuration
The CONFIG_DRM_XEN_FRONTEND configuration symbol is also used by the
layerscape target, move it to the generic kernel configuration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-25 19:06:40 +08:00
cuiyf5516
5acc56143f
automount: add kmod-fs-ntfs3 (#10671) 2022-12-24 01:26:46 +08:00
Beginner
2292bc3559
n2n: move to packages feeds (#10611)
Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com>

Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com>
2022-12-24 01:26:21 +08:00
coolsnowwolf
317d92dd3e fstools: fix ntfs3 mount with utf-8 2022-12-23 02:32:52 +08:00
lovehackintosh
d2460dfb82
treewide: sync with upstream (#10658)
* rules: fix broken commitcount on alpine system

To generate commitcount we use grep --max-count. This is not present on
alpine grep and cause wrong generation. Use -m as it's just the short
version of --max-count and more portable.

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

* image-commands.mk: Be consistent in command invocation

Most/all other tools use the staging dir prefix, gzip should as well.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Christian Marangi <ansuelsmth@gmail.com>

* image: fix device profile specific COMPILE targets

Commit a01d23e75 ("image: always rebuild kernel loaders")
is a step in the right direction, but exposed some issues
and regressions in the makefile.

Some of the files made by device specific COMPILE targets
start with an "append" command (i.e. >> instead of > redirection)
and if the file already exists, the target file is the
input to itself before the first recipe-specified input.

Fixes: a01d23e75 ("image: always rebuild kernel loaders")
Fixes: a7fb589e8 ("image: always rebuild kernel loaders")
Signed-off-by: Michael Pratt <mcpratt@pm.me>

* trusted-firmware-a.mk: use correct CPE ID

There are 2 different CPE IDs on the NVD website:
cpe:/a:arm:trusted_firmware-a
cpe:/o:arm:arm_trusted_firmware

The ID as currently used in trusted-firmware-a.mk does not exist. The
CPE ID using the arm_trusted_firmware product name only lists a few
records for versions 2.2 and 2.3 on the NVD site. The CPE ID using the
trusted_firmware-a product name lists many more records, and actually
has a CVE linked to it. Therefore, use the CPE ID using the
trusted_firmware-a product name.

Fixes: 104d60fe94ce ("trusted-firmware-a.mk: add PKG_CPE_ID")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

* fritz-tools: fritz_tffs_nand: exclude oob code when disabled

Skip unnecessary stuff if checking the oob data is disabled.

Signed-off-by: Andre Heider <a.heider@gmail.com>

* fritz-tools: fritz_tffs_nand: get rid of struct tffs_sectors

This doesn't help and "[0]" gets in the way of bounds checks.

Signed-off-by: Andre Heider <a.heider@gmail.com>

* fritz-tools: fritz_tffs_nand: cache already read sector ids

This speeds up the tool significantly, especially when using the "-a"
argument.

Signed-off-by: Andre Heider <a.heider@gmail.com>

* iproute2: add missing libbpf dependency

This patch adds libbpf to the dependencies of tc-mod-iptables.

The package tc-mod-iptables is missing libbpf as a dependency,
which leads to the build failure described in bug #9491

    LIBBPF_FORCE=on set, but couldn't find a usable libbpf

The build dependency is already automatically added because some other
packages from iproute2 depend on libbpf, but bpftools has multiple build
variants. With multiple build variants none gets build by default and
the build system will not build bpftools before iproute2.

Fixes: #9491
Signed-off-by: Kien Truong <duckientruong@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

* iproute2: update to 6.0.0

Release Notes:
https://lore.kernel.org/netdev/20221004082610.56b04719@hermes.local/t/

Remove upstreamed patch:
- 010-ipstats-Add-param.h-for-musl.patch

Refreshed:
- 140-keep_libmnl_optional.patch
- 145-keep_libelf_optional.patch
- 150-keep_libcap_optional.patch
- 155-keep_tirpc_optional.patch
- 170-ip_tiny.patch
- 190-fix-nls-rpath-link.patch
- 200-drop_libbsd_dependency.patch
- 300-selinux-configurable.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>

* iproute2: update to 6.1.0

Announcement:
https://lore.kernel.org/netdev/20221214094130.7b11ec2e@hermes.local/T/#t

Refresh patch:
- 170-ip_tiny.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/xz: update to 5.2.10

Update to latest version.

Signed-off-by: Nick Hainke <vincent@systemli.org>

* Revert "Revert "tools/upx: remove (#10622)""

This reverts commit d3e16f203a.

* kernel: Make use of KERNEL_MAKE

Make use of KERNEL_MAKE in kernel packages were easily possible.
This moves some more code to common places and reduces the number of
lines.

It is defined like this:
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
KERNEL_MAKEOPTS = -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS)

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

* toolchain: gcc: backport patches to fix build with glibc 2.36

glibc 2.36 changed the definition of enum fsconfig_command, it now
collides with the same definition from sys/mount.h. Remove the include
of linux/fs.h This still compiled with musl too.

This backports a patch which is already in the stable branch of GCC 11
and GCC 12.

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

* toolchain: glibc: Update to glibc 2.36

This updates to glibc to version 2.36.

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

* tools/llvm: update to 15.0.6

Release Notes:
	https://discourse.llvm.org/t/llvm-15-0-0-release/65099
	https://discourse.llvm.org/t/llvm-15-0-1-released/65380
	https://discourse.llvm.org/t/llvm-15-0-2-released/65695
	https://discourse.llvm.org/t/llvm-15-0-3-released/66036
	https://discourse.llvm.org/t/llvm-15-0-4-released/66337
	https://discourse.llvm.org/t/llvm-15-0-5-release/66616
	https://discourse.llvm.org/t/llvm-15-0-6-released/66899

Remove HOST_BUILD_PARALLEL as it's default now.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Kien Truong <duckientruong@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Nick Hainke <vincent@systemli.org>
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
Co-authored-by: Olliver Schinagl <oliver@schinagl.nl>
Co-authored-by: Michael Pratt <mcpratt@pm.me>
Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
Co-authored-by: Andre Heider <a.heider@gmail.com>
Co-authored-by: Kien Truong <duckientruong@gmail.com>
Co-authored-by: Nick Hainke <vincent@systemli.org>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-23 02:09:34 +08:00
coolsnowwolf
ea6e00d909 rockchip: add wireless support for H68K 2022-12-23 01:51:08 +08:00
coolsnowwolf
e55f584896 mediatek: add support for Netgear WAX206 2022-12-22 23:11:55 +08:00
Jan-Niklas Burfeind
2b9f6d0454 uboot-sunxi: use UUID of bootdev and bootpart
Several sunxi devices come with multiple mmc devices. On such devices,
the mmc device order is unpredictable, so using /dev/mmcblk0p2 as root
device doesn't always work, which results in unbootable devices.

For the Banana Pi BPI-R3 in the mediatek target, this has been solved by
defining aliases for the mmc devices in the DTS. Ideally we would do the
same here, but for sunxi-a64 we already use UUID probing, so let's start
with that (5f2ff607e286 ("uboot-sunxi: a64: allow booting directly from
eMMC")).

Since we're building and including u-boot in each supported device
image, and this method has been proven to work fine for a64, let's just
change the default u-boot env file to do the same.

Fixes: e6d9f6fdff ("sunxi: add support for FriendlyARM NanoPi R1")
Co-authored-by: Karl Palsson <karlp@etactica.com>
Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
[use UUID in default u-boot env, rewrite commit message]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-12-22 19:51:46 +08:00
Hauke Mehrtens
6a8f5a5d92 kernel: Add missing kernel configuration options
This fixes compile of the bmips target.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-22 19:50:15 +08:00
Hauke Mehrtens
7200044e40 kernel: Reorder kernel configuration options
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-22 19:47:56 +08:00
Christian Marangi
92fbd549a3 generic: fix wrong PTR_ERR use in of net mac address ascii patch
nvmem_cell_read return a pointer error when an error occurs. Currently
we convert the pointer error to an int while the rest of the function
return a void* and expcet an error pointer. Fix this PTR_ERR msuse
fixing compilation warning.

Fixes the following compilation warning:
net/ethernet/eth.c: In function 'nvmem_cell_get_mac_address':
net/ethernet/eth.c:547:24: warning: returning 'long int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
  547 |                 return PTR_ERR(mac);
      |                        ^~~~~~~~~~~~
net/ethernet/eth.c: In function 'nvmem_cell_get_mac_address_ascii':
net/ethernet/eth.c:564:24: warning: returning 'long int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
  564 |                 return PTR_ERR(mac_ascii);
      |                        ^~~~~~~~~~~~~~~~~~

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-12-22 19:45:20 +08:00
Felix Fietkau
98fc706c95 mediatek: filogic: enable maxlinear PHY support
Needed for the 7986 RFB1 board, refresh config

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-22 19:43:30 +08:00
Daniel Golle
01a0580c6e mediatek: remove obsolete patch
The patch enabling hardware flow offloading support on the MT7623 SoC
has been merged upstream as of Linux 5.13. Remove our local patch which
wrongly got forward-ported and now actually enables hardware flow
offloading for the MT2701 SoC family (unsupported in OpenWrt).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-12-22 19:39:29 +08:00
lovehackintosh
c267a13cee
kernel: bump to 5.10.161, 5.15.85, 6.1.1 (#10666)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-12-22 11:25:10 +08:00
AmadeusGhost
c4be33b792 rockchip: force enable rk3568 msi interrupt
Since the interrupt of RK3568 has hardware bug,
we need a workaround to enable msi interrupt.
Without this, the r8125 will not be stable.
2022-12-21 19:30:24 +08:00
AmadeusGhost
f24975f2c5 rockchip: update rk3568 pcie2x1 dts part
Fixes: #10626
2022-12-21 19:19:14 +08:00
Koen Vandeputte
32d7126c9e kernel: package mhi pci driver
This driver provides MHI PCI controller driver for devices

Fixes: #10660

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
2022-12-21 19:15:19 +08:00
Robert Marko
6b10e5f27f linux-firmware: package ath11k consumer cards firmware
Package firmware for ath11k supported QCA consumer cards from linux-firmware.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-12-21 11:59:55 +08:00
Nick Hainke
b5bcdf726d linux-firmware: update to 20221109
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-21 11:56:14 +08:00
coolsnowwolf
d3e16f203a Revert "tools/upx: remove (#10622)"
This reverts commit 71b4500ff3.
2022-12-20 23:14:22 +08:00
lovehackintosh
e32969d6bc
Kernel: bump to 5.4.228, 5.10.160, 5.15.84 (#10656)
* kernel: bump 5.10 to 5.10.160

No patches affected by this update.

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>

* kernel: bump 5.15 to 5.15.84

Signed-off-by: John Audia <therealgraysky@proton.me>

* kernel: bump 5.4 to 5.4.228

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Co-authored-by: John Audia <therealgraysky@proton.me>
2022-12-20 23:13:01 +08:00
coolsnowwolf
07423281c6 mt76: update to the latest version 2022-12-20 23:11:06 +08:00
coolsnowwolf
a45ed09431 mac80211: backport some new API from v6.1 2022-12-20 22:38:35 +08:00
coolsnowwolf
6710357cce mac80211: revert to linux 5.15 2022-12-20 14:57:32 +08:00
coolsnowwolf
710cba24d7 nftables: bump version 2022-12-20 11:47:25 +08:00
coolsnowwolf
9c97511b89 mac80211: add ath11k PCI support 2022-12-20 11:43:45 +08:00
coolsnowwolf
6d397cf174 generic: backport API from linux 6.10 for mac80211 v6.1-rc8 2022-12-20 01:18:50 +08:00
coolsnowwolf
3d38995ca2 dnsmasq: fix filter_aaaa option 2022-12-19 23:21:34 +08:00
Albert Xu
b45566e90d
package: Sync with upstream (#10641)
* firmware-utils: bump to git HEAD

Adds support for building TP-Link CPE605v1 factory images

    bd856eff4850 tplink-safeloader: add TP-Link CPE605 v1 Support

Signed-off-by: Sander Vanheule <sander@svanheule.net>

* firmware-utils: fix archive checksum

PKG_SOURCE_DATE was modified after updating PKG_MIRROR_HASH, causing the
latter to change. This results in a warning during builds and rejected
downloads.

Fixes: 232879a7b7f8 ("firmware-utils: bump to git HEAD")
Signed-off-by: Sander Vanheule <sander@svanheule.net>

* libtracefs: update to 1.6.2

378a9dd libtracefs: version 1.6.2
e6daa60 libtracefs: Add unit test to test mounting of tracefs_{tracing,debug}_dir()
32acbbf libtracefs: Have tracefs_{tracing,debug}_dir() mount {tracefs,debugfs} if not mounted

Signed-off-by: Nick Hainke <vincent@systemli.org>

* ethtool: add PKG_CPE_ID

Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>

* ethtool: update to 6.0

Release Notes:
https://lwn.net/Articles/910841/

Signed-off-by: Nick Hainke <vincent@systemli.org>

* strace: update to 6.1

Release Notes:
https://github.com/strace/strace/releases/tag/v6.1

Signed-off-by: Nick Hainke <vincent@systemli.org>

* trace-cmd: update to v3.1.5

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>

* libtraceevent: update to 1.7.0

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>

* libtracefs: update to 1.6.3

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/bash: update to 5.2.15

Update to the latest released version.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* tools/ccache: update to 4.7.4

Release Notes:
    https://ccache.dev/releasenotes.html#_ccache_4_7_3
    https://ccache.dev/releasenotes.html#_ccache_4_7_4

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* tools/libressl: update to 3.7.0

Release notes:
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.6.0-relnotes.txt
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.6.1-relnotes.txt
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.7.0-relnotes.txt

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* tools/mpc: update to 1.3.1

Version 1.3.1 new features:
	Bug fix: It is again possible to include mpc.h without including stdio.h.
Version 1.3.0 new features:
    New function: mpc_agm
    New rounding modes "away from zero", indicated by the letter "A" and corresponding to MPFR_RNDA on the designated real or imaginary part.
    New experimental ball arithmetic.
    New experimental function: mpc_eta_fund
    Bug fixes:
        mpc_asin for asin(z) with small |Re(z)| and tiny |Im(z)|
        mpc_pow_fr: sign of zero part of result when the base has up to sign the same real and imaginary part, and the exponent is an even positive integer
        mpc_fma: the returned int value was incorrect in some cases (indicating whether the rounded real/imaginary parts were smaller/equal/greater than the exact values), but the computed complex value was correct.
    Remove the unmaintained Makefile.vc; build files for Visual Studio are maintained independently by Brian Gladman.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* tools/patchelf: update to 0.17.0

Update to the latest released version.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Nick Hainke <vincent@systemli.org>
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Co-authored-by: Sander Vanheule <sander@svanheule.net>
Co-authored-by: Nick Hainke <vincent@systemli.org>
Co-authored-by: Linhui Liu <liulinhui36@gmail.com>
2022-12-19 12:45:05 +08:00
lovehackintosh
bc3e54a83d
tools/sed: Fix handling of symlinks of 128 chars (#10642)
If the absolute path a symlink is pointing to is 128 bytes long sed
failed with an error message like this: "<path>/sedstbU8O: Not a directory"

This fixes a problem building python seen in the build bot.

This patch is on its way into upstream sed.

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

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-19 12:44:49 +08:00
lovehackintosh
71b4500ff3
tools/upx: remove (#10622)
upx is already in package/lean/upx
save a bit of compilation time.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-12-18 22:59:13 +08:00
coolsnowwolf
b0e3285bf0 dnsmasq: set a cachesize default value 8192 2022-12-18 22:52:26 +08:00
AmadeusGhost
d5298b0769 ath10k: add missing 256qam patch 2022-12-18 21:50:14 +08:00
Felix Fietkau
3f8f00b491 mt76: update to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-18 21:33:21 +08:00
Felix Fietkau
0aac47f815 ath9k: add missing dependency on random core
Reported-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-18 21:32:24 +08:00
Felix Fietkau
bdb6a31ce2 mac80211: update to linux 6.1-rc8
This should help stay in sync with upstream development

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-18 21:30:21 +08:00
Felix Fietkau
e8b525f43c mac80211: remove old legacy legacy drivers
Get rid of drivers that are either limited to 802.11b/g or don't even support
cfg80211/mac80211. Most of these are either limited to boards that we don't even
support anymore because of firmware size, or were only used for custom hacks by
a really small number of users in the past.
Let's get rid of those to reduce the maintenance effort and the number of useless
packages

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-18 20:25:07 +08:00
AmadeusGhost
82a059873f mediatek: drop useless files 2022-12-18 12:24:30 +08:00
Hauke Mehrtens
61c54ee563 gdb: Do not link against xxhash
libxxhash is now available in the OpenWrt package feed and gdb will link
against it if gdb finds this library. Explicitly deactivate the usage
of xxhash.

This should fix the build of gdb in build bots.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-18 12:20:13 +08:00
Hauke Mehrtens
b533cb3266 kernel: Make KERNEL_MAKEOPTS recursively expanded
KERNEL_MAKEOPTS will get expanded when it is used and not when it is
defined in the kernel.mk file now. This fixes problems finding dependent
kernel modules when it is used by a kernel module package.

Without this change the build of packages which depend on other out of
tree modules failed when they used KERNEL_MAKE because some symbols could
not be found. This happened because KERNEL_MAKE_FLAGS which contains a
"if $(__package_mk)" was  evaluated where KERNEL_MAKEOPTS was defined
and not when the KERNEL_MAKE was used. For packages which included
kernel.mk before package.mk we saw this problem. One workaround
was to use the correct include order and the other one was to not
use KERNEL_MAKE_FLAGS, but copy its content.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-18 12:19:56 +08:00
Furong Xu
2569dc001c mediatek: add LED support for Xiaomi Redmi AX6000
add DT nodes and default package for the LEDs on Redmi AX6000

Signed-off-by: Furong Xu <xfr@outlook.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-12-17 11:24:24 +08:00
Furong Xu
8563a8117b mediatek: enable sel_clk for spi-mt65xx
Without explicitly enabling sel_clk, clk_disable_unused() will disable
it when boot is done, causing CPU hang on SPI1 register access on MT7986.
Explicitly enable sel_clk to make SPI1 functional.

Signed-off-by: Furong Xu <xfr@outlook.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-12-17 11:22:54 +08:00
Chuanhong Guo
599d5ef309 kernel: add driver package for WS2812B LEDs
Two WS2812B (NeoPixel) clones are used in Xiaomi Redmi AX6000 as
indicator lights. Add a driver for controlling it using SPI MOSI.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2022-12-17 11:21:23 +08:00
Tony Butler
450a7a3686 kernel: modules/lib-lz4: add lz4hc_compress
enable option `CONFIG_CRYPTO_LZ4HC` to match default kernel config

this only adds the `lz4hc_compress` module, and has no effect on the
`lz4_decompress` module which already supports any flavor

Signed-off-by: Tony Butler <spudz76@gmail.com>
2022-12-17 11:20:09 +08:00
Stijn Tintel
a70fb090cd kernel: add missing symbol to 5.10 config
Kernel 5.10.158 added a prompt for the FUNCTION_ERROR_INJECTION symbol.
This is exposed in builds with CONFIG_KERNEL_KPROBES enabled, causing
those builds to fail due to a missing symbol. Add the symbol to fix
this.

Fixes: 6801c460b6a7 ("kernel: bump 5.10 to 5.10.158")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-12-17 11:19:05 +08:00
Stijn Tintel
68023f2712 kernel: add missing symbol to 5.15 config
Kernel 5.15.82 added a prompt for the FUNCTION_ERROR_INJECTION symbol.
This is exposed in builds with CONFIG_KERNEL_KPROBES enabled, causing
those builds to fail due to a missing symbol. Add the symbol to fix
this.

Fixes: 68426e54eda4 ("kernel: bump 5.15 to 5.15.82")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-12-17 11:18:39 +08:00
AmadeusGhost
72d0e2b562 linux-firmware: add rtl8723du-firmware 2022-12-16 12:38:16 +08:00
AmadeusGhost
09c81d9274 rtw88: move usb part out of backport tree
Create a useless driver to avoid affecting the
backport tree.
2022-12-16 12:09:00 +08:00
coolsnowwolf
9364fa6e6c firewall: fix locking issue when running racing condition 2022-12-16 11:32:41 +08:00
Albert Xu
4952f51d17
tools/dosfstools: fix PKG_SOURCE (#10620)
Both mirrors provided in the Makefile only serve gzipped tarballs.

Fixes: #10871
Fixes: 9edfe7dd13d9 ("source: Switch to xz for packages and tools where possible")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-12-15 18:26:27 +08:00
lovehackintosh
7660f97fb6
kernel: bump to 5.4.227, 5.10.159, 5.15.83 (#10619)
* kernel: bump 5.15 to 5.15.83

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* kernel: bump 5.10 to 5.10.159

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* kernel: bump 5.4 to 5.4.227

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-12-15 13:14:31 +08:00
coolsnowwolf
afb7eaa4bb dnsmasq: drop mini_ttl option 2022-12-15 13:13:15 +08:00
coolsnowwolf
8c172cc7bf dnsmasq: add support for filter-AAAA/A 2022-12-15 12:18:02 +08:00
coolsnowwolf
a1b503c6ad dnsmasq: add logfacility file to jail mounts 2022-12-15 12:09:41 +08:00
coolsnowwolf
e50a86b90f firewall: set default fullcone to high performance mode 2022-12-15 03:59:10 +08:00
coolsnowwolf
418a674f86 generic: fix linux 6.1 flowoffload support 2022-12-15 03:56:39 +08:00
Hauke Mehrtens
557fbb82b6 kernel: kmod-ipt-ulog: Remove package
The ulog iptables target was removed with kernel 3.17, remove the kernel
and also the iptables package in OpenWrt too.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-15 01:47:28 +08:00
coolsnowwolf
6b480374fd rockchip: fix opc-h68k tf boot fail on some cards 2022-12-15 00:53:32 +08:00
coolsnowwolf
830bc8e815 dnsmasq: bump to v2.8.7 2022-12-15 00:44:58 +08:00
coolsnowwolf
4a5a6e637e silicon: fix kernel target 2022-12-14 18:35:35 +08:00
Hauke Mehrtens
7293fb0e42 kernel: Refresh kernel 5.10
Make the patches apply cleanly again.

Fixes: 8327e0fb72f0 ("kernel: backport the dev_set_threaded export to 5.10")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-14 12:15:23 +08:00
aakkll
a019519831 kernel: refresh linux 6.1 patches 2022-12-14 12:13:24 +08:00
AmadeusGhost
56de4ccd61 treewide: remove kernel 6.0 support 2022-12-14 12:10:38 +08:00
AmadeusGhost
2e543c861a sunxi: add kernel 5.10 support 2022-12-14 12:00:10 +08:00
coolsnowwolf
ede1c194f6 mac80211: backport ath11k in linux kernel 6.1 2022-12-14 05:04:31 +08:00
coolsnowwolf
9185096ac0 Update README.md 2022-12-14 03:15:13 +08:00
Beginner
7eec2d4474
luci-app-qbittorrent-simple: move to luci feeds (#10606)
Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com>

Signed-off-by: Beginner-Go <70857188+Beginner-Go@users.noreply.github.com>
2022-12-14 03:05:47 +08:00
coolsnowwolf
9a103d038b rockchip: fix radxa e25 adc-keys power button support 2022-12-14 02:25:17 +08:00
coolsnowwolf
4212f116b4 mac80211: backports linux 6.1 support 2022-12-14 01:52:15 +08:00
AmadeusGhost
74a3f1191b ksmbd: fixes build on kernel 6.1
Fixes: #10604

Signed-off-by: AmadeusGhost <amadeus@openjmu.xyz>
2022-12-14 00:54:30 +08:00
AmadeusGhost
e6f5ad32af rockchip: add kernel 6.1 support 2022-12-14 00:10:54 +08:00
AmadeusGhost
b4bbdc1e99 rockchip: correct board name for radxa e25 2022-12-13 23:56:22 +08:00
coolsnowwolf
93f840212b kernel: fix build fail with zstd 2022-12-13 22:25:18 +08:00
coolsnowwolf
994a4c48e4 kernel: add linux 6.1 stable release support 2022-12-12 19:29:09 +08:00
AmadeusGhost
3cdf9dc3c3 Revert "kernel: export symbol dev_set_threaded"
This reverts commit ba1f8c931c.
Fixes: #10589, #10593, #10595
2022-12-12 15:09:28 +08:00
Malash
71a7686e61
ath11k-firmware: update latest firmware for wcn6855 (#10572)
* ath11k-firmware: update latest firmware for wcn6855

* don't strip bin files in ath11k firmware
2022-12-12 00:22:04 +08:00
coolsnowwolf
2adae81a9c default-settings: fix password init 2022-12-12 00:19:56 +08:00
Weiping Yang
aa4ef903bd ipq40xx: fix usb driver not loaded for GL-A1300
This patch enables USB support for the GL.iNet GL-A1300
Repair the usb driver startup phase is not loaded

Signed-off-by: Weiping Yang <weiping.yang@gl-inet.com>
2022-12-11 15:28:35 +08:00
Felix Fietkau
177dddfaf2 kernel: backport the dev_set_threaded export to 5.10
Fixes mt76 build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-11 15:17:02 +08:00
Felix Fietkau
efafaab7df kernel: backport mtk_wed.h from 5.15 to 5.10
Fixes mt76 build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-11 15:16:04 +08:00
Felix Fietkau
6725061f86 mt76: update to version 2022-12-01
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-12-11 15:15:15 +08:00
AmadeusGhost
491b722401 wolfssl: fix build with /dev/crypto 2022-12-11 15:10:48 +08:00
aiamadeus
d86fda2741
Merge pull request #10564 from 1582130940/pull 2022-12-11 08:25:52 +08:00
AmadeusGhost
048637aba2 mtwifi: disable set_fs by default
This fixes various kernel panic issues.
2022-12-10 12:53:10 +08:00
AmadeusGhost
22746824c5 mtwifi: formatted version output
Signed-off-by: AmadeusGhost <amadeus@openjmu.xyz>
2022-12-10 12:50:03 +08:00
AmadeusGhost
0d04d79c71 dnsmasq: replace patches with upstream 2022-12-10 12:36:23 +08:00
AmadeusGhost
73baf54567 download.pl: update and fix some mirrors
Fixes: 3b4c47d ("download.pl: use more Chinese mirrors")
2022-12-10 12:32:24 +08:00
lovehackintosh
7979de9ed9
kernel: bump to 5.4.226, 5.10.158, 5.15.82 (#10573)
* kernel: bump 5.15 to 5.15.82

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* kernel: add symbol in generic config for 5.10.157

Add CONFIG_INET_TABLE_PERTURB_ORDER=16 to generic config

Signed-off-by: John Audia <therealgraysky@proton.me>

* kernel: bump 5.10 to 5.10.158

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* kernel: bump 5.4 to 5.4.226

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Signed-off-by: John Audia <therealgraysky@proton.me>
Co-authored-by: John Audia <therealgraysky@proton.me>
2022-12-09 18:18:58 +08:00
aakkll
419f7c78eb
kernel: bump 6.0 to 6.0.12 (#10567)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>

Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2022-12-09 01:23:41 +08:00
coolsnowwolf
ba51efb27d ath11k-wifi: add Edgecore EAP102 bdf support 2022-12-09 01:23:11 +08:00
Bob Cantor
5052e70674 base-files: wifi: for wifi reconf, scan_wifi after network reload
Commit e8b542960921 included an unintended change and we now call
scan_wifi before a network reload.

Restore the original behaviour and call scan_wifi only after a network
reload.

Fixes: e8b542960921 ("base-files: wifi: tidy up the reconf code")
Signed-off-by: Bob Cantor <bobc@confidesk.com>
2022-12-08 17:41:33 +08:00
Bob Cantor
1688dda0ba base-files: wifi: for wifi up, scan_wifi after network reload
Commit b82cc8071366 included an unintended change and we now call
scan_wifi before a network reload.

Restore the original behaviour and call scan_wifi only after a network
reload.

Fixes: b82cc8071366 ("base-files: wifi: swap the order of some ubus calls")
Signed-off-by: Bob Cantor <bobc@confidesk.com>
2022-12-08 17:41:33 +08:00
Olliver Schinagl
cb419fc847 base-files: Actually set default name
The currently used shell expansion doesn't seem to exist [0] and also
does not work. This surely was not intended, so lets allow default
naming to actually work.

[0]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html

Fixes: be09c5a3cd65 ("base-files: add board.d support for bridge device")
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
2022-12-08 17:39:42 +08:00
Rucke Teg
fb92a12a00 base-file: remove password aging feature form /etc/shadow
In the default shadow file, as visible in the failsafe mode, the user
root has value of `0` set in  the 3rd field, the date of last password
change. This setting means that the password needs to be changed the
next time the user will log in the system. `dropbear` server is ignoring
this setting but `openssh-server` tries to enforce it and fails in the
failsafe mode because the rootfs is R/O.

Disable the password aging feature for user root by setting the 3rd
filed empty.

Signed-off-by: Rucke Teg <rucketeg@protonmail.com>
2022-12-08 17:38:14 +08:00
Rosen Penev
7c60c21768 base-files: replace fgrep with grep -F
fgrep is deprecated and replaced by grep -F. The latter is used
throughout the tree whereas this is the only usage of the former.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-12-08 17:36:23 +08:00
Paul Spooren
86e7043d56 base-files: fix /tmp/TZ when zoneinfo not installed
The zoneinfo packages are not installed per default so neither
/tmp/localtime nor /tmp/TZ is generated.

This patch mostly reverts the previous fix and instead incooperates a
solution suggested by Jo.

Fixes "base-files: fix zoneinfo support " 8af62ed

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-12-08 17:35:37 +08:00
Rosen Penev
d8f60f0b7f base-files: fix zoneinfo support
The system init script currently sets /tmp/localinfo when zoneinfo is
populated. However, zoneinfo has spaces in it whereas the actual files
have _ instead of spaces. This made the if condition never return true.

Example failure when removing the if condition:

/tmp/localtime -> /usr/share/zoneinfo/America/Los Angeles

This file does not exist. America/Los_Angeles does.

Ran through shfmt -w -ci -bn -sr -s

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-12-08 17:35:37 +08:00
Rafał Miłecki
bf08ffb051 base-files: call "sync" after initial setup
OpenWrt uses a lot of (b)ash scripts for initial setup. This isn't the
best solution as they almost never consider syncing files / data. Still
this is what we have and we need to try living with it.

Without proper syncing OpenWrt can easily get into an inconsistent state
on power cut. It's because:
1. Actual (flash) inode and data writes are not synchronized
2. Data writeback can take up to 30 seconds (dirty_expire_centisecs)
3. ubifs adds extra 5 seconds (dirty_writeback_centisecs) "delay"

Some possible cases (examples) for new files:
1. Power cut during 5 seconds after write() can result in all data loss
2. Power cut happening between 5 and 35 seconds after write() can result
   in empty file (inode flushed after 5 seconds, data flush queued)

Above affects e.g. uci-defaults. After executing some migration script
it may get deleted (whited out) without generated data getting actually
written. Power cut will result in missing data and deleted file.

There are three ways of dealing with that:
1. Rewriting all user-space init to proper C with syncs
2. Trying bash hacks (like creating tmp files & moving them)
3. Adding sync and hoping for no power cut during critical section

This change introduces the last solution that is the simplest. It
reduces time during which things may go wrong from ~35 seconds to
probably less than a second. Of course it applies only to IO operations
performed before /etc/init.d/boot . It's probably the stage when the
most new files get created.

All later changes are usually done using smarter C apps (e.g. busybox or
uci) that creates tmp files and uses rename() that is expected to be
atomic.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
2022-12-08 17:32:22 +08:00
lovehackintosh
5a8163e07b
sync with upstream (#10562)
* package: sync with upstream

Removed: package/libs/libselinux/bcm27xx-userland (Already in package/utils/bcm27xx-userland)

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* uclibc++: remove

No package here depends on it. Furthermore, uClibc++ is a fairly buggy
C++ library and seems to be relatively inactive upstream.

It also lacks proper support for modern C++11 features.

The main benefit of it is size: 66.6 KB	vs 287.3 KB on mips24kc. Static
linking and LTO can help bring the size down of packages that need it.

Added warning message to uclibc++.mk

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>

* target: sync with upstream

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

* toolchain: gcc: Remove gcc 10.x support

This compiler is old and was never used by default in OpenWrt.

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

* ucode: update to latest Git HEAD

46d93c9 tests: fixup testcases
4c654df types: adjust double printing format
eac2add compiler: fix bytecode for logical assignments of properties
3903b18 fs: add `realpath()` function
8366102 math: add isnan() function
eef83d3 tests: relax sleep() test
394e901 lib: uc_json(): accept trailing whitespace when parsing strings
1867c8b uloop: terminate parent uloop in task child processes
d2cc003 uci: auto-load package in `ctx.foreach()` and `ctx.get_first()`
6c5ee53 compiler: ensure that arrow functions with block bodies return no value
fdc9b6a compiler: fix `??=`, `||=` and `&&=` logical assignment semantics
88dcca7 add cmake to install requires for debian

Signed-off-by: Jo-Philipp Wich <jo@mein.io>

* firewall4: update to latest Git HEAD

700a925 fw4: prevent null access when no ipsets are defined
6443ec7 config: drop input traffic by default
119ee1a ruleset: drop ctstate invalid traffic for masq-enabled zones

Signed-off-by: Jo-Philipp Wich <jo@mein.io>

* ustream-ssl: update to Git version 2022-12-07

9217ab4 ustream-openssl: Disable renegotiation in TLSv1.2 and earlier
2ce1d48 ci: fix building with i.MX6 SDK
584f1f6 ustream-openssl: wolfSSL: provide detailed information in debug builds
aa8c48e cmake: add a possibility to set library version

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

* tools/mpfr: import patch fixing macro bug

Co-authored-by: Nick Hainke <vincent@systemli.org>
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Co-authored-by: Rosen Penev <rosenp@gmail.com>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
Co-authored-by: Jo-Philipp Wich <jo@mein.io>
Co-authored-by: Nick Hainke <vincent@systemli.org>
2022-12-08 14:20:57 +08:00
coolsnowwolf
40e8e1c3a9 Revert "ipq60xx: Add upstream patch for USB Support"
This reverts commit 13d0aa75dc.
2022-12-08 14:19:31 +08:00
coolsnowwolf
13d0aa75dc ipq60xx: Add upstream patch for USB Support 2022-12-08 02:12:24 +08:00
coolsnowwolf
2c391cb203 autocore: improve x86 index display 2022-12-08 01:32:30 +08:00
coolsnowwolf
4a372f56c2 x86: add support for iKoolCore R1 (eth1/2/3 for LAN, eth0 for WAN) 2022-12-08 01:26:02 +08:00
coolsnowwolf
91cf34988c Merge branch 'master' of https://github.com/coolsnowwolf/lede 2022-12-08 01:10:15 +08:00
coolsnowwolf
5bfb6e66ac x86: improve sysinfo handling of special values 2022-12-08 01:10:02 +08:00
Hannu Nyman
1b3dc82996 tools/cmake: update to 3.25.1
Update cmake to version 3.25.1

* refresh patches

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
2022-12-08 00:09:10 +08:00
Tony Butler
7c61e2491e build: add gzip to prereq-build.mk
gzip has never been checked for, a system without it would be rare, fix
it anyway

Signed-off-by: Tony Butler <spudz76@gmail.com>
2022-12-08 00:06:20 +08:00
Tony Butler
95ee1c7be9 build: images: squashfs: add help, fix description
add help text for `TARGET_SQUASHFS_BLOCK_SIZE` to match the only valid
settings accepted by `mksquashfs4` ("block size not power of two or not
between 4096 and 1Mbyte") thus for this setting in "KB", the set:
  `4, 8, 16, 32, 64, 128, 256, 512, 1024`

replace `squashfs-lzma` with `squashfs` in the description for
`TARGET_ROOTFS_SQUASHFS` because it has various compressions, and not
just lzma as it did in the past

cosmetic change with no functional effect

Signed-off-by: Tony Butler <spudz76@gmail.com>
2022-12-08 00:05:23 +08:00
Hauke Mehrtens
17e7a58be0 kernel: ca8210: Fix crash by zero initializing data
This fixes crashes at bootup on pistachio.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-08 00:03:13 +08:00
Hauke Mehrtens
ba9d2a90c9 e2fsprogs: Fix CVE-2022-1304
This fixes CVE-2022-1304:
An out-of-bounds read/write vulnerability was found in e2fsprogs 1.46.5.
This issue leads to a segmentation fault and possibly arbitrary code
execution via a specially crafted filesystem.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-08 00:02:17 +08:00
Daniel Golle
cd447c0218 mediatek: mt7623: build mt6577_auxadc driver into kernel
Set CONFIG_MT6577_AUXADC=y as otherwise reading temperature of the
thermal-zone doesn't work on MT7623 (it does work fine without this
driver on MT7622 and MT7986).

Fixes: f2ae4e2f8c ("mediatek: clean up platform kernel modules")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-12-07 23:28:03 +08:00
Daniel Golle
67942ac692 trusted-firmware-a.mk: fix build with binutils 2.39
Starting from version 2.39 binutils now warns about sections with rwx
permissions. While this is generally desirable it breaks building
ARM TrustedFirmware-A bl2 which treats warnings as errors.
Disable the warning/error for now to fix build.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-12-07 23:27:15 +08:00
Daniel Golle
e26baac89c build: make sure that $(STAGING_DIR_IMAGE) exists
Call 'mkdir -p $(STAGING_DIR_IMAGE)' before trying to store files in
this potentially non-existing folder.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-12-07 23:26:19 +08:00
lovehackintosh
7468945d5b
kernel: bump 5.10 to 5.10.157 (#10561)
Manually rebased:
	backport-5.10/610-v5.13-32-net-ethernet-mtk_eth_soc-add-support-for-initializin.patch
	hack-5.10/645-netfilter-connmark-introduce-set-dscpmark.patch[1]

All other patches automatically rebased

1. Rebase by Kevin 'ldir' Darbyshire-Bryant<ldir@darbyshire-bryant.me.uk>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-12-06 18:01:43 +08:00
lovehackintosh
944341aaf2
kernel: bump 6.0 to 6.0.11 (#10556)
Manually rebased:
	hack-6.0/645-netfilter-connmark-introduce-set-dscpmark.patch[1]

All other patches automatically rebased

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
Co-authored-by: John Audia <therealgraysky@proton.me>
2022-12-06 15:02:11 +08:00
lovehackintosh
a653ef540f
kernel: bump 5.15 to 5.15.81 (#10554)
* kernel: bump 5.15 to 5.15.81

Manually rebased:
	backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch
	hack-5.15/645-netfilter-connmark-introduce-set-dscpmark.patch[1]

All other patches automatically rebased

Signed-off-by: John Audia <therealgraysky@proton.me>
Co-authored-by: John Audia <therealgraysky@proton.me>
2022-12-06 15:01:21 +08:00
coolsnowwolf
456cf0c5b3 Version update to R22.12.1 2022-12-06 00:27:13 +08:00
coolsnowwolf
193db6f186 network: add brcm fullcone support from ASUS Merlin kernel 4.19 2022-12-06 00:26:03 +08:00
aiamadeus
cb6d8ad182
Merge pull request #10550 from 1582130940/pull 2022-12-05 18:01:01 +08:00
Boris Krasnovskiy
2ebe2ee1b8 ustream-ssl: prevent unused crypto lib dependencies from being compiled
Prevented unused crypto lib dependencies from being compiled

Signed-off-by: Boris Krasnovskiy <borkra@gmail.com>
2022-12-05 16:00:20 +08:00
Petr Štetiar
963ba0d467 ncurses: add package CPE ID
Common Platform Enumeration (CPE) is a structured naming scheme for
information technology systems, software, and packages.

Suggested-by: Steffen Pfendtner <s.pfendtner@ads-tec.de>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-12-05 15:59:20 +08:00
Nick Hainke
c961e51371 libunwind: update to 1.6.2
Remove upstreamed:
- 001-Don-t-force-exec_prefix-lib64-libdir-on-ppc64.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-05 15:58:56 +08:00
Stijn Tintel
6cfe1fbeb9 libunwind: add ppc64 support
Backport an upstream patch to make libunwind build on ppc64, and add
powerpc64 to the dependencies.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
2022-12-05 15:58:56 +08:00
Nick Hainke
d6139fe976 libtool: update to 2.4.7
Changes:
6d7ce133 version 2.4.7
b4a37606 NEWS: roll-back manually filled NEWS versioning
33615a45 NEWS: fill entries for past commits
f5eb6f11 libltdl: bump libltdl.la version-info.
28fbcb6a libtool: correct linter syntax complaints in M4
7e69e441 gnulib: update submodule to new repository.
2dc7dad7 maint: update copyrights across project.
b55b1cc8 libtool: Do not pass '-pthread' to Solaris linker.
960a33e4 docs: manually recording dependencies in Automake
78652682 tests: remove deprecated old-ltdl-iface.at test.
f51eddf0 * libtool: Bump M4 serial versions and add missing AC_PROG_SED to ltdl.m4
ccc878dd libtool: replace raw invocations of sed with $SED
5df7dd49 libtool: add support for MidnightBSD
8f4bdbda libtool: powerpc 10.5 detection without a deployment target
9e8c8825 libtool: support macOS 11
0904164d libtool: correct m4 quoting in sed expression
da2e3527 libtool: replace some references to /usr/bin/file and /bin/sh
1b74d784 libtool: Add -Wa,* link-mode flag for assembler pass-thru
86d71e86 libtool: Pass -Xassembler flag and arguments to compiler
fc7779d7 maint: update Bootstrap git module
0c1bc69d maint: update copyrights across project.
28fb394f maint: update AUTHORS, copyright date.
b9b44533 bootstrap: use $gnulib_clone_since
544fc0e2 maint: update bootstrap, gnulib, copyright dates
b88cebd5 maint: update bootstrap, gnulib, copyright dates
99bd0948 libtool: add icl.exe support
6ca5e224 docs: typo in 'win32-dll' description
1bfb11a4 libtool: quote 'cd' command in shipped relink_command
722b6af0 doc: fix typos in --mode=install invocations
350082b6 libtool: exit verbosely for fatal configure problems
792b6807 maint: update copyright years
f003a1f9 libltdl: handle ENOMEM in lt_dlloader_remove()
08c5524f bootstrap: use the upstream repo as git module
a938703c libtool: set file_list_spec to '@' on OS/2
f10e22c2 tests: fix $objdir hardcoding check with CFLAGS=-g3
f9970d99 libtool: pass through -fuse-ld flags
d7c8d3b4 m4/libtool.m4: FreeBSD elftoolchain strip support
807cbd63 libtoolize: exec automake and autoconf only with --help
40bc0628 edit-readme-alpha: generate the "stable" README properly
b89a47ea maint: fix for 'make sc_immutable_NEWS' hints
bb8e7b4a maint: update copyright years
b5d44b84 libltdl: handle ENOMEM sooner
5944fdcc gl: minor typo fixes
49856679 gl-tests: dash && option-parser test fix
a5c64665 libtool: fix GCC/clang linking with -fsanitize=*
ae816ace gl-tests: make the failure more readable
d15b3214 m4/libtool.m4: export AIX TLS symbols
aabc46ac gl/tests: new tests for options-parser
dc8bd92d gl/funclib.sh: func_quotefast_eval & tilde fix
a3c6e99c syntax-check: fix sed syntax errors
f323f10d gl/tests: new tests for func_quote* family
ed4f739f check: enable gnulib's testsuite
9187e9a2 funclib: refactor quoting methods a bit
16dbc070 libtool: optimizing options-parser hooks
32f0df98 libtool: mitigate the $sed_quote_subst slowdown
b7b6ec33 gnulib: sync with upstream
5859cc50 maint: relax 'sc_prohibit_test_dollar' check
418129bc ARFLAGS: use 'cr' instead of 'cru' by default
4335de1d libool.m4: add ARFLAGS variable
0f842177 maint: put newline after 'Subject' in ChangeLog
03ec5f49 gnulib: sync with upstream
351a88fe libtoolize: fix infinite recursion in m4
de7b2cb2 bootstrap: fix race in temporary Makefile
702a97fb libtool: fix GCC linking with -specs=*
4ff16210 maint: demote myself from maintainer to former maintainer.
c12d38e4 maint: post-release administrivia

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-05 15:58:28 +08:00
Nick Hainke
fde47411c0 libnl: add PKG_CPE_ID
Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-05 15:57:33 +08:00
Nick Hainke
44c51f5505 libnl: update to 3.7.0
Changes:
1bb4162 libnl-3.7.0 release
897ec9c route: act: Allow full set of actions on gact,skbedit,mirred
00e46f1 Use print() function in both Python 2 and Python 3
083c1b6 sriov: fix setting ce_mask when parsing VF stat counter
2e9a4f7 Fix typos and errors
cc87ad2 changelog: update URL to git history
bde0b4c changelog: fix typos in ChangeLog
44988e6 route: format recently added code with clang-format
df6e38b route/act: add NAT action
7304c42 route: format recently added code with clang-format
f8eb218 cls: flower: extend flower API
e5dc111 flower: use correct attribute when filling out flags
df6058c tests: merge branch 'th/test-link'
9772c1d tests: add unit tests for creating links
4713b76 github: run unit tests several times and directly
8025547 github: export NLTST_SEED_RAND= to randomize unit tests
7efeca2 tests: add test utils
f6f4d36 tests: reformat unit test files with clang-format
135a706 utils: add _NL_AUTO_DEFINE_FCN_STRUCT() macro
0ea11be utils: add _nl_thread_local macro
9b04936 route: fix crash caused by parse_multipath() by wrong free()
2effffe route/link: Set the cache ops when cloning a link
5ecd56c route/link: add lock around rtnl_link_af_ops_put()
e1a077a route/link: avoid accessing af_ops after af_free() in rtnl_link_set_family()
3f4f1dd xfrm/sa: fix reference counters of sa selector addresses
d3c783f all: merge branch 'th/coverity-fixes'
23a75c5 xfrm: fix uninitalized variables in build_xfrm_ae_message()
d52dbcb route: fix check for NULL in nh_encap_dump()
1f61096 route/qdisc/mqprio: fix bufferoverflow and argument checking in rtnl_qdisc_mqprio_set_*()
f918c3a route/sriov: fix buffer overflow in rtnl_link_sriov_parse_vflist()
d4c7972 all: fix "-Wformat" warnings for nl_dump*()
6b2f238 netlink/utils.h: mark nl_dump() with __attribute__((format(printf,a,b)))
d3bd278 netlink/utils.h: add internal _nl_attribute_printf macro for public headers
a30b26d socket: workaround undefined behavior coverity warning in generate_local_port()
8acf6d5 nl-pktloc-lookup: fix buffer overflow when printing alignment
bf3585f route/link/sriov: fix initializing vlans in rtnl_link_sriov_clone()
dd06d22 route/qdisc/netem: fix bogus "%" in format string netem_dump_details()
f50a802 route/u32: fix u32_dump_details() to print data
fa79ee3 link/vrf: avoid coverity warning in rtnl_link_vrf_set_tableid() about CONSTANT_EXPRESSION_RESULT
31380f8 utils: suppress coverity warning in nl_cli_load_module() about leaked handle
aa398b5 route/ip6vti,ip6gre: fix printing invalid data in ip6{vti,gre}_dump_details()
40683cc netlink/private: add internal helper utils
6615dc0 route/link: workaround coverity warning about leak in rtnl_link_set_type()
ff5ef61 all: avoid coverity warnings about assigning variable but not using it
f58a3c0 route/mdb: check parser error in mdb_msg_parser() for nested MDBA_MDB attribute
46506d3 route/mdb: add and use rtnl_mdb_entry_free() internal helper method
46e85d2 route/mdb: fix leak in mdb_msg_parser()
b0641dd route/mdb: add _nl_auto_rtnl_mdb cleanup macro
d544105 route/mdb: fix buffer overflow in mdb_msg_parser()
4d12b63 tests: silently ignore EACCES for setting uid_map for test namespace
ec712a4 tests: cleanup unshare_user() and use _nltst_fclose()
85e3c5d tests: add _assert_nltst_netns() helper
39e4d8d github: test out-of-tree build and "--disable-static"
d63e473 github: build documentation in CI test
fa7f97f build: avoid building check-direct with --disable-static
8c741a7 tools: fix aborting on failure in "tools/build_release.sh" script
e2aa409 doc: fix markup error in "doc/route.txt"
4f3b4f9 doc: fix python2-ism in "doc/resolve-asciidoc-refs.py"

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-05 15:57:33 +08:00
Nick Hainke
174f3b3626 libnfnetlink: add PKG_CPE_ID
Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-05 15:57:05 +08:00
Nick Hainke
775c17bc35 libmnl: add PKG_CPE_ID
Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-05 15:56:49 +08:00
Nick Hainke
22414c41b5 elfutils: update to 1.88
Release Notes:
https://sourceware.org/pipermail/elfutils-devel/2022q4/005561.html

Refresh patches:
- 003-libintl-compatibility.patch
- 100-musl-compat.patch
- 101-no-fts.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-05 15:54:21 +08:00
Andrey Erokhin
9fc7db0684 gpio-button-hotplug: fix data race
bh_event_add_var can be called by multiple threads concurrently,
so it shall not use a static char buffer

Signed-off-by: Andrey Erokhin <a.erokhin@inango-systems.com>
2022-12-05 15:52:57 +08:00
Nick Hainke
244dbb0b6b tools/xz: update to 5.2.9
Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-12-05 15:49:57 +08:00
Tony Butler
4eb9eebd05 build: config: cleanup impossible dependency logic
some config `depends on` lines contained outdated kernel version checks
that can no longer happen and had become non-operational; clean them up

cosmetic change with no functional effect

Signed-off-by: Tony Butler <spudz76@gmail.com>
2022-12-05 15:49:52 +08:00
Aleksander Jan Bajkowski
6c544582dd mediatek: mt7623: disable swconfig
The mt7623 subtarget supports 2 devices:
 * Bananapi BPi-R2 (added in 1f068588efddf0175e954ffc07ec8478bddd52c7, 7762c07c88980cff85ec20c12f18cd172260e9d9),
 * UniElec U7623-02 (added in 4def81f30f2e89eeecc6ec06e3091f1dd6b3c3d9).

Both devices support DSA from the beginning, thus
swconfig can be safely disabled.

In the past, the subtarget mt7623 also supported
the mt7623 reference board. This board originally
supported swconfig, and was later converted to DSA
(64175ffb7911f5fcd3907df09fdb9bfab53ee641) and then dropped (1ab81bf02d750c9a2a447dbf4fdb323921f291d7).

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-12-04 23:55:11 +08:00
Aleksander Jan Bajkowski
72e2de9e64 mediatek: mt7623: refresh config
This was done by executing these command:
$ time make kernel_oldconfig CONFIG_TARGET=subtarget

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-12-04 23:54:44 +08:00
Senis John
7654ca0114 ramips: add support for HiWiFi HC5611
CPU: MediaTek MT7628AN @ 575 MHz
Flash: 16 MB
RAM: 128 MB
Ethernet: 10/100Mbps x 1
Wlan: 300 Mbps
USB: USB 2.0 x 1
LED: red/green x 1
Button: reset x 1

1. Open https://www.hiwifi.wtf/, Get Cloud token and unlock ssh
2. Upload the openwrt firmware to the router via SCP
3. Login the router via SSH
4. Run `mtd -r write path_to_firmware.bin firmware`

I have tested on my device.
- The LED will display RED on power-on, After system start completed, trun GREEN
- Reset button working now. Long press after 5s will reset factory. Short press less 1s will reboot the device
- USB can working under official u-boot

Signed-off-by: Senis John <thank243@gmail.com>
2022-12-04 23:48:43 +08:00
Kien Truong
e2578b7d82 rockchip: enable watchdog driver
Enable Synopsys DesignWare watchdog driver for rockchip device

Tested on NanoPi R2S

Signed-off-by: Kien Truong <duckientruong@gmail.com>
2022-12-04 23:47:29 +08:00
AmadeusGhost
276348a4e4 upx: fixes build with gcc 11
Fixes: #10540
Fixes: a5c9813 ("upx: witch to the release version")
2022-12-03 18:42:15 +08:00
AmadeusGhost
5fc98f62c4 rockchip: backport yt8531s driver from net-next
Fixes: #10497
2022-12-03 18:39:04 +08:00
coolsnowwolf
0e72b739ca ramips: HATLab GateBoard-One using gen_image_generic.sh to gen image 2022-12-02 22:09:35 +08:00
AmadeusGhost
a5c98133c2 upx: witch to the release version
There is no reason to use a date to download source.
2022-12-02 21:18:16 +08:00
AmadeusGhost
c1d76d3b25 rockchip: opc-h68k: add sata support 2022-12-02 21:16:35 +08:00
AmadeusGhost
ae96f27ccb ramips: fixes kernel 5.4 mt76 build error
Fixes: #10537
2022-12-02 21:09:47 +08:00
coolsnowwolf
31a2de36ab ramips: fix HATLab GateBoard-One Support 2022-12-01 14:05:27 +08:00
AmadeusGhost
2173f1c0ea mt76: fixes kernel 5.4 build error
Fixes: #10524
2022-11-30 17:40:29 +08:00
AmadeusGhost
db62eea63c iwinfo: backport MT7986 related commit 2022-11-30 17:01:36 +08:00
AmadeusGhost
ecf4e9e890 rockchip: backport Amlogic S905 emmc fixes
Fixes: #10471
2022-11-30 16:59:20 +08:00
coolsnowwolf
a9671e8543 rockchip: 5.15: backport yt8521 driver from upstream kernel v6.2 2022-11-30 15:23:53 +08:00
Albert Xu
b1a02a7a64
Revert "r8101: update to 1.038.02" (#10523)
Fix: #10522
2022-11-29 22:40:22 +08:00
Albert Xu
55bcd01c6c
r8168: Drop 020-5.18-support (#10518)
* Fix build error, 8.051.02 no longer needs this patch
2022-11-29 01:10:37 +08:00
Albert Xu
4bb063214f
package: Update realtek ethernet driver (#10516)
* wolfssl: fix Config.in typo

Fix simple typo `/crytpo/crypto/` in a description string

Signed-off-by: Tony Butler <spudz76@gmail.com>

* r8101: Update to 1.038.02

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

* r8152: Update to 2.16.3.20220914

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

* r8168: Update to 8.051.02

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

Signed-off-by: Tony Butler <spudz76@gmail.com>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Co-authored-by: Tony Butler <spudz76@gmail.com>
Co-authored-by: Tianling Shen <cnsztl@immortalwrt.org>
2022-11-28 16:24:07 +08:00
coolsnowwolf
697c2aea28 mt76: update firmware for MT7986 2022-11-28 13:44:37 +08:00
coolsnowwolf
7d63a39b97 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2022-11-28 13:13:52 +08:00
Nick Hainke
be5f3b28b0 wolfssl: update to v5.5.3
Remove "200-ecc-rng.patch" because it was upstramed by:
e2566bab21
Refreshed "100-disable-hardening-check.patch".

Fixes CVE 2022-42905.

Release Notes:
- https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.2-stable
- https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.3-stable

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-28 10:54:05 +08:00
Nick Hainke
185c4ea8c0 ipset: update to 7.16
Release Notes:
https://lore.kernel.org/netfilter-devel/d65fe5d8-d5ea-ef7-102d-aa1d15bb4d69@netfilter.org/T/#u

Patch "0001-lib-ipset-fix-printf-warning.patch" replaced upstream by:
http://git.netfilter.org/ipset/commit/?id=e39e3466d2d38cdfe83447f391b550e607bc3ce8

Remove upstreamed:
- 0002-Fix-IPv6-sets-nftables-translation.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-28 10:52:44 +08:00
Rosen Penev
62461731d7 nls.mk: fixup cmake packages
Instead of manually overriding every cmake package that uses iconv or
gettext's paths, add the prefix in here so that at least FindIconv.cmake
works. Fixes compilation with BUILD_NLS.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-11-28 10:50:28 +08:00
LGA1150
6bc640d84d ramips: add JD-Cloud router support 2022-11-27 12:01:29 +08:00
AmadeusGhost
85220a12d3 Revert "mediatek: add LED support for Xiaomi Redmi Router AX6000"
This reverts commit 6fb280ac46.
2022-11-27 11:58:39 +08:00
coolsnowwolf
f235862fb6 luci-app-mosdns: move to feeds 2022-11-27 02:02:59 +08:00
coolsnowwolf
b1e4d3d413 kernel: add WED rx support for mediatek on mt76 with MT7986 and MT7915 2022-11-27 01:49:13 +08:00
coolsnowwolf
da4a9aaee0 pacakge: add mosdns and luci-app-mosdns from sbwml 2022-11-27 00:37:12 +08:00
lovehackintosh
21bab22afa
kernel: bump 5.15 to 5.15.80 (#10506)
Manually rebase:
   pending-5.15/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch
   ath79/patches-5.15/910-unaligned_access_hacks.patch

All other patches automatically rebased

Co-authored-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
Co-authored-by: John Audia <therealgraysky@proton.me>
2022-11-26 23:39:10 +08:00
lovehackintosh
07df792ae7
kernel: bump 6.0 to 6.0.10 (#10505)
Manually rebase:
   pending-6.0/330-MIPS-kexec-Accept-command-line-parameters-from-users.patch

All other patches automatically rebased

Co-authored-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
Co-authored-by: John Audia <therealgraysky@proton.me>
2022-11-26 22:41:11 +08:00
lovehackintosh
e787ad1a4b
kernel: bump 5.10 to 5.10.156 (#10498)
Manually rebased: ath79/patches-5.10/910-unaligned_access_hacks.patch

All other patches automatically rebased.

Co-authored-by: John Audia <therealgraysky@proton.me>
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-11-26 18:07:27 +08:00
Linhui Liu
0b241584b5 kernel: bump 5.4 to 5.4.225
All patches automatically rebased.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-11-26 18:06:25 +08:00
lovehackintosh
fc33fa6e5f
tools/mpfr: update to 4.1.1 (#10502)
Changes:
- Bug fixes
- Improved manual formatting

Refresh patches:
- 001-only_src.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
Co-authored-by: Nick Hainke <vincent@systemli.org>
2022-11-26 18:05:47 +08:00
coolsnowwolf
3c220e5c59 Update feeds.conf.default 2022-11-26 12:42:37 +08:00
coolsnowwolf
bf2528d9b5 iwinfo: add hardware id for MT7922 devices support 2022-11-25 15:26:02 +08:00
coolsnowwolf
4d5470d13b Revert "x86: fix Bintel's ZHITAI Ti Plus 5000 fw bug"
This reverts commit 857a955f1e.
2022-11-25 15:18:41 +08:00
sdf8057
1156d23750
ipq807x: disable br-nf after qca-nss-ecm start (#10488)
qca-nss-ecm启动之后会开启网桥ipv4/ipv6的包过滤导致NAT loopback不可用。再次关闭网桥包过滤,以解决NAT loopback不可用的问题。
2022-11-25 03:00:18 +08:00
coolsnowwolf
e9e7e64a1f Merge branch 'master' of https://github.com/coolsnowwolf/lede 2022-11-25 02:59:56 +08:00
coolsnowwolf
857a955f1e x86: fix Bintel's ZHITAI Ti Plus 5000 fw bug 2022-11-25 02:59:14 +08:00
AmadeusGhost
1f9c2a3e1f rockchip: 5.15: add missing kernel config 2022-11-24 20:05:56 +08:00
Christian Marangi
2c83210409 generic: 5.15: add missing PAGE_POOL_STATS config
Add new PAGE_POOL_STATS config backported for the mtk offload patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-11-24 20:02:06 +08:00
Rafał Miłecki
667b8a7613 kernel: add CONFIG_NVMEM_U_BOOT_ENV symbol to configs
This fixes:
  U-Boot environment variables support (NVMEM_U_BOOT_ENV) [N/m/y/?] (NEW)

Fixes: 34cf310435044 ("kernel: backport U-Boot environment data NVMEM driver")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2022-11-24 20:01:21 +08:00
coolsnowwolf
d1bed1ba23 ipq60xx: add 360_v6 ath11k wifi BDF 2022-11-23 22:21:27 +08:00
coolsnowwolf
2612e362b6 ath11k-wifi: add board bdf files package 2022-11-23 22:07:11 +08:00
coolsnowwolf
8a0982186e kernel: sysctl: update nf_ct_expect settings for fullcone nat mode 2 2022-11-23 18:34:51 +08:00
coolsnowwolf
9e3f3a90e4 Revert "dnsmasq: bump to v2.87"
This reverts commit c5b0c71a92.
2022-11-23 18:28:26 +08:00
coolsnowwolf
8d2bd3273c
x86: add kmod-tg3 by default 2022-11-23 17:20:15 +08:00
lovehackintosh
1d0708842f
upx: fix hash (#10479)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-11-22 20:59:36 +08:00
sdf8057
4badcf31c7
fix ntpd path problem (#10478) 2022-11-22 20:45:25 +08:00
Albert Xu
9cd6f162e9
tools/patch: apply patch for EACCES on xattr copy (#10469)
When compiling OpenWRT on a compressed btrfs volume the build fails in
libtool.
The file `libltdl/config/ltmain.m4sh` from `libtool-2.4.2.tar.xz` is
missing write permissions, therefore patch falls back to copying the
file and patching that. During this patch tries to preserve all file
attribute on the new copy.
However the attribute `btrfs.compression` is privileged and btrfs return
EACCES.
While patch ignores multiple other error codes during the copy of xattr
copy it is not prepared for EACCES and aborts.

EACCES should be ignored the same way as the other errors.

Build log:
```
...
Applying ./patches/000-relocatable.patch using plaintext:
patching file libltdl/config/general.m4sh
patching file libtoolize.in
patching file libtoolize.m4sh
patching file libltdl/m4/libtool.m4

Applying ./patches/100-libdir-fixes.patch using plaintext:
patching file libltdl/config/ltmain.m4sh
File libltdl/config/ltmain.sh is read-only; trying to patch anyway
patching file libltdl/config/ltmain.sh
patch: setting attribute btrfs.compression for btrfs.compression: Permission denied
Patch failed!  Please fix ./patches/100-libdir-fixes.patch!
```

Link: https://lists.gnu.org/archive/html/bug-patch/2022-11/msg00000.html
Co-authored-by: Thomas Weißschuh <thomas@t-8ch.de>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
2022-11-21 21:08:31 +08:00
coolsnowwolf
58692d5c98 kernel: sysctl: update nf_ct settings for fullcone nat 2022-11-20 22:14:41 +08:00
Aleksander Jan Bajkowski
e5bf907be5 kernel: backport tso for asix driver
Performance comparison (iperf3, mtu 1500):
Before: 53.9 Mbps
After: 87.9 Mbps

The tests were performed on a BT Home Hub 5A router.
The iperf3 server was running on the router, the client
on the host.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-11-20 20:24:27 +08:00
Uwe Kleine-König
75d2934a6f kernel: add kmod-hwmon-sht3x support
The driver supports the temperature and humidity sensors chips SHT3x and
STS3x by Sensirion.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
2022-11-20 20:23:34 +08:00
Pawel Dembicki
334012492f kernel: add missing symbol in generic config
Found during work on qoriq target.

Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[improve commit message, remove from target configs]
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-11-20 20:22:30 +08:00
Albert Xu
3c707a2ef8
firmware: Sync with upstream (#10459)
* firmware: intel-microcode: update to 20220809

Debian's changelog by Henrique de Moraes Holschuh <hmh@debian.org>:

  * New upstream microcode datafile 20220809
    * Fixes INTEL-SA-00657, CVE-2022-21233
      Stale data from APIC leaks SGX memory (AEPIC leak)
    * Fixes unspecified errata (functional issues) on Xeon Scalable
    * Updated Microcodes:
      sig 0x00050653, pf_mask 0x97, 2022-03-14, rev 0x100015e, size 34816
      sig 0x00050654, pf_mask 0xb7, 2022-03-08, rev 0x2006e05, size 44032
      sig 0x000606a6, pf_mask 0x87, 2022-04-07, rev 0xd000375, size 293888
      sig 0x000706a1, pf_mask 0x01, 2022-03-23, rev 0x003c, size 75776
      sig 0x000706a8, pf_mask 0x01, 2022-03-23, rev 0x0020, size 75776
      sig 0x000706e5, pf_mask 0x80, 2022-03-17, rev 0x00b2, size 112640
      sig 0x000806c2, pf_mask 0xc2, 2022-03-19, rev 0x0028, size 97280
      sig 0x000806d1, pf_mask 0xc2, 2022-03-28, rev 0x0040, size 102400
      sig 0x00090672, pf_mask 0x03, 2022-06-07, rev 0x0022, size 216064
      sig 0x00090675, pf_mask 0x03, 2022-06-07, rev 0x0022, size 216064
      sig 0x000906a3, pf_mask 0x80, 2022-06-15, rev 0x0421, size 216064
      sig 0x000906a4, pf_mask 0x80, 2022-06-15, rev 0x0421, size 216064
      sig 0x000a0671, pf_mask 0x02, 2022-03-17, rev 0x0054, size 103424
      sig 0x000b06f2, pf_mask 0x03, 2022-06-07, rev 0x0022, size 216064
      sig 0x000b06f5, pf_mask 0x03, 2022-06-07, rev 0x0022, size 216064

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>

* bcm27xx-gpu-fw: update to latest version

Multiple firmware fixes needed for kernel updates.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* bcm27xx-gpu-fw: update to latest version

Latest GPU FW contains multiple fixes and improvements.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>

* bcm63xx-cfe: update to the latest master

e5050f3 linksys: ea9500-v2: add cferam file

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

* nat46: fix translation of ICMP protocols parameter problem and unreachable

9b3a819 nat46-core: Fix translation of ICMP protocols parameter problem and unreachable (#27)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

* nat46: update to latest git HEAD

1fdf2a3 Fix kernel panic due to device deletion (#29)
e7b48d1 add the mutex lock for create/delete/config/insert nat46 devices to fix nat46 module crash issues. (#28)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

* nat46: update to latest git HEAD

d9bc161 nat46-core: Fix typo since day one (#31)
840e235 Fix coverity issues observed so far (#30)

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

* nat46: update to git HEAD

95ca1c3 nat46-core: ignore IPv4 options when translating packets
39778c2 add a module argument to ignore TOS translate for IPv4
9a36ee1 add a module argument to ignore TOS translate for IPv4
79190a8 add a module argument to ignore TOS translate for IPv4

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>

* mwlwifi: fix 5.15 kernel support

Fix compilation and usage under kernel 5.15 for the mwlwifi driver.

For detailed description of changes, check individual patches.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>

* rtl8812au-ct: Fix compile

Replace the extern inline with a static inline. With extern inline the
compiler will generate the function in all compile units including this
file which breaks linking later.

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

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Co-authored-by: Christian Lamparter <chunkeey@gmail.com>
Co-authored-by: Álvaro Fernández Rojas <noltari@gmail.com>
Co-authored-by: Rafał Miłecki <rafal@milecki.pl>
Co-authored-by: Hans Dedecker <dedeckeh@gmail.com>
Co-authored-by: Robert Marko <robert.marko@sartura.hr>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-11-20 01:09:37 +08:00
lovehackintosh
75d227e14f
include: sync with upstream (#10454)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-11-19 18:03:18 +08:00
coolsnowwolf
c5b0c71a92 dnsmasq: bump to v2.87 2022-11-19 15:23:46 +08:00
coolsnowwolf
6f77eb8769 mt76: add mt7922 firmware 2022-11-19 04:01:48 +08:00
coolsnowwolf
128c5d20dd ath10k-ct: update to 2022-05-13 2022-11-19 03:48:26 +08:00
coolsnowwolf
6fb280ac46 mediatek: add LED support for Xiaomi Redmi Router AX6000 2022-11-18 19:51:59 +08:00
coolsnowwolf
a01f34b7be mediatek: fix mt7981 clk clock support 2022-11-18 03:36:57 +08:00
coolsnowwolf
cce06e82a4 mediatek: add filogic 820 (MT7981) subtarget support 2022-11-18 03:03:21 +08:00
Daniel Golle
38462122bd kernel: modules: package Marvell gigE PHY driver
Some copper SFP modules come with Marvell's 88E1xxx PHY and need this
module to function. Package it, so users can easily install this PHY
driver and use e.g. FINISAR CORP. FCLF-8521-3-HC SFP.

Without marvell PHY driver:
sfp sfp2: module FINISAR CORP.    FCLF-8521-3-HC   rev A    sn XXXXXXX          dc XXXXXX
mt7530 mdio-bus:1f sfp2: validation with support 0000000,00000000,00000000 failed: -22
sfp sfp2: sfp_add_phy failed: -22

With marvell PHY driver:
sfp sfp2: module FINISAR CORP.    FCLF-8521-3-HC   rev A    sn XXXXXXX          dc XXXXXX
mt7530 mdio-bus:1f sfp2: switched to inband/sgmii link mode
mt7530 mdio-bus:1f sfp2: PHY [i2c:sfp2:16] driver [Marvell 88E1111] (irq=POLL)
mt7530 mdio-bus:1f sfp2: Link is Up - 1Gbps/Full - flow control rx/tx

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-11-18 01:35:52 +08:00
Daniel Golle
dfd0df2c6b uboot-mediatek: optimize MMC erase
Fix mmc_write_vol hush script used by many boards to avoid timeouts on
slow SD cards:
Instead of erasing a complete partition, only erase blocks for the
to-be-written image when writing to MMC.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-11-18 01:33:31 +08:00
lovehackintosh
3d8184bdf3
tools: update versions (#10444)
* tools/xz: update to 5.2.8

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/sed: update to 4.9

Release Notes:
https://lists.gnu.org/archive/html/info-gnu/2022-11/msg00001.html

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/bash: update to 5.2.9

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/llvm: update to 15.0.0

Release Notes:
https://discourse.llvm.org/t/llvm-15-0-0-release/65099

Signed-off-by: Nick Hainke <vincent@systemli.org>

Signed-off-by: Nick Hainke <vincent@systemli.org>
Co-authored-by: Nick Hainke <vincent@systemli.org>
2022-11-17 23:56:34 +08:00
lovehackintosh
c052e55f49
kernel: bump 5.15 to 5.15.79 (#10441)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-11-17 23:56:17 +08:00
lovehackintosh
9543671fe5
kernel: bump 5.10 to 5.10.155 (#10443)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-11-17 23:56:01 +08:00
Albert Xu
5e0279bb55
libnetfilter-conntrack: bump to 1.0.9 (#10442)
* libnetfilter-conntrack: bump to 1.0.9

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Jo-Philipp Wich <jo@mein.io>

* libnetfilter-conntrack: backport patch fixing compilation with 5.15

Backport patch fixing compilation with 5.15 and musl provided by Robert Marko

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Co-authored-by: Stijn Tintel <stijn@linux-ipv6.be>
Co-authored-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-11-17 23:55:29 +08:00
coolsnowwolf
d3a96f1bd5 ipq60xx: sync patches from upstream 2022-11-17 18:23:03 +08:00
coolsnowwolf
00db463826 Update README.md 2022-11-17 17:39:05 +08:00
edwardostara
32633277da
netsupport.mk: fix rxrpc dependence 2022-11-17 17:11:47 +08:00
coolsnowwolf
5080fb656a ipq6000: add usb3 DT description 2022-11-17 16:38:23 +08:00
aakkll
805cff4080
kernel: bump 6.0 to 6.0.9 (#10429) 2022-11-17 11:35:41 +08:00
coolsnowwolf
6533370814 ipq60xx: add Qihoo 360v6 wireless support 2022-11-16 22:25:49 +08:00
AmadeusGhost
524dfad990 mac80211/ath10k: add sdio chip support 2022-11-15 19:30:17 +08:00
coolsnowwolf
2c52782fd1 mt76: backport changed IEEE80211_MAX_AMPDU_BUF define 2022-11-15 00:34:58 +08:00
Nick Hainke
ddf2366cf4 mediatek: replace mt7986 watchdog assert patch with upstream
Replace "920-watchdog-add-mt7986-assert.patch" with upstreamed
- 920-v5.16-watchdog-mtk-add-disable_wdt_extrst-support.patch
- 921-v5.19-watchdog-mtk_wdt-mt7986-Add-toprgu-reset-controller.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-14 18:23:05 +08:00
Nick Hainke
1bba21463c mediatek: mt7629: add tag to upstreamed patches
The patches were upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-14 18:22:37 +08:00
Nick Hainke
c725219406 mediatek: add tag for upstreamed patches
The patches were upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-14 18:22:13 +08:00
Nick Hainke
0569656184 mediatek: mt7986: add tag to upstreamed patches
The patch "210-pinctrl-mediatek-add-support-for-MT7986-SoC.patch" and
"212-clk-mediatek-add-mt7986-clock-support.patch" are upstreamed.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-14 18:21:19 +08:00
Nick Hainke
bef1844645 mediatek: mt7622: add tag to upstreamed patches
The patches "191-arm64-dts-mt7622-specify-the-L2-cache-topology.patch"
and "192-arm64-dts-mt7622-specify-the-number-of-DMA-requests.patch" are
upstreamed to 5.19.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-11-14 18:18:14 +08:00
Aleksander Jan Bajkowski
0e6a364d29 mediatek: filogic: disable swconfig
This subtarget supports 3 devices:
 * Bananapi BPi-R3 (added in a96382c1bb204698cd43e82193877c10e4b63027),
 * MediaTek MTK7986 rfba AP (added in cffc77ae55ed0e5b9e70417d6a1e1d280cea92cf),
 * MediaTek MTK7986 rfbb AP (added in cffc77ae55ed0e5b9e70417d6a1e1d280cea92cf).

This subtarget supports DSA from the beginning. It looks like CONFIG_SWCONFIG
was copied from another config when the subtarget was created.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-11-14 18:17:17 +08:00
Aleksander Jan Bajkowski
60e14b312e mediatek: filogic: refresh config
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2022-11-14 18:16:57 +08:00
coolsnowwolf
4a69c8aac3 ramips: fix Beeline SmartBox TURBO+ support 2022-11-13 20:22:27 +08:00
coolsnowwolf
27ed0acf3b libpcap: enable remote capture support 2022-11-13 20:09:51 +08:00
coolsnowwolf
1770fdd319 mt76: add EHT 1K aggregation definitions backport 2022-11-13 19:50:36 +08:00
Hauke Mehrtens
0583068db1 kernel: Refresh generic patches
This patch was out of sync.

Fixes: 1673b7dca384 ("kernel: backport fixes for MediaTek Ethernet driver")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-11-12 19:08:04 +08:00
Felix Fietkau
2eda60e12f mt76: update to the latest version
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-11-12 19:07:42 +08:00
Daniel Golle
b0b044caa7 kernel: backport fixes for MediaTek Ethernet driver
Backport patches from net-next which fix possible memory and resource
leaks in the error codepaths of WED initialization.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-11-12 19:03:12 +08:00
Daniel Golle
713fe846c3 kernel: support hw flow-offloading counters on newer MediaTek SoCs
The packet processing engine (PPE) found in newer ARM-based MediaTek
SoCs provides packet and byte counters for offloaded streams.
Import pending patch reading and using those counters.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-11-12 19:02:31 +08:00
Daniel Golle
9cdd779550 mediatek: consider adc_oe thermal calibration value in efuse
The use of the adc_oe value stored in the efuse has been dropped in
MediaTek's SDK during a recent refactorization of the temperature
calculation formula. Don't ignore this offset value and again include
it in raw-to-deg-celsius calculation.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-11-12 19:00:34 +08:00
AmadeusGhost
fced2da821 ramips: fixes typo error in kang
Fixes: 9a383de4af
Closed: #10408
2022-11-11 16:25:25 +08:00
lovehackintosh
b48712a226
kernel: bump 5.4 to 5.14.224 (#10406)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-11-11 08:00:59 +00:00
lovehackintosh
46e6f98ffe
kernel: bump 6.0 to 6.0.8 (#10401)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-11-11 04:06:36 +00:00
lovehackintosh
23e2006907
kernel: bump 5.15 to 5.15.78 (#10403)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-11-11 04:06:12 +00:00
lovehackintosh
b8bdcd7170
kernel: bump 5.10 to 5.10.154 (#10404)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-11-11 04:05:26 +00:00
AmadeusGhost
2a88c41d9d r8125: upate to version 9.010.01-1 2022-11-11 11:40:47 +08:00
Andrew Powers-Holmes
6cad41f780 mt76: add firmware package for mt7916
Add kernel package 'mt7916-firmware' with firmware files for MT7916E devices.

These share the same driver as the MT7915 chipset, but use their own firmware.

Tested using a pair of AsiaRF AW7916-NPD cards.

Signed-off-by: Andrew Powers-Holmes <aholmes@omnom.net>
2022-11-11 11:32:54 +08:00
Langhua Ye
5a154a16b6 kernel: add support for XMC XM25QH128C
The XMC XM25QH128C is a 16MB SPI NOR chip.
The patch is verified on Ruijie RG-EW3200GX PRO.
Datasheet available at https://www.xmcwh.com/uploads/435/XM25QH128C.pdf

Signed-off-by: Langhua Ye <y1248289414@outlook.com>
2022-11-11 11:30:22 +08:00
coolsnowwolf
fa3d7997cb ipq40xx: add support for GL.iNet GL-A1300 2022-11-10 19:49:49 +08:00
Albert Xu
0079447c6f
packages: libusb: add package 'fxload' (from libusb examples)
The 'fxload' tool contained in the examples provided with libusb is
actually useful and turns out to be the only way to load firmware into
some rather ancient EZ-USB microcontrollers made by Cypress (formerly
Anchor Chips).
The original 'fxload' tool from hotplug-linux has been abandonned long
ago and requires usbfs to be mounted in /proc/bus/usb/ (like it was in
Linux 2.4...).
Hence the best option is to package the modern 'fxload' from the libusb
examples which (unsurprisingly) uses libusb and works on modern
systems.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Co-authored-by: Daniel Golle <daniel@makrotopia.org>
2022-11-10 07:08:56 +00:00
AmadeusGhost
f14fbd6e0d mac80211: fixes build on kernel 6.0 2022-11-09 19:40:00 +08:00
AmadeusGhost
bb0d430546 rockchip: add support for Radxa ROCK Pi E25 2022-11-09 19:38:22 +08:00
AmadeusGhost
4c889ca6f7 Revert "kernel: add support for rtl88x2bu driver"
This reverts commit bbed88c876.
This driver is useless. Closed: #10359
2022-11-09 19:15:58 +08:00
lovehackintosh
a18b6cfebd
build: add support for python3.11 and higher (#10392)
python3.11 is out but fails to run the makefile currently
this supports python versions from 3.6 to 3.99 with the python3 binary
it also checks specifically for 3.11 as it is the latest version out

Signed-off-by: Oscar Molnar <oscar@tymscar.com>
2022-11-09 04:21:18 +00:00
coolsnowwolf
5ae0cbf784
Update README.md 2022-11-08 17:36:11 +08:00
coolsnowwolf
646ed35108 ipq60xx: add network setting and sysupgrade for 360v6 2022-11-08 17:21:17 +08:00
coolsnowwolf
2a4ccbe41f ipq60xx: splite Qihoo 360v6 dts file 2022-11-08 16:50:31 +08:00
ty
39ed1b72cb
procd: ujail upgrade patch for latest version (#10384)
Fix: #10382
2022-11-07 05:28:55 +00:00
ty
3ff8b3e253
procd: ujail static-linked binary (#10381)
ref: openwrt/openwrt#10933
2022-11-07 09:54:23 +08:00
lovehackintosh
297447302a
tools: update versions and sync with upstream (#10380)
* expat: update to 2.5.0

Fixes CVE-2022-43680.

Changes:
https://github.com/libexpat/libexpat/blob/R_2_5_0/expat/Changes

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/ccache: update to 4.7

Release Notes:
https://ccache.dev/releasenotes.html#_ccache_4_7

Signed-off-by: Raihaan Shouhell <raihaanhimself@gmail.com>

* tools/ccache: update to 4.7.1

Release Notes:
https://ccache.dev/releasenotes.html#_ccache_4_7_1

Signed-off-by: Raihaan Shouhell <raihaanhimself@gmail.com>

* tools/ccache: update to 4.7.2

Release Notes:
https://ccache.dev/releasenotes.html#_ccache_4_7_2

Signed-off-by: Raihaan Shouhell <raihaanhimself@gmail.com>

* tools/mtools: update to 4.0.42

Release Notes:
https://lists.gnu.org/archive/html/info-mtools/2022-10/msg00000.html

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/mtd-utils: update to 2.1.5

Release Notes:
https://lore.kernel.org/buildroot/c0992bbb-9487-9a51-ea9f-39cf074b61ec@sigma-star.at/

Refresh patches:
- 130-lzma_jffs2.patch
- 320-mkfs.jffs2-SOURCE_DATE_EPOCH.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/elfutils: update to 1.88

Release Notes:
https://sourceware.org/pipermail/elfutils-devel/2022q4/005561.html

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/fakeroot: update to 1.30.1

Release Notes:
https://tracker.debian.org/news/1381350/accepted-fakeroot-1301-1-source-into-unstable/

Refresh patches:
- 600-macOS.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>

* cmake: update to 3.24.3

Release Notes:
https://cmake.org/cmake/help/latest/release/3.24.html

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools/ninja: update to 1.11.1

Release Notes:
https://github.com/ninja-build/ninja/releases/tag/v1.11.1

Refresh patches:
- 100-make_jobserver_support.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>

* tools: add option BUILD_ALL_HOST_TOOLS to compile all host tools

Add option to compile all host tools even if not needed.
This can be useful to prepare a universal precompiled host tools
archive to use in another buildroot and speedup compilation.

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

Signed-off-by: Nick Hainke <vincent@systemli.org>
Signed-off-by: Raihaan Shouhell <raihaanhimself@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Co-authored-by: Nick Hainke <vincent@systemli.org>
Co-authored-by: Raihaan Shouhell <raihaanhimself@gmail.com>
Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
2022-11-07 09:54:08 +08:00
Hauke Mehrtens
345e5e51eb busybox: awk: fix use after free (CVE-2022-30065)
This backports a commit which fixes a use after free bug in awk.

CVE-2022-30065 description:
A use-after-free in Busybox 1.35-x's awk applet leads to denial of
service and possibly code execution when processing a crafted awk
pattern in the copyvar function.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-11-06 19:20:10 +08:00
Hauke Mehrtens
81a3a0ff39 dnsmasq: Backport DHCPv6 server fix (CVE-2022-0934)
This backports a commit from upstream dnsmasq to fix CVE-2022-0934.

CVE-2022-0934 description:
A single-byte, non-arbitrary write/use-after-free flaw was found in
dnsmasq. This flaw allows an attacker who sends a crafted packet
processed by dnsmasq, potentially causing a denial of service.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-11-06 19:19:31 +08:00
Shiji Yang
f130866870 ramips: improve compatibility for Youku YK-L2 and YK-L1 series
Add UIMAGE_NAME and UIMAGE_MAGIC to allow users to directly install
initramfs-kernel.bin from the stock firmware Web UI. At the same time,
this change makes it possible to boot OpenWrt with the official u-boot.

Notice:
Since the stock firmware is based on OpenWrt and the configuration
will be retained by default during the upgrade process, so we must use
initramfs-kernel.bin to do a initial installation. After the system
restarts, install sysupgrade.bin and do not retain any configuration.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-11-06 19:18:05 +08:00
Shiji Yang
fe03f34e50 ramips: add support for Youku X2
Specifications:
  SOC:      MT7620AN + MT7612EN
  RAM:      128 MiB DDR2
  Flash:    16 MiB (Winbond W25Q28FVFG)
  WLAN:     2.4G + 5G
  LAN:      LAN ports *2
  WAN:      WAN port *1
  USB:      USB2.0 *1
  SD Card:  MicroSD *1
  Buttons:  Reset *1
  LEDs: ethernet *3, system, usb, wlan2g, wlan5g

MAC Address:
  use        address               source
  label      54:36:9b:xx:xx:ac     lan
  lan        54:36:9b:xx:xx:ac     factory.0x0028
  wan        54:36:9b:xx:xx:ad     factory.0x002e
  wlan2g     54:36:9b:xx:xx:ae     factory.0x0004
  wlan5g     54:36:9b:xx:xx:af     factory.0x8004

Installation:
1. Apply initramfs-kernel.bin in stock firmware Web UI.
2. Install sysupgrade.bin on OpenWrt and do not retain any configuration.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-11-06 19:17:38 +08:00
John Audia
b3904f9a41 openssl: bump to 1.1.1s
Changes between 1.1.1r and 1.1.1s [1 Nov 2022]

  *) Fixed a regression introduced in 1.1.1r version not refreshing the
     certificate data to be signed before signing the certificate.
     [Gibeom Gwon]

 Changes between 1.1.1q and 1.1.1r [11 Oct 2022]

  *) Fixed the linux-mips64 Configure target which was missing the
     SIXTY_FOUR_BIT bn_ops flag. This was causing heap corruption on that
     platform.
     [Adam Joseph]

  *) Fixed a strict aliasing problem in bn_nist. Clang-14 optimisation was
     causing incorrect results in some cases as a result.
     [Paul Dale]

  *) Fixed SSL_pending() and SSL_has_pending() with DTLS which were failing to
     report correct results in some cases
     [Matt Caswell]

  *) Fixed a regression introduced in 1.1.1o for re-signing certificates with
     different key sizes
     [Todd Short]

  *) Added the loongarch64 target
     [Shi Pujin]

  *) Fixed a DRBG seed propagation thread safety issue
     [Bernd Edlinger]

  *) Fixed a memory leak in tls13_generate_secret
     [Bernd Edlinger]

  *) Fixed reported performance degradation on aarch64. Restored the
     implementation prior to commit 2621751 ("aes/asm/aesv8-armx.pl: avoid
     32-bit lane assignment in CTR mode") for 64bit targets only, since it is
     reportedly 2-17% slower and the silicon errata only affects 32bit targets.
     The new algorithm is still used for 32 bit targets.
     [Bernd Edlinger]

  *) Added a missing header for memcmp that caused compilation failure on some
     platforms
     [Gregor Jasny]

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-11-06 19:12:31 +08:00
lovehackintosh
6d2ba007d7
kernel: bump 5.10 to 5.10.153 (#10377)
Manually rebased:
  bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
  lantiq/patches-5.10/0028-NET-lantiq-various-etop-fixes.patch

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>

Signed-off-by: John Audia <therealgraysky@proton.me>
Co-authored-by: John Audia <therealgraysky@proton.me>
2022-11-05 21:57:35 +08:00
lovehackintosh
1c46edde16
kernel: bump 5.4 to 5.4.223 (#10376)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-11-05 21:57:17 +08:00
Albert Xu
670de0994f
generic: add DUAL_READ flag to EON EN25Q128 (#10368)
Add DUAL_READ flag to EON EN25Q128 as from documentation it's supported.
While at it also rework the patch and add a commit description.

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

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
2022-11-05 21:57:04 +08:00
sKyissKy
31589464e3
netsupport.mk: add MultiPath TCP modules (#10358) 2022-11-05 21:56:38 +08:00
lovehackintosh
c026408fae
kernel: bump 5.15 to 5.15.77 (#10369)
Manually rebased:
   bcm27xx/patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
   bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch
   bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch
   bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
   lantiq/patches-5.15/0028-NET-lantiq-various-etop-fixes.patch

All other patches automatically rebased

Co-authored-by: John Audia <therealgraysky@proton.me>
Signed-off-by: John Audia <therealgraysky@proton.me>
2022-11-05 07:25:09 +00:00
aakkll
316e63374b
kernel: bump 6.0 to 6.0.7 (#10364) 2022-11-04 02:30:06 +00:00
coolsnowwolf
cbaa0134cd kernel: 5.15: fix mediatek usb module change 2022-11-03 16:34:11 +08:00
coolsnowwolf
44d01897be ipq60xx: add UBI FIT image for Linksys MR7350 2022-11-02 15:41:33 +08:00
coolsnowwolf
5a51b97527 ipq60xx: add linksys MR7350 sysupgrade support 2022-11-02 15:38:13 +08:00
coolsnowwolf
d217d053f4 kernel: bump 5.4 to 5.4.222 2022-11-02 15:21:15 +08:00
coolsnowwolf
d56243a44a uboot-envtools: add Xiaomi Redmi Router AX6000 support 2022-11-02 14:30:11 +08:00
coolsnowwolf
bbed88c876 kernel: add support for rtl88x2bu driver 2022-11-02 14:22:47 +08:00
coolsnowwolf
f3fda01ec8 ipq807x: add MPILIB for kernel 5.15 2022-11-02 12:50:06 +08:00
coolsnowwolf
365a6d03c2 ipq807x: add CONFIG_CRYPTO for kernel 5.15 2022-11-02 12:46:02 +08:00
1054009064
f118cbd66e
ipq807x: fix kernel 5.15 support for mf269 (#10354) 2022-11-02 12:21:00 +08:00
coolsnowwolf
3765b2938c ipq807x: fix kernel 5.15 cpufreq support 2022-11-01 22:08:09 +08:00
Albert Xu
7d3a3ade9c
kernel: Drop mark apcs_alias0_core_clk as critical (#10349)
* Upstream has introduced this change https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/clk/qcom/apss-ipq6018.c?h=v5.15.76&id=8e556f5573684b3d4126a4fea88141ee56a407ab
2022-11-01 21:24:57 +08:00
Jianhui Zhao
f397e64fe0
feed: add a new feed for oui (#10347)
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
2022-11-01 21:24:09 +08:00
coolsnowwolf
2da3923be4 Version update to R22.11.11 2022-11-01 13:52:25 +08:00
lovehackintosh
02617e159d
kernel: bump 5.10 to 5.10.152 (#10341)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-11-01 02:06:45 +00:00
lovehackintosh
8431ab6ee7
kernel: bump 5.4 to 5.4.221 (#10342)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-11-01 02:02:19 +00:00
John Audia
392e39710a kernel: bump 5.15 to 5.15.76
All patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-31 19:22:08 +08:00
John Audia
c6fa37ad45 rockchip: armv8: add CONFIG_ARM64_ERRATUM_1742098
5.15.76 introduces a new symbol that applies Cortex-A72 SoCs so enable it[1].

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/arm64/Kconfig?id=v5.15.76&id2=v5.15.75

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-31 19:21:05 +08:00
John Audia
17977e1d31 mvebu: cortexa72: add CONFIG_ARM64_ERRATUM_1742098
5.15.76 introduces a new symbol that applies Cortex-A72 SoCs so enable it[1].

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/arm64/Kconfig?id=v5.15.76&id2=v5.15.75

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-31 19:19:47 +08:00
John Audia
b77a2a6c23 kernel: add # CONFIG_ARM64_ERRATUM_2441007 symbol
Introduced with 5.15.75.[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/arm64/Kconfig?id=v5.15.75&id2=v5.15.74

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-31 19:19:27 +08:00
John Audia
0f57706836 kernel: add # CONFIG_ARM64_ERRATUM_1742098
Introduced with 5.15.76[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/arm64/Kconfig?id=v5.15.76&id2=v5.15.75

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-31 19:17:40 +08:00
John Audia
b1cb49652b kernel: bump 5.15 to 5.15.75
Removed upstreamed:
   bcm27xx/patches-5.15/950-0446-drm-vc4-Fix-timings-for-VEC-modes.patch[1]

Manually rebased:
   patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
   bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch
   bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch
   bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch

All other patches automatically rebased

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.75&id=2810061452f9b748b096ad023d318690ca519aa3

Build system: x86_64
Build-tested: bcm2711/RPi4B, mt7622/RT3200
Run-tested: bcm2711/RPi4B, mt7622/RT3200

Signed-off-by: John Audia <therealgraysky@proton.me>
2022-10-31 19:13:52 +08:00
John Audia
084986676a kernel: bump 5.10 to 5.10.150
Manually rebased:
  bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
[Move gro_skip in 680-NET-skip-GRO-for-foreign-MAC-addresses.patch to old position]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-10-31 19:11:03 +08:00
aakkll
be4cffd589
kernel: bump 6.0 to 6.0.6 (#10333)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>

Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2022-10-30 17:50:58 +08:00
Daniel Golle
10f2bed40e mediatek: mt7622: kernel config fixes
* remove orphaned Kconfig symbol now that CONFIG_IIO is no longer
   selected after commit ef8b935c95 ("mediatek: clean up mt7622 kernel config")

 * select UBI fast-map feature to decrease boot time and keep the
   number of spare blocks required in sync with U-Boot's expectations
   (we got fast-map enabled in U-Boot)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-29 21:33:49 +08:00
Daniel Golle
16a3a9cd7a mediatek: filogic: consolidate adc '32k' clock
Add dependency to '32k' ADC clock so it is always enabled for thermal
and raw access to ADC values. This allows to remove the patch for the
ADC driver and reduce the patch adding thermal support for MT7986 to
only add the new efuse layout and temperature decoding for V3.

Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-29 21:33:04 +08:00
Daniel Golle
62cb5a2617 mediatek: clean up platform kernel modules
Remove kmod-sdhci-mtk as the mtk-sd driver is built-in anyway for the
relevant subtargets in order to support mounting rootfs from eMMC or
SD card.

Add kmod-iio-mt6577-auxadc to support reading the raw values from the
auxadc unit used as in-SoC thermal sensor. This driver was previously
built-in, but as thermal itself works well without it there is no use
for it in every day use of a device. Build the module to still allow
access to the raw values for those who need it.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-29 21:32:23 +08:00
Daniel Golle
8b7bd596df kernel: modules: iio: create and use AddDepends
Just like for other subsystems, create a reusable AddDepends call.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-29 21:28:02 +08:00
Daniel Golle
38bffdd012 uboot-envtools: mediatek/mt7622: don't rely on mapped rootfs
Similar to the implementation for the BPi-R3 use the same logic also
for determining the device to look for the U-Boot environment of the
BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-29 21:24:22 +08:00
Daniel Golle
fa94fd470b mediatek: mt7622: don't rely on existing image for sysupgrade
Don't reply on mapped rootfs partition but rather just take what ever
has been set to the kernel cmdline root= parameter as a hint to decide
which media to install sysupgrade to on the BananaPi BPi-R64.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-29 21:24:00 +08:00
Daniel Golle
76fc27e5e3 mediatek: update pending and rename merged patch
Add patch headers and description for pending patch.
Add version tag to patch already merged upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-29 21:23:01 +08:00
1054009064
d05fbef769
mac80211: backport security fixes (#10324)
* mac80211: backport security fixes

This mainly affects scanning and beacon parsing, especially with MBSSID enabled

Fixes: CVE-2022-41674
Fixes: CVE-2022-42719
Fixes: CVE-2022-42720
Fixes: CVE-2022-42721
Fixes: CVE-2022-42722
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 26f400210d6b3780fcc0deb89b9741837df9c8b8)

* mac80211: refresh patches

355-wifi-cfg80211-fix-BSS-refcounting-bugs.patch - 5a52384a51

Co-authored-by: Felix Fietkau <nbd@nbd.name>
Co-authored-by: 1054009064 <1054009064@users.noreply.github.com>
2022-10-28 15:17:13 +08:00
coolsnowwolf
99b245df33 ipq60xx: remove generic backport qcom smem patch 2022-10-28 11:51:46 +08:00
coolsnowwolf
8e68a5d788 ipq60xx: add CMIOT-AX18/ZN-M2 support 2022-10-28 11:43:33 +08:00
coolsnowwolf
e9f105edda image-commands: add missing qsdk-ipq-factory-mmc 2022-10-28 11:26:30 +08:00
coolsnowwolf
d574ac301c Merge branch 'master' of https://github.com/coolsnowwolf/lede 2022-10-28 11:25:48 +08:00
coolsnowwolf
a56ccddcb6 grub2: bump version 2022-10-28 11:25:34 +08:00
aakkll
9993b32257
kernel: bump 6.0 to 6.0.5 (#10319)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>

Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2022-10-27 00:42:06 +08:00
Christian Marangi
ea7c4d14b0 generic: 5.15: backport smempart parser fixup patch with EPROBE_DEFER error
Backport patch from kernel 5.15 that mute error on EPROBE_DEFER with
smempart parser.

This parser require the smem device to be probed first and currently it
may happen that mtd gets probed before the smem device causing an error
on the smempart parser. This error may be confusing and should be muted.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:35:24 +08:00
Christian Marangi
d4dc60f453 generic: 5.15: backport qcom smem patch for reserved-space support
In new kernel version from 5.16, smem node can be declared directly in
the reserved-space node. Upstream ipq806x (and to-be-merged) ipq807x
allign to this new implementation. Backport this patch to kernel 5.15 to
fix support for smem parser for ipq806x target.

Fixes: 88bf6525251f ("ipq806x: 5.15: replace dtsi patches with upstream version")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:35:16 +08:00
Christian Marangi
537bff96a7 generic: 5.15: move not backport patch to pending dir
Move patch wrongly placed in backport dir to pending dir as they still
didn't got merged upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:31:12 +08:00
Christian Marangi
1c7eb3d702 generic: 5.15: move MGLRU patches from pending to backport
Move MGLRU patches from pending to backport as they got merged upstream.
These are direct porting from one of the dev so it's better to just move
than trying to backport them again from upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:30:50 +08:00
Christian Marangi
3cc43d223e generic: 5.15: move mvebu aardvark patch from pending to backport
Move mvebu aardvark patch from pending to backport as they got merged
upstream.
One additional patch is needed as a later fixup for it.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:30:11 +08:00
Christian Marangi
50285c1d2f generic: 5.15: move ZTE MF286D modem patch from pending to backport
Move ZTE MF286D modem patch from pending to backport as it was merged
upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:28:43 +08:00
Christian Marangi
e5093b77f9 generic: 5.15: move bluetooth mt79 usb id patch from pending to backport
Move bluetooth mt79 usb id patch from pending to backport as it got
merged upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:27:56 +08:00
Christian Marangi
b1293c0968 generic: 5.15: move mtk eth soc patch from pending to backport
Move mtk eth soc patch from pending to backport as it got merged
upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:27:39 +08:00
Christian Marangi
eab77aadec generic: 5.15: move sfp HALNy patch from pending to backport
Move sfp HALNy patch from pending to backport as they got merged
upstream. The patch was reordered and one was squashed in the upstream
variant.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:27:14 +08:00
Christian Marangi
2c0a7ea60d generic: 5.15: move pending xtx nand patch from pending to backport
Move pending xtx nand patch from pending to backport as it got merged
upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:26:55 +08:00
Christian Marangi
f7ccf2d477 generic: 5.15: move dtc drop interrupt check from pending to backport
Move dtc drop interrupto check from pending to backport as it got merged
upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:26:36 +08:00
Christian Marangi
120330dea2 generic: 5.15: move MIPS cpuinfo patch from pending to backport
Move MIPS cpuinfo patch from pending to backport as it got merged
upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2022-10-26 22:26:12 +08:00
ty
063f51c242
autosamba: fixes compatible with samba4 (#10315)
Fix: coolsnowwolf/lede#10314
2022-10-25 12:40:31 +08:00
AmadeusGhost
613e76c9e0 Revert "autocore: ethinfo: rewritten in lua"
This reverts commit 4f056f8ef3.
Fixes: #10180, #10251
2022-10-25 12:38:39 +08:00
AmadeusGhost
51dccebbdc autocore-arm: update config for filogic 2022-10-25 11:42:00 +08:00
AmadeusGhost
3c294bd503 treewide: remove support of kernel 5.19 2022-10-25 10:55:54 +08:00
Andre Heider
bdd016c403 mac80211: fix masking nested A-MSDU support for mesh
CONFIG_MAC80211_MESH isn't defined for this package, rendering the patch
useless. Match protecting the access of sta_info.mesh with the very same
define declaring it.

Fixes 45109f69a6 "mac80211: fix compile error when mesh is disabled"
Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-10-25 10:30:06 +08:00
Shiji Yang
ac359a8b64 ramips: add missing WAN LED for Xiaomi Mi Router 4A / 4C
The blue WAN LED connected to GPIO37 is missing, so re-add it.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2022-10-25 10:29:02 +08:00
coolsnowwolf
92bdfb61ce Revert "Revert "toolchain: gcc: improve patch handling by introducing major version""
This reverts commit 779ed7d9a0.
2022-10-24 14:29:05 +08:00
Nick Hainke
c86da866ca ksmbd: update to 3.4.6
Release Announcement:
https://github.com/cifsd-team/ksmbd/releases/tag/3.4.6

Remove upstreamed:
- 10-fix-build-on-kernel-5.15.52-or-higher.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-24 11:40:22 +08:00
Nick Hainke
1778c590d5 linux-firmware: update to 20221012
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-24 11:36:34 +08:00
Daniel Golle
29413bac28 tools/mkimage: bring back removed patches
Patches for mtk_image supporting newer SoCs have been dropped in the
process of updating mkimage to U-Boot 2022.10. While it is true that
the patches have been merged upstream a while ago, they were not merged
in time to be part of the U-Boot 2022.10 release.
See also commit 537b423d9f ("uboot-mediatek: update to U-Boot 2022.10")
which explicitly mentions that.

Fixes: 6e245777bd ("tools/mkimage: update to 2022.10")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-24 11:35:41 +08:00
coolsnowwolf
79a5a327ae Revert "tools/upx: update to 3.96"
This reverts commit 4f0a5bdc7b.
2022-10-24 10:06:30 +08:00
aiamadeus
144c1fb2f3
Merge pull request #10310 from lovehackintosh/bump-tools 2022-10-23 22:28:06 +08:00
Liu Linhui
e95c5bc7f1 tools: sync with upstream
remove mm-macros because it's not needed

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-23 12:43:07 +08:00
Rosen Penev
038c141696 tools/cpio: sync with upstream
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-10-23 12:40:42 +08:00
Rosen Penev
15d88af106 tools: add Host/Uninstall where possible
This cleans staging_dir when calling tool/x/clean.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-23 12:39:00 +08:00
Linhui Liu
ff473e4495 tools/zstd: sync with upstream
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-10-23 12:33:29 +08:00
Nick Hainke
893b5022d9 tools/zlib: update to 1.2.13
Switch to "https github.com" for downloading source files.

Release Announcements:
https://github.com/madler/zlib/releases/tag/v1.2.13

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-23 12:32:40 +08:00
Linhui Liu
5c04a547c8 tools/zip: sync with upstream
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-10-23 12:31:14 +08:00
Nick Hainke
e83a16d318 tools/xz: update to 5.2.7
Update to latest version.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-23 12:30:01 +08:00
Liu Linhui
4f0a5bdc7b tools/upx: update to 3.96
Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-23 12:29:34 +08:00
Linhui Liu
6dbbf0b3b3 tools/squashfskit4: sync with upstream
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-10-23 12:28:48 +08:00
Rosen Penev
faa12f02c9 tools/sparse: update to 0.6.4
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-23 12:27:30 +08:00
Nick Hainke
c84f949a9f tools/mtools: update to 4.0.41
Release Notes:
https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00011.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-23 12:26:39 +08:00
Linhui Liu
e813d7dc4e tools/mm-macros: remove
this is in the codebase because of libsigc++, which is not in the codebase anymore.
Neither in base nor in packages. It doesn't seem to be needed by
anything else either. GNOME packages have transitioned to using meson,
which does not use m4 files.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-10-23 12:24:56 +08:00
Nick Hainke
e5ea551257 tools/mkimage: update to 2022.10
Remove upstreamed patches:
- 020-tools-mtk_image-split-gfh-header-verification-into-a.patch
- 021-tools-mtk_image-split-the-code-of-generating-NAND-he.patch
- 022-tools-mtk_image-add-support-for-nand-headers-used-by.patch

Refreshed manually:
- 030-allow-to-use-different-magic.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-23 12:20:38 +08:00
Linhui Liu
fe40a5e5bb tools/meson: sync with upstream
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-10-23 12:19:36 +08:00
Nick Hainke
0fe111a083 tools/genext2fs: update to 1.5.0
Update to latest version.

Remove patches:
- 100-c99_scanf.patch
- 200-autoconf.patch
- 300-blocksize-creator.patch
- 400-byteswap_fix.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-23 12:16:22 +08:00
Nick Hainke
2e5852e1c7 tools/expat: switch to tar.xz to save bandwidth
The tar.xz download is a bit smaller. Use this download to save traffic.

Suggested-by: hardfalcon
Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-23 12:14:53 +08:00
Nick Hainke
d62f2337c9 tools/dwarves: update to 1.24
Release Notes:
https://lwn.net/Articles/905738/

Switch to https "fedorapeople.org"-mirror. Use $(AUTORELEASE).

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-23 12:07:38 +08:00
Linhui Liu
e2ff325ada tools/cmake: sync with upstream
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-10-23 12:06:27 +08:00
Nick Hainke
82c468d257 tools/bc: update to 1.07.1
Changes:
  Fixed ibase extension causing problems for read()
  Fixed parallel make problem.

Remove the "003-bc-fix-hang.patch" because the hang is fixed upstream.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-23 12:03:09 +08:00
Nick Hainke
7832ed2e86 tools/bash: update to 5.2
Release Notes:
https://lists.gnu.org/archive/html/bug-bash/2022-09/msg00056.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-23 12:01:46 +08:00
coolsnowwolf
779ed7d9a0 Revert "toolchain: gcc: improve patch handling by introducing major version"
This reverts commit b51a15b3e8.
2022-10-22 23:34:09 +08:00
mk-qi
2a9196062b
iwlwifi: edit package/firmware/linux-firmware/intel.mk for support inter-ax201 (#10303) 2022-10-22 22:23:19 +08:00
lovehackintosh
e19b441cc0
libselinux: sync with upstream (#10300)
Fixes: #10294
2022-10-22 13:31:19 +00:00
lovehackintosh
4fef020048
kernel: bump 6.0 to 6.0.3 (#10299)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-22 13:29:51 +00:00
Albert Xu
6c4e5d7b47
scripts/download.pl: Make the download tool configurable (#10291)
* rules.mk: Move DOWNLOAD_CHECK_CERTIFICATE to include/download.mk

Move DOWNLOAD_CHECK_CERTIFICATE to include/download.mk as it's a better
place than exporting it in the global rules.mk makefile.

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

* scripts/download.pl: Make the download tool configurable

Introduce a new option in the "Advanced configuration options" to
configure a custom download tool.

By declaring a string in "Use custom download tool" an user can force
what command to use to download package. With the string empty the
default tool used is curl, with wget as a fallback if not available.

download.pl supports 3 tools officially aria2c, curl and wget.
If one of the tool is used in this config, download.pl will use the
default args to make use of them.

If the provided string is different than aria2c, curl or wget, the command
is used as is and the download url will be appended at the end of such command.

While at it also tweak the tool selection logic and chose the tool only
once when the script is called and move aria2c specific variables in the
relevant section.

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

* scripts/download.pl: Pass aria2 config in ENV only

The aria2c command tries to load config from
${XDG_CONFIG_HOME:-${HOME}/.config}/aria2/aria2.conf by default,
which may result unexpected behavior.

As a replacement, people can use environment variable ARIA2C_OPTIONS
to custom arguments passed to aria2c like curl and wget below.
Including --conf-path=/path/to/config.conf in ARIA2C_OPTIONS can
also set a custom config file path easily if needed.

Signed-off-by: Zhang Hua <zhanghuadedn@gmail.com>

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Zhang Hua <zhanghuadedn@gmail.com>
Co-authored-by: Christian Marangi <ansuelsmth@gmail.com>
Co-authored-by: Zhang Hua <zhanghuadedn@gmail.com>
2022-10-21 12:47:28 +08:00
Hugo Yuan
bc34ef9154
rockchip: Add Rongpin King3399 support (#10292) 2022-10-21 12:47:10 +08:00
KumaTea
b0d39f5588
kernel: mtd: add en25qx128a spi nor support 2022-10-21 01:35:17 +08:00
aiamadeus
6ed97d50b6
Merge pull request #10285 from lovehackintosh/sync 2022-10-21 01:28:28 +08:00
Petr Štetiar
9a3a81345b toolchain: musl: disable crypt size hack by default
Enable this option and thus re-include crypt() support for the SHA256,
SHA512 and Blowfish ciphers on all devices. According to commit
9365745f8e7b ("musl: add a hack to remove unused crypt() algorithms,
saves ~14k after lzma") it should add about ~14k to the resulting image,
which seems to be a reasonable size increase for consistent crypt()
support.

Decided to not remove this hack completely as it might be still useful
for people trying to fit custom images onto smaller devices and the
patch is rather simple so we can afford to keep it for now.

References: https://github.com/openwrt/openwrt/pull/1331
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-10-20 10:38:20 +08:00
Nick Hainke
b51a15b3e8 toolchain: gcc: improve patch handling by introducing major version
Every minor version bump of a major version will result in a huge patch
diff because of the moving of all the patches from version e.g. 11.2.0 to
11.3.0. This commit only use the major version for the patch folders to
differentiate between the different gcc versions. This will significantly
improve the reviewing of the smaller version bump patches and help to see
what really changed in a minor version bump.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-20 10:16:19 +08:00
Paul Spooren
1a60b45162 build: remove GCC9 support
gcc9 was never used within a release and the development branch is
already on version 10, no need to keep this in tree.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2022-10-20 09:45:21 +08:00
Paul Spooren
5b43ebc046 build: remove GCC7 support
The development branch is now on version 10, we shouldn't drag to many
old versions and therefore drop at least 7.x.

Signed-off-by: Paul Spooren <mail@aparcar.org>
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Rui Salvaterra <rsalvaterra@gmail.com>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
Acked-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
2022-10-20 09:25:06 +08:00
Felix Fietkau
4bb64420f8 toolchain/binutils: remove old versions
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-20 09:15:16 +08:00
lovehackintosh
3b4c47d068
download.pl: use more Chinese mirrors (#10281)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-10-19 21:57:49 +08:00
coolsnowwolf
b47dc84523 build: move Build/copy-file to image-commands.mk 2022-10-19 21:57:13 +08:00
coolsnowwolf
06fa03cb43 mt76: add MediaTek Filogic 630 (MT7916) support 2022-10-19 21:06:13 +08:00
coolsnowwolf
1fcad6d3b1 build: switch default target to x64 2022-10-19 20:42:58 +08:00
coolsnowwolf
66d86d2371 scripts: sync with upstream 2022-10-19 20:39:19 +08:00
coolsnowwolf
80b72c1cc6 wireless-regdb: unlock WIFI6E channel and txpower 2022-10-19 20:14:00 +08:00
coolsnowwolf
8130834aff rockchip: add rockchip-crypto support for rk3568/rk3588 2022-10-19 20:03:59 +08:00
lovehackintosh
4c72b166f7
toolchain: glibc: Update to glibc 2.35 (#10276)
This updates to glibc to version 2.35.

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

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Co-authored-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-10-19 15:56:10 +08:00
lovehackintosh
17ae188737
kernel: bump 5.10 to 5.10.149 (#10278)
No patches required modification.

Signed-off-by: John Audia <therealgraysky@proton.me>

Signed-off-by: John Audia <therealgraysky@proton.me>
Co-authored-by: John Audia <therealgraysky@proton.me>
2022-10-19 15:55:47 +08:00
lovehackintosh
12987a4398
Kernel: bump 5.4 to 5.4.219 (#10279)
No patches rebased, just checksum update for this refresh.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-19 15:55:34 +08:00
lovehackintosh
8ec6c444f8
rockchip: fix Makefile format (#10275)
Signed-off-by: Linhui Liu <liulinhui36@gmail.com>

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2022-10-19 15:55:22 +08:00
Daniel Golle
acb79816cd uboot-envtools: mediatek_filogic: fix BPi-R3 when no OS is installed
Fix accessing the environment in case no OS is installed on the flash
media selected for boot as this is possible when booting initramfs.
In case of relying on the device specified to be mounted as rootfs to
be present, rather just use the kernel cmdline 'root' variable as a
hint to decide where to read/write the U-Boot environment.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-19 10:22:26 +08:00
Daniel Golle
04737cae7c mediatek: filogic: don't rely on image preset in flash or sysupgrade
Instead of trying to figure out the actual root device, just use the
kernel 'root' cmdline parameter as a hint to decide which device to
flash to.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-19 10:22:07 +08:00
Daniel Golle
69adcb2fa1 mediatek: filogic: use UBI fast map to speed up boot
Use UBI fast map feature to avoid scanning the whole flash on each
boot which takes several seconds.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-19 10:21:17 +08:00
Daniel Golle
072de63901 mediatek: don't break auxadc without 32k clk
Make the newly added 32k clock optional for the auxadc driver also used
on pre-filogic platforms.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-19 10:20:35 +08:00
Daniel Golle
67017451e4 uboot-mediatek: update to U-Boot 2022.10
Remove patches adding support for MT7621 which have been merged upsteam.
Patches for MT7981 and MT7986 have been merged too, but not in time to
be included in the 2022.10 release, so we have to keep carrying them
until the 2023.01 release.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-19 10:18:56 +08:00
coolsnowwolf
147061e637 ath11k: enable ethernet offload by default 2022-10-18 13:56:43 +08:00
coolsnowwolf
0421b51933 ipq60xx: add ath11k-firmware-ipq6018 2022-10-18 13:56:12 +08:00
coolsnowwolf
e2f7ac1e87 mtd: enable linksys bootcount support for ip60xx 2022-10-18 13:43:26 +08:00
coolsnowwolf
f270095939 uboot-envtools: add Linksys MR7350 uboot env support 2022-10-18 13:41:45 +08:00
coolsnowwolf
3eddaf9e60 ipq60xx: add Linksys MR7350 support 2022-10-18 13:38:14 +08:00
AmadeusGhost
60facd3138 rockchip: enable support for opc-h68k 2022-10-18 11:25:34 +08:00
AmadeusGhost
2a911a7e00 rockchip: add yt8531c driver from net-next 2022-10-18 11:20:51 +08:00
AmadeusGhost
b98efa18fd rockchip: fixes drm module dependencies 2022-10-18 11:19:09 +08:00
AmadeusGhost
7ff615dafc rockchip: add kernel 6.0 support 2022-10-18 11:15:29 +08:00
AmadeusGhost
8f3829bd9e generic: add missing config for kernel 6.0 2022-10-18 11:01:14 +08:00
AmadeusGhost
ca7f48be37 rockchip: remove kernel 5.19 support
Also removed some bugly drivers.
2022-10-18 10:50:11 +08:00
Bruno Umuarama
1f89c35a40 mediatek: mt7623: fix thermal zone
Raising the temperatures for passive and active trips. @VA1DER
proposed at issue 9396 to remove passive trip. This commit relates to
his suggestion.

Without this patch. the CPU will be throttled all the way down to 98MHz
if the temperature rises even a degree above the trip point, and it was
further discovered that if the internal temperature of the device is
above the first trip point temperature when it boots then it will start
in a throttled state and even
$ echo disabled > /sys/class/thermal/thermal_zone0/mode
will have no effect.

The patch increases the passive trip point and active cooling map. The
throttling temperature will then be at 77°C and 82°C, which is still a
low enough temperature for ARM devices to not be in the real danger
zone, and gives some operational headroom.

Signed-off-by: Bruno Umuarama <anonimou_eu@hotmail.com>
2022-10-17 23:25:07 +08:00
Felix Fietkau
4aa78063c6 mediatek: clean up mt7622 kernel config
Remove a few unused options to reduce kernel size

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-17 23:24:32 +08:00
Felix Fietkau
484da47262 kernel: add missing lockdep config symbols for 5.15
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-17 23:23:23 +08:00
Felix Fietkau
9e90121e2c kernel: remove target specific CONFIG_IKCONFIG lines
Use generic configuration for this feature

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-17 23:22:35 +08:00
Daniel Golle
181d7a1d88 mediatek: filogic: set correct PWM clock and clean thermal zone
* set correct clocks for PWM to work.
 * MT7986 PWM does have the 26MHz-clock-select, set that in patch
 * drop useless 'passive' trip point in thermal zone
 * extend pwm-fan to have 3 active operating points
 * set reasonable trip points in thermal zone
 * invert pwm-fan operating points and set shorter period to allow
   less noisy operation of the PWM fan of the BPi-R3.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-17 23:20:28 +08:00
Felix Fietkau
2d6da7e23b build: add support for passing C preprocessor flags for DTS builds
Useful for adding #ifdefs based on build system provided definitions, or
for adding extra include paths

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-17 23:18:56 +08:00
coolsnowwolf
518f59ad64 generic: enable MGLRU support for Linux 6.0 2022-10-17 10:28:21 +08:00
lovehackintosh
37c134045b
kernel: bump 5.15 to 5.15.74 (#10263)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-16 15:15:29 +00:00
lovehackintosh
cbd593078d
Kernel: bump 5.4 to 5.4.218 (#10262)
No patches rebased, just checksum update for this refresh.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-16 15:15:06 +00:00
coolsnowwolf
9f74489df6 Merge branch 'master' of https://github.com/coolsnowwolf/lede 2022-10-16 02:16:15 +08:00
coolsnowwolf
351d4bb63b kernel: backport MGLRU to linux 6.0 for Tianling Shen 2022-10-16 02:16:00 +08:00
lovehackintosh
f4570f4598
Kernel: bump 5.10 to 5.10.148 (#10259)
No patches rebased, just checksum update for this refresh.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-15 12:25:19 +00:00
coolsnowwolf
415a25a683 kernel: bump 5.19 to 5.19.16 2022-10-15 18:12:00 +08:00
coolsnowwolf
56b20ca1ca kernel: bump 6.0 to 6.0.2 2022-10-15 18:10:39 +08:00
coolsnowwolf
4e5666234c x86: add rts5139 patch for 5.15/5.19/6.0 2022-10-15 00:52:25 +08:00
coolsnowwolf
9c28cbaf04 x86: move rts5139 driver to geneic 2022-10-14 14:32:27 +08:00
coolsnowwolf
496cf229fc x86: switch test kernel to 6.0 2022-10-14 14:25:19 +08:00
coolsnowwolf
9df30a2e36 kernel: fix linux 6.0 drm support 2022-10-14 14:10:12 +08:00
coolsnowwolf
677b831c3d kernel: add linux 6.0 stable release support 2022-10-14 12:33:52 +08:00
aakkll
0a4a1af37f
kernel: bump 5.19 to 5.19.15 (#10247)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>

Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2022-10-12 23:49:44 +08:00
coolsnowwolf
256f38fd4b Update README.md 2022-10-12 00:46:48 +08:00
coolsnowwolf
5c42490cf1 x86: add Realtek USB 2.0 card readers boot support for ChangWang CW56-58 2022-10-10 23:21:49 +08:00
ZeaKyX
f833707a78
github workflows: avoid skipping (#10243) 2022-10-10 17:14:05 +08:00
coolsnowwolf
b1b6cd41bb Version update to R22.10.10 2022-10-10 17:11:56 +08:00
coolsnowwolf
0dec08d9e2 x86: add amd Ryzen APU vage/rdna gpu support 2022-10-10 17:06:54 +08:00
coolsnowwolf
311c9aabf5 x86: add support for AMD Zen CPU temperature sensor 2022-10-10 15:10:15 +08:00
Daniel Golle
d4c760d9ce mediatek: filogic: enable thermal, I2C and PWM of the BPi-R3
Setup thermal zone, select pins and enabled drivers for I2C (on 26-pin
GPIO bank) and PWM (1x fan and 1x GPIO bank).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-08 11:16:04 +08:00
Daniel Golle
c99fce459b mediatek: filogic: add support for hw i2c, pwm and thermal
Add support for hardware I2C and PWM units found in the Filogic SoCs
as well as the CPU thermal support.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-08 11:15:15 +08:00
AmadeusGhost
3929a9889f kernel/5.4: backport mtd parser for Sercomm parts
Fixes: #10143
2022-10-07 12:36:53 +08:00
Daniel Cousens
b5bb491bc3 build: prefer HTTPS if available (for packages)
Changes PKG_SOURCE_URL's for arptables, bsdiff, dnsmasq,
fortify-headers, ipset, ipset-dns, libaudit, libpcap, libressl,
lua, lua5.3, tcpdump and valgrind, to HTTPS

Signed-off-by: Daniel Cousens <github@dcousens.com>
2022-10-07 12:33:08 +08:00
coolsnowwolf
46121523c9 iptables: add iptables-mod-socket 2022-10-06 16:01:36 +08:00
lovehackintosh
6d2b34758c
kernel: bump 5.19 to 5.19.14 (#10228)
* kernel: bump 5.19 to 5.19.13

All patches automatically rebased

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

* kernel: bump 5.19 to 5.19.14

All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-06 15:27:38 +08:00
lovehackintosh
bffd77b6d9
kernel: bump 5.15 to 5.15.72 (#10230)
Removed upstreamed:
generic/pending-5.15/722-net-mt7531-only-do-PLL-once-after-the-reset.patch

All other patches automatically rebased.

Signen-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-06 10:55:42 +08:00
lovehackintosh
832a08ef65
kernel: bump 5.10 to 5.10.147 (#10231)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-06 10:54:03 +08:00
lovehackintosh
3a1e4116fd
kernel: bump 5.4 to 5.4.216 (#10232)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-06 10:53:27 +08:00
Koen Vandeputte
60dc2c9b7c mac80211: fix compile error when mesh is disabled
This fixes following compile error seen when
building mac80211 with mesh disabled:

.../backports-5.15.58-1/net/mac80211/agg-rx.c: In function 'ieee80211_send_addba_resp':
...backports-5.15.58-1/net/mac80211/agg-rx.c:255:17: error: 'struct sta_info' has no member named 'mesh'
  255 |         if (!sta->mesh)
      |                 ^~

sta_info.h shows this item as being optional based on flags:

	struct mesh_sta *mesh;

Guard the check to fix this.

Fixes: f96744ba6b ("mac80211: mask nested A-MSDU support for mesh")
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2022-10-05 11:38:10 +08:00
David Bauer
758af54df2 mac80211: mask nested A-MSDU support for mesh
mac80211 incorrectly processes A-MSDUs contained in A-MPDU frames. This
results in dropped packets and severely impacted throughput.

As a workaround, don't indicate support for A-MSDUs contained in
A-MPDUs. This improves throughput over mesh links by factor 10.

Signed-off-by: David Bauer <mail@david-bauer.net>
2022-10-04 11:37:15 +08:00
Daniel Golle
eb0b70bf52 mediatek: add support t-phy settings from efuse on MT7986
Import patches from mtk-openwrt-feeds (MTK SDK) to support reading
t-phy settings affecting PCIe as well as USB2 and USB3 from efuse.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-04 11:32:23 +08:00
Daniel Golle
e4e20c700c mediatek: filogic: add efuse layout to mt7986a.dtsi
efuse is used to store board-specific settings of some of the in-SoC
peripherals. Add it to device tree, so it gets probed on boot and can
be accessed by other drivers.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-04 11:31:34 +08:00
Daniel Golle
7f66edbb96 mediatek: add patch allowing 1-byte wide access to efuse
Allow byte-wise access to mtk-efuse as some drivers require that.
Patch imported from mtk-openwrt-feeds (MTK SDK).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-04 11:30:06 +08:00
Mark King
e0afff0ccd ramips: enable LZMA loader to fix Linksys RE6500 boot
At some point after 21.02.3 and before 22.03.0, the size limits of the
Linksys RE6500 were reached and prevent booting from the 22.03.0 release
or builds of current SNAPSHOT. This patch allows builds of master to boot
again and has been tested on my device.

Signed-off-by: Mark King <mark@vemek.co>
2022-10-04 11:29:05 +08:00
Daniel Golle
2a0953e837 rpcd: reload rpcd on installation of rpcd-mod-*
When installing additional rpcd modules, a restart of rpcd is required.
This often confuses users as even after installing rpcd-mod-rpcsys the
relevant ubus objects are still missing until rpcd has been reloaded
(or the system has been rebooted, obviously).
Let rpcd-mod-* reload rpcd as post-install action.

Fixes: #10220

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-04 11:27:07 +08:00
Christian 'Ansuel' Marangi
10f73c2bd0 uhttpd: update to latest Git HEAD
d59d732 client: fix compilation error with GCC 12
51283f9 fix compiler uninitialized variable

Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
2022-10-02 21:21:07 +08:00
Christian 'Ansuel' Marangi
eebc453ef4 rpcd: update to latest Git HEAD
1c48257 iwinfo: fix compilation error with GCC 12

[remove extra change in Makefile]
Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
2022-10-02 20:16:19 +08:00
Stijn Tintel
7e5bd6ff3d procd: bump to git HEAD
0ee8e73 trigger: use uloop_timeout_remaining64

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-10-02 20:15:21 +08:00
Stijn Tintel
6c46842920 libubox: bump to git HEAD
123e976 uloop: restore return type of uloop_timeout_remaining
 3344157 uloop: add uloop_timeout_remaining64
 c87d3e1 lua/uloop: use uloop_timeout_remaining64
 c86a894 uloop: deprecate uloop_timeout_remaining

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-10-02 19:56:34 +08:00
AmadeusGhost
1775dd181c libnl-tiny: update to the latest version
c42d890 build static library
28c44ca genl_family: explicitly null terminate
                     strncpy destination buffer
2022-10-02 16:32:58 +08:00
Felix Fietkau
784361332e mt76: update to the latest version
e4fa68a9b3b3 linux-firmware: update firmware for MT7921 WiFi device
60fcf08fe659 linux-firmware: update firmware for MT7921 WiFi device
9d601f4eee8f linux-firmware: update firmware for MT7922 WiFi device
e49b6063fb4b wifi: mt76: move mt76_rate_power from core to mt76x02 driver code
3f27f6adb1ab wifi: mt76: mt76x02: simplify struct mt76x02_rate_power
c07f3d2d5ede wifi: mt76: mt7921: fix antenna signal are way off in monitor mode
9059a5de3bd0 wifi: mt76: Remove unused inline function mt76_wcid_mask_test()
d75f15ddeb90 wifi: mt76: mt7915: fix bounds checking for tx-free-done command
06df7e689294 wifi: mt76: mt7915: reserve 8 bits for the index of rf registers
ad3d0f8db00b wifi: mt76: mt7915: rework eeprom tx paths and streams init
66065073177b wifi: mt76: mt7915: deal with special variant of mt7916
b0114a0abb57 wifi: mt76: mt7915: rework testmode tx antenna setting
6dee964e1f36 wifi: mt76: connac: introduce mt76_connac_spe_idx()
48c116d92939 wifi: mt76: mt7915: add spatial extension index support
db6db4ded0fd wifi: mt76: mt7915: set correct antenna for radar detection on MT7915D
2b8f56a72d76 wifi: mt76: mt7915: fix mt7915_mac_set_timing()
d554a02554db wifi: mt76: mt7915: move wed init routines in mmio.c
61ce40e65852 wifi: mt76: mt7915: enable wed for mt7986 chipset
584a96ec4a0f wifi: mt76: mt7915: enable wed for mt7986-wmac chipset
172d68b6253d mt76: mt76x02: fix vht rate power array overrun
72b87836d368 Revert "mt76: use IEEE80211_OFFLOAD_ENCAP_ENABLED instead of MT_DRV_AMSDU_OFFLOAD"

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-02 11:53:30 +08:00
Rosen Penev
945d239880 tools: fix firmware-utils depends
When firmware-utils was converted to use cmake, the dependency was not
updated.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-02 11:50:24 +08:00
coolsnowwolf
7626542dcb
netfilter.mk : add ip6table mangle depend 2022-10-01 23:50:32 +08:00
lovehackintosh
b6fe6e2b7f
Revert "tools/meson: update to 0.63.1" (#10214)
This reverts commit 5fcaadd8ce.
2022-10-01 23:19:13 +08:00
aiamadeus
f1df38e318
Merge pull request #10212 from lovehackintosh/bump-tools
tools: update version
2022-10-01 19:06:50 +08:00
Nick Hainke
5fcaadd8ce tools/meson: update to 0.63.1
Release Notes:
- 0.62.0 https://mesonbuild.com/Release-notes-for-0-62-0.html
- 0.63.0 https://mesonbuild.com/Release-notes-for-0-63-0.html
- (other notes are not available)

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-01 18:01:15 +08:00
Nick Hainke
691daa9b19 tools/expat: update to 2.4.9
Fixes CVE-2022-40674.

Release Notes:
https://github.com/libexpat/libexpat/blob/R_2_4_9/expat/Changes

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-01 17:59:48 +08:00
Nick Hainke
679d7fc869 ccache: update to 4.6.3
Release Notes:
https://ccache.dev/releasenotes.html#_ccache_4_6_3

Refresh patch:
- 100-honour-copts.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-01 12:57:51 +08:00
Rosen Penev
5cffb6d72e toolchain/gdb: fix expat location
GDB is not finding tools/expat. This fixes it. Move it up with the other
tools.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 12:55:29 +08:00
Nick Hainke
05b84eea32 toolchain: gdb: update to 12.1
Release Notes:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob_plain;f=gdb/NEWS;hb=gdb-12.1-release

Refreshed patch:
- 120-fix-compile-flag-mismatch.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-01 12:18:11 +08:00
Rosen Penev
2e662a430d tools/zstd: update to 1.5.2
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 12:04:40 +08:00
Petr Štetiar
92c3861504 tools/zlib: bump to latest stable release 1.2.12 (CVE-2018-25032)
List of changes since previous release from 2018 is quite long:

 * Fix crc32.c to compile local functions only if used.
 * Check for cc masquerading as gcc or clang in configure.
 * Remove destructive aspects of make distclean.
 * Separate out address sanitizing from warnings in configure.
 * Eliminate use of ULL constants.
 * Add fallthrough comments for gcc.
 * Clean up minizip to reduce warnings for testing.
 * Fix unztell64() in minizip to work past 4GB. (Daniël Hörchner)
 * minizip warning fix if MAXU32 already defined. (gvollant)
 * Replace black/white with allow/block. (theresa-m)
 * Fix indentation in minizip's zip.c.
 * Improve portability of contrib/minizip.
 * Correct typo in blast.c.
 * Change macro name in inflate.c to avoid collision in VxWorks.
 * Clarify gz* function interfaces, referring to parameter names.
 * Fix error in comment on the polynomial representation of a byte.
 * Fix memory leak on error in gzlog.c.
 * Avoid adding empty gzip member after gzflush with Z_FINISH.
 * Explicitly note that the 32-bit check values are 32 bits.
 * Use ARM crc32 instructions if the ARM architecture has them.
 * Add use of the ARMv8 crc32 instructions when requested.
 * Correct comment in crc32.c.
 * Don't bother computing check value after successful inflateSync().
 * Use atomic test and set, if available, for dynamic CRC tables.
 * Speed up software CRC-32 computation by a factor of 1.5 to 3.
 * Add crc32_combine_gen() and crc32_combine_op() for fast combines.
 * Add tables for crc32_combine(), to speed it up by a factor of 200.
 * Fix the zran.c example to work on a multiple-member gzip file.
 * Add gznorm.c example, which normalizes gzip files.
 * Show all the codes for the maximum tables size in enough.c.
 * Clarify that prefix codes are counted in enough.c.
 * Use inline function instead of macro for index in enough.c.
 * Clean up code style in enough.c, update version.
 * Use a macro for the printf format of big_t in enough.c.
 * Use a structure to make globals in enough.c evident.
 * Assure that the number of bits for deflatePrime() is valid.
 * Fix a bug that can crash deflate on some input when using Z_FIXED.
 * Correct the initialization requirements for deflateInit2().
 * Emphasize the need to continue decompressing gzip members.
 * Add legal disclaimer to README.
 * Fix deflateEnd() to not report an error at start of raw deflate.
 * Remove old assembler code in which bugs have manifested.
 * Make the names in functions declarations identical to definitions.
 * Avoid an undefined behavior of memcpy() in _tr_stored_block().
 * Avoid undefined behaviors of memcpy() in gz*printf().
 * Avoid an undefined behavior of memcpy() in gzappend().
 * Avoid the use of ptrdiff_t.
 * Handle case where inflateSync used when header never processed.
 * Don't compute check value for raw inflate if asked to validate.
 * Add address checking in clang to -w option of configure.
 * Return an error if the gzputs string length can't fit in an int.
 * Small speedup to inflate [psumbera].
 * Update use of errno for newer Windows CE versions.
 * Avoid some conversion warnings in gzread.c and gzwrite.c.
 * Have Makefile return non-zero error code on test failure.
 * Avoid a conversion error in gzseek when off_t type too small.
 * Fix CLEAR_HASH macro to be usable as a single statement.
 * Fix bug when window full in deflate_stored().
 * Limit hash table inserts after switch from stored deflate.
 * Permit a deflateParams() parameter change as soon as possible.
 * Cygwin does not have _wopen(), so do not create gzopen_w() there.

Removed 006-fix-compressor-crash-on-certain-inputs.patch which was
hotfix for CVE-2018-25032 and is now included in this release.

This release is not available on @SF (yet?) so the sources are now
pulled from GitHub.

Fixes: CVE-2018-25032
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-10-01 10:03:52 +08:00
Rosen Penev
93e000793c tools/sstrip: update to 3.2
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 10:03:52 +08:00
Nick Hainke
66d826b673 tools/pkgconf: update to 1.9.3
Release Notes:
https://github.com/pkgconf/pkgconf/blob/pkgconf-1.9.3/NEWS

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-01 10:03:52 +08:00
Leonardo Mörlein
f7ede33571 pkg-config: always use correct path for pkg-config.real
Before this commit, it was assumed that pkg-config.real is in the PATH. While
this was fine for the normal build workflow, this led to some issues if

    make TOPDIR="$(pwd)" -C "$pkgdir" compile

was called manually. The command failed with

    Makefile:15: *** No libnl-tiny development libraries found!.  Stop.
    make[1]: Leaving directory

since pkg-config of the host system was used.

After the commit, the package is built sucessfully.

Signed-off-by: Leonardo Mörlein <me@irrelefant.net>
2022-10-01 10:03:52 +08:00
Andre Heider
79e195e238 tools/pkgconf: add PKG_CONFIG_EXTRAARGS for additional arguments
This can be used my the OpenWrt build system to pass additional
arguments when required.

Signed-off-by: Andre Heider <a.heider@gmail.com>
2022-10-01 10:03:52 +08:00
Rosen Penev
99889b80ff tools/pkgconf: update to 1.8.0
Switch to compiling with meson for faster and more reliable compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 10:03:52 +08:00
Hauke Mehrtens
7253aa9167 tools: mtd-utils: Update to version 2.1.4
Update to most recent version of mtd-utils and sync with version from
package folder.

Use a https download server instead of ftp.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-10-01 10:03:52 +08:00
Rosen Penev
0d9e6dbf2f tools/mklibs: update to 0.1.45
Refresh 2to3 patch. Upstream partially did this against some older
python version. This is still needed.

Refreshed other patches to be python3 safe.

Remove uClibc patches as only musl is present now.

Refresh others.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 10:03:52 +08:00
Rosen Penev
b54f862f65 tools/meson: update to 0.61.5
Mostly backports by a Red Hat employee as 0.62 and newer demands Python
3.7+. Same reason 0.61 is kept here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 10:03:52 +08:00
Rosen Penev
2bd980e6f1 tools/meson: update to 0.61.4
Override python to use the one in host instead of hostpkg. There's no
need to use the latter.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 10:03:52 +08:00
Daniel Golle
e7830e9385 firmware-utils: update to git HEAD
0c92b20 iptime-crc32: add support for A6004MX

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-10-01 10:03:52 +08:00
Nick Hainke
3b1616b2e7 tools/fakeroot: update to 1.29
Release Notes:
8dd9e34a2e

Refresh patches:
- 400-alpine-libc.musl-fix.patch
- 600-macOS.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-01 10:03:52 +08:00
Rosen Penev
226a0f1b6d tools/fakeroot: update to 1.28
Refreshed patches.

Upstream says there's only a bugfix for GNU Hurd.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 10:03:52 +08:00
Felix Fietkau
505b520fb8 tools/fakeroot: restore macos bugfix that was dropped during the last update
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-10-01 10:03:52 +08:00
Nick Hainke
b807468841 tools/expat: update to 2.4.8
Release Notes:
https://github.com/libexpat/libexpat/blob/R_2_4_8/expat/Changes

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-01 10:03:52 +08:00
Rosen Penev
fb01bc0ba1 tools/expat: update to 2.4.7
Mostly a bug fix to the bug fix to CVE-2022-25236

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 10:03:52 +08:00
Hauke Mehrtens
d54e6e9dd5 tools: e2fsprogs: Update to version 1.46.5
Update to most recent version of e2fsprogs and sync with version from
package folder.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-10-01 10:03:52 +08:00
Paul Spooren
e1e3f68dcf tools: SOURCE_DATE_EPOCH handling for mkfs.fat
Backport upstream patch to have reproducible FAT signatures.
This should enable reproducibility for x86 EFI images.

Signed-off-by: Paul Spooren <mail@aparcar.org>
2022-10-01 10:03:52 +08:00
Rosen Penev
92a45442a5 tools/dosfstools: update to 4.2
Remove upstream backport.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 10:03:52 +08:00
Rosen Penev
2f0c140d8a tools/ccache: update to 4.6
Full changelog: https://ccache.dev/releasenotes.html#_ccache_4_6

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-10-01 10:03:52 +08:00
Nick Hainke
3dddac5e5f tools/bc: add PKG_CPE_ID
Add CPE ID for tracking CVEs.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-01 10:03:52 +08:00
Nick Hainke
b6d5db383a tools/bc: update to 1.07
Update to latest version. Replace mirror with @GNU/bc.

Manually refresh:
- 001-no_doc.patch

Add patch found here:
26f275502d
as 002-fix-libmath.patch to fix compilation.

Add another patch found here:
55b26eda94
as 003-bc-fix-hang.patch to prevent a hang when building the kernel.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-10-01 10:03:52 +08:00
lovehackintosh
56bf33b686
kernel: bump 5.15 to 5.15.71 (#10203)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-01 01:33:09 +08:00
lovehackintosh
13ac208389
kernel: bump 5.10 to 5.10.146 (#10204)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-01 01:31:38 +08:00
lovehackintosh
236af7db50
kernel: bump 5.4 to 5.4.215 (#10205)
All patches automatically rebased.

Signed-off-by: Liu Linhui <liulinhui36@gmail.com>
2022-10-01 01:30:36 +08:00
AmadeusGhost
35f20da58d rockchip: rock3a: fixes pcie3 support 2022-09-30 22:32:09 +08:00
Felix Fietkau
dde7a41246 kernel: move ubnt ledbar driver to a separate package
Simplifies the tree by removing a non-upstream kernel patch
and related kconfig symbols.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-30 22:26:36 +08:00
Felix Fietkau
2dcfcb852e kernel: fold lzma debloat patch into the patch adding the code
Reduces the number of hack patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-30 22:25:38 +08:00
Felix Fietkau
4b6fd08298 kernel: remove hack patch, move kirkwood specific kmods to target modules.mk
Tweaking the KCONFIG line of kmod-ata-marvell-sata makes the hack patch
unnecessary

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2022-09-30 21:35:47 +08:00
coolsnowwolf
2becaf8682 rockchip: add gic MSI DMA workaround for FastRhino R66S/R68S from Flippy 2022-09-30 11:47:42 +08:00
Petr Štetiar
ba39377afb wolfssl: refresh patches
So they're tidy and apply cleanly.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-09-30 11:30:48 +08:00
Petr Štetiar
89994968e9 wolfssl: fix TLSv1.3 RCE in uhttpd by using latest 5.5.1-stable release
Fixes denial of service attack and buffer overflow against TLS 1.3
servers using session ticket resumption. When built with
--enable-session-ticket and making use of TLS 1.3 server code in
wolfSSL, there is the possibility of a malicious client to craft a
malformed second ClientHello packet that causes the server to crash.

This issue is limited to when using both --enable-session-ticket and TLS
1.3 on the server side. Users with TLS 1.3 servers, and having
--enable-session-ticket, should update to the latest version of wolfSSL.

Thanks to Max at Trail of Bits for the report and "LORIA, INRIA, France"
for research on tlspuffin.

Complete release notes https://github.com/wolfSSL/wolfssl/releases/tag/v5.5.1-stable

Signed-off-by: Petr Štetiar <ynezz@true.cz>
2022-09-30 11:30:27 +08:00
Daniel Golle
6d5501f71d kernel: mtk_ppe: use MTK_FOE_STATE_INVALID instead of *_UNBIND
Instead of dropping *fix-typo-in-__mtk_foe_entry.patch which effectively
means keeping the (also wrong) assignment of MTK_FOE_STATE_BIND, rather
use MTK_FOE_STATE_INVALID as that works well on both older (NETSYS_V1)
and newer (NETSYS_V2) MediaTek SoCs.

Suggested-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-30 11:29:56 +08:00
aiamadeus
e56df4ccf9
Merge pull request #10198 from lovehackintosh/fix-grep 2022-09-30 11:16:28 +08:00
Chris Osgood
0ebf194069 build: fix warnings from grep
Fixes build warnings when using newer versions of grep.

Signed-off-by: Chris Osgood <chris_github@functionalfuture.com>
Tested-by: Georgi Valkov <gvalkov@gmail.com>
2022-09-29 21:14:57 +08:00
Nick Hainke
e2eda24e21 Makefile: fix stray \ warnings with grep-3.8
We simply grep for "/usr". So no need for "-E" or "\/". Furthermore, in
the new grep versions this creates warnings.

As written in the grep-3.8 announcement:
  Regular expressions with stray backslashes now cause warnings, as
  their unspecified behavior can lead to unexpected results.
  For example, '\a' and 'a' are not always equivalent
  <https://bugs.gnu.org/39678>.

Fixes warnings in the form of:
  grep: warning: stray \ before /

Signed-off-by: Nick Hainke <vincent@systemli.org>
2022-09-29 21:13:01 +08:00
Rosen Penev
a1825db93b Makefile: replace head call with grep's -m
head is not necessary here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2022-09-29 21:08:31 +08:00
aakkll
2b67b80839
kernel: bump 5.19 to 5.19.12 (#10192)
Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>

Signed-off-by: aakkll <94471752+aakkll@users.noreply.github.com>
2022-09-29 12:04:02 +08:00
Beginner
936b8f9589
ppp: use modprobe in place of insmod (#10191)
This will prevent `module is already loaded` lines from
appearing in the logs when a PPP connection is reconnecting

Signed-off-by: Manas Sambhus <manas.sambhus+github@gmail.com>

Signed-off-by: Manas Sambhus <manas.sambhus+github@gmail.com>
Co-authored-by: Manas Sambhus <manas.sambhus+github@gmail.com>
2022-09-29 00:00:39 +08:00
coolsnowwolf
5463662206
Update README.md 2022-09-28 19:47:22 +08:00
KumaTea
ce6c012ca9
Add aria2 to deps (#10188) 2022-09-28 10:59:40 +08:00
Daniel Golle
eb9b0042b3 kernel: rename upstreamed patches and import fixes
Move and rename patches which were merged upstream and import follow-up
fixes for MediaTek Ethernet offloading features on MT7622 and Filogic
platforms. Remove patch
793-net-ethernet-mtk_eth_soc-fix-typo-in-__mtk_foe_entry.patch
which breaks hardware flow offloading on MT7622, it will be reverted
upstream as well.

Fixes: c93c5365c0 ("kernel: pick patches for MediaTek Ethernet from linux-next")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-28 00:33:34 +08:00
Daniel Golle
6818018899 linux-firmware: package MediaTek MT792[12] Bluetooth firmware
btusb fails to start on MT792[12] hardware without the appropriate
firmware being loaded first:
[    9.750285] bluetooth hci0: Direct firmware load for mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin failed with error -2
[    9.765723] bluetooth hci0: Falling back to sysfs fallback for: mediatek/BT_RAM_CODE_MT7961_1_2_hdr.bin

Package firmware for MediaTek MT792[12] Bluetooth from linux-firmware.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-28 00:33:02 +08:00
Daniel Golle
8dfec81997 kernel: modules: bluetooth: include support for MediaTek USB
Enable MediaTek protocol in btusb module to support e.g. the Bluetooth
part of the MT7921K NGFF/M.2 module.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-28 00:32:11 +08:00
Daniel Golle
b124296a7e kernel: backport MediaTek USB Bluetooth additions
Backport commits from linux.git adding support for various MT7921
Bluetooth USB IDs.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-28 00:31:22 +08:00
Daniel Golle
1969e2c390 mediatek: build USB XHCI support as module
Instead of always including the XHCI driver in the kernel on all
MediaTek boards, selectively include the kernel module only on boards
which actually make use of USB functionality.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2022-09-28 00:29:46 +08:00
Eneas U de Queiroz
d741ca1319 wolfssl: prefer regular libwolfssl over cpu-crypto
Rename libwolfssl-cpu-crypto to libwolfsslcpu-crypto so that the
regular libwolfssl version comes first when running:
opkg install libwolfssl

Normally, if the package name matches the opkg parameter, that package
is preferred.  However, for libraries, the ABI version string is
appended to the package official name, and the short name won't match.
Failing a name match, the candidate packages are sorted in alphabetical
order, and a dash will come before any number.  So in order to prefer
the original library, the dash should be removed from the alternative
library.

Fixes: c3e7d86d2b (wolfssl: add libwolfssl-cpu-crypto package)
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-09-28 00:27:11 +08:00
Eneas U de Queiroz
cc1e79df1c wolfssl: ABI version shouldn't depend on benchmark
Move CONFIG_PACKAGE_libwolfssl-benchmark from the top of
PKG_CONFIG_DEPENDS to after PKG_ABI_VERSION is set.

This avoids changing the ABI version hash whether the bnechmark package
package is selected or not.

Fixes: 05df135cac (wolfssl: Rebuild when libwolfssl-benchmark gets changes)
Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
2022-09-28 00:26:46 +08:00
11095 changed files with 1310492 additions and 928969 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

@ -10,9 +10,7 @@ name: OpenWrt-CI
on: on:
schedule: schedule:
- cron: 0 20 * * * - cron: 0 20 * * *
release:
types: [published]
permissions: permissions:
contents: read contents: read
@ -20,35 +18,29 @@ jobs:
build_openwrt: build_openwrt:
permissions: name: Build OpenWrt Firmware
contents: write # for release creation
name: Build OpenWrt firmware runs-on: ubuntu-22.04
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps: steps:
- name: Space cleanup and Initialization environment
- name: Checkout
uses: actions/checkout@v2
with:
ref: master
- name: Space cleanup
env: env:
DEBIAN_FRONTEND: noninteractive DEBIAN_FRONTEND: noninteractive
run: | run: |
docker rmi `docker images -q` docker rmi `docker images -q`
sudo 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-get -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* adoptopenjdk* mysql* php* mongodb* dotnet* moby* snapd* || true sudo -E apt-mark hold grub-efi-amd64-signed
sudo -E apt-get update sudo -E apt update
sudo -E apt-get -y install build-essential asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch python3 unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex uglifyjs gcc-multilib g++-multilib p7zip p7zip-full msmtp libssl-dev texinfo libglib2.0-dev xmlto qemu-utils upx libelf-dev autoconf automake libtool autopoint device-tree-compiler antlr3 gperf swig sudo -E apt -y purge azure-cli* docker* ghc* zulu* llvm* firefox google* dotnet* powershell* openjdk* mysql* php* mongodb* dotnet* snap*
sudo -E apt-get -y autoremove --purge sudo -E apt -y full-upgrade
sudo -E apt-get clean 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 apt -y autoremove --purge
sudo -E apt clean
sudo -E timedatectl set-timezone "Asia/Shanghai"
df -h - name: Checkout OpenWrt
uses: actions/checkout@v4
- name: Update feeds - name: Update feeds
run: | run: |
@ -59,10 +51,8 @@ jobs:
- name: Generate configuration file - name: Generate configuration file
run: make defconfig run: make defconfig
- name: Make download - name: Download packages
run: | run: make download -j16
make download -j8
find dl -size -1024c -exec rm -f {} \;
- name: Compile firmware - name: Compile firmware
run: | run: |
@ -78,38 +68,26 @@ jobs:
- name: Prepare artifact - name: Prepare artifact
run: | run: |
mkdir -p ./artifact/firmware
mkdir -p ./artifact/package mkdir -p ./artifact/package
mkdir -p ./artifact/buildinfo mkdir -p ./artifact/buildinfo
rm -rf $(find ./bin/targets/ -type d -name "packages") rm -rf $(find ./bin/targets/ -type d -name "packages")
cp -rf $(find ./bin/targets/ -type f) ./artifact/firmware/
cp -rf $(find ./bin/packages/ -type f -name "*.ipk") ./artifact/package/ cp -rf $(find ./bin/packages/ -type f -name "*.ipk") ./artifact/package/
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: Deliver buildinfo - name: Upload buildinfo
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
with: with:
name: OpenWrt_buildinfo name: OpenWrt_buildinfo
path: ./artifact/buildinfo/ path: ./artifact/buildinfo/
- name: Deliver package - name: Upload package
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
with: with:
name: OpenWrt_package name: OpenWrt_package
path: ./artifact/package/ path: ./artifact/package/
- name: Deliver firmware - name: Upload firmware
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
with: with:
name: OpenWrt_firmware name: OpenWrt_firmware
path: ./bin/targets/ path: ./bin/targets/
- name: Upload release asset
if: github.event == 'release'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.YOURTOKEN }}
file: ./artifact/firmware/*
tag: ${{ github.ref }}
file_glob: true

View File

@ -2,10 +2,10 @@
# #
# Copyright (C) 2006-2013 OpenWrt.org # Copyright (C) 2006-2013 OpenWrt.org
mainmenu "OpenWrt Configuration" mainmenu "LEDE Configuration"
config MODULES config MODULES
option modules modules
bool bool
default y default y
@ -13,6 +13,14 @@ config HAVE_DOT_CONFIG
bool bool
default y default y
HOST_OS := $(shell, uname)
config HOST_OS_LINUX
def_bool $(shell, ./config/check-uname.sh Linux)
config HOST_OS_MACOS
def_bool $(shell, ./config/check-uname.sh Darwin)
source "target/Config.in" source "target/Config.in"
source "config/Config-images.in" source "config/Config-images.in"

View File

@ -10,12 +10,14 @@ 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 which -a pkg-config | grep -E '\/usr' | head -n 1) DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -e '/usr' -e '/nix/store' -m 1)
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
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)
ifneq ($(OPENWRT_BUILD),1) ifneq ($(OPENWRT_BUILD),1)
_SINGLE=export MAKEFLAGS=$(space); _SINGLE=export MAKEFLAGS=$(space);
@ -38,7 +40,10 @@ else
include tools/Makefile include tools/Makefile
include toolchain/Makefile include toolchain/Makefile
$(toolchain/stamp-compile): $(tools/stamp-compile) # Include the test suite Makefile if it exists
-include tests/Makefile
$(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)
$(package/stamp-install): $(package/stamp-compile) $(package/stamp-install): $(package/stamp-compile)
@ -50,14 +55,23 @@ printdb:
prepare: $(target/stamp-compile) prepare: $(target/stamp-compile)
clean: FORCE _clean: FORCE
rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(TOPDIR)/staging_dir/packages
dirclean: clean clean: _clean
rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN) rm -rf $(BUILD_LOG_DIR)
targetclean: _clean
rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN)
dirclean: targetclean clean
rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(BUILD_DIR_BASE)/host
rm -rf $(TMP_DIR) rm -rf $(TMP_DIR)
$(MAKE) -C $(TOPDIR)/scripts/config clean $(MAKE) -C $(TOPDIR)/scripts/config clean
toolchain_rebuild_check:
$(SCRIPT_DIR)/check-toolchain-clean.sh
cacheclean: cacheclean:
ifneq ($(CONFIG_CCACHE),) ifneq ($(CONFIG_CCACHE),)
$(STAGING_DIR_HOST)/bin/ccache -C $(STAGING_DIR_HOST)/bin/ccache -C

View File

@ -1,11 +1,25 @@
# 欢迎来到 Lean 的 Openwrt 源码仓库 # 欢迎来到 Lean 的 LEDE 源码仓库
如何编译自己需要的 OpenWrt 固件 [How to build your Openwrt 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 编译官方大群") 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)
## 注意 ## 注意
@ -15,7 +29,7 @@
## 编译命令 ## 编译命令
1. 首先装好 Linux 系统,推荐 Debian 11 或 Ubuntu LTS 1. 首先装好 Linux 系统,推荐 Debian 或 Ubuntu LTS
2. 安装编译依赖 2. 安装编译依赖
@ -23,11 +37,12 @@
sudo apt update -y sudo apt update -y
sudo apt full-upgrade -y sudo apt full-upgrade -y
sudo apt install -y ack antlr3 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 并选择配置
@ -48,7 +63,7 @@
make V=s -j1 make V=s -j1
``` ```
本套代码保证肯定可以编译成功。里面包括了 R22 所有源代码,包括 IPK 的。 本套代码保证肯定可以编译成功。里面包括了 R24 所有源代码,包括 IPK 的。
你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作! 你可以自由使用,但源码编译二次发布请注明我的 GitHub 仓库链接。谢谢合作!
@ -67,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` 前面加上:
@ -82,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
@ -89,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
@ -102,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
@ -112,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 "报名")
@ -125,23 +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. 方寸之间,尽是乐趣
(商品介绍页面 - 深圳市硬酷科技)
[Lean用户R1专属券](https://taoquan.taobao.com/coupon/unify_apply.htm?sellerId=1981117776&activityId=3eb8a2ad3c8945ed831b203f44dc218b)
[N5105下单链接](https://item.taobao.com/item.htm?ft=t&id=682987219699)
[N6005下单链接](https://item.taobao.com/item.htm?ft=t&id=682672722483)
(商品介绍页面 - 硬酷科技(支持花呗))
[Lean用户R1专属券](https://taoquan.taobao.com/coupon/unify_apply.htm?sellerId=2208215115814&activityId=e013790422b849edb3a71e4e6aa46ff3)
[下单链接](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.
@ -14,19 +13,27 @@ config EXPERIMENTAL
positive and negative). But do so only if you know how to positive and negative). But do so only if you know how to
recover your device in case of flashing potentially non-working recover your device in case of flashing potentially non-working
firmware. firmware.
If you plan to use this build in production, say NO! If you plan to use this build in production, say NO!
menu "Global build settings" menu "Global build settings"
config JSON_OVERVIEW_IMAGE_INFO config JSON_OVERVIEW_IMAGE_INFO
bool "Create JSON info file overview per target" bool "Create JSON info file overview per target"
default BUILDBOT default y
help help
Create a JSON info file called profiles.json in the target Create a JSON info file called profiles.json in the target
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 coruptions. 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,22 +155,44 @@ 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 IPV6 config USE_GC_SECTIONS
bool bool
prompt "Enable IPv6 support in packages" prompt "Dead code and data elimination for all packages (EXPERIMENTAL)"
default y
help help
Enables IPv6 support in kernel (builtin) and packages. 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
def_bool y
comment "Stripping options" comment "Stripping options"
choice choice
prompt "Binary stripping method" prompt "Binary stripping method"
default USE_STRIP if EXTERNAL_TOOLCHAIN
default USE_STRIP if USE_GLIBC default USE_STRIP if USE_GLIBC
default USE_SSTRIP default USE_SSTRIP
help help
@ -181,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
@ -198,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
@ -221,20 +248,6 @@ menu "Global build settings"
make the system libraries incompatible with most of the packages that are make the system libraries incompatible with most of the packages that are
not selected during the build process. not selected during the build process.
choice
prompt "Preferred standard C++ library"
default USE_LIBSTDCXX if USE_GLIBC
default USE_UCLIBCXX
help
Select the preferred standard C++ library for all packages that support this.
config USE_UCLIBCXX
bool "uClibc++"
config USE_LIBSTDCXX
bool "libstdc++"
endchoice
comment "Hardening build options" comment "Hardening build options"
config PKG_CHECK_FORMAT_SECURITY config PKG_CHECK_FORMAT_SECURITY
@ -283,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
@ -296,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
@ -390,4 +423,16 @@ menu "Global build settings"
endchoice endchoice
config SECCOMP
bool "Enable SECCOMP"
select KERNEL_SECCOMP
select PACKAGE_procd-seccomp
depends on (aarch64 || arm || armeb || mips || mipsel || mips64 || mips64el || i386 || powerpc || x86_64)
depends on !TARGET_uml
default y
help
This option enables seccomp kernel features to safely
execute untrusted bytecode and selects the seccomp-variants
of procd
endmenu endmenu

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
@ -17,6 +15,20 @@ menuconfig DEVEL
Store built firmware images and filesystem images in this directory. Store built firmware images and filesystem images in this directory.
If not set, uses './bin/$(BOARD)' If not set, uses './bin/$(BOARD)'
config DOWNLOAD_TOOL_CUSTOM
string "Use custom download tool" if DEVEL
default ""
help
Use and force custom download tool instead of relying on autoselection
between curl if available and wget as a fallback.
download.pl supports 3 tools officially aria2c, curl and wget.
If one of the tool is used in this config, download.pl will use the
default args to make use of them.
If the provided string is different than aria2c, curl or wget, the command
is used as is and the download url will be appended at the end of such command.
config DOWNLOAD_FOLDER config DOWNLOAD_FOLDER
string "Download folder" if DEVEL string "Download folder" if DEVEL
default "" default ""
@ -39,12 +51,17 @@ 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,
which does not have enough space to keep a complete build_dir. which does not have enough space to keep a complete build_dir.
config BUILD_ALL_HOST_TOOLS
bool "Compile all host tools" if DEVEL
help
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.
config BUILD_SUFFIX config BUILD_SUFFIX
string "Build suffix to append to the target BUILD_DIR variable" if DEVEL string "Build suffix to append to the target BUILD_DIR variable" if DEVEL
default "" default ""
@ -63,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/
@ -74,6 +90,11 @@ menuconfig DEVEL
Store ccache in this directory. Store ccache in this directory.
If not set, uses './.ccache' If not set, uses './.ccache'
config KERNEL_CFLAGS
string "Kernel extra CFLAGS" if DEVEL
default "-falign-functions=32" if TARGET_bcm53xx
default ""
config EXTERNAL_KERNEL_TREE config EXTERNAL_KERNEL_TREE
string "Use external kernel tree" if DEVEL string "Use external kernel tree" if DEVEL
default "" default ""

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
@ -37,18 +37,16 @@ menu "Target Images"
bool "lzma" bool "lzma"
config TARGET_INITRAMFS_COMPRESSION_LZO config TARGET_INITRAMFS_COMPRESSION_LZO
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
bool "lzo" bool "lzo"
config TARGET_INITRAMFS_COMPRESSION_LZ4 config TARGET_INITRAMFS_COMPRESSION_LZ4
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
bool "lz4" bool "lz4"
config TARGET_INITRAMFS_COMPRESSION_XZ config TARGET_INITRAMFS_COMPRESSION_XZ
bool "xz" bool "xz"
config TARGET_INITRAMFS_COMPRESSION_ZSTD config TARGET_INITRAMFS_COMPRESSION_ZSTD
depends on !LINUX_5_4 && !LINUX_4_19 depends on !LINUX_5_4
bool "zstd" bool "zstd"
endchoice endchoice
@ -152,14 +150,17 @@ menu "Target Images"
bool "squashfs" bool "squashfs"
default y if USES_SQUASHFS default y if USES_SQUASHFS
help help
Build a squashfs-lzma root filesystem. Build a squashfs root filesystem.
config TARGET_SQUASHFS_BLOCK_SIZE config TARGET_SQUASHFS_BLOCK_SIZE
int "Block size (in KiB)" int "Block size (in KiB)"
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
Select squashfs block size, must be one of:
4, 8, 16, 32, 64, 128, 256, 512, 1024
menuconfig TARGET_ROOTFS_UBIFS menuconfig TARGET_ROOTFS_UBIFS
bool "ubifs" bool "ubifs"
@ -197,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
@ -273,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
@ -286,25 +291,29 @@ 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 MB)" 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 64 if TARGET_rockchip default 128 if TARGET_armvirt
default 32 if TARGET_rockchip
default 16 default 16
config TARGET_ROOTFS_PARTSIZE config TARGET_ROOTFS_PARTSIZE
int "Root filesystem partition size (in MB)" int "Root filesystem partition size (in MiB)"
depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS || TARGET_omap || TARGET_sunxi || TARGET_uml depends on USES_ROOTFS_PART || TARGET_ROOTFS_EXT4FS
default 400 default 232 if TARGET_loongarch64
default 448 if TARGET_mediatek || TARGET_x86
default 160
help help
Select the root filesystem partition size. Select the root filesystem partition size.

View File

@ -24,11 +24,6 @@ config KERNEL_PRINTK
bool "Enable support for printk" bool "Enable support for printk"
default y default y
config KERNEL_CRASHLOG
bool "Crash logging"
depends on !(arm || powerpc || sparc || TARGET_uml || i386 || x86_64)
default y
config KERNEL_SWAP config KERNEL_SWAP
bool "Support for paging of anonymous memory (swap)" bool "Support for paging of anonymous memory (swap)"
default y if !SMALL_FLASH default y if !SMALL_FLASH
@ -48,17 +43,29 @@ config KERNEL_DEBUG_FS
config KERNEL_MIPS_FP_SUPPORT config KERNEL_MIPS_FP_SUPPORT
bool bool
default y default y if TARGET_pistachio
depends on (mips || mipsel || mips64 || mips64el)
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
@ -76,17 +83,22 @@ 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
as OProfile. as OProfile.
config KERNEL_RPI_AXIPERF
bool "Compile the kernel with RaspberryPi AXI Performance monitors"
default y
depends on KERNEL_PERF_EVENTS && TARGET_bcm27xx
config KERNEL_UBSAN config KERNEL_UBSAN
bool "Compile the kernel with undefined behaviour sanity checker" bool "Compile the kernel with undefined behaviour sanity checker"
help help
@ -115,6 +127,16 @@ config KERNEL_UBSAN_ALIGNMENT
Enabling this option on architectures that support unaligned Enabling this option on architectures that support unaligned
accesses may produce a lot of false positives. accesses may produce a lot of false positives.
config KERNEL_UBSAN_BOUNDS
bool "Perform array index bounds checking"
depends on KERNEL_UBSAN
help
This option enables detection of directly indexed out of bounds array
accesses, where the array size is known at compile time. Note that
this does not protect array overflows via bad calls to the
{str,mem}*cpy() family of functions (that is addressed by
FORTIFY_SOURCE).
config KERNEL_UBSAN_NULL config KERNEL_UBSAN_NULL
bool "Enable checking of null pointers" bool "Enable checking of null pointers"
depends on KERNEL_UBSAN depends on KERNEL_UBSAN
@ -122,10 +144,23 @@ config KERNEL_UBSAN_NULL
This option enables detection of memory accesses via a This option enables detection of memory accesses via a
null pointer. null pointer.
config KERNEL_UBSAN_TRAP
bool "On Sanitizer warnings, abort the running kernel code"
depends on KERNEL_UBSAN
help
Building kernels with Sanitizer features enabled tends to grow the
kernel size by around 5%, due to adding all the debugging text on
failure paths. To avoid this, Sanitizer instrumentation can just
issue a trap. This reduces the kernel size overhead but turns all
warnings (including potentially harmless conditions) into full
exceptions that abort the running kernel code (regardless of context,
locks held, etc), which may destabilize the system. For some system
builders this is an acceptable trade-off.
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.
@ -138,20 +173,91 @@ 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 config KERNEL_KASAN_VMALLOC
bool "KAsan: extra checks" bool "Back mappings in vmalloc space with real shadow memory"
depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL depends on KERNEL_KASAN
help help
This enables further checks in the kernel address sanitizer, for now By default, the shadow region for vmalloc space is the read-only
it only includes the address-use-after-scope check that can lead zero page. This means that KASAN cannot detect errors involving
to excessive kernel stack usage, frame size warnings and longer vmalloc space.
compile time.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
Enabling this option will hook in to vmap/vmalloc and back those
mappings with real shadow memory allocated on demand. This allows
for KASAN to detect more sorts of errors (and to support vmapped
stacks), but at the cost of higher memory usage.
This option depends on HAVE_ARCH_KASAN_VMALLOC, but we can't
depend on that in here, so it is possible that enabling this
will have no effect.
if KERNEL_KASAN
choice
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
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
@ -209,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
@ -228,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
@ -237,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"
@ -303,9 +420,21 @@ config KERNEL_PREEMPT_TRACER
enabled. This option and the irqs-off timing option can be enabled. This option and the irqs-off timing option can be
used together or separately.) used together or separately.)
config KERNEL_HIST_TRIGGERS
bool "Histogram triggers"
depends on KERNEL_FTRACE
help
Hist triggers allow one or more arbitrary trace event fields to be
aggregated into hash tables and dumped to stdout by reading a
debugfs/tracefs file. They're useful for gathering quick and dirty
(though precise) summaries of event activity as an initial guide for
further investigation using more advanced tools.
Inter-event tracing of quantities such as latencies is also
supported using hist triggers under this option.
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"
@ -314,6 +443,61 @@ config KERNEL_DEBUG_INFO
help help
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
bool "Enable additional BTF type information"
depends on !HOST_OS_MACOS
depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
select DWARVES
help
Generate BPF Type Format (BTF) information from DWARF debug info.
Turning this on expects presence of pahole tool, which will convert
DWARF type info into equivalent deduplicated BTF type info.
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
bool "Reduce debugging information"
default y
depends on KERNEL_DEBUG_INFO
help
If you say Y here gcc is instructed to generate less debugging
information for structure types. This means that tools that
need full debugging information (like kgdb or systemtap) won't
be happy. But if you merely need debugging information to
resolve line numbers there is no loss. Advantage is that
build directory object sizes shrink dramatically over a full
DEBUG_INFO build and compile times are reduced too.
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
@ -327,10 +511,16 @@ config KERNEL_DEBUG_LL
help help
ARM low level debugging. ARM low level debugging.
config KERNEL_DEBUG_VIRTUAL
bool "Compile the kernel with VM translations debugging"
select KERNEL_DEBUG_KERNEL
help
Enable checks sanity checks to catch invalid uses of
virt_to_phys()/phys_to_virt() against the non-linear address space.
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
@ -342,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
@ -353,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
@ -368,13 +556,32 @@ config KERNEL_KPROBE_EVENTS
bool bool
default y if KERNEL_KPROBES default y if KERNEL_KPROBES
config KERNEL_BPF_EVENTS
bool "Compile the kernel with BPF event support"
select KERNEL_KPROBES
help
Allows to attach BPF programs to kprobe, uprobe and tracepoint events.
This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY
for sending data from BPF programs to user-space for post-processing
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
bool
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"
default y if !SMALL_FLASH default y if !SMALL_FLASH
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"
@ -386,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
@ -410,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"
@ -435,36 +640,35 @@ 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_LOCKUP_DETECTOR config KERNEL_SOFTLOCKUP_DETECTOR
bool "Compile the kernel with detect Hard and Soft Lockups" bool "Compile the kernel with detect Soft Lockups"
depends on KERNEL_DEBUG_KERNEL depends on KERNEL_DEBUG_KERNEL
help help
Say Y here to enable the kernel to act as a watchdog to detect Say Y here to enable the kernel to act as a watchdog to detect
hard and soft lockups. soft lockups.
Softlockups are bugs that cause the kernel to loop in kernel Softlockups are bugs that cause the kernel to loop in kernel
mode for more than 20 seconds, without giving other tasks a mode for more than 20 seconds, without giving other tasks a
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 Hardlockups are bugs that cause the CPU to loop in kernel mode
for more than 10 seconds, without letting other interrupts have a for more than 10 seconds, without letting other interrupts have a
chance to run. The current stack trace is displayed upon detection chance to run. The current stack trace is displayed upon detection
and the system will stay locked up. and the system will stay locked up.
The overhead should be minimal. A periodic hrtimer runs to
generate interrupts and kick the watchdog task every 4 seconds.
An NMI is generated every 10 seconds or so to check for hardlockups.
The frequency of hrtimer and NMI events and the soft and hard lockup
thresholds can be controlled through the sysctl watchdog_thresh.
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
default KERNEL_LOCKUP_DETECTOR default KERNEL_SOFTLOCKUP_DETECTOR
help help
Say Y here to enable the kernel to detect "hung tasks", Say Y here to enable the kernel to detect "hung tasks",
which are bugs that cause the task to be stuck in which are bugs that cause the task to be stuck in
@ -510,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
@ -549,11 +766,9 @@ config USE_RFKILL
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
@ -563,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
@ -574,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
@ -598,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
@ -609,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
@ -619,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.
@ -627,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
@ -654,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
@ -681,7 +898,7 @@ if KERNEL_CGROUPS
bool "Memory Resource Controller for Control Groups" bool "Memory Resource Controller for Control Groups"
default y default y
select KERNEL_FREEZER select KERNEL_FREEZER
depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18 depends on KERNEL_RESOURCE_COUNTERS
help help
Provides a memory resource controller that manages both anonymous Provides a memory resource controller that manages both anonymous
memory and page cache. (See Documentation/cgroups/memory.txt) memory and page cache. (See Documentation/cgroups/memory.txt)
@ -722,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
@ -748,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
@ -828,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
@ -836,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
@ -944,6 +1170,19 @@ config KERNEL_IP_MROUTE
Multicast routing requires a multicast routing daemon in Multicast routing requires a multicast routing daemon in
addition to kernel support. addition to kernel support.
if KERNEL_IP_MROUTE
config KERNEL_IP_MROUTE_MULTIPLE_TABLES
def_bool y
config KERNEL_IP_PIMSM_V1
def_bool y
config KERNEL_IP_PIMSM_V2
def_bool y
endif
# #
# IPv6 configuration # IPv6 configuration
# #
@ -966,8 +1205,15 @@ if KERNEL_IPV6
Multicast routing requires a multicast routing daemon in Multicast routing requires a multicast routing daemon in
addition to kernel support. addition to kernel support.
config KERNEL_IPV6_PIMSM_V2 if KERNEL_IPV6_MROUTE
def_bool n
config KERNEL_IPV6_MROUTE_MULTIPLE_TABLES
def_bool y
config KERNEL_IPV6_PIMSM_V2
def_bool y
endif
config KERNEL_IPV6_SEG6_LWTUNNEL config KERNEL_IPV6_SEG6_LWTUNNEL
bool "Enable support for lightweight tunnels" bool "Enable support for lightweight tunnels"
@ -980,6 +1226,45 @@ if KERNEL_IPV6
endif endif
#
# Miscellaneous network configuration
#
config KERNEL_NET_L3_MASTER_DEV
bool "L3 Master device support"
default y if !SMALL_FLASH
help
This module provides glue between core networking code and device
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
def_bool n
config KERNEL_PAGE_POOL_STATS
bool "Page pool stats support"
depends on KERNEL_PAGE_POOL
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
# #
@ -1014,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).
@ -1042,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"
@ -1075,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"
@ -1125,7 +1413,7 @@ config KERNEL_SQUASHFS_XATTR
bool "Squashfs XATTR support" bool "Squashfs XATTR support"
# #
# compile optimiziation setting # compile optimization setting
# #
choice choice
prompt "Compiler optimization level" prompt "Compiler optimization level"
@ -1192,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

1
config/check-uname.sh Executable file
View File

@ -0,0 +1 @@
[ "$(uname)" = "$1" ] && echo y || echo n

BIN
doc/h68k.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 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,10 @@
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 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
#src-git targets https://github.com/openwrt/targets.git #src-git targets https://github.com/openwrt/targets.git
#src-git oldpackages http://git.openwrt.org/packages.git #src-git oldpackages http://git.openwrt.org/packages.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
@ -35,7 +36,7 @@ define autoreconf
$(patsubst %,rm -f %;,$(2)) \ $(patsubst %,rm -f %;,$(2)) \
$(foreach p,$(3), \ $(foreach p,$(3), \
if [ -f $(p)/configure.ac ] || [ -f $(p)/configure.in ]; then \ if [ -f $(p)/configure.ac ] || [ -f $(p)/configure.in ]; then \
[ -d $(p)/autom4te.cache ] && rm -rf autom4te.cache; \ [ -d $(p)/autom4te.cache ] && rm -rf $(p)/autom4te.cache; \
[ -e $(p)/config.rpath ] || \ [ -e $(p)/config.rpath ] || \
ln -s $(SCRIPT_DIR)/config.rpath $(p)/config.rpath; \ ln -s $(SCRIPT_DIR)/config.rpath $(p)/config.rpath; \
touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; \ touch NEWS AUTHORS COPYING ABOUT-NLS ChangeLog; \
@ -113,7 +114,7 @@ ifneq ($(filter patch-libtool,$(PKG_FIXUP)),)
endif endif
ifneq ($(filter libtool,$(PKG_FIXUP)),) ifneq ($(filter libtool,$(PKG_FIXUP)),)
PKG_BUILD_DEPENDS += libtool gettext libiconv PKG_BUILD_DEPENDS += libtool
ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),) ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
Hooks/Configure/Pre += autoreconf_target Hooks/Configure/Pre += autoreconf_target
endif endif
@ -124,7 +125,7 @@ ifneq ($(filter libtool-abiver,$(PKG_FIXUP)),)
endif endif
ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),) ifneq ($(filter libtool-ucxx,$(PKG_FIXUP)),)
PKG_BUILD_DEPENDS += libtool gettext libiconv PKG_BUILD_DEPENDS += libtool
ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),) ifeq ($(filter no-autoreconf,$(PKG_FIXUP)),)
Hooks/Configure/Pre += autoreconf_target Hooks/Configure/Pre += autoreconf_target
endif endif

View File

@ -63,13 +63,15 @@ BPF_CFLAGS := \
-Wno-unused-label \ -Wno-unused-label \
-O2 -emit-llvm -Xclang -disable-llvm-passes -O2 -emit-llvm -Xclang -disable-llvm-passes
ifeq ($(DUMP),) ifneq ($(CONFIG_HAS_BPF_TOOLCHAIN),)
ifeq ($(DUMP)$(filter download refresh,$(MAKECMDGOALS)),)
CLANG_VER:=$(shell $(CLANG) -dM -E - < /dev/null | grep __clang_major__ | cut -d' ' -f3) CLANG_VER:=$(shell $(CLANG) -dM -E - < /dev/null | grep __clang_major__ | cut -d' ' -f3)
CLANG_VER_VALID:=$(shell [ "$(CLANG_VER)" -ge "$(CLANG_MIN_VER)" ] && echo 1 ) CLANG_VER_VALID:=$(shell [ "$(CLANG_VER)" -ge "$(CLANG_MIN_VER)" ] && echo 1 )
ifeq ($(CLANG_VER_VALID),) ifeq ($(CLANG_VER_VALID),)
$(error ERROR: LLVM/clang version too old. Minimum required: $(CLANG_MIN_VER), found: $(CLANG_VER)) $(error ERROR: LLVM/clang version too old. Minimum required: $(CLANG_MIN_VER), found: $(CLANG_VER))
endif endif
endif endif
endif
define CompileBPF define CompileBPF
$(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \ $(CLANG) -g -target $(BPF_ARCH)-linux-gnu $(BPF_CFLAGS) $(2) \

View File

@ -52,7 +52,7 @@ CMAKE_RANLIB:=$(call cmake_tool,$(TARGET_RANLIB))
CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT)) CMAKE_FIND_ROOT_PATH:=$(STAGING_DIR)/usr;$(TOOLCHAIN_DIR)$(if $(CONFIG_EXTERNAL_TOOLCHAIN),;$(CONFIG_TOOLCHAIN_ROOT))
CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST) CMAKE_HOST_FIND_ROOT_PATH:=$(STAGING_DIR)/host;$(STAGING_DIR_HOSTPKG);$(STAGING_DIR_HOST)
CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions CMAKE_SHARED_LDFLAGS:=-Wl,-Bsymbolic-functions
CMAKE_HOST_INSTALL_PREFIX ?= $(HOST_BUILD_PREFIX) CMAKE_HOST_INSTALL_PREFIX = $(HOST_BUILD_PREFIX)
ifeq ($(HOST_USE_NINJA),1) ifeq ($(HOST_USE_NINJA),1)
CMAKE_HOST_OPTIONS += -DCMAKE_GENERATOR="Ninja" CMAKE_HOST_OPTIONS += -DCMAKE_GENERATOR="Ninja"

View File

@ -12,6 +12,7 @@
DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*" DEP_FINDPARAMS := -x "*/.svn*" -x ".*" -x "*:*" -x "*\!*" -x "* *" -x "*\\\#*" -x "*/.*_check" -x "*/.*.swp" -x "*/.pkgdir*"
find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | $(MKHASH) md5 find_md5=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -printf "%p%T@\n" | sort | $(MKHASH) md5
find_md5_reproducible=find $(wildcard $(1)) -type f $(patsubst -x,-and -not -path,$(DEP_FINDPARAMS) $(2)) -print0 | xargs -0 $(MKHASH) md5 | sort | $(MKHASH) md5
define rdep define rdep
.PRECIOUS: $(2) .PRECIOUS: $(2)
@ -27,7 +28,7 @@ ifneq ($(wildcard $(2)),)
{ [ \! -f "$(3)" ] || diff $(3) $(3).1 >/dev/null; } && \ { [ \! -f "$(3)" ] || diff $(3) $(3).1 >/dev/null; } && \
) \ ) \
{ \ { \
[ -f "$(2)_check.1" ] && mv "$(2)_check.1"; \ [ -f "$(2)_check.1" ] && mv "$(2)_check.1" "$(2)_check"; \
$(TOPDIR)/scripts/timestamp.pl $(DEP_FINDPARAMS) $(4) -n $(2) $(1) && { \ $(TOPDIR)/scripts/timestamp.pl $(DEP_FINDPARAMS) $(4) -n $(2) $(1) && { \
$(call debug_eval,$(SUBDIR),r,echo "No need to rebuild $(2)";) \ $(call debug_eval,$(SUBDIR),r,echo "No need to rebuild $(2)";) \
touch -r "$(2)" "$(2)_check"; \ touch -r "$(2)" "$(2)_check"; \

View File

@ -18,6 +18,10 @@ endif
DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED) DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)
# Export options for download.pl
export DOWNLOAD_CHECK_CERTIFICATE:=$(CONFIG_DOWNLOAD_CHECK_CERTIFICATE)
export DOWNLOAD_TOOL_CUSTOM:=$(CONFIG_DOWNLOAD_TOOL_CUSTOM)
define dl_method_git define dl_method_git
$(if $(filter https://github.com/% git://github.com/%,$(1)),github_archive,git) $(if $(filter https://github.com/% git://github.com/%,$(1)),github_archive,git)
endef endef
@ -59,6 +63,21 @@ define dl_tar_pack
$$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | $(call dl_pack,$(1)) $$$${TAR_TIMESTAMP:+--mtime="$$$$TAR_TIMESTAMP"} -c $(2) | $(call dl_pack,$(1))
endef endef
gen_sha256sum = $(shell $(MKHASH) sha256 $(DL_DIR)/$(1))
# Used in Build/CoreTargets and HostBuild/Core as an integrity check for
# downloaded files. It will add a FORCE rule if the sha256 hash does not
# match, so that the download can be more thoroughly handled by download.pl.
define check_download_integrity
expected_hash:=$(strip $(if $(filter-out x,$(HASH)),$(HASH),$(MIRROR_HASH)))
$$(if $$(and $(FILE),$$(wildcard $(DL_DIR)/$(FILE)), \
$$(filter undefined,$$(flavor DownloadChecked/$(FILE)))), \
$$(eval DownloadChecked/$(FILE):=1) \
$$(if $$(filter-out $$(call gen_sha256sum,$(FILE)),$$(expected_hash)), \
$(DL_DIR)/$(FILE): FORCE) \
)
endef
ifdef CHECK ifdef CHECK
check_escape=$(subst ','\'',$(1)) check_escape=$(subst ','\'',$(1))
#') #')
@ -74,8 +93,6 @@ else
check_warn = $(if $(filter-out undefined,$(origin F_$(1))),$(filter ,$(shell $(call F_$(1),$(2),$(3),$(4)) >&2)),$(check_warn_nofix)) check_warn = $(if $(filter-out undefined,$(origin F_$(1))),$(filter ,$(shell $(call F_$(1),$(2),$(3),$(4)) >&2)),$(check_warn_nofix))
endif endif
gen_sha256sum = $(shell $(MKHASH) sha256 $(DL_DIR)/$(1))
ifdef FIXUP ifdef FIXUP
F_hash_deprecated = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile fix-hash $(3) $(call gen_sha256sum,$(1)) $(2) F_hash_deprecated = $(SCRIPT_DIR)/fixup-makefile.pl $(CURDIR)/Makefile fix-hash $(3) $(call gen_sha256sum,$(1)) $(2)
F_hash_mismatch = $(F_hash_deprecated) F_hash_mismatch = $(F_hash_deprecated)

View File

@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/depends.mk
include $(INCLUDE_DIR)/quilt.mk include $(INCLUDE_DIR)/quilt.mk
BUILD_TYPES += host BUILD_TYPES += host
HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS))) HOST_STAMP_PREPARED=$(HOST_BUILD_DIR)/.prepared$(if $(HOST_QUILT)$(DUMP),,$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(HOST_PREPARED_DEPENDS)))
HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST)) HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
@ -34,23 +34,31 @@ 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)" \
CXX="$(HOSTCXX)" \ CXX="$(HOSTCXX)" \
CPPFLAGS="$(HOST_CPPFLAGS)" \ CPPFLAGS="$(HOST_CPPFLAGS)" \
CXXFLAGS="$(HOST_CXXFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)" \ LDFLAGS="$(HOST_LDFLAGS)" \
CONFIG_SHELL="$(SHELL)" CONFIG_SHELL="$(SHELL)"
@ -108,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
@ -180,7 +192,7 @@ ifndef DUMP
clean-build: host-clean-build clean-build: host-clean-build
endif endif
$(DL_DIR)/$(FILE): FORCE $(call check_download_integrity)
$(_host_target)host-prepare: $(HOST_STAMP_PREPARED) $(_host_target)host-prepare: $(HOST_STAMP_PREPARED)
$(_host_target)host-configure: $(HOST_STAMP_CONFIGURED) $(_host_target)host-configure: $(HOST_STAMP_CONFIGURED)
@ -197,13 +209,17 @@ ifndef DUMP
ifneq ($(CONFIG_AUTOREMOVE),) ifneq ($(CONFIG_AUTOREMOVE),)
host-compile: host-compile:
$(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' | \ $(FIND) $(HOST_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -print0 | \
$(XARGS) rm -rf $(XARGS) -0 rm -rf
endif endif
endef endef
endif endif
define HostBuild define HostBuild
$(HostBuild/Core) $(HostBuild/Core)
$(if $(if $(PKG_HOST_ONLY),,$(STAMP_PREPARED)),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default))) $(if $(if $(PKG_HOST_ONLY),,$(if $(and $(filter host-%,$(MAKECMDGOALS)),$(PKG_SKIP_DOWNLOAD)),,$(STAMP_PREPARED))),,
$(if $(and $(CONFIG_AUTOREMOVE), $(wildcard $(HOST_STAMP_INSTALLED), $(wildcard $(HOST_STAMP_BUILT)))),,
$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default))
)
)
endef endef

View File

@ -4,7 +4,7 @@ IMAGE_KERNEL = $(word 1,$^)
IMAGE_ROOTFS = $(word 2,$^) IMAGE_ROOTFS = $(word 2,$^)
define ModelNameLimit16 define ModelNameLimit16
$(shell expr substr "$(word 2, $(subst _, ,$(1)))" 1 16) $(shell printf %.16s "$(word 2, $(subst _, ,$(1)))")
endef endef
define rootfs_align define rootfs_align
@ -27,8 +27,21 @@ define Build/append-kernel
dd if=$(IMAGE_KERNEL) >> $@ dd if=$(IMAGE_KERNEL) >> $@
endef endef
define Build/package-kernel-ubifs
mkdir $@.kernelubifs
cp $@ $@.kernelubifs/kernel
$(STAGING_DIR_HOST)/bin/mkfs.ubifs \
$(KERNEL_UBIFS_OPTS) \
-r $@.kernelubifs $@
rm -r $@.kernelubifs
endef
define Build/append-image define Build/append-image
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) >> $@ cp "$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)" "$@.stripmeta"
fwtool -s /dev/null -t "$@.stripmeta" || :
fwtool -i /dev/null -t "$@.stripmeta" || :
dd if="$@.stripmeta" >> "$@"
rm "$@.stripmeta"
endef endef
ifdef IB ifdef IB
@ -37,8 +50,13 @@ define Build/append-image-stage
endef endef
else else
define Build/append-image-stage define Build/append-image-stage
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) of=$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1) cp "$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)" "$@.stripmeta"
dd if=$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) >> $@ fwtool -s /dev/null -t "$@.stripmeta" || :
fwtool -i /dev/null -t "$@.stripmeta" || :
mkdir -p "$(STAGING_DIR_IMAGE)"
dd if="$@.stripmeta" of="$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1)"
dd if="$@.stripmeta" >> "$@"
rm "$@.stripmeta"
endef endef
endif endif
@ -72,6 +90,7 @@ metadata_json = \
define Build/append-metadata define Build/append-metadata
$(if $(SUPPORTED_DEVICES),-echo $(call metadata_json) | fwtool -I - $@) $(if $(SUPPORTED_DEVICES),-echo $(call metadata_json) | fwtool -I - $@)
sha256sum "$@" | cut -d" " -f1 > "$@.sha256sum"
[ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \ [ ! -s "$(BUILD_KEY)" -o ! -s "$(BUILD_KEY).ucert" -o ! -s "$@" ] || { \
cp "$(BUILD_KEY).ucert" "$@.ucert" ;\ cp "$(BUILD_KEY).ucert" "$@.ucert" ;\
usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\ usign -S -m "$@" -s "$(BUILD_KEY)" -x "$@.sig" ;\
@ -94,6 +113,15 @@ define Build/append-squashfs-fakeroot-be
cat $@.fakesquashfs >> $@ cat $@.fakesquashfs >> $@
endef endef
define Build/append-squashfs4-fakeroot
rm -rf $@.fakefs $@.fakesquashfs
mkdir $@.fakefs
$(STAGING_DIR_HOST)/bin/mksquashfs4 \
$@.fakefs $@.fakesquashfs \
-nopad -noappend -root-owned
cat $@.fakesquashfs >> $@
endef
define Build/append-string define Build/append-string
echo -n $(1) >> $@ echo -n $(1) >> $@
endef endef
@ -103,7 +131,7 @@ define Build/append-ubi
$(if $(UBOOTENV_IN_UBI),--uboot-env) \ $(if $(UBOOTENV_IN_UBI),--uboot-env) \
$(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \ $(if $(KERNEL_IN_UBI),--kernel $(IMAGE_KERNEL)) \
$(foreach part,$(UBINIZE_PARTS),--part $(part)) \ $(foreach part,$(UBINIZE_PARTS),--part $(part)) \
$(IMAGE_ROOTFS) \ --rootfs $(IMAGE_ROOTFS) \
$@.tmp \ $@.tmp \
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \ -p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \ $(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
@ -113,6 +141,18 @@ define Build/append-ubi
rm $@.tmp rm $@.tmp
endef endef
define Build/ubinize-kernel
cp $@ $@.tmp
sh $(TOPDIR)/scripts/ubinize-image.sh \
--kernel $@.tmp \
$@ \
-p $(BLOCKSIZE:%k=%KiB) -m $(PAGESIZE) \
$(if $(SUBPAGESIZE),-s $(SUBPAGESIZE)) \
$(if $(VID_HDR_OFFSET),-O $(VID_HDR_OFFSET)) \
$(UBINIZE_OPTS)
rm $@.tmp
endef
define Build/append-uboot define Build/append-uboot
dd if=$(UBOOT_PATH) >> $@ dd if=$(UBOOT_PATH) >> $@
endef endef
@ -170,11 +210,20 @@ define Build/check-size
@imagesize="$$(stat -c%s $@)"; \ @imagesize="$$(stat -c%s $@)"; \
limitsize="$$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE))))))"; \ limitsize="$$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE))))))"; \
[ $$limitsize -ge $$imagesize ] || { \ [ $$limitsize -ge $$imagesize ] || { \
echo "WARNING: Image file $@ is too big: $$imagesize > $$limitsize" >&2; \ $(call ERROR_MESSAGE, WARNING: Image file $@ is too big: $$imagesize > $$limitsize); \
rm -f $@; \ rm -f $@; \
} }
endef endef
define Build/copy-file
cat "$(1)" > "$@"
endef
define Build/edimax-header
$(STAGING_DIR_HOST)/bin/mkedimaximg -i $@ -o $@.new $(1)
@mv $@.new $@
endef
define Build/elecom-product-header define Build/elecom-product-header
$(eval product=$(word 1,$(1))) $(eval product=$(word 1,$(1)))
$(eval fw=$(if $(word 2,$(1)),$(word 2,$(1)),$@)) $(eval fw=$(if $(word 2,$(1)),$(word 2,$(1)),$@))
@ -187,6 +236,19 @@ define Build/elecom-product-header
mv $(fw).new $(fw) mv $(fw).new $(fw)
endef endef
define Build/elecom-wrc-gs-factory
$(eval product=$(word 1,$(1)))
$(eval version=$(word 2,$(1)))
$(eval hash_opt=$(word 3,$(1)))
$(MKHASH) md5 $(hash_opt) $@ >> $@
( \
echo -n "ELECOM $(product) v$(version)" | \
dd bs=32 count=1 conv=sync; \
dd if=$@; \
) > $@.new
mv $@.new $@
endef
define Build/elx-header define Build/elx-header
$(eval hw_id=$(word 1,$(1))) $(eval hw_id=$(word 1,$(1)))
$(eval xor_pattern=$(word 2,$(1))) $(eval xor_pattern=$(word 2,$(1)))
@ -215,7 +277,9 @@ endef
define Build/initrd_compression define Build/initrd_compression
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),.bzip2) \ $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),.bzip2) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),.gzip) \ $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),.gzip) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),.lz4) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),.lzma) \ $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),.lzma) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),.lzo) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),.xz) \ $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),.xz) \
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),.zstd) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),.zstd)
endef endef
@ -223,16 +287,20 @@ endef
define Build/fit define Build/fit
$(TOPDIR)/scripts/mkits.sh \ $(TOPDIR)/scripts/mkits.sh \
-D $(DEVICE_NAME) -o $@.its -k $@ \ -D $(DEVICE_NAME) -o $@.its -k $@ \
-C $(word 1,$(1)) $(if $(word 2,$(1)),\ -C $(word 1,$(1)) \
$(if $(DEVICE_DTS_OVERLAY),-d $(KERNEL_BUILD_DIR)/image-$$(basename $(word 2,$(1))),\ $(if $(word 2,$(1)),\
-d $(word 2,$(1)))) \ $(if $(findstring 11,$(if $(DEVICE_DTS_OVERLAY),1)$(if $(findstring $(KERNEL_BUILD_DIR)/image-,$(word 2,$(1))),,1)), \
-d $(KERNEL_BUILD_DIR)/image-$$(basename $(word 2,$(1))), \
-d $(word 2,$(1)))) \
$(if $(findstring with-rootfs,$(word 3,$(1))),-r $(IMAGE_ROOTFS)) \ $(if $(findstring with-rootfs,$(word 3,$(1))),-r $(IMAGE_ROOTFS)) \
$(if $(findstring with-initrd,$(word 3,$(1))), \ $(if $(findstring with-initrd,$(word 3,$(1))), \
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE), \ $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE), \
-i $(KERNEL_BUILD_DIR)/initrd.cpio$(strip $(call Build/initrd_compression)))) \ -i $(KERNEL_BUILD_DIR)/initrd.cpio$(strip $(call Build/initrd_compression)))) \
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \ -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \ $(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
$(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtb)) \ $(if $(DEVICE_DTS_DELIMITER),-l $(DEVICE_DTS_DELIMITER)) \
$(if $(DEVICE_DTS_LOADADDR),-s $(DEVICE_DTS_LOADADDR)) \
$(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))),\
@ -240,11 +308,25 @@ define Build/fit
@mv $@.new $@ @mv $@.new $@
endef endef
define Build/gzip define Build/libdeflate-gzip
gzip -f -9n -c $@ $(1) > $@.new $(STAGING_DIR_HOST)/bin/libdeflate-gzip -f -12 -c $@ $(1) > $@.new
@mv $@.new $@ @mv $@.new $@
endef endef
define Build/gzip
$(STAGING_DIR_HOST)/bin/gzip -f -9n -c $@ $(1) > $@.new
@mv $@.new $@
endef
define Build/gzip-filename
@mkdir -p $@.tmp
@cp $@ $@.tmp/$(word 1,$(1))
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $@.tmp/$(word 1,$(1)) $(word 2,$(1)))
$(STAGING_DIR_HOST)/bin/gzip -f -9 -N -c $@.tmp/$(word 1,$(1)) $(word 2,$(1)) > $@.new
@mv $@.new $@
@rm -rf $@.tmp
endef
define Build/install-dtb define Build/install-dtb
$(call locked, \ $(call locked, \
$(foreach dts,$(DEVICE_DTS), \ $(foreach dts,$(DEVICE_DTS), \
@ -256,6 +338,16 @@ define Build/install-dtb
) )
endef endef
define Build/iptime-crc32
$(STAGING_DIR_HOST)/bin/iptime-crc32 $(1) $@ $@.new
mv $@.new $@
endef
define Build/iptime-naspkg
$(STAGING_DIR_HOST)/bin/iptime-naspkg $(1) $@ $@.new
mv $@.new $@
endef
define Build/jffs2 define Build/jffs2
rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 && \ rm -rf $(KDIR_TMP)/$(DEVICE_NAME)/jffs2 && \
mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1)) && \ mkdir -p $(KDIR_TMP)/$(DEVICE_NAME)/jffs2/$$(dirname $(1)) && \
@ -318,6 +410,19 @@ define Build/netgear-dni
mv $@.new $@ mv $@.new $@
endef endef
define Build/netgear-encrypted-factory
$(TOPDIR)/scripts/netgear-encrypted-factory.py \
--input-file $@ \
--output-file $@ \
--model $(NETGEAR_ENC_MODEL) \
--region $(NETGEAR_ENC_REGION) \
--version V1.0.0.0.$(VERSION_DIST).$(firstword $(subst -, ,$(REVISION))) \
--encryption-block-size 0x20000 \
--openssl-bin "$(STAGING_DIR_HOST)/bin/openssl" \
--key 6865392d342b4d212964363d6d7e7765312c7132613364316e26322a5a5e2538 \
--iv 4a253169516c38243d6c6d2d3b384145
endef
define Build/openmesh-image define Build/openmesh-image
$(TOPDIR)/scripts/om-fwupgradecfg-gen.sh \ $(TOPDIR)/scripts/om-fwupgradecfg-gen.sh \
"$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" \ "$(call param_get_default,ce_type,$(1),$(DEVICE_NAME))" \
@ -370,16 +475,16 @@ define Build/qemu-image
fi fi
endef endef
define Build/qsdk-ipq-factory-mmc define Build/qsdk-ipq-factory-nand
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \ $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
$@.its kernel $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS) $@.its ubi $@
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
@mv $@.new $@ @mv $@.new $@
endef endef
define Build/qsdk-ipq-factory-nand define Build/qsdk-ipq-factory-mmc
$(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \ $(TOPDIR)/scripts/mkits-qsdk-ipq-image.sh \
$@.its ubi $@ $@.its kernel $(IMAGE_KERNEL) rootfs $(IMAGE_ROOTFS)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $@.its $@.new
@mv $@.new $@ @mv $@.new $@
endef endef
@ -476,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 \
@ -496,12 +602,12 @@ define Build/xor-image
endef endef
define Build/zip define Build/zip
rm -rf $@.tmp
mkdir $@.tmp mkdir $@.tmp
mv $@ $@.tmp/$(1) mv $@ $@.tmp/$(word 1,$(1))
TZ=UTC $(STAGING_DIR_HOST)/bin/zip -j -X \
zip -j -X \ $(wordlist 2,$(words $(1)),$(1)) \
$(if $(SOURCE_DATE_EPOCH),--mtime="$(SOURCE_DATE_EPOCH)") \ $@ $@.tmp/$(if $(word 1,$(1)),$(word 1,$(1)),$$(basename $@))
$@ $@.tmp/$(if $(1),$(1),$@)
rm -rf $@.tmp rm -rf $@.tmp
endef endef

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
@ -137,14 +137,6 @@ define Image/BuildKernel/MkuImage
-n '$(call toupper,$(ARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(4) $(5) -n '$(call toupper,$(ARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' -d $(4) $(5)
endef endef
define Image/BuildKernel/MkFIT
$(TOPDIR)/scripts/mkits.sh \
-D $(1) -o $(KDIR)/fit-$(1).its -k $(2) $(if $(3),-d $(3)) -C $(4) -a $(5) -e $(6) \
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage -f $(KDIR)/fit-$(1).its $(KDIR)/fit-$(1)$(7).itb
endef
ifdef CONFIG_TARGET_IMAGES_GZIP ifdef CONFIG_TARGET_IMAGES_GZIP
define Image/Gzip define Image/Gzip
rm -f $(1).gz rm -f $(1).gz
@ -154,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 \
@ -167,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)
@ -182,20 +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) \
-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) \
@ -229,8 +234,7 @@ $(eval $(foreach S,$(NAND_BLOCKSIZE),$(call Image/mkfs/jffs2-nand/template,$(S))
define Image/mkfs/squashfs-common define Image/mkfs/squashfs-common
$(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \ $(STAGING_DIR_HOST)/bin/mksquashfs4 $(call mkfs_target_dir,$(1)) $@ \
-nopad -noappend -root-owned \ -nopad -noappend -root-owned \
-comp $(SQUASHFSCOMP) $(SQUASHFSOPT) \ -comp $(SQUASHFSCOMP) $(SQUASHFSOPT)
-processors $(shell nproc)
endef endef
ifeq ($(CONFIG_TARGET_ROOTFS_SECURITY_LABELS),y) ifeq ($(CONFIG_TARGET_ROOTFS_SECURITY_LABELS),y)
@ -341,6 +345,8 @@ define Device/InitProfile
DEVICE_ALT0_TITLE = $$(DEVICE_ALT0_VENDOR) $$(DEVICE_ALT0_MODEL)$$(if $$(DEVICE_ALT0_VARIANT), $$(DEVICE_ALT0_VARIANT)) DEVICE_ALT0_TITLE = $$(DEVICE_ALT0_VENDOR) $$(DEVICE_ALT0_MODEL)$$(if $$(DEVICE_ALT0_VARIANT), $$(DEVICE_ALT0_VARIANT))
DEVICE_ALT1_TITLE = $$(DEVICE_ALT1_VENDOR) $$(DEVICE_ALT1_MODEL)$$(if $$(DEVICE_ALT1_VARIANT), $$(DEVICE_ALT1_VARIANT)) DEVICE_ALT1_TITLE = $$(DEVICE_ALT1_VENDOR) $$(DEVICE_ALT1_MODEL)$$(if $$(DEVICE_ALT1_VARIANT), $$(DEVICE_ALT1_VARIANT))
DEVICE_ALT2_TITLE = $$(DEVICE_ALT2_VENDOR) $$(DEVICE_ALT2_MODEL)$$(if $$(DEVICE_ALT2_VARIANT), $$(DEVICE_ALT2_VARIANT)) DEVICE_ALT2_TITLE = $$(DEVICE_ALT2_VENDOR) $$(DEVICE_ALT2_MODEL)$$(if $$(DEVICE_ALT2_VARIANT), $$(DEVICE_ALT2_VARIANT))
DEVICE_ALT3_TITLE = $$(DEVICE_ALT3_VENDOR) $$(DEVICE_ALT3_MODEL)$$(if $$(DEVICE_ALT3_VARIANT), $$(DEVICE_ALT3_VARIANT))
DEVICE_ALT4_TITLE = $$(DEVICE_ALT4_VENDOR) $$(DEVICE_ALT4_MODEL)$$(if $$(DEVICE_ALT4_VARIANT), $$(DEVICE_ALT4_VARIANT))
DEVICE_VENDOR := DEVICE_VENDOR :=
DEVICE_MODEL := DEVICE_MODEL :=
DEVICE_VARIANT := DEVICE_VARIANT :=
@ -353,6 +359,12 @@ define Device/InitProfile
DEVICE_ALT2_VENDOR := DEVICE_ALT2_VENDOR :=
DEVICE_ALT2_MODEL := DEVICE_ALT2_MODEL :=
DEVICE_ALT2_VARIANT := DEVICE_ALT2_VARIANT :=
DEVICE_ALT3_VENDOR :=
DEVICE_ALT3_MODEL :=
DEVICE_ALT3_VARIANT :=
DEVICE_ALT4_VENDOR :=
DEVICE_ALT4_MODEL :=
DEVICE_ALT4_VARIANT :=
DEVICE_PACKAGES := DEVICE_PACKAGES :=
DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE) DEVICE_DESCRIPTION = Build firmware images for $$(DEVICE_TITLE)
endef endef
@ -367,6 +379,7 @@ define Device/Init
ARTIFACTS := ARTIFACTS :=
DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1) DEVICE_IMG_PREFIX := $(IMG_PREFIX)-$(1)
DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2) DEVICE_IMG_NAME = $$(DEVICE_IMG_PREFIX)-$$(1)-$$(2)
FACTORY_IMG_NAME :=
IMAGE_SIZE := IMAGE_SIZE :=
KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX) KERNEL_PREFIX = $$(DEVICE_IMG_PREFIX)
KERNEL_SUFFIX := -kernel.bin KERNEL_SUFFIX := -kernel.bin
@ -394,14 +407,19 @@ define Device/Init
DEVICE_DTS := DEVICE_DTS :=
DEVICE_DTS_CONFIG := DEVICE_DTS_CONFIG :=
DEVICE_DTS_DELIMITER :=
DEVICE_DTS_DIR := DEVICE_DTS_DIR :=
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))
@ -418,16 +436,20 @@ 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_DIR DEVICE_DTS_OVERLAY DEVICE_FDT_NUM \ DEVICE_DTCO_FLAGS DEVICE_DTS DEVICE_DTS_CONFIG DEVICE_DTS_DELIMITER \
DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \ DEVICE_DTS_DIR DEVICE_DTS_OVERLAY DEVICE_DTS_LOADADDR \
SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \ DEVICE_FDT_NUM DEVICE_IMG_PREFIX SOC BOARD_NAME UIMAGE_MAGIC UIMAGE_NAME \
UIMAGE_TIME SUPPORTED_DEVICES IMAGE_METADATA KERNEL_ENTRY KERNEL_LOADADDR \
UBOOT_PATH IMAGE_SIZE \ UBOOT_PATH IMAGE_SIZE \
FACTORY_IMG_NAME FACTORY_SIZE \
DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \ DEVICE_PACKAGES DEVICE_COMPAT_VERSION DEVICE_COMPAT_MESSAGE \
DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \ DEVICE_VENDOR DEVICE_MODEL DEVICE_VARIANT \
DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \ DEVICE_ALT0_VENDOR DEVICE_ALT0_MODEL DEVICE_ALT0_VARIANT \
DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \ DEVICE_ALT1_VENDOR DEVICE_ALT1_MODEL DEVICE_ALT1_VARIANT \
DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT DEVICE_ALT2_VENDOR DEVICE_ALT2_MODEL DEVICE_ALT2_VARIANT \
DEVICE_ALT3_VENDOR DEVICE_ALT3_MODEL DEVICE_ALT3_VARIANT \
DEVICE_ALT4_VENDOR DEVICE_ALT4_MODEL DEVICE_ALT4_VARIANT
define Device/ExportVar define Device/ExportVar
$(1) : $(2):=$$($(2)) $(1) : $(2):=$$($(2))
@ -480,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 $$^ $$@
@ -492,11 +517,11 @@ define Device/Build/initramfs
$(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE) $(BUILD_DIR)/json_info_files/$$(KERNEL_INITRAMFS_IMAGE).json: $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
@mkdir -p $$(shell dirname $$@) @mkdir -p $$(shell dirname $$@)
DEVICE_ID="$(1)" \ DEVICE_ID="$(1)" \
BIN_DIR="$(BIN_DIR)" \
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
DEVICE_IMG_NAME="$$(notdir $$^)" \ FILE_NAME="$$(notdir $$^)" \
IMAGE_TYPE="kernel" \ FILE_DIR="$(KDIR)/tmp" \
IMAGE_FILESYSTEM="initramfs" \ FILE_TYPE="kernel" \
FILE_FILESYSTEM="initramfs" \
DEVICE_IMG_PREFIX="$$(DEVICE_IMG_PREFIX)" \ DEVICE_IMG_PREFIX="$$(DEVICE_IMG_PREFIX)" \
DEVICE_VENDOR="$$(DEVICE_VENDOR)" \ DEVICE_VENDOR="$$(DEVICE_VENDOR)" \
DEVICE_MODEL="$$(DEVICE_MODEL)" \ DEVICE_MODEL="$$(DEVICE_MODEL)" \
@ -510,6 +535,12 @@ define Device/Build/initramfs
DEVICE_ALT2_VENDOR="$$(DEVICE_ALT2_VENDOR)" \ DEVICE_ALT2_VENDOR="$$(DEVICE_ALT2_VENDOR)" \
DEVICE_ALT2_MODEL="$$(DEVICE_ALT2_MODEL)" \ DEVICE_ALT2_MODEL="$$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$$(DEVICE_ALT2_VARIANT)" \ DEVICE_ALT2_VARIANT="$$(DEVICE_ALT2_VARIANT)" \
DEVICE_ALT3_VENDOR="$$(DEVICE_ALT3_VENDOR)" \
DEVICE_ALT3_MODEL="$$(DEVICE_ALT3_MODEL)" \
DEVICE_ALT3_VARIANT="$$(DEVICE_ALT3_VARIANT)" \
DEVICE_ALT4_VENDOR="$$(DEVICE_ALT4_VENDOR)" \
DEVICE_ALT4_MODEL="$$(DEVICE_ALT4_MODEL)" \
DEVICE_ALT4_VARIANT="$$(DEVICE_ALT4_VARIANT)" \
DEVICE_TITLE="$$(DEVICE_TITLE)" \ DEVICE_TITLE="$$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \ DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \ TARGET="$(BOARD)" \
@ -524,7 +555,8 @@ endif
define Device/Build/compile define Device/Build/compile
$$(_COMPILE_TARGET): $(KDIR)/$(1) $$(_COMPILE_TARGET): $(KDIR)/$(1)
$(eval $(call Device/Export,$(KDIR)/$(1))) $(eval $(call Device/Export,$(KDIR)/$(1)))
$(KDIR)/$(1): $(KDIR)/$(1): FORCE
rm -f $(KDIR)/$(1)
$$(call concat_cmd,$(COMPILE/$(1))) $$(call concat_cmd,$(COMPILE/$(1)))
endef endef
@ -536,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))
@ -599,11 +648,11 @@ define Device/Build/image
$(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX) $(BUILD_DIR)/json_info_files/$(call DEVICE_IMG_NAME,$(1),$(2)).json: $(BIN_DIR)/$(call DEVICE_IMG_NAME,$(1),$(2))$$(GZ_SUFFIX)
@mkdir -p $$(shell dirname $$@) @mkdir -p $$(shell dirname $$@)
DEVICE_ID="$(DEVICE_NAME)" \ DEVICE_ID="$(DEVICE_NAME)" \
BIN_DIR="$(BIN_DIR)" \
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \ SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
DEVICE_IMG_NAME="$(DEVICE_IMG_NAME)" \ FILE_NAME="$(DEVICE_IMG_NAME)" \
IMAGE_TYPE=$(word 1,$(subst ., ,$(2))) \ FILE_DIR="$(KDIR)/tmp" \
IMAGE_FILESYSTEM="$(1)" \ FILE_TYPE=$(word 1,$(subst ., ,$(2))) \
FILE_FILESYSTEM="$(1)" \
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \ DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
DEVICE_VENDOR="$(DEVICE_VENDOR)" \ DEVICE_VENDOR="$(DEVICE_VENDOR)" \
DEVICE_MODEL="$(DEVICE_MODEL)" \ DEVICE_MODEL="$(DEVICE_MODEL)" \
@ -617,6 +666,12 @@ define Device/Build/image
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \ DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \ DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \ DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
DEVICE_ALT3_VENDOR="$(DEVICE_ALT3_VENDOR)" \
DEVICE_ALT3_MODEL="$(DEVICE_ALT3_MODEL)" \
DEVICE_ALT3_VARIANT="$(DEVICE_ALT3_VARIANT)" \
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
DEVICE_TITLE="$(DEVICE_TITLE)" \ DEVICE_TITLE="$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \ DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \ TARGET="$(BOARD)" \
@ -629,7 +684,9 @@ define Device/Build/image
endef endef
define Device/Build/artifact define Device/Build/artifact
$$(_TARGET): $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1) $$(_TARGET): $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \
$(BUILD_DIR)/json_info_files/$(DEVICE_IMG_PREFIX)-$(1).json, \
$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1))
$(eval $(call Device/Export,$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1))) $(eval $(call Device/Export,$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1)))
$(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE) $(2)-images $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1): $$(KDIR_KERNEL_IMAGE) $(2)-images
@rm -f $$@ @rm -f $$@
@ -640,6 +697,41 @@ define Device/Build/artifact
$(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1): $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1) $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1): $(KDIR)/tmp/$(DEVICE_IMG_PREFIX)-$(1)
cp $$^ $$@ cp $$^ $$@
$(BUILD_DIR)/json_info_files/$(DEVICE_IMG_PREFIX)-$(1).json: $(BIN_DIR)/$(DEVICE_IMG_PREFIX)-$(1)
@mkdir -p $$(shell dirname $$@)
DEVICE_ID="$(DEVICE_NAME)" \
SOURCE_DATE_EPOCH=$(SOURCE_DATE_EPOCH) \
FILE_NAME="$(DEVICE_IMG_PREFIX)-$(1)" \
FILE_DIR="$(KDIR)/tmp" \
FILE_TYPE="$(1)" \
DEVICE_IMG_PREFIX="$(DEVICE_IMG_PREFIX)" \
DEVICE_VENDOR="$(DEVICE_VENDOR)" \
DEVICE_MODEL="$(DEVICE_MODEL)" \
DEVICE_VARIANT="$(DEVICE_VARIANT)" \
DEVICE_ALT0_VENDOR="$(DEVICE_ALT0_VENDOR)" \
DEVICE_ALT0_MODEL="$(DEVICE_ALT0_MODEL)" \
DEVICE_ALT0_VARIANT="$(DEVICE_ALT0_VARIANT)" \
DEVICE_ALT1_VENDOR="$(DEVICE_ALT1_VENDOR)" \
DEVICE_ALT1_MODEL="$(DEVICE_ALT1_MODEL)" \
DEVICE_ALT1_VARIANT="$(DEVICE_ALT1_VARIANT)" \
DEVICE_ALT2_VENDOR="$(DEVICE_ALT2_VENDOR)" \
DEVICE_ALT2_MODEL="$(DEVICE_ALT2_MODEL)" \
DEVICE_ALT2_VARIANT="$(DEVICE_ALT2_VARIANT)" \
DEVICE_ALT3_VENDOR="$(DEVICE_ALT3_VENDOR)" \
DEVICE_ALT3_MODEL="$(DEVICE_ALT3_MODEL)" \
DEVICE_ALT3_VARIANT="$(DEVICE_ALT3_VARIANT)" \
DEVICE_ALT4_VENDOR="$(DEVICE_ALT4_VENDOR)" \
DEVICE_ALT4_MODEL="$(DEVICE_ALT4_MODEL)" \
DEVICE_ALT4_VARIANT="$(DEVICE_ALT4_VARIANT)" \
DEVICE_TITLE="$(DEVICE_TITLE)" \
DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
TARGET="$(BOARD)" \
SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
VERSION_NUMBER="$(VERSION_NUMBER)" \
VERSION_CODE="$(VERSION_CODE)" \
SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \
$(TOPDIR)/scripts/json_add_image_info.py $$@
endef endef
define Device/Build define Device/Build
@ -672,6 +764,8 @@ $(if $(strip $(DEVICE_ALT0_TITLE)),Alternative device titles:
- $(DEVICE_ALT0_TITLE)) - $(DEVICE_ALT0_TITLE))
$(if $(strip $(DEVICE_ALT1_TITLE)),- $(DEVICE_ALT1_TITLE)) $(if $(strip $(DEVICE_ALT1_TITLE)),- $(DEVICE_ALT1_TITLE))
$(if $(strip $(DEVICE_ALT2_TITLE)),- $(DEVICE_ALT2_TITLE)) $(if $(strip $(DEVICE_ALT2_TITLE)),- $(DEVICE_ALT2_TITLE))
$(if $(strip $(DEVICE_ALT3_TITLE)),- $(DEVICE_ALT3_TITLE))
$(if $(strip $(DEVICE_ALT4_TITLE)),- $(DEVICE_ALT4_TITLE))
@@ @@
endef endef
@ -689,6 +783,14 @@ ifneq ($$(strip $$(DEVICE_ALT2_TITLE)),)
DEVICE_DISPLAY = $$(DEVICE_ALT2_TITLE) ($$(DEVICE_TITLE)) DEVICE_DISPLAY = $$(DEVICE_ALT2_TITLE) ($$(DEVICE_TITLE))
$$(info $$(call Device/DumpInfo,$(1))) $$(info $$(call Device/DumpInfo,$(1)))
endif endif
ifneq ($$(strip $$(DEVICE_ALT3_TITLE)),)
DEVICE_DISPLAY = $$(DEVICE_ALT3_TITLE) ($$(DEVICE_TITLE))
$$(info $$(call Device/DumpInfo,$(1)))
endif
ifneq ($$(strip $$(DEVICE_ALT4_TITLE)),)
DEVICE_DISPLAY = $$(DEVICE_ALT4_TITLE) ($$(DEVICE_TITLE))
$$(info $$(call Device/DumpInfo,$(1)))
endif
DEVICE_DISPLAY = $$(DEVICE_TITLE) DEVICE_DISPLAY = $$(DEVICE_TITLE)
$$(eval $$(if $$(DEVICE_TITLE),$$(info $$(call Device/DumpInfo,$(1))))) $$(eval $$(if $$(DEVICE_TITLE),$$(info $$(call Device/DumpInfo,$(1)))))
endef endef
@ -714,24 +816,27 @@ 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)
else else
image_prepare: image_prepare:
rm -rf $(KDIR)/tmp
mkdir -p $(BIN_DIR) $(KDIR)/tmp mkdir -p $(BIN_DIR) $(KDIR)/tmp
endif endif

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .145 LINUX_VERSION-5.10 = .235
LINUX_KERNEL_HASH-5.10.145 = fc5990f3e57479369eaf193bd7760b84f26d2b670c2d88e473101cb679c5ac61 LINUX_KERNEL_HASH-5.10.235 = 953be3931101a94a93a644c1283ca41a7e567447ca87d3069ed4dd712dc1f1cc

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .70 LINUX_VERSION-5.15 = .179
LINUX_KERNEL_HASH-5.15.70 = 1a7c26f0253407bb222786c8cbf2ee6235acebe8ea641fe0bc2360acce970d76 LINUX_KERNEL_HASH-5.15.179 = 9319a47b1e9b5d344ff6015431856d0c9640e4faedc527c87f9129061a27136f

View File

@ -1,2 +0,0 @@
LINUX_VERSION-5.19 = .11
LINUX_KERNEL_HASH-5.19.11 = 5554d2f90b806bb3454fcf3432882cf85077d660a89db5a4e8d7375271e3d973

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .214 LINUX_VERSION-5.4 = .291
LINUX_KERNEL_HASH-5.4.214 = 9abc79b4808c827eb82f8a44313ce6d3ade255949989bb98c11acda7ca3bc5db LINUX_KERNEL_HASH-5.4.291 = b3ad64a4476a7c5450b92eab9a888b84ecb64dc613fcb0128f653f58e958ef6e

2
include/kernel-6.1 Normal file
View File

@ -0,0 +1,2 @@
LINUX_VERSION-6.1 = .134
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

@ -10,7 +10,7 @@ ifneq ($(DUMP),1)
endif endif
KERNEL_FILE_DEPENDS=$(GENERIC_BACKPORT_DIR) $(GENERIC_PATCH_DIR) $(GENERIC_HACK_DIR) $(PATCH_DIR) $(GENERIC_FILES_DIR) $(FILES_DIR) KERNEL_FILE_DEPENDS=$(GENERIC_BACKPORT_DIR) $(GENERIC_PATCH_DIR) $(GENERIC_HACK_DIR) $(PATCH_DIR) $(GENERIC_FILES_DIR) $(FILES_DIR)
STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,$(KERNEL_FILE_DEPENDS),))) STAMP_PREPARED=$(LINUX_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),$(KERNEL_FILE_DEPENDS),)))
STAMP_CONFIGURED:=$(LINUX_DIR)/.configured STAMP_CONFIGURED:=$(LINUX_DIR)/.configured
include $(INCLUDE_DIR)/download.mk include $(INCLUDE_DIR)/download.mk
include $(INCLUDE_DIR)/quilt.mk include $(INCLUDE_DIR)/quilt.mk
@ -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

@ -21,7 +21,7 @@ Kernel/Patch:=$(Kernel/Patch/Default)
ifneq (,$(findstring .xz,$(LINUX_SOURCE))) ifneq (,$(findstring .xz,$(LINUX_SOURCE)))
LINUX_CAT:=xzcat LINUX_CAT:=xzcat
else else
LINUX_CAT:=gzip -dc LINUX_CAT:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc
endif endif
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
@ -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
@ -117,7 +119,7 @@ define Kernel/Configure/Default
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \ cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \ cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
} }
$(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install $(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic
endef endef
@ -129,6 +131,10 @@ define Kernel/CompileModules/Default
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
+$(KERNEL_MAKE) olddefconfig +$(KERNEL_MAKE) olddefconfig
+$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules +$(KERNEL_MAKE) $(if $(KERNELNAME),$(KERNELNAME),all) modules
# If .config did not change, use the previous timestamp to avoid package rebuilds
cmp -s $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save && \
mv $(LINUX_DIR)/.config.modules.save $(LINUX_DIR)/.config; \
$(CP) $(LINUX_DIR)/.config $(LINUX_DIR)/.config.modules.save
endef endef
OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id OBJCOPY_STRIP = -R .reginfo -R .notes -R .note -R .comment -R .mdebug -R .note.gnu.build-id
@ -165,20 +171,21 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
define Kernel/CompileImage/Initramfs define Kernel/CompileImage/Initramfs
$(call Kernel/Configure/Initramfs) $(call Kernel/Configure/Initramfs)
$(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init $(CP) $(GENERIC_PLATFORM_DIR)/other-files/init $(TARGET_DIR)/init
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR)/init) $(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(TARGET_DIR) $(TARGET_DIR)/init)
rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio* rm -rf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/usr/initramfs_data.cpio*
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y) ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE),y)
ifeq ($(CONFIG_EXTERNAL_CPIO),y) ifneq ($(qstrip $(CONFIG_EXTERNAL_CPIO)),)
$(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio $(CP) $(CONFIG_EXTERNAL_CPIO) $(KERNEL_BUILD_DIR)/initrd.cpio
else else
( cd $(TARGET_DIR); find . | $(STAGING_DIR_HOST)/bin/cpio -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio ) ( cd $(TARGET_DIR); find . | LC_ALL=C sort | $(STAGING_DIR_HOST)/bin/cpio --reproducible -o -H newc -R 0:0 > $(KERNEL_BUILD_DIR)/initrd.cpio )
endif endif
$(if $(SOURCE_DATE_EPOCH),touch -hcd "@$(SOURCE_DATE_EPOCH)" $(KERNEL_BUILD_DIR)/initrd.cpio)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),bzip2 -9 -c < $(KERNEL_BUILD_DIR)/initrd.cpio > $(KERNEL_BUILD_DIR)/initrd.cpio.bzip2)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),gzip -n -f -S .gzip -9n $(KERNEL_BUILD_DIR)/initrd.cpio)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),$(STAGING_DIR_HOST)/bin/lz4c -l -c1 -fz --favor-decSpeed $(KERNEL_BUILD_DIR)/initrd.cpio)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),$(STAGING_DIR_HOST)/bin/lzma e -lc1 -lp2 -pb2 $(KERNEL_BUILD_DIR)/initrd.cpio $(KERNEL_BUILD_DIR)/initrd.cpio.lzma) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),$(STAGING_DIR_HOST)/bin/lzma e -lc1 -lp2 -pb2 $(KERNEL_BUILD_DIR)/initrd.cpio $(KERNEL_BUILD_DIR)/initrd.cpio.lzma)
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),$(STAGING_DIR_HOST)/bin/lzop -9 -f $(KERNEL_BUILD_DIR)/initrd.cpio)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),$(STAGING_DIR_HOST)/bin/xz -T$(if $(filter 1,$(NPROC)),2,0) -9 -fz --check=crc32 $(KERNEL_BUILD_DIR)/initrd.cpio)
# ? $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZ4),)
$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),$(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(KERNEL_BUILD_DIR)/initrd.cpio.zstd $(KERNEL_BUILD_DIR)/initrd.cpio) $(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_ZSTD),$(STAGING_DIR_HOST)/bin/zstd -T0 -f -o $(KERNEL_BUILD_DIR)/initrd.cpio.zstd $(KERNEL_BUILD_DIR)/initrd.cpio)
endif endif
+$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all) modules +$(KERNEL_MAKE) $(KERNEL_MAKEOPTS_IMAGE) $(if $(KERNELNAME),$(KERNELNAME),all) modules

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

@ -70,11 +70,7 @@ else
LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release 2>/dev/null)) LINUX_UNAME_VERSION:=$(strip $(shell cat $(LINUX_DIR)/include/config/kernel.release 2>/dev/null))
endif endif
ifeq (,$(findstring -android,$(LINUX_VERSION))) MODULES_SUBDIR:=lib/modules/$(LINUX_UNAME_VERSION)
MODULES_SUBDIR:=lib/modules/$(LINUX_UNAME_VERSION)
else
MODULES_SUBDIR:=lib/modules/$(LINUX_UNAME_VERSION)-android
endif
TARGET_MODULES_DIR:=$(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) TARGET_MODULES_DIR:=$(LINUX_TARGET_DIR)/$(MODULES_SUBDIR)
ifneq ($(TARGET_BUILD),1) ifneq ($(TARGET_BUILD),1)
@ -90,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 ))
@ -105,7 +105,7 @@ endif
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS) KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
KERNEL_MAKE_FLAGS = \ KERNEL_MAKE_FLAGS = \
KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR)))" \ KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR))) $(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION))) $(call qstrip,$(CONFIG_KERNEL_CFLAGS))" \
HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \ HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \
CROSS_COMPILE="$(KERNEL_CROSS)" \ CROSS_COMPILE="$(KERNEL_CROSS)" \
ARCH="$(LINUX_KARCH)" \ ARCH="$(LINUX_KARCH)" \
@ -129,17 +129,17 @@ ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL
KERNELRELEASE=$(LINUX_VERSION) KERNELRELEASE=$(LINUX_VERSION)
endif endif
KERNEL_MAKEOPTS := -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS) ifneq ($(HOST_OS),Linux)
KERNEL_MAKE_FLAGS += CONFIG_STACK_VALIDATION=
export SKIP_STACK_VALIDATION:=1
endif
KERNEL_MAKEOPTS = -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS)
ifdef CONFIG_USE_SPARSE ifdef CONFIG_USE_SPARSE
KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse
endif endif
ifneq ($(HOST_OS),Linux)
KERNEL_MAKEOPTS += CONFIG_STACK_VALIDATION=
export SKIP_STACK_VALIDATION:=1
endif
PKG_EXTMOD_SUBDIRS ?= . PKG_EXTMOD_SUBDIRS ?= .
PKG_SYMVERS_DIR = $(KERNEL_BUILD_DIR)/symvers PKG_SYMVERS_DIR = $(KERNEL_BUILD_DIR)/symvers
@ -238,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

@ -19,7 +19,6 @@
# #
# Host packages are built in the same fashion, just use these vars instead: # Host packages are built in the same fashion, just use these vars instead:
# #
# HOST_BUILD_DEPENDS:=meson/host
# MESON_HOST_ARGS+=-Dfoo -Dbar=baz # MESON_HOST_ARGS+=-Dfoo -Dbar=baz
# MESON_HOST_VARS+=FOO=bar # MESON_HOST_VARS+=FOO=bar
@ -56,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) $(MESON_DIR)/meson.py $(1) $(2) $(PYTHON_BIN) $(STAGING_DIR_HOST)/bin/meson.py $(1)
endef endef
define Meson/CreateNativeFile define Meson/CreateNativeFile
@ -65,6 +70,8 @@ define Meson/CreateNativeFile
-e "s|@CC@|$(foreach BIN,$(HOSTCC),'$(BIN)',)|" \ -e "s|@CC@|$(foreach BIN,$(HOSTCC),'$(BIN)',)|" \
-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|@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)',)|" \
@ -77,10 +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|@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)',)|" \
@ -94,15 +104,17 @@ 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) \
$(HOST_BUILD_DIR), \ $(MESON_HOST_BUILD_DIR)/.., \
$(MESON_HOST_VARS)) $(MESON_HOST_VARS))
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
@ -117,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)/.., \
@ -127,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

@ -153,6 +153,7 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NF_IPT6,CONFIG_IP6_NF_IPTABLES, $(P_V6)ip6_
$(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),)) $(eval $(if $(NF_KMOD),$(call nf_add,NF_CONNTRACK,CONFIG_NF_DEFRAG_IPV6, $(P_V6)nf_defrag_ipv6),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),)) $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_FILTER, $(P_V6)ip6table_filter),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_MANGLE, $(P_V6)ip6table_mangle),))
$(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6,lt 5.13),)) $(eval $(if $(NF_KMOD),$(call nf_add,IPT_IPV6,CONFIG_NF_LOG_IPV6, $(P_V6)nf_log_ipv6,lt 5.13),))
$(eval $(if $(NF_KMOD),,$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_IPTABLES, ip6t_icmp6))) $(eval $(if $(NF_KMOD),,$(call nf_add,IPT_IPV6,CONFIG_IP6_NF_IPTABLES, ip6t_icmp6)))
@ -229,11 +230,6 @@ $(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_CONNTRACK_IRC, $(P_XT)nf_connt
$(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_IRC, $(P_XT)nf_nat_irc)) $(eval $(call nf_add,NF_NATHELPER_EXTRA,CONFIG_NF_NAT_IRC, $(P_XT)nf_nat_irc))
# ulog
$(eval $(call nf_add,IPT_ULOG,CONFIG_IP_NF_TARGET_ULOG, $(P_V4)ipt_ULOG))
# nflog # nflog
$(eval $(call nf_add,IPT_NFLOG,CONFIG_NETFILTER_XT_TARGET_NFLOG, $(P_XT)xt_NFLOG)) $(eval $(call nf_add,IPT_NFLOG,CONFIG_NETFILTER_XT_TARGET_NFLOG, $(P_XT)xt_NFLOG))
@ -320,7 +316,6 @@ $(eval $(call nf_add,EBTABLES_IP4,CONFIG_BRIDGE_EBT_SNAT, $(P_EBT)ebt_snat))
# watchers # watchers
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_LOG, $(P_EBT)ebt_log)) $(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_LOG, $(P_EBT)ebt_log))
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_ULOG, $(P_EBT)ebt_ulog))
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFLOG, $(P_EBT)ebt_nflog)) $(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFLOG, $(P_EBT)ebt_nflog))
$(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nfqueue)) $(eval $(call nf_add,EBTABLES_WATCHERS,CONFIG_BRIDGE_EBT_NFQUEUE, $(P_EBT)ebt_nfqueue))
@ -392,7 +387,6 @@ IPT_BUILTIN += $(IPT_NAT6-y)
IPT_BUILTIN += $(IPT_NAT_EXTRA-y) IPT_BUILTIN += $(IPT_NAT_EXTRA-y)
IPT_BUILTIN += $(NF_NATHELPER-y) IPT_BUILTIN += $(NF_NATHELPER-y)
IPT_BUILTIN += $(NF_NATHELPER_EXTRA-y) IPT_BUILTIN += $(NF_NATHELPER_EXTRA-y)
IPT_BUILTIN += $(IPT_ULOG-y)
IPT_BUILTIN += $(IPT_TPROXY-y) IPT_BUILTIN += $(IPT_TPROXY-y)
IPT_BUILTIN += $(NFNETLINK-y) IPT_BUILTIN += $(NFNETLINK-y)
IPT_BUILTIN += $(NFNETLINK_LOG-y) IPT_BUILTIN += $(NFNETLINK_LOG-y)

View File

@ -10,27 +10,38 @@ ifeq ($(CONFIG_BUILD_NLS),y)
INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-full INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-full
INTL_FULL:=1 INTL_FULL:=1
# iconv stub CMAKE_OPTIONS += -DCMAKE_PREFIX_PATH="$(ICONV_PREFIX);$(INTL_PREFIX)"
else else
ICONV_PREFIX:=$(STAGING_DIR)/usr/lib/libiconv-stub ICONV_PREFIX:=
ICONV_FULL:= ICONV_FULL:=
INTL_PREFIX:=$(STAGING_DIR)/usr/lib/libintl-stub INTL_PREFIX:=
INTL_FULL:= INTL_FULL:=
endif endif
PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS PKG_CONFIG_DEPENDS += CONFIG_BUILD_NLS
PKG_BUILD_DEPENDS += !BUILD_NLS:libiconv !BUILD_NLS:gettext
ICONV_DEPENDS:=+BUILD_NLS:libiconv-full ICONV_DEPENDS:=+BUILD_NLS:libiconv-full
ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include ifeq ($(CONFIG_BUILD_NLS),y)
ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include ICONV_CFLAGS:=-I$(ICONV_PREFIX)/include
ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib -Wl,-rpath-link=$(ICONV_PREFIX)/lib ICONV_CPPFLAGS:=-I$(ICONV_PREFIX)/include
ICONV_LDFLAGS:=-L$(ICONV_PREFIX)/lib -Wl,-rpath-link=$(ICONV_PREFIX)/lib
else
ICONV_CFLAGS:=
ICONV_CPPFLAGS:=
ICONV_LDFLAGS:=
endif
INTL_DEPENDS:=+BUILD_NLS:libintl-full INTL_DEPENDS:=+BUILD_NLS:libintl-full
INTL_CFLAGS:=-I$(INTL_PREFIX)/include ifeq ($(CONFIG_BUILD_NLS),y)
INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include INTL_CFLAGS:=-I$(INTL_PREFIX)/include
INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib -Wl,-rpath-link=$(INTL_PREFIX)/lib INTL_CPPFLAGS:=-I$(INTL_PREFIX)/include
INTL_LDFLAGS:=-L$(INTL_PREFIX)/lib -Wl,-rpath-link=$(INTL_PREFIX)/lib
else
INTL_CFLAGS:=
INTL_CPPFLAGS:=
INTL_LDFLAGS:=
endif
TARGET_CFLAGS += $(ICONV_CFLAGS) $(INTL_CFLAGS) TARGET_CFLAGS += $(ICONV_CFLAGS) $(INTL_CFLAGS)
TARGET_CPPFLAGS += $(ICONV_CPPFLAGS) $(INTL_CPPFLAGS) TARGET_CPPFLAGS += $(ICONV_CPPFLAGS) $(INTL_CPPFLAGS)

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

@ -4,7 +4,8 @@
ifeq ($(DUMP),) ifeq ($(DUMP),)
define BuildTarget/bin define BuildTarget/bin
ifeq ($(if $(VARIANT),$(BUILD_VARIANT)),$(VARIANT)) TARGET_VARIANT=$(if $(ALL_VARIANTS),$(if $(VARIANT),$(filter-out *,$(VARIANT)),$(firstword $(ALL_VARIANTS))))
ifeq ($(if $(TARGET_VARIANT),$(BUILD_VARIANT)),$(TARGET_VARIANT))
ifdef Package/$(1)/install ifdef Package/$(1)/install
ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),) ifneq ($(CONFIG_PACKAGE_$(1))$(DEVELOPER),)
$(_pkg_target)compile: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed $(_pkg_target)compile: $(PKG_BUILD_DIR)/.pkgdir/$(1).installed

View File

@ -2,7 +2,7 @@
# #
# Copyright (C) 2006-2020 OpenWrt.org # Copyright (C) 2006-2020 OpenWrt.org
PKG_DEFAULT_DEPENDS = +libc +USE_GLIBC:librt +USE_GLIBC:libpthread PKG_DEFAULT_DEPENDS = +libc
ifneq ($(PKG_NAME),toolchain) ifneq ($(PKG_NAME),toolchain)
PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) $(filter-out $(PKG_DEFAULT_DEPENDS),$(2))) PKG_FIXUP_DEPENDS = $(if $(filter kmod-%,$(1)),$(2),$(PKG_DEFAULT_DEPENDS) $(filter-out $(PKG_DEFAULT_DEPENDS),$(2)))

View File

@ -105,7 +105,8 @@ ifeq ($(DUMP),)
IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1) IDIR_$(1):=$(PKG_BUILD_DIR)/ipkg-$(PKGARCH)/$(1)
KEEP_$(1):=$(strip $(call Package/$(1)/conffiles)) KEEP_$(1):=$(strip $(call Package/$(1)/conffiles))
ifeq ($(BUILD_VARIANT),$$(if $$(VARIANT),$$(VARIANT),$(BUILD_VARIANT))) TARGET_VARIANT:=$$(if $(ALL_VARIANTS),$$(if $$(VARIANT),$$(filter-out *,$$(VARIANT)),$(firstword $(ALL_VARIANTS))))
ifeq ($(BUILD_VARIANT),$$(if $$(TARGET_VARIANT),$$(TARGET_VARIANT),$(BUILD_VARIANT)))
do_install= do_install=
ifdef Package/$(1)/install ifdef Package/$(1)/install
do_install=yes do_install=yes

View File

@ -11,8 +11,7 @@ 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_SKIP_DOWNLOAD=$(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT)
PKG_IREMAP ?= 1
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))
@ -23,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
@ -84,7 +118,7 @@ ifneq ($(PREV_STAMP_PREPARED),)
STAMP_PREPARED:=$(PREV_STAMP_PREPARED) STAMP_PREPARED:=$(PREV_STAMP_PREPARED)
CONFIG_AUTOREBUILD:= CONFIG_AUTOREBUILD:=
else else
STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call find_md5,${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS))) STAMP_PREPARED=$(PKG_BUILD_DIR)/.prepared$(if $(QUILT)$(DUMP),,_$(shell $(call $(if $(CONFIG_AUTOREMOVE),find_md5_reproducible,find_md5),${CURDIR} $(PKG_FILE_DEPENDS),))_$(call confvar,CONFIG_AUTOREMOVE $(PKG_PREPARED_DEPENDS)))
endif endif
STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS))) STAMP_CONFIGURED=$(PKG_BUILD_DIR)/.configured$(if $(DUMP),,_$(call confvar,$(PKG_CONFIG_DEPENDS)))
STAMP_CONFIGURED_WILDCARD=$(PKG_BUILD_DIR)/.configured_* STAMP_CONFIGURED_WILDCARD=$(PKG_BUILD_DIR)/.configured_*
@ -183,7 +217,7 @@ define Build/CoreTargets
$(call Build/Autoclean) $(call Build/Autoclean)
$(call DefaultTargets) $(call DefaultTargets)
$(DL_DIR)/$(FILE): FORCE $(call check_download_integrity)
download: download:
$(foreach hook,$(Hooks/Download), $(foreach hook,$(Hooks/Download),
@ -258,13 +292,13 @@ define Build/CoreTargets
ifneq ($(CONFIG_AUTOREMOVE),) ifneq ($(CONFIG_AUTOREMOVE),)
compile: compile:
-touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null -touch -r $(PKG_BUILD_DIR)/.built $(PKG_BUILD_DIR)/.autoremove 2>/dev/null >/dev/null
$(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' | \ $(FIND) $(PKG_BUILD_DIR) -mindepth 1 -maxdepth 1 -not '(' -type f -and -name '.*' -and -size 0 ')' -and -not -name '.pkgdir' -print0 | \
$(XARGS) rm -rf $(XARGS) -0 rm -rf
endif endif
endef endef
define Build/DefaultTargets define Build/DefaultTargets
$(if $(USE_SOURCE_DIR)$(USE_GIT_TREE)$(USE_GIT_SRC_CHECKOUT),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default))) $(if $(PKG_SKIP_DOWNLOAD),,$(if $(strip $(PKG_SOURCE_URL)),$(call Download,default)))
$(if $(DUMP),,$(Build/CoreTargets)) $(if $(DUMP),,$(Build/CoreTargets))
define Build/DefaultTargets define Build/DefaultTargets

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))
@ -49,10 +49,16 @@ $(eval $(call TestHostCommand,working-g++, \
g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \
$(TMP_DIR)/a.out)) $(TMP_DIR)/a.out))
$(eval $(call TestHostCommand,ncurses, \ $(eval $(call RequireCHeader,ncurses.h, \
Please install ncurses. (Missing libncurses.so or ncurses.h), \ Please install ncurses. (Missing libncurses.so or ncurses.h), \
echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ initscr(), -lncurses))
gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses))
$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule, \
git submodule --help | grep -- --recursive))
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
rsync --version </dev/null))
endif # IB endif # IB
ifeq ($(HOST_OS),Linux) ifeq ($(HOST_OS),Linux)
@ -130,13 +136,21 @@ $(eval $(call SetupHostCommand,getopt, \
Please install an extended getopt version that supports --long, \ Please install an extended getopt version that supports --long, \
gnugetopt -o t --long test -- --test | grep '^ *--test *--', \ gnugetopt -o t --long test -- --test | grep '^ *--test *--', \
getopt -o t --long test -- --test | grep '^ *--test *--', \ getopt -o t --long test -- --test | grep '^ *--test *--', \
/usr/local/opt/gnu-getopt/bin/getopt -o t --long test -- --test | grep '^ *--test *--')) /usr/local/opt/gnu-getopt/bin/getopt -o t --long test -- --test | grep '^ *--test *--', \
/opt/local/bin/getopt -o t --long test -- --test | grep '^ *--test *--'))
$(eval $(call SetupHostCommand,realpath,Please install a 'realpath' utility, \
grealpath /, \
realpath /))
$(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \ $(eval $(call SetupHostCommand,stat,Cannot find a file stat utility, \
gnustat -c%s $(TOPDIR)/Makefile, \ gnustat -c%s $(TOPDIR)/Makefile, \
gstat -c%s $(TOPDIR)/Makefile, \ gstat -c%s $(TOPDIR)/Makefile, \
stat -c%s $(TOPDIR)/Makefile)) stat -c%s $(TOPDIR)/Makefile))
$(eval $(call SetupHostCommand,gzip,Please install 'gzip', \
gzip --version </dev/null))
$(eval $(call SetupHostCommand,unzip,Please install 'unzip', \ $(eval $(call SetupHostCommand,unzip,Please install 'unzip', \
unzip 2>&1 | grep zipfile, \ unzip 2>&1 | grep zipfile, \
unzip)) unzip))
@ -157,36 +171,52 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
$(eval $(call CleanupPython2)) $(eval $(call CleanupPython2))
$(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \ $(eval $(call SetupHostCommand,python,Please install Python >= 3.6, \
python3.11 -V 2>&1 | grep 'Python 3', \
python3.10 -V 2>&1 | grep 'Python 3', \ python3.10 -V 2>&1 | grep 'Python 3', \
python3.9 -V 2>&1 | grep 'Python 3', \ python3.9 -V 2>&1 | grep 'Python 3', \
python3.8 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \
python3.7 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \
python3.6 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?')) python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?'))
$(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \ $(eval $(call SetupHostCommand,python3,Please install Python >= 3.6, \
python3.11 -V 2>&1 | grep 'Python 3', \
python3.10 -V 2>&1 | grep 'Python 3', \ python3.10 -V 2>&1 | grep 'Python 3', \
python3.9 -V 2>&1 | grep 'Python 3', \ python3.9 -V 2>&1 | grep 'Python 3', \
python3.8 -V 2>&1 | grep 'Python 3', \ python3.8 -V 2>&1 | grep 'Python 3', \
python3.7 -V 2>&1 | grep 'Python 3', \ python3.7 -V 2>&1 | grep 'Python 3', \
python3.6 -V 2>&1 | grep 'Python 3', \ python3.6 -V 2>&1 | grep 'Python 3', \
python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|10)\.?')) python3 -V 2>&1 | grep -E 'Python 3\.([6-9]|[0-9][0-9])\.?'))
$(eval $(call TestHostCommand,python3-distutils, \ $(eval $(call TestHostCommand,python3-distutils, \
Please install the Python3 distutils module, \ Please install the Python3 distutils module, \
$(STAGING_DIR_HOST)/bin/python3 -c 'import distutils')) $(STAGING_DIR_HOST)/bin/python3 -c 'from distutils import util'))
$(eval $(call SetupHostCommand,git,Please install Git (git-core) >= 1.7.12.2, \ $(eval $(call TestHostCommand,python3-stdlib, \
git --exec-path | xargs -I % -- grep -q -- --recursive %/git-submodule)) Please install the Python3 stdlib module, \
$(STAGING_DIR_HOST)/bin/python3 -c 'import ntpath'))
$(eval $(call SetupHostCommand,file,Please install the 'file' package, \ $(eval $(call SetupHostCommand,file,Please install the 'file' package, \
file --version 2>&1 | grep file)) file --version 2>&1 | grep file))
$(eval $(call SetupHostCommand,rsync,Please install 'rsync', \
rsync --version </dev/null))
$(eval $(call SetupHostCommand,which,Please install 'which', \ $(eval $(call SetupHostCommand,which,Please install 'which', \
which which | grep which)) /usr/bin/which which, \
/bin/which which, \
which which))
ifeq ($(HOST_OS),Linux)
$(eval $(call RequireCHeader,argp.h, \
Missing argp.h Please install the argp-standalone package if musl libc))
$(eval $(call RequireCHeader,fts.h, \
Missing fts.h Please install the musl-fts-dev package if musl libc))
$(eval $(call RequireCHeader,obstack.h, \
Missing obstack.h Please install the musl-obstack-dev package if musl libc))
$(eval $(call RequireCHeader,libintl.h, \
Missing libintl.h Please install the musl-libintl package if musl libc))
endif
$(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c $(STAGING_DIR_HOST)/bin/mkhash: $(SCRIPT_DIR)/mkhash.c
mkdir -p $(dir $@) mkdir -p $(dir $@)
@ -199,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) /bin/true $(STAGING_DIR_HOST)/bin/ldconfig)) $(LN) $(SCRIPT_DIR)/noop.sh $(STAGING_DIR_HOST)/bin/ldconfig))

View File

@ -49,7 +49,7 @@ endef
define RequireCommand define RequireCommand
define Require/$(1) define Require/$(1)
which $(1) command -v $(1)
endef endef
$$(eval $$(call Require,$(1),$(2))) $$(eval $$(call Require,$(1),$(2)))
@ -63,6 +63,18 @@ define RequireHeader
$$(eval $$(call Require,$(1),$(2))) $$(eval $$(call Require,$(1),$(2)))
endef endef
# 1: header to test
# 2: failure message
# 3: optional compile time test
# 4: optional link library test (example -lncurses)
define RequireCHeader
define Require/$(1)
echo 'int main(int argc, char **argv) { $(3); return 0; }' | gcc -include $(1) -x c -o $(TMP_DIR)/a.out - $(4)
endef
$$(eval $$(call Require,$(1),$(2)))
endef
define CleanupPython2 define CleanupPython2
define Require/python2-cleanup define Require/python2-cleanup
if [ -f "$(STAGING_DIR_HOST)/bin/python" ] && \ if [ -f "$(STAGING_DIR_HOST)/bin/python" ] && \
@ -103,7 +115,7 @@ define SetupHostCommand
$(call QuoteHostCommand,$(11)) $(call QuoteHostCommand,$(12)); do \ $(call QuoteHostCommand,$(11)) $(call QuoteHostCommand,$(12)); do \
if [ -n "$$$$$$$$cmd" ]; then \ if [ -n "$$$$$$$$cmd" ]; then \
bin="$$$$$$$$(PATH="$(subst $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst :,$(space),$(PATH))))" \ bin="$$$$$$$$(PATH="$(subst $(space),:,$(filter-out $(STAGING_DIR_HOST)/%,$(subst :,$(space),$(PATH))))" \
which "$$$$$$$${cmd%% *}")"; \ command -v "$$$$$$$${cmd%% *}")"; \
if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \ if [ -x "$$$$$$$$bin" ] && eval "$$$$$$$$cmd" >/dev/null 2>/dev/null; then \
mkdir -p "$(STAGING_DIR_HOST)/bin"; \ mkdir -p "$(STAGING_DIR_HOST)/bin"; \
ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \ ln -sf "$$$$$$$$bin" "$(STAGING_DIR_HOST)/bin/$(strip $(1))"; \

View File

@ -116,7 +116,7 @@ define Quilt/RefreshDir
endef endef
define Quilt/Refresh/Host define Quilt/Refresh/Host
$(call Quilt/RefreshDir,$(HOST_BUILD_DIR),$(PATCH_DIR)) $(call Quilt/RefreshDir,$(HOST_BUILD_DIR),$(HOST_PATCH_DIR))
endef endef
define Quilt/Refresh/Package define Quilt/Refresh/Package

View File

@ -11,7 +11,7 @@ TARGET_STAMP:=$(TMP_DIR)/info/.files-$(SCAN_TARGET).stamp
FILELIST:=$(TMP_DIR)/info/.files-$(SCAN_TARGET)-$(SCAN_COOKIE) FILELIST:=$(TMP_DIR)/info/.files-$(SCAN_TARGET)-$(SCAN_COOKIE)
OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE) OVERRIDELIST:=$(TMP_DIR)/info/.overrides-$(SCAN_TARGET)-$(SCAN_COOKIE)
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH) export PATH:=$(STAGING_DIR_HOST)/bin:$(PATH)
define feedname define feedname
$(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1)))) $(if $(patsubst feeds/%,,$(1)),,$(word 2,$(subst /, ,$(1))))
@ -72,7 +72,7 @@ endif
$(FILELIST): $(OVERRIDELIST) $(FILELIST): $(OVERRIDELIST)
rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-* rm -f $(TMP_DIR)/info/.files-$(SCAN_TARGET)-*
find -L $(SCAN_DIR) $(SCAN_EXTRA) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) -name Makefile | xargs grep -aHE 'call $(GREP_STRING)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -v of=$(OVERRIDELIST) -f include/scan.awk > $@ find -L $(SCAN_DIR) -mindepth 1 $(if $(SCAN_DEPTH),-maxdepth $(SCAN_DEPTH)) $(SCAN_EXTRA) -name Makefile | xargs grep -aHE 'call $(GREP_STRING)' | sed -e 's#^$(SCAN_DIR)/##' -e 's#/Makefile:.*##' | uniq | awk -v of=$(OVERRIDELIST) -f include/scan.awk > $@
$(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST) $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
( \ ( \

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
@ -27,14 +30,16 @@ lastdir=$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1)))
diralias=$(if $(findstring $(1),$(call lastdir,$(1))),,$(call lastdir,$(1))) diralias=$(if $(findstring $(1),$(call lastdir,$(1))),,$(call lastdir,$(1)))
subdir_make_opts = \ subdir_make_opts = \
-r -C $(1) \ $(if $(SUBDIR_MAKE_DEBUG),-d) -r -C $(1) \
BUILD_SUBDIR="$(1)" \ BUILD_SUBDIR="$(1)" \
BUILD_VARIANT="$(4)" BUILD_VARIANT="$(4)" \
ALL_VARIANTS="$(5)"
# 1: subdir # 1: subdir
# 2: target # 2: target
# 3: build type # 3: build type
# 4: build variant # 4: build variant
# 5: all variants
log_make = \ log_make = \
$(if $(call debug,$(1),v),,@)+ \ $(if $(call debug,$(1),v),,@)+ \
$(if $(BUILD_LOG), \ $(if $(BUILD_LOG), \
@ -62,15 +67,15 @@ define subdir
$(foreach target,$(SUBTARGETS) $($(1)/subtargets), $(foreach target,$(SUBTARGETS) $($(1)/subtargets),
$(foreach btype,$(buildtypes-$(bd)), $(foreach btype,$(buildtypes-$(bd)),
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype)))) $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype))))
$(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant))) \ $(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)) \
|| $(call ERROR,$(2), ERROR: $(1)/$(bd) [$(btype)] failed to build.,$(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target)))) || $(call ERROR,$(2), ERROR: $(1)/$(bd) [$(btype)] failed to build.,$(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))))
$(if $(call diralias,$(bd)),$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(call diralias,$(bd))/$(btype)/$(target): $(1)/$(bd)/$(btype)/$(target))) $(if $(call diralias,$(bd)),$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(call diralias,$(bd))/$(btype)/$(target): $(1)/$(bd)/$(btype)/$(target)))
) )
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd)))) $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd))))
$(foreach variant,$(if $(BUILD_VARIANT),$(BUILD_VARIANT),$(if $(strip $($(1)/$(bd)/variants)),$($(1)/$(bd)/variants),$(if $($(1)/$(bd)/default-variant),$($(1)/$(bd)/default-variant),__default))), $(foreach variant,$(filter-out *,$(if $(BUILD_VARIANT),$(BUILD_VARIANT),$(if $(strip $($(1)/$(bd)/variants)),$($(1)/$(bd)/variants),$(if $($(1)/$(bd)/default-variant),$($(1)/$(bd)/default-variant),__default)))),
$(if $(BUILD_LOG),@mkdir -p $(BUILD_LOG_DIR)/$(1)/$(bd)/$(filter-out __default,$(variant))) $(if $(BUILD_LOG),@mkdir -p $(BUILD_LOG_DIR)/$(1)/$(bd)/$(filter-out __default,$(variant)))
$(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)))) $(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)))
$(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))) \ $(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)),$($(1)/$(bd)/variants)) \
|| $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).,$(findstring $(bd),$($(1)/builddirs-ignore-$(target)))) || $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).,$(findstring $(bd),$($(1)/builddirs-ignore-$(target))))
) )
$(if $(PREREQ_ONLY)$(DUMP_TARGET_DB),, $(if $(PREREQ_ONLY)$(DUMP_TARGET_DB),,

View File

@ -12,6 +12,7 @@ DEVICE_TYPE?=router
# Default packages - the really basic set # Default packages - the really basic set
DEFAULT_PACKAGES:=\ DEFAULT_PACKAGES:=\
base-files \ base-files \
ca-bundle \
dropbear \ dropbear \
fstools \ fstools \
libc \ libc \
@ -23,7 +24,8 @@ DEFAULT_PACKAGES:=\
opkg \ opkg \
uci \ uci \
uclient-fetch \ uclient-fetch \
urandom-seed urandom-seed \
urngd
ifneq ($(CONFIG_SELINUX),) ifneq ($(CONFIG_SELINUX),)
DEFAULT_PACKAGES+=busybox-selinux procd-selinux DEFAULT_PACKAGES+=busybox-selinux procd-selinux
@ -31,6 +33,16 @@ else
DEFAULT_PACKAGES+=busybox procd DEFAULT_PACKAGES+=busybox procd
endif endif
# include ujail on systems with enough storage
ifeq ($(CONFIG_SMALL_FLASH),)
DEFAULT_PACKAGES+=procd-ujail
endif
# include seccomp ld-preload hooks if kernel supports it
ifneq ($(CONFIG_SECCOMP),)
DEFAULT_PACKAGES+=procd-seccomp
endif
# For the basic set # For the basic set
DEFAULT_PACKAGES.basic:= DEFAULT_PACKAGES.basic:=
# For nas targets # For nas targets
@ -41,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
@ -54,7 +66,7 @@ endif
target_conf=$(subst .,_,$(subst -,_,$(subst /,_,$(1)))) target_conf=$(subst .,_,$(subst -,_,$(subst /,_,$(1))))
ifeq ($(DUMP),) ifeq ($(DUMP),)
PLATFORM_DIR:=$(TOPDIR)/target/linux/$(BOARD) PLATFORM_DIR:=$(firstword $(wildcard $(TOPDIR)/target/linux/feeds/$(BOARD) $(TOPDIR)/target/linux/$(BOARD)))
SUBTARGET:=$(strip $(foreach subdir,$(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)),$(if $(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(subdir))),$(subdir)))) SUBTARGET:=$(strip $(foreach subdir,$(patsubst $(PLATFORM_DIR)/%/target.mk,%,$(wildcard $(PLATFORM_DIR)/*/target.mk)),$(if $(CONFIG_TARGET_$(call target_conf,$(BOARD)_$(subdir))),$(subdir))))
else else
PLATFORM_DIR:=${CURDIR} PLATFORM_DIR:=${CURDIR}
@ -159,22 +171,30 @@ USE_SUBTARGET_CONFIG = $(if $(wildcard $(LINUX_TARGET_CONFIG)),,$(if $(LINUX_SUB
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG))) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG)))
LINUX_RECONFIG_TARGET = $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG),$(LINUX_TARGET_CONFIG)) LINUX_RECONFIG_TARGET = $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG),$(LINUX_TARGET_CONFIG))
CFG_TARGET = $(CONFIG_TARGET)
ifeq ($(CFG_TARGET),platform)
CFG_TARGET = target
$(warning Deprecation warning: use CONFIG_TARGET=target instead.)
else ifeq ($(CFG_TARGET),subtarget_platform)
CFG_TARGET = subtarget_target
$(warning Deprecation warning: use CONFIG_TARGET=subtarget_target instead.)
endif
# select the config file to be changed by kernel_menuconfig/kernel_oldconfig # select the config file to be changed by kernel_menuconfig/kernel_oldconfig
ifeq ($(CONFIG_TARGET),platform) ifeq ($(CFG_TARGET),target)
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG)) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG))
LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG) LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG)
endif else ifeq ($(CFG_TARGET),subtarget)
ifeq ($(CONFIG_TARGET),subtarget)
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(LINUX_SUBTARGET_CONFIG)) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(LINUX_SUBTARGET_CONFIG))
LINUX_RECONFIG_TARGET = $(LINUX_SUBTARGET_CONFIG) LINUX_RECONFIG_TARGET = $(LINUX_SUBTARGET_CONFIG)
endif else ifeq ($(CFG_TARGET),subtarget_target)
ifeq ($(CONFIG_TARGET),subtarget_platform)
LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_SUBTARGET_CONFIG) $(LINUX_TARGET_CONFIG)) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_SUBTARGET_CONFIG) $(LINUX_TARGET_CONFIG))
LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG) LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG)
endif else ifeq ($(CFG_TARGET),env)
ifeq ($(CONFIG_TARGET),env)
LINUX_RECONFIG_LIST = $(LINUX_KCONFIG_LIST) LINUX_RECONFIG_LIST = $(LINUX_KCONFIG_LIST)
LINUX_RECONFIG_TARGET = $(TOPDIR)/env/kernel-config LINUX_RECONFIG_TARGET = $(TOPDIR)/env/kernel-config
else ifneq ($(strip $(CFG_TARGET)),)
$(error CONFIG_TARGET=$(CFG_TARGET) is invalid. Valid: target|subtarget|subtarget_target|env)
endif endif
__linux_confcmd = $(2) $(patsubst %,+,$(wordlist 2,9999,$(1))) $(1) __linux_confcmd = $(2) $(patsubst %,+,$(wordlist 2,9999,$(1))) $(1)
@ -213,12 +233,14 @@ ifeq ($(DUMP),1)
ifeq ($(ARCH),powerpc) ifeq ($(ARCH),powerpc)
CPU_CFLAGS_603e:=-mcpu=603e CPU_CFLAGS_603e:=-mcpu=603e
CPU_CFLAGS_8540:=-mcpu=8540 CPU_CFLAGS_8540:=-mcpu=8540
CPU_CFLAGS_8548:=-mcpu=8548
CPU_CFLAGS_405:=-mcpu=405 CPU_CFLAGS_405:=-mcpu=405
CPU_CFLAGS_440:=-mcpu=440 CPU_CFLAGS_440:=-mcpu=440
CPU_CFLAGS_464fp:=-mcpu=464fp CPU_CFLAGS_464fp:=-mcpu=464fp
endif endif
ifeq ($(ARCH),powerpc64) ifeq ($(ARCH),powerpc64)
CPU_TYPE ?= powerpc64 CPU_TYPE ?= powerpc64
CPU_CFLAGS_e5500:=-mcpu=e5500
CPU_CFLAGS_powerpc64:=-mcpu=powerpc64 CPU_CFLAGS_powerpc64:=-mcpu=powerpc64
endif endif
ifeq ($(ARCH),sparc) ifeq ($(ARCH),sparc)
@ -236,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

@ -18,6 +18,6 @@ define FixupLibdir
mkdir -p $(1)/lib; \ mkdir -p $(1)/lib; \
mv $(1)/lib64/* $(1)/lib/; \ mv $(1)/lib64/* $(1)/lib/; \
rm -rf $(1)/lib64; \ rm -rf $(1)/lib64; \
ln -sf lib $(1)/lib64; \
fi fi
ln -sf lib $(1)/lib64
endef endef

View File

@ -51,11 +51,12 @@ path:=$(subst :,$(space),$(PATH))
path:=$(filter-out .%,$(path)) path:=$(filter-out .%,$(path))
path:=$(subst $(space),:,$(path)) path:=$(subst $(space),:,$(path))
export PATH:=$(path) export PATH:=$(path)
export STAGING_DIR_HOST:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host),$(TOPDIR)/staging_dir/host)
unexport TAR_OPTIONS unexport TAR_OPTIONS
ifeq ($(FORCE),) ifeq ($(FORCE),)
.config scripts/config/conf scripts/config/mconf: staging_dir/host/.prereq-build .config scripts/config/conf scripts/config/mconf: $(STAGING_DIR_HOST)/.prereq-build
endif endif
SCAN_COOKIE?=$(shell echo $$$$) SCAN_COOKIE?=$(shell echo $$$$)
@ -65,7 +66,7 @@ SUBMAKE:=umask 022; $(SUBMAKE)
ULIMIT_FIX=_limit=`ulimit -n`; [ "$$_limit" = "unlimited" -o "$$_limit" -ge 1024 ] || ulimit -n 1024; ULIMIT_FIX=_limit=`ulimit -n`; [ "$$_limit" = "unlimited" -o "$$_limit" -ge 1024 ] || ulimit -n 1024;
prepare-mk: staging_dir/host/.prereq-build FORCE ; prepare-mk: $(STAGING_DIR_HOST)/.prereq-build FORCE ;
ifdef SDK ifdef SDK
IGNORE_PACKAGES = linux IGNORE_PACKAGES = linux
@ -74,10 +75,10 @@ endif
_ignore = $(foreach p,$(IGNORE_PACKAGES),--ignore $(p)) _ignore = $(foreach p,$(IGNORE_PACKAGES),--ignore $(p))
prepare-tmpinfo: FORCE prepare-tmpinfo: FORCE
@+$(MAKE) -r -s staging_dir/host/.prereq-build $(PREP_MK) @+$(MAKE) -r -s $(STAGING_DIR_HOST)/.prereq-build $(PREP_MK)
mkdir -p tmp/info mkdir -p tmp/info
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPTH=5 SCAN_EXTRA="" $(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPTH=5 SCAN_EXTRA=""
$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPTH=2 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1" $(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPTH=3 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
for type in package target; do \ for type in package target; do \
f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \ f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
[ "$$t" -nt "$$f" ] || ./scripts/$${type}-metadata.pl $(_ignore) config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \ [ "$$t" -nt "$$f" ] || ./scripts/$${type}-metadata.pl $(_ignore) config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
@ -101,7 +102,7 @@ ifneq ($(DISTRO_PKG_CONFIG),)
scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH) scripts/config/%onf: export PATH:=$(dir $(DISTRO_PKG_CONFIG)):$(PATH)
endif endif
scripts/config/%onf: CFLAGS+= -O2 scripts/config/%onf: CFLAGS+= -O2
scripts/config/%onf: scripts/config/%onf: FORCE
@$(_SINGLE)$(SUBMAKE) $(if $(findstring s,$(OPENWRT_VERBOSE)),,-s) \ @$(_SINGLE)$(SUBMAKE) $(if $(findstring s,$(OPENWRT_VERBOSE)),,-s) \
-C scripts/config $(notdir $@) -C scripts/config $(notdir $@)
@ -151,7 +152,7 @@ xconfig: scripts/config/qconf prepare-tmpinfo FORCE
prepare_kernel_conf: .config toolchain/install FORCE prepare_kernel_conf: .config toolchain/install FORCE
ifeq ($(wildcard staging_dir/host/bin/quilt),) ifeq ($(wildcard $(STAGING_DIR_HOST)/bin/quilt),)
prepare_kernel_conf: prepare_kernel_conf:
@+$(SUBMAKE) -r tools/quilt/compile @+$(SUBMAKE) -r tools/quilt/compile
else else
@ -175,7 +176,7 @@ kernel_nconfig: prepare_kernel_conf
kernel_xconfig: prepare_kernel_conf kernel_xconfig: prepare_kernel_conf
$(_SINGLE)$(NO_TRACE_MAKE) -C target/linux xconfig $(_SINGLE)$(NO_TRACE_MAKE) -C target/linux xconfig
staging_dir/host/.prereq-build: include/prereq-build.mk $(STAGING_DIR_HOST)/.prereq-build: include/prereq-build.mk
mkdir -p tmp mkdir -p tmp
@$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \ @$(_SINGLE)$(NO_TRACE_MAKE) -j1 -r -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
echo "Prerequisite check failed. Use FORCE=1 to override."; \ echo "Prerequisite check failed. Use FORCE=1 to override."; \
@ -198,7 +199,7 @@ else
DOWNLOAD_DIRS = package/download DOWNLOAD_DIRS = package/download
endif endif
download: .config FORCE $(if $(wildcard $(TOPDIR)/staging_dir/host/bin/flock),,tools/flock/compile) download: .config FORCE $(if $(wildcard $(STAGING_DIR_HOST)/bin/flock),,tools/flock/compile)
@+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);) @+$(foreach dir,$(DOWNLOAD_DIRS),$(SUBMAKE) $(dir);)
clean dirclean: .config clean dirclean: .config
@ -262,7 +263,7 @@ distclean:
@$(_SINGLE)$(SUBMAKE) -C scripts/config clean @$(_SINGLE)$(SUBMAKE) -C scripts/config clean
ifeq ($(findstring v,$(DEBUG)),) ifeq ($(findstring v,$(DEBUG)),)
.SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig staging_dir/host/.prereq-build tmp/.prereq-package prepare-tmpinfo .SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig $(STAGING_DIR_HOST)/.prereq-build tmp/.prereq-package prepare-tmpinfo
endif endif
.PHONY: help FORCE .PHONY: help FORCE
.NOTPARALLEL: .NOTPARALLEL:

View File

@ -1,9 +1,9 @@
PKG_NAME ?= trusted-firmware-a PKG_NAME ?= trusted-firmware-a
PKG_CPE_ID ?= cpe:/a:arm:arm_trusted_firmware 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)
@ -68,6 +68,9 @@ define Build/Trusted-Firmware-A/Target
endef endef
endef endef
define Build/Configure/Trusted-Firmware-A
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
endef
DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc) DTC=$(wildcard $(LINUX_DIR)/scripts/dtc/dtc)
@ -78,6 +81,7 @@ define Build/Compile/Trusted-Firmware-A
$(if $(DTC),DTC="$(DTC)") \ $(if $(DTC),DTC="$(DTC)") \
PLAT=$(PLAT) \ PLAT=$(PLAT) \
BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \ BUILD_STRING="OpenWrt v$(PKG_VERSION)-$(PKG_RELEASE) ($(VARIANT))" \
$(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
$(TFA_MAKE_FLAGS) $(TFA_MAKE_FLAGS)
endef endef

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
@ -45,6 +45,11 @@ UBOOT_MAKE_FLAGS = \
HOSTCC="$(HOSTCC)" \ HOSTCC="$(HOSTCC)" \
HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \ HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \
HOSTLDFLAGS="$(HOST_LDFLAGS)" \ HOSTLDFLAGS="$(HOST_LDFLAGS)" \
LOCALVERSION="-OpenWrt-$(REVISION)" \
STAGING_PREFIX="$(STAGING_DIR_HOST)" \
PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig" \
PKG_CONFIG_LIBDIR="$(STAGING_DIR_HOST)/lib/pkgconfig" \
PKG_CONFIG_EXTRAARGS="--static" \
$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') $(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='')
define Build/U-Boot/Target define Build/U-Boot/Target

View File

@ -1,16 +1,2 @@
ifndef DUMP $(warn uclibc++.mk is deprecated. Please remove it and CXX_DEPENDS)
ifdef __package_mk CXX_DEPENDS = +libstdcpp
$(error uclibc++.mk must be included before package.mk)
endif
endif
PKG_PREPARED_DEPENDS += CONFIG_USE_UCLIBCXX
CXX_DEPENDS = +USE_UCLIBCXX:uclibcxx +USE_LIBSTDCXX:libstdcpp
ifneq ($(CONFIG_USE_UCLIBCXX),)
ifneq ($(CONFIG_CCACHE),)
TARGET_CXX_NOCACHE=g++-uc
else
TARGET_CXX=g++-uc
endif
endif

View File

@ -18,7 +18,7 @@ ifeq ($(strip $(UNPACK_CMD)),)
ifeq ($(filter gz tgz,$(EXT)),$(EXT)) ifeq ($(filter gz tgz,$(EXT)),$(EXT))
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=)) EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
DECOMPRESS_CMD:=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | DECOMPRESS_CMD:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc $(DL_DIR)/$(PKG_SOURCE) |
endif endif
ifeq ($(filter bzip2 bz2 bz tbz2 tbz,$(EXT)),$(EXT)) ifeq ($(filter bzip2 bz2 bz tbz2 tbz,$(EXT)),$(EXT))
EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=)) EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=))
@ -56,7 +56,7 @@ ifeq ($(strip $(UNPACK_CMD)),)
endif endif
# replace zcat with $(ZCAT), because some system don't support it properly # replace zcat with $(ZCAT), because some system don't support it properly
ifeq ($(PKG_CAT),zcat) ifeq ($(PKG_CAT),zcat)
UNPACK_CMD=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR_CMD) UNPACK_CMD=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR_CMD)
endif endif
endif endif
endif endif

View File

@ -29,15 +29,15 @@ ifeq ($(IS_TTY),1)
endif endif
endif endif
define ERROR_MESSAGE
printf "$(_R)%s$(_N)\n" "$(1)" >&8
endef
ifeq ($(findstring s,$(OPENWRT_VERBOSE)),) ifeq ($(findstring s,$(OPENWRT_VERBOSE)),)
define MESSAGE define MESSAGE
printf "$(_Y)%s$(_N)\n" "$(1)" >&8 printf "$(_Y)%s$(_N)\n" "$(1)" >&8
endef endef
define ERROR_MESSAGE
printf "$(_R)%s$(_N)\n" "$(1)" >&8
endef
ifeq ($(QUIET),1) ifeq ($(QUIET),1)
ifneq ($(CURDIR),$(TOPDIR)) ifneq ($(CURDIR),$(TOPDIR))
_DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR}) _DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
@ -60,5 +60,4 @@ else
define MESSAGE define MESSAGE
printf "%s\n" "$(1)" printf "%s\n" "$(1)"
endef endef
ERROR_MESSAGE=$(MESSAGE)
endif endif

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

@ -192,6 +192,15 @@ generate_network() {
EOF EOF
} }
;; ;;
ncm|\
qmi|\
mbim)
uci -q batch <<-EOF
set network.$1.proto='${protocol}'
set network.$1.pdptype='ipv4'
EOF
;;
esac esac
} }
@ -287,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'
@ -297,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

@ -48,6 +48,7 @@ boot() {
/bin/config_generate /bin/config_generate
uci_apply_defaults uci_apply_defaults
sync
# temporary hack until configd exists # temporary hack until configd exists
/sbin/reload_config /sbin/reload_config

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

@ -8,23 +8,33 @@ RTC_DEV=/dev/rtc0
HWCLOCK=/sbin/hwclock HWCLOCK=/sbin/hwclock
boot() { boot() {
start && exit 0 hwclock_load
local maxtime="$(find_max_time)"
local maxtime="$(maxtime)"
local curtime="$(date +%s)" local curtime="$(date +%s)"
[ $curtime -lt $maxtime ] && date -s @$maxtime if [ $curtime -lt $maxtime ]; then
date -s @$maxtime
hwclock_save
fi
} }
start() { start() {
[ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -s -u -f $RTC_DEV hwclock_load
} }
stop() { stop() {
hwclock_save
}
hwclock_load() {
[ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -s -u -f $RTC_DEV
}
hwclock_save(){
[ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -w -u -f $RTC_DEV && \ [ -e "$RTC_DEV" ] && [ -e "$HWCLOCK" ] && $HWCLOCK -w -u -f $RTC_DEV && \
logger -t sysfixtime "saved '$(date)' to $RTC_DEV" logger -t sysfixtime "saved '$(date)' to $RTC_DEV"
} }
maxtime() { find_max_time() {
local file newest local file newest
for file in $( find /etc -type f ) ; do for file in $( find /etc -type f ) ; do

View File

@ -4,10 +4,9 @@
START=10 START=10
USE_PROCD=1 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' \
@ -23,8 +22,9 @@ system_config() {
echo "$hostname" > /proc/sys/kernel/hostname echo "$hostname" > /proc/sys/kernel/hostname
[ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize} [ -z "$conloglevel" -a -z "$buffersize" ] || dmesg ${conloglevel:+-n $conloglevel} ${buffersize:+-s $buffersize}
echo "$timezone" > /tmp/TZ echo "$timezone" > /tmp/TZ
[ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/$zonename" ] && \ [ -n "$zonename" ] && [ -f "/usr/share/zoneinfo/${zonename// /_}" ] \
ln -sf "/usr/share/zoneinfo/$zonename" /tmp/localtime && rm -f /tmp/TZ && ln -sf "/usr/share/zoneinfo/${zonename// /_}" /tmp/localtime \
&& rm -f /tmp/TZ
# apply timezone to kernel # apply timezone to kernel
hwclock -u --systz hwclock -u --systz
@ -35,8 +35,7 @@ reload_service() {
config_foreach validate_system_section system system_config config_foreach validate_system_section system system_config
} }
service_triggers() service_triggers() {
{
procd_add_reload_trigger "system" procd_add_reload_trigger "system"
procd_add_validation validate_system_section procd_add_validation validate_system_section
} }

View File

@ -3,7 +3,7 @@
[ -f /etc/banner ] && cat /etc/banner [ -f /etc/banner ] && cat /etc/banner
[ -n "$FAILSAFE" ] && cat /etc/banner.failsafe [ -n "$FAILSAFE" ] && cat /etc/banner.failsafe
fgrep -sq '/ overlay ro,' /proc/mounts && { grep -Fsq '/ overlay ro,' /proc/mounts && {
echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.' echo 'Your JFFS2-partition seems full and overlayfs is mounted read-only.'
echo 'Please try to remove files from /overlay/upper/... and reboot!' echo 'Please try to remove files from /overlay/upper/... and reboot!'
} }

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

@ -1,4 +1,4 @@
root::0:0:99999:7::: root:::0:99999:7:::
daemon:*:0:0:99999:7::: daemon:*:0:0:99999:7:::
ftp:*:0:0:99999:7::: ftp:*:0:0:99999:7:::
network:*:0:0:99999:7::: network:*:0:0:99999:7:::

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
@ -250,4 +316,8 @@ macaddr_canonicalize() {
[ ${#canon} -ne 17 ] && return [ ${#canon} -ne 17 ] && return
printf "%02x:%02x:%02x:%02x:%02x:%02x" 0x${canon// / 0x} 2>/dev/null printf "%02x:%02x:%02x:%02x:%02x:%02x" 0x${canon// / 0x} 2>/dev/null
} }
dt_is_enabled() {
grep -q okay "/proc/device-tree/$1/status"
}

View File

@ -96,7 +96,7 @@ ucidef_set_interfaces_lan_wan() {
ucidef_set_bridge_device() { ucidef_set_bridge_device() {
json_select_object bridge json_select_object bridge
json_add_string name "${1:switch0}" json_add_string name "${1:-switch0}"
json_select .. json_select ..
} }
@ -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"
@ -629,6 +638,21 @@ ucidef_set_ntpserver() {
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() { board_config_update() {
json_init json_init
[ -f ${CFG} ] && json_load "$(cat ${CFG})" [ -f ${CFG} ] && json_load "$(cat ${CFG})"

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,6 +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
[ ! -f /etc/bench.log ] && touch /etc/bench.log
[ -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

@ -65,16 +65,9 @@ _v() {
[ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$*" >&2 [ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo "$*" >&2
} }
_vn() {
[ -n "$VERBOSE" ] && [ "$VERBOSE" -ge 1 ] && echo -n "$*" >&2
}
v() { v() {
_v "$(date) upgrade: $@" _v "$(date) upgrade: $@"
} logger -p info -t upgrade "$@"
vn() {
_vn "$(date) upgrade: $@"
} }
json_string() { json_string() {
@ -95,8 +88,7 @@ get_image() { # <source> [ <command> ]
if [ -z "$cmd" ]; then if [ -z "$cmd" ]; then
local magic="$(dd if="$from" bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')" local magic="$(dd if="$from" bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"')"
case "$magic" in case "$magic" in
1f8b) cmd="zcat";; 1f8b) cmd="busybox zcat";;
425a) cmd="bzcat";;
*) cmd="cat";; *) cmd="cat";;
esac esac
fi fi
@ -135,6 +127,33 @@ get_magic_fat32() {
(get_image "$@" | dd bs=1 count=5 skip=82) 2>/dev/null (get_image "$@" | dd bs=1 count=5 skip=82) 2>/dev/null
} }
identify_magic_long() {
local magic=$1
case "$magic" in
"55424923")
echo "ubi"
;;
"31181006")
echo "ubifs"
;;
"68737173")
echo "squashfs"
;;
"d00dfeed")
echo "fit"
;;
"4349"*)
echo "combined"
;;
"1f8b"*)
echo "gzip"
;;
*)
echo "unknown $magic"
;;
esac
}
part_magic_efi() { part_magic_efi() {
local magic=$(get_magic_gpt "$@") local magic=$(get_magic_gpt "$@")
[ "$magic" = "EFI PART" ] [ "$magic" = "EFI PART" ]
@ -146,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
@ -163,9 +199,11 @@ export_bootdevice() {
fi fi
done done
;; ;;
PARTUUID=????????-????-????-????-??????????0?/PARTNROFF=1 | \
PARTUUID=????????-????-????-????-??????????02) PARTUUID=????????-????-????-????-??????????02)
uuid="${rootpart#PARTUUID=}" uuid="${rootpart#PARTUUID=}"
uuid="${uuid%02}00" uuid="${uuid%/PARTNROFF=1}"
uuid="${uuid%0?}00"
for disk in $(find /dev -type b); do for disk in $(find /dev -type b); do
set -- $(dd if=$disk bs=1 skip=568 count=16 2>/dev/null | hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"') set -- $(dd if=$disk bs=1 skip=568 count=16 2>/dev/null | hexdump -v -e '8/1 "%02x "" "2/1 "%02x""-"6/1 "%02x"')
if [ "$4$3$2$1-$6$5-$8$7-$9" = "$uuid" ]; then if [ "$4$3$2$1-$6$5-$8$7-$9" = "$uuid" ]; then
@ -175,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] | \
@ -211,7 +250,7 @@ export_partdevice() {
while read line; do while read line; do
export -n "$line" export -n "$line"
done < "$uevent" done < "$uevent"
if [ $BOOTDEV_MAJOR = $MAJOR -a $(($BOOTDEV_MINOR + $offset)) = $MINOR -a -b "/dev/$DEVNAME" ]; then if [ "$BOOTDEV_MAJOR" = "$MAJOR" -a $(($BOOTDEV_MINOR + $offset)) = "$MINOR" -a -b "/dev/$DEVNAME" ]; then
export "$var=$DEVNAME" export "$var=$DEVNAME"
return 0 return 0
fi fi
@ -228,15 +267,6 @@ hex_le32_to_cpu() {
echo "$@" echo "$@"
} }
get_partition_by_name() {
for partname in /sys/class/block/$1/*/name; do
[ "$(cat ${partname})" = "$2" ] && {
basename ${partname%%/name}
break
}
done
}
get_partitions() { # <device> <filename> get_partitions() { # <device> <filename>
local disk="$1" local disk="$1"
local filename="$2" local filename="$2"

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
@ -128,14 +144,14 @@ wifi_updown() {
[ enable = "$1" ] && { [ enable = "$1" ] && {
_wifi_updown disable "$2" _wifi_updown disable "$2"
ubus_wifi_cmd "$cmd" "$2" ubus_wifi_cmd "$cmd" "$2"
ubus call network reload
scan_wifi scan_wifi
cmd=up cmd=up
ubus call network reload
} }
[ reconf = "$1" ] && { [ reconf = "$1" ] && {
ubus call network reload
scan_wifi scan_wifi
cmd=reconf cmd=reconf
ubus call network reload
} }
ubus_wifi_cmd "$cmd" "$2" ubus_wifi_cmd "$cmd" "$2"
_wifi_updown "$@" _wifi_updown "$@"
@ -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

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