From 5876b4afb9a7f0429cdb26b87c0fc7fb6d42db53 Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Fri, 29 Mar 2024 11:38:49 +0100 Subject: [PATCH 01/18] qualcommax: default to kernel 6.6 6.6 has been in testing on qualcommax for a while so it should be in a good shape, but lets default to it to get a wider audience. Signed-off-by: Robert Marko --- target/linux/qualcommax/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target/linux/qualcommax/Makefile b/target/linux/qualcommax/Makefile index 68609157b0..ab7f52ae04 100644 --- a/target/linux/qualcommax/Makefile +++ b/target/linux/qualcommax/Makefile @@ -8,8 +8,7 @@ KERNELNAME:=Image dtbs CPU_TYPE:=cortex-a53 SUBTARGETS:=ipq807x ipq60xx -KERNEL_PATCHVER:=6.1 -KERNEL_TESTING_PATCHVER:=6.6 +KERNEL_PATCHVER:=6.6 include $(INCLUDE_DIR)/target.mk DEFAULT_PACKAGES += \ From 50e6c8ae8df55532fb70c281bd238b9b1cf1fdaf Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 26 Mar 2024 00:40:37 +0800 Subject: [PATCH 02/18] rockchip: remove 'swiotlb' parameter from boot script We have hardware IOMMU support and this is totally unnecessary. The given value is also unreasonable, it's too small and causes kernel panic in some cases: [ 5706.856473] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 28672 bytes), total 512 (slots), used 498 (slots) [ 5706.864451] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 65536 bytes), total 512 (slots), used 464 (slots) This parameter seems to be added by mistake, so remove it. Fixes: e35c7ab51fd1 ("rockchip: merge bootscript") Signed-off-by: Tianling Shen --- target/linux/rockchip/image/default.bootscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/rockchip/image/default.bootscript b/target/linux/rockchip/image/default.bootscript index e9de14ff7a..d49abd4478 100644 --- a/target/linux/rockchip/image/default.bootscript +++ b/target/linux/rockchip/image/default.bootscript @@ -8,7 +8,7 @@ elif test $stdout = 'serial@ff1a0000' ; then serial_addr=',0xff1a0000'; fi; -setenv bootargs "console=ttyS2,1500000 console=tty1 earlycon=uart8250,mmio32${serial_addr} swiotlb=1 root=PARTUUID=${uuid} rw rootwait"; +setenv bootargs "console=ttyS2,1500000 console=tty1 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait"; load ${devtype} ${devnum}:1 ${kernel_addr_r} kernel.img From 163c3d0bde28664058656ce1c2bd97f80e4dbe2d Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Tue, 26 Mar 2024 02:25:42 +0800 Subject: [PATCH 03/18] rockchip: remove redundant 'console' parameter from boot script ttyS2 is the default console used for all rockchip boards. The redundant 'console=tty1' parameter now breaks the console due to recent procd update. Signed-off-by: Tianling Shen --- target/linux/rockchip/image/default.bootscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/linux/rockchip/image/default.bootscript b/target/linux/rockchip/image/default.bootscript index d49abd4478..cca0b8d4ac 100644 --- a/target/linux/rockchip/image/default.bootscript +++ b/target/linux/rockchip/image/default.bootscript @@ -8,7 +8,7 @@ elif test $stdout = 'serial@ff1a0000' ; then serial_addr=',0xff1a0000'; fi; -setenv bootargs "console=ttyS2,1500000 console=tty1 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait"; +setenv bootargs "console=ttyS2,1500000 earlycon=uart8250,mmio32${serial_addr} root=PARTUUID=${uuid} rw rootwait"; load ${devtype} ${devnum}:1 ${kernel_addr_r} kernel.img From 27d227b6828f5b211e68aa633f82c94c65f27d63 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 25 Jan 2024 10:25:06 +0100 Subject: [PATCH 04/18] imagebuilder: check if BOARD is located in the feeds sub directory Fixes the regression so that targets that were installed via a feed can also be build again with the Image Builder. Fixes: 84ec8c4 ("imagebuilder: copy from buildroot only target/linux") Signed-off-by: Florian Eckert Tested-by: Thomas Richard --- target/imagebuilder/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index c3b6c9c10c..799ac3be55 100644 --- a/target/imagebuilder/Makefile +++ b/target/imagebuilder/Makefile @@ -80,7 +80,13 @@ endif $(CP) -L $(TOPDIR)/target/linux/Makefile $(PKG_BUILD_DIR)/target/linux $(CP) -L $(TOPDIR)/target/linux/generic $(PKG_BUILD_DIR)/target/linux - $(CP) -L $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux + # check if board is installed from a feeds subdirectory + if [ -d $(TOPDIR)/target/linux/feeds/$(BOARD) ]; then \ + mkdir -p $(PKG_BUILD_DIR)/target/linux/feeds; \ + $(CP) -L $(TOPDIR)/target/linux/feeds/$(BOARD) $(PKG_BUILD_DIR)/target/linux/feeds; \ + else \ + $(CP) -L $(TOPDIR)/target/linux/$(BOARD) $(PKG_BUILD_DIR)/target/linux; \ + fi if [ -d $(TOPDIR)/staging_dir/host/lib/grub ]; then \ $(CP) $(TOPDIR)/staging_dir/host/lib/grub/ $(PKG_BUILD_DIR)/staging_dir/host/lib; \ fi From a998a12a2fe2b0f29b8bba11fec386b05c5ac1cc Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 3 May 2023 13:29:42 +0200 Subject: [PATCH 05/18] imagebuilder: add check if target is sourced from feed The image generation would fail, if the target is included from a feed. To fix this, check if targets is found in the feed directory. Signed-off-by: Florian Eckert Tested-by: Thomas Richard --- target/imagebuilder/files/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile index 78ec7e2e94..0466fc7dcc 100644 --- a/target/imagebuilder/files/Makefile +++ b/target/imagebuilder/files/Makefile @@ -205,8 +205,13 @@ build_image: FORCE @echo @echo Building images... rm -rf $(BUILD_DIR)/json_info_files/ - $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ - $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)") + if [ -d "target/linux/feeds/$(BOARD)" ]; then \ + $(NO_TRACE_MAKE) -C target/linux/feeds/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ + $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)"); \ + else \ + $(NO_TRACE_MAKE) -C target/linux/$(BOARD)/image install TARGET_BUILD=1 IB=1 EXTRA_IMAGE_NAME="$(EXTRA_IMAGE_NAME)" \ + $(if $(USER_PROFILE),PROFILE="$(USER_PROFILE)"); \ + fi $(BIN_DIR)/profiles.json: FORCE $(if $(CONFIG_JSON_OVERVIEW_IMAGE_INFO), \ From 362e7103c674cb9d3fe8f5c6a1a38414f7ba66b8 Mon Sep 17 00:00:00 2001 From: Mieczyslaw Nalewaj Date: Mon, 18 Mar 2024 11:07:35 +0100 Subject: [PATCH 06/18] ramips: mt7620a_tplink_archer-c5-v4: use LED_FUNCTION_WLAN_2GHZ and LED_FUNCTION_WLAN_5GHZ Use LED_FUNCTION_WLAN_2GHZ and LED_FUNCTION_WLAN_5GHZ instead function-enumerator Signed-off-by: Mieczyslaw Nalewaj --- target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts index c02b341d09..fcebf87c3f 100644 --- a/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts +++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts @@ -26,17 +26,15 @@ }; led-1 { - function = LED_FUNCTION_WLAN; + function = LED_FUNCTION_WLAN_2GHZ; color = ; - function-enumerator = <2>; gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; }; led-2 { - function = LED_FUNCTION_WLAN; + function = LED_FUNCTION_WLAN_5GHZ; color = ; - function-enumerator = <5>; gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; }; From 0170666d89127585d30c3f1a8fdf641d9e8fbbbf Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Thu, 2 Nov 2023 23:16:28 +0800 Subject: [PATCH 07/18] uboot-mediatek: add Netcore N60 support The vendor uboot requires special fit verification. So add a custom uboot build for this device. Signed-off-by: Chukun Pan --- .../uboot-envtools/files/mediatek_filogic | 1 + package/boot/uboot-mediatek/Makefile | 13 + .../patches/429-add-netcore-n60.patch | 433 ++++++++++++++++++ 3 files changed, 447 insertions(+) create mode 100644 package/boot/uboot-mediatek/patches/429-add-netcore-n60.patch diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic index 08d2bf782b..972ad293ac 100644 --- a/package/boot/uboot-envtools/files/mediatek_filogic +++ b/package/boot/uboot-envtools/files/mediatek_filogic @@ -75,6 +75,7 @@ zbtlink,zbt-z8103ax) ;; h3c,magic-nx30-pro|\ jcg,q30-pro|\ +netcore,n60|\ qihoo,360t7|\ tplink,tl-xdr4288|\ tplink,tl-xdr6086|\ diff --git a/package/boot/uboot-mediatek/Makefile b/package/boot/uboot-mediatek/Makefile index bc55d43211..c8213f7a53 100644 --- a/package/boot/uboot-mediatek/Makefile +++ b/package/boot/uboot-mediatek/Makefile @@ -472,6 +472,18 @@ define U-Boot/mt7986_jdcloud_re-cp-03 DEPENDS:=+trusted-firmware-a-mt7986-emmc-ddr4 endef +define U-Boot/mt7986_netcore_n60 + NAME:=Netcore N60 + BUILD_SUBTARGET:=filogic + BUILD_DEVICES:=netcore_n60 + UBOOT_CONFIG:=mt7986_netcore_n60 + UBOOT_IMAGE:=u-boot.fip + BL2_BOOTDEV:=spim-nand + BL2_SOC:=mt7986 + BL2_DDRTYPE:=ddr3 + DEPENDS:=+trusted-firmware-a-mt7986-spim-nand-ddr3 +endef + define U-Boot/mt7986_tplink_tl-xdr4288 NAME:=TP-LINK TL-XDR4288 BUILD_SUBTARGET:=filogic @@ -669,6 +681,7 @@ UBOOT_TARGETS := \ mt7986_bananapi_bpi-r3-mini-snand \ mt7986_glinet_gl-mt6000 \ mt7986_jdcloud_re-cp-03 \ + mt7986_netcore_n60 \ mt7986_tplink_tl-xdr4288 \ mt7986_tplink_tl-xdr6086 \ mt7986_tplink_tl-xdr6088 \ diff --git a/package/boot/uboot-mediatek/patches/429-add-netcore-n60.patch b/package/boot/uboot-mediatek/patches/429-add-netcore-n60.patch new file mode 100644 index 0000000000..2304fcd5ce --- /dev/null +++ b/package/boot/uboot-mediatek/patches/429-add-netcore-n60.patch @@ -0,0 +1,433 @@ +--- /dev/null ++++ b/configs/mt7986_netcore_n60_defconfig +@@ -0,0 +1,182 @@ ++CONFIG_ARM=y ++CONFIG_POSITION_INDEPENDENT=y ++CONFIG_ARCH_MEDIATEK=y ++CONFIG_TARGET_MT7986=y ++CONFIG_TEXT_BASE=0x41e00000 ++CONFIG_SYS_MALLOC_F_LEN=0x4000 ++CONFIG_SYS_HAS_NONCACHED_MEMORY=y ++CONFIG_NR_DRAM_BANKS=1 ++CONFIG_DEFAULT_DEVICE_TREE="mt7986a-netcore-n60" ++CONFIG_DEFAULT_ENV_FILE="netcore_n60_env" ++CONFIG_DEFAULT_FDT_FILE="mediatek/mt7986a-netcore-n60.dtb" ++CONFIG_OF_LIBFDT_OVERLAY=y ++CONFIG_DEBUG_UART_BASE=0x11002000 ++CONFIG_DEBUG_UART_CLOCK=40000000 ++CONFIG_DEBUG_UART=y ++CONFIG_SYS_LOAD_ADDR=0x46000000 ++CONFIG_SMBIOS_PRODUCT_NAME="" ++CONFIG_AUTOBOOT_KEYED=y ++CONFIG_BOOTDELAY=30 ++CONFIG_AUTOBOOT_MENU_SHOW=y ++CONFIG_CFB_CONSOLE_ANSI=y ++CONFIG_BOARD_LATE_INIT=y ++CONFIG_BUTTON=y ++CONFIG_BUTTON_GPIO=y ++CONFIG_GPIO_HOG=y ++CONFIG_CMD_ENV_FLAGS=y ++CONFIG_FIT=y ++CONFIG_FIT_ENABLE_SHA256_SUPPORT=y ++CONFIG_LED=y ++CONFIG_LED_BLINK=y ++CONFIG_LED_GPIO=y ++CONFIG_LOGLEVEL=7 ++CONFIG_LOG=y ++CONFIG_SYS_PROMPT="MT7986> " ++CONFIG_CMD_BOOTMENU=y ++CONFIG_CMD_BOOTP=y ++CONFIG_CMD_BUTTON=y ++CONFIG_CMD_CACHE=y ++CONFIG_CMD_CDP=y ++CONFIG_CMD_CPU=y ++CONFIG_CMD_DHCP=y ++CONFIG_CMD_DM=y ++CONFIG_CMD_DNS=y ++CONFIG_CMD_ECHO=y ++CONFIG_CMD_ENV_READMEM=y ++CONFIG_CMD_ERASEENV=y ++CONFIG_CMD_EXT4=y ++CONFIG_CMD_FAT=y ++CONFIG_CMD_FDT=y ++CONFIG_CMD_FS_GENERIC=y ++CONFIG_CMD_FS_UUID=y ++CONFIG_CMD_GPIO=y ++CONFIG_CMD_GPT=y ++CONFIG_CMD_HASH=y ++CONFIG_CMD_ITEST=y ++CONFIG_CMD_LED=y ++CONFIG_CMD_LICENSE=y ++CONFIG_CMD_LINK_LOCAL=y ++# CONFIG_CMD_MBR is not set ++CONFIG_CMD_PCI=y ++CONFIG_CMD_PSTORE=y ++CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000 ++CONFIG_CMD_SF_TEST=y ++CONFIG_CMD_PING=y ++CONFIG_CMD_PXE=y ++CONFIG_CMD_PWM=y ++CONFIG_CMD_SMC=y ++CONFIG_CMD_TFTPBOOT=y ++CONFIG_CMD_TFTPSRV=y ++CONFIG_CMD_UBI=y ++CONFIG_CMD_UBI_RENAME=y ++CONFIG_CMD_UBIFS=y ++CONFIG_CMD_ASKENV=y ++CONFIG_CMD_PART=y ++CONFIG_CMD_RARP=y ++CONFIG_CMD_SETEXPR=y ++CONFIG_CMD_SLEEP=y ++CONFIG_CMD_SNTP=y ++CONFIG_CMD_SOURCE=y ++CONFIG_CMD_STRINGS=y ++CONFIG_CMD_USB=y ++CONFIG_CMD_UUID=y ++CONFIG_DISPLAY_CPUINFO=y ++CONFIG_DM_MTD=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_REGULATOR_GPIO=y ++CONFIG_DM_USB=y ++CONFIG_DM_PWM=y ++CONFIG_PWM_MTK=y ++CONFIG_HUSH_PARSER=y ++CONFIG_SYS_REDUNDAND_ENVIRONMENT=y ++CONFIG_SYS_RELOC_GD_ENV_ADDR=y ++CONFIG_VERSION_VARIABLE=y ++CONFIG_PARTITION_UUIDS=y ++CONFIG_NETCONSOLE=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK=y ++CONFIG_DM_GPIO=y ++CONFIG_DM_SCSI=y ++CONFIG_AHCI=y ++CONFIG_AHCI_PCI=y ++CONFIG_SCSI_AHCI=y ++CONFIG_SCSI=y ++CONFIG_CMD_SCSI=y ++CONFIG_PHY=y ++CONFIG_PHY_MTK_TPHY=y ++CONFIG_PHY_FIXED=y ++CONFIG_MTK_AHCI=y ++CONFIG_DM_ETH=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PCI=y ++# CONFIG_MMC is not set ++# CONFIG_DM_MMC is not set ++CONFIG_MTD=y ++CONFIG_MTD_UBI_FASTMAP=y ++CONFIG_DM_PCI=y ++CONFIG_PCIE_MEDIATEK=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7622=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_PRE_CONSOLE_BUFFER=y ++CONFIG_PRE_CON_BUF_ADDR=0x4007EF00 ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_RAM=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_SPI=y ++CONFIG_DM_SPI=y ++CONFIG_MTK_SPI_NAND=y ++CONFIG_MTK_SPI_NAND_MTD=y ++CONFIG_SYSRESET_WATCHDOG=y ++CONFIG_WDT_MTK=y ++CONFIG_LZO=y ++CONFIG_ZSTD=y ++CONFIG_HEXDUMP=y ++CONFIG_RANDOM_UUID=y ++CONFIG_REGEX=y ++CONFIG_USB=y ++CONFIG_USB_HOST=y ++CONFIG_USB_XHCI_HCD=y ++CONFIG_USB_XHCI_MTK=y ++CONFIG_USB_STORAGE=y ++CONFIG_OF_EMBED=y ++CONFIG_ENV_OVERWRITE=y ++CONFIG_ENV_IS_IN_UBI=y ++CONFIG_ENV_UBI_PART="ubi" ++CONFIG_ENV_SIZE=0x1f000 ++CONFIG_ENV_SIZE_REDUND=0x1f000 ++CONFIG_ENV_UBI_VOLUME="ubootenv" ++CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2" ++CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y ++CONFIG_NET_RANDOM_ETHADDR=y ++CONFIG_REGMAP=y ++CONFIG_SYSCON=y ++CONFIG_CLK=y ++CONFIG_PHY_FIXED=y ++CONFIG_DM_ETH=y ++CONFIG_MEDIATEK_ETH=y ++CONFIG_PINCTRL=y ++CONFIG_PINCONF=y ++CONFIG_PINCTRL_MT7986=y ++CONFIG_POWER_DOMAIN=y ++CONFIG_MTK_POWER_DOMAIN=y ++CONFIG_DM_REGULATOR=y ++CONFIG_DM_REGULATOR_FIXED=y ++CONFIG_DM_SERIAL=y ++CONFIG_MTK_SERIAL=y ++CONFIG_HEXDUMP=y ++CONFIG_USE_DEFAULT_ENV_FILE=y ++CONFIG_MTD_SPI_NAND=y ++CONFIG_MTK_SPIM=y ++CONFIG_CMD_MTD=y ++CONFIG_CMD_NAND=y ++CONFIG_CMD_NAND_TRIMFFS=y ++CONFIG_LMB_MAX_REGIONS=64 ++CONFIG_USE_IPADDR=y ++CONFIG_IPADDR="192.168.1.1" ++CONFIG_USE_SERVERIP=y ++CONFIG_SERVERIP="192.168.1.254" +--- /dev/null ++++ b/arch/arm/dts/mt7986a-netcore-n60.dts +@@ -0,0 +1,185 @@ ++// SPDX-License-Identifier: GPL-2.0 ++/* ++ * Copyright (c) 2021 MediaTek Inc. ++ * Author: Sam Shih ++ */ ++ ++/dts-v1/; ++#include "mt7986.dtsi" ++#include ++#include ++ ++/ { ++ #address-cells = <1>; ++ #size-cells = <1>; ++ model = "Netcore N60"; ++ compatible = "mediatek,mt7986", "mediatek,mt7986-rfb"; ++ ++ chosen { ++ stdout-path = &uart0; ++ tick-timer = &timer0; ++ }; ++ ++ memory@40000000 { ++ device_type = "memory"; ++ reg = <0x40000000 0x20000000>; ++ }; ++ ++ keys { ++ compatible = "gpio-keys"; ++ ++ factory { ++ label = "reset"; ++ linux,code = ; ++ gpios = <&gpio 9 GPIO_ACTIVE_LOW>; ++ }; ++ ++ wps { ++ label = "wps"; ++ linux,code = ; ++ gpios = <&gpio 10 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++ ++ leds { ++ compatible = "gpio-leds"; ++ ++ status_red { ++ label = "red:status"; ++ gpios = <&gpio 29 GPIO_ACTIVE_LOW>; ++ }; ++ ++ status_green { ++ label = "green:status"; ++ gpios = <&gpio 32 GPIO_ACTIVE_LOW>; ++ }; ++ }; ++}; ++ ++&uart0 { ++ mediatek,force-highspeed; ++ status = "okay"; ++}; ++ ++&uart1 { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&uart1_pins>; ++ status = "disabled"; ++}; ++ ++ð { ++ status = "okay"; ++ mediatek,gmac-id = <0>; ++ phy-mode = "2500base-x"; ++ mediatek,switch = "mt7531"; ++ reset-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; ++ ++ fixed-link { ++ speed = <2500>; ++ full-duplex; ++ }; ++}; ++ ++&pinctrl { ++ spi_flash_pins: spi0-pins-func-1 { ++ mux { ++ function = "flash"; ++ groups = "spi0", "spi0_wp_hold"; ++ }; ++ ++ conf-pu { ++ pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; ++ drive-strength = ; ++ bias-pull-up = ; ++ }; ++ ++ conf-pd { ++ pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; ++ drive-strength = ; ++ bias-pull-down = ; ++ }; ++ }; ++ ++ spic_pins: spi1-pins-func-1 { ++ mux { ++ function = "spi"; ++ groups = "spi1_2"; ++ }; ++ }; ++ ++ uart1_pins: spi1-pins-func-3 { ++ mux { ++ function = "uart"; ++ groups = "uart1_2"; ++ }; ++ }; ++ ++ pwm_pins: pwm0-pins-func-1 { ++ mux { ++ function = "pwm"; ++ groups = "pwm0"; ++ }; ++ }; ++}; ++ ++&pwm { ++ pinctrl-names = "default"; ++ pinctrl-0 = <&pwm_pins>; ++ status = "okay"; ++}; ++ ++&spi0 { ++ #address-cells = <1>; ++ #size-cells = <0>; ++ pinctrl-names = "default"; ++ pinctrl-0 = <&spi_flash_pins>; ++ status = "okay"; ++ must_tx; ++ enhance_timing; ++ dma_ext; ++ ipm_design; ++ support_quad; ++ tick_dly = <1>; ++ sample_sel = <0>; ++ ++ spi_nand@1 { ++ compatible = "spi-nand"; ++ reg = <1>; ++ spi-max-frequency = <52000000>; ++ ++ partitions { ++ compatible = "fixed-partitions"; ++ #address-cells = <1>; ++ #size-cells = <1>; ++ ++ partition@0 { ++ label = "bl2"; ++ reg = <0x0 0x100000>; ++ }; ++ ++ partition@100000 { ++ label = "orig-env"; ++ reg = <0x100000 0x80000>; ++ }; ++ ++ partition@160000 { ++ label = "factory"; ++ reg = <0x180000 0x200000>; ++ }; ++ ++ partition@380000 { ++ label = "fip"; ++ reg = <0x380000 0x200000>; ++ }; ++ ++ partition@580000 { ++ label = "ubi"; ++ reg = <0x580000 0x7280000>; ++ }; ++ }; ++ }; ++}; ++ ++&watchdog { ++ status = "disabled"; ++}; +--- /dev/null ++++ b/netcore_n60_env +@@ -0,0 +1,57 @@ ++ipaddr=192.168.1.1 ++serverip=192.168.1.254 ++loadaddr=0x46000000 ++console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0 ++bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi ++bootconf=config-1 ++bootdelay=0 ++bootfile=openwrt-mediatek-filogic-netcore_n60-initramfs-recovery.itb ++bootfile_bl2=openwrt-mediatek-filogic-netcore_n60-preloader.bin ++bootfile_fip=openwrt-mediatek-filogic-netcore_n60-bl31-uboot.fip ++bootfile_upg=openwrt-mediatek-filogic-netcore_n60-squashfs-sysupgrade.itb ++bootled_pwr=green:status ++bootled_rec=red:status ++bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60 ++bootmenu_default=0 ++bootmenu_delay=0 ++bootmenu_title= ( ( ( OpenWrt ) ) ) ++bootmenu_0=Initialize environment.=run _firstboot ++bootmenu_0d=Run default boot command.=run boot_default ++bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return ++bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return ++bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return ++bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return ++bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return ++bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return ++bootmenu_8=Reboot.=reset ++bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset ++boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu ++boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever ++boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off ++boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off ++boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever ++boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done ++boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi ++boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf ++boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory ++boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2 ++part_default=production ++part_recovery=recovery ++reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800 ++mtd_write_fip=mtd erase fip && mtd write fip $loadaddr ++mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr ++ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic 0 || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic 1 || run ubi_format ++ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset ++ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi ++ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs ++ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery ++ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data ++ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic 2 && ubi write $loadaddr fit $filesize ++ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic 3 && ubi write $loadaddr recovery $filesize ++ethaddr_factory=mtd read factory 0x40080000 0x1fe000 0x1000 && env readmem -b ethaddr 0x40080f20 0x6 ; setenv ethaddr_factory ++_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv ++_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first ++_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title ++_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver" From 4ae474afbd023a3386f4276ca8f948a44b49ff1b Mon Sep 17 00:00:00 2001 From: Chukun Pan Date: Fri, 3 Nov 2023 23:02:35 +0800 Subject: [PATCH 08/18] mediatek: filogic: add Netcore N60 support Hardware specification: SoC: MediaTek MT7986A 4x A53 Flash: ESMT F50L1G41LB 128MB RAM: W632GU6NB DDR3 256MB Ethernet: 1x 2.5G + 4x 1G WiFi1: MT7975N 2.4GHz 4T4R WiFi2: MT7975PN 5GHz 4T4R Button: Reset, WPS Power: DC 12V 2A Flash instructions: 1. Connect to the router using ssh or telnet, username: useradmin, password is the web login password of the router. 2. Use scp to upload bl31-uboot.fip and flash: "mtd write xxx-preloader.bin spi0.0" "mtd write xxx-bl31-uboot.fip FIP" "mtd erase ubi" 3. Connect to the router via the Lan port, set a static ip of your PC. (ip 192.168.1.254, gateway 192.168.1.1) 4. Download initramfs image, reboot router, waiting for tftp recovery to complete. 5. After openwrt boots up, perform sysupgrade. Note: 1. Back up all mtd partitions before flashing. Signed-off-by: Chukun Pan --- .../mediatek/dts/mt7986a-netcore-n60.dts | 284 ++++++++++++++++++ .../filogic/base-files/etc/board.d/02_network | 1 + .../etc/hotplug.d/ieee80211/11_fix_wifi_mac | 3 +- .../base-files/lib/upgrade/platform.sh | 1 + target/linux/mediatek/image/filogic.mk | 24 ++ 5 files changed, 312 insertions(+), 1 deletion(-) create mode 100644 target/linux/mediatek/dts/mt7986a-netcore-n60.dts diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts new file mode 100644 index 0000000000..b96b1e2ec0 --- /dev/null +++ b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts @@ -0,0 +1,284 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; +#include +#include +#include + +#include "mt7986a.dtsi" + +/ { + model = "Netcore N60"; + compatible = "netcore,n60", "mediatek,mt7986a"; + + aliases { + serial0 = &uart0; + label-mac-device = &gmac0; + led-boot = &led_status_red; + led-failsafe = &led_status_red; + led-running = &led_status_blue; + led-upgrade = &led_status_blue; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + memory { + reg = <0 0x40000000 0 0x10000000>; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&pio 9 GPIO_ACTIVE_LOW>; + }; + + mesh { + label = "mesh"; + linux,code = ; + gpios = <&pio 10 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status_red: status-red { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 29 GPIO_ACTIVE_LOW>; + }; + + led_status_blue: status-blue { + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&pio 32 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&crypto { + status = "okay"; +}; + +ð { + status = "okay"; + + gmac0: mac@0 { + compatible = "mediatek,eth-mac"; + reg = <0>; + phy-mode = "2500base-x"; + + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible = "mediatek,eth-mac"; + reg = <1>; + phy-handle = <&phy6>; + phy-mode = "2500base-x"; + + nvmem-cells = <&macaddr_wan>; + nvmem-cell-names = "mac-address"; + }; + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + }; +}; + +&mdio { + reset-delay-us = <600>; + reset-post-delay-us = <20000>; + reset-gpios = <&pio 6 GPIO_ACTIVE_LOW>; + + phy6: phy@6 { + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <6>; + mxl,led-config = <0x0 0x0 0x0 0x3f0>; + }; + + switch: switch@1f { + compatible = "mediatek,mt7531"; + reg = <31>; + reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>; + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&pio>; + interrupts = <66 IRQ_TYPE_LEVEL_HIGH>; + }; +}; + +&switch { + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + }; + + port@1 { + reg = <1>; + label = "lan2"; + }; + + port@3 { + reg = <3>; + label = "lan3"; + }; + + port@4 { + reg = <4>; + label = "lan4"; + }; + + port@6 { + reg = <6>; + ethernet = <&gmac0>; + phy-mode = "2500base-x"; + + fixed-link { + speed = <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&spi0 { + pinctrl-names = "default"; + pinctrl-0 = <&spi_flash_pins>; + status = "okay"; + + flash@0 { + compatible = "spi-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + + spi-max-frequency = <20000000>; + spi-tx-bus-width = <4>; + spi-rx-bus-width = <4>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BL2"; + reg = <0x0000000 0x0100000>; + read-only; + }; + + partition@100000 { + label = "u-boot-env"; + reg = <0x0100000 0x0080000>; + }; + + factory: partition@180000 { + label = "Factory"; + reg = <0x0180000 0x0200000>; + read-only; + }; + + partition@380000 { + label = "FIP"; + reg = <0x0380000 0x0200000>; + read-only; + }; + + partition@580000 { + label = "ubi"; + reg = <0x0580000 0x7280000>; + }; + }; + }; +}; + +&pio { + spi_flash_pins: spi-flash-pins-33-to-38 { + mux { + function = "spi"; + groups = "spi0", "spi0_wp_hold"; + }; + conf-pu { + pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP"; + drive-strength = <8>; + mediatek,pull-up-adv = <0>; /* bias-disable */ + }; + conf-pd { + pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO"; + drive-strength = <8>; + mediatek,pull-down-adv = <0>; /* bias-disable */ + }; + }; + + wf_2g_5g_pins: wf_2g_5g-pins { + mux { + function = "wifi"; + groups = "wf_2g", "wf_5g"; + }; + conf { + pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength = <4>; + }; + }; +}; + +&trng { + status = "okay"; +}; + +&uart0 { + status = "okay"; +}; + +&watchdog { + status = "okay"; +}; + +&wifi { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&wf_2g_5g_pins>; + + mediatek,mtd-eeprom = <&factory 0x0>; +}; + +&factory { + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_lan: macaddr@1fef20 { + reg = <0x1fef20 0x6>; + }; + + macaddr_wan: macaddr@1fef26 { + reg = <0x1fef26 0x6>; + }; + }; +}; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 5b8b910f62..a1207fc8eb 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -26,6 +26,7 @@ mediatek_setup_interfaces() asus,tuf-ax4200|\ jdcloud,re-cp-03|\ mediatek,mt7981-rfb|\ + netcore,n60|\ unielec,u7981-01*|\ zbtlink,zbt-z8102ax) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1 diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index facd2079c4..ef10417e44 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -86,7 +86,8 @@ case "$board" in [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress ;; - jcg,q30-pro) + jcg,q30-pro|\ + netcore,n60) # Originally, phy1 is phy0 mac with LA bit set. However, this would conflict # addresses on multiple VIFs with the other radio. Use label mac to set LA bit. [ "$PHYNBR" = "1" ] && macaddr_setbit_la $(get_mac_label) > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index 389c177fb9..380606412d 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -130,6 +130,7 @@ platform_do_upgrade() { h3c,magic-nx30-pro|\ jcg,q30-pro|\ mediatek,mt7981-rfb|\ + netcore,n60|\ qihoo,360t7|\ tplink,tl-xdr4288|\ tplink,tl-xdr6086|\ diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index e3b588c861..2717121361 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -806,6 +806,30 @@ define Device/mercusys_mr90x-v1 endef TARGET_DEVICES += mercusys_mr90x-v1 +define Device/netcore_n60 + DEVICE_VENDOR := Netcore + DEVICE_MODEL := N60 + DEVICE_DTS := mt7986a-netcore-n60 + DEVICE_DTS_DIR := ../dts + UBINIZE_OPTS := -E 5 + BLOCKSIZE := 128k + PAGESIZE := 2048 + KERNEL_IN_UBI := 1 + UBOOTENV_IN_UBI := 1 + IMAGES := sysupgrade.itb + KERNEL_INITRAMFS_SUFFIX := -recovery.itb + KERNEL := kernel-bin | gzip + KERNEL_INITRAMFS := kernel-bin | lzma | \ + fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k + IMAGE/sysupgrade.itb := append-kernel | \ + fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata + DEVICE_PACKAGES := kmod-mt7986-firmware mt7986-wo-firmware + ARTIFACTS := preloader.bin bl31-uboot.fip + ARTIFACT/preloader.bin := mt7986-bl2 spim-nand-ddr3 + ARTIFACT/bl31-uboot.fip := mt7986-bl31-uboot netcore_n60 +endef +TARGET_DEVICES += netcore_n60 + define Device/netgear_wax220 DEVICE_VENDOR := NETGEAR DEVICE_MODEL := WAX220 From fcdc629144983cf5e3f5509e35149096aa2701b3 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 21 Feb 2024 13:13:34 -0800 Subject: [PATCH 09/18] tools/meson: update to 1.3.2 Add explicit setup as implicit is deprecated. Rename pkgconfig as no hyphen is deprecated. Signed-off-by: Rosen Penev --- include/meson.mk | 2 ++ tools/meson/Makefile | 4 ++-- tools/meson/files/openwrt-cross.txt.in | 2 +- tools/meson/files/openwrt-native.txt.in | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/meson.mk b/include/meson.mk index 74c9d3dd7f..65716746fe 100644 --- a/include/meson.mk +++ b/include/meson.mk @@ -98,6 +98,7 @@ endef define Host/Configure/Meson $(call Meson/CreateNativeFile,$(HOST_BUILD_DIR)/openwrt-native.txt) $(call Meson, \ + setup \ --native-file $(HOST_BUILD_DIR)/openwrt-native.txt \ $(MESON_HOST_ARGS) \ $(MESON_HOST_BUILD_DIR) \ @@ -121,6 +122,7 @@ define Build/Configure/Meson $(call Meson/CreateNativeFile,$(PKG_BUILD_DIR)/openwrt-native.txt) $(call Meson/CreateCrossFile,$(PKG_BUILD_DIR)/openwrt-cross.txt) $(call Meson, \ + setup \ --buildtype plain \ --native-file $(PKG_BUILD_DIR)/openwrt-native.txt \ --cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \ diff --git a/tools/meson/Makefile b/tools/meson/Makefile index 23bb393a59..96974faafe 100644 --- a/tools/meson/Makefile +++ b/tools/meson/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=meson -PKG_VERSION:=1.2.1 +PKG_VERSION:=1.3.2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/mesonbuild/meson/releases/download/$(PKG_VERSION) -PKG_HASH:=b1db3a153087549497ee52b1c938d2134e0338214fe14f7efd16fecd57b639f5 +PKG_HASH:=492eb450c8b073024276f916f5adbb3c4bb7e90e9e6ec124efda064f3d9b5baa PKG_MAINTAINER:=Andre Heider PKG_LICENSE:=Apache-2.0 diff --git a/tools/meson/files/openwrt-cross.txt.in b/tools/meson/files/openwrt-cross.txt.in index ba11915069..836a0e51e4 100644 --- a/tools/meson/files/openwrt-cross.txt.in +++ b/tools/meson/files/openwrt-cross.txt.in @@ -6,7 +6,7 @@ cpp_ld = [@LD@] ar = '@AR@' strip = '@STRIP@' nm = '@NM@' -pkgconfig = '@PKGCONFIG@' +pkg-config = '@PKGCONFIG@' cmake = '@CMAKE@' python = '@PYTHON@' diff --git a/tools/meson/files/openwrt-native.txt.in b/tools/meson/files/openwrt-native.txt.in index 48e09ece2c..179e00b43e 100644 --- a/tools/meson/files/openwrt-native.txt.in +++ b/tools/meson/files/openwrt-native.txt.in @@ -1,7 +1,7 @@ [binaries] c = [@CC@] cpp = [@CXX@] -pkgconfig = '@PKGCONFIG@' +pkg-config = '@PKGCONFIG@' cmake = '@CMAKE@' python = '@PYTHON@' From d08ff66fcd786848dcb911a7cb529066a9130343 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 21 Feb 2024 13:16:35 -0800 Subject: [PATCH 10/18] tools/meson: static host and both libraries Host packages typically are statically linked to avoid rpath issues and to avoid libraries not being found as a result. With target packages, both libraries make the most sense as InstallDev typically installs both, giving packages flexibility. Default this behavior. Signed-off-by: Rosen Penev --- include/meson.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/meson.mk b/include/meson.mk index 65716746fe..2a20c2bd6b 100644 --- a/include/meson.mk +++ b/include/meson.mk @@ -100,6 +100,7 @@ define Host/Configure/Meson $(call Meson, \ setup \ --native-file $(HOST_BUILD_DIR)/openwrt-native.txt \ + -Ddefault_library=static \ $(MESON_HOST_ARGS) \ $(MESON_HOST_BUILD_DIR) \ $(MESON_HOST_BUILD_DIR)/.., \ @@ -126,6 +127,7 @@ define Build/Configure/Meson --buildtype plain \ --native-file $(PKG_BUILD_DIR)/openwrt-native.txt \ --cross-file $(PKG_BUILD_DIR)/openwrt-cross.txt \ + -Ddefault_library=both \ $(MESON_ARGS) \ $(MESON_BUILD_DIR) \ $(MESON_BUILD_DIR)/.., \ From cd5c0054bdd4fae6b6d56fd1c3eee0dce734396e Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 21 Feb 2024 22:22:02 -0800 Subject: [PATCH 11/18] dtc: fix compilation with both libraries Upstream backports. Signed-off-by: Rosen Penev --- package/utils/dtc/Makefile | 2 +- .../dtc/patches/010-both-libraries.patch | 48 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 package/utils/dtc/patches/010-both-libraries.patch diff --git a/package/utils/dtc/Makefile b/package/utils/dtc/Makefile index afec6fbae5..ea970e200a 100644 --- a/package/utils/dtc/Makefile +++ b/package/utils/dtc/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dtc PKG_VERSION:=1.7.0 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_HASH:=29edce3d302a15563d8663198bbc398c5a0554765c83830d0d4c0409d21a16c4 diff --git a/package/utils/dtc/patches/010-both-libraries.patch b/package/utils/dtc/patches/010-both-libraries.patch new file mode 100644 index 0000000000..ccc547b349 --- /dev/null +++ b/package/utils/dtc/patches/010-both-libraries.patch @@ -0,0 +1,48 @@ +From da39ee0e68b6d9293133a7c41c6cf73354dce337 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +Date: Wed, 21 Feb 2024 13:57:56 -0800 +Subject: [PATCH] libfdt: rework shared/static libraries + +Instead of creating 2 libraries manualy, just call both_libraries and +link to the appropriate one as requested. + +Fixes compilation when passing -Ddefault_libraries=both as the +static_library name is duplicated. + +Signed-off-by: Rosen Penev +Signed-off-by: David Gibson +--- + libfdt/meson.build | 17 +++++------------ + 1 file changed, 5 insertions(+), 12 deletions(-) + +--- a/libfdt/meson.build ++++ b/libfdt/meson.build +@@ -16,7 +16,7 @@ sources = files( + 'fdt_wip.c', + ) + +-libfdt = library( ++libfdt = both_libraries( + 'fdt', sources, + version: '1.6.0', + link_args: ['-Wl,--no-undefined', version_script], +@@ -24,17 +24,12 @@ libfdt = library( + install: true, + ) + +-libfdt_a = static_library( +- 'fdt', sources, +- install: true, +-) +- + libfdt_inc = include_directories('.') + + if static_build +- link_with = libfdt_a ++ link_with = libfdt.get_static_lib() + else +- link_with = libfdt ++ link_with = libfdt.get_shared_lib() + endif + + libfdt_dep = declare_dependency( From 60061b5c26b65004377a886f917bcd3005e97dad Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Tue, 19 Mar 2024 21:25:52 +0800 Subject: [PATCH 12/18] ath79: disable building small Flash EnGenius devices The buildbot has not successfully built them for a long time due to small Flash size. Signed-off-by: Shiji Yang --- target/linux/ath79/image/tiny.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 6baa3afff7..25ec95b574 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -40,6 +40,7 @@ define Device/engenius_eap350-v1 IMAGE_SIZE := 4928k LOADER_FLASH_OFFS := 0x1a0000 SENAO_IMGNAME := senao-eap350 + DEFAULT := n endef TARGET_DEVICES += engenius_eap350-v1 @@ -53,6 +54,7 @@ define Device/engenius_ecb350-v1 IMAGE_SIZE := 4928k LOADER_FLASH_OFFS := 0x1a0000 SENAO_IMGNAME := senao-ecb350 + DEFAULT := n endef TARGET_DEVICES += engenius_ecb350-v1 @@ -66,6 +68,7 @@ define Device/engenius_enh202-v1 IMAGE_SIZE := 4928k LOADER_FLASH_OFFS := 0x1a0000 SENAO_IMGNAME := senao-enh202 + DEFAULT := n endef TARGET_DEVICES += engenius_enh202-v1 From 82208eb52785da3cce48cfa47849436aa77e985c Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Tue, 19 Mar 2024 21:25:52 +0800 Subject: [PATCH 13/18] ath79: move seama image recipe to the common Makefile Move seama image recipe to the common Makefile in order for some tiny sub-target D-Link devices can share it. Signed-off-by: Shiji Yang --- target/linux/ath79/image/Makefile | 18 ++++++++++++++++++ target/linux/ath79/image/generic.mk | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/target/linux/ath79/image/Makefile b/target/linux/ath79/image/Makefile index 8328be7667..5647200b4b 100644 --- a/target/linux/ath79/image/Makefile +++ b/target/linux/ath79/image/Makefile @@ -7,6 +7,7 @@ DEVICE_VARS += LOADER_FLASH_OFFS LOADER_TYPE DEVICE_VARS += LOADER_FLASH_MAX LOADER_KERNEL_MAGIC DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION +DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK define Build/loader-common rm -rf $@.src @@ -87,6 +88,23 @@ define Device/loader-okli-uimage lzma | uImage lzma endef +define Device/seama + KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma + KERNEL_INITRAMFS := $$(KERNEL) | seama + IMAGES += factory.bin + SEAMA_MTDBLOCK := 1 + + # 64 bytes offset: + # - 28 bytes seama_header + # - 36 bytes of META data (4-bytes aligned) + IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs + IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ + check-size | append-metadata + IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ + seama-seal | check-size + SEAMA_SIGNATURE := +endef + include $(SUBTARGET).mk ifeq ($(SUBTARGET),generic) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index e7960efbaa..d56afcaac8 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -6,7 +6,6 @@ include ./common-yuncore.mk include ./common-ubnt.mk DEVICE_VARS += ADDPATTERN_ID ADDPATTERN_VERSION -DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK DEVICE_VARS += KERNEL_INITRAMFS_PREFIX DAP_SIGNATURE DEVICE_VARS += EDIMAX_HEADER_MAGIC EDIMAX_HEADER_MODEL DEVICE_VARS += ELECOM_HWID @@ -194,23 +193,6 @@ define Build/zyxel-tar-bz2 rm -rf $@.tmp endef -define Device/seama - KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma - KERNEL_INITRAMFS := $$(KERNEL) | seama - IMAGES += factory.bin - SEAMA_MTDBLOCK := 1 - - # 64 bytes offset: - # - 28 bytes seama_header - # - 36 bytes of META data (4-bytes aligned) - IMAGE/default := append-kernel | pad-offset $$$$(BLOCKSIZE) 64 | append-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | seama | pad-rootfs | \ - check-size | append-metadata - IMAGE/factory.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ - seama-seal | check-size - SEAMA_SIGNATURE := -endef - define Device/8dev_carambola2 SOC := ar9331 From 9a6c1846bb40879fccf42070ec3bf4daa9732e93 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Tue, 19 Mar 2024 21:25:52 +0800 Subject: [PATCH 14/18] ath79: tiny: enable NVMEM u-boot-env driver The upcoming D-Link devices to the tiny sub-target require it to parse the u-env MAC address. The kernel size will increase by about 1 KiB. Signed-off-by: Shiji Yang --- target/linux/ath79/tiny/config-default | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/linux/ath79/tiny/config-default b/target/linux/ath79/tiny/config-default index df7e662827..3fb83dd8e1 100644 --- a/target/linux/ath79/tiny/config-default +++ b/target/linux/ath79/tiny/config-default @@ -6,6 +6,8 @@ CONFIG_NET_DSA=y CONFIG_NET_DSA_MV88E6060=y CONFIG_NET_DSA_TAG_TRAILER=y CONFIG_NET_SWITCHDEV=y +CONFIG_NVMEM_SYSFS=y +CONFIG_NVMEM_U_BOOT_ENV=y CONFIG_PHYLINK=y CONFIG_PHY_AR7100_USB=y CONFIG_PHY_AR7200_USB=y From 8201e402c5485817eaf8838347b35e48f7086739 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Tue, 19 Mar 2024 21:25:52 +0800 Subject: [PATCH 15/18] ath79: move D-Link DIR-859 and DIR-869 series to tiny sub-target These devices only have 64 MiB RAM and ath10k wireless driver will consume a lot of memory. Let's move them to the tiny sub-target to get extra 7 MiB of free space. In this way, we can extend their lifetime to receive support for the next OpenWrt LTS version. This patch also trims the USB package for the non-existent USB port. Signed-off-by: Shiji Yang --- .../generic/base-files/etc/board.d/01_leds | 6 ---- .../generic/base-files/etc/board.d/02_network | 12 ------- .../etc/uci-defaults/09_fix-checksum | 3 -- target/linux/ath79/image/generic.mk | 35 ------------------- target/linux/ath79/image/tiny.mk | 35 +++++++++++++++++++ .../ath79/tiny/base-files/etc/board.d/01_leds | 6 ++++ .../tiny/base-files/etc/board.d/02_network | 15 ++++++++ .../etc/uci-defaults/09_fix-checksum | 16 +++++++++ 8 files changed, 72 insertions(+), 56 deletions(-) create mode 100644 target/linux/ath79/tiny/base-files/etc/uci-defaults/09_fix-checksum diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index 525224bec9..bfc383c0e5 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -249,12 +249,6 @@ dlink,dap-1720-a1) ucidef_set_led_rssi "rssimediumhigh" "RSSI MEDIUM-HIGH" "green:signal-2" "wlan0" "61" "100" ucidef_set_led_rssi "rssihigh" "RSSI HIGH" "green:signal-3" "wlan0" "81" "100" ;; -dlink,dir-859-a1) - ucidef_set_led_switch "internet" "WAN" "green:internet" "switch0" "0x20" - ;; -dlink,dir-859-a3) - ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x20" - ;; engenius,ens202ext-v1|\ engenius,enstationac-v1) ucidef_set_rssimon "wlan0" "200000" "1" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index 6c1cb86235..de9bd6a300 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -318,9 +318,6 @@ ath79_setup_interfaces() dlink,dir-842-c1|\ dlink,dir-842-c2|\ dlink,dir-842-c3|\ - dlink,dir-859-a1|\ - dlink,dir-859-a3|\ - dlink,dir-869-a1|\ engenius,epg5000|\ engenius,esr1200|\ engenius,esr1750|\ @@ -699,15 +696,6 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_ascii devdata "wanmac") label_mac=$lan_mac ;; - dlink,dir-859-a1|\ - dlink,dir-869-a1) - lan_mac=$(mtd_get_mac_text "devdata" 0xc9) - wan_mac=$(mtd_get_mac_text "devdata" 0x79) - ;; - dlink,dir-859-a3) - lan_mac=$(get_mac_label) - wan_mac=$(macaddr_add "$lan_mac" 3) - ;; qihoo,c301|\ wd,mynet-n600|\ wd,mynet-n750) diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum index 4ec8c13eb7..3f85fc12a0 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum @@ -23,9 +23,6 @@ dlink,dap-3662-a1) ;; dlink,dap-1720-a1|\ dlink,dir-629-a1|\ -dlink,dir-859-a1|\ -dlink,dir-859-a3|\ -dlink,dir-869-a1|\ qihoo,c301) fix_seama_header ;; diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index d56afcaac8..03a0472c12 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1278,41 +1278,6 @@ define Device/dlink_dir-842-c3 endef TARGET_DEVICES += dlink_dir-842-c3 -define Device/dlink_dir-859-ax - $(Device/seama) - SOC := qca9563 - DEVICE_VENDOR := D-Link - DEVICE_MODEL := DIR-859 - IMAGE_SIZE := 15872k - DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct - SEAMA_SIGNATURE := wrgac37_dlink.2013gui_dir859 -endef - -define Device/dlink_dir-859-a1 - $(Device/dlink_dir-859-ax) - DEVICE_VARIANT := A1 -endef -TARGET_DEVICES += dlink_dir-859-a1 - -define Device/dlink_dir-859-a3 - $(Device/dlink_dir-859-ax) - DEVICE_VARIANT := A3 -endef -TARGET_DEVICES += dlink_dir-859-a3 - -define Device/dlink_dir-869-a1 - $(Device/seama) - SOC := qca9563 - DEVICE_VENDOR := D-Link - DEVICE_MODEL := DIR-869 - DEVICE_VARIANT := A1 - IMAGE_SIZE := 15872k - DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct - SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869 - SUPPORTED_DEVICES += dir-869-a1 -endef -TARGET_DEVICES += dlink_dir-869-a1 - define Device/elecom_wab DEVICE_VENDOR := ELECOM IMAGE_SIZE := 14336k diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 25ec95b574..13f105d202 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -30,6 +30,41 @@ define Device/dlink_dir-615-e4 endef TARGET_DEVICES += dlink_dir-615-e4 +define Device/dlink_dir-859-a + $(Device/seama) + SOC := qca9563 + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DIR-859 + IMAGE_SIZE := 15872k + SEAMA_SIGNATURE := wrgac37_dlink.2013gui_dir859 + DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct-smallbuffers +endef + +define Device/dlink_dir-859-a1 + $(Device/dlink_dir-859-a) + DEVICE_VARIANT := A1 +endef +TARGET_DEVICES += dlink_dir-859-a1 + +define Device/dlink_dir-859-a3 + $(Device/dlink_dir-859-a) + DEVICE_VARIANT := A3 +endef +TARGET_DEVICES += dlink_dir-859-a3 + +define Device/dlink_dir-869-a1 + $(Device/seama) + SOC := qca9563 + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DIR-869 + DEVICE_VARIANT := A1 + IMAGE_SIZE := 15872k + SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869 + DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct-smallbuffers + SUPPORTED_DEVICES += dir-869-a1 +endef +TARGET_DEVICES += dlink_dir-869-a1 + define Device/engenius_eap350-v1 $(Device/senao_loader_okli) BLOCKSIZE := 4k diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds index 07e48ec49f..427eac8a06 100644 --- a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds @@ -20,6 +20,12 @@ tplink,tl-wr941-v4) ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08" ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10" ;; +dlink,dir-859-a1) + ucidef_set_led_switch "internet" "INTERNET" "green:internet" "switch0" "0x20" + ;; +dlink,dir-859-a3) + ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x20" + ;; engenius,enh202-v1) ucidef_set_led_switch "lan" "LAN" "amber:lan" "switch0" "0x10" ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" 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 836d119867..60e640e0fb 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 @@ -27,6 +27,12 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" ;; + dlink,dir-859-a1|\ + dlink,dir-859-a3|\ + dlink,dir-869-a1) + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" + ;; engenius,eap350-v1|\ engenius,ecb350-v1|\ pqi,air-pen|\ @@ -126,6 +132,15 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_ascii "nvram" "wan_mac") label_mac=$wan_mac ;; + dlink,dir-859-a1|\ + dlink,dir-869-a1) + lan_mac=$(mtd_get_mac_text "devdata" 0xc9) + wan_mac=$(mtd_get_mac_text "devdata" 0x79) + ;; + dlink,dir-859-a3) + lan_mac=$(get_mac_label) + wan_mac=$(macaddr_add "$lan_mac" 3) + ;; engenius,enh202-v1|\ ubnt,airrouter|\ ubnt,bullet-m-ar7240|\ diff --git a/target/linux/ath79/tiny/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ath79/tiny/base-files/etc/uci-defaults/09_fix-checksum new file mode 100644 index 0000000000..4febde5335 --- /dev/null +++ b/target/linux/ath79/tiny/base-files/etc/uci-defaults/09_fix-checksum @@ -0,0 +1,16 @@ +. /lib/functions.sh + +fix_seama_header() { + local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd) + [ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware +} + +board=$(board_name) + +case "$board" in +dlink,dir-859-a1|\ +dlink,dir-859-a3|\ +dlink,dir-869-a1) + fix_seama_header + ;; +esac From 085feb60adf621d6cae8fd6cc7d6a2d84eb3314a Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Tue, 19 Mar 2024 21:25:52 +0800 Subject: [PATCH 16/18] ath79: move D-Link DAP-1720 A1 to tiny sub-target This device only has 64 MiB RAM and ath10k wireless driver will consume a lot of memory. Let's move it to the tiny sub-target to get extra 7 MiB of free space. In this way, we can extend their lifetime to receive support for the next OpenWrt LTS version. This patch also trims the duplicate "recovery.bin" image as it's the same as the "factory.bin". Signed-off-by: Shiji Yang --- .../generic/base-files/etc/board.d/01_leds | 7 --- .../generic/base-files/etc/board.d/02_network | 1 - .../etc/uci-defaults/09_fix-checksum | 1 - target/linux/ath79/image/generic.mk | 16 ------- target/linux/ath79/image/tiny.mk | 13 ++++++ .../ath79/tiny/base-files/etc/board.d/01_leds | 7 +++ .../tiny/base-files/etc/board.d/02_network | 43 ++++++++++--------- .../etc/uci-defaults/09_fix-checksum | 1 + 8 files changed, 43 insertions(+), 46 deletions(-) diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds index bfc383c0e5..2974855870 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds @@ -242,13 +242,6 @@ dlink,dap-1365-a1) ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:rssimediumhigh" "wlan0" "51" "100" ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "76" "100" ;; -dlink,dap-1720-a1) - ucidef_set_rssimon "wlan0" "200000" "1" - ucidef_set_led_rssi "rssilow" "RSSI LOW" "red:signal-1" "wlan0" "1" "40" - ucidef_set_led_rssi "rssimediumlow" "RSSI MEDIUM-LOW" "green:signal-1" "wlan0" "21" "100" - ucidef_set_led_rssi "rssimediumhigh" "RSSI MEDIUM-HIGH" "green:signal-2" "wlan0" "61" "100" - ucidef_set_led_rssi "rssihigh" "RSSI HIGH" "green:signal-3" "wlan0" "81" "100" - ;; engenius,ens202ext-v1|\ engenius,enstationac-v1) ucidef_set_rssimon "wlan0" "200000" "1" diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network index de9bd6a300..4c13478386 100644 --- a/target/linux/ath79/generic/base-files/etc/board.d/02_network +++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network @@ -34,7 +34,6 @@ ath79_setup_interfaces() devolo,dvl1750x|\ dlink,dap-1330-a1|\ dlink,dap-1365-a1|\ - dlink,dap-1720-a1|\ dlink,dap-2230-a1|\ dlink,dap-2660-a1|\ dlink,dap-2680-a1|\ diff --git a/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum index 3f85fc12a0..4d961f26d2 100644 --- a/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum +++ b/target/linux/ath79/generic/base-files/etc/uci-defaults/09_fix-checksum @@ -21,7 +21,6 @@ dlink,dap-3320-a1|\ dlink,dap-3662-a1) fixwrgg ;; -dlink,dap-1720-a1|\ dlink,dir-629-a1|\ qihoo,c301) fix_seama_header diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 03a0472c12..d19425a664 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -1050,22 +1050,6 @@ define Device/dlink_dap-1365-a1 endef TARGET_DEVICES += dlink_dap-1365-a1 -define Device/dlink_dap-1720-a1 - $(Device/seama) - SOC := qca9563 - DEVICE_VENDOR := D-Link - DEVICE_MODEL := DAP-1720 - DEVICE_VARIANT := A1 - DEVICE_PACKAGES := rssileds -swconfig \ - kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct - SEAMA_SIGNATURE := wapac28_dlink.2015_dap1720 - IMAGE_SIZE := 15872k - IMAGES += recovery.bin - IMAGE/recovery.bin := $$(IMAGE/default) | pad-rootfs -x 64 | seama | \ - seama-seal | check-size -endef -TARGET_DEVICES += dlink_dap-1720-a1 - define Device/dlink_dap-2xxx IMAGES += factory.img IMAGE/factory.img := append-kernel | pad-offset 6144k 160 | \ diff --git a/target/linux/ath79/image/tiny.mk b/target/linux/ath79/image/tiny.mk index 13f105d202..955d0fbff2 100644 --- a/target/linux/ath79/image/tiny.mk +++ b/target/linux/ath79/image/tiny.mk @@ -12,6 +12,19 @@ define Device/buffalo_whr-g301n endef TARGET_DEVICES += buffalo_whr-g301n +define Device/dlink_dap-1720-a1 + $(Device/seama) + SOC := qca9563 + DEVICE_VENDOR := D-Link + DEVICE_MODEL := DAP-1720 + DEVICE_VARIANT := A1 + IMAGE_SIZE := 15872k + SEAMA_SIGNATURE := wapac28_dlink.2015_dap1720 + DEVICE_PACKAGES := -swconfig ath10k-firmware-qca988x-ct \ + kmod-ath10k-ct-smallbuffers rssileds +endef +TARGET_DEVICES += dlink_dap-1720-a1 + define Device/dlink_dir-615-e4 SOC := ar7240 DEVICE_VENDOR := D-Link diff --git a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds index 427eac8a06..76d14ebb71 100644 --- a/target/linux/ath79/tiny/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/tiny/base-files/etc/board.d/01_leds @@ -20,6 +20,13 @@ tplink,tl-wr941-v4) ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08" ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10" ;; +dlink,dap-1720-a1) + ucidef_set_rssimon "wlan0" "200000" "1" + ucidef_set_led_rssi "rssilow" "RSSI LOW" "red:signal-1" "wlan0" "1" "40" + ucidef_set_led_rssi "rssimediumlow" "RSSI MEDIUM-LOW" "green:signal-1" "wlan0" "21" "100" + ucidef_set_led_rssi "rssimediumhigh" "RSSI MEDIUM-HIGH" "green:signal-2" "wlan0" "61" "100" + ucidef_set_led_rssi "rssihigh" "RSSI HIGH" "green:signal-3" "wlan0" "81" "100" + ;; dlink,dir-859-a1) ucidef_set_led_switch "internet" "INTERNET" "green:internet" "switch0" "0x20" ;; 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 60e640e0fb..fa2ea3aa6f 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 @@ -12,27 +12,7 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" ;; - dlink,dir-615-e4|\ - netgear,wnr1000-v2|\ - netgear,wnr2000-v3|\ - netgear,wnr612-v2|\ - on,n150r|\ - tplink,tl-wr740n-v1|\ - tplink,tl-wr740n-v3|\ - tplink,tl-wr741-v1|\ - tplink,tl-wr743nd-v1|\ - tplink,tl-wr841-v5|\ - tplink,tl-wr941-v4) - ucidef_set_interface_wan "eth0" - ucidef_add_switch "switch0" \ - "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" - ;; - dlink,dir-859-a1|\ - dlink,dir-859-a3|\ - dlink,dir-869-a1) - ucidef_add_switch "switch0" \ - "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" - ;; + dlink,dap-1720-a1|\ engenius,eap350-v1|\ engenius,ecb350-v1|\ pqi,air-pen|\ @@ -63,6 +43,27 @@ ath79_setup_interfaces() ubnt,nanostation-loco-m) ucidef_set_interface_lan "eth0" ;; + dlink,dir-615-e4|\ + netgear,wnr1000-v2|\ + netgear,wnr2000-v3|\ + netgear,wnr612-v2|\ + on,n150r|\ + tplink,tl-wr740n-v1|\ + tplink,tl-wr740n-v3|\ + tplink,tl-wr741-v1|\ + tplink,tl-wr743nd-v1|\ + tplink,tl-wr841-v5|\ + tplink,tl-wr941-v4) + ucidef_set_interface_wan "eth0" + ucidef_add_switch "switch0" \ + "0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" + ;; + dlink,dir-859-a1|\ + dlink,dir-859-a3|\ + dlink,dir-869-a1) + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" + ;; engenius,enh202-v1) ucidef_set_interface_lan "eth0" ucidef_add_switch "switch0" \ diff --git a/target/linux/ath79/tiny/base-files/etc/uci-defaults/09_fix-checksum b/target/linux/ath79/tiny/base-files/etc/uci-defaults/09_fix-checksum index 4febde5335..58e846f73f 100644 --- a/target/linux/ath79/tiny/base-files/etc/uci-defaults/09_fix-checksum +++ b/target/linux/ath79/tiny/base-files/etc/uci-defaults/09_fix-checksum @@ -8,6 +8,7 @@ fix_seama_header() { board=$(board_name) case "$board" in +dlink,dap-1720-a1|\ dlink,dir-859-a1|\ dlink,dir-859-a3|\ dlink,dir-869-a1) From d7d94a8d91bc1dc9dcedbe004021509871acac24 Mon Sep 17 00:00:00 2001 From: Shiji Yang Date: Tue, 19 Mar 2024 21:25:52 +0800 Subject: [PATCH 17/18] uboot-envtools: ath79: remove D-Link DIR-8x9 and DAP-1720 env config The uboot-envtools can automatically parse the dts 'u-boot,env' compatible string. So the env config file is now useless. Signed-off-by: Shiji Yang --- package/boot/uboot-envtools/files/ath79 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 7c0cdf9013..a3bb2c1b58 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -31,10 +31,6 @@ asus,zenwifi-cd6n|\ asus,zenwifi-cd6r|\ buffalo,bhr-4grv2|\ devolo,magic-2-wifi|\ -dlink,dap-1720-a1|\ -dlink,dir-859-a1|\ -dlink,dir-859-a3|\ -dlink,dir-869-a1|\ engenius,eap1200h|\ engenius,eap1750h|\ engenius,eap300-v2|\ From 0c96d20bf9fba6d814efa88c6fb08a5df094103a Mon Sep 17 00:00:00 2001 From: Robert Marko Date: Fri, 29 Mar 2024 18:57:03 +0100 Subject: [PATCH 18/18] tools: b43-tools: fix compilation with GCC14 GCC14 no longer treats integer types and pointer types as equivalent in assignments (including implied assignments of function arguments and return values), and instead fails the compilation with a type error. So, as a workaround lets disable the newly introduced error -Werror=int-conversion and just make it print a warning to enable compiling with GCC14 as Fedora 40 now defaults to it. Signed-off-by: Robert Marko --- tools/b43-tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/b43-tools/Makefile b/tools/b43-tools/Makefile index d3f6e80b52..ed8030e9c5 100644 --- a/tools/b43-tools/Makefile +++ b/tools/b43-tools/Makefile @@ -23,7 +23,7 @@ define Host/Compile $(HOST_MAKE_FLAGS) \ $(1) QUIET_SPARSE=: +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/assembler \ - CFLAGS="$(HOST_CFLAGS) -include endian.h" \ + CFLAGS="$(HOST_CFLAGS) -include endian.h -Wno-error=int-conversion" \ $(HOST_MAKE_FLAGS) \ LDFLAGS= \ $(1) QUIET_SPARSE=: