diff --git a/include/bpf.mk b/include/bpf.mk index e43fcad50ce..ec3f04e1e9e 100644 --- a/include/bpf.mk +++ b/include/bpf.mk @@ -64,7 +64,7 @@ BPF_CFLAGS := \ -O2 -emit-llvm -Xclang -disable-llvm-passes ifneq ($(CONFIG_HAS_BPF_TOOLCHAIN),) -ifeq ($(DUMP),) +ifeq ($(DUMP)$(filter download refresh,$(MAKECMDGOALS)),) CLANG_VER:=$(shell $(CLANG) -dM -E - < /dev/null | grep __clang_major__ | cut -d' ' -f3) CLANG_VER_VALID:=$(shell [ "$(CLANG_VER)" -ge "$(CLANG_MIN_VER)" ] && echo 1 ) ifeq ($(CLANG_VER_VALID),) diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 127fa8563af..37c11411395 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -21,7 +21,7 @@ Kernel/Patch:=$(Kernel/Patch/Default) ifneq (,$(findstring .xz,$(LINUX_SOURCE))) LINUX_CAT:=xzcat else - LINUX_CAT:=gzip -dc + LINUX_CAT:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc endif ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"") diff --git a/include/unpack.mk b/include/unpack.mk index ebece699782..5959d55f4b1 100644 --- a/include/unpack.mk +++ b/include/unpack.mk @@ -18,7 +18,7 @@ ifeq ($(strip $(UNPACK_CMD)),) ifeq ($(filter gz tgz,$(EXT)),$(EXT)) EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=)) - DECOMPRESS_CMD:=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | + DECOMPRESS_CMD:=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc $(DL_DIR)/$(PKG_SOURCE) | endif ifeq ($(filter bzip2 bz2 bz tbz2 tbz,$(EXT)),$(EXT)) EXT:=$(call ext,$(PKG_SOURCE:.$(EXT)=)) @@ -56,7 +56,7 @@ ifeq ($(strip $(UNPACK_CMD)),) endif # replace zcat with $(ZCAT), because some system don't support it properly ifeq ($(PKG_CAT),zcat) - UNPACK_CMD=gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR_CMD) + UNPACK_CMD=$(STAGING_DIR_HOST)/bin/libdeflate-gzip -dc $(DL_DIR)/$(PKG_SOURCE) | $(TAR_CMD) endif endif endif diff --git a/package/boot/uboot-envtools/files/ipq40xx b/package/boot/uboot-envtools/files/ipq40xx index ff614888339..8d993fae366 100644 --- a/package/boot/uboot-envtools/files/ipq40xx +++ b/package/boot/uboot-envtools/files/ipq40xx @@ -60,13 +60,15 @@ linksys,ea6350v3) ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x20000" ;; linksys,ea8300|\ -linksys,mr8300|\ -linksys,whw03v2) +linksys,mr8300) ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x40000" "0x20000" ;; linksys,whw01) ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x40000" "0x10000" ;; +linksys,whw03v2) + ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x80000" "0x20000" + ;; zyxel,nbg6617) ubootenv_add_uci_config "/dev/mtd6" "0x0" "0x10000" "0x10000" ;; diff --git a/package/boot/uboot-envtools/files/ipq807x b/package/boot/uboot-envtools/files/ipq807x index 63fd04ec5b5..6e4fadbdf5e 100644 --- a/package/boot/uboot-envtools/files/ipq807x +++ b/package/boot/uboot-envtools/files/ipq807x @@ -13,7 +13,8 @@ dynalink,dl-wrx36) [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2" ;; -edgecore,eap102) +edgecore,eap102|\ +zyxel,nbg7815) idx="$(find_mtd_index 0:appsblenv)" [ -n "$idx" ] && \ ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000" "1" diff --git a/package/boot/uboot-mediatek/patches/420-add-support-for-RAVPower-RP-WD009.patch b/package/boot/uboot-mediatek/patches/420-add-support-for-RAVPower-RP-WD009.patch index 80af85a9596..a89b6c68bd2 100644 --- a/package/boot/uboot-mediatek/patches/420-add-support-for-RAVPower-RP-WD009.patch +++ b/package/boot/uboot-mediatek/patches/420-add-support-for-RAVPower-RP-WD009.patch @@ -125,7 +125,7 @@ Subject: [PATCH] add support for RAVPower RP-WD009 +} --- /dev/null +++ b/configs/ravpower-rp-wd009-ram_defconfig -@@ -0,0 +1,61 @@ +@@ -0,0 +1,64 @@ +CONFIG_MIPS=y +CONFIG_SYS_LOAD_ADDR=0x80010000 +CONFIG_NR_DRAM_BANKS=1 @@ -140,6 +140,7 @@ Subject: [PATCH] add support for RAVPower RP-WD009 +CONFIG_SYS_CONSOLE_INFO_QUIET=y +CONFIG_VERSION_VARIABLE=y +CONFIG_BOARD_RAVPOWER_RP_WD009=y ++CONFIG_SYS_MIPS_TIMER_FREQ=290000000 +CONFIG_HUSH_PARSER=y +CONFIG_CMD_LICENSE=y +# CONFIG_CMD_ELF is not set @@ -187,9 +188,11 @@ Subject: [PATCH] add support for RAVPower RP-WD009 +CONFIG_WDT_MT7621=y +CONFIG_LZMA=y +CONFIG_BAUDRATE=57600 ++CONFIG_SYS_MAXARGS=64 ++CONFIG_SYS_CBSIZE=512 --- /dev/null +++ b/include/configs/ravpower-rp-wd009.h -@@ -0,0 +1,42 @@ +@@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2018 Stefan Roese @@ -219,9 +222,7 @@ Subject: [PATCH] add support for RAVPower RP-WD009 +#define CONFIG_SYS_MEMTEST_END 0x80400000 + +/* Memory usage */ -+#define CONFIG_SYS_MAXARGS 64 +#define CONFIG_SYS_BOOTPARAMS_LEN (128 * 1024) -+#define CONFIG_SYS_CBSIZE 512 + +/* Environment settings */ + diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile index 5075dce2ab4..c6b2133c229 100644 --- a/package/boot/uboot-mvebu/Makefile +++ b/package/boot/uboot-mvebu/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk -PKG_VERSION:=2022.10 +PKG_VERSION:=2023.01 PKG_RELEASE:=$(AUTORELEASE) -PKG_HASH:=50b4482a505bc281ba8470c399a3c26e145e29b23500bc35c50debd7fa46bdf8 +PKG_HASH:=69423bad380f89a0916636e89e6dcbd2e4512d584308d922d1039d1e4331950f include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk @@ -26,14 +26,14 @@ define U-Boot/clearfog NAME:=SolidRun ClearFog A1 BUILD_DEVICES:=solidrun_clearfog-base-a1 solidrun_clearfog-pro-a1 BUILD_SUBTARGET:=cortexa9 - UBOOT_IMAGE:=u-boot-spl.kwb + UBOOT_IMAGE:=u-boot-with-spl.kwb endef define U-Boot/helios4 NAME:=Kobol Helios 4 BUILD_DEVICES:=kobol_helios4 BUILD_SUBTARGET:=cortexa9 - UBOOT_IMAGE:=u-boot-spl.kwb + UBOOT_IMAGE:=u-boot-with-spl.kwb endef define U-Boot/omnia @@ -41,7 +41,7 @@ define U-Boot/omnia BUILD_DEVICES:=cznic_turris-omnia BUILD_SUBTARGET:=cortexa9 UBOOT_CONFIG:=turris_omnia - UBOOT_IMAGE:=u-boot-spl.kwb + UBOOT_IMAGE:=u-boot-with-spl.kwb endef define U-Boot/espressobin diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile index 32988910c0a..861eec13dc9 100644 --- a/package/firmware/ipq-wifi/Makefile +++ b/package/firmware/ipq-wifi/Makefile @@ -49,7 +49,8 @@ ALLWIFIBOARDS:= \ xiaomi_ax3600 \ xiaomi_ax9000 \ zte_mf18a \ - zte_mf289f + zte_mf289f \ + zyxel_nbg7815 ALLWIFIPACKAGES:=$(foreach BOARD,$(ALLWIFIBOARDS),ipq-wifi-$(BOARD)) @@ -148,5 +149,6 @@ $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600)) $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000)) $(eval $(call generate-ipq-wifi-package,zte_mf18a,ZTE MF18A)) $(eval $(call generate-ipq-wifi-package,zte_mf289f,ZTE MF289F)) +$(eval $(call generate-ipq-wifi-package,zyxel_nbg7815,Zyxel NBG7815)) $(foreach PACKAGE,$(ALLWIFIPACKAGES),$(eval $(call BuildPackage,$(PACKAGE)))) diff --git a/package/firmware/ipq-wifi/board-zyxel_nbg7815.ipq8074 b/package/firmware/ipq-wifi/board-zyxel_nbg7815.ipq8074 new file mode 100644 index 00000000000..3a1c88b76ea Binary files /dev/null and b/package/firmware/ipq-wifi/board-zyxel_nbg7815.ipq8074 differ diff --git a/package/libs/libpcap/Makefile b/package/libs/libpcap/Makefile index 67525c23261..984b2050739 100644 --- a/package/libs/libpcap/Makefile +++ b/package/libs/libpcap/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libpcap -PKG_VERSION:=1.10.2 +PKG_VERSION:=1.10.3 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://www.tcpdump.org/release/ -PKG_HASH:=db6d79d4ad03b8b15fb16c42447d093ad3520c0ec0ae3d331104dcfb1ce77560 +PKG_HASH:=2a8885c403516cf7b0933ed4b14d6caa30e02052489ebd414dc75ac52e7559e6 PKG_MAINTAINER:=Felix Fietkau PKG_LICENSE:=BSD-3-Clause diff --git a/package/libs/libpcap/patches/300-Add-support-for-B.A.T.M.A.N.-Advanced.patch b/package/libs/libpcap/patches/300-Add-support-for-B.A.T.M.A.N.-Advanced.patch index 0a6aa3c0b7b..b3ff25286d7 100644 --- a/package/libs/libpcap/patches/300-Add-support-for-B.A.T.M.A.N.-Advanced.patch +++ b/package/libs/libpcap/patches/300-Add-support-for-B.A.T.M.A.N.-Advanced.patch @@ -36,7 +36,7 @@ Signed-off-by: Linus Lüssing --- a/Makefile.in +++ b/Makefile.in -@@ -134,6 +134,8 @@ PUBHDR = \ +@@ -133,6 +133,8 @@ PUBHDR = \ HDR = $(PUBHDR) \ arcnet.h \ atmuni31.h \ diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index b07f0477e45..2ae3fdbe2ae 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -130,13 +130,6 @@ CMAKE_OPTIONS += \ -DENABLE_TESTING:Bool=OFF \ -DENABLE_PROGRAMS:Bool=ON -define Build/Configure - $(call Build/Configure/Default) - - sed -i '/fuzz/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt - sed -i '/test/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt -endef - define Build/Prepare $(call Build/Prepare/Default) diff --git a/package/libs/mbedtls/patches/101-remove-test.patch b/package/libs/mbedtls/patches/101-remove-test.patch new file mode 100644 index 00000000000..e43f8757d71 --- /dev/null +++ b/package/libs/mbedtls/patches/101-remove-test.patch @@ -0,0 +1,15 @@ +--- a/programs/CMakeLists.txt ++++ b/programs/CMakeLists.txt +@@ -1,12 +1,8 @@ + add_subdirectory(aes) +-if (NOT WIN32) +- add_subdirectory(fuzz) +-endif() + add_subdirectory(hash) + add_subdirectory(pkey) + add_subdirectory(psa) + add_subdirectory(random) + add_subdirectory(ssl) +-add_subdirectory(test) + add_subdirectory(util) + add_subdirectory(x509) diff --git a/package/network/utils/ipset/Makefile b/package/network/utils/ipset/Makefile index be407f016be..6d48103d0ec 100644 --- a/package/network/utils/ipset/Makefile +++ b/package/network/utils/ipset/Makefile @@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=ipset -PKG_VERSION:=7.16 +PKG_VERSION:=7.17 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://ipset.netfilter.org -PKG_HASH:=87b1d9cdf4a1de3d1d0671e7da33e111eb65087e65ad75268b22bf13f0f296d0 +PKG_HASH:=be49c9ff489dd6610cad6541e743c3384eac96e9f24707da7b3929d8f2ac64d8 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0 diff --git a/target/linux/ipq40xx/base-files/etc/board.d/02_network b/target/linux/ipq40xx/base-files/etc/board.d/02_network index 7d4806b6053..e5789d15b91 100644 --- a/target/linux/ipq40xx/base-files/etc/board.d/02_network +++ b/target/linux/ipq40xx/base-files/etc/board.d/02_network @@ -46,6 +46,7 @@ ipq40xx_setup_interfaces() aruba,ap-303|\ avm,fritzrepeater-1200|\ dlink,dap-2610|\ + extreme-networks,ws-ap3915i|\ meraki,mr33|\ meraki,mr74|\ mikrotik,lhgg-60ad|\ diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts index 423c24b89ae..08874bcf4f9 100644 --- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts +++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts @@ -124,6 +124,20 @@ status = "okay"; }; +&gmac { + status = "okay"; +}; + +&switch { + status = "okay"; +}; + +&swport5 { + status = "okay"; + + label = "lan"; +}; + &tlmm { mdio_pins: mdio_pinmux { mux_1 { diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk index deec544f658..a145f053580 100644 --- a/target/linux/ipq40xx/image/generic.mk +++ b/target/linux/ipq40xx/image/generic.mk @@ -542,8 +542,7 @@ define Device/extreme-networks_ws-ap3915i IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata DEVICE_PACKAGES := ipq-wifi-extreme-networks_ws-ap3915i endef -# Missing DSA Setup -#TARGET_DEVICES += extreme-networks_ws-ap3915i +TARGET_DEVICES += extreme-networks_ws-ap3915i define Device/ezviz_cs-w3-wd1200g-eup $(call Device/FitImage) diff --git a/target/linux/ipq807x/base-files/etc/board.d/02_network b/target/linux/ipq807x/base-files/etc/board.d/02_network index e2bd46f0959..de237e8541f 100644 --- a/target/linux/ipq807x/base-files/etc/board.d/02_network +++ b/target/linux/ipq807x/base-files/etc/board.d/02_network @@ -30,6 +30,9 @@ ipq807x_setup_interfaces() xiaomi,ax9000) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan" ;; + zyxel,nbg7815) + ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 10g" "wan" + ;; *) echo "Unsupported hardware. Network interfaces not initialized" ;; diff --git a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata index 974e7607aa3..304d3a71b89 100644 --- a/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata +++ b/target/linux/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata @@ -15,7 +15,8 @@ case "$FIRMWARE" in qnap,301w|\ redmi,ax6|\ xiaomi,ax3600|\ - xiaomi,ax9000) + xiaomi,ax9000|\ + zyxel,nbg7815) caldata_extract "0:art" 0x1000 0x20000 ;; esac diff --git a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh index 63f546444f3..4a6a91b5f5d 100644 --- a/target/linux/ipq807x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq807x/base-files/lib/upgrade/platform.sh @@ -1,7 +1,7 @@ PART_NAME=firmware REQUIRE_IMAGE_METADATA=1 -RAMFS_COPY_BIN='fw_printenv fw_setenv' +RAMFS_COPY_BIN='fw_printenv fw_setenv head' RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' xiaomi_initramfs_prepare() { @@ -66,6 +66,20 @@ platform_do_upgrade() { rootfsname="rootfs" mmc_do_upgrade "$1" ;; + zyxel,nbg7815) + local config_mtdnum="$(find_mtd_index 0:bootconfig)" + [ -z "$config_mtdnum" ] && reboot + part_num="$(hexdump -e '1/1 "%01x|"' -n 1 -s 168 -C /dev/mtd$config_mtdnum | cut -f 1 -d "|" | head -n1)" + if [ "$part_num" -eq "0" ]; then + kernelname="0:HLOS" + rootfsname="rootfs" + mmc_do_upgrade "$1" + else + kernelname="0:HLOS_1" + rootfsname="rootfs_1" + mmc_do_upgrade "$1" + fi + ;; redmi,ax6|\ xiaomi,ax3600|\ xiaomi,ax9000) diff --git a/target/linux/ipq807x/config-5.15 b/target/linux/ipq807x/config-5.15 index f979f9a28a2..4a5aee7d9ef 100644 --- a/target/linux/ipq807x/config-5.15 +++ b/target/linux/ipq807x/config-5.15 @@ -257,6 +257,7 @@ CONFIG_NVIDIA_CARMEL_CNP_ERRATUM=y CONFIG_NVMEM=y CONFIG_NVMEM_QCOM_QFPROM=y # CONFIG_NVMEM_SPMI_SDAM is not set +CONFIG_NVMEM_U_BOOT_ENV=y CONFIG_NVMEM_SYSFS=y CONFIG_OF=y CONFIG_OF_ADDRESS=y diff --git a/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts new file mode 100644 index 00000000000..537dd52032d --- /dev/null +++ b/target/linux/ipq807x/files/arch/arm64/boot/dts/qcom/ipq8074-nbg7815.dts @@ -0,0 +1,445 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/* + * Copyright (c) 2022, Karol Przybylski + * Copyright (c) 2023, Andre Valentin + */ + +/dts-v1/; + +#include "ipq8074.dtsi" +#include "ipq8074-hk-cpu.dtsi" +#include "ipq8074-ess.dtsi" +#include +#include +#include + + +/ { + model = "Zyxel NBG7815"; + compatible = "zyxel,nbg7815", "qcom,ipq8074"; + + aliases { + serial0 = &blsp1_uart5; + serial1 = &blsp1_uart3; + /* Alias as required by u-boot to patch MAC addresses */ + ethernet0 = &dp1; + label-mac-device = &dp1; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&tlmm 54 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&tlmm { + mdio_pins: mdio-pins { + mdc { + pins = "gpio68"; + function = "mdc"; + drive-strength = <8>; + bias-pull-up; + }; + + mdio { + pins = "gpio69"; + function = "mdio"; + drive-strength = <8>; + bias-pull-up; + }; + }; +}; + + +&blsp1_uart3 { + status = "okay"; +}; + +&blsp1_uart5 { + status = "okay"; +}; + +&prng { + status = "okay"; +}; + +&cryptobam { + status = "okay"; +}; + +&crypto { + status = "okay"; +}; + +&qpic_bam { + status = "okay"; +}; + + +&blsp1_spi1 { + pinctrl-0 = <&spi_0_pins>; + pinctrl-names = "default"; + cs-gpios = <0>; + status = "okay"; + + /* + * Bootloader will find the NAND DT node by the compatible and + * then "fixup" it by adding the partitions from the SMEM table + * using the legacy bindings thus making it impossible for us + * to change the partition table or utilize NVMEM for calibration. + * So add a dummy partitions node that bootloader will populate + * and set it as disabled so the kernel ignores it instead of + * printing warnings due to the broken way bootloader adds the + * partitions. + */ + partitions { + status = "disabled"; + }; + + + flash@0 { + #address-cells = <1>; + #size-cells = <1>; + reg = <0>; + compatible = "jedec,spi-nor"; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "0:sbl1"; + reg = <0x0 0x50000>; + read-only; + }; + + partition@50000 { + label = "0:mibib"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + label = "0:bootconfig"; + reg = <0x60000 0x20000>; + read-only; + }; + + partition@80000 { + label = "0:bootconfig1"; + reg = <0x80000 0x20000>; + read-only; + }; + + partition@a0000 { + label = "0:qsee"; + reg = <0xa0000 0x180000>; + read-only; + }; + + partition@220000 { + label = "0:qsee_1"; + reg = <0x220000 0x180000>; + read-only; + }; + + partition@3a0000 { + label = "0:devcfg"; + reg = <0x3a0000 0x10000>; + read-only; + }; + + partition@3b0000 { + label = "0:devcfg_1"; + reg = <0x3b0000 0x10000>; + read-only; + }; + + partition@3c0000 { + label = "0:apdp"; + reg = <0x3c0000 0x10000>; + read-only; + }; + + partition@3d0000 { + label = "0:apdp_1"; + reg = <0x3d0000 0x10000>; + read-only; + }; + + partition@3e0000 { + label = "0:rpm"; + reg = <0x3e0000 0x40000>; + read-only; + }; + + partition@420000 { + label = "0:rpm_1"; + reg = <0x420000 0x40000>; + read-only; + }; + + partition@460000 { + label = "0:cdt"; + reg = <0x460000 0x10000>; + read-only; + }; + + partition@470000 { + label = "0:cdt_1"; + reg = <0x470000 0x10000>; + read-only; + }; + + partition@480000 { + label = "0:appsbl"; + reg = <0x480000 0xc0000>; + read-only; + }; + + partition@540000 { + label = "0:appsbl_1"; + reg = <0x540000 0xc0000>; + read-only; + }; + + partition@600000 { + compatible = "u-boot,env"; + label = "0:appsblenv"; + reg = <0x600000 0x10000>; + + macaddr_lan: ethaddr { + }; + }; + + partition@610000 { + label = "0:art"; + reg = <0x610000 0x40000>; + read-only; + }; + + partition@650000 { + label = "0:ethphyfw"; + reg = <0x650000 0x80000>; + read-only; + }; + + partition@6d0000 { + label = "0:crt"; + reg = <0x6d0000 0x10000>; + read-only; + }; + + partition@6e0000 { + label = "dual_flag"; + reg = <0x6e0000 0x10000>; + }; + + partition@6f0000 { + label = "reserved"; + reg = <0x6f0000 0x110000>; + read-only; + }; + }; + }; +}; + +&mdio { + status = "okay"; + pinctrl-0 = <&mdio_pins>; + pinctrl-names = "default"; + reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>; + + qca8075_1: ethernet-phy@0 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <0>; + }; + + qca8075_2: ethernet-phy@1 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <1>; + }; + + qca8075_3: ethernet-phy@2 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <2>; + }; + + qca8075_4: ethernet-phy@3 { + compatible = "ethernet-phy-ieee802.3-c22"; + reg = <3>; + }; + + qca8081: ethernet-phy@4{ + compatible = "ethernet-phy-id004d.d101"; + reg = <28>; + reset-gpios = <&tlmm 31 GPIO_ACTIVE_LOW>; + }; + + aqr113c: ethernet-phy@5 { + compatible = "ethernet-phy-ieee802.3-c45"; + reg = <8>; + reset-gpios = <&tlmm 63 GPIO_ACTIVE_LOW>; + }; +}; + +&switch { + status = "okay"; + + switch_cpu_bmp = <0x1>; + switch_lan_bmp = <0x3e>; + switch_wan_bmp = <0x40>; + switch_mac_mode = <0x0>; + switch_mac_mode1 = <0xf>; + switch_mac_mode2 = <0xd>; + bm_tick_mode = <0>; + tm_tick_mode = <0>; + + qcom,port_phyinfo { + port@0 { + port_id = <1>; + phy_address = <0>; + }; + + port@1 { + port_id = <2>; + phy_address = <1>; + }; + + port@2 { + port_id = <3>; + phy_address = <2>; + }; + + port@3 { + port_id = <4>; + phy_address = <3>; + }; + + port@4 { + port_id = <5>; + phy_address = <28>; + port_mac_sel = "QGMAC_PORT"; + }; + + port@5 { + port_id = <6>; + ethernet-phy-ieee802.3-c45; + phy_address = <8>; + }; + }; +}; + +&edma { + status = "okay"; +}; + +&dp1 { + status = "okay"; + phy-handle = <&qca8075_1>; + label = "lan1"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&dp2 { + status = "okay"; + phy-handle = <&qca8075_2>; + label = "lan2"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&dp3 { + status = "okay"; + phy-handle = <&qca8075_3>; + label = "lan3"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&dp4 { + status = "okay"; + phy-handle = <&qca8075_4>; + label = "lan4"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&dp5 { + status = "okay"; + phy-handle = <&qca8081>; + label = "wan"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; + mac-address-increment = <1>; +}; + +&dp6_syn { + status = "okay"; + phy-handle = <&aqr113c>; + label = "10g"; + nvmem-cells = <&macaddr_lan>; + nvmem-cell-names = "mac-address-ascii"; +}; + +&blsp1_i2c2 { + pinctrl-0 = <&i2c_0_pins>; + pinctrl-names = "default"; + status = "okay"; + + tmp103@70 { + compatible = "ti,tmp103"; + reg = <0x70>; + }; +}; + +&sdhc_1 { + status = "okay"; + /* unstable, problem with the hs400 > h200 speed switch */ + /delete-property/ mmc-hs400-1_8v; + mmc-hs200-1_8v; + mmc-ddr-1_8v; + vqmmc-supply = <&l11>; +}; + +&ssphy_0 { + status = "okay"; +}; + +&qusb_phy_0 { + status = "okay"; +}; + +&ssphy_1 { + status = "okay"; +}; + +&qusb_phy_1 { + status = "okay"; +}; + +&usb_0 { + status = "okay"; +}; + +&usb_1 { + status = "okay"; +}; + +&wifi { + status = "okay"; + + qcom,ath11k-calibration-variant = "Zyxel-NBG7815"; +}; diff --git a/target/linux/ipq807x/image/generic.mk b/target/linux/ipq807x/image/generic.mk index 811a32e942b..3145e1b53f1 100644 --- a/target/linux/ipq807x/image/generic.mk +++ b/target/linux/ipq807x/image/generic.mk @@ -116,3 +116,18 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),) endif endef TARGET_DEVICES += xiaomi_ax9000 + +define Device/zyxel_nbg7815 + $(call Device/FitImage) + DEVICE_VENDOR := ZYXEL + DEVICE_MODEL := NBG7815 + DEVICE_DTS_CONFIG := config@nbg7815 + BLOCKSIZE := 128k + PAGESIZE := 2048 + SOC := ipq8074 + IMAGES += factory.bin sysupgrade.bin + IMAGE/factory.bin := append-rootfs | pad-rootfs | pad-to 64k + IMAGE/sysupgrade.bin/squashfs := append-rootfs | pad-to 64k | sysupgrade-tar rootfs=$$$$@ | append-metadata + DEVICE_PACKAGES := ipq-wifi-zyxel_nbg7815 kmod-ath11k-pci e2fsprogs kmod-fs-ext4 losetup kmod-hwmon-tmp103 +endef +TARGET_DEVICES += zyxel_nbg7815 diff --git a/tools/Makefile b/tools/Makefile index a8044dcf1fe..7b3a8eb1425 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -42,7 +42,6 @@ tools-y += findutils tools-y += firmware-utils tools-y += flex tools-y += gengetopt -tools-y += libdeflate tools-y += libressl tools-y += libtool tools-y += lzma @@ -98,7 +97,6 @@ $(curdir)/genext2fs/compile := $(curdir)/libtool/compile $(curdir)/gengetopt/compile := $(curdir)/libtool/compile $(curdir)/gmp/compile := $(curdir)/libtool/compile $(curdir)/isl/compile := $(curdir)/gmp/compile -$(curdir)/libdeflate/compile := $(curdir)/cmake/compile $(curdir)/liblzo/compile := $(curdir)/cmake/compile $(curdir)/libressl/compile := $(curdir)/pkgconf/compile $(curdir)/libtool/compile := $(curdir)/automake/compile $(curdir)/missing-macros/compile @@ -147,8 +145,11 @@ $(foreach tool, $(tools-y), $(if $(wildcard $(curdir)/$(tool)/patches),$(eval $( $(foreach tool, $(filter-out xz,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/xz/compile)) -# make any tool depend on tar, xz and patch to ensure that archives can be unpacked and patched properly -tools-core := tar xz patch +# make any tool depend on the following to ensure that archives can be unpacked and patched properly +tools-core += libdeflate +tools-core += patch +tools-core += tar +tools-core += xz $(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(patsubst %,$(curdir)/%/compile,$(tools-core)))) tools-y += $(tools-core) diff --git a/tools/libdeflate/Makefile b/tools/libdeflate/Makefile index d30a8ca674f..53a674440a8 100644 --- a/tools/libdeflate/Makefile +++ b/tools/libdeflate/Makefile @@ -7,25 +7,32 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libdeflate -PKG_VERSION:=1.15 -PKG_RELEASE:=1 +PKG_VERSION:=1.17 +PKG_RELEASE:=2 PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate.git PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=v$(PKG_VERSION) -PKG_MIRROR_HASH:=122feff4543541b547dc89e832adf262c81911ae1acbccdc591f0353a85b600a +PKG_MIRROR_HASH:=ee5790cf3140aa6a2e0f0c400d4b32539f13cb270e9357135c51927ba3784dc7 include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/cmake.mk + +define Host/Compile + $(HOSTCC_NOCACHE) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + $(HOST_BUILD_DIR)/lib/*{,/*}.c \ + $(HOST_BUILD_DIR)/programs/{gzip,prog_util,tgetopt}.c \ + -o $(HOST_BUILD_DIR)/libdeflate-gzip +endef define Host/Install - $(INSTALL_BIN) $(HOST_BUILD_DIR)/programs/libdeflate-gzip $(STAGING_DIR_HOST)/bin/ + $(INSTALL_BIN) $(HOST_BUILD_DIR)/libdeflate-gzip $(STAGING_DIR_HOST)/bin/ $(LN) libdeflate-gzip $(STAGING_DIR_HOST)/bin/libdeflate-gunzip endef -define Host/Clean - rm -f $(STAGING_DIR_HOST)/bin/libdeflate-gzip - rm -f $(STAGING_DIR_HOST)/bin/libdeflate-gunzip +define Host/Uninstall + $(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gzip + $(RM) $(STAGING_DIR_HOST)/bin/libdeflate-gunzip + $(call Host/Uninstall/Default) endef $(eval $(call HostBuild))