diff --git a/include/kernel-6.1 b/include/kernel-6.1 index ebec105b22..748a6d683a 100644 --- a/include/kernel-6.1 +++ b/include/kernel-6.1 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.1 = .100 -LINUX_KERNEL_HASH-6.1.100 = b9aa6ec1a00f234d6c6f2d428fbb0a6bf459606c259263df978f86685b65a8b9 +LINUX_VERSION-6.1 = .102 +LINUX_KERNEL_HASH-6.1.102 = 1ba5f93b411ead7587fe48b2eec6c656f6796d31f5e406d236913c77512497ec diff --git a/include/kernel-6.6 b/include/kernel-6.6 index 24fff19d3b..4c6596969d 100644 --- a/include/kernel-6.6 +++ b/include/kernel-6.6 @@ -1,2 +1,2 @@ -LINUX_VERSION-6.6 = .41 -LINUX_KERNEL_HASH-6.6.41 = 9ec99c578158ab85d99b37791a76643d2ea4c3f72ecbef7b5eb6d60f3de032ef +LINUX_VERSION-6.6 = .43 +LINUX_KERNEL_HASH-6.6.43 = 0ad83b1a1a780a1aad948d55aa55ee63c50c626f2d46910b9d2180028d100a5e diff --git a/include/site/linux b/include/site/linux index b193d25c45..1dadd60bf3 100644 --- a/include/site/linux +++ b/include/site/linux @@ -37,7 +37,7 @@ ac_cv_func_rindex=yes ac_cv_func_setlocale=yes ac_cv_func_setgrent_void=yes ac_cv_func_setpgrp_void=yes -ac_cv_func_setresuid=no +ac_cv_func_setresuid=yes ac_cv_func_setvbuf_reversed=no ac_cv_func_stat_empty_string_bug=no ac_cv_func_stat_ignores_trailing_slash=no @@ -66,9 +66,12 @@ ac_cv_sctp=no ac_cv_sys_restartable_syscalls=yes ac_cv_time_r_type=POSIX ac_cv_type_suseconds_t=yes +ac_cv_size_t=yes +ac_cv_ssize_t=yes ac_cv_uchar=no ac_cv_uint=yes ac_cv_uint64_t=yes +ac_cv_uintptr_t=yes ac_cv_ulong=yes ac_cv_ushort=yes ac_cv_va_copy=C99 diff --git a/package/boot/uboot-ath79/Makefile b/package/boot/uboot-ath79/Makefile new file mode 100644 index 0000000000..d19f561576 --- /dev/null +++ b/package/boot/uboot-ath79/Makefile @@ -0,0 +1,39 @@ +include $(TOPDIR)/rules.mk +include $(INCLUDE_DIR)/kernel.mk + +PKG_VERSION:=2024.07 +PKG_HASH:=f591da9ab90ef3d6b3d173766d0ddff90c4ed7330680897486117df390d83c8f + +UBOOT_USE_INTREE_DTC:=1 + +include $(INCLUDE_DIR)/u-boot.mk +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define U-Boot/Default + BUILD_TARGET:=ath79 + BUILD_SUBTARGET:=generic + UBOOT_IMAGE:=u-boot.bin + UBOOT_CONFIG:=ap121 + HIDDEN:=1 +endef + +define U-Boot/ar9344_nec_aterm + NAME:=NEC Aterm series (AR9344) + BUILD_SUBTARGET:= tiny + BUILD_DEVICES:=nec_wg600hp nec_wr8750n nec_wr9500n + UBOOT_CONFIG:=nec_ar9344_aterm +endef + +UBOOT_TARGETS := ar9344_nec_aterm + +# don't stage files to bindir, let target/linux/ath79/image/*.mk do that +define Package/u-boot/install +endef + +define Build/InstallDev + $(INSTALL_DIR) $(STAGING_DIR_IMAGE) + $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) $(STAGING_DIR_IMAGE)/$(BUILD_VARIANT)-$(UBOOT_IMAGE) +endef + +$(eval $(call BuildPackage/U-Boot)) diff --git a/package/boot/uboot-ath79/patches/400-ath79-add-support-for-NEC-AR9344-Aterm-series.patch b/package/boot/uboot-ath79/patches/400-ath79-add-support-for-NEC-AR9344-Aterm-series.patch new file mode 100644 index 0000000000..833a7425b7 --- /dev/null +++ b/package/boot/uboot-ath79/patches/400-ath79-add-support-for-NEC-AR9344-Aterm-series.patch @@ -0,0 +1,287 @@ +From 80a7688c478a6a372083c29ff0b1826db4dae5b2 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Wed, 24 Apr 2024 23:54:46 +0900 +Subject: [PATCH] ath79: add support for NEC AR9344 Aterm series + +--- + arch/mips/dts/Makefile | 1 + + arch/mips/dts/nec,ar9344-aterm.dts | 35 +++++++++++++++ + arch/mips/mach-ath79/Kconfig | 5 +++ + board/nec/ar9344_aterm/Kconfig | 30 +++++++++++++ + board/nec/ar9344_aterm/Makefile | 3 ++ + board/nec/ar9344_aterm/ar9344_aterm.c | 59 ++++++++++++++++++++++++++ + configs/nec_ar9344_aterm_defconfig | 61 +++++++++++++++++++++++++++ + include/configs/nec_ar9344_aterm.h | 28 ++++++++++++ + 8 files changed, 222 insertions(+) + create mode 100644 arch/mips/dts/nec,ar9344-aterm.dts + create mode 100644 board/nec/ar9344_aterm/Kconfig + create mode 100644 board/nec/ar9344_aterm/Makefile + create mode 100644 board/nec/ar9344_aterm/ar9344_aterm.c + create mode 100644 configs/nec_ar9344_aterm_defconfig + create mode 100644 include/configs/nec_ar9344_aterm.h + +--- a/arch/mips/dts/Makefile ++++ b/arch/mips/dts/Makefile +@@ -24,6 +24,7 @@ dtb-$(CONFIG_BOARD_GARDENA_SMART_GATEWAY + dtb-$(CONFIG_BOARD_LINKIT_SMART_7688) += linkit-smart-7688.dtb + dtb-$(CONFIG_TARGET_OCTEON_EBB7304) += mrvl,octeon-ebb7304.dtb + dtb-$(CONFIG_TARGET_OCTEON_NIC23) += mrvl,octeon-nic23.dtb ++dtb-$(CONFIG_BOARD_NEC_AR9344_ATERM) += nec,ar9344-aterm.dtb + dtb-$(CONFIG_BOARD_NETGEAR_CG3100D) += netgear,cg3100d.dtb + dtb-$(CONFIG_BOARD_NETGEAR_DGND3700V2) += netgear,dgnd3700v2.dtb + dtb-$(CONFIG_BOARD_SAGEM_FAST1704) += sagem,f@st1704.dtb +--- /dev/null ++++ b/arch/mips/dts/nec,ar9344-aterm.dts +@@ -0,0 +1,35 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright (C) 2024 INAGAKI Hiroshi ++ */ ++ ++/dts-v1/; ++#include "ar934x.dtsi" ++ ++/ { ++ model = "NEC Aterm series (AR9344)"; ++ compatible = "nec,ar9344-aterm", "qca,ar934x"; ++ ++ aliases { ++ serial0 = &uart0; ++ }; ++ ++ chosen { ++ stdout-path = "serial0:9600n8"; ++ }; ++}; ++ ++&uart0 { ++ clock-frequency = <40000000>; ++ status = "okay"; ++}; ++ ++&xtal { ++ clock-frequency = <40000000>; ++}; ++ ++/* delete unused nodes to reduce dtb size */ ++/delete-node/ &ehci0; ++/delete-node/ &gmac0; ++/delete-node/ &gmac1; ++/delete-node/ &spi0; +--- a/arch/mips/mach-ath79/Kconfig ++++ b/arch/mips/mach-ath79/Kconfig +@@ -58,6 +58,10 @@ config TARGET_AP152 + bool "AP152 Reference Board" + select SOC_QCA956X + ++config BOARD_NEC_AR9344_ATERM ++ bool "NEC Aterm series Boards (AR9344)" ++ select SOC_AR934X ++ + config BOARD_TPLINK_WDR4300 + bool "TP-Link WDR4300 Board" + select SOC_AR934X +@@ -67,6 +71,7 @@ endchoice + source "board/qca/ap121/Kconfig" + source "board/qca/ap143/Kconfig" + source "board/qca/ap152/Kconfig" ++source "board/nec/ar9344_aterm/Kconfig" + source "board/tplink/wdr4300/Kconfig" + + endmenu +--- /dev/null ++++ b/board/nec/ar9344_aterm/Kconfig +@@ -0,0 +1,30 @@ ++if BOARD_NEC_AR9344_ATERM ++ ++config SYS_VENDOR ++ default "nec" ++ ++config SYS_SOC ++ default "ath79" ++ ++config SYS_BOARD ++ default "ar9344_aterm" ++ ++config SYS_CONFIG_NAME ++ default "nec_ar9344_aterm" ++ ++config TEXT_BASE ++ default 0x9f000000 ++ ++config SYS_DCACHE_SIZE ++ default 32768 ++ ++config SYS_DCACHE_LINE_SIZE ++ default 32 ++ ++config SYS_ICACHE_SIZE ++ default 65536 ++ ++config SYS_ICACHE_LINE_SIZE ++ default 32 ++ ++endif +--- /dev/null ++++ b/board/nec/ar9344_aterm/Makefile +@@ -0,0 +1,3 @@ ++# SPDX-License-Identifier: GPL-2.0+ ++ ++obj-y = ar9344_aterm.o +--- /dev/null ++++ b/board/nec/ar9344_aterm/ar9344_aterm.c +@@ -0,0 +1,59 @@ ++// SPDX-License-Identifier: GPL-2.0+ ++/* ++ * Copyright (C) 2024 INAGAKI Hiroshi ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static void aterm_pinmux_config(void) ++{ ++ void __iomem *regs; ++ ++ regs = map_physmem(AR71XX_GPIO_BASE, AR71XX_GPIO_SIZE, ++ MAP_NOCACHE); ++ ++ /* Disable JTAG */ ++ writel(0x2, regs + AR934X_GPIO_REG_FUNC); ++ ++ /* Configure default GPIO OE/SET regs */ ++ writel(0x3db1f, regs + AR71XX_GPIO_REG_OE); ++ writel(0x142000, regs + AR71XX_GPIO_REG_SET); ++ ++ /* Configure pin multiplexing */ ++ writel(0x00000000, regs + AR934X_GPIO_REG_OUT_FUNC0); ++ writel(0x0b0a0900, regs + AR934X_GPIO_REG_OUT_FUNC1); ++ writel(0x00180000, regs + AR934X_GPIO_REG_OUT_FUNC2); ++ writel(0x00000000, regs + AR934X_GPIO_REG_OUT_FUNC3); ++ writel(0x2f2e0000, regs + AR934X_GPIO_REG_OUT_FUNC4); ++ writel(0x00000000, regs + AR934X_GPIO_REG_OUT_FUNC5); ++} ++ ++#ifdef CONFIG_DEBUG_UART_BOARD_INIT ++void board_debug_uart_init(void) ++{ ++ aterm_pinmux_config(); ++} ++#endif ++ ++#ifdef CONFIG_BOARD_EARLY_INIT_F ++int board_early_init_f(void) ++{ ++#ifndef CONFIG_DEBUG_UART_BOARD_INIT ++ aterm_pinmux_config(); ++#endif ++ ++#if !CONFIG_IS_ENABLED(SKIP_LOWLEVEL_INIT) ++ ar934x_pll_init(560, 480, 240); ++ ar934x_ddr_init(560, 480, 240); ++#endif ++ ++ return 0; ++} ++#endif +--- /dev/null ++++ b/configs/nec_ar9344_aterm_defconfig +@@ -0,0 +1,61 @@ ++CONFIG_MIPS=y ++CONFIG_SYS_MALLOC_LEN=0x40000 ++CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y ++CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xbd007fff ++CONFIG_ENV_SIZE=0x1000 ++CONFIG_DEFAULT_DEVICE_TREE="nec,ar9344-aterm" ++CONFIG_SYS_LOAD_ADDR=0x83000000 ++CONFIG_ARCH_ATH79=y ++CONFIG_BOARD_NEC_AR9344_ATERM=y ++CONFIG_SYS_MIPS_TIMER_FREQ=280000000 ++CONFIG_MIPS_RELOCATION_TABLE_SIZE=0x4000 ++# CONFIG_LOCALVERSION_AUTO is not set ++CONFIG_TIMESTAMP=y ++CONFIG_BOOTDELAY=3 ++# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set ++CONFIG_USE_BOOTARGS=y ++CONFIG_BOOTARGS="console=ttyS0,115200" ++CONFIG_USE_BOOTCOMMAND=y ++CONFIG_BOOTCOMMAND="bootm 0x9f040000" ++# CONFIG_DISPLAY_BOARDINFO is not set ++CONFIG_BOARD_EARLY_INIT_F=y ++CONFIG_SYS_MALLOC_BOOTPARAMS=y ++# CONFIG_CMDLINE_EDITING is not set ++# CONFIG_AUTO_COMPLETE is not set ++# CONFIG_SYS_LONGHELP is not set ++CONFIG_SYS_MAXARGS=32 ++# CONFIG_SYS_XTRACE is not set ++# CONFIG_CMD_BDI is not set ++# CONFIG_CMD_CONSOLE is not set ++# CONFIG_BOOTM_PLAN9 is not set ++# CONFIG_BOOTM_RTEMS is not set ++# CONFIG_BOOTM_VXWORKS is not set ++# CONFIG_CMD_ELF is not set ++# CONFIG_CMD_FDT is not set ++# CONFIG_CMD_RUN is not set ++# CONFIG_CMD_XIMG is not set ++# CONFIG_CMD_EXPORTENV is not set ++# CONFIG_CMD_IMPORTENV is not set ++# CONFIG_CMD_EDITENV is not set ++# CONFIG_CMD_SAVEENV is not set ++# CONFIG_CMD_ENV_EXISTS is not set ++# CONFIG_CMD_CRC32 is not set ++# CONFIG_CMD_DM is not set ++# CONFIG_CMD_LOADS is not set ++# CONFIG_CMD_ECHO is not set ++# CONFIG_CMD_ITEST is not set ++# CONFIG_CMD_SOURCE is not set ++# CONFIG_CMD_SETEXPR is not set ++# CONFIG_CMD_SLEEP is not set ++# CONFIG_ISO_PARTITION is not set ++# CONFIG_OF_TAG_MIGRATE is not set ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++# CONFIG_NET is not set ++CONFIG_CLK=y ++# CONFIG_GPIO is not set ++# CONFIG_I2C is not set ++# CONFIG_INPUT is not set ++# CONFIG_POWER is not set ++CONFIG_DM_SERIAL=y ++CONFIG_SYS_NS16550=y ++# CONFIG_GZIP is not set +--- /dev/null ++++ b/include/configs/nec_ar9344_aterm.h +@@ -0,0 +1,28 @@ ++/* SPDX-License-Identifier: GPL-2.0+ */ ++/* ++ * Copyright (C) 2024 INAGAKI Hiroshi ++ */ ++ ++#ifndef __NEC_AR9344_ATERM_H ++#define __NEC_AR9344_ATERM_H ++ ++#define CFG_SYS_SDRAM_BASE 0x80000000 ++ ++#define CFG_SYS_INIT_RAM_ADDR 0xbd000000 ++#define CFG_SYS_INIT_RAM_SIZE 0x8000 ++ ++/* ++ * Serial Port ++ */ ++#define CFG_SYS_NS16550_CLK 40000000 ++ ++/* ++ * Command ++ */ ++/* Miscellaneous configurable options */ ++ ++/* ++ * Diagnostics ++ */ ++ ++#endif /* __NEC_AR9344_ATERM_H */ diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c index 8c829f9c6b..3ff01d588a 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_adsl.c @@ -126,7 +126,7 @@ static int ptm_stop(struct net_device *); static unsigned int ptm_poll(int, unsigned int); static int ptm_napi_poll(struct napi_struct *, int); static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *); -static int ptm_ioctl(struct net_device *, struct ifreq *, int); +static int ptm_ioctl(struct net_device *, struct ifreq *, void __user *, int); #if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) static void ptm_tx_timeout(struct net_device *); #else @@ -247,7 +247,7 @@ static struct net_device_ops g_ptm_netdev_ops = { .ndo_start_xmit = ptm_hard_start_xmit, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = eth_mac_addr, - .ndo_do_ioctl = ptm_ioctl, + .ndo_siocdevprivate = ptm_ioctl, .ndo_tx_timeout = ptm_tx_timeout, }; @@ -459,7 +459,7 @@ PTM_HARD_START_XMIT_FAIL: return NETDEV_TX_OK; } -static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, void __user *data, int cmd) { int ndev; @@ -469,45 +469,45 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) switch ( cmd ) { case IFX_PTM_MIB_CW_GET: - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxNoIdleCodewords = WAN_MIB_TABLE[ndev].wrx_nonidle_cw; - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxIdleCodewords = WAN_MIB_TABLE[ndev].wrx_idle_cw; - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxCodingViolation = WAN_MIB_TABLE[ndev].wrx_err_cw; - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifTxNoIdleCodewords = 0; - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifTxIdleCodewords = 0; + ((PTM_CW_IF_ENTRY_T *)data)->ifRxNoIdleCodewords = WAN_MIB_TABLE[ndev].wrx_nonidle_cw; + ((PTM_CW_IF_ENTRY_T *)data)->ifRxIdleCodewords = WAN_MIB_TABLE[ndev].wrx_idle_cw; + ((PTM_CW_IF_ENTRY_T *)data)->ifRxCodingViolation = WAN_MIB_TABLE[ndev].wrx_err_cw; + ((PTM_CW_IF_ENTRY_T *)data)->ifTxNoIdleCodewords = 0; + ((PTM_CW_IF_ENTRY_T *)data)->ifTxIdleCodewords = 0; break; case IFX_PTM_MIB_FRAME_GET: - ((PTM_FRAME_MIB_T *)ifr->ifr_data)->RxCorrect = WAN_MIB_TABLE[ndev].wrx_correct_pdu; - ((PTM_FRAME_MIB_T *)ifr->ifr_data)->TC_CrcError = WAN_MIB_TABLE[ndev].wrx_tccrc_err_pdu; - ((PTM_FRAME_MIB_T *)ifr->ifr_data)->RxDropped = WAN_MIB_TABLE[ndev].wrx_nodesc_drop_pdu + WAN_MIB_TABLE[ndev].wrx_len_violation_drop_pdu; - ((PTM_FRAME_MIB_T *)ifr->ifr_data)->TxSend = WAN_MIB_TABLE[ndev].wtx_total_pdu; + ((PTM_FRAME_MIB_T *)data)->RxCorrect = WAN_MIB_TABLE[ndev].wrx_correct_pdu; + ((PTM_FRAME_MIB_T *)data)->TC_CrcError = WAN_MIB_TABLE[ndev].wrx_tccrc_err_pdu; + ((PTM_FRAME_MIB_T *)data)->RxDropped = WAN_MIB_TABLE[ndev].wrx_nodesc_drop_pdu + WAN_MIB_TABLE[ndev].wrx_len_violation_drop_pdu; + ((PTM_FRAME_MIB_T *)data)->TxSend = WAN_MIB_TABLE[ndev].wtx_total_pdu; break; case IFX_PTM_CFG_GET: - ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcPresent = CFG_ETH_EFMTC_CRC->rx_eth_crc_present; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcCheck = CFG_ETH_EFMTC_CRC->rx_eth_crc_check; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcCheck = CFG_ETH_EFMTC_CRC->rx_tc_crc_check; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen = CFG_ETH_EFMTC_CRC->rx_tc_crc_len; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxEthCrcGen = CFG_ETH_EFMTC_CRC->tx_eth_crc_gen; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcGen = CFG_ETH_EFMTC_CRC->tx_tc_crc_gen; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen = CFG_ETH_EFMTC_CRC->tx_tc_crc_len; + ((IFX_PTM_CFG_T *)data)->RxEthCrcPresent = CFG_ETH_EFMTC_CRC->rx_eth_crc_present; + ((IFX_PTM_CFG_T *)data)->RxEthCrcCheck = CFG_ETH_EFMTC_CRC->rx_eth_crc_check; + ((IFX_PTM_CFG_T *)data)->RxTcCrcCheck = CFG_ETH_EFMTC_CRC->rx_tc_crc_check; + ((IFX_PTM_CFG_T *)data)->RxTcCrcLen = CFG_ETH_EFMTC_CRC->rx_tc_crc_len; + ((IFX_PTM_CFG_T *)data)->TxEthCrcGen = CFG_ETH_EFMTC_CRC->tx_eth_crc_gen; + ((IFX_PTM_CFG_T *)data)->TxTcCrcGen = CFG_ETH_EFMTC_CRC->tx_tc_crc_gen; + ((IFX_PTM_CFG_T *)data)->TxTcCrcLen = CFG_ETH_EFMTC_CRC->tx_tc_crc_len; break; case IFX_PTM_CFG_SET: - CFG_ETH_EFMTC_CRC->rx_eth_crc_present = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcPresent ? 1 : 0; - CFG_ETH_EFMTC_CRC->rx_eth_crc_check = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcCheck ? 1 : 0; - if ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcCheck && (((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen == 16 || ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen == 32) ) + CFG_ETH_EFMTC_CRC->rx_eth_crc_present = ((IFX_PTM_CFG_T *)data)->RxEthCrcPresent ? 1 : 0; + CFG_ETH_EFMTC_CRC->rx_eth_crc_check = ((IFX_PTM_CFG_T *)data)->RxEthCrcCheck ? 1 : 0; + if ( ((IFX_PTM_CFG_T *)data)->RxTcCrcCheck && (((IFX_PTM_CFG_T *)data)->RxTcCrcLen == 16 || ((IFX_PTM_CFG_T *)data)->RxTcCrcLen == 32) ) { CFG_ETH_EFMTC_CRC->rx_tc_crc_check = 1; - CFG_ETH_EFMTC_CRC->rx_tc_crc_len = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen; + CFG_ETH_EFMTC_CRC->rx_tc_crc_len = ((IFX_PTM_CFG_T *)data)->RxTcCrcLen; } else { CFG_ETH_EFMTC_CRC->rx_tc_crc_check = 0; CFG_ETH_EFMTC_CRC->rx_tc_crc_len = 0; } - CFG_ETH_EFMTC_CRC->tx_eth_crc_gen = ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxEthCrcGen ? 1 : 0; - if ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcGen && (((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen == 16 || ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen == 32) ) + CFG_ETH_EFMTC_CRC->tx_eth_crc_gen = ((IFX_PTM_CFG_T *)data)->TxEthCrcGen ? 1 : 0; + if ( ((IFX_PTM_CFG_T *)data)->TxTcCrcGen && (((IFX_PTM_CFG_T *)data)->TxTcCrcLen == 16 || ((IFX_PTM_CFG_T *)data)->TxTcCrcLen == 32) ) { CFG_ETH_EFMTC_CRC->tx_tc_crc_gen = 1; - CFG_ETH_EFMTC_CRC->tx_tc_crc_len = ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen; + CFG_ETH_EFMTC_CRC->tx_tc_crc_len = ((IFX_PTM_CFG_T *)data)->TxTcCrcLen; } else { diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c index 9cd9cd5986..8a0ac331b7 100644 --- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c +++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c @@ -76,7 +76,7 @@ static int ptm_stop(struct net_device *); static unsigned int ptm_poll(int, unsigned int); static int ptm_napi_poll(struct napi_struct *, int); static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *); -static int ptm_ioctl(struct net_device *, struct ifreq *, int); +static int ptm_ioctl(struct net_device *, struct ifreq *, void __user *, int); #if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0) static void ptm_tx_timeout(struct net_device *); #else @@ -120,7 +120,7 @@ static struct net_device_ops g_ptm_netdev_ops = { .ndo_start_xmit = ptm_hard_start_xmit, .ndo_validate_addr = eth_validate_addr, .ndo_set_mac_address = eth_mac_addr, - .ndo_do_ioctl = ptm_ioctl, + .ndo_siocdevprivate = ptm_ioctl, .ndo_tx_timeout = ptm_tx_timeout, }; @@ -377,62 +377,62 @@ PTM_HARD_START_XMIT_FAIL: return 0; } -static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) +static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, void __user *data, int cmd) { ASSERT(dev == g_net_dev[0], "incorrect device"); switch ( cmd ) { case IFX_PTM_MIB_CW_GET: - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxNoIdleCodewords = IFX_REG_R32(DREG_AR_CELL0) + IFX_REG_R32(DREG_AR_CELL1); - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxIdleCodewords = IFX_REG_R32(DREG_AR_IDLE_CNT0) + IFX_REG_R32(DREG_AR_IDLE_CNT1); - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifRxCodingViolation = IFX_REG_R32(DREG_AR_CVN_CNT0) + IFX_REG_R32(DREG_AR_CVN_CNT1) + IFX_REG_R32(DREG_AR_CVNP_CNT0) + IFX_REG_R32(DREG_AR_CVNP_CNT1); - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifTxNoIdleCodewords = IFX_REG_R32(DREG_AT_CELL0) + IFX_REG_R32(DREG_AT_CELL1); - ((PTM_CW_IF_ENTRY_T *)ifr->ifr_data)->ifTxIdleCodewords = IFX_REG_R32(DREG_AT_IDLE_CNT0) + IFX_REG_R32(DREG_AT_IDLE_CNT1); + ((PTM_CW_IF_ENTRY_T *)data)->ifRxNoIdleCodewords = IFX_REG_R32(DREG_AR_CELL0) + IFX_REG_R32(DREG_AR_CELL1); + ((PTM_CW_IF_ENTRY_T *)data)->ifRxIdleCodewords = IFX_REG_R32(DREG_AR_IDLE_CNT0) + IFX_REG_R32(DREG_AR_IDLE_CNT1); + ((PTM_CW_IF_ENTRY_T *)data)->ifRxCodingViolation = IFX_REG_R32(DREG_AR_CVN_CNT0) + IFX_REG_R32(DREG_AR_CVN_CNT1) + IFX_REG_R32(DREG_AR_CVNP_CNT0) + IFX_REG_R32(DREG_AR_CVNP_CNT1); + ((PTM_CW_IF_ENTRY_T *)data)->ifTxNoIdleCodewords = IFX_REG_R32(DREG_AT_CELL0) + IFX_REG_R32(DREG_AT_CELL1); + ((PTM_CW_IF_ENTRY_T *)data)->ifTxIdleCodewords = IFX_REG_R32(DREG_AT_IDLE_CNT0) + IFX_REG_R32(DREG_AT_IDLE_CNT1); break; case IFX_PTM_MIB_FRAME_GET: { - PTM_FRAME_MIB_T data = {0}; + PTM_FRAME_MIB_T tmp = {0}; int i; - data.RxCorrect = IFX_REG_R32(DREG_AR_HEC_CNT0) + IFX_REG_R32(DREG_AR_HEC_CNT1) + IFX_REG_R32(DREG_AR_AIIDLE_CNT0) + IFX_REG_R32(DREG_AR_AIIDLE_CNT1); + tmp.RxCorrect = IFX_REG_R32(DREG_AR_HEC_CNT0) + IFX_REG_R32(DREG_AR_HEC_CNT1) + IFX_REG_R32(DREG_AR_AIIDLE_CNT0) + IFX_REG_R32(DREG_AR_AIIDLE_CNT1); for ( i = 0; i < 4; i++ ) - data.RxDropped += WAN_RX_MIB_TABLE(i)->wrx_dropdes_pdu; + tmp.RxDropped += WAN_RX_MIB_TABLE(i)->wrx_dropdes_pdu; for ( i = 0; i < 8; i++ ) - data.TxSend += WAN_TX_MIB_TABLE(i)->wtx_total_pdu; + tmp.TxSend += WAN_TX_MIB_TABLE(i)->wtx_total_pdu; - *((PTM_FRAME_MIB_T *)ifr->ifr_data) = data; + *((PTM_FRAME_MIB_T *)data) = tmp; } break; case IFX_PTM_CFG_GET: // use bear channel 0 preemption gamma interface settings - ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcPresent = 1; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcCheck = RX_GAMMA_ITF_CFG(0)->rx_eth_fcs_ver_dis == 0 ? 1 : 0; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcCheck = RX_GAMMA_ITF_CFG(0)->rx_tc_crc_ver_dis == 0 ? 1 : 0;; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen = RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size == 0 ? 0 : (RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size * 16); - ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxEthCrcGen = TX_GAMMA_ITF_CFG(0)->tx_eth_fcs_gen_dis == 0 ? 1 : 0; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcGen = TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size == 0 ? 0 : 1; - ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen = TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size == 0 ? 0 : (TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size * 16); + ((IFX_PTM_CFG_T *)data)->RxEthCrcPresent = 1; + ((IFX_PTM_CFG_T *)data)->RxEthCrcCheck = RX_GAMMA_ITF_CFG(0)->rx_eth_fcs_ver_dis == 0 ? 1 : 0; + ((IFX_PTM_CFG_T *)data)->RxTcCrcCheck = RX_GAMMA_ITF_CFG(0)->rx_tc_crc_ver_dis == 0 ? 1 : 0;; + ((IFX_PTM_CFG_T *)data)->RxTcCrcLen = RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size == 0 ? 0 : (RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size * 16); + ((IFX_PTM_CFG_T *)data)->TxEthCrcGen = TX_GAMMA_ITF_CFG(0)->tx_eth_fcs_gen_dis == 0 ? 1 : 0; + ((IFX_PTM_CFG_T *)data)->TxTcCrcGen = TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size == 0 ? 0 : 1; + ((IFX_PTM_CFG_T *)data)->TxTcCrcLen = TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size == 0 ? 0 : (TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size * 16); break; case IFX_PTM_CFG_SET: { int i; for ( i = 0; i < 4; i++ ) { - RX_GAMMA_ITF_CFG(i)->rx_eth_fcs_ver_dis = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxEthCrcCheck ? 0 : 1; + RX_GAMMA_ITF_CFG(i)->rx_eth_fcs_ver_dis = ((IFX_PTM_CFG_T *)data)->RxEthCrcCheck ? 0 : 1; - RX_GAMMA_ITF_CFG(0)->rx_tc_crc_ver_dis = ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcCheck ? 0 : 1; + RX_GAMMA_ITF_CFG(0)->rx_tc_crc_ver_dis = ((IFX_PTM_CFG_T *)data)->RxTcCrcCheck ? 0 : 1; - switch ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->RxTcCrcLen ) { + switch ( ((IFX_PTM_CFG_T *)data)->RxTcCrcLen ) { case 16: RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size = 1; break; case 32: RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size = 2; break; default: RX_GAMMA_ITF_CFG(0)->rx_tc_crc_size = 0; } - TX_GAMMA_ITF_CFG(0)->tx_eth_fcs_gen_dis = ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxEthCrcGen ? 0 : 1; + TX_GAMMA_ITF_CFG(0)->tx_eth_fcs_gen_dis = ((IFX_PTM_CFG_T *)data)->TxEthCrcGen ? 0 : 1; - if ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcGen ) { - switch ( ((IFX_PTM_CFG_T *)ifr->ifr_data)->TxTcCrcLen ) { + if ( ((IFX_PTM_CFG_T *)data)->TxTcCrcGen ) { + switch ( ((IFX_PTM_CFG_T *)data)->TxTcCrcLen ) { case 16: TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size = 1; break; case 32: TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size = 2; break; default: TX_GAMMA_ITF_CFG(0)->tx_tc_crc_size = 0; @@ -447,7 +447,7 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct ppe_prio_q_map cmd; - if ( copy_from_user(&cmd, ifr->ifr_data, sizeof(cmd)) ) + if ( copy_from_user(&cmd, data, sizeof(cmd)) ) return -EFAULT; if ( cmd.pkt_prio < 0 || cmd.pkt_prio >= ARRAY_SIZE(g_ptm_prio_queue_map) ) diff --git a/package/kernel/mwlwifi/patches/005-mac80211_update.patch b/package/kernel/mwlwifi/patches/005-mac80211_update.patch index da37875705..877053fdf1 100644 --- a/package/kernel/mwlwifi/patches/005-mac80211_update.patch +++ b/package/kernel/mwlwifi/patches/005-mac80211_update.patch @@ -428,11 +428,15 @@ const struct ieee80211_tx_queue_params *params) { struct mwl_priv *priv = hw->priv; -@@ -934,4 +934,5 @@ const struct ieee80211_ops mwl_mac80211_ +@@ -934,4 +934,9 @@ const struct ieee80211_ops mwl_mac80211_ .pre_channel_switch = mwl_mac80211_chnl_switch, .sw_scan_start = mwl_mac80211_sw_scan_start, .sw_scan_complete = mwl_mac80211_sw_scan_complete, + .wake_tx_queue = ieee80211_handle_wake_tx_queue, ++ .add_chanctx = ieee80211_emulate_add_chanctx, ++ .remove_chanctx = ieee80211_emulate_remove_chanctx, ++ .change_chanctx = ieee80211_emulate_change_chanctx, ++ .switch_vif_chanctx = ieee80211_emulate_switch_vif_chanctx, }; --- a/utils.c +++ b/utils.c diff --git a/package/libs/ncurses/Makefile b/package/libs/ncurses/Makefile index 0958051533..0fcc388840 100644 --- a/package/libs/ncurses/Makefile +++ b/package/libs/ncurses/Makefile @@ -181,6 +181,8 @@ define Build/InstallDev $(SED) 's,^\(prefix\|exec_prefix\)=.*,\1=$(STAGING_DIR)/usr,g' -e 's/$$$$INCS //g' \ $(2)/bin/ncursesw6-config ln -sf $(STAGING_DIR)/host/bin/ncursesw6-config $(1)/usr/bin/ncursesw6-config + $(SED) 's,$(TOOLCHAIN_DIR),$(STAGING_DIR),g' \ + $(1)/usr/lib/pkgconfig/ncursesw.pc endef define Host/Compile diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile index 0e04ec8caf..83f3a8c842 100644 --- a/package/utils/util-linux/Makefile +++ b/package/utils/util-linux/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux -PKG_VERSION:=2.40.1 +PKG_VERSION:=2.40.2 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.40 -PKG_HASH:=59e676aa53ccb44b6c39f0ffe01a8fa274891c91bef1474752fad92461def24f +PKG_HASH:=d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3 PKG_CPE_ID:=cpe:/a:kernel:util-linux PKG_LICENSE:=GPL-2.0-only diff --git a/package/utils/util-linux/patches/0001-meson-Fix-build-python-option.patch b/package/utils/util-linux/patches/0001-meson-Fix-build-python-option.patch deleted file mode 100644 index e84fe5e705..0000000000 --- a/package/utils/util-linux/patches/0001-meson-Fix-build-python-option.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b66b70d62e50923502aeb3f6420a5f9c20f769d3 Mon Sep 17 00:00:00 2001 -From: Jordan Williams -Date: Thu, 9 May 2024 15:57:12 -0500 -Subject: [PATCH] meson: Fix build-python option -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The build-python option is for controlling whether or not pylibmount is -built. -Unfortunately, commit b6799cc rendered the option unused. -This change uses the build-python option again. - -Signed-off-by: Jordan Williams -Signed-off-by: Thomas Weißschuh ---- - libmount/python/meson.build | 40 ++++++++++++++++++------------------- - 1 file changed, 20 insertions(+), 20 deletions(-) - -diff --git a/libmount/python/meson.build b/libmount/python/meson.build -index 72985eca6b21..5dcdf807da89 100644 ---- a/libmount/python/meson.build -+++ b/libmount/python/meson.build -@@ -1,4 +1,6 @@ --build_python = python.found() -+if get_option('build-python').disabled() -+ subdir_done() -+endif - - pylibmount_sources = ''' - pylibmount.c diff --git a/target/linux/archs38/Makefile b/target/linux/archs38/Makefile index e352c58957..0b3feb9889 100644 --- a/target/linux/archs38/Makefile +++ b/target/linux/archs38/Makefile @@ -11,7 +11,7 @@ BOARDNAME:=Synopsys DesignWare ARC HS38 FEATURES:=source-only SUBTARGETS:=generic -KERNEL_PATCHVER:=6.1 +KERNEL_PATCHVER:=6.6 DEVICE_TYPE:=basic diff --git a/target/linux/archs38/config-6.1 b/target/linux/archs38/config-6.6 similarity index 93% rename from target/linux/archs38/config-6.1 rename to target/linux/archs38/config-6.6 index 9fe6ba2932..5eb67e1043 100644 --- a/target/linux/archs38/config-6.1 +++ b/target/linux/archs38/config-6.6 @@ -46,6 +46,7 @@ CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_SD=y +CONFIG_BUFFER_HEAD=y CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5" CONFIG_CC_NO_ARRAY_BOUNDS=y CONFIG_CLK_HSDK=y @@ -55,6 +56,7 @@ CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 CONFIG_COMPAT_32BIT_TIME=y CONFIG_CONTEXT_TRACKING=y CONFIG_CONTEXT_TRACKING_IDLE=y +CONFIG_CPU_MITIGATIONS=y CONFIG_CPU_RMAP=y CONFIG_CRC16=y CONFIG_CRYPTO_CRC32C=y @@ -62,9 +64,11 @@ CONFIG_CRYPTO_DRBG=y CONFIG_CRYPTO_DRBG_HMAC=y CONFIG_CRYPTO_DRBG_MENU=y CONFIG_CRYPTO_ECHAINIV=y +CONFIG_CRYPTO_GENIV=y CONFIG_CRYPTO_HMAC=y CONFIG_CRYPTO_JITTERENTROPY=y CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y +CONFIG_CRYPTO_LIB_GF128MUL=y CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1 CONFIG_CRYPTO_LIB_SHA1=y CONFIG_CRYPTO_LIB_SHA256=y @@ -73,6 +77,7 @@ CONFIG_CRYPTO_RNG=y CONFIG_CRYPTO_RNG2=y CONFIG_CRYPTO_RNG_DEFAULT=y CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA3=y CONFIG_CRYPTO_SHA512=y CONFIG_DEBUG_INFO=y CONFIG_DMADEVICES=y @@ -89,19 +94,21 @@ CONFIG_EXCLUSIVE_SYSTEM_RAM=y CONFIG_EXT4_FS=y CONFIG_FAT_FS=y CONFIG_FB=y -CONFIG_FB_CMDLINE=y +CONFIG_FB_CORE=y +CONFIG_FB_IOMEM_FOPS=y CONFIG_FIXED_PHY=y CONFIG_FS_IOMAP=y CONFIG_FS_MBCACHE=y CONFIG_FS_POSIX_ACL=y +CONFIG_FUNCTION_ALIGNMENT=0 CONFIG_FWNODE_MDIO=y CONFIG_FW_LOADER_PAGED_BUF=y CONFIG_FW_LOADER_SYSFS=y -CONFIG_GCC11_NO_ARRAY_BOUNDS=y -CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y +CONFIG_GCC10_NO_ARRAY_BOUNDS=y CONFIG_GENERIC_ALLOCATOR=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_IOREMAP=y CONFIG_GENERIC_IRQ_CHIP=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_PCI_IOMAP=y @@ -142,6 +149,7 @@ CONFIG_ISA_ARCV2=y CONFIG_JBD2=y CONFIG_KALLSYMS=y CONFIG_KERNEL_GZIP=y +CONFIG_LEGACY_DIRECT_IO=y CONFIG_LIBFDT=y CONFIG_LINUX_LINK_BASE=0x90000000 CONFIG_LINUX_RAM_BASE=0x80000000 @@ -152,7 +160,6 @@ CONFIG_LOCK_SPIN_ON_OWNER=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MDIO_DEVRES=y -CONFIG_MEMFD_CREATE=y CONFIG_MFD_SYSCON=y CONFIG_MICREL_PHY=y CONFIG_MIGRATION=y @@ -166,16 +173,21 @@ CONFIG_MMC_DW=y CONFIG_MMC_DW_PLTFM=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMU_LAZY_TLB_REFCOUNT=y CONFIG_MODULES_USE_ELF_RELA=y CONFIG_MTD_SPI_NOR=y CONFIG_MUTEX_SPIN_ON_OWNER=y CONFIG_NAMESPACES=y CONFIG_NATIONAL_PHY=y CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NET_EGRESS=y CONFIG_NET_FLOW_LIMIT=y +CONFIG_NET_HANDSHAKE=y +CONFIG_NET_INGRESS=y CONFIG_NET_NS=y CONFIG_NET_PTP_CLASSIFY=y CONFIG_NET_SELFTESTS=y +CONFIG_NET_XGRESS=y CONFIG_NFS_ACL_SUPPORT=y CONFIG_NFS_FS=y CONFIG_NFS_V3_ACL=y @@ -196,7 +208,6 @@ CONFIG_PADATA=y CONFIG_PAGE_POOL=y CONFIG_PAGE_SIZE_LESS_THAN_256KB=y CONFIG_PAGE_SIZE_LESS_THAN_64KB=y -CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y CONFIG_PCS_XPCS=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PHYLIB=y @@ -247,7 +258,7 @@ CONFIG_SPI_DESIGNWARE=y CONFIG_SPI_DW_MMIO=y CONFIG_SPI_MASTER=y CONFIG_SPI_MEM=y -CONFIG_SRCU=y +CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y CONFIG_STACKTRACE=y # CONFIG_STANDALONE is not set CONFIG_STMMAC_ETH=y @@ -264,5 +275,6 @@ CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_USB_SUPPORT=y # CONFIG_USER_NS is not set CONFIG_VFAT_FS=y +CONFIG_VIDEO_CMDLINE=y CONFIG_WATCHDOG_CORE=y CONFIG_XPS=y diff --git a/target/linux/ath79/dts/ar9344_nec_aterm.dtsi b/target/linux/ath79/dts/ar9344_nec_aterm.dtsi new file mode 100644 index 0000000000..dfe2b064b7 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_nec_aterm.dtsi @@ -0,0 +1,300 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include +#include +#include + +#include "ar9344.dtsi" + +/ { + aliases { + led-running = &led_power_green; + led-upgrade = &led_power_green; + }; + + chosen { + /* + * don't specify bootargs property in DeviceTree to + * enable a console with a default baudrate (9600) + * or passed console= parameter from the bootloader + */ + /delete-property/ bootargs; + stdout-path = &uart; + }; + + keys: keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&jtag_disable_pins>; + + button-eco { + label = "eco"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + switch-ap { + label = "ap"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + button-reset { + label = "reset"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + button-wps { + label = "wps"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + }; + + ath9k_leds: ath9k-leds { + /* all LEDs are connected to ath9k chip (AR938x) */ + compatible = "gpio-leds"; + + led_power_green: led-0 { + gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_POWER; + default-state = "on"; + }; + + led-1 { + gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_POWER; + }; + + led-2 { + gpios = <&ath9k 2 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WAN_ONLINE; + }; + + led-3 { + gpios = <&ath9k 3 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WAN_ONLINE; + }; + + led-4 { + gpios = <&ath9k 4 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WLAN_2GHZ; + linux,default-trigger = "phy0tpt"; + }; + + led-5 { + gpios = <&ath9k 5 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WLAN_2GHZ; + }; + + led-6 { + gpios = <&ath9k 6 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WLAN_5GHZ; + linux,default-trigger = "phy1tpt"; + }; + + led-7 { + gpios = <&ath9k 7 GPIO_ACTIVE_LOW>; + color = ; + function = LED_FUNCTION_WLAN_5GHZ; + }; + + led-8 { + gpios = <&ath9k 12 GPIO_ACTIVE_LOW>; + color = ; + function = "tv"; + }; + + led-9 { + gpios = <&ath9k 13 GPIO_ACTIVE_LOW>; + color = ; + function = "tv"; + }; + }; + + regulator { + compatible = "regulator-fixed"; + regulator-name = "usb-vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio 20 GPIO_ACTIVE_HIGH>; + enable-active-high; + regulator-always-on; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + /* + * since the OEM bootloader requires unknown + * filesystem on firmware area, needs to be + * replaced to u-boot before OpenWrt installation + */ + partition@0 { + label = "bootloader"; + reg = <0x000000 0x020000>; + }; + + /* not compatible with u-boot */ + partition@20000 { + label = "config"; + reg = <0x020000 0x010000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_config_6: macaddr@6 { + reg = <0x6 0x6>; + }; + }; + }; + + partition@30000 { + label = "art"; + reg = <0x030000 0x010000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: calibration@1000 { + reg = <0x1000 0x440>; + }; + + cal_art_5000: calibration@5000 { + reg = <0x5000 0x440>; + }; + }; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + + qca,ar8327-initvals = < + 0x04 0x07a00000 /* PORT0_PAD_MODE_CTRL */ + 0x08 0x00000000 /* PORT5_PAD_MODE_CTRL */ + 0x0c 0x00000000 /* PORT6_PAD_MODE_CTRL */ + 0x10 0x81000080 /* POWER_ON_STRAP */ + 0x50 0xcf37cf37 /* LED_CTRL0 */ + 0x54 0x00000000 /* LED_CTRL1 */ + 0x58 0x00000000 /* LED_CTRL2 */ + 0x5c 0x03ffff00 /* LED_CTRL3 */ + 0x7c 0x0000007e /* PORT0_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0x06000000 0x00000101 0x00001616>; + + phy-mode = "rgmii"; + phy-handle = <&phy0>; + + nvmem-cells = <&macaddr_config_6>; + nvmem-cell-names = "mac-address"; + + gmac-config { + device = <&gmac>; + + rgmii-gmac0 = <1>; + rxdv-delay = <0>; + rxd-delay = <0>; + txd-delay = <0>; + txen-delay = <0>; + }; +}; + +&gpio { + switch-reset { + gpio-hog; + gpios = <13 GPIO_ACTIVE_HIGH>; + output-high; + }; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,0030"; + reg = <0x0000 0 0 0 0>; + #gpio-cells = <2>; + gpio-controller; + + nvmem-cells = <&cal_art_5000>; + nvmem-cell-names = "calibration"; + + usb-hub-reset { + gpio-hog; + gpios = <10 GPIO_ACTIVE_HIGH>; + output-high; + }; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&usb { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + dr_mode = "host"; + + /delete-node/ port@1; + + /* NEC uPD720114 */ + hub@1 { + compatible = "usb0409,005a"; + reg = <1>; + }; +}; + +&wmac { + status = "okay"; + + nvmem-cells = <&cal_art_1000>; + nvmem-cell-names = "calibration"; +}; diff --git a/target/linux/ath79/dts/ar9344_nec_wg600hp.dts b/target/linux/ath79/dts/ar9344_nec_wg600hp.dts new file mode 100644 index 0000000000..e586dce7ca --- /dev/null +++ b/target/linux/ath79/dts/ar9344_nec_wg600hp.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9344_nec_aterm.dtsi" + +/ { + compatible = "nec,wg600hp", "qca,ar9344"; + model = "NEC Aterm WG600HP"; +}; + +&partitions { + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0x7c0000>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_nec_wr8750n.dts b/target/linux/ath79/dts/ar9344_nec_wr8750n.dts new file mode 100644 index 0000000000..47e49dddc5 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_nec_wr8750n.dts @@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9344_nec_aterm.dtsi" + +/ { + compatible = "nec,wr8750n", "qca,ar9344"; + model = "NEC Aterm WR8750N"; +}; + +&partitions { + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0x7c0000>; + }; +}; diff --git a/target/linux/ath79/dts/ar9344_nec_wr9500n.dts b/target/linux/ath79/dts/ar9344_nec_wr9500n.dts new file mode 100644 index 0000000000..1919e09829 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_nec_wr9500n.dts @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "ar9344_nec_aterm.dtsi" + +/ { + compatible = "nec,wr9500n", "qca,ar9344"; + model = "NEC Aterm WR9500N"; +}; + +&keys { + switch-converter { + label = "cnv"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; +}; + +&ath9k_leds { + led-10 { + gpios = <&ath9k 14 GPIO_ACTIVE_LOW>; + color = ; + function = "converter"; + }; + + led-11 { + gpios = <&ath9k 15 GPIO_ACTIVE_LOW>; + color = ; + function = "converter"; + }; +}; + +&partitions { + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0xfc0000>; + }; +}; diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index f63e93f978..c6fcea1abd 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -1162,33 +1162,10 @@ static int ag71xx_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct ag71xx *ag = netdev_priv(dev); + if (ag->phy_dev == NULL) + return -ENODEV; - switch (cmd) { - case SIOCSIFHWADDR: - if (copy_from_user - ((void*)dev->dev_addr, ifr->ifr_data, sizeof(dev->dev_addr))) - return -EFAULT; - return 0; - - case SIOCGIFHWADDR: - if (copy_to_user - (ifr->ifr_data, dev->dev_addr, sizeof(dev->dev_addr))) - return -EFAULT; - return 0; - - case SIOCGMIIPHY: - case SIOCGMIIREG: - case SIOCSMIIREG: - if (ag->phy_dev == NULL) - break; - - return phy_mii_ioctl(ag->phy_dev, ifr, cmd); - - default: - break; - } - - return -EOPNOTSUPP; + return phy_mii_ioctl(ag->phy_dev, ifr, cmd); } static void ag71xx_oom_timer_handler(struct timer_list *t) @@ -1501,7 +1478,7 @@ static const struct net_device_ops ag71xx_netdev_ops = { .ndo_open = ag71xx_open, .ndo_stop = ag71xx_stop, .ndo_start_xmit = ag71xx_hard_start_xmit, - .ndo_do_ioctl = ag71xx_do_ioctl, + .ndo_eth_ioctl = ag71xx_do_ioctl, .ndo_tx_timeout = ag71xx_tx_timeout, .ndo_change_mtu = ag71xx_change_mtu, .ndo_set_mac_address = eth_mac_addr, diff --git a/target/linux/ath79/image/common-nec.mk b/target/linux/ath79/image/common-nec.mk new file mode 100644 index 0000000000..7981a72d8e --- /dev/null +++ b/target/linux/ath79/image/common-nec.mk @@ -0,0 +1,25 @@ +DEVICE_VARS += NEC_FW_TYPE + +define Build/nec-usbaterm-fw + $(STAGING_DIR_HOST)/bin/nec-usbatermfw $@.new -t $(NEC_FW_TYPE) $(1) + mv $@.new $@ +endef + +define Device/nec-netbsd-aterm + DEVICE_VENDOR := NEC + LOADER_TYPE := bin + KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none + ARTIFACTS := uboot.bin +ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) + COMPILE := loader-$(1).bin + COMPILE/loader-$(1).bin := loader-okli-compile + ARTIFACTS += initramfs-factory.bin + ARTIFACT/initramfs-factory.bin := append-image-stage initramfs-kernel.bin | \ + pad-to 4 skip=16 | \ + nec-usbaterm-fw -f 0x0003 -d $$(KDIR)/loader-$(1).bin -d $$$$@ | check-size +endif + UBOOT_PATH := $$(STAGING_DIR_IMAGE)/$$(SOC)_nec_aterm-u-boot.bin + ARTIFACT/uboot.bin := append-uboot | check-size 128k + DEVICE_PACKAGES := kmod-usb2 -uboot-envtools +endef diff --git a/target/linux/ath79/image/lzma-loader/src/board.c b/target/linux/ath79/image/lzma-loader/src/board.c index 04aa348b1f..0d92f3174b 100644 --- a/target/linux/ath79/image/lzma-loader/src/board.c +++ b/target/linux/ath79/image/lzma-loader/src/board.c @@ -213,9 +213,76 @@ static inline void huawei_ap_init(void) static inline void huawei_ap_init(void) {} #endif +#if defined(CONFIG_BOARD_NEC_WG600HP) || \ + defined(CONFIG_BOARD_NEC_WR8750N) || \ + defined(CONFIG_BOARD_NEC_WR9500N) + +#define AR934X_PLL_SWITCH_CLK_CTRL_REG 0x24 +#define AR934X_PLL_SWITCH_CLK_CTRL_SWITCHCLK_SEL BIT(0) + +static inline void nec_aterm_init(void) +{ + unsigned int reg, val; + + printf("NEC Aterm series (AR9344)\n"); + + /* set REFCLK=40MHz to switch PLL */ + reg = KSEG1ADDR(AR71XX_PLL_BASE); + val = READREG(reg + AR934X_PLL_SWITCH_CLK_CTRL_REG); + val &= ~AR934X_PLL_SWITCH_CLK_CTRL_SWITCHCLK_SEL; + WRITEREG(reg + AR934X_PLL_SWITCH_CLK_CTRL_REG, val); + + reg = KSEG1ADDR(AR71XX_RESET_BASE); +#ifndef LOADADDR + /* + * This is for initramfs-factory image. + * When the system was reset by power source or FULL_CHIP_RESET + * and started from the OEM bootloader with a dummy tp data + * (this loader), reset again by timeout of the watchdog timer + * to load an actual OpenWrt initramfs image in firmware block + * in a factory image. + * Note: On the stock firmware, TP block contains a POST function + * and sub commands of "tp" command. + * + * Behaviors of OEM bootloader: + * + * - reset by watchdog (ex.: rebooting on the stock firmware): + * called as "SOFT-RESET", boot a firmware without POST + * + * - reset by FULL_CHIP_RESET (or powering on): + * called as "HARD-RESET", run POST and boot a firmware + */ + printf("\n## booted with dummy tp (lzma-loader)," + " waiting reset... (count: 0x%08x) ##\n", + READREG(reg + AR71XX_RESET_REG_WDOG)); + while (1); +#endif + /* + * set maximum watchdog count to avoid reset while + * booting from stock bootloader + */ + WRITEREG(reg + AR71XX_RESET_REG_WDOG, 0xffffffff); + + /* + * deassert some RESET bits not handled by drivers + * and mainline U-Boot + * + * - ETH_SWITCH(_ANALOG): eth0 + * - RTC : wmac + */ + val = READREG(reg + AR934X_RESET_REG_RESET_MODULE); + val &= ~(AR934X_RESET_ETH_SWITCH | AR934X_RESET_ETH_SWITCH_ANALOG | + AR934X_RESET_RTC); + WRITEREG(reg + AR934X_RESET_REG_RESET_MODULE, val); +} +#else +static inline void nec_aterm_init(void) {} +#endif + void board_init(void) { tlwr1043nd_init(); mr18_init(); huawei_ap_init(); + nec_aterm_init(); } diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 955d0fbff2..53111119d8 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -1,4 +1,5 @@ include ./common-buffalo.mk +include ./common-nec.mk include ./common-senao.mk define Device/buffalo_whr-g301n @@ -120,6 +121,36 @@ define Device/engenius_enh202-v1 endef TARGET_DEVICES += engenius_enh202-v1 +define Device/nec_wg600hp + DEVICE_MODEL := Aterm WG600HP + SOC := ar9344 + BLOCKSIZE := 4k + IMAGE_SIZE := 7936k + NEC_FW_TYPE := H044 + $(Device/nec-netbsd-aterm) +endef +TARGET_DEVICES += nec_wg600hp + +define Device/nec_wr8750n + SOC := ar9344 + DEVICE_MODEL := Aterm WR8750N + BLOCKSIZE := 4k + IMAGE_SIZE := 7936k + NEC_FW_TYPE := H033a + $(Device/nec-netbsd-aterm) +endef +TARGET_DEVICES += nec_wr8750n + +define Device/nec_wr9500n + SOC := ar9344 + DEVICE_MODEL := Aterm WR9500N + BLOCKSIZE := 4k + IMAGE_SIZE := 16128k + NEC_FW_TYPE := H033 + $(Device/nec-netbsd-aterm) +endef +TARGET_DEVICES += nec_wr9500n + define Device/pqi_air-pen SOC := ar9330 DEVICE_VENDOR := PQI diff --git a/target/linux/ath79/patches-6.6/317-MIPS-pci-ar724x-clear-power-down-of-pll-on-AR934x.patch b/target/linux/ath79/patches-6.6/317-MIPS-pci-ar724x-clear-power-down-of-pll-on-AR934x.patch new file mode 100644 index 0000000000..dfb7e483a7 --- /dev/null +++ b/target/linux/ath79/patches-6.6/317-MIPS-pci-ar724x-clear-power-down-of-pll-on-AR934x.patch @@ -0,0 +1,34 @@ +From f2ca10b22ace3ce53b4e3f189bf1dd53a4482475 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Fri, 26 Apr 2024 23:53:58 +0900 +Subject: [PATCH 1/2] MIPS: pci-ar724x: clear power down of pll on AR934x + +Fix PCIe initialization on AR934x by clearing PLL_PWD bit in addition to +PPL_RESET bit of AR724x. + +Signed-off-by: INAGAKI Hiroshi +--- + +--- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h ++++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +@@ -347,6 +347,8 @@ + #define AR934X_PLL_CPU_DDR_CLK_CTRL_DDRCLK_FROM_DDRPLL BIT(21) + #define AR934X_PLL_CPU_DDR_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24) + ++#define AR934X_PLL_PCIE_CONFIG_PLL_PWD BIT(30) ++ + #define AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL BIT(6) + + #define QCA953X_PLL_CPU_CONFIG_REG 0x00 +--- a/arch/mips/pci/pci-ar724x.c ++++ b/arch/mips/pci/pci-ar724x.c +@@ -360,7 +360,8 @@ static void ar724x_pci_hw_init(struct ar + } else { + /* remove the reset of the PCIE PLL */ + ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG); +- ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET; ++ ppl &= ~(AR934X_PLL_PCIE_CONFIG_PLL_PWD | ++ AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET); + ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl); + + /* deassert bypass for the PCIE PLL */ diff --git a/target/linux/ath79/patches-6.6/318-MIPS-pci-ar724x-deassert-the-reset-of-PCIe-endpoint.patch b/target/linux/ath79/patches-6.6/318-MIPS-pci-ar724x-deassert-the-reset-of-PCIe-endpoint.patch new file mode 100644 index 0000000000..c906bdbbb6 --- /dev/null +++ b/target/linux/ath79/patches-6.6/318-MIPS-pci-ar724x-deassert-the-reset-of-PCIe-endpoint.patch @@ -0,0 +1,41 @@ +From 859c93981a8994ffa69967b44b247d2e7d6a01f1 Mon Sep 17 00:00:00 2001 +From: INAGAKI Hiroshi +Date: Fri, 26 Apr 2024 23:54:57 +0900 +Subject: [PATCH 2/2] MIPS: pci-ar724x: deassert the reset of PCIe endpoint + +Fix PCIe initialization by de-assertion of PCIe endpoint reset. + +Signed-off-by: INAGAKI Hiroshi +--- + +--- a/arch/mips/pci/pci-ar724x.c ++++ b/arch/mips/pci/pci-ar724x.c +@@ -25,6 +25,7 @@ + + #define AR724X_PCI_APP_LTSSM_ENABLE BIT(0) + ++#define AR724X_PCI_RESET_EP_RESET_L BIT(2) + #define AR724X_PCI_RESET_LINK_UP BIT(0) + + #define AR724X_PCI_INT_DEV0 BIT(14) +@@ -340,7 +341,7 @@ static void ar724x_pci_irq_init(struct a + + static void ar724x_pci_hw_init(struct ar724x_pci_controller *apc) + { +- u32 ppl, app; ++ u32 ppl, rst, app; + int wait = 0; + + /* deassert PCIe host controller and PCIe PHY reset */ +@@ -370,6 +371,11 @@ static void ar724x_pci_hw_init(struct ar + ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl); + } + ++ /* deassert the reset state of the PCIE endpoint */ ++ rst = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_RESET); ++ rst |= AR724X_PCI_RESET_EP_RESET_L; ++ __raw_writel(rst, apc->ctrl_base + AR724X_PCI_REG_RESET); ++ + /* set PCIE Application Control to ready */ + app = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_APP); + app |= AR724X_PCI_APP_LTSSM_ENABLE; diff --git a/target/linux/ath79/patches-6.6/330-missing-registers.patch b/target/linux/ath79/patches-6.6/330-missing-registers.patch index 74789437ec..d05e741c7e 100644 --- a/target/linux/ath79/patches-6.6/330-missing-registers.patch +++ b/target/linux/ath79/patches-6.6/330-missing-registers.patch @@ -7,7 +7,7 @@ Subject: [PATCH] ath79: gmac: add parsers for rxd(v)- and tx(d|en)-delay for --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -@@ -1231,6 +1231,10 @@ +@@ -1233,6 +1233,10 @@ #define AR934X_ETH_CFG_RDV_DELAY BIT(16) #define AR934X_ETH_CFG_RDV_DELAY_MASK 0x3 #define AR934X_ETH_CFG_RDV_DELAY_SHIFT 16 diff --git a/target/linux/ath79/patches-6.6/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch b/target/linux/ath79/patches-6.6/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch index c2f228dfe1..5d9c77c69f 100644 --- a/target/linux/ath79/patches-6.6/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch +++ b/target/linux/ath79/patches-6.6/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch @@ -16,7 +16,7 @@ Signed-off-by: David Bauer --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -@@ -1251,7 +1251,12 @@ +@@ -1253,7 +1253,12 @@ */ #define QCA955X_GMAC_REG_ETH_CFG 0x00 @@ -29,7 +29,7 @@ Signed-off-by: David Bauer #define QCA955X_ETH_CFG_RGMII_EN BIT(0) #define QCA955X_ETH_CFG_MII_GE0 BIT(1) -@@ -1273,9 +1278,58 @@ +@@ -1275,9 +1280,58 @@ #define QCA955X_ETH_CFG_TXE_DELAY_MASK 0x3 #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT 20 diff --git a/target/linux/ath79/patches-6.6/332-ath79-sgmii-config.patch b/target/linux/ath79/patches-6.6/332-ath79-sgmii-config.patch index a6a50e4a8a..6f6217ce75 100644 --- a/target/linux/ath79/patches-6.6/332-ath79-sgmii-config.patch +++ b/target/linux/ath79/patches-6.6/332-ath79-sgmii-config.patch @@ -21,7 +21,7 @@ Submitted-by: David Bauer --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -@@ -1380,5 +1380,6 @@ +@@ -1382,5 +1382,6 @@ #define QCA956X_SGMII_CONFIG_MODE_CTRL_SHIFT 0 #define QCA956X_SGMII_CONFIG_MODE_CTRL_MASK 0x7 diff --git a/target/linux/ath79/patches-6.6/360-MIPS-ath79-export-UART1-reference-clock.patch b/target/linux/ath79/patches-6.6/360-MIPS-ath79-export-UART1-reference-clock.patch index b24ff21692..ae2f5aa0cd 100644 --- a/target/linux/ath79/patches-6.6/360-MIPS-ath79-export-UART1-reference-clock.patch +++ b/target/linux/ath79/patches-6.6/360-MIPS-ath79-export-UART1-reference-clock.patch @@ -45,8 +45,8 @@ Submitted-by: Daniel Golle goto err_iounmap; --- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h +++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h -@@ -348,6 +348,7 @@ - #define AR934X_PLL_CPU_DDR_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24) +@@ -350,6 +350,7 @@ + #define AR934X_PLL_PCIE_CONFIG_PLL_PWD BIT(30) #define AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL BIT(6) +#define AR934X_PLL_SWITCH_CLOCK_CONTROL_UART1_CLK_SEL BIT(7) diff --git a/target/linux/ath79/patches-6.6/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch b/target/linux/ath79/patches-6.6/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch index 980c265fe6..330c0d139b 100644 --- a/target/linux/ath79/patches-6.6/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch +++ b/target/linux/ath79/patches-6.6/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch @@ -22,7 +22,7 @@ Signed-off-by: Shiji Yang --- a/drivers/of/irq.c +++ b/drivers/of/irq.c -@@ -86,6 +86,8 @@ EXPORT_SYMBOL_GPL(of_irq_find_parent); +@@ -89,6 +89,8 @@ EXPORT_SYMBOL_GPL(of_irq_find_parent); * drawing board. */ static const char * const of_irq_imap_abusers[] = { diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/02_network b/target/linux/ath79/tiny/base-files/etc/board.d/02_network index fa2ea3aa6f..a204e820ca 100644 --- a/target/linux/ath79/tiny/base-files/etc/board.d/02_network +++ b/target/linux/ath79/tiny/base-files/etc/board.d/02_network @@ -69,6 +69,13 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "4:lan:1" ;; + nec,wg600hp|\ + nec,wr8750n|\ + nec,wr9500n|\ + tplink,tl-wr941n-v7-cn) + ucidef_add_switch "switch0" \ + "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan" + ;; tplink,tl-mr3220-v1|\ tplink,tl-mr3420-v1|\ tplink,tl-mr3420-v3|\ @@ -105,10 +112,6 @@ ath79_setup_interfaces() tplink,tl-wr941-v2) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; - tplink,tl-wr941n-v7-cn) - ucidef_add_switch "switch0" \ - "0@eth0" "2:lan:1" "3:lan:2" "4:lan:3" "5:lan:4" "1:wan" - ;; ubnt,airrouter) ucidef_set_interface_wan "eth1" ucidef_add_switch "switch0" \ @@ -152,6 +155,12 @@ ath79_setup_macs() ubnt,picostation-m) label_mac=$(cat /sys/class/ieee80211/phy0/macaddress) ;; + nec,wg600hp|\ + nec,wr8750n|\ + nec,wr9500n) + wan_mac=$(mtd_get_mac_binary config 0xc) + label_mac=$wan_mac + ;; tplink,tl-wr941-v2|\ tplink,tl-wr941n-v7-cn) base_mac=$(mtd_get_mac_binary u-boot 0x1fc00) diff --git a/target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh b/target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh index eb8441c6d2..8fc0efcfbd 100644 --- a/target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh +++ b/target/linux/ath79/tiny/base-files/lib/upgrade/platform.sh @@ -9,7 +9,23 @@ RAMFS_COPY_BIN='fw_setenv' RAMFS_COPY_DATA='/etc/fw_env.config' platform_check_image() { - return 0 + local board=$(board_name) + + case "$board" in + nec,wg600hp|\ + nec,wr8750n|\ + nec,wr9500n) + local uboot_mtd=$(find_mtd_part "bootloader") + + # check "U-Boot ." string in the "bootloader" partition + if ! grep -q "U-Boot [0-9]\{4\}\.[0-9]\{2\}" $uboot_mtd; then + v "The bootloader doesn't seem to be replaced to U-Boot!" + return 1 + fi + ;; + *) + return 0 + esac } platform_do_upgrade() { diff --git a/target/linux/bcm27xx/patches-6.6/950-0103-Improve-__copy_to_user-and-__copy_from_user-performa.patch b/target/linux/bcm27xx/patches-6.6/950-0103-Improve-__copy_to_user-and-__copy_from_user-performa.patch index 2d546c7502..92fd35d936 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0103-Improve-__copy_to_user-and-__copy_from_user-performa.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0103-Improve-__copy_to_user-and-__copy_from_user-performa.patch @@ -99,7 +99,7 @@ Signed-off-by: Phil Elwell #endif --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h -@@ -509,6 +509,9 @@ do { \ +@@ -499,6 +499,9 @@ do { \ extern unsigned long __must_check arm_copy_from_user(void *to, const void __user *from, unsigned long n); diff --git a/target/linux/bcm27xx/patches-6.6/950-0113-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch b/target/linux/bcm27xx/patches-6.6/950-0113-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch index 14f92dfadd..1a84fb14b1 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0113-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0113-ARM64-Force-hardware-emulation-of-deprecated-instruc.patch @@ -10,7 +10,7 @@ Subject: [PATCH 0113/1085] ARM64: Force hardware emulation of deprecated --- a/arch/arm64/kernel/armv8_deprecated.c +++ b/arch/arm64/kernel/armv8_deprecated.c -@@ -539,9 +539,14 @@ static void __init register_insn_emulati +@@ -542,9 +542,14 @@ static void __init register_insn_emulati switch (insn->status) { case INSN_DEPRECATED: diff --git a/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch b/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch index a64754310d..c3c3353f91 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0169-hid-usb-Add-device-quirks-for-Freeway-Airmouse-T3-an.patch @@ -33,7 +33,7 @@ Signed-off-by: Jonathan Bell #define USB_VENDOR_ID_BELKIN 0x050d #define USB_DEVICE_ID_FLIP_KVM 0x3201 -@@ -1405,6 +1408,9 @@ +@@ -1407,6 +1410,9 @@ #define USB_VENDOR_ID_XIAOMI 0x2717 #define USB_DEVICE_ID_MI_SILENT_MOUSE 0x5014 diff --git a/target/linux/bcm27xx/patches-6.6/950-0416-gpio-pca953x-Add-ti-tca9554-compatible-string.patch b/target/linux/bcm27xx/patches-6.6/950-0416-gpio-pca953x-Add-ti-tca9554-compatible-string.patch index b9ec31caa5..aa11729b71 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0416-gpio-pca953x-Add-ti-tca9554-compatible-string.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0416-gpio-pca953x-Add-ti-tca9554-compatible-string.patch @@ -10,7 +10,7 @@ Signed-off-by: Phil Elwell --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c -@@ -1345,6 +1345,7 @@ static const struct of_device_id pca953x +@@ -1347,6 +1347,7 @@ static const struct of_device_id pca953x { .compatible = "ti,tca6424", .data = OF_953X(24, PCA_INT), }, { .compatible = "ti,tca9538", .data = OF_953X( 8, PCA_INT), }, { .compatible = "ti,tca9539", .data = OF_953X(16, PCA_INT), }, diff --git a/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch b/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch index 9aa16d6b25..218ad5dbe5 100644 --- a/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch +++ b/target/linux/bcm27xx/patches-6.6/950-0441-Bluetooth-hci_sync-Add-fallback-bd-address-prop.patch @@ -20,7 +20,7 @@ Signed-off-by: Phil Elwell --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c -@@ -4659,6 +4659,7 @@ static const struct { +@@ -4672,6 +4672,7 @@ static const struct { */ static int hci_dev_setup_sync(struct hci_dev *hdev) { @@ -28,7 +28,7 @@ Signed-off-by: Phil Elwell int ret = 0; bool invalid_bdaddr; size_t i; -@@ -4687,7 +4688,8 @@ static int hci_dev_setup_sync(struct hci +@@ -4700,7 +4701,8 @@ static int hci_dev_setup_sync(struct hci test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks); if (!ret) { if (test_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hdev->quirks) && diff --git a/target/linux/bcm27xx/patches-6.6/950-0490-input-ads7846-Add-missing-spi_device_id-strings.patch b/target/linux/bcm27xx/patches-6.6/950-0490-input-ads7846-Add-missing-spi_device_id-strings.patch deleted file mode 100644 index 1b0a29a777..0000000000 --- a/target/linux/bcm27xx/patches-6.6/950-0490-input-ads7846-Add-missing-spi_device_id-strings.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 3b391ceadf0d4ab5ce45f98d2f1d41f40e5aedd7 Mon Sep 17 00:00:00 2001 -From: Dave Stevenson -Date: Fri, 1 Sep 2023 12:23:30 +0100 -Subject: [PATCH 0490/1085] input: ads7846: Add missing spi_device_id strings - -The SPI core logs error messages if a compatible string device -name is not also present as an spi_device_id. - -No spi_device_id values are specified by the driver, therefore -we get 4 log lines every time it is loaded: -SPI driver ads7846 has no spi_device_id for ti,tsc2046 -SPI driver ads7846 has no spi_device_id for ti,ads7843 -SPI driver ads7846 has no spi_device_id for ti,ads7845 -SPI driver ads7846 has no spi_device_id for ti,ads7873 - -Add the spi_device_id values for these devices. - -Signed-off-by: Dave Stevenson ---- - drivers/input/touchscreen/ads7846.c | 11 +++++++++++ - 1 file changed, 11 insertions(+) - ---- a/drivers/input/touchscreen/ads7846.c -+++ b/drivers/input/touchscreen/ads7846.c -@@ -1114,6 +1114,16 @@ static const struct of_device_id ads7846 - }; - MODULE_DEVICE_TABLE(of, ads7846_dt_ids); - -+static const struct spi_device_id ads7846_spi_ids[] = { -+ { "tsc2046", 0 }, -+ { "ads7843", 0 }, -+ { "ads7845", 0 }, -+ { "ads7846", 0 }, -+ { "ads7873", 0 }, -+ { } -+}; -+MODULE_DEVICE_TABLE(spi, ads7846_spi_ids); -+ - static const struct ads7846_platform_data *ads7846_get_props(struct device *dev) - { - struct ads7846_platform_data *pdata; -@@ -1390,6 +1400,7 @@ static struct spi_driver ads7846_driver - .pm = pm_sleep_ptr(&ads7846_pm), - .of_match_table = ads7846_dt_ids, - }, -+ .id_table = ads7846_spi_ids, - .probe = ads7846_probe, - .remove = ads7846_remove, - }; diff --git a/target/linux/bcm27xx/patches-6.6/950-1141-fs-ntfs3-Fix-memory-corruption-when-page_size-change.patch b/target/linux/bcm27xx/patches-6.6/950-1141-fs-ntfs3-Fix-memory-corruption-when-page_size-change.patch index 113b3fdf53..b05a8276df 100644 --- a/target/linux/bcm27xx/patches-6.6/950-1141-fs-ntfs3-Fix-memory-corruption-when-page_size-change.patch +++ b/target/linux/bcm27xx/patches-6.6/950-1141-fs-ntfs3-Fix-memory-corruption-when-page_size-change.patch @@ -25,7 +25,7 @@ Signed-off-by: Dom Cobley --- a/fs/ntfs3/fslog.c +++ b/fs/ntfs3/fslog.c -@@ -3907,6 +3907,8 @@ check_restart_area: +@@ -3914,6 +3914,8 @@ check_restart_area: log->l_size = log->orig_file_size; log->page_size = norm_file_page(t32, &log->l_size, t32 == DefaultLogPageSize); diff --git a/target/linux/generic/backport-6.6/200-regmap-maple-work-around-false-positive-warning.patch b/target/linux/generic/backport-6.6/200-regmap-maple-work-around-false-positive-warning.patch new file mode 100644 index 0000000000..de5c813804 --- /dev/null +++ b/target/linux/generic/backport-6.6/200-regmap-maple-work-around-false-positive-warning.patch @@ -0,0 +1,47 @@ +From 542440fd7b30983cae23e32bd22f69a076ec7ef4 Mon Sep 17 00:00:00 2001 +From: Arnd Bergmann +Date: Fri, 19 Jul 2024 12:40:24 +0200 +Subject: regmap: maple: work around gcc-14.1 false-positive warning + +With gcc-14.1, there is a false-postive -Wuninitialized warning in +regcache_maple_drop: + +drivers/base/regmap/regcache-maple.c: In function 'regcache_maple_drop': +drivers/base/regmap/regcache-maple.c:113:23: error: 'lower_index' is used uninitialized [-Werror=uninitialized] + 113 | unsigned long lower_index, lower_last; + | ^~~~~~~~~~~ +drivers/base/regmap/regcache-maple.c:113:36: error: 'lower_last' is used uninitialized [-Werror=uninitialized] + 113 | unsigned long lower_index, lower_last; + | ^~~~~~~~~~ + +I've created a reduced test case to see if this needs to be reported +as a gcc, but it appears that the gcc-14.x branch already has a change +that turns this into a more sensible -Wmaybe-uninitialized warning, so +I ended up not reporting it so far. + +The reduced test case also produces a warning for gcc-13 and gcc-12 +but I don't see that with the version in the kernel. + +Link: https://godbolt.org/z/oKbohKqd3 +Link: https://lore.kernel.org/all/CAMuHMdWj=FLmkazPbYKPevDrcym2_HDb_U7Mb9YE9ovrP0jJfA@mail.gmail.com/ +Signed-off-by: Arnd Bergmann +Link: https://patch.msgid.link/20240719104030.1382465-1-arnd@kernel.org +Signed-off-by: Mark Brown +--- + drivers/base/regmap/regcache-maple.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +(limited to 'drivers/base/regmap/regcache-maple.c') + +--- a/drivers/base/regmap/regcache-maple.c ++++ b/drivers/base/regmap/regcache-maple.c +@@ -110,7 +110,8 @@ static int regcache_maple_drop(struct re + struct maple_tree *mt = map->cache; + MA_STATE(mas, mt, min, max); + unsigned long *entry, *lower, *upper; +- unsigned long lower_index, lower_last; ++ /* initialized to work around false-positive -Wuninitialized warning */ ++ unsigned long lower_index = 0, lower_last = 0; + unsigned long upper_index, upper_last; + int ret = 0; + diff --git a/target/linux/generic/hack-6.1/902-debloat_proc.patch b/target/linux/generic/hack-6.1/902-debloat_proc.patch index ee3caa9f47..52c6534773 100644 --- a/target/linux/generic/hack-6.1/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.1/902-debloat_proc.patch @@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau --- a/fs/locks.c +++ b/fs/locks.c -@@ -2909,6 +2909,8 @@ static const struct seq_operations locks +@@ -2907,6 +2907,8 @@ static const struct seq_operations locks static int __init proc_locks_init(void) { diff --git a/target/linux/generic/hack-6.6/253-ksmbd-config.patch b/target/linux/generic/hack-6.6/253-ksmbd-config.patch index 298a0787b7..b200d2ce60 100644 --- a/target/linux/generic/hack-6.6/253-ksmbd-config.patch +++ b/target/linux/generic/hack-6.6/253-ksmbd-config.patch @@ -21,7 +21,7 @@ Subject: [PATCH] Kconfig: add tristate for OID and ASNI string that can be interpreted by the ASN.1 stream decoder and used to --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -647,7 +647,7 @@ config LIBFDT +@@ -641,7 +641,7 @@ config LIBFDT bool config OID_REGISTRY diff --git a/target/linux/generic/hack-6.6/902-debloat_proc.patch b/target/linux/generic/hack-6.6/902-debloat_proc.patch index 559d403242..bf14d95999 100644 --- a/target/linux/generic/hack-6.6/902-debloat_proc.patch +++ b/target/linux/generic/hack-6.6/902-debloat_proc.patch @@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau --- a/fs/locks.c +++ b/fs/locks.c -@@ -2897,6 +2897,8 @@ static const struct seq_operations locks +@@ -2895,6 +2895,8 @@ static const struct seq_operations locks static int __init proc_locks_init(void) { diff --git a/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch b/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch index 4910307c88..d9ecf4b640 100644 --- a/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch +++ b/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch @@ -996,7 +996,7 @@ Signed-off-by: Maxime Chevallier + .ndo_uninit = ipqess_uninit, + .ndo_open = ipqess_open, + .ndo_stop = ipqess_stop, -+ .ndo_do_ioctl = ipqess_do_ioctl, ++ .ndo_eth_ioctl = ipqess_do_ioctl, + .ndo_start_xmit = ipqess_xmit, + .ndo_get_stats = ipqess_get_stats, + .ndo_set_mac_address = ipqess_set_mac_address, diff --git a/target/linux/mediatek/patches-6.6/432-drivers-spi-Add-support-for-dynamic-calibration.patch b/target/linux/mediatek/patches-6.6/432-drivers-spi-Add-support-for-dynamic-calibration.patch index 7ad07c3583..19fe984aa6 100644 --- a/target/linux/mediatek/patches-6.6/432-drivers-spi-Add-support-for-dynamic-calibration.patch +++ b/target/linux/mediatek/patches-6.6/432-drivers-spi-Add-support-for-dynamic-calibration.patch @@ -224,7 +224,7 @@ Signed-off-by: SkyLake.Huang int (*fw_translate_cs)(struct spi_controller *ctlr, unsigned cs); /* -@@ -1600,6 +1639,9 @@ spi_register_board_info(struct spi_board +@@ -1601,6 +1640,9 @@ spi_register_board_info(struct spi_board { return 0; } #endif diff --git a/target/linux/mpc85xx/Makefile b/target/linux/mpc85xx/Makefile index 6413f8df57..973cf01f5b 100644 --- a/target/linux/mpc85xx/Makefile +++ b/target/linux/mpc85xx/Makefile @@ -21,6 +21,6 @@ include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += \ kmod-input-core kmod-input-gpio-keys kmod-button-hotplug \ kmod-leds-gpio swconfig kmod-ath9k wpad-basic-openssl kmod-usb2 \ - uboot-envtools + uboot-envtools kmod-crypto-hw-talitos $(eval $(call BuildTarget)) diff --git a/target/linux/octeon/image/Makefile b/target/linux/octeon/image/Makefile index dcab815791..536ec5ff7c 100644 --- a/target/linux/octeon/image/Makefile +++ b/target/linux/octeon/image/Makefile @@ -42,7 +42,8 @@ define Device/itus_shield-router endef TARGET_DEVICES += itus_shield-router -ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait +# Disable PCIe on ER as it doesn't have PCIe peripherals and some devices lock up on initialization +ER_CMDLINE:=-mtdparts=phys_mapped_flash:640k(boot0)ro,640k(boot1)ro,64k(eeprom)ro root=/dev/mmcblk0p2 rootfstype=squashfs,ext4 rootwait pcie_octeon.pcie_disable=1 define Device/ubnt_edgerouter DEVICE_VENDOR := Ubiquiti DEVICE_MODEL := EdgeRouter diff --git a/target/linux/qualcommax/patches-6.6/0052-v6.7-arm64-dts-qcom-ipq6018-include-the-GPLL0-as.patch b/target/linux/qualcommax/patches-6.6/0052-v6.7-arm64-dts-qcom-ipq6018-include-the-GPLL0-as.patch index 3239404977..d407b9c5c4 100644 --- a/target/linux/qualcommax/patches-6.6/0052-v6.7-arm64-dts-qcom-ipq6018-include-the-GPLL0-as.patch +++ b/target/linux/qualcommax/patches-6.6/0052-v6.7-arm64-dts-qcom-ipq6018-include-the-GPLL0-as.patch @@ -22,7 +22,7 @@ Signed-off-by: Bjorn Andersson --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi -@@ -619,8 +619,8 @@ +@@ -620,8 +620,8 @@ compatible = "qcom,ipq6018-apcs-apps-global"; reg = <0x0 0x0b111000 0x0 0x1000>; #clock-cells = <1>; diff --git a/target/linux/qualcommax/patches-6.6/0059-v6.9-arm64-dts-qcom-ipq6018-add-thermal-zones.patch b/target/linux/qualcommax/patches-6.6/0059-v6.9-arm64-dts-qcom-ipq6018-add-thermal-zones.patch index b8b623c8bc..7e8c84558e 100644 --- a/target/linux/qualcommax/patches-6.6/0059-v6.9-arm64-dts-qcom-ipq6018-add-thermal-zones.patch +++ b/target/linux/qualcommax/patches-6.6/0059-v6.9-arm64-dts-qcom-ipq6018-add-thermal-zones.patch @@ -55,7 +55,7 @@ Signed-off-by: Bjorn Andersson }; L2_0: l2-cache { -@@ -889,6 +894,122 @@ +@@ -890,6 +895,122 @@ }; }; diff --git a/target/linux/qualcommax/patches-6.6/0906-arm64-dts-qcom-ipq6018-add-wifi-node.patch b/target/linux/qualcommax/patches-6.6/0906-arm64-dts-qcom-ipq6018-add-wifi-node.patch index 3e040cd2fd..f4968f1a4d 100644 --- a/target/linux/qualcommax/patches-6.6/0906-arm64-dts-qcom-ipq6018-add-wifi-node.patch +++ b/target/linux/qualcommax/patches-6.6/0906-arm64-dts-qcom-ipq6018-add-wifi-node.patch @@ -15,7 +15,7 @@ Signed-off-by: Mantas Pucka --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi -@@ -808,6 +808,102 @@ +@@ -809,6 +809,102 @@ }; }; diff --git a/target/linux/qualcommax/patches-6.6/0907-soc-qcom-fix-smp2p-ack-on-ipq6018.patch b/target/linux/qualcommax/patches-6.6/0907-soc-qcom-fix-smp2p-ack-on-ipq6018.patch index d1bca14063..094442a59b 100644 --- a/target/linux/qualcommax/patches-6.6/0907-soc-qcom-fix-smp2p-ack-on-ipq6018.patch +++ b/target/linux/qualcommax/patches-6.6/0907-soc-qcom-fix-smp2p-ack-on-ipq6018.patch @@ -15,7 +15,7 @@ Signed-off-by: Mantas Pucka --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi -@@ -1156,6 +1156,7 @@ +@@ -1157,6 +1157,7 @@ wcss_smp2p_out: master-kernel { qcom,entry-name = "master-kernel"; diff --git a/target/linux/qualcommax/patches-6.6/0909-arm64-dts-qcom-ipq6018-assign-QDSS_AT-clock-to-wifi-.patch b/target/linux/qualcommax/patches-6.6/0909-arm64-dts-qcom-ipq6018-assign-QDSS_AT-clock-to-wifi-.patch index 3e0ac68f2b..a0528e7f50 100644 --- a/target/linux/qualcommax/patches-6.6/0909-arm64-dts-qcom-ipq6018-assign-QDSS_AT-clock-to-wifi-.patch +++ b/target/linux/qualcommax/patches-6.6/0909-arm64-dts-qcom-ipq6018-assign-QDSS_AT-clock-to-wifi-.patch @@ -13,7 +13,7 @@ Signed-off-by: Mantas Pucka --- a/arch/arm64/boot/dts/qcom/ipq6018.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi -@@ -929,8 +929,8 @@ +@@ -930,8 +930,8 @@ "wcss_reset", "wcss_q6_reset"; diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index 31f3eb8657..24303ec5b3 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -166,8 +166,18 @@ status = "okay"; }; +&pcie_pins { + uart3 { + groups = "uart3"; + function = "gpio"; + }; +}; + &pcie { status = "okay"; + + reset-gpios = <&gpio 8 GPIO_ACTIVE_LOW>, + <&gpio 19 GPIO_ACTIVE_LOW>; }; &pcie0 { diff --git a/target/linux/ramips/dts/mt7621_wodesys_wd-r1802u.dts b/target/linux/ramips/dts/mt7621_wodesys_wd-r1802u.dts new file mode 100644 index 0000000000..f16d27e8d7 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_wodesys_wd-r1802u.dts @@ -0,0 +1,153 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "wodesys,wd-r1802u", "mediatek,mt7621-soc"; + model = "Wodesys WD-R1802U"; + + aliases { + label-mac-device = &gmac0; + led-boot = &led_blue; + led-failsafe = &led_red; + led-running = &led_green; + led-upgrade = &led_blue; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + gpio-keys { + compatible = "gpio-keys"; + + key-0 { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led_green: led-0 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + }; + + led_blue: led-1 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + led_red: led-2 { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + panic-indicator; + }; + }; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_4 1>; + nvmem-cell-names = "mac-address"; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>; + nvmem-cell-names = "eeprom", "precal"; + mediatek,disable-radar-background; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x00000 0x30000>; + read-only; + }; + + /* 0x30000-0x4ffff are unused + (flash contents is 0xff) */ + + partition@50000 { + label = "factory"; + reg = <0x50000 0x40000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0xe00>; + }; + + macaddr_factory_4: macaddr@4 { // wifi 2.4 + compatible = "mac-base"; + reg = <0x4 0x6>; + #nvmem-cell-cells = <1>; + }; + + precal_factory_e10: precal@e10 { + reg = <0xe10 0x19c10>; + }; + }; + }; + + partition@90000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x90000 0xf70000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "jtag", "wdt"; + function = "gpio"; + }; +}; + +&switch0 { + ports { + port@4 { + status = "okay"; + label = "lan"; + }; + }; +}; + +&xhci { + status = "disabled"; +}; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts index 7dfe9a7699..2b54faae9e 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we1326.dts @@ -1,7 +1,6 @@ -#include "mt7621.dtsi" +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include -#include +#include "mt7621_zbtlink_zbt-wexx26.dtsi" / { compatible = "zbtlink,zbt-we1326", "mediatek,mt7621-soc"; @@ -10,167 +9,4 @@ aliases { label-mac-device = &wifi1; }; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; -}; - -&state_default { - gpio { - groups = "wdt"; - function = "gpio"; - }; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; - - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; - - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; - }; - }; - }; - - partition@50000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; -}; - -&gmac0 { - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; -}; - -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; -}; - -ðphy4 { - /delete-property/ interrupts; -}; - -&switch0 { - ports { - port@0 { - status = "okay"; - label = "lan1"; - }; - - port@1 { - status = "okay"; - label = "lan2"; - }; - - port@2 { - status = "okay"; - label = "lan3"; - }; - - port@3 { - status = "okay"; - label = "lan4"; - }; - }; -}; - -&pcie { - status = "okay"; -}; - -&pcie1 { - wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_8000>; - nvmem-cell-names = "eeprom"; - ieee80211-freq-limit = <5000000 6000000>; - - led { - led-sources = <2>; - led-active-low; - }; - }; -}; - -&pcie2 { - wifi1: wifi@0,0 { - compatible = "mediatek,mt76"; - reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; - ieee80211-freq-limit = <2400000 2500000>; - - led { - led-sources = <0>; - led-active-low; - }; - }; -}; - -&sdhci { - status = "okay"; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts index 31a4e4482a..4f40f2926c 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-we3526.dts @@ -1,169 +1,8 @@ -#include "mt7621.dtsi" +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -#include -#include +#include "mt7621_zbtlink_zbt-wexx26.dtsi" / { compatible = "zbtlink,zbt-we3526", "mediatek,mt7621-soc"; model = "Zbtlink ZBT-WE3526"; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; -}; - -&i2c { - status = "okay"; -}; - -&sdhci { - status = "okay"; -}; - -&spi0 { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <10000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; - read-only; - }; - - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - - nvmem-layout { - compatible = "fixed-layout"; - #address-cells = <1>; - #size-cells = <1>; - - eeprom_factory_0: eeprom@0 { - reg = <0x0 0x400>; - }; - - eeprom_factory_8000: eeprom@8000 { - reg = <0x8000 0x200>; - }; - - macaddr_factory_e000: macaddr@e000 { - reg = <0xe000 0x6>; - }; - - macaddr_factory_e006: macaddr@e006 { - reg = <0xe006 0x6>; - }; - }; - }; - - partition@50000 { - compatible = "denx,uimage"; - label = "firmware"; - reg = <0x50000 0xfb0000>; - }; - }; - }; -}; - -&pcie { - status = "okay"; -}; - -&pcie0 { - wifi@0,0 { - compatible = "pci14c3,7662"; - reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_8000>; - nvmem-cell-names = "eeprom"; - ieee80211-freq-limit = <5000000 6000000>; - - led { - led-sources = <2>; - }; - }; -}; - -&pcie1 { - wifi@0,0 { - compatible = "pci14c3,7603"; - reg = <0x0000 0 0 0 0>; - nvmem-cells = <&eeprom_factory_0>; - nvmem-cell-names = "eeprom"; - }; -}; - -&gmac0 { - nvmem-cells = <&macaddr_factory_e000>; - nvmem-cell-names = "mac-address"; -}; - -&gmac1 { - status = "okay"; - label = "wan"; - phy-handle = <ðphy4>; - - nvmem-cells = <&macaddr_factory_e006>; - nvmem-cell-names = "mac-address"; -}; - -ðphy4 { - /delete-property/ interrupts; -}; - -&switch0 { - ports { - port@0 { - status = "okay"; - label = "lan1"; - }; - - port@1 { - status = "okay"; - label = "lan2"; - }; - - port@2 { - status = "okay"; - label = "lan3"; - }; - - port@3 { - status = "okay"; - label = "lan4"; - }; - }; -}; - -&state_default { - gpio { - groups = "wdt"; - function = "gpio"; - }; }; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wexx26.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wexx26.dtsi new file mode 100644 index 0000000000..e1428b7148 --- /dev/null +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wexx26.dtsi @@ -0,0 +1,171 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "mt7621.dtsi" + +#include +#include + +/ { + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +ðphy4 { + /delete-property/ interrupts; +}; + +&gmac0 { + nvmem-cells = <&macaddr_factory_e000>; + nvmem-cell-names = "mac-address"; +}; + +&gmac1 { + status = "okay"; + label = "wan"; + phy-handle = <ðphy4>; + + nvmem-cells = <&macaddr_factory_e006>; + nvmem-cell-names = "mac-address"; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_8000>; + nvmem-cell-names = "eeprom"; + ieee80211-freq-limit = <5000000 6000000>; + + led { + led-sources = <2>; + led-active-low; + }; + }; +}; + +&pcie2 { + wifi1: wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + nvmem-cells = <&eeprom_factory_0>; + nvmem-cell-names = "eeprom"; + ieee80211-freq-limit = <2400000 2500000>; + + led { + led-sources = <0>; + led-active-low; + }; + }; +}; + +&sdhci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + eeprom_factory_0: eeprom@0 { + reg = <0x0 0x400>; + }; + + eeprom_factory_8000: eeprom@8000 { + reg = <0x8000 0x200>; + }; + + macaddr_factory_e000: macaddr@e000 { + reg = <0xe000 0x6>; + }; + + macaddr_factory_e006: macaddr@e006 { + reg = <0xe006 0x6>; + }; + }; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "wdt"; + function = "gpio"; + }; +}; + +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan1"; + }; + + port@1 { + status = "okay"; + label = "lan2"; + }; + + port@2 { + status = "okay"; + label = "lan3"; + }; + + port@3 { + status = "okay"; + label = "lan4"; + }; + }; +}; diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c index c8afa4e3bb..e794f8d5cb 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c @@ -1480,7 +1480,7 @@ static const struct net_device_ops fe_netdev_ops = { .ndo_start_xmit = fe_start_xmit, .ndo_set_mac_address = fe_set_mac_address, .ndo_validate_addr = eth_validate_addr, - .ndo_do_ioctl = fe_do_ioctl, + .ndo_eth_ioctl = fe_do_ioctl, .ndo_change_mtu = fe_change_mtu, .ndo_tx_timeout = fe_tx_timeout, .ndo_get_stats64 = fe_get_stats64, diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 5eabb8b9b1..b4841d89c1 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -2911,6 +2911,17 @@ define Device/winstars_ws-wn583a6 endef TARGET_DEVICES += winstars_ws-wn583a6 +define Device/wodesys_wd-r1802u + $(Device/dsa-migration) + $(Device/uimage-lzma-loader) + IMAGE_SIZE := 15808k + DEVICE_VENDOR := Wodesys + DEVICE_MODEL := WD-R1802U + DEVICE_PACKAGES := kmod-mt7915-firmware -uboot-envtools + SUPPORTED_DEVICES += mt7621-rfb-ax-nor +endef +TARGET_DEVICES += wodesys_wd-r1802u + define Device/xiaomi_nand_separate $(Device/nand) $(Device/uimage-lzma-loader) diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network index 2d091ac4c2..3e26acc8b3 100644 --- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network @@ -62,6 +62,7 @@ ramips_setup_interfaces() ubnt,unifi-nanohd|\ yuncore,fap690|\ wavlink,wl-wn573hx1|\ + wodesys,wd-r1802u|\ zyxel,nwa50ax|\ zyxel,nwa55axe) ucidef_set_interface_lan "lan" diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate index 6504dc81a5..0e7ff41453 100644 --- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate +++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate @@ -63,7 +63,8 @@ netgear,wac104|\ netgear,wndr3700-v5) migrate_radio '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0' '1e140000.pcie/pci0000:00/0000:00:02.0/0000:02:00.0' ;; -zbtlink,zbt-we1326) +zbtlink,zbt-we1326|\ +zbtlink,zbt-we3526) migrate_radio '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0' '1e140000.pcie/pci0000:00/0000:00:02.0/0000:02:00.0' migrate_radio '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0' '1e140000.pcie/pci0000:00/0000:00:01.0/0000:01:00.0' ;; diff --git a/tools/7z/Makefile b/tools/7z/Makefile index 2d75d9059e..962fd5729c 100644 --- a/tools/7z/Makefile +++ b/tools/7z/Makefile @@ -1,33 +1,27 @@ include $(TOPDIR)/rules.mk PKG_NAME:=7z -PKG_VERSION:=23.01 -PKG_SOURCE_VERSION:=2301 +PKG_VERSION:=24.05 -PKG_SOURCE:=$(PKG_NAME)$(PKG_SOURCE_VERSION)-src.tar.xz +PKG_SOURCE:=$(PKG_NAME)$(subst .,,$(PKG_VERSION))-src.tar.xz PKG_SOURCE_URL:=https://7-zip.org/a/ -PKG_HASH:=356071007360e5a1824d9904993e8b2480b51b570e8c9faf7c0f58ebe4bf9f74 -PKG_CPE_ID:=cpe:/a:7-zip:7zip +PKG_HASH:=63f341cf80b8d287c6e945519b3da0fa75553c85572a471b7fa6e68f9a90b790 + +PKG_CPE_ID:=cpe:/a:7-zip:7-zip # This builds the 7zr variant which supports only 7z, so no non-LGPL code should be included PKG_LICENSE:=LGPL-2.1-or-later PKG_LICENSE_FILES:=DOC/License.txt DOC/copying.txt -HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION) +HOST_MAKE_PATH:=CPP/7zip/Bundles/Alone7z include $(INCLUDE_DIR)/host-build.mk -TAR_CMD=$(HOST_TAR) -C $(1) $(TAR_OPTIONS) - -ALONE_DIR=$(HOST_BUILD_DIR)/CPP/7zip/Bundles/Alone7z - -define Host/Compile - $(MAKE) -C $(ALONE_DIR) -f makefile.gcc -endef +TAR_OPTIONS := -C $(HOST_BUILD_DIR) $(TAR_OPTIONS) +HOST_MAKE_FLAGS += -f makefile.gcc define Host/Install - $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin - $(INSTALL_BIN) $(ALONE_DIR)/_o/7zr $(STAGING_DIR_HOST)/bin/7zr + $(INSTALL_BIN) $(HOST_BUILD_DIR)/$(HOST_MAKE_PATH)/_o/7zr $(STAGING_DIR_HOST)/bin/ endef define Host/Clean diff --git a/tools/7z/patches/7-zip-flags.patch b/tools/7z/patches/7-zip-flags.patch index b9b2152f22..5c684b0689 100644 --- a/tools/7z/patches/7-zip-flags.patch +++ b/tools/7z/patches/7-zip-flags.patch @@ -9,12 +9,12 @@ endif # for object file -@@ -32,7 +32,7 @@ endif - # -save-temps - CFLAGS_BASE_LIST = -c +@@ -50,7 +50,7 @@ endif + endif + # CFLAGS_BASE_LIST = -S -CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \ +CFLAGS_BASE = $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) -D_GNU_SOURCE \ - -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + $(CFLAGS_DEBUG) -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ -fPIC diff --git a/tools/7z/patches/7-zip-musl.patch b/tools/7z/patches/7-zip-musl.patch index e066cc8ec9..a08520a25f 100644 --- a/tools/7z/patches/7-zip-musl.patch +++ b/tools/7z/patches/7-zip-musl.patch @@ -1,14 +1,3 @@ ---- a/C/CpuArch.c -+++ b/C/CpuArch.c -@@ -766,8 +766,6 @@ BoolInt CPU_IsSupported_AES (void) { ret - - #ifdef USE_HWCAP - --#include -- - #define MY_HWCAP_CHECK_FUNC_2(name1, name2) \ - BoolInt CPU_IsSupported_ ## name1() { return (getauxval(AT_HWCAP) & (HWCAP_ ## name2)) ? 1 : 0; } - --- a/C/Threads.c +++ b/C/Threads.c @@ -265,7 +265,7 @@ WRes Thread_Create_With_CpuSet(CThread * @@ -18,7 +7,7 @@ - pthread_attr_setaffinity_np(&attr, sizeof(*cpuSet), cpuSet); + //pthread_attr_setaffinity_np(&attr, sizeof(*cpuSet), cpuSet); // if (ret2) ret = ret2; - #endif + #endif } @@ -275,14 +275,12 @@ WRes Thread_Create_With_CpuSet(CThread * if (!ret) @@ -37,7 +26,7 @@ // ret2 = --- a/C/Threads.h +++ b/C/Threads.h -@@ -20,6 +20,7 @@ +@@ -29,6 +29,7 @@ Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_ #endif #include @@ -45,15 +34,3 @@ #endif ---- a/CPP/Windows/SystemInfo.cpp -+++ b/CPP/Windows/SystemInfo.cpp -@@ -36,9 +36,6 @@ - #endif - */ - --#ifdef MY_CPU_ARM_OR_ARM64 --#include --#endif - #endif - - #ifdef __linux__ diff --git a/tools/util-linux/Makefile b/tools/util-linux/Makefile index 0394907a96..f9aadba2c2 100644 --- a/tools/util-linux/Makefile +++ b/tools/util-linux/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=util-linux -PKG_VERSION:=2.40.1 +PKG_VERSION:=2.40.2 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.40 -PKG_HASH:=8e396eececae2b3b68db232c33b8810faa7c31f6df19f98f512739293d5829b7 +PKG_HASH:=d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3 PKG_CPE_ID:=cpe:/a:kernel:util-linux PKG_FIXUP:=autoreconf diff --git a/tools/util-linux/patches/0001-hexdump-allow-enabling-with-disable-all-programs.patch b/tools/util-linux/patches/0001-hexdump-allow-enabling-with-disable-all-programs.patch index c0c1f04d06..a8f1b5eb24 100644 --- a/tools/util-linux/patches/0001-hexdump-allow-enabling-with-disable-all-programs.patch +++ b/tools/util-linux/patches/0001-hexdump-allow-enabling-with-disable-all-programs.patch @@ -13,7 +13,7 @@ Signed-off-by: Robert Marko --- a/configure.ac +++ b/configure.ac -@@ -2237,7 +2237,11 @@ UL_BUILD_INIT([column], [check]) +@@ -2240,7 +2240,11 @@ UL_BUILD_INIT([column], [check]) UL_REQUIRES_BUILD([column], [libsmartcols]) AM_CONDITIONAL([BUILD_COLUMN], [test "x$build_column" = xyes])