diff --git a/include/image-commands.mk b/include/image-commands.mk index 485d870f05..939f5ef2db 100644 --- a/include/image-commands.mk +++ b/include/image-commands.mk @@ -191,7 +191,7 @@ define Build/check-size @imagesize="$$(stat -c%s $@)"; \ limitsize="$$(($(subst k,* 1024,$(subst m, * 1024k,$(if $(1),$(1),$(IMAGE_SIZE))))))"; \ [ $$limitsize -ge $$imagesize ] || { \ - echo "WARNING: Image file $@ is too big: $$imagesize > $$limitsize" >&2; \ + $(call ERROR_MESSAGE, WARNING: Image file $@ is too big: $$imagesize > $$limitsize); \ rm -f $@; \ } endef diff --git a/include/netfilter.mk b/include/netfilter.mk index 6d323ffd4a..59a7f5ba05 100644 --- a/include/netfilter.mk +++ b/include/netfilter.mk @@ -243,14 +243,15 @@ $(eval $(call nf_add,IPT_NFQUEUE,CONFIG_NETFILTER_XT_TARGET_NFQUEUE, $(P_XT)xt_N $(eval $(call nf_add,IPT_DEBUG,CONFIG_NETFILTER_XT_TARGET_TRACE, $(P_XT)xt_TRACE)) -# tproxy +# socket +$(eval $(call nf_add,NF_SOCKET,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4)) +$(eval $(call nf_add,NF_SOCKET,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6)) +$(eval $(call nf_add,IPT_SOCKET,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket)) -$(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_MATCH_SOCKET, $(P_XT)xt_socket)) -$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV4, $(P_V4)nf_socket_ipv4)) -$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_SOCKET_IPV6, $(P_V6)nf_socket_ipv6)) +# tproxy +$(eval $(call nf_add,NF_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4)) +$(eval $(call nf_add,NF_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6)) $(eval $(call nf_add,IPT_TPROXY,CONFIG_NETFILTER_XT_TARGET_TPROXY, $(P_XT)xt_TPROXY)) -$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV4, $(P_V4)nf_tproxy_ipv4)) -$(eval $(call nf_add,IPT_TPROXY,CONFIG_NF_TPROXY_IPV6, $(P_V6)nf_tproxy_ipv6)) # led $(eval $(call nf_add,IPT_LED,CONFIG_NETFILTER_XT_TARGET_LED, $(P_XT)xt_LED)) @@ -354,6 +355,10 @@ $(eval $(if $(NF_KMOD),$(call nf_add,NFT_FIB,CONFIG_NFT_FIB_IPV6, $(P_V6)nft_fib $(eval $(if $(NF_KMOD),$(call nf_add,NFT_QUEUE,CONFIG_NFT_QUEUE, $(P_XT)nft_queue),)) +$(eval $(if $(NF_KMOD),$(call nf_add,NFT_SOCKET,CONFIG_NFT_SOCKET, $(P_XT)nft_socket),)) + +$(eval $(if $(NF_KMOD),$(call nf_add,NFT_TPROXY,CONFIG_NFT_TPROXY, $(P_XT)nft_tproxy),)) + $(eval $(if $(NF_KMOD),$(call nf_add,NFT_COMPAT,CONFIG_NFT_COMPAT, $(P_XT)nft_compat),)) # userland only diff --git a/include/u-boot.mk b/include/u-boot.mk index 509b3d76dc..8945e8e2b8 100644 --- a/include/u-boot.mk +++ b/include/u-boot.mk @@ -45,6 +45,7 @@ UBOOT_MAKE_FLAGS = \ HOSTCC="$(HOSTCC)" \ HOSTCFLAGS="$(HOST_CFLAGS) $(HOST_CPPFLAGS) -std=gnu11" \ HOSTLDFLAGS="$(HOST_LDFLAGS)" \ + LOCALVERSION="-OpenWrt-$(REVISION)" \ STAGING_PREFIX="$(STAGING_DIR_HOST)" \ PKG_CONFIG_PATH="$(STAGING_DIR_HOST)/lib/pkgconfig" \ PKG_CONFIG_LIBDIR="$(STAGING_DIR_HOST)/lib/pkgconfig" \ diff --git a/include/verbose.mk b/include/verbose.mk index 3ecf842d11..4487a207e8 100644 --- a/include/verbose.mk +++ b/include/verbose.mk @@ -29,15 +29,15 @@ ifeq ($(IS_TTY),1) endif endif +define ERROR_MESSAGE + printf "$(_R)%s$(_N)\n" "$(1)" >&8 +endef + ifeq ($(findstring s,$(OPENWRT_VERBOSE)),) define MESSAGE printf "$(_Y)%s$(_N)\n" "$(1)" >&8 endef - define ERROR_MESSAGE - printf "$(_R)%s$(_N)\n" "$(1)" >&8 - endef - ifeq ($(QUIET),1) ifneq ($(CURDIR),$(TOPDIR)) _DIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR}) @@ -60,5 +60,4 @@ else define MESSAGE printf "%s\n" "$(1)" endef - ERROR_MESSAGE=$(MESSAGE) endif diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index 84ababf5e0..5337d7df83 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tfa-layerscape -PKG_VERSION:=LSDK-21.08 +PKG_VERSION:=21.08 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79 index 1f0e02a2f7..bc02f4517c 100644 --- a/package/boot/uboot-envtools/files/ath79 +++ b/package/boot/uboot-envtools/files/ath79 @@ -18,6 +18,7 @@ alfa-network,n2q|\ alfa-network,n5q|\ alfa-network,pi-wifi4|\ alfa-network,r36a|\ +alfa-network,tube-2hq|\ allnet,all-wap02860ac|\ arduino,yun|\ buffalo,bhr-4grv2|\ @@ -122,7 +123,9 @@ qihoo,c301) wallys,dr531) ubootenv_add_uci_config "/dev/mtd1" "0x0" "0xf800" "0x10000" ;; -zte,mf286) +zte,mf286|\ +zte,mf286a|\ +zte,mf286r) ubootenv_add_uci_config "/dev/mtd7" "0x0" "0x20000" "0x10000" ;; esac diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index 6681f21e2b..bd30a15ade 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-layerscape -PKG_VERSION:=LSDK-21.08 +PKG_VERSION:=21.08 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git diff --git a/package/firmware/intel-microcode/Makefile b/package/firmware/intel-microcode/Makefile index 7f8d5adf7c..e6f730fcb2 100644 --- a/package/firmware/intel-microcode/Makefile +++ b/package/firmware/intel-microcode/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=intel-microcode -PKG_VERSION:=20210608 +PKG_VERSION:=20220207 PKG_RELEASE:=1 -PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).2.tar.xz +PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz PKG_SOURCE_URL:=@DEBIAN/pool/non-free/i/intel-microcode/ -PKG_HASH:=fbf82688ffd0d87b352a35c57bd097ea014f0ad32c9c8f9629725c1b43d1c84d -PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).2 +PKG_HASH:=42f2ab3c14bda745ec64008cde5c0f416f32f40e838a9df04cf5ddf5fc87498b +PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1 PKG_BUILD_DEPENDS:=iucode-tool/host diff --git a/package/firmware/layerscape/fman-ucode/Makefile b/package/firmware/layerscape/fman-ucode/Makefile index f2dda04e81..3f89080e6f 100644 --- a/package/firmware/layerscape/fman-ucode/Makefile +++ b/package/firmware/layerscape/fman-ucode/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fman-ucode -PKG_VERSION:=LSDK-21.08 +PKG_VERSION:=21.08 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git diff --git a/package/firmware/layerscape/ls-ddr-phy/Makefile b/package/firmware/layerscape/ls-ddr-phy/Makefile index 3ae0344e78..30609dc9c7 100644 --- a/package/firmware/layerscape/ls-ddr-phy/Makefile +++ b/package/firmware/layerscape/ls-ddr-phy/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ls-ddr-phy -PKG_VERSION:=LSDK-21.08 +PKG_VERSION:=21.08 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git diff --git a/package/firmware/layerscape/ls-dpl/Makefile b/package/firmware/layerscape/ls-dpl/Makefile index 8c6a88aab2..03ac7e8ff1 100644 --- a/package/firmware/layerscape/ls-dpl/Makefile +++ b/package/firmware/layerscape/ls-dpl/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ls-dpl -PKG_VERSION:=LSDK-21.08 +PKG_VERSION:=21.08 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git diff --git a/package/firmware/layerscape/ls-mc/Makefile b/package/firmware/layerscape/ls-mc/Makefile index 9dbc81809d..c0fd029766 100644 --- a/package/firmware/layerscape/ls-mc/Makefile +++ b/package/firmware/layerscape/ls-mc/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ls-mc -PKG_VERSION:=LSDK-21.08 +PKG_VERSION:=21.08 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile index b9a6059d0d..b8a051097f 100644 --- a/package/firmware/layerscape/ls-rcw/Makefile +++ b/package/firmware/layerscape/ls-rcw/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ls-rcw -PKG_VERSION:=LSDK-21.08 +PKG_VERSION:=21.08 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git diff --git a/package/firmware/layerscape/ppfe-firmware/Makefile b/package/firmware/layerscape/ppfe-firmware/Makefile index 4e6b69596c..9fcc25fde9 100644 --- a/package/firmware/layerscape/ppfe-firmware/Makefile +++ b/package/firmware/layerscape/ppfe-firmware/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ppfe -PKG_VERSION:=LSDK-21.08 +PKG_VERSION:=21.08 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk index 8a8c92d4dc..b00b2deaad 100644 --- a/package/kernel/linux/modules/netfilter.mk +++ b/package/kernel/linux/modules/netfilter.mk @@ -162,6 +162,28 @@ endef $(eval $(call KernelPackage,nf-flow)) +define KernelPackage/nf-socket + SUBMENU:=$(NF_MENU) + TITLE:=Netfilter socket lookup support + KCONFIG:= $(KCOFNIG_NF_SOCKET) + FILES:=$(foreach mod,$(NF_SOCKET-m),$(LINUX_DIR)/net/$(mod).ko) + AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_SOCKET-m))) +endef + +$(eval $(call KernelPackage,nf-socket)) + + +define KernelPackage/nf-tproxy + SUBMENU:=$(NF_MENU) + TITLE:=Netfilter tproxy support + KCONFIG:= $(KCOFNIG_NF_TPROXY) + FILES:=$(foreach mod,$(NF_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko) + AUTOLOAD:=$(call AutoProbe,$(notdir $(NF_TPROXY-m))) +endef + +$(eval $(call KernelPackage,nf-tproxy)) + + define AddDepends/ipt SUBMENU:=$(NF_MENU) DEPENDS+= +kmod-ipt-core $(1) @@ -644,9 +666,24 @@ endef $(eval $(call KernelPackage,ipt-led)) +define KernelPackage/ipt-socket + TITLE:=Iptables socket matching support + DEPENDS+=+kmod-nf-socket +kmod-nf-conntrack + KCONFIG:=$(KCONFIG_IPT_SOCKET) + FILES:=$(foreach mod,$(IPT_SOCKET-m),$(LINUX_DIR)/net/$(mod).ko) + AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_SOCKET-m))) + $(call AddDepends/ipt) +endef + +define KernelPackage/ipt-socket/description + Kernel modules for socket matching +endef + +$(eval $(call KernelPackage,ipt-socket)) + define KernelPackage/ipt-tproxy TITLE:=Transparent proxying support - DEPENDS+=+kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +IPV6:kmod-ip6tables + DEPENDS+=+kmod-nf-tproxy +kmod-nf-conntrack KCONFIG:=$(KCONFIG_IPT_TPROXY) FILES:=$(foreach mod,$(IPT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko) AUTOLOAD:=$(call AutoProbe,$(notdir $(IPT_TPROXY-m))) @@ -1179,6 +1216,28 @@ endef $(eval $(call KernelPackage,nft-queue)) +define KernelPackage/nft-socket + SUBMENU:=$(NF_MENU) + TITLE:=Netfilter nf_tables socket support + DEPENDS:=+kmod-nft-core +kmod-nf-socket + FILES:=$(foreach mod,$(NFT_SOCKET-m),$(LINUX_DIR)/net/$(mod).ko) + AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_SOCKET-m))) + KCONFIG:=$(KCONFIG_NFT_SOCKET) +endef + +$(eval $(call KernelPackage,nft-socket)) + +define KernelPackage/nft-tproxy + SUBMENU:=$(NF_MENU) + TITLE:=Netfilter nf_tables tproxy support + DEPENDS:=+kmod-nft-core +kmod-nf-tproxy +kmod-nf-conntrack + FILES:=$(foreach mod,$(NFT_TPROXY-m),$(LINUX_DIR)/net/$(mod).ko) + AUTOLOAD:=$(call AutoProbe,$(notdir $(NFT_TPROXY-m))) + KCONFIG:=$(KCONFIG_NFT_TPROXY) +endef + +$(eval $(call KernelPackage,nft-tproxy)) + define KernelPackage/nft-compat SUBMENU:=$(NF_MENU) TITLE:=Netfilter nf_tables compat support diff --git a/package/kernel/mac80211/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch b/package/kernel/mac80211/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch index 7764edfb27..2f3c1a2669 100644 --- a/package/kernel/mac80211/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch +++ b/package/kernel/mac80211/patches/subsys/308-mac80211-add-support-for-.ndo_fill_forward_path.patch @@ -22,24 +22,27 @@ Signed-off-by: Johannes Berg */ struct ieee80211_ops { void (*tx)(struct ieee80211_hw *hw, -@@ -4265,6 +4267,11 @@ struct ieee80211_ops { +@@ -4265,6 +4267,13 @@ struct ieee80211_ops { struct ieee80211_twt_setup *twt); void (*twt_teardown_request)(struct ieee80211_hw *hw, struct ieee80211_sta *sta, u8 flowid); ++#if LINUX_VERSION_IS_GEQ(5,10,0) + int (*net_fill_forward_path)(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, + struct ieee80211_sta *sta, + struct net_device_path_ctx *ctx, + struct net_device_path *path); ++#endif }; /** --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h -@@ -1483,4 +1483,26 @@ static inline void drv_twt_teardown_requ +@@ -1483,4 +1483,28 @@ static inline void drv_twt_teardown_requ trace_drv_return_void(local); } - + ++#if LINUX_VERSION_IS_GEQ(5,10,0) +static inline int drv_net_fill_forward_path(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct ieee80211_sta *sta, @@ -61,6 +64,7 @@ Signed-off-by: Johannes Berg + + return ret; +} ++#endif + #endif /* __MAC80211_DRIVER_OPS */ --- a/net/mac80211/ieee80211_i.h @@ -143,7 +147,7 @@ Signed-off-by: Johannes Berg static const struct net_device_ops ieee80211_dataif_8023_ops = { #if LINUX_VERSION_IS_LESS(4,10,0) .ndo_change_mtu = __change_mtu, -@@ -839,7 +899,9 @@ static const struct net_device_ops ieee8 +@@ -839,7 +901,9 @@ static const struct net_device_ops ieee8 #else .ndo_get_stats64 = bp_ieee80211_get_stats64, #endif @@ -156,16 +160,18 @@ Signed-off-by: Johannes Berg static bool ieee80211_iftype_supports_hdr_offload(enum nl80211_iftype iftype) --- a/net/mac80211/trace.h +++ b/net/mac80211/trace.h -@@ -2892,6 +2892,13 @@ TRACE_EVENT(drv_twt_teardown_request, +@@ -2892,6 +2892,15 @@ TRACE_EVENT(drv_twt_teardown_request, ) ); - + ++#if LINUX_VERSION_IS_GEQ(5,10,0) +DEFINE_EVENT(sta_event, drv_net_fill_forward_path, + TP_PROTO(struct ieee80211_local *local, + struct ieee80211_sub_if_data *sdata, + struct ieee80211_sta *sta), + TP_ARGS(local, sdata, sta) +); ++#endif + #endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */ diff --git a/package/kernel/mac80211/patches/subsys/319-mac80211-introduce-set_radar_offchan-callback.patch b/package/kernel/mac80211/patches/subsys/319-mac80211-introduce-set_radar_offchan-callback.patch index 127b86e76d..eb80afbccb 100644 --- a/package/kernel/mac80211/patches/subsys/319-mac80211-introduce-set_radar_offchan-callback.patch +++ b/package/kernel/mac80211/patches/subsys/319-mac80211-introduce-set_radar_offchan-callback.patch @@ -35,9 +35,9 @@ Signed-off-by: Johannes Berg struct ieee80211_sta *sta, u8 flowid); + int (*set_radar_offchan)(struct ieee80211_hw *hw, + struct cfg80211_chan_def *chandef); + #if LINUX_VERSION_IS_GEQ(5,10,0) int (*net_fill_forward_path)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -4344,6 +4344,18 @@ out: diff --git a/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch b/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch index ce4611b145..a73e81bec6 100644 --- a/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch +++ b/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch @@ -107,9 +107,9 @@ Signed-off-by: Johannes Berg - struct cfg80211_chan_def *chandef); + int (*set_radar_background)(struct ieee80211_hw *hw, + struct cfg80211_chan_def *chandef); + #if LINUX_VERSION_IS_GEQ(5,10,0) int (*net_fill_forward_path)(struct ieee80211_hw *hw, struct ieee80211_vif *vif, - struct ieee80211_sta *sta, --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -2608,10 +2608,10 @@ enum nl80211_commands { diff --git a/package/libs/argp-standalone/Makefile b/package/libs/argp-standalone/Makefile index 8fad739d85..21b154f29d 100644 --- a/package/libs/argp-standalone/Makefile +++ b/package/libs/argp-standalone/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=argp-standalone PKG_VERSION:=1.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.lysator.liu.se/~nisse/misc/ @@ -20,6 +20,7 @@ PKG_LICENSE:=LGPL-2.1 PKG_LICENSE:=Makefile.am include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk define Package/argp-standalone SECTION:=libs @@ -45,4 +46,14 @@ define Build/InstallDev $(1)/usr/lib/ endef +define Host/Install + $(INSTALL_DIR) $(1)/include + $(CP) $(HOST_BUILD_DIR)/argp.h \ + $(1)/include/ + $(INSTALL_DIR) $(1)/lib + $(CP) $(HOST_BUILD_DIR)/libargp.a \ + $(1)/lib/ +endef + $(eval $(call BuildPackage,argp-standalone)) +$(eval $(call HostBuild)) diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile index dfbc2c859b..625a26c739 100644 --- a/package/libs/mbedtls/Makefile +++ b/package/libs/mbedtls/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mbedtls -PKG_VERSION:=2.16.12 +PKG_VERSION:=2.28.0 PKG_RELEASE:=$(AUTORELEASE) PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)? -PKG_HASH:=294871ab1864a65d0b74325e9219d5bcd6e91c34a3c59270c357bb9ae4d5c393 +PKG_HASH:=6519579b836ed78cc549375c7c18b111df5717e86ca0eeff4cb64b2674f424cc PKG_LICENSE:=GPL-2.0-or-later PKG_LICENSE_FILES:=gpl-2.0.txt @@ -146,6 +146,9 @@ define Build/Configure END { exit(rc) }' $(PKG_BUILD_DIR)/include/mbedtls/config.h \ >$(PKG_BUILD_DIR)/include/mbedtls/config.h.new && \ mv $(PKG_BUILD_DIR)/include/mbedtls/config.h.new $(PKG_BUILD_DIR)/include/mbedtls/config.h + + sed -i '/fuzz/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt + sed -i '/test/d' $(PKG_BUILD_DIR)/programs/CMakeLists.txt endef define Build/InstallDev diff --git a/package/libs/mbedtls/patches/200-config.patch b/package/libs/mbedtls/patches/200-config.patch index 67f331674c..faf5bb5db9 100644 --- a/package/libs/mbedtls/patches/200-config.patch +++ b/package/libs/mbedtls/patches/200-config.patch @@ -1,6 +1,6 @@ --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h -@@ -692,14 +692,14 @@ +@@ -665,14 +665,14 @@ * * Enable Output Feedback mode (OFB) for symmetric ciphers. */ @@ -17,10 +17,10 @@ /** * \def MBEDTLS_CIPHER_NULL_CIPHER -@@ -816,19 +816,19 @@ - * +@@ -790,20 +790,20 @@ * Comment macros to disable the curve and functions for it */ + /* Short Weierstrass curves (supporting ECP, ECDH, ECDSA) */ -#define MBEDTLS_ECP_DP_SECP192R1_ENABLED -#define MBEDTLS_ECP_DP_SECP224R1_ENABLED +//#define MBEDTLS_ECP_DP_SECP192R1_ENABLED @@ -40,13 +40,14 @@ +//#define MBEDTLS_ECP_DP_BP256R1_ENABLED +//#define MBEDTLS_ECP_DP_BP384R1_ENABLED +//#define MBEDTLS_ECP_DP_BP512R1_ENABLED + /* Montgomery curves (supporting ECP) */ #define MBEDTLS_ECP_DP_CURVE25519_ENABLED -#define MBEDTLS_ECP_DP_CURVE448_ENABLED +//#define MBEDTLS_ECP_DP_CURVE448_ENABLED /** * \def MBEDTLS_ECP_NIST_OPTIM -@@ -952,7 +952,7 @@ +@@ -956,7 +956,7 @@ * See dhm.h for more details. * */ @@ -55,7 +56,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED -@@ -972,7 +972,7 @@ +@@ -976,7 +976,7 @@ * MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA */ @@ -64,7 +65,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED -@@ -997,7 +997,7 @@ +@@ -1001,7 +1001,7 @@ * MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA * MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA */ @@ -73,7 +74,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED -@@ -1131,7 +1131,7 @@ +@@ -1135,7 +1135,7 @@ * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 */ @@ -82,7 +83,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -@@ -1155,7 +1155,7 @@ +@@ -1159,7 +1159,7 @@ * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 */ @@ -91,7 +92,7 @@ /** * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED -@@ -1259,7 +1259,7 @@ +@@ -1263,7 +1263,7 @@ * This option is only useful if both MBEDTLS_SHA256_C and * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used. */ @@ -100,7 +101,7 @@ /** * \def MBEDTLS_ENTROPY_NV_SEED -@@ -1354,14 +1354,14 @@ +@@ -1478,14 +1478,14 @@ * Uncomment this macro to disable the use of CRT in RSA. * */ @@ -117,7 +118,7 @@ /** * \def MBEDTLS_SHA256_SMALLER -@@ -1515,7 +1515,7 @@ +@@ -1756,7 +1756,7 @@ * configuration of this extension). * */ @@ -126,7 +127,7 @@ /** * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO -@@ -1720,7 +1720,7 @@ +@@ -2017,7 +2017,7 @@ * * Comment this macro to disable support for truncated HMAC in SSL */ @@ -135,7 +136,7 @@ /** * \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT -@@ -1796,7 +1796,7 @@ +@@ -2185,7 +2185,7 @@ * * Comment this to disable run-time checking and save ROM space */ @@ -144,7 +145,7 @@ /** * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 -@@ -2126,7 +2126,7 @@ +@@ -2534,7 +2534,7 @@ * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 * MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 */ @@ -153,7 +154,7 @@ /** * \def MBEDTLS_ARIA_C -@@ -2192,7 +2192,7 @@ +@@ -2600,7 +2600,7 @@ * This module enables the AES-CCM ciphersuites, if other requisites are * enabled as well. */ @@ -162,7 +163,7 @@ /** * \def MBEDTLS_CERTS_C -@@ -2204,7 +2204,7 @@ +@@ -2612,7 +2612,7 @@ * * This module is used for testing (ssl_client/server). */ @@ -171,7 +172,7 @@ /** * \def MBEDTLS_CHACHA20_C -@@ -2312,7 +2312,7 @@ +@@ -2725,7 +2725,7 @@ * \warning DES is considered a weak cipher and its use constitutes a * security risk. We recommend considering stronger ciphers instead. */ @@ -180,7 +181,7 @@ /** * \def MBEDTLS_DHM_C -@@ -2475,7 +2475,7 @@ +@@ -2890,7 +2890,7 @@ * This module adds support for the Hashed Message Authentication Code * (HMAC)-based key derivation function (HKDF). */ @@ -189,7 +190,7 @@ /** * \def MBEDTLS_HMAC_DRBG_C -@@ -2785,7 +2785,7 @@ +@@ -3203,7 +3203,7 @@ * * This module enables abstraction of common (libc) functions. */ @@ -198,7 +199,7 @@ /** * \def MBEDTLS_POLY1305_C -@@ -2806,7 +2806,7 @@ +@@ -3279,7 +3279,7 @@ * Caller: library/md.c * */ @@ -207,7 +208,7 @@ /** * \def MBEDTLS_RSA_C -@@ -3013,7 +3013,7 @@ +@@ -3486,7 +3486,7 @@ * * This module provides run-time version information. */ @@ -216,7 +217,7 @@ /** * \def MBEDTLS_X509_USE_C -@@ -3123,7 +3123,7 @@ +@@ -3596,7 +3596,7 @@ * Module: library/xtea.c * Caller: */ diff --git a/package/network/config/firewall/Makefile b/package/network/config/firewall/Makefile index 3146140905..71d36e8c8e 100644 --- a/package/network/config/firewall/Makefile +++ b/package/network/config/firewall/Makefile @@ -28,8 +28,9 @@ define Package/firewall SECTION:=net CATEGORY:=Base system TITLE:=OpenWrt C Firewall - DEPENDS:=+libubox +libubus +libuci +libip4tc +IPV6:libip6tc +libxtables +kmod-ipt-core \ - +kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +kmod-ipt-nat +iptables-mod-fullconenat + DEPENDS:=+libubox +libubus +libuci +libip4tc +IPV6:libip6tc +libiptext +IPV6:libiptext6 \ + +libxtables +kmod-ipt-core +kmod-ipt-conntrack +IPV6:kmod-nf-conntrack6 +kmod-ipt-nat \ + +iptables-mod-fullconenat PROVIDES:=uci-firewall CONFLICTS:=firewall4 endef diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile index e936a57380..69bbb0237d 100644 --- a/package/network/utils/iptables/Makefile +++ b/package/network/utils/iptables/Makefile @@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=iptables PKG_VERSION:=1.8.7 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_URL:=https://netfilter.org/projects/iptables/files PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 @@ -41,35 +41,21 @@ endef define Package/iptables/Module $(call Package/iptables/Default) - DEPENDS:=+iptables $(1) + DEPENDS:=+libxtables $(1) endef -define Package/iptables +define Package/iptables-legacy $(call Package/iptables/Default) TITLE:=IP firewall administration tool - MENU:=1 - DEPENDS+= +kmod-ipt-core +libip4tc +IPV6:libip6tc +libxtables + DEPENDS+= +kmod-ipt-core +libip4tc +IPV6:libip6tc +libiptext +IPV6:libiptext6 +libxtables + PROVIDES:=iptables ALTERNATIVES:=\ 200:/usr/sbin/iptables:/usr/sbin/xtables-legacy-multi \ 200:/usr/sbin/iptables-restore:/usr/sbin/xtables-legacy-multi \ 200:/usr/sbin/iptables-save:/usr/sbin/xtables-legacy-multi endef -define Package/iptables/config - config IPTABLES_CONNLABEL - bool "Enable Connlabel support" - default n - help - This enable connlabel support in iptables. - - config IPTABLES_NFTABLES - bool "Enable Nftables support" - default y - help - This enable nftables support in iptables. -endef - -define Package/iptables/description +define Package/iptables-legacy/description IP firewall administration tool. Matches: @@ -112,7 +98,8 @@ endef define Package/iptables-nft $(call Package/iptables/Default) TITLE:=IP firewall administration tool nft - DEPENDS:=@IPTABLES_NFTABLES +libxtables-nft +libip4tc +IPV6:libip6tc +kmod-ipt-core +kmod-nft-compat + DEPENDS:=@IPTABLES_NFTABLES +libnftnl +libiptext +IPV6:libiptext6 +libiptext-nft +kmod-ipt-core +kmod-nft-compat + PROVIDES:=iptables ALTERNATIVES:=\ 300:/usr/sbin/iptables:/usr/sbin/xtables-nft-multi \ 300:/usr/sbin/iptables-restore:/usr/sbin/xtables-nft-multi \ @@ -452,12 +439,12 @@ define Package/iptables-mod-checksum/description iptables extension for the CHECKSUM calculation target endef -define Package/ip6tables +define Package/ip6tables-legacy $(call Package/iptables/Default) - DEPENDS:=@IPV6 +kmod-ip6tables +iptables + DEPENDS:=@IPV6 +kmod-ip6tables +iptables-legacy CATEGORY:=Network TITLE:=IPv6 firewall administration tool - MENU:=1 + PROVIDES:=ip6tables ALTERNATIVES:=\ 200:/usr/sbin/ip6tables:/usr/sbin/xtables-legacy-multi \ 200:/usr/sbin/ip6tables-restore:/usr/sbin/xtables-legacy-multi \ @@ -468,6 +455,7 @@ define Package/ip6tables-nft $(call Package/iptables/Default) DEPENDS:=@IPV6 +kmod-ip6tables +iptables-nft TITLE:=IP firewall administration tool nft + PROVIDES:=ip6tables ALTERNATIVES:=\ 300:/usr/sbin/ip6tables:/usr/sbin/xtables-nft-multi \ 300:/usr/sbin/ip6tables-restore:/usr/sbin/xtables-nft-multi \ @@ -485,7 +473,7 @@ endef define Package/ip6tables-extra $(call Package/iptables/Default) - DEPENDS:=ip6tables +kmod-ip6tables-extra + DEPENDS:=+libxtables +kmod-ip6tables-extra TITLE:=IPv6 header matching modules endef @@ -495,7 +483,7 @@ endef define Package/ip6tables-mod-nat $(call Package/iptables/Default) - DEPENDS:=ip6tables +kmod-ipt-nat6 + DEPENDS:=+libxtables +kmod-ipt-nat6 TITLE:=IPv6 NAT extensions endef @@ -509,7 +497,6 @@ $(call Package/iptables/Default) CATEGORY:=Libraries TITLE:=IPv4 firewall - shared libiptc library ABI_VERSION:=2 - DEPENDS:=+libxtables endef define Package/libip6tc @@ -518,7 +505,33 @@ $(call Package/iptables/Default) CATEGORY:=Libraries TITLE:=IPv6 firewall - shared libiptc library ABI_VERSION:=2 - DEPENDS:=+libxtables +endef + +define Package/libiptext + $(call Package/iptables/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE:=IPv4 firewall - shared libiptext library + ABI_VERSION:=0 + DEPENDS:=+libxtables +endef + +define Package/libiptext6 + $(call Package/iptables/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE:=IPv6 firewall - shared libiptext library + ABI_VERSION:=0 + DEPENDS:=+libxtables +endef + +define Package/libiptext-nft + $(call Package/iptables/Default) + SECTION:=libs + CATEGORY:=Libraries + TITLE:=IPv4/IPv6 firewall - shared libiptext nft library + ABI_VERSION:=0 + DEPENDS:=@IPTABLES_NFTABLES +libxtables endef define Package/libxtables @@ -526,19 +539,23 @@ define Package/libxtables SECTION:=libs CATEGORY:=Libraries TITLE:=IPv4/IPv6 firewall - shared xtables library + MENU:=1 ABI_VERSION:=12 - DEPENDS:= \ - +IPTABLES_CONNLABEL:libnetfilter-conntrack \ - +IPTABLES_NFTABLES:libnftnl + DEPENDS:=+IPTABLES_CONNLABEL:libnetfilter-conntrack endef -define Package/libxtables-nft - $(call Package/iptables/Default) - SECTION:=libs - CATEGORY:=Libraries - TITLE:=IPv4/IPv6 firewall - shared xtables nft library - ABI_VERSION:=12 - DEPENDS:=+libxtables +define Package/libxtables/config + config IPTABLES_CONNLABEL + bool "Enable Connlabel support" + default n + help + This enable connlabel support in iptables. + + config IPTABLES_NFTABLES + bool "Enable Nftables support" + default y + help + This enable nftables support in iptables. endef TARGET_CPPFLAGS := \ @@ -611,7 +628,7 @@ define Build/InstallDev $(CP) $(PKG_BUILD_DIR)/extensions/libiptext*.so $(1)/usr/lib/ endef -define Package/iptables/install +define Package/iptables-legacy/install $(INSTALL_DIR) $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/xtables-legacy-multi $(1)/usr/sbin/ $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables-legacy{,-restore,-save} $(1)/usr/sbin/ @@ -625,7 +642,7 @@ define Package/iptables-nft/install $(CP) $(PKG_INSTALL_DIR)/usr/sbin/iptables{,-restore}-translate $(1)/usr/sbin/ endef -define Package/ip6tables/install +define Package/ip6tables-legacy/install $(INSTALL_DIR) $(1)/usr/sbin $(CP) $(PKG_INSTALL_DIR)/usr/sbin/ip6tables-legacy{,-restore,-save} $(1)/usr/sbin/ endef @@ -639,24 +656,32 @@ endef define Package/libip4tc/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libip4tc.so.* $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/extensions/libiptext4.so $(1)/usr/lib/ endef define Package/libip6tc/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libip6tc.so.* $(1)/usr/lib/ +endef + +define Package/libiptext/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/extensions/libiptext.so $(1)/usr/lib/ + $(CP) $(PKG_BUILD_DIR)/extensions/libiptext4.so $(1)/usr/lib/ +endef + +define Package/libiptext6/install + $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_BUILD_DIR)/extensions/libiptext6.so $(1)/usr/lib/ endef +define Package/libiptext-nft/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_BUILD_DIR)/extensions/libiptext_*.so $(1)/usr/lib/ +endef + define Package/libxtables/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/libxtables.so.* $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/extensions/libiptext.so $(1)/usr/lib/ -endef - -define Package/libxtables-nft/install - $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/extensions/libiptext_*.so $(1)/usr/lib/ endef define BuildPlugin @@ -674,10 +699,12 @@ define BuildPlugin endef $(eval $(call BuildPackage,libxtables)) -$(eval $(call BuildPackage,libxtables-nft)) $(eval $(call BuildPackage,libip4tc)) $(eval $(call BuildPackage,libip6tc)) -$(eval $(call BuildPackage,iptables)) +$(eval $(call BuildPackage,libiptext)) +$(eval $(call BuildPackage,libiptext6)) +$(eval $(call BuildPackage,libiptext-nft)) +$(eval $(call BuildPackage,iptables-legacy)) $(eval $(call BuildPackage,iptables-nft)) $(eval $(call BuildPlugin,iptables-mod-conntrack-extra,$(IPT_CONNTRACK_EXTRA-m))) $(eval $(call BuildPlugin,iptables-mod-conntrack-label,$(IPT_CONNTRACK_LABEL-m))) @@ -701,7 +728,7 @@ $(eval $(call BuildPlugin,iptables-mod-nflog,$(IPT_NFLOG-m))) $(eval $(call BuildPlugin,iptables-mod-trace,$(IPT_DEBUG-m))) $(eval $(call BuildPlugin,iptables-mod-nfqueue,$(IPT_NFQUEUE-m))) $(eval $(call BuildPlugin,iptables-mod-checksum,$(IPT_CHECKSUM-m))) -$(eval $(call BuildPackage,ip6tables)) +$(eval $(call BuildPackage,ip6tables-legacy)) $(eval $(call BuildPackage,ip6tables-nft)) $(eval $(call BuildPlugin,ip6tables-extra,$(IPT_IPV6_EXTRA-m))) $(eval $(call BuildPlugin,ip6tables-mod-nat,$(IPT_NAT6-m))) diff --git a/package/network/utils/layerscape/restool/Makefile b/package/network/utils/layerscape/restool/Makefile index bb2eac48cd..f108799836 100644 --- a/package/network/utils/layerscape/restool/Makefile +++ b/package/network/utils/layerscape/restool/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=restool -PKG_VERSION:=LSDK-21.08 +PKG_VERSION:=21.08 PKG_RELEASE:=$(AUTORELEASE) PKG_SOURCE_PROTO:=git diff --git a/package/system/iucode-tool/Makefile b/package/system/iucode-tool/Makefile index b8227ed4a1..d7c85b2d42 100644 --- a/package/system/iucode-tool/Makefile +++ b/package/system/iucode-tool/Makefile @@ -9,13 +9,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=iucode-tool PKG_VERSION:=2.3.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=iucode-tool_$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://gitlab.com/iucode-tool/releases/raw/latest PKG_HASH:=12b88efa4d0d95af08db05a50b3dcb217c0eb2bfc67b483779e33d498ddb2f95 PKG_BUILD_DEPENDS:=USE_UCLIBC:argp-standalone USE_MUSL:argp-standalone +HOST_BUILD_DEPENDS:=HOST_OS_MACOS:argp-standalone/host PKG_MAINTAINER:=Zoltan HERPAI PKG_LICENSE:=GPL-2.0 @@ -41,6 +42,18 @@ define Package/iucode-tool/install $(INSTALL_BIN) $(PKG_BUILD_DIR)/iucode_tool $(1)/usr/bin/ endef +# List of build hosts with working cpuid.h +IUT_NATIVE_HOST_OS_ARCH := \ + linux/x86_64 linux/amd64 linux/i386 linux/i686 + +IUT_HOST_OS_ARCH := $(call tolower,$(HOST_OS))/$(HOST_ARCH) + +# Use cpuid.h compat header if build host does not have working cpuid.h +ifeq ($(filter $(IUT_HOST_OS_ARCH),$(IUT_NATIVE_HOST_OS_ARCH)),) +HOST_CFLAGS += \ + -I$(HOST_BUILD_DIR)/cpuid-compat +endif + define Host/Install $(INSTALL_BIN) $(HOST_BUILD_DIR)/iucode_tool $(STAGING_DIR_HOST)/bin/iucode_tool endef diff --git a/package/system/iucode-tool/patches/200_add-cpuid-compatibility-header-to-build-on-non-x86.patch b/package/system/iucode-tool/patches/200_add-cpuid-compatibility-header-to-build-on-non-x86.patch new file mode 100644 index 0000000000..900f3596f8 --- /dev/null +++ b/package/system/iucode-tool/patches/200_add-cpuid-compatibility-header-to-build-on-non-x86.patch @@ -0,0 +1,31 @@ +From a21e75da32c0016f1575ea29775565934a67660d Mon Sep 17 00:00:00 2001 +From: "Sergey V. Lobanov" +Date: Sat, 5 Feb 2022 13:10:23 +0300 +Subject: [PATCH] Add cpuid compatibility header to build on non-x86 hosts + +Signed-off-by: Sergey V. Lobanov +--- + cpuid-compat/cpuid.h | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + create mode 100644 cpuid-compat/cpuid.h + +--- /dev/null ++++ b/cpuid-compat/cpuid.h +@@ -0,0 +1,17 @@ ++// SPDX-License-Identifier: GPL-2.0-or-later ++/* ++ * cpuid compatibility header to build iucode-tool on non-x86 hosts ++ * ++ * Copyright (C) 2022 Sergey V. Lobanov ++ */ ++ ++#ifdef __APPLE__ ++# include ++#endif ++ ++static __inline int __get_cpuid (unsigned int leaf, ++ unsigned int *eax, unsigned int *ebx, ++ unsigned int *ecx, unsigned int *edx) ++{ ++ return 0; ++} diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile index f24dd6169c..7477615c5d 100644 --- a/package/system/ubus/Makefile +++ b/package/system/ubus/Makefile @@ -5,9 +5,9 @@ PKG_RELEASE:=2 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git -PKG_SOURCE_DATE:=2021-08-09 -PKG_SOURCE_VERSION:=a72457b61df045d3c499a6211362b751710590d7 -PKG_MIRROR_HASH:=ac617577bcb2ff3dbc3039ad67200afcce910840223a2de15977d3224e6557fd +PKG_SOURCE_DATE:=2022-02-28 +PKG_SOURCE_VERSION:=584f56a2331471459604ad054b3a7bcc366e0f07 +PKG_MIRROR_HASH:=9bb7025fa5513530e6f407e0514014a8116babe9287d4217d0b8f9315b1f2181 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE)) CMAKE_INSTALL:=1 diff --git a/package/utils/jsonfilter/Makefile b/package/utils/jsonfilter/Makefile index 6b7557b38c..56f96d52b5 100644 --- a/package/utils/jsonfilter/Makefile +++ b/package/utils/jsonfilter/Makefile @@ -21,7 +21,7 @@ define Package/jsonfilter CATEGORY:=Base system DEPENDS:=+libubox +libjson-c TITLE:=OpenWrt JSON filter utility - URL:=http://git.openwrt.org/?p=project/jsonpath.git + URL:=$(PKG_SOURCE_URL) endef define Package/jsonfilter/install diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile index e3b457efd6..1aa1980ce2 100644 --- a/package/utils/usbmode/Makefile +++ b/package/utils/usbmode/Makefile @@ -1,13 +1,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=usbmode -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/usbmode.git -PKG_SOURCE_DATE:=2017-12-19 -PKG_SOURCE_VERSION:=f40f84c27534159066c94dadc0c08e0b255c3e26 -PKG_MIRROR_HASH:=840c7ee2843102b09d8943a20820025251cc259385e2b0bde6b7c8cce8190f83 +PKG_SOURCE_DATE:=2022-02-24 +PKG_SOURCE_VERSION:=3c8595a4e75510f58fa231b145d5506768dcafc9 +PKG_MIRROR_HASH:=5f0234945f61639080f039522172151452180dd4aec33bafc8a61b60131c3bed CMAKE_INSTALL:=1 PKG_LICENSE:=GPL-2.0 diff --git a/scripts/check-toolchain-clean.sh b/scripts/check-toolchain-clean.sh index af24e740b7..455cfb0449 100755 --- a/scripts/check-toolchain-clean.sh +++ b/scripts/check-toolchain-clean.sh @@ -1,9 +1,14 @@ #!/bin/sh -eval `grep CONFIG_GCC_VERSION .config` +eval "$(grep CONFIG_GCC_VERSION .config)" CONFIG_TOOLCHAIN_BUILD_VER="$CONFIG_GCC_VERSION-$(cat toolchain/build_version)" touch .toolchain_build_ver -[ "$CONFIG_TOOLCHAIN_BUILD_VER" = "$(cat .toolchain_build_ver)" ] && exit 0 -echo "Toolchain build version changed, running make targetclean" +CURRENT_TOOLCHAIN_BUILD_VER="$(cat .toolchain_build_ver)" +[ -z "$CURRENT_TOOLCHAIN_BUILD_VER" ] && { + echo "$CONFIG_TOOLCHAIN_BUILD_VER" > .toolchain_build_ver + exit 0 +} +[ "$CONFIG_TOOLCHAIN_BUILD_VER" = "$CURRENT_TOOLCHAIN_BUILD_VER" ] && exit 0 +echo "Toolchain build version changed ($CONFIG_TOOLCHAIN_BUILD_VER != $CURRENT_TOOLCHAIN_BUILD_VER), running make targetclean" make targetclean echo "$CONFIG_TOOLCHAIN_BUILD_VER" > .toolchain_build_ver exit 0 diff --git a/scripts/diffconfig.sh b/scripts/diffconfig.sh index 5f9fec5600..7ffe9dd01a 100755 --- a/scripts/diffconfig.sh +++ b/scripts/diffconfig.sh @@ -1,4 +1,5 @@ #!/bin/sh +make ./scripts/config/conf >/dev/null || { make ./scripts/config/conf; exit 1; } grep \^CONFIG_TARGET_ .config | head -n3 > tmp/.diffconfig.head grep \^CONFIG_TARGET_DEVICE_ .config >> tmp/.diffconfig.head grep '^CONFIG_ALL=y' .config >> tmp/.diffconfig.head diff --git a/target/linux/at91/sama5/config-default b/target/linux/at91/sama5/config-default index 0d02dd1922..3a75675c41 100644 --- a/target/linux/at91/sama5/config-default +++ b/target/linux/at91/sama5/config-default @@ -327,12 +327,8 @@ CONFIG_PINCTRL_AT91=y CONFIG_PINCTRL_AT91PIO4=y # CONFIG_PINCTRL_SINGLE is not set CONFIG_PM=y -CONFIG_PM_ADVANCED_DEBUG=y CONFIG_PM_CLK=y -CONFIG_PM_DEBUG=y CONFIG_PM_SLEEP=y -CONFIG_PM_SLEEP_DEBUG=y -# CONFIG_PM_TEST_SUSPEND is not set CONFIG_POWER_RESET=y CONFIG_POWER_RESET_AT91_POWEROFF=y CONFIG_POWER_RESET_AT91_RESET=y diff --git a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration index d2df0533fe..35e7c4452c 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration +++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/00-wifi-migration @@ -16,6 +16,7 @@ migrate_wifi_path() { case "$board" in tplink,archer-c7-v1|\ tplink,archer-c7-v2|\ + zyxel,emg2926-q10a|\ zyxel,nbg6716) path="pci0000:00/0000:00:00.0" WIFI_PATH_CHANGED=1 diff --git a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi index e12205c310..2be7cdb05d 100644 --- a/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi +++ b/target/linux/ath79/dts/ar9331_alfa-network_ap121f.dtsi @@ -96,10 +96,26 @@ reg = <0x030000 0x010000>; }; - art: partition@40000 { + partition@40000 { label = "art"; reg = <0x040000 0x010000>; read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: cal@1000 { + reg = <0x1000 0x440>; + }; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; }; partition@50000 { @@ -122,15 +138,6 @@ &wmac { status = "okay"; - mtd-cal-data = <&art 0x1000>; -}; - -&art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_0: macaddr@0 { - reg = <0x0 0x6>; - }; + nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>; + nvmem-cell-names = "calibration", "mac-address"; }; diff --git a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts index c54270a78d..ca762c3bca 100644 --- a/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts +++ b/target/linux/ath79/dts/ar9344_alfa-network_n5q.dts @@ -131,10 +131,30 @@ reg = <0x060000 0x010000>; }; - art: partition@70000 { + partition@70000 { label = "art"; reg = <0x070000 0x010000>; read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: cal@1000 { + reg = <0x1000 0x440>; + }; + + macaddr_art_0: macaddr@0 { + reg = <0x0 0x6>; + }; + + macaddr_art_6: macaddr@6 { + reg = <0x6 0x6>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; }; partition@80000 { @@ -149,19 +169,6 @@ &wmac { status = "okay"; - mtd-cal-data = <&art 0x1000>; -}; - -&art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_0: macaddr@0 { - reg = <0x0 0x6>; - }; - - macaddr_art_6: macaddr@6 { - reg = <0x6 0x6>; - }; + nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>; + nvmem-cell-names = "calibration", "mac-address"; }; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts index 671adb8ccf..8759198f53 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_n2q.dts @@ -120,13 +120,3 @@ &pcie0 { status = "okay"; }; - -&art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_1002: macaddr@1002 { - reg = <0x1002 0x6>; - }; -}; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts index 5a934ce957..e9e19f9d32 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_pi-wifi4.dts @@ -86,13 +86,3 @@ #trigger-source-cells = <0>; }; }; - -&art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_1002: macaddr@1002 { - reg = <0x1002 0x6>; - }; -}; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts index 01e14bb0b1..6af8d3b8b5 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts +++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dts @@ -81,13 +81,3 @@ debounce-interval = <60>; }; }; - -&art { - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_art_1002: macaddr@1002 { - reg = <0x1002 0x6>; - }; -}; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi index 4c9346db1e..9704e69211 100644 --- a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi +++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi @@ -82,10 +82,22 @@ reg = <0x060000 0x010000>; }; - art: partition@70000 { + partition@70000 { label = "art"; reg = <0x070000 0x010000>; read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: cal@1000 { + reg = <0x1000 0x440>; + }; + + macaddr_art_1002: macaddr@1002 { + reg = <0x1002 0x6>; + }; }; partition@80000 { @@ -116,5 +128,6 @@ &wmac { status = "okay"; - mtd-cal-data = <&art 0x1000>; + nvmem-cells = <&cal_art_1000>, <&macaddr_art_1002>; + nvmem-cell-names = "calibration", "mac-address"; }; diff --git a/target/linux/ath79/dts/qca9531_alfa-network_tube-2hq.dts b/target/linux/ath79/dts/qca9531_alfa-network_tube-2hq.dts new file mode 100644 index 0000000000..f81fe287df --- /dev/null +++ b/target/linux/ath79/dts/qca9531_alfa-network_tube-2hq.dts @@ -0,0 +1,65 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9531_alfa-network_r36a.dtsi" + +/ { + model = "ALFA Network Tube-2HQ"; + compatible = "alfa-network,tube-2hq", "qca,qca9531"; + + aliases { + led-boot = &led_signal4; + led-failsafe = &led_signal4; + led-upgrade = &led_signal4; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&enable_gpio4 &enable_gpio16>; + + lan { + label = "blue:lan"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + led_signal4: signal4 { + label = "green:signal4"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + signal1 { + label = "red:signal1"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + + signal2 { + label = "orange:signal2"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + signal3 { + label = "green:signal3"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð0 { + nvmem-cells = <&macaddr_art_1002>; + nvmem-cell-names = "mac-address"; + + mac-address-increment = <(-1)>; +}; + +ð1 { + compatible = "syscon", "simple-mfd"; +}; + +&usb0 { + status = "disabled"; +}; + +&usb_phy { + status = "disabled"; +}; diff --git a/target/linux/ath79/dts/qca9558_zyxel_emg2926_q10a.dts b/target/linux/ath79/dts/qca9558_zyxel_emg2926_q10a.dts new file mode 100644 index 0000000000..c00109a5b4 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_zyxel_emg2926_q10a.dts @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca9558_zyxel_nbg6716.dts" + +/ { + compatible = "zyxel,emg2926-q10a", "zyxel,nbg6716", "qca,qca9558"; + model = "ZyXEL EMG2926-Q10A"; +}; diff --git a/target/linux/ath79/dts/qca9563_zte_mf286.dts b/target/linux/ath79/dts/qca9563_zte_mf286.dts index c4ebdebd10..2e528a6b97 100644 --- a/target/linux/ath79/dts/qca9563_zte_mf286.dts +++ b/target/linux/ath79/dts/qca9563_zte_mf286.dts @@ -1,72 +1,12 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT // Copyright (c) 2021 Cezary Jackiewicz // Copyright (c) 2021, 2022 Lech Perczak -#include "qca956x.dtsi" - -#include -#include -#include +#include "qca9563_zte_mf286.dtsi" / { model = "ZTE MF286"; compatible = "zte,mf286", "qca,qca9563"; - aliases { - led-boot = &led_debug; - led-failsafe = &led_debug; - led-running = &led_debug; - led-upgrade = &led_debug; - label-mac-device = ð0; - }; - - leds { - compatible = "gpio-leds"; - - /* Hidden green SMD LED below signal strength LEDs - * Visible through slits underside of the case, - * and slightly through the case below signal state LEDs */ - led_debug: led-0 { - color = ; - function = LED_FUNCTION_DEBUG; - label = "green:debug"; - gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - default-state = "on"; - }; - }; - - keys { - compatible = "gpio-keys"; - - reset { - label = "reset"; - linux,code = ; - gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - wps { - label = "wps"; - linux,code = ; - gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - - wifi { - label = "wifi"; - linux,code = ; - gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; - }; - }; - - /* This GPIO is used to reset whole board _including_ the modem */ - gpio-restart { - compatible = "gpio-restart"; - gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; - active-delay = <3000>; - inactive-delay = <1000>; - }; - ubi-concat { compatible = "mtd-concat"; devices = <&ubiconcat0 &ubiconcat1>; @@ -84,173 +24,107 @@ }; }; -&gpio { - /* GPIO19 is used as a mask to enable WLAN LED - * in stock firmware, which is controlled directly - * by 5GHz Wi-Fi chip, which currently is inactive - * in OpenWrt */ - led-wlan { - gpio-hog; - gpios = <19 GPIO_ACTIVE_LOW>; - output-high; - line-name = "led:wlan"; - }; +&led_debug { + /* Hidden green SMD LED below signal strength LEDs + * Visible through slits underside of the case, + * and slightly through the case below signal state LEDs + */ + color = ; + label = "green:debug"; }; -&spi { - status = "okay"; - - flash@0 { - compatible = "jedec,spi-nor"; - reg = <0>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "u-boot"; - reg = <0x000000 0x080000>; - read-only; - }; - - partition@80000 { - label = "u-boot-env"; - reg = <0x080000 0x020000>; - read-only; - }; +&boot_flash { + partitions { + partition@0 { + label = "u-boot"; + reg = <0x000000 0x080000>; + read-only; }; - }; - flash@1 { - compatible = "spi-nand"; - reg = <1>; - spi-max-frequency = <25000000>; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "fota-flag"; - reg = <0x000000 0x140000>; - read-only; - }; - - caldata: partition@140000 { - label = "caldata"; - reg = <0x140000 0x140000>; - read-only; - - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - cal_caldata_1000: cal@1000 { - reg = <0x1000 0x440>; - }; - - cal_caldata_5000: cal@5000 { - reg = <0x5000 0x844>; - }; - }; - - mac: partition@280000 { - label = "mac"; - reg = <0x280000 0x140000>; - read-only; - - compatible = "nvmem-cells"; - #address-cells = <1>; - #size-cells = <1>; - - macaddr_mac_0: macaddr@0 { - reg = <0x0 0x6>; - }; - }; - - /* This encompasses stock cfg-param, oops, web partitions, - * which can be overwritten safely */ - ubiconcat0: partition@3c0000 { - label = "ubiconcat0"; - reg = <0x3c0000 0xf40000>; - }; - - /* Kernel MTD size is increased to 4MB from stock 3MB */ - partition@1300000 { - label = "kernel"; - reg = <0x1300000 0x400000>; - }; - - /* This encompasses stock rootfs, data, fota partitions, - * which can be overwritten safely */ - ubiconcat1: partition@1600000 { - label = "ubiconcat1"; - reg = <0x1700000 0x6900000>; - }; + partition@80000 { + label = "u-boot-env"; + reg = <0x080000 0x020000>; + read-only; }; }; }; -&mdio0 { - status = "okay"; +&system_flash { + partitions { + partition@0 { + label = "fota-flag"; + reg = <0x000000 0x140000>; + read-only; + }; - phy-mask = <0>; - phy0: ethernet-phy@0 { - reg = <0>; - phy-mode = "sgmii"; + partition@140000 { + label = "caldata"; + reg = <0x140000 0x140000>; + read-only; - qca,ar8327-initvals = < - 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ - 0x7c 0x0000007e /* PORT0_STATUS */ - >; + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_caldata_1000: cal@1000 { + reg = <0x1000 0x440>; + }; + + cal_caldata_5000: cal@5000 { + reg = <0x5000 0x844>; + }; + }; + + partition@280000 { + label = "mac"; + reg = <0x280000 0x140000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_mac_0: macaddr@0 { + reg = <0x0 0x6>; + }; + }; + + /* This encompasses stock cfg-param, oops, web partitions, + * which can be overwritten safely + */ + ubiconcat0: partition@3c0000 { + label = "ubiconcat0"; + reg = <0x3c0000 0xf40000>; + }; + + /* Kernel MTD size is increased to 4MB from stock 3MB */ + partition@1300000 { + label = "kernel"; + reg = <0x1300000 0x400000>; + }; + + /* This encompasses stock rootfs, data, fota partitions, + * which can be overwritten safely + */ + ubiconcat1: partition@1600000 { + label = "ubiconcat1"; + reg = <0x1700000 0x6900000>; + }; }; }; ð0 { - status = "okay"; - nvmem-cells = <&macaddr_mac_0>; nvmem-cell-names = "mac-address"; - phy-mode = "sgmii"; - phy-handle = <&phy0>; }; -&pcie { - status = "okay"; - - wifi@0,0 { - compatible = "qcom,ath10k"; - reg = <0x0 0 0 0 0>; - - nvmem-cells = <&macaddr_mac_0>, <&cal_caldata_5000>; - nvmem-cell-names = "mac-address", "calibration"; - mac-address-increment = <1>; - }; +&wifi_ath10k { + nvmem-cells = <&macaddr_mac_0>, <&cal_caldata_5000>; + nvmem-cell-names = "mac-address", "calibration"; + mac-address-increment = <1>; }; &wmac { - status = "okay"; - nvmem-cells = <&macaddr_mac_0>, <&cal_caldata_1000>; nvmem-cell-names = "mac-address", "calibration"; }; - -&usb_phy0 { - status = "okay"; -}; - -&usb0 { - status = "okay"; -}; - -&usb_phy1 { - status = "okay"; -}; - -&usb1 { - status = "okay"; -}; diff --git a/target/linux/ath79/dts/qca9563_zte_mf286.dtsi b/target/linux/ath79/dts/qca9563_zte_mf286.dtsi new file mode 100644 index 0000000000..3013daa470 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_zte_mf286.dtsi @@ -0,0 +1,158 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +// Copyright (c) 2021 Cezary Jackiewicz +// Copyright (c) 2021, 2022 Lech Perczak +#include "qca956x.dtsi" + +#include +#include +#include + +/ { + aliases { + led-boot = &led_debug; + led-failsafe = &led_debug; + led-running = &led_debug; + led-upgrade = &led_debug; + label-mac-device = ð0; + }; + + leds { + compatible = "gpio-leds"; + + /* Hidden SMD LED below signal strength LEDs. + * Visible through slits underside of the case, + * and slightly through the case below signal state LEDs + */ + led_debug: led-0 { + function = LED_FUNCTION_DEBUG; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + label = "wps"; + linux,code = ; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wifi { + label = "wifi"; + linux,code = ; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + /* This GPIO is used to reset whole board _including_ the modem */ + gpio-restart { + compatible = "gpio-restart"; + gpios = <&gpio 5 GPIO_ACTIVE_HIGH>; + active-delay = <3000>; + inactive-delay = <1000>; + }; +}; + +&gpio { + /* GPIO19 is used as a mask to enable WLAN LED + * in stock firmware, which is controlled directly + * by 5GHz Wi-Fi chip, which currently is inactive + * in OpenWrt + */ + led-wlan { + gpio-hog; + gpios = <19 GPIO_ACTIVE_LOW>; + output-high; + line-name = "led:wlan"; + }; +}; + +&spi { + status = "okay"; + + boot_flash: flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + }; + }; + + system_flash: flash@1 { + compatible = "spi-nand"; + reg = <1>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "sgmii"; + + qca,ar8327-initvals = < + 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ + 0x7c 0x0000007e /* PORT0_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + phy-mode = "sgmii"; + phy-handle = <&phy0>; +}; + +&pcie { + status = "okay"; + + wifi_ath10k: wifi@0,0 { + compatible = "qcom,ath10k"; + reg = <0x0 0 0 0 0>; + }; +}; + +&wmac { + status = "okay"; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; +}; + +&usb_phy1 { + status = "okay"; +}; + +&usb1 { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/qca9563_zte_mf286a.dts b/target/linux/ath79/dts/qca9563_zte_mf286a.dts new file mode 100644 index 0000000000..205dde8030 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_zte_mf286a.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +// Copyright (c) 2021 Cezary Jackiewicz +// Copyright (c) 2021, 2022 Lech Perczak +#include "qca9563_zte_mf286ar.dtsi" + +/ { + model = "ZTE MF286A"; + compatible = "zte,mf286a", "qca,qca9563"; +}; diff --git a/target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi b/target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi new file mode 100644 index 0000000000..45ac3bc7ea --- /dev/null +++ b/target/linux/ath79/dts/qca9563_zte_mf286ar.dtsi @@ -0,0 +1,134 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +// Copyright (c) 2021 Cezary Jackiewicz +// Copyright (c) 2021, 2022 Lech Perczak +#include "qca9563_zte_mf286.dtsi" + +/ { + ubi-concat { + compatible = "mtd-concat"; + devices = <&ubiconcat0 &ubiconcat1>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = <0x0 0x7a60000>; + label = "ubi"; + }; + }; + }; +}; + +&led_debug { + /* Hidden blue SMD LED below signal strength LEDs + * Visible through slits underside of the case, + * and slightly through the case below signal state LEDs + */ + color = ; + label = "blue:debug"; +}; + +&boot_flash { + partitions { + partition@0 { + label = "u-boot"; + reg = <0x000000 0x0a0000>; + read-only; + }; + + partition@a0000 { + label = "u-boot-env"; + reg = <0x0a0000 0x020000>; + read-only; + }; + + partition@c0000 { + label = "reserved1"; + reg = <0x0c0000 0x140000>; + read-only; + }; + }; +}; + +&system_flash { + partitions { + partition@0 { + label = "fota-flag"; + reg = <0x00000 0xa0000>; + read-only; + }; + + partition@a0000 { + label = "art"; + reg = <0xa0000 0x80000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: cal@1000 { + reg = <0x1000 0x440>; + }; + + precal_art_5000: precal@5000 { + reg = <0x5000 0x2f20>; + }; + }; + + partition@120000 { + label = "mac"; + reg = <0x120000 0x80000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_mac_0: mac-address@0 { + reg = <0x0 0x6>; + }; + }; + + /* This encompasses stock reserved2, cfg-param, log, oops, + * reserved3, web partitions, + * which can be overwritten safely + */ + ubiconcat0: partition@1a0000 { + label = "ubiconcat0"; + reg = <0x1a0000 0x1660000>; + }; + + /* Kernel MTD size is increased to 4MB from stock 3MB */ + partition@1800000 { + label = "kernel"; + reg = <0x1800000 0x400000>; + }; + + /* This encompasses stock rootfs, data, fota partitions, + * which can be overwritten safely + */ + ubiconcat1: partition@1c00000 { + label = "ubiconcat1"; + reg = <0x1c00000 0x6400000>; + }; + }; +}; + +ð0 { + nvmem-cells = <&macaddr_mac_0>; + nvmem-cell-names = "mac-address"; +}; + +&wifi_ath10k { + nvmem-cells = <&macaddr_mac_0>, <&precal_art_5000>; + nvmem-cell-names = "mac-address", "pre-calibration"; + mac-address-increment = <0x20000>; +}; + +&wmac { + nvmem-cells = <&macaddr_mac_0>, <&cal_art_1000>; + nvmem-cell-names = "mac-address", "calibration"; +}; diff --git a/target/linux/ath79/dts/qca9563_zte_mf286r.dts b/target/linux/ath79/dts/qca9563_zte_mf286r.dts new file mode 100644 index 0000000000..6fa0f7a7f8 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_zte_mf286r.dts @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +// Copyright (c) 2021 Cezary Jackiewicz +// Copyright (c) 2021, 2022 Lech Perczak +#include "qca9563_zte_mf286ar.dtsi" + +/ { + model = "ZTE MF286R"; + compatible = "zte,mf286r", "qca,qca9563"; +}; diff --git a/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts new file mode 100644 index 0000000000..c095bbd2ed --- /dev/null +++ b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts @@ -0,0 +1,248 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca956x.dtsi" + +#include +#include + +/ { + model = "TP-Link Archer A9 v6"; + compatible = "tplink,archer-a9-v6", "qca,qcn5500", "qca,qca9560"; + + aliases { + label-mac-device = ð0; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + label = "wps"; + linux,code = ; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "green:power"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + usb { + label = "green:usb"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + trigger-sources = <&hub_port0>; + linux,default-trigger = "usbport"; + }; + + wan { + label = "green:wan"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + }; + + wan_orange { + label = "orange:wan"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "green:wlan2g"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wlan5g { + label = "green:wlan5g"; + gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + + wps { + label = "green:wps"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0x03000101 0x00000101 0x00001919>; + + phy-mode = "sgmii"; + phy-handle = <&phy0>; + + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "sgmii"; + qca,mib-poll-interval = <500>; + + qca,ar8327-initvals = < + 0x04 0x80080080 /* PORT0 PAD MODE CTRL */ + 0x08 0x00000000 /* PORT5 PAD MODE CTRL */ + 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */ + 0x10 0x00000080 /* POWER_ON_STRAP */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x00000200 /* PORT6_STATUS */ + >; + }; +}; + +&pcie { + status = "okay"; + + wifi@0,0 { + compatible = "pci168c,0046"; + reg = <0 0 0 0 0>; + + nvmem-cells = <&macaddr_info_8>, <&precal_art_5000>; + nvmem-cell-names = "mac-address", "pre-calibration"; + + mac-address-increment = <(-1)>; + }; +}; + +&spi { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + m25p,fast-read; + + mtdparts: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "factory-uboot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "u-boot"; + reg = <0x020000 0x020000>; + read-only; + }; + + partition@40000 { + label = "partition-table"; + reg = <0x040000 0x010000>; + read-only; + }; + + partition@50000 { + label = "art"; + reg = <0x050000 0x010000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + cal_art_1000: cal@1000 { + reg = <0x1000 0x440>; + }; + + precal_art_5000: precal@5000 { + reg = <0x5000 0x2f20>; + }; + }; + + partition@60000 { + label = "info"; + reg = <0x060000 0x020000>; + read-only; + + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; + }; + + partition@80000 { + label = "user-config"; + reg = <0x080000 0x040000>; + read-only; + }; + + partition@c0000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x0c0000 0xf00000>; + }; + + partition@fc0000 { + label = "log"; + reg = <0xfc0000 0x020000>; + read-only; + }; + + partition@fe0000 { + label = "certificate"; + reg = <0xfe0000 0x010000>; + read-only; + }; + + partition@ff0000 { + label = "default-config"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&wmac { + /* TODO: missing support in ath9k */ + status = "disabled"; + + nvmem-cells = <&cal_art_1000>, <&macaddr_info_8>; + nvmem-cell-names = "calibration", "mac-address"; +}; 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 20d71aeefc..8439b71724 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 @@ -48,6 +48,14 @@ alfa-network,r36a) ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" ucidef_set_led_switch "wan" "WAN" "blue:wan" "switch0" "0x10" ;; +alfa-network,tube-2hq) + ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0" + ucidef_set_rssimon "wlan0" "200000" "1" + ucidef_set_led_rssi "signal1" "SIGNAL1" "red:signal1" "wlan0" "1" "100" + ucidef_set_led_rssi "signal2" "SIGNAL2" "orange:signal2" "wlan0" "25" "100" + ucidef_set_led_rssi "signal3" "SIGNAL3" "green:signal3" "wlan0" "50" "100" + ucidef_set_led_rssi "signal4" "SIGNAL4" "green:signal4" "wlan0" "75" "100" + ;; asus,rp-ac66) ucidef_set_rssimon "wlan0" "200000" "1" ucidef_set_rssimon "wlan1" "200000" "1" @@ -317,6 +325,9 @@ tplink,archer-c7-v5) ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x10" ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x20" ;; +tplink,archer-a9-v6) + ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x02" + ;; tplink,archer-c2-v3|\ tplink,tl-wr1043nd-v4|\ tplink,tl-wr1043n-v5) 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 91b01e5e43..89f2caeb22 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 @@ -13,6 +13,7 @@ ath79_setup_interfaces() allnet,all-wap02860ac|\ alfa-network,ap121f|\ alfa-network,pi-wifi4|\ + alfa-network,tube-2hq|\ arduino,yun|\ aruba,ap-105|\ asus,rp-ac66|\ @@ -337,6 +338,7 @@ ath79_setup_interfaces() ;; mercury,mw4530r-v1|\ tplink,archer-a7-v5|\ + tplink,archer-a9-v6|\ tplink,archer-c6-v2|\ tplink,archer-c6-v2-us|\ tplink,archer-c7-v4|\ @@ -530,6 +532,7 @@ ath79_setup_macs() alfa-network,n5q|\ alfa-network,pi-wifi4|\ alfa-network,r36a|\ + alfa-network,tube-2hq|\ engenius,eap300-v2|\ engenius,ens202ext-v1) label_mac=$(mtd_get_mac_binary art 0x1002) @@ -690,6 +693,7 @@ ath79_setup_macs() label_mac=$lan_mac ;; tplink,archer-a7-v5|\ + tplink,archer-a9-v6|\ tplink,archer-c7-v4|\ tplink,archer-c7-v5|\ tplink,tl-wr1043nd-v4|\ diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index cc5e86e677..6536f90b37 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -12,6 +12,18 @@ define Device/tplink_archer-a7-v5 endef TARGET_DEVICES += tplink_archer-a7-v5 +define Device/tplink_archer-a9-v6 + $(Device/tplink-safeloader-uimage) + SOC := qcn5502 + IMAGE_SIZE := 15360k + DEVICE_MODEL := Archer A9 + DEVICE_VARIANT := v6 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct \ + ath10k-firmware-qca9984-ct + TPLINK_BOARD_ID := ARCHER-A9-V6 +endef +TARGET_DEVICES += tplink_archer-a9-v6 + define Device/tplink_archer-c2-v3 $(Device/tplink-safeloader-uimage) SOC := qca9563 diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 8550e8fb73..c63c4369c1 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -325,6 +325,16 @@ define Device/alfa-network_r36a endef TARGET_DEVICES += alfa-network_r36a +define Device/alfa-network_tube-2hq + SOC := qca9531 + DEVICE_VENDOR := ALFA Network + DEVICE_MODEL := Tube-2HQ + DEVICE_PACKAGES := rssileds -swconfig + IMAGE_SIZE := 15872k + SUPPORTED_DEVICES += tube-2hq +endef +TARGET_DEVICES += alfa-network_tube-2hq + define Device/allnet_all-wap02860ac $(Device/senao_loader_okli) SOC := qca9558 diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 2d7892db94..0cf8f331d5 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -305,20 +305,39 @@ define Device/netgear_wndr4500-v3 endef TARGET_DEVICES += netgear_wndr4500-v3 -define Device/zte_mf286 +define Device/zte_mf286_common SOC := qca9563 DEVICE_VENDOR := ZTE - DEVICE_MODEL := MF286 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct \ - ath10k-firmware-qca988x-ct kmod-usb-net-qmi-wwan kmod-usb-serial-option \ - uqmi + DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct BLOCKSIZE := 128k PAGESIZE := 2048 KERNEL_SIZE := 4096k IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata endef + +define Device/zte_mf286 + $(Device/zte_mf286_common) + DEVICE_MODEL := MF286 + DEVICE_PACKAGES += ath10k-firmware-qca988x-ct kmod-usb-net-qmi-wwan \ + kmod-usb-serial-option uqmi +endef TARGET_DEVICES += zte_mf286 +define Device/zte_mf286a + $(Device/zte_mf286_common) + DEVICE_MODEL := MF286A + DEVICE_PACKAGES += ath10k-firmware-qca9888-ct kmod-usb-net-qmi-wwan \ + kmod-usb-serial-option uqmi +endef +TARGET_DEVICES += zte_mf286a + +define Device/zte_mf286r + $(Device/zte_mf286_common) + DEVICE_MODEL := MF286R + DEVICE_PACKAGES += ath10k-firmware-qca9888-ct kmod-usb-net-rndis kmod-usb-acm +endef +TARGET_DEVICES += zte_mf286r + define Device/zyxel_nbg6716 SOC := qca9558 DEVICE_VENDOR := ZyXEL @@ -344,3 +363,10 @@ define Device/zyxel_nbg6716 UBINIZE_OPTS := -E 5 endef TARGET_DEVICES += zyxel_nbg6716 + +define Device/zyxel_emg2926_q10a + $(Device/zyxel_nbg6716) + DEVICE_MODEL := EMG2926-Q10A + RAS_BOARD := AAVK-EMG2926Q10A +endef +TARGET_DEVICES += zyxel_emg2926_q10a diff --git a/target/linux/ath79/nand/base-files/etc/board.d/02_network b/target/linux/ath79/nand/base-files/etc/board.d/02_network index e26a5e4ddf..417a881e5b 100644 --- a/target/linux/ath79/nand/base-files/etc/board.d/02_network +++ b/target/linux/ath79/nand/base-files/etc/board.d/02_network @@ -45,10 +45,13 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" ;; - zte,mf286) + zte,mf286|\ + zte,mf286a|\ + zte,mf286r) ucidef_add_switch "switch0" \ "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "5:lan:1" ;; + zyxel,emg2926-q10a|\ zyxel,nbg6716) ucidef_add_switch "switch0" \ "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth1" diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index d47e296853..e5c26d6bb5 100644 --- a/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -21,6 +21,7 @@ case "$FIRMWARE" in netgear,r6100) caldata_extract "caldata" 0x5000 0x844 ;; + zyxel,emg2926-q10a|\ zyxel,nbg6716) caldata_extract "art" 0x5000 0x844 ath10k_patch_mac $(macaddr_add $(mtd_get_mac_ascii u-boot-env ethaddr) 1) diff --git a/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac b/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac index 730a5f9943..20974248c1 100644 --- a/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac +++ b/target/linux/ath79/nand/base-files/etc/hotplug.d/ieee80211/10-fix-wifi-mac @@ -15,6 +15,7 @@ case $board in [ "$PHYNBR" -eq 0 ] && \ macaddr_add $(mtd_get_mac_binary art 0x0) 2 > /sys${DEVPATH}/macaddress ;; + zyxel,emg2926-q10a|\ zyxel,nbg6716) # Set mac address for 2.4g device [ "$PHYNBR" -eq 1 ] && \ diff --git a/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh index fdd8381f56..4e501496be 100644 --- a/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh +++ b/target/linux/ath79/nand/base-files/lib/preinit/10_fix_eth_mac.sh @@ -3,6 +3,7 @@ preinit_set_mac_address() { case $(board_name) in + zyxel,emg2926-q10a|\ zyxel,nbg6716) ethaddr=$(mtd_get_mac_ascii u-boot-env ethaddr) ip link set dev eth0 address $(macaddr_add $ethaddr 2) diff --git a/target/linux/bcm27xx/bcm2710/config-5.10 b/target/linux/bcm27xx/bcm2710/config-5.10 index 39c00762ba..6e26891070 100644 --- a/target/linux/bcm27xx/bcm2710/config-5.10 +++ b/target/linux/bcm27xx/bcm2710/config-5.10 @@ -37,8 +37,6 @@ CONFIG_ARM64_VA_BITS=39 CONFIG_ARM64_VA_BITS_39=y CONFIG_ARM64_VHE=y CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y -CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y -CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y CONFIG_ARM_AMBA=y CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y diff --git a/target/linux/bcm27xx/bcm2711/config-5.10 b/target/linux/bcm27xx/bcm2711/config-5.10 index ed095231ae..03d84378b3 100644 --- a/target/linux/bcm27xx/bcm2711/config-5.10 +++ b/target/linux/bcm27xx/bcm2711/config-5.10 @@ -37,8 +37,6 @@ CONFIG_ARM64_VA_BITS=39 CONFIG_ARM64_VA_BITS_39=y CONFIG_ARM64_VHE=y CONFIG_ARM64_WORKAROUND_CLEAN_CACHE=y -CONFIG_ARM64_WORKAROUND_REPEAT_TLBI=y -CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT=y CONFIG_ARM_AMBA=y CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y diff --git a/target/linux/bcm4908/patches-5.10/088-v5.18-phy-phy-brcm-usb-fixup-BCM4908-support.patch b/target/linux/bcm4908/patches-5.10/088-v5.18-phy-phy-brcm-usb-fixup-BCM4908-support.patch new file mode 100644 index 0000000000..a9568bcbba --- /dev/null +++ b/target/linux/bcm4908/patches-5.10/088-v5.18-phy-phy-brcm-usb-fixup-BCM4908-support.patch @@ -0,0 +1,147 @@ +From 32942d33d63d27714ed16a4176e5a99547adb6e0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 18 Feb 2022 18:24:59 +0100 +Subject: [PATCH] phy: phy-brcm-usb: fixup BCM4908 support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Just like every other family BCM4908 should get its own enum value. That +is required to properly handle it in chipset conditional code. + +The real change is excluding BCM4908 from the PLL reprogramming code +(see brcmusb_usb3_pll_54mhz()). I'm not sure what's the BCM4908 +reference clock frequency but: +1. BCM4908 custom driver from Broadcom's SDK doesn't reprogram PLL +2. Doing that in Linux driver stopped PHY handling some USB 3.0 devices + +This change makes USB 3.0 PHY recognize e.g.: +1. 04e8:6860 - Samsung Electronics Co., Ltd Galaxy series, misc. (MTP mode) +2. 1058:259f - Western Digital My Passport 259F + +Broadcom's STB SoCs come with a set of SUN_TOP_CTRL_* registers that +allow reading chip family and product ids. Such a block & register is +missing on BCM4908 so this commit introduces "compatible" string +specific binding. + +Fixes: 4b402fa8e0b7 ("phy: phy-brcm-usb: support PHY on the BCM4908") +Signed-off-by: RafaÅ‚ MiÅ‚ecki +Reviewed-by: Florian Fainelli +Link: https://lore.kernel.org/r/20220218172459.10431-1-zajec5@gmail.com +Signed-off-by: Vinod Koul +--- + drivers/phy/broadcom/phy-brcm-usb-init.c | 36 ++++++++++++++++++++++++ + drivers/phy/broadcom/phy-brcm-usb-init.h | 1 + + drivers/phy/broadcom/phy-brcm-usb.c | 11 +++++++- + 3 files changed, 47 insertions(+), 1 deletion(-) + +--- a/drivers/phy/broadcom/phy-brcm-usb-init.c ++++ b/drivers/phy/broadcom/phy-brcm-usb-init.c +@@ -79,6 +79,7 @@ + + enum brcm_family_type { + BRCM_FAMILY_3390A0, ++ BRCM_FAMILY_4908, + BRCM_FAMILY_7250B0, + BRCM_FAMILY_7271A0, + BRCM_FAMILY_7364A0, +@@ -96,6 +97,7 @@ enum brcm_family_type { + + static const char *family_names[BRCM_FAMILY_COUNT] = { + USB_BRCM_FAMILY(3390A0), ++ USB_BRCM_FAMILY(4908), + USB_BRCM_FAMILY(7250B0), + USB_BRCM_FAMILY(7271A0), + USB_BRCM_FAMILY(7364A0), +@@ -203,6 +205,27 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT + USB_CTRL_USB_PM_USB20_HC_RESETB_VAR_MASK, + ENDIAN_SETTINGS, /* USB_CTRL_SETUP ENDIAN bits */ + }, ++ /* 4908 */ ++ [BRCM_FAMILY_4908] = { ++ 0, /* USB_CTRL_SETUP_SCB1_EN_MASK */ ++ 0, /* USB_CTRL_SETUP_SCB2_EN_MASK */ ++ 0, /* USB_CTRL_SETUP_SS_EHCI64BIT_EN_MASK */ ++ 0, /* USB_CTRL_SETUP_STRAP_IPP_SEL_MASK */ ++ 0, /* USB_CTRL_SETUP_OC3_DISABLE_MASK */ ++ 0, /* USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK */ ++ 0, /* USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK */ ++ USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK, ++ USB_CTRL_USB_PM_USB_PWRDN_MASK, ++ 0, /* USB_CTRL_USB30_CTL1_XHC_SOFT_RESETB_MASK */ ++ 0, /* USB_CTRL_USB30_CTL1_USB3_IOC_MASK */ ++ 0, /* USB_CTRL_USB30_CTL1_USB3_IPP_MASK */ ++ 0, /* USB_CTRL_USB_DEVICE_CTL1_PORT_MODE_MASK */ ++ 0, /* USB_CTRL_USB_PM_SOFT_RESET_MASK */ ++ 0, /* USB_CTRL_SETUP_CC_DRD_MODE_ENABLE_MASK */ ++ 0, /* USB_CTRL_SETUP_STRAP_CC_DRD_MODE_ENABLE_SEL_MASK */ ++ 0, /* USB_CTRL_USB_PM_USB20_HC_RESETB_VAR_MASK */ ++ 0, /* USB_CTRL_SETUP ENDIAN bits */ ++ }, + /* 7250b0 */ + [BRCM_FAMILY_7250B0] = { + USB_CTRL_SETUP_SCB1_EN_MASK, +@@ -559,6 +582,7 @@ static void brcmusb_usb3_pll_54mhz(struc + */ + switch (params->selected_family) { + case BRCM_FAMILY_3390A0: ++ case BRCM_FAMILY_4908: + case BRCM_FAMILY_7250B0: + case BRCM_FAMILY_7366C0: + case BRCM_FAMILY_74371A0: +@@ -1004,6 +1028,18 @@ static const struct brcm_usb_init_ops bc + .set_dual_select = usb_set_dual_select, + }; + ++void brcm_usb_dvr_init_4908(struct brcm_usb_init_params *params) ++{ ++ int fam; ++ ++ fam = BRCM_FAMILY_4908; ++ params->selected_family = fam; ++ params->usb_reg_bits_map = ++ &usb_reg_bits_map_table[fam][0]; ++ params->family_name = family_names[fam]; ++ params->ops = &bcm7445_ops; ++} ++ + void brcm_usb_dvr_init_7445(struct brcm_usb_init_params *params) + { + int fam; +--- a/drivers/phy/broadcom/phy-brcm-usb-init.h ++++ b/drivers/phy/broadcom/phy-brcm-usb-init.h +@@ -64,6 +64,7 @@ struct brcm_usb_init_params { + bool suspend_with_clocks; + }; + ++void brcm_usb_dvr_init_4908(struct brcm_usb_init_params *params); + void brcm_usb_dvr_init_7445(struct brcm_usb_init_params *params); + void brcm_usb_dvr_init_7216(struct brcm_usb_init_params *params); + void brcm_usb_dvr_init_7211b0(struct brcm_usb_init_params *params); +--- a/drivers/phy/broadcom/phy-brcm-usb.c ++++ b/drivers/phy/broadcom/phy-brcm-usb.c +@@ -253,6 +253,15 @@ static const struct attribute_group brcm + .attrs = brcm_usb_phy_attrs, + }; + ++static const struct match_chip_info chip_info_4908 = { ++ .init_func = &brcm_usb_dvr_init_4908, ++ .required_regs = { ++ BRCM_REGS_CTRL, ++ BRCM_REGS_XHCI_EC, ++ -1, ++ }, ++}; ++ + static const struct match_chip_info chip_info_7216 = { + .init_func = &brcm_usb_dvr_init_7216, + .required_regs = { +@@ -288,7 +297,7 @@ static const struct match_chip_info chip + static const struct of_device_id brcm_usb_dt_ids[] = { + { + .compatible = "brcm,bcm4908-usb-phy", +- .data = &chip_info_7445, ++ .data = &chip_info_4908, + }, + { + .compatible = "brcm,bcm7216-usb-phy", diff --git a/target/linux/bcm4908/patches-5.4/088-v5.18-phy-phy-brcm-usb-fixup-BCM4908-support.patch b/target/linux/bcm4908/patches-5.4/088-v5.18-phy-phy-brcm-usb-fixup-BCM4908-support.patch new file mode 100644 index 0000000000..a9568bcbba --- /dev/null +++ b/target/linux/bcm4908/patches-5.4/088-v5.18-phy-phy-brcm-usb-fixup-BCM4908-support.patch @@ -0,0 +1,147 @@ +From 32942d33d63d27714ed16a4176e5a99547adb6e0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= +Date: Fri, 18 Feb 2022 18:24:59 +0100 +Subject: [PATCH] phy: phy-brcm-usb: fixup BCM4908 support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Just like every other family BCM4908 should get its own enum value. That +is required to properly handle it in chipset conditional code. + +The real change is excluding BCM4908 from the PLL reprogramming code +(see brcmusb_usb3_pll_54mhz()). I'm not sure what's the BCM4908 +reference clock frequency but: +1. BCM4908 custom driver from Broadcom's SDK doesn't reprogram PLL +2. Doing that in Linux driver stopped PHY handling some USB 3.0 devices + +This change makes USB 3.0 PHY recognize e.g.: +1. 04e8:6860 - Samsung Electronics Co., Ltd Galaxy series, misc. (MTP mode) +2. 1058:259f - Western Digital My Passport 259F + +Broadcom's STB SoCs come with a set of SUN_TOP_CTRL_* registers that +allow reading chip family and product ids. Such a block & register is +missing on BCM4908 so this commit introduces "compatible" string +specific binding. + +Fixes: 4b402fa8e0b7 ("phy: phy-brcm-usb: support PHY on the BCM4908") +Signed-off-by: RafaÅ‚ MiÅ‚ecki +Reviewed-by: Florian Fainelli +Link: https://lore.kernel.org/r/20220218172459.10431-1-zajec5@gmail.com +Signed-off-by: Vinod Koul +--- + drivers/phy/broadcom/phy-brcm-usb-init.c | 36 ++++++++++++++++++++++++ + drivers/phy/broadcom/phy-brcm-usb-init.h | 1 + + drivers/phy/broadcom/phy-brcm-usb.c | 11 +++++++- + 3 files changed, 47 insertions(+), 1 deletion(-) + +--- a/drivers/phy/broadcom/phy-brcm-usb-init.c ++++ b/drivers/phy/broadcom/phy-brcm-usb-init.c +@@ -79,6 +79,7 @@ + + enum brcm_family_type { + BRCM_FAMILY_3390A0, ++ BRCM_FAMILY_4908, + BRCM_FAMILY_7250B0, + BRCM_FAMILY_7271A0, + BRCM_FAMILY_7364A0, +@@ -96,6 +97,7 @@ enum brcm_family_type { + + static const char *family_names[BRCM_FAMILY_COUNT] = { + USB_BRCM_FAMILY(3390A0), ++ USB_BRCM_FAMILY(4908), + USB_BRCM_FAMILY(7250B0), + USB_BRCM_FAMILY(7271A0), + USB_BRCM_FAMILY(7364A0), +@@ -203,6 +205,27 @@ usb_reg_bits_map_table[BRCM_FAMILY_COUNT + USB_CTRL_USB_PM_USB20_HC_RESETB_VAR_MASK, + ENDIAN_SETTINGS, /* USB_CTRL_SETUP ENDIAN bits */ + }, ++ /* 4908 */ ++ [BRCM_FAMILY_4908] = { ++ 0, /* USB_CTRL_SETUP_SCB1_EN_MASK */ ++ 0, /* USB_CTRL_SETUP_SCB2_EN_MASK */ ++ 0, /* USB_CTRL_SETUP_SS_EHCI64BIT_EN_MASK */ ++ 0, /* USB_CTRL_SETUP_STRAP_IPP_SEL_MASK */ ++ 0, /* USB_CTRL_SETUP_OC3_DISABLE_MASK */ ++ 0, /* USB_CTRL_PLL_CTL_PLL_IDDQ_PWRDN_MASK */ ++ 0, /* USB_CTRL_USB_PM_BDC_SOFT_RESETB_MASK */ ++ USB_CTRL_USB_PM_XHC_SOFT_RESETB_MASK, ++ USB_CTRL_USB_PM_USB_PWRDN_MASK, ++ 0, /* USB_CTRL_USB30_CTL1_XHC_SOFT_RESETB_MASK */ ++ 0, /* USB_CTRL_USB30_CTL1_USB3_IOC_MASK */ ++ 0, /* USB_CTRL_USB30_CTL1_USB3_IPP_MASK */ ++ 0, /* USB_CTRL_USB_DEVICE_CTL1_PORT_MODE_MASK */ ++ 0, /* USB_CTRL_USB_PM_SOFT_RESET_MASK */ ++ 0, /* USB_CTRL_SETUP_CC_DRD_MODE_ENABLE_MASK */ ++ 0, /* USB_CTRL_SETUP_STRAP_CC_DRD_MODE_ENABLE_SEL_MASK */ ++ 0, /* USB_CTRL_USB_PM_USB20_HC_RESETB_VAR_MASK */ ++ 0, /* USB_CTRL_SETUP ENDIAN bits */ ++ }, + /* 7250b0 */ + [BRCM_FAMILY_7250B0] = { + USB_CTRL_SETUP_SCB1_EN_MASK, +@@ -559,6 +582,7 @@ static void brcmusb_usb3_pll_54mhz(struc + */ + switch (params->selected_family) { + case BRCM_FAMILY_3390A0: ++ case BRCM_FAMILY_4908: + case BRCM_FAMILY_7250B0: + case BRCM_FAMILY_7366C0: + case BRCM_FAMILY_74371A0: +@@ -1004,6 +1028,18 @@ static const struct brcm_usb_init_ops bc + .set_dual_select = usb_set_dual_select, + }; + ++void brcm_usb_dvr_init_4908(struct brcm_usb_init_params *params) ++{ ++ int fam; ++ ++ fam = BRCM_FAMILY_4908; ++ params->selected_family = fam; ++ params->usb_reg_bits_map = ++ &usb_reg_bits_map_table[fam][0]; ++ params->family_name = family_names[fam]; ++ params->ops = &bcm7445_ops; ++} ++ + void brcm_usb_dvr_init_7445(struct brcm_usb_init_params *params) + { + int fam; +--- a/drivers/phy/broadcom/phy-brcm-usb-init.h ++++ b/drivers/phy/broadcom/phy-brcm-usb-init.h +@@ -64,6 +64,7 @@ struct brcm_usb_init_params { + bool suspend_with_clocks; + }; + ++void brcm_usb_dvr_init_4908(struct brcm_usb_init_params *params); + void brcm_usb_dvr_init_7445(struct brcm_usb_init_params *params); + void brcm_usb_dvr_init_7216(struct brcm_usb_init_params *params); + void brcm_usb_dvr_init_7211b0(struct brcm_usb_init_params *params); +--- a/drivers/phy/broadcom/phy-brcm-usb.c ++++ b/drivers/phy/broadcom/phy-brcm-usb.c +@@ -253,6 +253,15 @@ static const struct attribute_group brcm + .attrs = brcm_usb_phy_attrs, + }; + ++static const struct match_chip_info chip_info_4908 = { ++ .init_func = &brcm_usb_dvr_init_4908, ++ .required_regs = { ++ BRCM_REGS_CTRL, ++ BRCM_REGS_XHCI_EC, ++ -1, ++ }, ++}; ++ + static const struct match_chip_info chip_info_7216 = { + .init_func = &brcm_usb_dvr_init_7216, + .required_regs = { +@@ -288,7 +297,7 @@ static const struct match_chip_info chip + static const struct of_device_id brcm_usb_dt_ids[] = { + { + .compatible = "brcm,bcm4908-usb-phy", +- .data = &chip_info_7445, ++ .data = &chip_info_4908, + }, + { + .compatible = "brcm,bcm7216-usb-phy", diff --git a/target/linux/bcm63xx/Makefile b/target/linux/bcm63xx/Makefile index 23e43f601a..289b55b762 100644 --- a/target/linux/bcm63xx/Makefile +++ b/target/linux/bcm63xx/Makefile @@ -10,8 +10,8 @@ BOARD:=bcm63xx BOARDNAME:=Broadcom BCM63xx SUBTARGETS:=generic smp FEATURES:=squashfs usb atm pci pcmcia usbgadget -KERNEL_PATCHVER:=5.4 -KERNEL_TESTING_PATCHVER:=5.10 + +KERNEL_PATCHVER:=5.10 define Target/Description Build firmware images for Broadcom based xDSL/routers diff --git a/target/linux/bcm63xx/base-files/etc/board.d/02_network b/target/linux/bcm63xx/base-files/etc/board.d/02_network index c594a9265f..b48aa57d2e 100644 --- a/target/linux/bcm63xx/base-files/etc/board.d/02_network +++ b/target/linux/bcm63xx/base-files/etc/board.d/02_network @@ -100,8 +100,7 @@ huawei,echolife-hg556a-c) ;; comtrend,ar-5315u|\ innacomm,w3400v6|\ -observa,vh4032n|\ -sagem,fast-2704n) +observa,vh4032n) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "8t@eth0" ;; @@ -141,6 +140,7 @@ netgear,dgnd3700-v1) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "8t@eth0" ;; +sagem,fast-2704n|\ sercomm,ad1018|\ sercomm,ad1018-nor) ucidef_add_switch "switch0" \ diff --git a/target/linux/bcm63xx/patches-5.10/100-macronix_nand_block_protection_support.patch b/target/linux/bcm63xx/patches-5.10/100-macronix_nand_block_protection_support.patch new file mode 100644 index 0000000000..cee69dd8c6 --- /dev/null +++ b/target/linux/bcm63xx/patches-5.10/100-macronix_nand_block_protection_support.patch @@ -0,0 +1,18 @@ +bcm63xx: fix booting with Kernel 5.10 + +This is a workaround to make the target overall bootable. With this more +people should be able to test the Kernel 5.10 and report further issues. + +Suggested-by: Daniel González Cabanelas +Signed-off-by: Paul Spooren +--- a/drivers/mtd/nand/raw/nand_macronix.c ++++ b/drivers/mtd/nand/raw/nand_macronix.c +@@ -323,7 +323,7 @@ static int macronix_nand_init(struct nan + + macronix_nand_fix_broken_get_timings(chip); + macronix_nand_onfi_init(chip); +- macronix_nand_block_protection_support(chip); ++ //macronix_nand_block_protection_support(chip); + macronix_nand_deep_power_down_support(chip); + + return 0; diff --git a/target/linux/generic/backport-5.10/870-hwmon-next-hwmon-lm70-Add-ti-tmp125-support.patch b/target/linux/generic/backport-5.10/870-hwmon-next-hwmon-lm70-Add-ti-tmp125-support.patch new file mode 100644 index 0000000000..fabf177628 --- /dev/null +++ b/target/linux/generic/backport-5.10/870-hwmon-next-hwmon-lm70-Add-ti-tmp125-support.patch @@ -0,0 +1,71 @@ +From 31d8f414e1596ba54a4315418e4c0086fda9e428 Mon Sep 17 00:00:00 2001 +From: Christian Lamparter +Date: Fri, 18 Feb 2022 10:06:43 +0100 +Subject: hwmon: (lm70) Add ti,tmp125 support + +The TMP125 is a 2 degree Celsius accurate Digital +Temperature Sensor with a SPI interface. + +The temperature register is a 16-bit, read-only register. +The MSB (Bit 15) is a leading zero and never set. Bits 14 +to 5 are the 1+9 temperature data bits in a two's +complement format. Bits 4 to 0 are useless copies of +Bit 5 value and therefore ignored. + +Signed-off-by: Christian Lamparter +Link: https://lore.kernel.org/r/43b19cbd4e7f51e9509e561b02b5d8d0e7079fac.1645175187.git.chunkeey@gmail.com +Signed-off-by: Guenter Roeck +--- +--- a/drivers/hwmon/lm70.c ++++ b/drivers/hwmon/lm70.c +@@ -34,6 +34,7 @@ + #define LM70_CHIP_LM71 2 /* NS LM71 */ + #define LM70_CHIP_LM74 3 /* NS LM74 */ + #define LM70_CHIP_TMP122 4 /* TI TMP122/TMP124 */ ++#define LM70_CHIP_TMP125 5 /* TI TMP125 */ + + struct lm70 { + struct spi_device *spi; +@@ -87,6 +88,12 @@ static ssize_t temp1_input_show(struct d + * LM71: + * 14 bits of 2's complement data, discard LSB 2 bits, + * resolution 0.0312 degrees celsius. ++ * ++ * TMP125: ++ * MSB/D15 is a leading zero. D14 is the sign-bit. This is ++ * followed by 9 temperature bits (D13..D5) in 2's complement ++ * data format with a resolution of 0.25 degrees celsius per unit. ++ * LSB 5 bits (D4..D0) share the same value as D5 and get discarded. + */ + switch (p_lm70->chip) { + case LM70_CHIP_LM70: +@@ -102,6 +109,10 @@ static ssize_t temp1_input_show(struct d + case LM70_CHIP_LM71: + val = ((int)raw / 4) * 3125 / 100; + break; ++ ++ case LM70_CHIP_TMP125: ++ val = (sign_extend32(raw, 14) / 32) * 250; ++ break; + } + + status = sprintf(buf, "%d\n", val); /* millidegrees Celsius */ +@@ -136,6 +147,10 @@ static const struct of_device_id lm70_of + .data = (void *) LM70_CHIP_TMP122, + }, + { ++ .compatible = "ti,tmp125", ++ .data = (void *) LM70_CHIP_TMP125, ++ }, ++ { + .compatible = "ti,lm71", + .data = (void *) LM70_CHIP_LM71, + }, +@@ -184,6 +199,7 @@ static const struct spi_device_id lm70_i + { "lm70", LM70_CHIP_LM70 }, + { "tmp121", LM70_CHIP_TMP121 }, + { "tmp122", LM70_CHIP_TMP122 }, ++ { "tmp125", LM70_CHIP_TMP125 }, + { "lm71", LM70_CHIP_LM71 }, + { "lm74", LM70_CHIP_LM74 }, + { }, diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10 index d5b259c2c8..e200435506 100644 --- a/target/linux/generic/config-5.10 +++ b/target/linux/generic/config-5.10 @@ -414,6 +414,7 @@ CONFIG_ARM_GIC_MAX_NR=1 # CONFIG_AS3935 is not set # CONFIG_AS73211 is not set # CONFIG_ASM9260_TIMER is not set +# CONFIG_ASN1 is not set # CONFIG_ASUS_LAPTOP is not set # CONFIG_ASUS_WIRELESS is not set # CONFIG_ASYMMETRIC_KEY_TYPE is not set @@ -1329,8 +1330,10 @@ CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_WX is not set # CONFIG_DEBUG_ZBOOT is not set # CONFIG_DECNET is not set +# CONFIG_DEFAULT_CODEL is not set CONFIG_DEFAULT_CUBIC=y CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_FQ is not set CONFIG_DEFAULT_FQ_CODEL=y CONFIG_DEFAULT_HOSTNAME="(none)" CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 @@ -1343,6 +1346,7 @@ CONFIG_DEFAULT_NET_SCH="fq_codel" CONFIG_DEFAULT_SECURITY="" CONFIG_DEFAULT_SECURITY_DAC=y # CONFIG_DEFAULT_SECURITY_SELINUX is not set +# CONFIG_DEFAULT_SFQ is not set CONFIG_DEFAULT_TCP_CONG="cubic" CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # CONFIG_DEFERRED_STRUCT_PAGE_INIT is not set @@ -3613,6 +3617,7 @@ CONFIG_MTD_NAND_IDS=y # CONFIG_MTD_NAND_JZ4740 is not set # CONFIG_MTD_NAND_MPC5121_NFC is not set # CONFIG_MTD_NAND_MTK is not set +# CONFIG_MTD_NAND_MTK_BMT is not set # CONFIG_MTD_NAND_MXC is not set # CONFIG_MTD_NAND_MXIC is not set # CONFIG_MTD_NAND_NANDSIM is not set @@ -3698,7 +3703,6 @@ CONFIG_MTD_SPLIT_SUPPORT=y # CONFIG_MTD_UBI_GLUEBI is not set # CONFIG_MTD_UIMAGE_SPLIT is not set # CONFIG_MTD_VIRT_CONCAT is not set -# CONFIG_MTD_NAND_MTK_BMT is not set # CONFIG_MTK_MMC is not set # CONFIG_MTK_MMSYS is not set # CONFIG_MULTIPLEXER is not set @@ -4610,14 +4614,14 @@ CONFIG_PROC_SYSCTL=y # CONFIG_PSB6970_PHY is not set # CONFIG_PSI is not set # CONFIG_PSTORE is not set +# CONFIG_PSTORE_842_COMPRESS is not set # CONFIG_PSTORE_COMPRESS is not set # CONFIG_PSTORE_COMPRESS_DEFAULT="deflate" # CONFIG_PSTORE_CONSOLE is not set # CONFIG_PSTORE_DEFLATE_COMPRESS is not set # CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT is not set -# CONFIG_PSTORE_842_COMPRESS is not set -# CONFIG_PSTORE_LZ4_COMPRESS is not set # CONFIG_PSTORE_LZ4HC_COMPRESS is not set +# CONFIG_PSTORE_LZ4_COMPRESS is not set # CONFIG_PSTORE_LZO_COMPRESS is not set # CONFIG_PSTORE_PMSG is not set # CONFIG_PSTORE_RAM is not set diff --git a/target/linux/generic/config-5.4 b/target/linux/generic/config-5.4 index 557f46e7df..f10f97d83e 100644 --- a/target/linux/generic/config-5.4 +++ b/target/linux/generic/config-5.4 @@ -1507,6 +1507,7 @@ CONFIG_DUMMY_CONSOLE_ROWS=25 # CONFIG_EEPROM_MAX6875 is not set # CONFIG_EFI is not set CONFIG_EFI_PARTITION=y +# CONFIG_EFI_VARS_PSTORE is not set # CONFIG_EFS_FS is not set CONFIG_ELFCORE=y # CONFIG_ELF_CORE is not set @@ -4221,6 +4222,17 @@ CONFIG_PROC_SYSCTL=y # CONFIG_PSB6970_PHY is not set # CONFIG_PSI is not set # CONFIG_PSTORE is not set +# CONFIG_PSTORE_842_COMPRESS is not set +# CONFIG_PSTORE_COMPRESS is not set +# CONFIG_PSTORE_CONSOLE is not set +# CONFIG_PSTORE_DEFLATE_COMPRESS is not set +# CONFIG_PSTORE_DEFLATE_COMPRESS_DEFAULT is not set +# CONFIG_PSTORE_LZ4HC_COMPRESS is not set +# CONFIG_PSTORE_LZ4_COMPRESS is not set +# CONFIG_PSTORE_LZO_COMPRESS is not set +# CONFIG_PSTORE_PMSG is not set +# CONFIG_PSTORE_RAM is not set +# CONFIG_PSTORE_ZSTD_COMPRESS is not set # CONFIG_PTP_1588_CLOCK is not set # CONFIG_PTP_1588_CLOCK_IXP46X is not set # CONFIG_PTP_1588_CLOCK_KVM is not set @@ -4319,6 +4331,9 @@ CONFIG_RCU_TORTURE_TEST_SLOW_INIT_DELAY=3 # CONFIG_READ_ONLY_THP_FOR_FS is not set # CONFIG_REALTEK_PHY is not set # CONFIG_REDWOOD is not set +# CONFIG_REED_SOLOMON is not set +# CONFIG_REED_SOLOMON_DEC8 is not set +# CONFIG_REED_SOLOMON_ENC8 is not set # CONFIG_REED_SOLOMON_TEST is not set # CONFIG_REFCOUNT_FULL is not set # CONFIG_REGMAP is not set diff --git a/target/linux/ipq806x/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/ipq806x/base-files/etc/uci-defaults/05_fix-compat-version new file mode 100644 index 0000000000..3b9dd4e028 --- /dev/null +++ b/target/linux/ipq806x/base-files/etc/uci-defaults/05_fix-compat-version @@ -0,0 +1,11 @@ +. /lib/functions.sh + +case "$(board_name)" in + linksys,ea7500-v1|\ + linksys,ea8500) + uci set system.@system[0].compat_version="2.0" + uci commit system + ;; +esac + +exit 0 diff --git a/target/linux/ipq806x/base-files/lib/upgrade/asrock.sh b/target/linux/ipq806x/base-files/lib/upgrade/asrock.sh index 9645b64671..b98eab33b2 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/asrock.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/asrock.sh @@ -1,4 +1,4 @@ -. /lib/functions.sh +. "$IPKG_INSTROOT/lib/functions.sh" asrock_bootconfig_mangle() { local mtdnum="$(find_mtd_index 0:bootconfig)" diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi index 98c4b2d29d..955ad97e3a 100644 --- a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi +++ b/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi @@ -133,12 +133,12 @@ partition@f80000 { label = "kernel1"; - reg = <0x0f80000 0x2800000>; /* 3 MB spill to rootfs */ + reg = <0x0f80000 0x2800000>; /* 4 MB, spill to rootfs */ }; - partition@1280000 { + partition@1380000 { label = "rootfs1"; - reg = <0x1280000 0x2500000>; + reg = <0x1380000 0x2400000>; }; partition@3780000 { @@ -146,9 +146,9 @@ reg = <0x3780000 0x2800000>; }; - partition@3a80000 { + partition@3b80000 { label = "rootfs2"; - reg = <0x3a80000 0x2500000>; + reg = <0x3b80000 0x2400000>; }; }; }; diff --git a/target/linux/ipq806x/image/generic.mk b/target/linux/ipq806x/image/generic.mk index 9e733d921a..11592ad97e 100644 --- a/target/linux/ipq806x/image/generic.mk +++ b/target/linux/ipq806x/image/generic.mk @@ -1,6 +1,13 @@ DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID DEVICE_VARS += TPLINK_BOARD_ID +define Device/kernel-size-migration + DEVICE_COMPAT_VERSION := 2.0 + DEVICE_COMPAT_MESSAGE := *** Kernel partition size has changed from earlier \ + versions. You need to sysupgrade with the OpenWrt factory image and \ + use the force flag when image check fails. Settings will be lost. *** +endef + define Build/buffalo-rootfs-cksum ( \ echo -ne "\x$$(od -A n -t u1 $@ | tr -s ' ' '\n' | \ @@ -128,13 +135,14 @@ TARGET_DEVICES += edgecore_ecw5410 define Device/linksys_ea7500-v1 $(call Device/LegacyImage) + $(Device/kernel-size-migration) DEVICE_VENDOR := Linksys DEVICE_MODEL := EA7500 DEVICE_VARIANT := v1 SOC := qcom-ipq8064 PAGESIZE := 2048 BLOCKSIZE := 128k - KERNEL_SIZE := 3072k + KERNEL_SIZE := 4096k KERNEL = kernel-bin | append-dtb | uImage none | \ append-uImage-fakehdr filesystem UBINIZE_OPTS := -E 5 @@ -142,18 +150,18 @@ define Device/linksys_ea7500-v1 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \ append-ubi | pad-to $$$$(PAGESIZE) DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct - DEFAULT := n endef TARGET_DEVICES += linksys_ea7500-v1 define Device/linksys_ea8500 $(call Device/LegacyImage) + $(Device/kernel-size-migration) DEVICE_VENDOR := Linksys DEVICE_MODEL := EA8500 SOC := qcom-ipq8064 PAGESIZE := 2048 BLOCKSIZE := 128k - KERNEL_SIZE := 3072k + KERNEL_SIZE := 4096k KERNEL = kernel-bin | append-dtb | uImage none | \ append-uImage-fakehdr filesystem BOARD_NAME := ea8500 @@ -163,7 +171,6 @@ define Device/linksys_ea8500 IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | \ append-ubi DEVICE_PACKAGES := ath10k-firmware-qca99x0-ct - DEFAULT := n endef TARGET_DEVICES += linksys_ea8500 diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts index bb2f2d0827..ccf60eaeed 100644 --- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts +++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/hiveap-330.dts @@ -24,6 +24,7 @@ led-running = &led_power_green; led-upgrade = &led_fault_red; label-mac-device = &enet0; + spi0 = &spi0; }; memory { @@ -113,6 +114,14 @@ board_soc: soc: soc@ffe00000 { ranges = <0x0 0x0 0xffe00000 0x100000>; + spi0: spi@7000 { + temperature-sensor@1 { + compatible = "ti,tmp125"; + reg = <1>; + spi-max-frequency = <5000000>; + }; + }; + i2c@3100 { tpm@29 { compatible = "atmel,at97sc3204t"; diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk index a50b489df1..64cad1ad9c 100644 --- a/target/linux/mpc85xx/image/p1020.mk +++ b/target/linux/mpc85xx/image/p1020.mk @@ -15,7 +15,7 @@ define Device/aerohive_hiveap-330 DEVICE_MODEL := HiveAP-330 DEVICE_ALT0_VENDOR := Aerohive DEVICE_ALT0_MODEL := HiveAP-350 - DEVICE_PACKAGES := kmod-tpm-i2c-atmel + DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-hwmon-lm70 BLOCKSIZE := 128k KERNEL := kernel-bin | uImage none KERNEL_INITRAMFS := kernel-bin | MultiImage none diff --git a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi index 4991897ca4..f86ac1a88a 100644 --- a/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi +++ b/target/linux/ramips/dts/mt7620a_zbtlink_zbt-we1026-5g.dtsi @@ -26,6 +26,14 @@ gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; }; }; + + watchdog { + compatible = "linux,wdt-gpio"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + hw_algo = "toggle"; + hw_margin_ms = <20000>; + always-running; + }; }; &pcie { diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 17262ffca4..c1f6ea3505 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -465,7 +465,7 @@ mediatek,ethsys = <&sysc>; pinctrl-names = "default"; - pinctrl-0 = <&rgmii1_pins &mdio_pins>; + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>, <&rgmii2_pins>; gmac0: mac@0 { compatible = "mediatek,eth-mac"; @@ -492,8 +492,6 @@ switch0: switch@1f { compatible = "mediatek,mt7621"; - #address-cells = <1>; - #size-cells = <0>; reg = <0x1f>; mediatek,mcm; resets = <&rstctrl 2>; @@ -505,7 +503,6 @@ ports { #address-cells = <1>; #size-cells = <0>; - reg = <0>; port@0 { status = "disabled"; @@ -546,6 +543,7 @@ fixed-link { speed = <1000>; full-duplex; + pause; }; }; }; diff --git a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts index 8c6fdab04f..cc048d4487 100644 --- a/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts +++ b/target/linux/ramips/dts/mt7621_alfa-network_quad-e4g.dts @@ -147,6 +147,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts index f9211463f8..74d8fbe1d1 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-1166dhp.dts @@ -152,6 +152,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &switch0 { ports { port@0 { diff --git a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts index 5d20b6e28a..0f3b0fd8f0 100644 --- a/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts +++ b/target/linux/ramips/dts/mt7621_buffalo_wsr-600dhp.dts @@ -172,6 +172,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts index d30e4d1953..03b593e093 100644 --- a/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts +++ b/target/linux/ramips/dts/mt7621_d-team_pbr-m1.dts @@ -174,6 +174,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts index 9da515f017..46954b616f 100644 --- a/target/linux/ramips/dts/mt7621_firefly_firewrt.dts +++ b/target/linux/ramips/dts/mt7621_firefly_firewrt.dts @@ -104,6 +104,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts index db760381a4..6854d56266 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc1.dts @@ -99,6 +99,10 @@ status = "okay"; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts index a3ef3a0104..de113c2a5a 100644 --- a/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts +++ b/target/linux/ramips/dts/mt7621_gnubee_gb-pc2.dts @@ -109,6 +109,10 @@ status = "okay"; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts index 73dfbef27f..43cf502b0b 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_ap-mt7621a-v60.dts @@ -112,6 +112,10 @@ status = "okay"; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_5>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts index c86eea0de5..ce627d6621 100644 --- a/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts +++ b/target/linux/ramips/dts/mt7621_mediatek_mt7621-eval-board.dts @@ -39,6 +39,10 @@ status = "okay"; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &switch0 { ports { port@0 { diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts index 20a834a3eb..eacbbda54d 100644 --- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts +++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-m11g.dts @@ -66,6 +66,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &switch0 { ports { port@0 { diff --git a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts index b1b020b3a8..0f45743d6f 100644 --- a/target/linux/ramips/dts/mt7621_mtc_wr1201.dts +++ b/target/linux/ramips/dts/mt7621_mtc_wr1201.dts @@ -98,6 +98,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts index 360bcbb77d..1695e9c845 100644 --- a/target/linux/ramips/dts/mt7621_netgear_ex6150.dts +++ b/target/linux/ramips/dts/mt7621_netgear_ex6150.dts @@ -227,6 +227,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_4>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_sercomm_na502.dts b/target/linux/ramips/dts/mt7621_sercomm_na502.dts index ee77e30362..9ec4cf7788 100644 --- a/target/linux/ramips/dts/mt7621_sercomm_na502.dts +++ b/target/linux/ramips/dts/mt7621_sercomm_na502.dts @@ -95,6 +95,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts index ce700e0c2b..23e85f9902 100644 --- a/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts +++ b/target/linux/ramips/dts/mt7621_telco-electronics_x1.dts @@ -120,6 +120,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e006>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi index 3cc738530c..6454273f49 100644 --- a/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_archer-x6-v3.dtsi @@ -115,7 +115,7 @@ &state_default { gpio { - groups = "i2c", "uart2", "uart3", "jtag", "wdt"; + groups = "i2c", "rgmii2", "uart2", "uart3", "jtag", "wdt"; function = "gpio"; }; }; @@ -153,6 +153,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_config_8>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts new file mode 100644 index 0000000000..a0c3912d8e --- /dev/null +++ b/target/linux/ramips/dts/mt7621_tplink_eap615-wall-v1.dts @@ -0,0 +1,194 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "mt7621.dtsi" + +#include +#include +#include + +/ { + compatible = "tplink,eap615-wall-v1", "mediatek,mt7621-soc"; + model = "TP-Link EAP615-Wall v1"; + + aliases { + label-mac-device = &gmac0; + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + leds { + compatible = "gpio-leds"; + + led_status: status { + label = "white:status"; + color = ; + function = LED_FUNCTION_STATUS; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + led { + label = "led"; + gpios = <&gpio 10 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + gpio-export { + compatible = "gpio-export"; + + poe_passthrough { + gpio-export,name = "poe-passthrough"; + gpio-export,output = <0>; + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +ðernet { + reg = <0x1e100000 0xe000>; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <20000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label = "partition-table"; + reg = <0x80000 0x10000>; + read-only; + }; + + info: partition@90000 { + label = "product-info"; + reg = <0x90000 0x10000>; + read-only; + }; + + partition@a0000 { + compatible = "denx,fit"; + label = "firmware"; + reg = <0xa0000 0xcf0000>; + }; + + partition@d90000 { + label = "user-config"; + reg = <0xd90000 0x60000>; + read-only; + }; + + partition@f30000 { + label = "mutil-log"; + reg = <0xf30000 0x80000>; + read-only; + }; + + partition@fb0000 { + label = "oops"; + reg = <0xfb0000 0x40000>; + read-only; + }; + + radio: partition@ff0000 { + label = "radio"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&state_default { + gpio { + groups = "uart2", "uart3"; + function = "gpio"; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie1 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x0>; + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; + }; +}; + +&pcie2 { + status = "disabled"; +}; + +&gmac0 { + nvmem-cells = <&macaddr_info_8>; + nvmem-cell-names = "mac-address"; +}; + +&switch0 { + compatible = "mediatek,mt7530"; + ports { + port@0 { + status = "okay"; + label = "lan0"; + }; + + port@1 { + status = "okay"; + label = "lan3"; + }; + + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan1"; + }; + }; +}; + +&info { + compatible = "nvmem-cells"; + #address-cells = <1>; + #size-cells = <1>; + + macaddr_info_8: macaddr@8 { + reg = <0x8 0x6>; + }; +}; diff --git a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts index 3df4bc5d64..866abf87c6 100644 --- a/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts +++ b/target/linux/ramips/dts/mt7621_tplink_re350-v1.dts @@ -147,6 +147,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_config_10008>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi index 6cb6c0e460..f67c0e3c6d 100644 --- a/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi +++ b/target/linux/ramips/dts/mt7621_tplink_rexx0-v1.dtsi @@ -167,6 +167,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_config_10008>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi index e968c4e685..dcc84d7ccc 100644 --- a/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi +++ b/target/linux/ramips/dts/mt7621_ubnt_edgerouter-x.dtsi @@ -19,6 +19,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_22>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts index 252ade4854..f8c6bffb40 100644 --- a/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts +++ b/target/linux/ramips/dts/mt7621_wavlink_wl-wn531a6.dts @@ -137,6 +137,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi index 005cc619c6..cfd2344d21 100644 --- a/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi +++ b/target/linux/ramips/dts/mt7621_wevo_w2914ns-v2.dtsi @@ -108,6 +108,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts index af6181b6d0..ec81839d1d 100644 --- a/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts +++ b/target/linux/ramips/dts/mt7621_winstars_ws-wn583a6.dts @@ -118,6 +118,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts index 6e04f9a493..32f7e5056a 100644 --- a/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts +++ b/target/linux/ramips/dts/mt7621_xzwifi_creativebox-v1.dts @@ -152,6 +152,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi index e377a13444..4830206ae1 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg1602.dtsi @@ -148,6 +148,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts index e33fac8db1..a1d6af9466 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg2626.dts @@ -106,6 +106,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi index 01269e1c1c..9af057378d 100644 --- a/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi +++ b/target/linux/ramips/dts/mt7621_zbtlink_zbt-wg3526.dtsi @@ -110,6 +110,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts index 2a0bc6f8fd..71eb4c9414 100644 --- a/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts +++ b/target/linux/ramips/dts/mt7621_zyxel_nr7101.dts @@ -143,6 +143,10 @@ }; }; +ðernet { + pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>; +}; + &gmac0 { nvmem-cells = <&macaddr_factory_e000>; nvmem-cell-names = "mac-address"; diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 735bd39f3e..eb1f596fcc 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -1500,6 +1500,19 @@ define Device/tplink_eap235-wall-v1 endef TARGET_DEVICES += tplink_eap235-wall-v1 +define Device/tplink_eap615-wall-v1 + $(Device/dsa-migration) + $(Device/tplink-safeloader) + DEVICE_MODEL := EAP615-Wall + DEVICE_VARIANT := v1 + DEVICE_PACKAGES := kmod-mt7915e + TPLINK_BOARD_ID := EAP615-WALL-V1 + KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb | pad-to 64k + KERNEL_INITRAMFS := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd + IMAGE_SIZE := 13248k +endef +TARGET_DEVICES += tplink_eap615-wall-v1 + define Device/tplink_re350-v1 $(Device/dsa-migration) $(Device/tplink-safeloader) diff --git a/target/linux/ramips/mt7620/config-5.10 b/target/linux/ramips/mt7620/config-5.10 index 04a7614604..aa384b5907 100644 --- a/target/linux/ramips/mt7620/config-5.10 +++ b/target/linux/ramips/mt7620/config-5.10 @@ -67,6 +67,8 @@ CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y # CONFIG_GPIO_MT7621 is not set CONFIG_GPIO_RALINK=y +CONFIG_GPIO_WATCHDOG=y +# CONFIG_GPIO_WATCHDOG_ARCH_INITCALL is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y 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 374a260882..9af169fbef 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 @@ -63,7 +63,8 @@ ramips_setup_interfaces() mikrotik,routerboard-760igs) ucidef_set_interfaces_lan_wan "lan2 lan3 lan4 lan5" "wan sfp" ;; - tplink,eap235-wall-v1) + tplink,eap235-wall-v1|\ + tplink,eap615-wall-v1) ucidef_set_interface_lan "lan0 lan1 lan2 lan3" ;; ubnt,edgerouter-x) diff --git a/target/linux/x86/image/geode.mk b/target/linux/x86/image/geode.mk index ce5e93a2c5..91851b90ca 100644 --- a/target/linux/x86/image/geode.mk +++ b/target/linux/x86/image/geode.mk @@ -1,7 +1,7 @@ define Device/generic DEVICE_VENDOR := Generic DEVICE_MODEL := x86/Geode - DEVICE_PACKAGES += kmod-crypto-cbc kmod-crypto-ebc kmod-crypto-hw-geode \ + DEVICE_PACKAGES += kmod-crypto-cbc kmod-crypto-ecb kmod-crypto-hw-geode \ kmod-ledtrig-gpio GRUB2_VARIANT := legacy endef diff --git a/tools/Makefile b/tools/Makefile index 31807e4378..58f77128fd 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -47,6 +47,7 @@ $(curdir)/bison/compile := $(curdir)/flex/compile $(curdir)/cbootimage/compile += $(curdir)/automake/compile $(curdir)/cmake/compile += $(curdir)/libressl/compile $(curdir)/ninja/compile $(curdir)/dosfstools/compile := $(curdir)/autoconf/compile $(curdir)/automake/compile +$(curdir)/expat/compile := $(curdir)/cmake/compile $(curdir)/e2fsprogs/compile := $(curdir)/libtool/compile $(curdir)/fakeroot/compile := $(curdir)/libtool/compile $(curdir)/findutils/compile := $(curdir)/bison/compile @@ -63,7 +64,7 @@ $(curdir)/llvm-bpf/compile := $(curdir)/cmake/compile $(curdir)/make-ext4fs/compile := $(curdir)/zlib/compile $(curdir)/meson/compile := $(curdir)/ninja/compile $(curdir)/missing-macros/compile := $(curdir)/autoconf/compile -$(curdir)/mkimage/compile += $(curdir)/libressl/compile +$(curdir)/mkimage/compile += $(curdir)/bison/compile $(curdir)/libressl/compile $(curdir)/mklibs/compile := $(curdir)/libtool/compile $(curdir)/mpc/compile := $(curdir)/mpfr/compile $(curdir)/gmp/compile $(curdir)/mpfr/compile := $(curdir)/gmp/compile @@ -77,7 +78,7 @@ $(curdir)/squashfs/compile := $(curdir)/lzma-old/compile $(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile $(curdir)/upx/compile := $(curdir)/ucl/compile $(curdir)/zlib/compile := $(curdir)/cmake/compile -$(curdir)/zstd/compile := $(curdir)/cmake/compile +$(curdir)/zstd/compile := $(curdir)/meson/compile ifneq ($(HOST_OS),Linux) $(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile @@ -90,7 +91,7 @@ endif ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),) $(foreach tool, $(filter-out xz zstd pkgconf patch ninja meson libressl cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile)) tools-y += ccache -$(curdir)/ccache/compile := $(curdir)/zstd/compile +$(curdir)/ccache/compile := $(curdir)/cmake/compile $(curdir)/zstd/compile endif # in case there is no patch tool on the host we need to make patch tool a diff --git a/tools/cmake/Makefile b/tools/cmake/Makefile index 8f0631eb74..d1d5b58a47 100644 --- a/tools/cmake/Makefile +++ b/tools/cmake/Makefile @@ -7,14 +7,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cmake -PKG_VERSION:=3.22.1 +PKG_VERSION:=3.22.2 PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:kitware:cmake PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/Kitware/CMake/releases/download/v$(PKG_VERSION)/ \ https://cmake.org/files/v3.19/ -PKG_HASH:=0e998229549d7b3f368703d20e248e7ee1f853910d42704aa87918c213ea82c0 +PKG_HASH:=3c1c478b9650b107d452c5bd545c72e2fad4e37c09b89a1984b9a2f46df6aced HOST_BUILD_PARALLEL:=1 HOST_CONFIGURE_PARALLEL:=1 diff --git a/tools/expat/Makefile b/tools/expat/Makefile index cfc70b2a49..0bc54a3d48 100644 --- a/tools/expat/Makefile +++ b/tools/expat/Makefile @@ -9,21 +9,25 @@ include $(TOPDIR)/rules.mk PKG_NAME:=expat PKG_CPE_ID:=cpe:/a:libexpat:expat -PKG_VERSION:=2.2.10 +PKG_VERSION:=2.4.6 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 -PKG_HASH:=b2c160f1b60e92da69de8e12333096aeb0c3bf692d41c60794de278af72135a5 +PKG_HASH:=ce317706b07cae150f90cddd4253f5b4fba929607488af5ac47bf2bc08e31f09 PKG_SOURCE_URL:=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$(PKG_VERSION)) -HOST_BUILD_PARALLEL:=1 - include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/cmake.mk -HOST_CONFIGURE_ARGS += \ - --without-docbook - -define Host/Install - $(MAKE) -C $(HOST_BUILD_DIR) install -endef +CMAKE_HOST_OPTIONS += \ + -DDOCBOOK_TO_MAN=OFF \ + -DEXPAT_BUILD_TOOLS=OFF \ + -DEXPAT_BUILD_EXAMPLES=OFF \ + -DEXPAT_BUILD_TESTS=OFF \ + -DEXPAT_BUILD_DOCS=OFF \ + -DEXPAT_WITH_LIBBSD=OFF \ + -DEXPAT_ENABLE_INSTALL=ON \ + -DEXPAT_DTD=OFF \ + -DEXPAT_NS=OFF \ + -DEXPAT_DEV_URANDOM=OFF $(eval $(call HostBuild)) diff --git a/tools/fakeroot/Makefile b/tools/fakeroot/Makefile index f4333fbfb3..adae332099 100644 --- a/tools/fakeroot/Makefile +++ b/tools/fakeroot/Makefile @@ -5,12 +5,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=fakeroot -PKG_VERSION:=1.26 +PKG_VERSION:=1.27 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz PKG_SOURCE_URL:=@DEBIAN/pool/main/f/fakeroot -PKG_HASH:=480a578ffdc5592e73df4c086950d321b4adc78dbdaec56c82e4fe1fb68de8e9 +PKG_HASH:=3c45eb2d1802a2762069e2e9d21bdd6fb533592bc0cda74c9aff066ab01caddc PKG_LICENSE:=GPL-3.0-or-later PKG_LICENSE_FILES:=COPYING PKG_FIXUP:=autoreconf diff --git a/tools/fakeroot/patches/100-macos_compile_fix.patch b/tools/fakeroot/patches/100-macos_compile_fix.patch deleted file mode 100644 index 64c0b472c6..0000000000 --- a/tools/fakeroot/patches/100-macos_compile_fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/libfakeroot_inode64.c -+++ b/libfakeroot_inode64.c -@@ -36,6 +36,8 @@ - #include - #endif /* HAVE_FTS_H */ - -+void load_library_symbols(void); -+ - #include "wrapped.h" - #include "wraptmpf.h" - #include "wrapdef.h" diff --git a/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch b/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch index c37282af5d..730732db2e 100644 --- a/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch +++ b/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch @@ -6,7 +6,7 @@ Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: sy --- a/libfakeroot.c +++ b/libfakeroot.c -@@ -81,12 +81,14 @@ +@@ -86,12 +86,14 @@ #define SEND_STAT64(a,b,c) send_stat64(a,b,c) #define SEND_GET_STAT(a,b) send_get_stat(a,b) #define SEND_GET_STAT64(a,b) send_get_stat64(a,b) @@ -21,7 +21,7 @@ Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: sy #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b) #endif -@@ -131,8 +133,9 @@ +@@ -136,8 +138,9 @@ /* 10.10 uses id_t in getpriority/setpriority calls, so pretend id_t is used everywhere, just happens to be int on some OSes */ diff --git a/tools/fakeroot/patches/500-macos_arm64_compile_fix.patch b/tools/fakeroot/patches/500-macos_arm64_compile_fix.patch deleted file mode 100644 index 271dceef91..0000000000 --- a/tools/fakeroot/patches/500-macos_arm64_compile_fix.patch +++ /dev/null @@ -1,119 +0,0 @@ ---- a/communicate.c -+++ b/communicate.c -@@ -24,7 +24,12 @@ - In this file, we want 'struct stat' to have a 32-bit 'ino_t'. - We use 'struct stat64' when we need a 64-bit 'ino_t'. - */ --#define _DARWIN_NO_64_BIT_INODE -+# include -+# if __DARWIN_ONLY_64_BIT_INO_T -+# define _DARWIN_USE_64_BIT_INODE -+# else -+# define _DARWIN_NO_64_BIT_INODE -+# endif - #endif - - #include "communicate.h" ---- a/communicate.h -+++ b/communicate.h -@@ -91,6 +91,10 @@ - # include - #endif - -+#if __DARWIN_ONLY_64_BIT_INO_T -+struct stat64 __DARWIN_STRUCT_STAT64; -+#endif -+ - #ifndef FAKEROOT_FAKENET - # define FAKEROOTKEY_ENV "FAKEROOTKEY" - #endif /* ! FAKEROOT_FAKENET */ ---- a/faked.c -+++ b/faked.c -@@ -84,7 +84,12 @@ - In this file, we want 'struct stat' to have a 32-bit 'ino_t'. - We use 'struct stat64' when we need a 64-bit 'ino_t'. - */ --#define _DARWIN_NO_64_BIT_INODE -+# include -+# if __DARWIN_ONLY_64_BIT_INO_T -+# define _DARWIN_USE_64_BIT_INODE -+# else -+# define _DARWIN_NO_64_BIT_INODE -+# endif - #endif - - #include "config.h" ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -38,7 +38,12 @@ - In this file, we want 'struct stat' to have a 32-bit 'ino_t'. - We use 'struct stat64' when we need a 64-bit 'ino_t'. - */ --#define _DARWIN_NO_64_BIT_INODE -+# include -+# if __DARWIN_ONLY_64_BIT_INO_T -+# define _DARWIN_USE_64_BIT_INODE -+# else -+# define _DARWIN_NO_64_BIT_INODE -+# endif - - /* The helper _unix2003 version of this file calls a few functions in this file - that are marked with static_nonapple so that needs to become private instead ---- a/libfakeroot_unix2003.c -+++ b/libfakeroot_unix2003.c -@@ -18,7 +18,11 @@ - In this file, we want 'struct stat' to have a 32-bit 'ino_t'. - We use 'struct stat64' when we need a 64-bit 'ino_t'. - */ --#define _DARWIN_NO_64_BIT_INODE -+# if __DARWIN_ONLY_64_BIT_INO_T -+# define _DARWIN_USE_64_BIT_INODE -+# else -+# define _DARWIN_NO_64_BIT_INODE -+# endif - - /* - This file is for 32-bit symbols which have the "$UNIX2003" version, i.e. ---- a/libfakeroot_inode64.c -+++ b/libfakeroot_inode64.c -@@ -25,7 +25,7 @@ - #include "config.h" - #include "communicate.h" - --#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 -+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T - - #include - #include ---- a/wrapfunc.inp -+++ b/wrapfunc.inp -@@ -48,9 +48,11 @@ getattrlist$UNIX2003;int;(const char *pa - #endif - #endif - #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 -+#if !__DARWIN_ONLY_64_BIT_INO_T - lstat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf) - stat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf) - fstat$INODE64;int;(int fd, struct stat *buf);(fd, buf) -+#endif - posix_spawn;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp) - posix_spawnp;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp) - #endif -@@ -232,7 +234,7 @@ facl;int;(int fd, int cmd, int cnt, void - #ifdef HAVE_FTS_READ - fts_read;FTSENT *;(FTS *ftsp);(ftsp) - #ifdef __APPLE__ --#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 -+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T - fts_read$INODE64;FTSENT *;(FTS *ftsp);(ftsp) - #endif - #endif /* ifdef __APPLE__ */ -@@ -240,7 +242,7 @@ fts_read$INODE64;FTSENT *;(FTS *ftsp);(f - #ifdef HAVE_FTS_CHILDREN - fts_children;FTSENT *;(FTS *ftsp, int options);(ftsp, options) - #ifdef __APPLE__ --#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 -+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T - fts_children$INODE64;FTSENT *;(FTS *ftsp, int options);(ftsp, options) - #endif - #endif /* ifdef __APPLE__ */ diff --git a/tools/fakeroot/patches/600-macOS.patch b/tools/fakeroot/patches/600-macOS.patch new file mode 100644 index 0000000000..59e668eb9a --- /dev/null +++ b/tools/fakeroot/patches/600-macOS.patch @@ -0,0 +1,13 @@ +--- a/communicate.c ++++ b/communicate.c +@@ -441,6 +441,10 @@ void semaphore_down(){ + + #else /* FAKEROOT_FAKENET */ + ++#ifndef SOL_TCP ++# define SOL_TCP 6 /* this should probably be done with getprotoent */ ++#endif ++ + static struct sockaddr *get_addr(void) + { + static struct sockaddr_in addr = { 0, 0, { 0 } }; diff --git a/tools/findutils/Makefile b/tools/findutils/Makefile index 37cd897355..d0d780689b 100644 --- a/tools/findutils/Makefile +++ b/tools/findutils/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=findutils PKG_CPE_ID:=cpe:/a:gnu:findutils -PKG_VERSION:=4.8.0 +PKG_VERSION:=4.9.0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=57127b7e97d91282c6ace556378d5455a9509898297e46e10443016ea1387164 +PKG_HASH:=a2bfb8c09d436770edc59f50fa483e785b161a3b7b9d547573cb08065fd462fe HOST_BUILD_PARALLEL:=1 diff --git a/tools/findutils/patches/010-endpwent.patch b/tools/findutils/patches/010-endpwent.patch new file mode 100644 index 0000000000..dc346f3f76 --- /dev/null +++ b/tools/findutils/patches/010-endpwent.patch @@ -0,0 +1,20 @@ +--- a/find/parser.c ++++ b/find/parser.c +@@ -67,12 +67,12 @@ + #include "findutils-version.h" + #include "system.h" + +- +-#ifndef HAVE_ENDGRENT +-# define endgrent () ++#if ! HAVE_ENDGRENT ++# define endgrent() ((void) 0) + #endif +-#ifndef HAVE_ENDPWENT +-# define endpwent () ++ ++#if ! HAVE_ENDPWENT ++# define endpwent() ((void) 0) + #endif + + static bool parse_accesscheck (const struct parser_table*, char *argv[], int *arg_ptr); diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile index 60e0c74b45..fb51eb15e2 100644 --- a/tools/firmware-utils/Makefile +++ b/tools/firmware-utils/Makefile @@ -11,9 +11,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git -PKG_SOURCE_DATE:=2022-01-29 -PKG_SOURCE_VERSION:=872c87c6805bea08677de71b744cce7deb24903e -PKG_MIRROR_HASH:=e9bb14bca59485345c9f109f6ee2aec709e4d29cd389e3b05447a91c06806cf8 +PKG_SOURCE_DATE:=2022-02-28 +PKG_SOURCE_VERSION:=002cfaf0204ef48fdced6f43c99d59394860e2cb +PKG_MIRROR_HASH:=aa2ab50ab24474cd8b8342d8c6d88309a13117e2f1a34b7bfc61b15e0510bce6 include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/tools/libressl/Makefile b/tools/libressl/Makefile index be053ac788..da7cd6201b 100644 --- a/tools/libressl/Makefile +++ b/tools/libressl/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libressl -PKG_VERSION:=3.4.1 -PKG_HASH:=107ceae6ca800e81cb563584c16afa36d6c7138fade94a2b3e9da65456f7c61c +PKG_VERSION:=3.4.2 +PKG_HASH:=cb82ca7d547336917352fbd23db2fc483c6c44d35157b32780214ec74197b3ce PKG_RELEASE:=1 PKG_CPE_ID:=cpe:/a:openbsd:libressl diff --git a/tools/meson/Makefile b/tools/meson/Makefile index 0d69593d56..cd5af31cff 100644 --- a/tools/meson/Makefile +++ b/tools/meson/Makefile @@ -1,11 +1,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=meson -PKG_VERSION:=0.61.1 +PKG_VERSION:=0.61.2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/mesonbuild/meson/releases/download/$(PKG_VERSION) -PKG_HASH:=feb2cefb325b437dbf36146df7c6b87688ddff0b0205caa31dc64055c6da410c +PKG_HASH:=0233a7f8d959079318f6052b0939c27f68a5de86ba601f25c9ee6869fb5f5889 PKG_MAINTAINER:=Andre Heider PKG_LICENSE:=Apache-2.0 diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index 5ed4107e1d..fd5dad0cd8 100644 --- a/tools/mkimage/Makefile +++ b/tools/mkimage/Makefile @@ -7,38 +7,26 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mkimage -PKG_VERSION:=2021.10 +PKG_VERSION:=2022.01 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ https://mirror.cyberbits.eu/u-boot \ https://ftp.denx.de/pub/u-boot \ ftp://ftp.denx.de/pub/u-boot -PKG_HASH:=cde723e19262e646f2670d25e5ec4b1b368490de950d4e26275a988c36df0bd4 +PKG_HASH:=81b4543227db228c03f8a1bf5ddbc813b0bb8f6555ce46064ef721a6fc680413 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION) include $(INCLUDE_DIR)/host-build.mk -define Host/Prepare - $(Host/Prepare/Default) - mkdir -p $(HOST_BUILD_DIR)/include/config - touch $(HOST_BUILD_DIR)/include/config/auto.conf - mkdir -p $(HOST_BUILD_DIR)/include/generated/ - touch $(HOST_BUILD_DIR)/include/generated/autoconf.h -endef - define Host/Compile $(MAKE) -C $(HOST_BUILD_DIR) \ HOSTCFLAGS="$(HOST_CFLAGS)" \ HOSTLDFLAGS="$(HOST_LDFLAGS)" \ PKG_CONFIG_EXTRAARGS="--static" \ - no-dot-config-targets=tools-only \ - CONFIG_MKIMAGE_DTC_PATH=dtc \ - CONFIG_FIT=y \ - CONFIG_FIT_SIGNATURE=y \ - CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000 \ - CONFIG_TOOLS_LIBCRYPTO=y \ + V=$(if $(findstring c,$(OPENWRT_VERBOSE)),1) \ + tools-only_config \ tools-only endef diff --git a/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch new file mode 100644 index 0000000000..f2e3b9b053 --- /dev/null +++ b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Huangbin Zhan +Date: Fri, 18 Feb 2022 14:19:23 +0800 +Subject: [PATCH] tools: disable TOOLS_FIT_FULL_CHECK + + U-Boot disallows unit addresses by default. Disable TOOLS_FIT_FULL_CHECK + to allow at symbol in node names. + +https://github.com/openwrt/openwrt/commits/master/scripts/mkits.sh +https://github.com/u-boot/u-boot/commit/3f04db891a353f4b127ed57279279f851c6b4917 +--- + tools/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/tools/Kconfig ++++ b/tools/Kconfig +@@ -31,7 +31,7 @@ config TOOLS_FIT + Enable FIT support in the tools builds. + + config TOOLS_FIT_FULL_CHECK +- def_bool y ++ bool "Do a full check of the FIT" + help + Do a full check of the FIT before using it in the tools builds + diff --git a/tools/mklibs/Makefile b/tools/mklibs/Makefile index 7c9ffffbad..efa912bf6d 100644 --- a/tools/mklibs/Makefile +++ b/tools/mklibs/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mklibs -PKG_VERSION:=0.1.44 +PKG_VERSION:=0.1.45 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@DEBIAN/pool/main/m/mklibs/ -PKG_HASH:=3af0b6bd35e5b6fc58d8b68827fbae2ff6b7e20dd2b238ccb9b49d84722066c2 +PKG_HASH:=dd92a904b3942566f713fe536cd77dd1a5cfc62243c0e0bc6bb5d866e37422f3 HOST_FIXUP:=autoreconf diff --git a/tools/mklibs/patches/002-disable_symbol_checks.patch b/tools/mklibs/patches/002-disable_symbol_checks.patch index e18dfa8e55..96ca7a5f83 100644 --- a/tools/mklibs/patches/002-disable_symbol_checks.patch +++ b/tools/mklibs/patches/002-disable_symbol_checks.patch @@ -5,7 +5,7 @@ for name in unresolved: if not needed_symbols[name].weak: - raise Exception("Unresolvable symbol %s" % name) -+ print "WARNING: Unresolvable symbol %s" % name ++ print("WARNING: Unresolvable symbol %s" % name) break previous_pass_unresolved = unresolved @@ -14,7 +14,7 @@ if not name in symbol_provider: if not needed_symbols[name].weak: - raise Exception("No library provides non-weak %s" % name) -+ print "WARNING: Unresolvable symbol %s" % name ++ print("WARNING: Unresolvable symbol %s" % name) else: lib = symbol_provider[name] library_symbols_used[lib].add(library_symbols[lib][name]) diff --git a/tools/mklibs/patches/003-no_copy.patch b/tools/mklibs/patches/003-no_copy.patch index 75beccf82e..bc1ae8d73d 100644 --- a/tools/mklibs/patches/003-no_copy.patch +++ b/tools/mklibs/patches/003-no_copy.patch @@ -32,11 +32,11 @@ - dest_path + "/" + so_file_name + "-so", - dest_path + "/" + so_file_name + "-so-stripped") ## DEBUG - debug(DEBUG_VERBOSE, so_file, "\t", `os.stat(so_file)[ST_SIZE]`) + debug(DEBUG_VERBOSE, so_file, "\t", str(os.stat(so_file)[ST_SIZE])) debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so", "\t", - `os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]`) + str(os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE])) - debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so-stripped", -- "\t", `os.stat(dest_path + "/" + so_file_name + "-so-stripped")[ST_SIZE]`) +- "\t", str(os.stat(dest_path + "/" + so_file_name + "-so-stripped")[ST_SIZE])) # Finalising libs and cleaning up -for lib in regexpfilter(os.listdir(dest_path), "(.*)-so-stripped$"): diff --git a/tools/mklibs/patches/005-duplicate_syms.patch b/tools/mklibs/patches/005-duplicate_syms.patch index b0fdab7b10..2627203fab 100644 --- a/tools/mklibs/patches/005-duplicate_syms.patch +++ b/tools/mklibs/patches/005-duplicate_syms.patch @@ -23,7 +23,7 @@ for name in needed_symbols: - if not name in symbol_provider: - if not needed_symbols[name].weak: -- print "WARNING: Unresolvable symbol %s" % name +- print("WARNING: Unresolvable symbol %s" % name) - else: - lib = symbol_provider[name] - library_symbols_used[lib].add(library_symbols[lib][name]) diff --git a/tools/mklibs/patches/006-uclibc_init.patch b/tools/mklibs/patches/006-uclibc_init.patch deleted file mode 100644 index da83340fe4..0000000000 --- a/tools/mklibs/patches/006-uclibc_init.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/src/mklibs -+++ b/src/mklibs -@@ -604,6 +604,11 @@ while 1: - extra_post_obj.append(sysroot + libc_extras_dir + "/sofini.o") - symbols.add(ProvidedSymbol('__dso_handle', None, None, True)) - -+ if soname in ("libc.so.0"): -+ symbols.add(ProvidedSymbol('__uClibc_init', None, None, True)) -+ symbols.add(ProvidedSymbol('__uClibc_fini', None, None, True)) -+ extra_flags.append("-Wl,-init,__uClibc_init") -+ - map_file = find_pic_map(library) - if map_file: - extra_flags.append("-Wl,--version-script=" + map_file) diff --git a/tools/mklibs/patches/007-gc_sections.patch b/tools/mklibs/patches/007-gc_sections.patch index 2fdf4034da..3d098ae426 100644 --- a/tools/mklibs/patches/007-gc_sections.patch +++ b/tools/mklibs/patches/007-gc_sections.patch @@ -1,6 +1,6 @@ --- a/src/mklibs +++ b/src/mklibs -@@ -616,7 +616,7 @@ while 1: +@@ -611,7 +611,7 @@ while 1: # compile in only used symbols cmd = [] cmd.extend(gcc_options) diff --git a/tools/mklibs/patches/008-uclibc_libgcc_link.patch b/tools/mklibs/patches/008-uclibc_libgcc_link.patch index 34cd9d3ab3..a221278d2a 100644 --- a/tools/mklibs/patches/008-uclibc_libgcc_link.patch +++ b/tools/mklibs/patches/008-uclibc_libgcc_link.patch @@ -22,7 +22,7 @@ symbols.update(library_symbols_used[library]) -@@ -623,9 +621,10 @@ while 1: +@@ -618,9 +616,10 @@ while 1: cmd.append(pic_file) cmd.extend(extra_post_obj) cmd.extend(extra_flags) diff --git a/tools/mklibs/patches/009-uclibc_libpthread_symbols.patch b/tools/mklibs/patches/009-uclibc_libpthread_symbols.patch deleted file mode 100644 index 0d4d3e95aa..0000000000 --- a/tools/mklibs/patches/009-uclibc_libpthread_symbols.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- a/src/mklibs -+++ b/src/mklibs -@@ -173,9 +173,10 @@ def undefined_symbols(obj): - return result - - class ProvidedSymbol(Symbol): -- def __init__(self, name, version, library, default_version): -+ def __init__(self, name, version, library, default_version, weak): - super(ProvidedSymbol, self).__init__(name, version, library) - self.default_version = default_version -+ self.weak = weak - - def base_names(self): - ret = [] -@@ -216,11 +217,15 @@ def provided_symbols(obj): - if version_string.lower() not in ('base', 'none'): - version = version_string - -+ weak = False -+ if weak_string.lower() == 'true': -+ weak = True -+ - default_version = False - if default_version_string.lower() == 'true': - default_version = True - -- result.append(ProvidedSymbol(name, version, library, default_version)) -+ result.append(ProvidedSymbol(name, version, library, default_version, weak)) - - return result - -@@ -509,6 +514,9 @@ while 1: - debug(DEBUG_SPAM, "present_symbols adding %s" % symbol) - names = symbol.base_names() - for name in names: -+ if name in present_symbols: -+ if symbol.library != present_symbols[name].library: -+ needed_symbols[name] = UndefinedSymbol(name, True, symbol.version, symbol.library) - present_symbols[name] = symbol - - # are we finished? -@@ -600,12 +608,16 @@ while 1: - # may segfault in ptmalloc_init due to undefined weak reference - extra_pre_obj.append(sysroot + libc_extras_dir + "/soinit.o") - extra_post_obj.append(sysroot + libc_extras_dir + "/sofini.o") -- symbols.add(ProvidedSymbol('__dso_handle', None, None, True)) -+ symbols.add(ProvidedSymbol('__dso_handle', None, None, True, True)) - -- if soname in ("libc.so.0"): -- symbols.add(ProvidedSymbol('__uClibc_init', None, None, True)) -- symbols.add(ProvidedSymbol('__uClibc_fini', None, None, True)) -- extra_flags.append("-Wl,-init,__uClibc_init") -+ if soname == "libc.so.0": -+ symbols.add(ProvidedSymbol('__uClibc_init', None, None, True, True)) -+ symbols.add(ProvidedSymbol('__uClibc_fini', None, None, True, True)) -+ extra_pre_obj.append("-Wl,-init,__uClibc_init") -+ -+ if soname == "libpthread.so.0": -+ symbols.add(ProvidedSymbol('__pthread_initialize_minimal_internal', None, None, True, True)) -+ extra_flags.append("-Wl,-z,nodelete,-z,initfirst,-init=__pthread_initialize_minimal_internal") - - map_file = find_pic_map(library) - if map_file: diff --git a/tools/mklibs/patches/011-remove_multiarch.patch b/tools/mklibs/patches/011-remove_multiarch.patch index 23e45cc12c..8c0bfdf1a0 100644 --- a/tools/mklibs/patches/011-remove_multiarch.patch +++ b/tools/mklibs/patches/011-remove_multiarch.patch @@ -1,6 +1,6 @@ --- a/src/mklibs +++ b/src/mklibs -@@ -274,6 +274,7 @@ def extract_soname(so_file): +@@ -269,6 +269,7 @@ def extract_soname(so_file): return "" def multiarch(paths): diff --git a/tools/mklibs/patches/100-apply-2to3.patch b/tools/mklibs/patches/100-apply-2to3.patch index 9f2ae6c438..dcacbab205 100644 --- a/tools/mklibs/patches/100-apply-2to3.patch +++ b/tools/mklibs/patches/100-apply-2to3.patch @@ -1,10 +1,10 @@ --- a/src/mklibs +++ b/src/mklibs -@@ -57,18 +57,18 @@ debuglevel = DEBUG_NORMAL +@@ -57,17 +57,17 @@ debuglevel = DEBUG_NORMAL def debug(level, *msg): if debuglevel >= level: -- print string.join(msg) +- print(string.join(msg)) + print(' '.join(msg)) # return a list of lines of output of the command @@ -15,82 +15,22 @@ output = pipe.read().strip() status = pipe.close() if status is not None and os.WEXITSTATUS(status) != 0: -- print "Command failed with status", os.WEXITSTATUS(status), ":", \ -- command, string.join(args) -- print "With output:", output -+ print("Command failed with status", os.WEXITSTATUS(status), ":", \ + print("Command failed with status", os.WEXITSTATUS(status), ":", \ +- command, string.join(args)) + command, ' '.join(args)) -+ print("With output:", output) + print("With output:", output) sys.exit(1) return [i for i in output.split('\n') if i] - -@@ -204,7 +204,7 @@ class ProvidedSymbol(Symbol): - # Return a set of symbols provided by a library - def provided_symbols(obj): - if not os.access(obj, os.F_OK): -- raise Exception("Cannot find lib" + obj) -+ raise Exception("Cannot find lib " + obj) - library = extract_soname(obj) - - output = command("mklibs-readelf", "--print-symbols-provided", obj) -@@ -297,27 +297,27 @@ def usage(was_err): - outfd = sys.stderr - else: - outfd = sys.stdout -- print >> outfd, "Usage: mklibs [OPTION]... -d DEST FILE ..." -- print >> outfd, "Make a set of minimal libraries for FILE(s) in DEST." -- print >> outfd, "" -- print >> outfd, " -d, --dest-dir DIRECTORY create libraries in DIRECTORY" -- print >> outfd, " -D, --no-default-lib omit default libpath (", ':'.join(default_lib_path), ")" -- print >> outfd, " -L DIRECTORY[:DIRECTORY]... add DIRECTORY(s) to the library search path" -- print >> outfd, " -l LIBRARY add LIBRARY always" -- print >> outfd, " --ldlib LDLIB use LDLIB for the dynamic linker" -- print >> outfd, " --libc-extras-dir DIRECTORY look for libc extra files in DIRECTORY" -- print >> outfd, " --target TARGET prepend TARGET- to the gcc and binutils calls" -- print >> outfd, " --root ROOT search in ROOT for library rpaths" -- print >> outfd, " --sysroot ROOT prepend ROOT to all paths for libraries" -- print >> outfd, " --gcc-options OPTIONS pass OPTIONS to gcc" -- print >> outfd, " --libdir DIR use DIR (e.g. lib64) in place of lib in default paths" -- print >> outfd, " -v, --verbose explain what is being done" -- print >> outfd, " -h, --help display this help and exit" -+ print("Usage: mklibs [OPTION]... -d DEST FILE ...", file=outfd) -+ print("Make a set of minimal libraries for FILE(s) in DEST.", file=outfd) -+ print("", file=outfd) -+ print(" -d, --dest-dir DIRECTORY create libraries in DIRECTORY", file=outfd) +@@ -296,7 +296,7 @@ def usage(was_err): + print("Make a set of minimal libraries for FILE(s, file=outfd) in DEST.", file=outfd) + print("" , file=outfd) + print(" -d, --dest-dir DIRECTORY create libraries in DIRECTORY", file=outfd) +- print(" -D, --no-default-lib omit default libpath (", ':'.join(default_lib_path, file=outfd), ", file=outfd)", file=outfd) + print(" -D, --no-default-lib omit default libpath (", ':'.join(default_lib_path), ")", file=outfd) -+ print(" -L DIRECTORY[:DIRECTORY]... add DIRECTORY(s) to the library search path", file=outfd) -+ print(" -l LIBRARY add LIBRARY always", file=outfd) -+ print(" --ldlib LDLIB use LDLIB for the dynamic linker", file=outfd) -+ print(" --libc-extras-dir DIRECTORY look for libc extra files in DIRECTORY", file=outfd) -+ print(" --target TARGET prepend TARGET- to the gcc and binutils calls", file=outfd) -+ print(" --root ROOT search in ROOT for library rpaths", file=outfd) -+ print(" --sysroot ROOT prepend ROOT to all paths for libraries", file=outfd) -+ print(" --gcc-options OPTIONS pass OPTIONS to gcc", file=outfd) -+ print(" --libdir DIR use DIR (e.g. lib64) in place of lib in default paths", file=outfd) -+ print(" -v, --verbose explain what is being done", file=outfd) -+ print(" -h, --help display this help and exit", file=outfd) - sys.exit(was_err) - - def version(vers): -- print "mklibs: version ",vers -- print "" -+ print("mklibs: version ",vers) -+ print("") - - #################### main #################### - ## Usage: ./mklibs.py [OPTION]... -d DEST FILE ... -@@ -368,8 +368,8 @@ script_pattern = re.compile("^#!\s*/") - - try: - optlist, proglist = getopt.getopt(sys.argv[1:], opts, longopts) --except getopt.GetoptError, msg: -- print >> sys.stderr, msg -+except getopt.GetoptError as msg: -+ print(msg, file=sys.stderr) - usage(1) - - for opt, arg in optlist: -@@ -377,7 +377,7 @@ for opt, arg in optlist: + print(" -L DIRECTORY[:DIRECTORY]... add DIRECTORY(s, file=outfd) to the library search path", file=outfd) + print(" -l LIBRARY add LIBRARY always", file=outfd) + print(" --ldlib LDLIB use LDLIB for the dynamic linker", file=outfd) +@@ -372,7 +372,7 @@ for opt, arg in optlist: if debuglevel < DEBUG_SPAM: debuglevel = debuglevel + 1 elif opt == "-L": @@ -99,7 +39,7 @@ elif opt in ("-d", "--dest-dir"): dest_path = arg elif opt in ("-D", "--no-default-lib"): -@@ -396,17 +396,17 @@ for opt, arg in optlist: +@@ -391,7 +391,7 @@ for opt, arg in optlist: elif opt in ("-l",): force_libs.append(arg) elif opt == "--gcc-options": @@ -108,19 +48,7 @@ elif opt == "--libdir": libdir = arg elif opt in ("--help", "-h"): -- usage(0) -+ usage(0) - sys.exit(0) - elif opt in ("--version", "-V"): - version(vers) - sys.exit(0) - else: -- print "WARNING: unknown option: " + opt + "\targ: " + arg -+ print("WARNING: unknown option: " + opt + "\targ: " + arg) - - if include_default_lib_path == "yes": - lib_path.extend([a.replace("/lib/", "/" + libdir + "/") for a in default_lib_path]) -@@ -424,22 +424,22 @@ if ldlib == "LDLIB": +@@ -419,17 +419,17 @@ if ldlib == "LDLIB": objects = {} # map from inode to filename for prog in proglist: inode = os.stat(prog)[ST_INO] @@ -141,45 +69,20 @@ output = command("mklibs-readelf", "--print-interp", obj) if output: ldlib = output.pop() -- if ldlib: -- break -+ if ldlib: -+ break - - if not ldlib: - sys.exit("E: Dynamic linker not found, aborting.") -@@ -454,10 +454,10 @@ for obj in sorted(objects.values()): - for rpath_elem in rpath_val: - if not rpath_elem in lib_rpath: - if debuglevel >= DEBUG_VERBOSE: -- print "Adding rpath " + rpath_elem + " for " + obj -+ print("Adding rpath " + rpath_elem + " for " + obj) - lib_rpath.append(rpath_elem) - else: -- print "warning: " + obj + " may need rpath, but --root not specified" -+ print("warning: " + obj + " may need rpath, but --root not specified") - - lib_path.extend(lib_rpath) - -@@ -465,12 +465,12 @@ passnr = 1 - available_libs = [] - previous_pass_unresolved = set() +@@ -462,9 +462,9 @@ previous_pass_unresolved = set() while 1: -- debug(DEBUG_NORMAL, "I: library reduction pass", `passnr`) -+ debug(DEBUG_NORMAL, "I: library reduction pass", repr(passnr)) + debug(DEBUG_NORMAL, "I: library reduction pass", str(passnr)) if debuglevel >= DEBUG_VERBOSE: -- print "Objects:", +- print("Objects:",) - for obj in sorted([x[string.rfind(x, '/') + 1:] for x in objects.values()]): -- print obj, -- print +- print(obj,) + print("Objects:", end=' ') + for obj in sorted([x[x.rfind('/') + 1:] for x in list(objects.values())]): + print(obj, end=' ') -+ print() + print() passnr = passnr + 1 - # Gather all already reduced libraries and treat them as objects as well -@@ -479,7 +479,7 @@ while 1: +@@ -474,7 +474,7 @@ while 1: obj = dest_path + "/" + lib small_libs.append(obj) inode = os.stat(obj)[ST_INO] @@ -188,7 +91,7 @@ debug(DEBUG_SPAM, obj, "is hardlink to", objects[inode]) else: objects[inode] = obj -@@ -509,7 +509,7 @@ while 1: +@@ -504,7 +504,7 @@ while 1: present_symbols = {} checked_libs = small_libs checked_libs.extend(available_libs) @@ -197,70 +100,8 @@ for lib in checked_libs: for symbol in provided_symbols(lib): debug(DEBUG_SPAM, "present_symbols adding %s" % symbol) -@@ -529,8 +529,8 @@ while 1: - unresolved.add(name) - num_unresolved = num_unresolved + 1 - -- debug (DEBUG_NORMAL, `len(needed_symbols)`, "symbols,", -- `num_unresolved`, "unresolved") -+ debug (DEBUG_NORMAL, repr(len(needed_symbols)), "symbols,", -+ repr(num_unresolved), "unresolved") - - if num_unresolved == 0: - break -@@ -539,7 +539,7 @@ while 1: - # No progress in last pass. Verify all remaining symbols are weak. - for name in unresolved: - if not needed_symbols[name].weak: -- print "WARNING: Unresolvable symbol %s" % name -+ print("WARNING: Unresolvable symbol %s" % name) - break - - previous_pass_unresolved = unresolved -@@ -641,9 +641,9 @@ while 1: - command(target + "gcc", *cmd) - - ## DEBUG -- debug(DEBUG_VERBOSE, so_file, "\t", `os.stat(so_file)[ST_SIZE]`) -+ debug(DEBUG_VERBOSE, so_file, "\t", repr(os.stat(so_file)[ST_SIZE])) - debug(DEBUG_VERBOSE, dest_path + "/" + so_file_name + "-so", "\t", -- `os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE]`) -+ repr(os.stat(dest_path + "/" + so_file_name + "-so")[ST_SIZE])) - - # Finalising libs and cleaning up - for lib in regexpfilter(os.listdir(dest_path), "(.*)-so$"): -@@ -680,4 +680,4 @@ if not os.access(dest_path + "/" + ld_fu - command(target + "objcopy", "--strip-unneeded -R .note -R .comment", - ld_file, dest_path + "/" + ld_full_path) - --os.chmod(dest_path + "/" + ld_full_path, 0755) -+os.chmod(dest_path + "/" + ld_full_path, 0o755) --- a/src/mklibs-copy +++ b/src/mklibs-copy -@@ -51,9 +51,9 @@ def command(command, *args): - output = pipe.read().strip() - status = pipe.close() - if status is not None and os.WEXITSTATUS(status) != 0: -- print "Command failed with status", os.WEXITSTATUS(status), ":", \ -- command, ' '.join(args) -- print "With output:", output -+ print("Command failed with status", os.WEXITSTATUS(status), ":", \ -+ command, ' '.join(args)) -+ print("With output:", output) - sys.exit(1) - return output.split('\n') - -@@ -134,8 +134,8 @@ def multiarch(paths): - return paths - - def version(vers): -- print "mklibs: version ",vers -- print "" -+ print("mklibs: version ",vers) -+ print("") - - # Clean the environment - vers="0.12" @@ -159,7 +159,7 @@ if include_default_lib_path: objects = {} # map from inode to filename for prog in proglist: @@ -270,23 +111,15 @@ logger.debug("%s is a hardlink to %s", prog, objects[inode]) elif so_pattern.match(prog): logger.debug("%s is a library", prog) -@@ -169,12 +169,12 @@ for prog in proglist: +@@ -169,7 +169,7 @@ for prog in proglist: logger.debug("%s is no ELF", prog) if not ldlib: - for obj in objects.values(): + for obj in list(objects.values()): output = command("mklibs-readelf", "-i", obj) -- for x in output: -+ for x in output: - ldlib = x -- if ldlib: -- break -+ if ldlib: -+ break - - if not ldlib: - sys.exit("E: Dynamic linker not found, aborting.") + for x in output: + ldlib = x @@ -182,7 +182,7 @@ if not ldlib: logger.info('Using %s as dynamic linker', ldlib) @@ -319,9 +152,3 @@ libraries.update(library_depends(obj)) if libraries == previous_pass_libraries: -@@ -272,4 +272,4 @@ if not os.access(dest_path + "/" + ld_fu - command(target + "objcopy", "--strip-unneeded -R .note -R .comment", - ld_file, dest_path + "/" + ld_full_path) - --os.chmod(dest_path + "/" + ld_full_path, 0755) -+os.chmod(dest_path + "/" + ld_full_path, 0o755) diff --git a/tools/mtools/Makefile b/tools/mtools/Makefile index 5e3c950ba3..c10e887b36 100644 --- a/tools/mtools/Makefile +++ b/tools/mtools/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mtools -PKG_VERSION:=4.0.35 +PKG_VERSION:=4.0.37 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_HASH:=34769e173751d2f0d891a08c76c80427e929b8ee43438019b8666cc3d7a44749 +PKG_HASH:=799b197e23e47b61259628810b27790efb7a1fe36037ef1da8a27b0ae4fa8342 HOST_BUILD_PARALLEL:=1 diff --git a/tools/quilt/Makefile b/tools/quilt/Makefile index 149b7996a3..c16f989b5d 100644 --- a/tools/quilt/Makefile +++ b/tools/quilt/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=quilt -PKG_VERSION:=0.66 +PKG_VERSION:=0.67 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SAVANNAH/quilt -PKG_HASH:=314b319a6feb13bf9d0f9ffa7ce6683b06919e734a41275087ea457cc9dc6e07 +PKG_HASH:=3be3be0987e72a6c364678bb827e3e1fcc10322b56bc5f02b576698f55013cc2 include $(INCLUDE_DIR)/host-build.mk diff --git a/tools/quilt/patches/000-relocatable.patch b/tools/quilt/patches/000-relocatable.patch index 666c4b4791..caf5eb89a6 100644 --- a/tools/quilt/patches/000-relocatable.patch +++ b/tools/quilt/patches/000-relocatable.patch @@ -92,7 +92,7 @@ SHELL:= @BASH@ # It does not work if dash is used as a shell, for example GREP := @GREP@ TAIL := @TAIL@ -@@ -32,7 +32,7 @@ AWK := @AWK@ +@@ -33,7 +33,7 @@ AWK := @AWK@ FIND := @FIND@ XARGS := @XARGS@ DIFF := @DIFF@ @@ -101,7 +101,7 @@ MKTEMP := @MKTEMP@ MSGMERGE := @MSGMERGE@ MSGFMT := @MSGFMT@ -@@ -49,8 +49,8 @@ USE_NLS := @USE_NLS@ +@@ -50,8 +50,8 @@ USE_NLS := @USE_NLS@ STAT_HARDLINK := @STAT_HARDLINK@ PATCH_WRAPPER := @PATCH_WRAPPER@ diff --git a/tools/quilt/patches/001-fix_compile.patch b/tools/quilt/patches/001-fix_compile.patch index 56e38728de..ef6f8ff608 100644 --- a/tools/quilt/patches/001-fix_compile.patch +++ b/tools/quilt/patches/001-fix_compile.patch @@ -1,6 +1,6 @@ --- a/Makefile.in +++ b/Makefile.in -@@ -275,13 +275,10 @@ $(patsubst %.in,%,$(wildcard bin/*.in qu +@@ -276,13 +276,10 @@ $(patsubst %.in,%,$(wildcard bin/*.in qu @$(if $(filter $@,$(NON_EXEC_IN)),,chmod +x $@) configure : configure.ac aclocal.m4 diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile index b93a5d2b52..93f6745976 100644 --- a/tools/zstd/Makefile +++ b/tools/zstd/Makefile @@ -1,25 +1,35 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zstd -PKG_VERSION:=1.5.0 +PKG_VERSION:=1.5.2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/facebook/zstd/releases/download/v$(PKG_VERSION) -PKG_HASH:=5194fbfa781fcf45b98c5e849651aa7b3b0a008c6b72d4a0db760f3002291e94 +PKG_HASH:=7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE PKG_CPE_ID:=cpe:/a:facebook:zstandard -CMAKE_SOURCE_SUBDIR:=build/cmake - include $(INCLUDE_DIR)/host-build.mk -include $(INCLUDE_DIR)/cmake.mk +include $(INCLUDE_DIR)/meson.mk -CMAKE_HOST_OPTIONS += \ - -DBUILD_TESTING=OFF \ - -DCMAKE_C_COMPILER_LAUNCHER="" \ - -DCMAKE_C_COMPILER=$(HOSTCC_NOCACHE) \ - -DZSTD_LEGACY_SUPPORT=OFF +MESON_HOST_BUILD_DIR:=$(HOST_BUILD_DIR)/build/meson/openwrt-build + +HOSTCC:= $(HOSTCC_NOCACHE) +HOST_LDFLAGS += -Wl,-rpath,$(STAGING_DIR_HOST)/lib + +MESON_HOST_ARGS += \ + -Dlegacy_level=7 \ + -Ddebug_level=0 \ + -Dbacktrace=false \ + -Dstatic_runtime=false \ + -Dbin_programs=true \ + -Dbin_tests=false \ + -Dbin_contrib=false \ + -Dmulti_thread=enabled \ + -Dzlib=disabled \ + -Dlzma=disabled \ + -Dlz4=disabled $(eval $(call HostBuild))