From e1451a53e1262837392a4d56aea45f53d6d826c6 Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Mon, 20 Jan 2025 23:10:36 +0800 Subject: [PATCH 1/9] tools: add xxhash package for ccache The ccache build requires xxhash, which is download from the Internet. So add host-build package for xxhash. Fixes: #16851 Signed-off-by: Chukun Pan [ use git source proto ] Link: https://github.com/openwrt/openwrt/pull/17700 Signed-off-by: Christian Marangi --- tools/Makefile | 5 +++-- tools/xxhash/Makefile | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 tools/xxhash/Makefile diff --git a/tools/Makefile b/tools/Makefile index b16c5d9c5b..dd49ea5e10 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -146,8 +146,9 @@ endif ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),) $(foreach tool, $(filter-out zstd zlib xz pkgconf patch ninja meson libressl expat cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile)) -tools-y += ccache -$(curdir)/ccache/compile := $(curdir)/cmake/compile +tools-y += ccache xxhash +$(curdir)/xxhash/compile := $(curdir)/cmake/compile +$(curdir)/ccache/compile := $(curdir)/xxhash/compile endif # in case there is no patch tool on the host we need to make patch tool a diff --git a/tools/xxhash/Makefile b/tools/xxhash/Makefile new file mode 100644 index 0000000000..5d5754d63a --- /dev/null +++ b/tools/xxhash/Makefile @@ -0,0 +1,25 @@ +# SPDX-License-Identifier: GPL-2.0-only + +include $(TOPDIR)/rules.mk + +PKG_NAME:=xxHash +PKG_VERSION:=0.8.3 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL=https://github.com/Cyan4973/xxHash +PKG_SOURCE_VERSION:=e626a72bc2321cd320e953a0ccf1584cad60f363 +PKG_MIRROR_HASH:=234cfc24004c1b97d3ec9c48e976347b31a513a68de40f57a765667eb89dbbb0 + +PKG_LICENSE:=BSD-2-Clause +PKG_LICENSE_FILES:=LICENSE + +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/cmake.mk + +CMAKE_C_COMPILER_LAUNCHER := +CMAKE_CXX_COMPILER_LAUNCHER := + +CMAKE_BINARY_SUBDIR := build +CMAKE_SOURCE_SUBDIR := cmake_unofficial + +$(eval $(call HostBuild)) From 08ebb9e91401416e8c8fa0519ab431d7df4c2b2c Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Tue, 21 Jan 2025 23:10:28 +0800 Subject: [PATCH 2/9] tools: ccache: disable build testing The ccache build relies on doctest, which is useless and can be disabled. Signed-off-by: Chukun Pan Link: https://github.com/openwrt/openwrt/pull/17700 Signed-off-by: Christian Marangi --- tools/ccache/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile index 447bc3ea43..6a666a5680 100644 --- a/tools/ccache/Makefile +++ b/tools/ccache/Makefile @@ -22,6 +22,7 @@ CMAKE_HOST_OPTIONS += \ -DCMAKE_SKIP_RPATH=FALSE \ -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOST}/lib" \ -DENABLE_DOCUMENTATION=OFF \ - -DREDIS_STORAGE_BACKEND=OFF + -DREDIS_STORAGE_BACKEND=OFF \ + -DENABLE_TESTING=OFF $(eval $(call HostBuild)) From 47d605410e91516f0985f45013489136db3e6774 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 6 Feb 2025 12:37:48 +0100 Subject: [PATCH 3/9] ipq-wifi: update to Git HEAD (2025-02-06) 12948ce23744 Revert "ipq6018: add BDF for Edgecore EAP101" 6b3522faae1a ipq6018: add BDF for Edgecore EAP101 0411c6b1a00a ipq5018: add BDF for Linksys MX2000 feb4f2dfaa1b qcn6122: add BDF for Linksys MX2000 29819c35c8a5 ipq5018: add BDF for Linksys MX5500 38b0e9ee0f3c qcn9074: add BDF for Linksys MX5500 Link: https://github.com/openwrt/openwrt/pull/17877 Signed-off-by: Robert Marko --- package/firmware/ipq-wifi/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 408c821035..7748433528 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -6,9 +6,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git -PKG_SOURCE_DATE:=2025-01-15 -PKG_SOURCE_VERSION:=6e1801a4992fe72a98a2219f2dcd038194785971 -PKG_MIRROR_HASH:=569cf6894e21712ed6a5553b4fad0bbdeed14e0cc4b9292f5f86343f7897fc7e +PKG_SOURCE_DATE:=2025-02-06 +PKG_SOURCE_VERSION:=38b0e9ee0f3c55cda5b66736a47a68a663b220b9 +PKG_MIRROR_HASH:=be073d4afd116560d689ccb96beb0339195a939c9eb8d13d3bdb03ec6f1bcd7b PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/package.mk From b61c192e75a89db918e9bb236df3dd6dc9878181 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 6 Feb 2025 12:39:26 +0100 Subject: [PATCH 4/9] libiwinfo: update to Git HEAD (2025-02-06) 9ff15f7ee3a0 devices: add device id for MediaTek MT7992E 94b3a3c1a6c4 devices: add device id for Qualcomm Atheros IPQ5018 9cec6b4dd2df devices: add device id for Qualcomm Atheros QCN6122 Link: https://github.com/openwrt/openwrt/pull/17878 Signed-off-by: Robert Marko --- package/network/utils/iwinfo/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile index fe160f6ef3..35f47e33a8 100644 --- a/package/network/utils/iwinfo/Makefile +++ b/package/network/utils/iwinfo/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git -PKG_SOURCE_DATE:=2024-10-20 -PKG_SOURCE_VERSION:=b94f066e3f5839b8509483cdd8f4f582a45fa233 -PKG_MIRROR_HASH:=ee0bce167707fe78f68a951b7ee1e0e61a92cae281e0e24eb709857ae849777e +PKG_SOURCE_DATE:=2025-02-06 +PKG_SOURCE_VERSION:=9cec6b4dd2df80d4c02bad322a5db14203a92cba +PKG_MIRROR_HASH:=cf85caf5f343bf607dd8fbb412e1ea9f1b4474607a6d18f61e333f068124a966 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 From 98d7f4202fe9861fcdc64d694aecf6945bbc7de8 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Thu, 6 Feb 2025 20:29:03 +0100 Subject: [PATCH 5/9] qualcommax: disable IPQ5018 specific symbols Newly introduced IPQ5018 specific symbols will stop compilation of ipq807x and ipq60xx subtargets, so make sure to disable them in the generic config. Link: https://github.com/openwrt/openwrt/pull/17884 Signed-off-by: Robert Marko --- target/linux/qualcommax/config-6.6 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/linux/qualcommax/config-6.6 b/target/linux/qualcommax/config-6.6 index 3519557bcc..a24a617124 100644 --- a/target/linux/qualcommax/config-6.6 +++ b/target/linux/qualcommax/config-6.6 @@ -197,8 +197,10 @@ CONFIG_I2C_QUP=y CONFIG_IIO=y CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 CONFIG_INITRAMFS_SOURCE="" +# CONFIG_IPQ5018_PHY is not set CONFIG_IPQ_APSS_6018=y CONFIG_IPQ_APSS_PLL=y +# CONFIG_IPQ_CMN_PLL is not set # CONFIG_IPQ_GCC_4019 is not set # CONFIG_IPQ_GCC_5018 is not set # CONFIG_IPQ_GCC_5332 is not set @@ -333,6 +335,7 @@ CONFIG_PHY_QCOM_QMP_USB=y CONFIG_PHY_QCOM_QUSB2=y # CONFIG_PHY_QCOM_SGMII_ETH is not set # CONFIG_PHY_QCOM_SNPS_EUSB2 is not set +# CONFIG_PHY_QCOM_UNIPHY_PCIE_28LP is not set # CONFIG_PHY_QCOM_USB_HS_28NM is not set # CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2 is not set # CONFIG_PHY_QCOM_USB_SS is not set @@ -406,6 +409,7 @@ CONFIG_QCOM_NET_PHYLIB=y CONFIG_QCOM_PIL_INFO=y # CONFIG_QCOM_Q6V5_ADSP is not set CONFIG_QCOM_Q6V5_COMMON=y +# CONFIG_QCOM_Q6V5_MPD is not set # CONFIG_QCOM_Q6V5_MSS is not set # CONFIG_QCOM_Q6V5_PAS is not set CONFIG_QCOM_Q6V5_WCSS=y @@ -536,6 +540,7 @@ CONFIG_SPARSE_IRQ=y CONFIG_SPI=y CONFIG_SPI_MASTER=y CONFIG_SPI_MEM=y +# CONFIG_SPI_QPIC_SNAND is not set CONFIG_SPI_QUP=y CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y CONFIG_SWIOTLB=y From e585ae70d4f2a563b3b0e430e15ee19ad25caeb5 Mon Sep 17 00:00:00 2001 From: Mikhail Zhilkin Date: Tue, 4 Feb 2025 15:55:08 +0000 Subject: [PATCH 6/9] kernel: nmbm: add mediatek,bmt-mtd-overridden-oobsize property This commit adds new "mediatek,bmt-mtd-overridden-oobsize" property. The property helps avoid "NMBM configuration mismatch" error if mtd "OOB size" is not equal to the "spare size" which is stored in the nmbm signature. Signed-off-by: Mikhail Zhilkin Link: https://github.com/openwrt/openwrt/pull/17549 Signed-off-by: Robert Marko --- target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c b/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c index bcff7d6ac8..063adb50fb 100644 --- a/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c +++ b/target/linux/generic/files/drivers/mtd/nand/mtk_bmt.c @@ -407,6 +407,7 @@ int mtk_bmt_attach(struct mtd_info *mtd) { struct device_node *np; int ret = 0; + u32 overridden_oobsize = 0; if (bmtd.mtd) return -ENOSPC; @@ -431,6 +432,14 @@ int mtk_bmt_attach(struct mtd_info *mtd) bmtd.mtd = mtd; mtk_bmt_replace_ops(mtd); + if (!of_property_read_u32(np, "mediatek,bmt-mtd-overridden-oobsize", + &overridden_oobsize)) + if (overridden_oobsize < bmtd.mtd->oobsize) { + bmtd.mtd->oobsize = overridden_oobsize; + pr_info("NMBM: mtd OOB size has been overridden to %luB\n", + (long unsigned int)bmtd.mtd->oobsize); + } + bmtd.blk_size = mtd->erasesize; bmtd.blk_shift = ffs(bmtd.blk_size) - 1; bmtd.pg_size = mtd->writesize; From 3299d19c01080c3320e3ff6964d7825da81bb8b4 Mon Sep 17 00:00:00 2001 From: Mikhail Zhilkin Date: Tue, 4 Feb 2025 16:08:53 +0000 Subject: [PATCH 7/9] mediatek: fix nmbm configuration mismatch (Xiaomi AX3000t) This commit fixes nmbm configuration mismatch error on Xiaomi AX3000t with Winbond W25N01KVZEIR spi-nand: ''' [ 0.786783] NMBM configuration mismatch ''' Root cause: 1. U-Boot W25N01KV spi-nand driver ia compiled with 64B OOB size for the chip and store this size in the nmbm signature; 2. Linux W25N01KV driver use 96B OOB. The change doesn't affect AX3000t variants with other spi-nand chips (ESMT, Foresee) because their Linux drivers use 64B OOB. Fixes: openwrt#16972 Tested-by: Aleksandr Danilov Signed-off-by: Mikhail Zhilkin Link: https://github.com/openwrt/openwrt/pull/17549 Signed-off-by: Robert Marko --- target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts index cc0d44fdf5..d4b11cbe04 100644 --- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts +++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-ax3000t.dts @@ -12,6 +12,7 @@ mediatek,nmbm; mediatek,bmt-max-ratio = <1>; mediatek,bmt-max-reserved-blocks = <64>; + mediatek,bmt-mtd-overridden-oobsize = <64>; }; &partitions { From 411df8fbc449175b0f46cf0dab229a16176ed067 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Fri, 7 Feb 2025 10:12:25 +0100 Subject: [PATCH 8/9] qualcommax: ipq50xx: refresh kernel config Refresh the ipq50xx kernel config as it looks like it was created by hand instead of kernel_menuconfig so we have stuff like DWC3 which is packaged as a kmod in a generic way, QMI helpers are part of backports etc. Link: https://github.com/openwrt/openwrt/pull/17890 Signed-off-by: Robert Marko --- .../linux/qualcommax/ipq50xx/config-default | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/target/linux/qualcommax/ipq50xx/config-default b/target/linux/qualcommax/ipq50xx/config-default index 63c1d9dd97..cc06f0f41f 100644 --- a/target/linux/qualcommax/ipq50xx/config-default +++ b/target/linux/qualcommax/ipq50xx/config-default @@ -1,26 +1,21 @@ -CONFIG_QCOM_APM=y -CONFIG_IPQ_GCC_5018=y -CONFIG_PINCTRL_IPQ5018=y - -CONFIG_MTD_SPI_NAND=y -CONFIG_SPI_QPIC_SNAND=y - -CONFIG_IPQ_CMN_PLL=y +CONFIG_GRO_CELLS=y CONFIG_IPQ5018_PHY=y +CONFIG_IPQ_CMN_PLL=y +CONFIG_IPQ_GCC_5018=y +CONFIG_LEDS_PWM=y +CONFIG_MTD_SPI_NAND=y +CONFIG_NET_DEVLINK=y CONFIG_NET_DSA=y CONFIG_NET_DSA_QCA8K=y CONFIG_NET_DSA_TAG_QCA=y -CONFIG_QCA83XX_PHY=y - -CONFIG_QCOM_Q6V5_MPD=y -CONFIG_QCOM_QMI_HELPERS=y - +CONFIG_PHYLINK=y +CONFIG_PHY_QCOM_M31_USB=y CONFIG_PHY_QCOM_UNIPHY_PCIE_28LP=y -CONFIG_PCIE_QCOM=y - +CONFIG_PINCTRL_IPQ5018=y CONFIG_PWM=y CONFIG_PWM_IPQ=y -CONFIG_LEDS_PWM=y - -CONFIG_PHY_QCOM_M31_USB=y -CONFIG_USB_DWC3_QCOM=y +CONFIG_PWM_SYSFS=y +CONFIG_QCA83XX_PHY=y +CONFIG_QCOM_APM=y +CONFIG_QCOM_Q6V5_MPD=y +CONFIG_SPI_QPIC_SNAND=y From 6605e45676815156f0c47d4117ee401e6616fcac Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 7 Feb 2025 11:11:42 +0100 Subject: [PATCH 9/9] build: conditionally build llvm bpf toolchain by default Unless another toolchain is present (or selected), build the bpf toolchain whenever a package is selected that needs it. Signed-off-by: Felix Fietkau --- include/bpf.mk | 2 +- package/network/services/unetd/Makefile | 1 + toolchain/Config.in | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/bpf.mk b/include/bpf.mk index 2b7aa8512c..8a0121aabe 100644 --- a/include/bpf.mk +++ b/include/bpf.mk @@ -1,4 +1,4 @@ -BPF_DEPENDS := @HAS_BPF_TOOLCHAIN +BPF_DEPENDS := @HAS_BPF_TOOLCHAIN +@NEED_BPF_TOOLCHAIN LLVM_VER:= CLANG_MIN_VER:=12 diff --git a/package/network/services/unetd/Makefile b/package/network/services/unetd/Makefile index cc59b9100b..6923c68873 100644 --- a/package/network/services/unetd/Makefile +++ b/package/network/services/unetd/Makefile @@ -40,6 +40,7 @@ define Package/unetd/config bool "VXLAN support" depends on PACKAGE_unetd depends on HAS_BPF_TOOLCHAIN + select NEED_BPF_TOOLCHAIN default y endef diff --git a/toolchain/Config.in b/toolchain/Config.in index b4ba5b3b67..71ebbeb47b 100644 --- a/toolchain/Config.in +++ b/toolchain/Config.in @@ -40,9 +40,8 @@ menuconfig TARGET_OPTIONS choice BPF_TOOLCHAIN prompt "BPF toolchain" if DEVEL - default BPF_TOOLCHAIN_BUILD_LLVM if BUILDBOT default BPF_TOOLCHAIN_PREBUILT if HAS_PREBUILT_LLVM_TOOLCHAIN - default BPF_TOOLCHAIN_NONE + default BPF_TOOLCHAIN_BUILD_LLVM config BPF_TOOLCHAIN_NONE bool "None" @@ -57,7 +56,7 @@ menuconfig TARGET_OPTIONS bool "Use host LLVM toolchain" config BPF_TOOLCHAIN_BUILD_LLVM - select USE_LLVM_BUILD + select USE_LLVM_BUILD if NEED_BPF_TOOLCHAIN bool "Build LLVM toolchain for eBPF" help If enabled, a LLVM toolchain for building eBPF binaries will be built. @@ -320,23 +319,24 @@ config GDB_PYTHON Enable the python bindings for GDB to allow using python in the gdb shell. config HAS_BPF_TOOLCHAIN + default y if !BPF_TOOLCHAIN_NONE + bool + +config NEED_BPF_TOOLCHAIN bool config HAS_PREBUILT_LLVM_TOOLCHAIN def_bool $(shell, [ -f llvm-bpf/.llvm-version ] && echo y || echo n) config USE_LLVM_HOST - select HAS_BPF_TOOLCHAIN bool config USE_LLVM_PREBUILT - select HAS_BPF_TOOLCHAIN default y if !DEVEL && !BUILDBOT && HAS_PREBUILT_LLVM_TOOLCHAIN bool config USE_LLVM_BUILD - default y if !DEVEL && BUILDBOT - select HAS_BPF_TOOLCHAIN + default y if !DEVEL && NEED_BPF_TOOLCHAIN && (BUILDBOT || !HAS_PREBUILT_LLVM_TOOLCHAIN) bool config USE_GLIBC