Skip to content

Commit

Permalink
Merge branch 'coolsnowwolf:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ali2liu authored Dec 22, 2023
2 parents 392e2e0 + ccadf36 commit f283abb
Show file tree
Hide file tree
Showing 300 changed files with 3,247 additions and 2,603 deletions.
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
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 编译官方大群")

Expand All @@ -15,7 +17,6 @@ I18N: [English](README_EN.md) | [简体中文](README.md) | [日本語](README_J

[![r1](doc/r1.jpg)](https://item.taobao.com/item.htm?id=721197662185)


## 注意

1. **不要用 root 用户进行编译**
Expand All @@ -33,11 +34,11 @@ I18N: [English](README_EN.md) | [简体中文](README.md) | [日本語](README_J
sudo apt full-upgrade -y
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 \
git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \
libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \
mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \
libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \
vim wget xmlto xxd zlib1g-dev python3-setuptools
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 lrzsz mkisofs msmtp ninja-build p7zip p7zip-full patch pkgconf python2.7 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 并选择配置
Expand Down Expand Up @@ -77,14 +78,14 @@ make V=s -j$(nproc)
如果需要重新配置:

```bash
rm -rf ./tmp && rm -rf .config
rm -rf .config
make menuconfig
make V=s -j$(nproc)
```

编译完成后输出路径:bin/targets

### 如果你使用 WSL/WSL2 进行编译
### 使用 WSL/WSL2 进行编译

由于 WSL 的 PATH 中包含带有空格的 Windows 路径,有可能会导致编译失败,请在 `make` 前面加上:

Expand All @@ -95,7 +96,7 @@ 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
Build dependency: OpenWrt can only be built on a case-sensitive filesystem
```

一个比较简洁的解决方法是,在 `git clone` 前先创建 Repository 目录,并为其启用大小写敏感:
Expand Down Expand Up @@ -152,8 +153,6 @@ PS > git clone [email protected]:coolsnowwolf/lede.git <your_local_lede_path>

4. 存档版本仓库地址:<https://github.com/coolsnowwolf/openwrt>



## 捐贈

如果你觉得此项目对你有帮助,可以捐助我们,以鼓励项目能持续发展,更加完善
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-5.10
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.10 = .199
LINUX_KERNEL_HASH-5.10.199 = a0ea77a1f5eeb1387d62e7a8df585ffc53758e4da153d98224ccd833bd2624c1
LINUX_VERSION-5.10 = .204
LINUX_KERNEL_HASH-5.10.204 = ff950750b1060f65c0dde7d4d89238937d80faddf3bcf9ba28189d917daccaee
4 changes: 2 additions & 2 deletions include/kernel-5.15
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .138
LINUX_KERNEL_HASH-5.15.138 = af84e54164e1c01f59764ba528448ed36b377d22aafbd81b4b0cf47792ef4aaa
LINUX_VERSION-5.15 = .143
LINUX_KERNEL_HASH-5.15.143 = 096bb16ec07232f27f6a07998c41b655883a8d0a6bb613d39bf524a9ffd99e02
4 changes: 2 additions & 2 deletions include/kernel-5.4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.4 = .263
LINUX_KERNEL_HASH-5.4.263 = 50d0db9a94118b2d45f2ea1ed7b094cfd39f32829e4a2b51473dd3a8257735f8
LINUX_VERSION-5.4 = .265
LINUX_KERNEL_HASH-5.4.265 = 4dae99e49f466d4689e128ec023754908147159d7462019a83c7da1f25df9b15
4 changes: 2 additions & 2 deletions include/kernel-6.1
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.1 = .66
LINUX_KERNEL_HASH-6.1.66 = 419e62cd6c4239e6950b688db9e8753eb1e99c216dc3204f7932398a3fef1a0c
LINUX_VERSION-6.1 = .69
LINUX_KERNEL_HASH-6.1.69 = 7e3d2694d18ce502068cc88a430da809abbd17d0773268524ebece442612b541
2 changes: 1 addition & 1 deletion include/u-boot.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ PKG_FLAGS:=nonshared
PKG_LICENSE:=GPL-2.0 GPL-2.0+
PKG_LICENSE_FILES:=Licenses/README

PKG_BUILD_PARALLEL:=1
PKG_BUILD_PARALLEL ?= 1

export GCC_HONOUR_COPTS=s

Expand Down
30 changes: 25 additions & 5 deletions package/base-files/files/lib/functions/system.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,29 @@ find_mtd_chardev() {
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() {
local mtdname="$1"
local key="$2"
local part
local mac_dirty

part=$(find_mtd_part "$mtdname")
if [ -z "$part" ]; then
echo "mtd_get_mac_ascii: partition $mtdname not found!" >&2
return
fi

mac_dirty=$(strings "$part" | sed -n 's/^'"$key"'=//p')

# "canonicalize" mac
[ -n "$mac_dirty" ] && macaddr_canonicalize "$mac_dirty"
get_mac_ascii "$part" "$key"
}

mtd_get_mac_text() {
Expand Down Expand Up @@ -144,6 +151,19 @@ mtd_get_part_size() {
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
fi

get_mac_ascii "$part" "$key"
}

mmc_get_mac_binary() {
local part_name="$1"
local offset="$2"
Expand Down
1 change: 1 addition & 0 deletions package/kernel/linux/modules/usb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ define KernelPackage/usb-audio
CONFIG_SND_USB_AUDIO
$(call AddDepends/usb)
$(call AddDepends/sound)
DEPENDS += +LINUX_6_1:kmod-media-core
FILES:= \
$(LINUX_DIR)/sound/usb/snd-usbmidi-lib.ko \
$(LINUX_DIR)/sound/usb/snd-usb-audio.ko
Expand Down
24 changes: 20 additions & 4 deletions package/kernel/linux/modules/video.mk
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,23 @@ endef

$(eval $(call KernelPackage,fb-tft-ili9486))

define KernelPackage/media-core
SUBMENU:=$(VIDEO_MENU)
TITLE=Multimedia support
HIDDEN:=1
KCONFIG:= \
CONFIG_MEDIA_SUPPORT \
CONFIG_MEDIA_CAMERA_SUPPORT=y
FILES:=$(LINUX_DIR)/drivers/media/mc/mc.ko
AUTOLOAD:=$(call AutoProbe,mc)
endef

define KernelPackage/media-core/description
Kernel modules for media controller support
endef

$(eval $(call KernelPackage,media-core))

define KernelPackage/multimedia-input
SUBMENU:=$(VIDEO_MENU)
TITLE:=Multimedia input support
Expand Down Expand Up @@ -541,13 +558,12 @@ $(eval $(call KernelPackage,drm-nouveau))
define KernelPackage/video-core
SUBMENU:=$(VIDEO_MENU)
TITLE=Video4Linux support
DEPENDS:=+PACKAGE_kmod-i2c-core:kmod-i2c-core
DEPENDS:=+PACKAGE_kmod-i2c-core:kmod-i2c-core \
+LINUX_6_1:kmod-media-core
KCONFIG:= \
CONFIG_MEDIA_SUPPORT \
CONFIG_MEDIA_CAMERA_SUPPORT=y \
CONFIG_VIDEO_DEV \
CONFIG_V4L_PLATFORM_DRIVERS=y
FILES:=$(LINUX_DIR)/drivers/media/mc/[email protected] \
FILES:= \
$(LINUX_DIR)/drivers/media/$(V4L2_DIR)/videodev.ko
AUTOLOAD:=$(call AutoLoad,60, videodev v4l2-common)
endef
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -1260,6 +1260,9 @@ static int ath10k_debug_cal_data_fetch(struct ath10k *ar)
if (ar->hw_params.cal_data_len == 0)
return -EOPNOTSUPP;

@@ -1260,6 +1260,9 @@ static int ath10k_debug_cal_data_fetch(s
if (ar->hw_params.cal_data_len == 0)
return -EOPNOTSUPP;
+ if (ar->hif.bus == ATH10K_BUS_SDIO)
+ return -EINVAL;
+
hi_addr = host_interest_item_address(HI_ITEM(hi_board_data));

ret = ath10k_hif_diag_read(ar, hi_addr, &addr, sizeof(addr));
hi_addr = host_interest_item_address(HI_ITEM(hi_board_data));
ret = ath10k_hif_diag_read(ar, hi_addr, &addr, sizeof(addr));
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ v13:
err_spectral_destroy:
ath10k_spectral_destroy(ar);
err_debug_destroy:
@@ -3537,6 +3556,8 @@ void ath10k_core_unregister(struct ath10
@@ -3538,6 +3557,8 @@ void ath10k_core_unregister(struct ath10
if (!test_bit(ATH10K_FLAG_CORE_REGISTERED, &ar->dev_flags))
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Signed-off-by: David Bauer <[email protected]>

--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -10080,7 +10080,6 @@ int ath10k_mac_register(struct ath10k *a
@@ -10081,7 +10081,6 @@ int ath10k_mac_register(struct ath10k *a
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 6aafa1c2d3e3fea2ebe84c018003f2a91722e607 Mon Sep 17 00:00:00 2001
From: P Praneesh <[email protected]>
Date: Tue, 6 Jun 2023 14:41:28 +0530
Subject: [PATCH] wifi: ath11k: fix memory leak in WMI firmware stats

Memory allocated for firmware pdev, vdev and beacon statistics
are not released during rmmod.

Fix it by calling ath11k_fw_stats_free() function before hardware
unregister.

While at it, avoid calling ath11k_fw_stats_free() while processing
the firmware stats received in the WMI event because the local list
is getting spliced and reinitialised and hence there are no elements
in the list after splicing.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1

Signed-off-by: P Praneesh <[email protected]>
Signed-off-by: Aditya Kumar Singh <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
drivers/net/wireless/ath/ath11k/mac.c | 1 +
drivers/net/wireless/ath/ath11k/wmi.c | 5 +++++
2 files changed, 6 insertions(+)

--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -9792,6 +9792,7 @@ void ath11k_mac_destroy(struct ath11k_ba
if (!ar)
continue;

+ ath11k_fw_stats_free(&ar->fw_stats);
ieee80211_free_hw(ar->hw);
pdev->ar = NULL;
}
--- a/drivers/net/wireless/ath/ath11k/wmi.c
+++ b/drivers/net/wireless/ath/ath11k/wmi.c
@@ -8119,6 +8119,11 @@ complete:
rcu_read_unlock();
spin_unlock_bh(&ar->data_lock);

+ /* Since the stats's pdev, vdev and beacon list are spliced and reinitialised
+ * at this point, no need to free the individual list.
+ */
+ return;
+
free:
ath11k_fw_stats_free(&stats);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 16e0077e14a73866e9b0f4a6bf4ad3d4a5cb0f2a Mon Sep 17 00:00:00 2001
From: Jiasheng Jiang <[email protected]>
Date: Tue, 13 Jun 2023 12:19:40 +0300
Subject: [PATCH] wifi: ath11k: Add missing check for ioremap

Add check for ioremap() and return the error if it fails in order to
guarantee the success of ioremap(), same as in
ath11k_qmi_load_file_target_mem().

Fixes: 6ac04bdc5edb ("ath11k: Use reserved host DDR addresses from DT for PCI devices")
Signed-off-by: Jiasheng Jiang <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
drivers/net/wireless/ath/ath11k/qmi.c | 5 +++++
1 file changed, 5 insertions(+)

--- a/drivers/net/wireless/ath/ath11k/qmi.c
+++ b/drivers/net/wireless/ath/ath11k/qmi.c
@@ -2061,6 +2061,9 @@ static int ath11k_qmi_assign_target_mem_
ab->qmi.target_mem[idx].iaddr =
ioremap(ab->qmi.target_mem[idx].paddr,
ab->qmi.target_mem[i].size);
+ if (!ab->qmi.target_mem[idx].iaddr)
+ return -EIO;
+
ab->qmi.target_mem[idx].size = ab->qmi.target_mem[i].size;
host_ddr_sz = ab->qmi.target_mem[i].size;
ab->qmi.target_mem[idx].type = ab->qmi.target_mem[i].type;
@@ -2086,6 +2089,8 @@ static int ath11k_qmi_assign_target_mem_
ab->qmi.target_mem[idx].iaddr =
ioremap(ab->qmi.target_mem[idx].paddr,
ab->qmi.target_mem[i].size);
+ if (!ab->qmi.target_mem[idx].iaddr)
+ return -EIO;
} else {
ab->qmi.target_mem[idx].paddr =
ATH11K_QMI_CALDB_ADDRESS;
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 469ddb20cae61cad9c4f208a4c8682305905a511 Mon Sep 17 00:00:00 2001
From: Ziyang Huang <[email protected]>
Date: Thu, 15 Jun 2023 14:41:47 +0300
Subject: [PATCH] wifi: ath11k: Add missing ops config for IPQ5018 in
ath11k_ahb_probe()

Without this patch, the IPQ5018 WiFi will fail and print the following
logs:

[ 11.033179] ath11k c000000.wifi: unsupported device type 7
[ 11.033223] ath11k: probe of c000000.wifi failed with error -95

Fixes: 25edca7bb18a ("wifi: ath11k: add ipq5018 device support")
Signed-off-by: Ziyang Huang <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/TYZPR01MB5556D7AA10ABEDDDD2D8F39EC953A@TYZPR01MB5556.apcprd01.prod.exchangelabs.com
---
drivers/net/wireless/ath/ath11k/ahb.c | 1 +
1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -1127,6 +1127,7 @@ static int ath11k_ahb_probe(struct platf
switch (hw_rev) {
case ATH11K_HW_IPQ8074:
case ATH11K_HW_IPQ6018_HW10:
+ case ATH11K_HW_IPQ5018_HW10:
hif_ops = &ath11k_ahb_hif_ops_ipq8074;
pci_ops = NULL;
break;
Loading

0 comments on commit f283abb

Please sign in to comment.