diff --git a/package/boot/arm-trusted-firmware-bcm63xx/Makefile b/package/boot/arm-trusted-firmware-bcm63xx/Makefile index 385776ff59..02f04d4a69 100644 --- a/package/boot/arm-trusted-firmware-bcm63xx/Makefile +++ b/package/boot/arm-trusted-firmware-bcm63xx/Makefile @@ -33,7 +33,7 @@ TFA_TARGETS:= \ bcm4908 TFA_MAKE_FLAGS += \ - $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \ + LDFLAGS="-no-warn-rwx-segments" \ BRCM_CHIP=$(BRCM_CHIP) define Package/trusted-firmware-a/install diff --git a/package/boot/imx-bootlets/Makefile b/package/boot/imx-bootlets/Makefile index 0ecb0f2dfd..6e5a4eb189 100644 --- a/package/boot/imx-bootlets/Makefile +++ b/package/boot/imx-bootlets/Makefile @@ -10,7 +10,7 @@ PKG_NAME:=imx-bootlets PKG_VERSION:=10.12.01 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://trabant.uid0.hu/openwrt/ +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=f7c98cbc41e15184cad61c56115e840e34ac3ebb4a162fadeea905e5038fd65b PKG_FLAGS:=nonshared diff --git a/package/boot/kobs-ng/Makefile b/package/boot/kobs-ng/Makefile index 261cd92eab..9d86c30b6c 100644 --- a/package/boot/kobs-ng/Makefile +++ b/package/boot/kobs-ng/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=5.4 PKG_RELEASE:=1 PKG_SOURCE:=imx-kobs-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.freescale.com/lgfiles/NMG/MAD/YOCTO/ +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=85171b46068ac47c42fedb8104167bf9afd33dd9527ed127e1ca2eb29d7a86bf PKG_BUILD_DIR:=$(BUILD_DIR)/imx-kobs-$(PKG_VERSION) diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile index ab885b4b85..b69944ff81 100644 --- a/package/boot/tfa-layerscape/Makefile +++ b/package/boot/tfa-layerscape/Makefile @@ -162,7 +162,7 @@ TFA_TARGETS := \ lx2160a-rdb-sdboot TFA_MAKE_FLAGS += \ - $(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-Wl,--no-warn-rwx-segments") \ + LDFLAGS="-Wl,--no-warn-rwx-segments" \ fip pbl \ BOOT_MODE=$(BOOT_MODE) \ RCW=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-rcw.bin \ diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile index 67c9d8f365..7f05993c77 100644 --- a/package/boot/uboot-at91/Makefile +++ b/package/boot/uboot-at91/Makefile @@ -104,7 +104,7 @@ endef define U-Boot/sama5d4_xplained_nandflash NAME:=SAMA5D4 Xplained board (NandFlash) BUILD_SUBTARGET:=sama5 - BUILD_DEVICES:=microchip_sama5d3-xplained + BUILD_DEVICES:=microchip_sama5d4-xplained endef define U-Boot/sama5d27_som1_ek_mmc diff --git a/package/boot/uboot-tools/Makefile b/package/boot/uboot-tools/Makefile index 85657b351c..9a1bc79f48 100644 --- a/package/boot/uboot-tools/Makefile +++ b/package/boot/uboot-tools/Makefile @@ -7,8 +7,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ https://ftp.denx.de/pub/u-boot \ - https://mirror.cyberbits.eu/u-boot \ - ftp://ftp.denx.de/pub/u-boot + https://mirror.cyberbits.eu/u-boot PKG_URL:=https://docs.u-boot.org/en/latest/ PKG_HASH:=ac7c04b8b7004923b00a4e5d6699c5df4d21233bac9fda690d8cfbc209fff2fd PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION) diff --git a/package/devel/binutils/Makefile b/package/devel/binutils/Makefile index 5f906b1ede..8bd62d0f9b 100644 --- a/package/devel/binutils/Makefile +++ b/package/devel/binutils/Makefile @@ -8,13 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils -PKG_VERSION:=2.45.1 +PKG_VERSION:=2.46.0 PKG_RELEASE:=1 PKG_SOURCE_URL:=@GNU/binutils PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz -PKG_VERSION:=$(PKG_VERSION) -PKG_HASH:=5fe101e6fe9d18fdec95962d81ed670fdee5f37e3f48f0bef87bddf862513aa5 +PKG_HASH:=d75a94f4d73e7a4086f7513e67e439e8fcdcbb726ffe63f4661744e6256b2cf2 PKG_FIXUP:=patch-libtool PKG_LIBTOOL_PATHS:=. gas bfd opcodes gprof gprofng binutils ld libiberty gold intl libctf libsframe @@ -85,16 +84,45 @@ CONFIGURE_ARGS += \ --host=$(REAL_GNU_TARGET_NAME) \ --target=$(REAL_GNU_TARGET_NAME) \ --enable-shared \ + --enable-dependency-tracking \ + --enable-serial-configure \ + --enable-obsolete \ + --enable-deterministic-archives \ --enable-install-libiberty \ --enable-install-libbfd \ --enable-install-libctf \ + --disable-werror \ + --disable-gprofng \ + --disable-nls \ + --disable-sim \ + --disable-gdb \ --with-system-zlib \ - --without-zstd \ + --without-debuginfod \ --without-msgpack \ - --disable-gprofng + --without-zstd \ -MAKE_VARS+= \ - CPPFLAGS="$(TARGET_CPPFLAGS)" + +BINUTILS_VARS = \ + ac_cv_path_EXPECT= \ + ac_cv_prog_CARGO= \ + ac_cv_prog_EXPECT= \ + ac_cv_prog_GDC= \ + ac_cv_prog_GNATBIND= \ + ac_cv_prog_GNATMAKE= \ + ac_cv_prog_MAKEINFO= \ + ac_cv_prog_ac_ct_GDC= \ + ac_cv_prog_ac_ct_GNATBIND= \ + ac_cv_prog_ac_ct_GNATMAKE= \ + ac_cv_dejagnu_compat=no \ + ac_cv_libctf_tcl_try=no \ + acx_cv_cc_gcc_supports_ada=no \ + acx_cv_d_compiler_works=no \ + + +CONFIGURE_VARS += $(BINUTILS_VARS) + +MAKE_VARS += $(BINUTILS_VARS) \ + CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" define Build/Install $(call Build/Install/Default) @@ -141,6 +169,23 @@ define Package/binutils/install mv $(1)/usr/bin/strings $(1)/usr/bin/binutils-strings rm -f $(1)/usr/bin/objdump rm -f $(1)/usr/bin/ar + + : # deduplicate "/usr/bin/ld.*": + : # "ld.bfd" is the implementation, "ld" is the variant selector, + : # so the link should be "ld" -> "ld.bfd" + _ld='$(1)/usr/bin/ld'; \ + [ -f "$$$${_ld}" ] || exit 0; \ + find "$$$${_ld%/*}/" -follow -name "$$$${_ld##*/}*" -type f \ + | grep -Fxv -e "$$$${_ld}" | sort -V \ + | while read -r _ld_variant; do \ + cmp -s "$$$${_ld}" "$$$${_ld_variant}" || continue; \ + cp -L "$$$${_ld_variant}" "$$$${_ld_variant}.new"; \ + rm -f "$$$${_ld_variant}"; \ + mv "$$$${_ld_variant}.new" "$$$${_ld_variant}"; \ + rm -f "$$$${_ld}"; \ + ln -s "$$$${_ld_variant##*/}" "$$$${_ld}"; \ + break; \ + done endef $(eval $(call BuildPackage,libbfd)) diff --git a/package/firmware/ixp4xx-microcode/Makefile b/package/firmware/ixp4xx-microcode/Makefile index 5ee04a757a..c01de131e4 100644 --- a/package/firmware/ixp4xx-microcode/Makefile +++ b/package/firmware/ixp4xx-microcode/Makefile @@ -9,7 +9,7 @@ PKG_VERSION:=2.4 PKG_RELEASE:=1 PKG_SOURCE:=IPL_ixp400NpeLibraryWithCrypto-2_4.zip -PKG_SOURCE_URL:=http://downloads.openwrt.org/sources +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=1b1170d0657847248589d946048c0aeaa9cd671966fc5bec5933283309485eaa PKG_FLAGS:=nonshared diff --git a/package/kernel/leds-gca230718/src/leds-gca230718.c b/package/kernel/leds-gca230718/src/leds-gca230718.c index 83d840dc7e..3451be16c2 100644 --- a/package/kernel/leds-gca230718/src/leds-gca230718.c +++ b/package/kernel/leds-gca230718/src/leds-gca230718.c @@ -122,7 +122,7 @@ static int gca230718_probe(struct i2c_client *client) i2c_set_clientdata(client, priv); - device_for_each_child_node_scoped(client->dev, ledNode) { + device_for_each_child_node_scoped(&client->dev, ledNode) { const char *lname = fwnode_get_name(ledNode); u32 regValue = 0; if (fwnode_property_read_u32(ledNode, "reg", ®Value)) diff --git a/package/libs/libmnl/Makefile b/package/libs/libmnl/Makefile index 06f79d5384..f0d106c8ba 100644 --- a/package/libs/libmnl/Makefile +++ b/package/libs/libmnl/Makefile @@ -13,8 +13,8 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ - http://www.netfilter.org/projects/libmnl/files \ - ftp://ftp.netfilter.org/pub/libmnl + https://www.netfilter.org/projects/libmnl/files \ + https://ftp.netfilter.org/pub/libmnl PKG_HASH:=274b9b919ef3152bfb3da3a13c950dd60d6e2bcd54230ffeca298d03b40d0525 PKG_MAINTAINER:=Jo-Philipp Wich diff --git a/package/libs/libnfnetlink/Makefile b/package/libs/libnfnetlink/Makefile index be1eba6517..1a5bf1b082 100644 --- a/package/libs/libnfnetlink/Makefile +++ b/package/libs/libnfnetlink/Makefile @@ -13,8 +13,8 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:= \ - http://www.netfilter.org/projects/libnfnetlink/files/ \ - ftp://ftp.netfilter.org/pub/libnfnetlink/ + https://www.netfilter.org/projects/libnfnetlink/files/ \ + https://ftp.netfilter.org/pub/libnfnetlink/ PKG_HASH:=b064c7c3d426efb4786e60a8e6859b82ee2f2c5e49ffeea640cfe4fe33cbc376 PKG_MAINTAINER:=Jo-Philipp Wich PKG_LICENSE:=GPL-2.0+ diff --git a/package/libs/mpfr/Makefile b/package/libs/mpfr/Makefile index d3880e7c14..c748677004 100644 --- a/package/libs/mpfr/Makefile +++ b/package/libs/mpfr/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=mpfr PKG_VERSION:=4.2.2 PKG_RELEASE:=1 -PKG_SOURCE_URL:=@GNU/mpfr http://www.mpfr.org/mpfr-$(PKG_VERSION) +PKG_SOURCE_URL:=@GNU/mpfr https://www.mpfr.org/mpfr-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_HASH:=b67ba0383ef7e8a8563734e2e889ef5ec3c3b898a01d00fa0a6869ad81c6ce01 diff --git a/package/libs/popt/Makefile b/package/libs/popt/Makefile index ba9c82349b..93b496b05b 100644 --- a/package/libs/popt/Makefile +++ b/package/libs/popt/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=1.19 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://ftp.rpm.org/popt/releases/popt-1.x/ +PKG_SOURCE_URL:=@OPENWRT PKG_HASH:=c25a4838fc8e4c1c8aacb8bd620edb3084a3d63bf8987fdad3ca2758c63240f9 PKG_LICENSE:=MIT PKG_CPE_ID:=cpe:/a:popt_project:popt diff --git a/package/network/utils/bpftool/Makefile b/package/network/utils/bpftool/Makefile index 4f04aa06b1..9f13ea04b8 100644 --- a/package/network/utils/bpftool/Makefile +++ b/package/network/utils/bpftool/Makefile @@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bpftool -PKG_VERSION:=7.6.0 +PKG_VERSION:=7.7.0 PKG_RELEASE:=1 PKG_SOURCE_URL:=https://github.com/libbpf/bpftool -PKG_MIRROR_HASH:=7406a424375642fda35cae6eccaa8e27c21e4f132123c0207a83f763ef6fe899 +PKG_MIRROR_HASH:=67402950366f03853edb9a8702e1701b206f5f6685d887e9873264b14894f062 PKG_SOURCE_PROTO:=git PKG_SOURCE_VERSION:=v$(PKG_VERSION) @@ -81,7 +81,8 @@ MAKE_FLAGS += \ feature-llvm=0 \ feature-libcap=0 \ feature-disassembler-four-args=1 \ - feature-disassembler-init-styled=1 + feature-disassembler-init-styled=1 \ + SKIP_CRYPTO=1 MAKE_PATH = src @@ -101,7 +102,8 @@ HOST_MAKE_FLAGS += \ feature-llvm=0 \ feature-libcap=0 \ feature-disassembler-four-args=1 \ - feature-disassembler-init-styled=1 + feature-disassembler-init-styled=1 \ + SKIP_CRYPTO=1 HOST_MAKE_PATH = src diff --git a/package/network/utils/bpftool/patches/003-skip-crypto.patch b/package/network/utils/bpftool/patches/003-skip-crypto.patch new file mode 100644 index 0000000000..dcd180ec17 --- /dev/null +++ b/package/network/utils/bpftool/patches/003-skip-crypto.patch @@ -0,0 +1,162 @@ +From 9ba0b4add39e578ccdb91ca23b62a7de6ff45995 Mon Sep 17 00:00:00 2001 +From: Mykyta Yatsenko +Date: Thu, 12 Mar 2026 17:03:27 -0700 +Subject: [PATCH] bpftool: Allow explicitly skip llvm, libbfd and libcrypto + dependencies + +Introduce SKIP_LLVM, SKIP_LIBBFD, and SKIP_CRYPTO build flags that let +users build bpftool without these optional dependencies. + +SKIP_LLVM=1 skips LLVM even when detected. SKIP_LIBBFD=1 prevents the +libbfd JIT disassembly fallback when LLVM is absent. Together, they +produce a bpftool with no disassembly support. + +SKIP_CRYPTO=1 excludes sign.c and removes the -lcrypto link dependency. +Inline stubs in main.h return errors with a clear message if signing +functions are called at runtime. + +Use BPFTOOL_WITHOUT_CRYPTO (not HAVE_LIBCRYPTO_SUPPORT) as the C +define, following the BPFTOOL_WITHOUT_SKELETONS naming convention for +bpftool-internal build config, leaving HAVE_LIBCRYPTO_SUPPORT free for +proper feature detection in the future. + +All three flags are propagated through the selftests Makefile to bpftool +sub-builds. + +Signed-off-by: Mykyta Yatsenko +Signed-off-by: Andrii Nakryiko +Link: https://lore.kernel.org/bpf/20260312-b4-bpftool_build-v2-1-4c9d57133644@meta.com +--- + src/Makefile | 30 ++++++++++++++++++++++++++---- + src/main.c | 7 +++++++ + src/main.h | 14 ++++++++++++++ + 3 files changed, 47 insertions(+), 4 deletions(-) + +--- a/src/Makefile ++++ b/src/Makefile +@@ -95,6 +95,15 @@ RM ?= rm -f + + FEATURE_USER = .bpftool + ++# Skip optional dependencies: LLVM (JIT disasm), libbfd (fallback ++# disasm), libcrypto (program signing). ++SKIP_LLVM ?= ++SKIP_LIBBFD ?= ++SKIP_CRYPTO ?= ++ifneq ($(SKIP_CRYPTO),1) ++ CRYPTO_LIBS := -lcrypto ++endif ++ + FEATURE_TESTS := clang-bpf-co-re + FEATURE_TESTS += llvm + FEATURE_TESTS += libcap +@@ -124,8 +133,8 @@ ifeq ($(check_feat),1) + include Makefile.feature + endif + +-LIBS = $(LIBBPF) -lelf -lcrypto -lz +-LIBS_BOOTSTRAP = $(LIBBPF_BOOTSTRAP) -lelf -lcrypto -lz ++LIBS = $(LIBBPF) -lelf $(CRYPTO_LIBS) -lz ++LIBS_BOOTSTRAP = $(LIBBPF_BOOTSTRAP) -lelf $(CRYPTO_LIBS) -lz + + ifeq ($(feature-libelf-zstd),1) + LIBS += -lzstd +@@ -144,7 +153,12 @@ all: $(OUTPUT)bpftool + SRCS := $(wildcard *.c) + + ifeq ($(feature-llvm),1) +- # If LLVM is available, use it for JIT disassembly ++ifneq ($(SKIP_LLVM),1) ++HAS_LLVM := 1 ++endif ++endif ++ ++ifeq ($(HAS_LLVM),1) + CFLAGS += -DHAVE_LLVM_SUPPORT + LLVM_CONFIG_LIB_COMPONENTS := mcdisassembler all-targets + # llvm-config always adds -D_GNU_SOURCE, however, it may already be in CFLAGS +@@ -159,6 +173,7 @@ ifeq ($(feature-llvm),1) + endif + LDFLAGS += $(shell $(LLVM_CONFIG) --ldflags) + else ++ ifneq ($(SKIP_LIBBFD),1) + # Fall back on libbfd + ifeq ($(feature-libbfd),1) + LIBS += -lbfd -ldl -lopcodes +@@ -180,15 +195,22 @@ else + CFLAGS += -DDISASM_INIT_STYLED + endif + endif ++ endif # SKIP_LIBBFD + endif + ifeq ($(filter -DHAVE_LLVM_SUPPORT -DHAVE_LIBBFD_SUPPORT,$(CFLAGS)),) + # No support for JIT disassembly + SRCS := $(filter-out jit_disasm.c,$(SRCS)) + endif + ++ifeq ($(SKIP_CRYPTO),1) ++ CFLAGS += -DBPFTOOL_WITHOUT_CRYPTO ++ HOST_CFLAGS += -DBPFTOOL_WITHOUT_CRYPTO ++ SRCS := $(filter-out sign.c,$(SRCS)) ++endif ++ + BPFTOOL_BOOTSTRAP := $(BOOTSTRAP_OUTPUT)bpftool + +-BOOTSTRAP_OBJS = $(addprefix $(BOOTSTRAP_OUTPUT),main.o common.o json_writer.o gen.o btf.o sign.o) ++BOOTSTRAP_OBJS = $(addprefix $(BOOTSTRAP_OUTPUT),main.o common.o json_writer.o gen.o btf.o $(if $(CRYPTO_LIBS),sign.o)) + $(BOOTSTRAP_OBJS): $(LIBBPF_BOOTSTRAP) + + OBJS = $(patsubst %.c,$(OUTPUT)%.o,$(SRCS)) $(OUTPUT)disasm.o +--- a/src/main.c ++++ b/src/main.c +@@ -132,6 +132,11 @@ static int do_version(int argc, char **a + #else + const bool has_skeletons = true; + #endif ++#ifdef BPFTOOL_WITHOUT_CRYPTO ++ const bool has_crypto = false; ++#else ++ const bool has_crypto = true; ++#endif + bool bootstrap = false; + int i; + +@@ -163,6 +168,7 @@ static int do_version(int argc, char **a + jsonw_start_object(json_wtr); /* features */ + jsonw_bool_field(json_wtr, "libbfd", has_libbfd); + jsonw_bool_field(json_wtr, "llvm", has_llvm); ++ jsonw_bool_field(json_wtr, "crypto", has_crypto); + jsonw_bool_field(json_wtr, "skeletons", has_skeletons); + jsonw_bool_field(json_wtr, "bootstrap", bootstrap); + jsonw_end_object(json_wtr); /* features */ +@@ -181,6 +187,7 @@ static int do_version(int argc, char **a + printf("features:"); + print_feature("libbfd", has_libbfd, &nb_features); + print_feature("llvm", has_llvm, &nb_features); ++ print_feature("crypto", has_crypto, &nb_features); + print_feature("skeletons", has_skeletons, &nb_features); + print_feature("bootstrap", bootstrap, &nb_features); + printf("\n"); +--- a/src/main.h ++++ b/src/main.h +@@ -293,6 +293,20 @@ struct kernel_config_option { + int read_kernel_config(const struct kernel_config_option *requested_options, + size_t num_options, char **out_values, + const char *define_prefix); ++#ifndef BPFTOOL_WITHOUT_CRYPTO + int bpftool_prog_sign(struct bpf_load_and_run_opts *opts); + __u32 register_session_key(const char *key_der_path); ++#else ++static inline int bpftool_prog_sign(struct bpf_load_and_run_opts *opts) ++{ ++ p_err("bpftool was built without signing support"); ++ return -ENOTSUP; ++} ++ ++static inline __u32 register_session_key(const char *key_der_path) ++{ ++ p_err("bpftool was built without signing support"); ++ return -1; ++} ++#endif + #endif diff --git a/package/network/utils/xdp-tools/Makefile b/package/network/utils/xdp-tools/Makefile index fb9ea95458..67236ea317 100644 --- a/package/network/utils/xdp-tools/Makefile +++ b/package/network/utils/xdp-tools/Makefile @@ -1,7 +1,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xdp-tools -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_VERSION:=1.6.3 PKG_HASH:=78da363ff7dcf1a586f47800f16d644022bd33f3844864061a44616fce854fd8 diff --git a/package/network/utils/xdp-tools/patches/0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch b/package/network/utils/xdp-tools/patches/0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch index 1fee5e974c..f19b348a3b 100644 --- a/package/network/utils/xdp-tools/patches/0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch +++ b/package/network/utils/xdp-tools/patches/0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch @@ -1,5 +1,8 @@ +From f01fbee19b56b41f1e36f15a0d9334d2dc4da3ca Mon Sep 17 00:00:00 2001 From: Nick Hainke -Subject: [PATCH] params: avoid linux/if_ether.h in header to fix musl build +Date: Sun, 19 Apr 2026 18:29:45 +0200 +Subject: [PATCH 1/3] params: avoid linux/if_ether.h in header to fix musl + build On musl-based toolchains (e.g. MIPS), including from params.h triggers a chain through net/ethernet.h -> @@ -12,8 +15,8 @@ to avoid the conflict. Signed-off-by: Nick Hainke --- - lib/util/params.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + lib/util/params.h | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) --- a/lib/util/params.h +++ b/lib/util/params.h diff --git a/package/network/utils/xdp-tools/patches/0002-xdpsock-fix-struct-ethhdr-redefinition-on-musl.patch b/package/network/utils/xdp-tools/patches/0002-xdpsock-fix-struct-ethhdr-redefinition-on-musl.patch new file mode 100644 index 0000000000..486fe64083 --- /dev/null +++ b/package/network/utils/xdp-tools/patches/0002-xdpsock-fix-struct-ethhdr-redefinition-on-musl.patch @@ -0,0 +1,66 @@ +From ab5415551c7c7e2e34327446c65faf924e362ad7 Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Sun, 19 Apr 2026 09:46:11 +0200 +Subject: [PATCH 2/3] xdpsock: fix struct ethhdr redefinition on musl + +On musl, including or after + triggers a redefinition of 'struct ethhdr' via +the netinet/if_ether.h chain. + +Fix xdpsock.c by replacing the BSD-style struct ether_header/ether_addr +in swap_mac_addresses() with struct ethhdr (already provided by the +existing include) and dropping the conflicting + and includes. + +Fix xdpsock.h by replacing with , +which provides ETH_ALEN and struct ethhdr without the redefinition. + +Signed-off-by: Nick Hainke +--- + lib/util/xdpsock.c | 16 ++++++---------- + lib/util/xdpsock.h | 2 +- + 2 files changed, 7 insertions(+), 11 deletions(-) + +--- a/lib/util/xdpsock.c ++++ b/lib/util/xdpsock.c +@@ -15,8 +15,6 @@ + #include + #include + #include +-#include +-#include + #include + #include + #include +@@ -648,14 +646,12 @@ void xsk_ctx__destroy(struct xsk_ctx *ct + + static void swap_mac_addresses(void *data) + { +- struct ether_header *eth = (struct ether_header *)data; +- struct ether_addr *src_addr = (struct ether_addr *)ð->ether_shost; +- struct ether_addr *dst_addr = (struct ether_addr *)ð->ether_dhost; +- struct ether_addr tmp; +- +- tmp = *src_addr; +- *src_addr = *dst_addr; +- *dst_addr = tmp; ++ struct ethhdr *eth = (struct ethhdr *)data; ++ unsigned char tmp[ETH_ALEN]; ++ ++ memcpy(tmp, eth->h_source, ETH_ALEN); ++ memcpy(eth->h_source, eth->h_dest, ETH_ALEN); ++ memcpy(eth->h_dest, tmp, ETH_ALEN); + } + + static void hex_dump(void *pkt, size_t length, __u64 addr) +--- a/lib/util/xdpsock.h ++++ b/lib/util/xdpsock.h +@@ -8,7 +8,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include diff --git a/package/network/utils/xdp-tools/patches/0003-build-use-gnu2x-to-avoid-stdbool.h-dependency.patch b/package/network/utils/xdp-tools/patches/0003-build-use-gnu2x-to-avoid-stdbool.h-dependency.patch new file mode 100644 index 0000000000..b07149832f --- /dev/null +++ b/package/network/utils/xdp-tools/patches/0003-build-use-gnu2x-to-avoid-stdbool.h-dependency.patch @@ -0,0 +1,339 @@ +From bdb036b8015f5f55092cda9b140d79673007f4ca Mon Sep 17 00:00:00 2001 +From: Nick Hainke +Date: Sat, 18 Apr 2026 18:44:34 +0200 +Subject: [PATCH 3/3] build: use gnu2x to avoid stdbool.h dependency + +Bump the C standard from gnu11 to gnu2x for both CFLAGS and BPF_CFLAGS. +In C23 (gnu2x), bool is a native keyword, so stdbool.h is no longer needed. +This fixes "stdbool.h: No such file or directory" errors when building +BPF programs with a clang that lacks its resource directory (e.g. +OpenWrt's llvm-bpf built with LLVM_INSTALL_TOOLCHAIN_ONLY=ON on musl +targets), affecting xdpdump_bpf.c, xdpdump_xdp.c and +xdp_sample_common.bpf.h. + +Signed-off-by: Nick Hainke +--- + headers/linux/err.h | 1 - + headers/linux/hashtable.h | 1 - + headers/linux/netfilter.h | 1 - + headers/xdp/xdp_sample_common.bpf.h | 1 - + lib/defines.mk | 4 ++-- + lib/libxdp/tests/test_dispatcher_versions.c | 1 - + lib/libxdp/tests/test_link_detach.c | 1 - + lib/libxdp/tests/test_xdp_devbound.c | 1 - + lib/libxdp/tests/test_xdp_frags.c | 1 - + lib/libxdp/tests/test_xsk_refcnt.c | 1 - + lib/testing/test-tool.c | 1 - + lib/util/params.c | 1 - + lib/util/params.h | 1 - + lib/util/xdp_sample.c | 1 - + lib/util/xdpsock.c | 1 - + lib/util/xdpsock.h | 1 - + lib/util/xpcapng.c | 1 - + xdp-bench/xdp_basic.c | 1 - + xdp-bench/xdp_redirect_basic.c | 1 - + xdp-bench/xdp_redirect_cpumap.c | 1 - + xdp-bench/xdp_redirect_devmap.c | 1 - + xdp-bench/xdp_socket.c | 1 - + xdp-dump/xdpdump.c | 1 - + xdp-dump/xdpdump_bpf.c | 1 - + xdp-dump/xdpdump_xdp.c | 1 - + xdp-filter/xdp-filter.c | 1 - + xdp-loader/xdp-loader.c | 1 - + xdp-monitor/xdp-monitor.c | 1 - + xdp-trafficgen/xdp-trafficgen.c | 1 - + 29 files changed, 2 insertions(+), 30 deletions(-) + +--- a/headers/linux/err.h ++++ b/headers/linux/err.h +@@ -3,7 +3,6 @@ + #ifndef __LINUX_ERR_H + #define __LINUX_ERR_H + +-#include + #include + #include + +--- a/headers/linux/hashtable.h ++++ b/headers/linux/hashtable.h +@@ -9,7 +9,6 @@ + + #include + #include +-#include + #include + #include + #include +--- a/headers/linux/netfilter.h ++++ b/headers/linux/netfilter.h +@@ -1,7 +1,6 @@ + #ifndef _LINUX_NETFILTER_H + #define _LINUX_NETFILTER_H + +-#include + #include + #include + #include +--- a/headers/xdp/xdp_sample_common.bpf.h ++++ b/headers/xdp/xdp_sample_common.bpf.h +@@ -6,7 +6,6 @@ + #include "xdp_sample.bpf.h" + + #include +-#include + #include + #include + #include +--- a/lib/defines.mk ++++ b/lib/defines.mk +@@ -42,8 +42,8 @@ endif + + DEFINES += -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 + +-CFLAGS += -std=gnu11 -Wextra -Werror $(DEFINES) $(ARCH_INCLUDES) +-BPF_CFLAGS += $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS)) $(filter -I%,$(CFLAGS)) $(ARCH_INCLUDES) ++CFLAGS += -std=gnu2x -Wextra -Werror $(DEFINES) $(ARCH_INCLUDES) ++BPF_CFLAGS += -std=gnu2x $(DEFINES) $(filter -ffile-prefix-map=%,$(CFLAGS)) $(filter -I%,$(CFLAGS)) $(ARCH_INCLUDES) + + CONFIGMK := $(LIB_DIR)/../config.mk + LIBMK := Makefile $(CONFIGMK) $(LIB_DIR)/defines.mk $(LIB_DIR)/common.mk $(LIB_DIR)/../version.mk +--- a/lib/libxdp/tests/test_dispatcher_versions.c ++++ b/lib/libxdp/tests/test_dispatcher_versions.c +@@ -6,7 +6,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/lib/libxdp/tests/test_link_detach.c ++++ b/lib/libxdp/tests/test_link_detach.c +@@ -6,7 +6,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/lib/libxdp/tests/test_xdp_devbound.c ++++ b/lib/libxdp/tests/test_xdp_devbound.c +@@ -6,7 +6,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/lib/libxdp/tests/test_xdp_frags.c ++++ b/lib/libxdp/tests/test_xdp_frags.c +@@ -6,7 +6,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/lib/libxdp/tests/test_xsk_refcnt.c ++++ b/lib/libxdp/tests/test_xsk_refcnt.c +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/lib/testing/test-tool.c ++++ b/lib/testing/test-tool.c +@@ -2,7 +2,6 @@ + #include + #include + #include +-#include + #include + #include + +--- a/lib/util/params.c ++++ b/lib/util/params.c +@@ -5,7 +5,6 @@ + #include + #include + #include +-#include + #include + #include + +--- a/lib/util/params.h ++++ b/lib/util/params.h +@@ -4,7 +4,6 @@ + #define __PARAMS_H + + #include +-#include + #include + #include + #include +--- a/lib/util/xdp_sample.c ++++ b/lib/util/xdp_sample.c +@@ -15,7 +15,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/lib/util/xdpsock.c ++++ b/lib/util/xdpsock.c +@@ -19,7 +19,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/lib/util/xdpsock.h ++++ b/lib/util/xdpsock.h +@@ -7,7 +7,6 @@ + #define XDPSOCK_H_ + + #include +-#include + #include + #include + #include +--- a/lib/util/xpcapng.c ++++ b/lib/util/xpcapng.c +@@ -13,7 +13,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/xdp-bench/xdp_basic.c ++++ b/xdp-bench/xdp_basic.c +@@ -12,7 +12,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/xdp-bench/xdp_redirect_basic.c ++++ b/xdp-bench/xdp_redirect_basic.c +@@ -12,7 +12,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/xdp-bench/xdp_redirect_cpumap.c ++++ b/xdp-bench/xdp_redirect_cpumap.c +@@ -13,7 +13,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/xdp-bench/xdp_redirect_devmap.c ++++ b/xdp-bench/xdp_redirect_devmap.c +@@ -12,7 +12,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/xdp-bench/xdp_socket.c ++++ b/xdp-bench/xdp_socket.c +@@ -2,7 +2,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/xdp-dump/xdpdump.c ++++ b/xdp-dump/xdpdump.c +@@ -9,7 +9,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/xdp-dump/xdpdump_bpf.c ++++ b/xdp-dump/xdpdump_bpf.c +@@ -3,7 +3,6 @@ + /***************************************************************************** + * Include files + *****************************************************************************/ +-#include + #include + #include + #include +--- a/xdp-dump/xdpdump_xdp.c ++++ b/xdp-dump/xdpdump_xdp.c +@@ -3,7 +3,6 @@ + /***************************************************************************** + * Include files + *****************************************************************************/ +-#include + #include + #include + #include +--- a/xdp-filter/xdp-filter.c ++++ b/xdp-filter/xdp-filter.c +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include + #include + #include + #include +--- a/xdp-loader/xdp-loader.c ++++ b/xdp-loader/xdp-loader.c +@@ -4,7 +4,6 @@ + #include + #include + #include +-#include + #include + #include + +--- a/xdp-monitor/xdp-monitor.c ++++ b/xdp-monitor/xdp-monitor.c +@@ -23,7 +23,6 @@ static const char *__doc_err_only__= + #include + #include + #include +-#include + #include + #include + +--- a/xdp-trafficgen/xdp-trafficgen.c ++++ b/xdp-trafficgen/xdp-trafficgen.c +@@ -6,7 +6,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/target/linux/generic/hack-6.18/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch b/target/linux/generic/hack-6.18/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch index 7104b09455..edbf09126f 100644 --- a/target/linux/generic/hack-6.18/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch +++ b/target/linux/generic/hack-6.18/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch @@ -37,7 +37,7 @@ Signed-off-by: Bo-Cun Chen .glo_cfg = 0x4604, .rst_idx = 0x4608, .delay_irq = 0x460c, -@@ -4178,6 +4181,56 @@ static void mtk_set_mcr_max_rx(struct mt +@@ -4176,6 +4179,56 @@ static void mtk_set_mcr_max_rx(struct mt mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id)); } @@ -94,7 +94,7 @@ Signed-off-by: Bo-Cun Chen static void mtk_hw_reset(struct mtk_eth *eth) { u32 val; -@@ -4657,6 +4710,8 @@ static void mtk_pending_work(struct work +@@ -4655,6 +4708,8 @@ static void mtk_pending_work(struct work rtnl_lock(); set_bit(MTK_RESETTING, ð->state); diff --git a/target/linux/generic/pending-6.18/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch b/target/linux/generic/pending-6.18/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch index e8d4f486b1..5175d451e8 100644 --- a/target/linux/generic/pending-6.18/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch +++ b/target/linux/generic/pending-6.18/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch @@ -4,12 +4,13 @@ Date: Tue, 12 Dec 2023 03:51:14 +0000 Subject: [PATCH] net: ethernet: mtk_eth_soc: add paths and SerDes modes for MT7988 -MT7988 comes with a built-in 2.5G PHY as well as SerDes lanes to -connect external PHYs or transceivers in USXGMII, 10GBase-R, 5GBase-R, -2500Base-X, 1000Base-X and Cisco SGMII interface modes. +MT7988 comes with a new 10G/USXGMII SerDes PCS to connect external PHYs or +transceivers in USXGMII, 10GBase-R and 5GBase-R interface modes in addition +to the existing 2500Base-X, 1000Base-X and Cisco SGMII modes supported by +the existing LynxI PCS. -Implement support for configuring for the new paths to SerDes interfaces -and the internal 2.5G PHY. +Implement support for configuring for the new paths to the 10G SerDes +interfaces. Add USXGMII PCS driver for 10GBase-R, 5GBase-R and USXGMII mode, and setup the new PHYA on MT7988 to access the also still existing old @@ -270,14 +271,14 @@ Signed-off-by: Daniel Golle + if (mtk_interface_mode_is_xgmii(eth, state->interface)) { + mtk_w32(mac->hw, MTK_GDMA_XGDM_SEL, MTK_GDMA_EG_CTRL(mac->id)); + mtk_w32(mac->hw, MAC_MCR_FORCE_LINK_DOWN, MTK_MAC_MCR(mac->id)); -+ + +- if (mac->id == MTK_GMAC1_ID) +- mtk_setup_bridge_switch(eth); + if (mac->id == MTK_GMAC1_ID) + mtk_setup_bridge_switch(eth); + } else { + mtk_w32(eth, 0, MTK_GDMA_EG_CTRL(mac->id)); - -- if (mac->id == MTK_GMAC1_ID) -- mtk_setup_bridge_switch(eth); ++ + /* FIXME: In current hardware design, we have to reset FE + * when swtiching XGDM to GDM. Therefore, here trigger an SER + * to let GDM go back to the initial state. @@ -306,29 +307,7 @@ Signed-off-by: Daniel Golle /* Enable SGMII */ if (interface == PHY_INTERFACE_MODE_SGMII || phy_interface_mode_is_8023z(interface)) -@@ -861,7 +935,7 @@ static void mtk_xgdm_mac_link_up(struct - int speed, int duplex, bool tx_pause, - bool rx_pause) - { -- u32 mcr; -+ u32 mcr, force_link = 0; - - if (mac->id == MTK_GMAC1_ID) - return; -@@ -872,8 +946,10 @@ static void mtk_xgdm_mac_link_up(struct - mtk_m32(mac->hw, XMAC_GLB_CNTCLR, XMAC_GLB_CNTCLR, - MTK_XMAC_CNT_CTRL(mac->id)); - -- mtk_m32(mac->hw, MTK_XGMAC_FORCE_LINK(mac->id), -- MTK_XGMAC_FORCE_LINK(mac->id), MTK_XGMAC_STS(mac->id)); -+ if (mac->interface == PHY_INTERFACE_MODE_INTERNAL || mac->id == MTK_GMAC3_ID) -+ force_link = MTK_XGMAC_FORCE_LINK(mac->id); -+ -+ mtk_m32(mac->hw, MTK_XGMAC_FORCE_LINK(mac->id), force_link, MTK_XGMAC_STS(mac->id)); - - mcr = mtk_r32(mac->hw, MTK_XMAC_MCR(mac->id)); - mcr &= ~(XMAC_MCR_FORCE_TX_FC | XMAC_MCR_FORCE_RX_FC | -@@ -903,6 +979,10 @@ static void mtk_mac_link_up(struct phyli +@@ -903,6 +977,10 @@ static void mtk_mac_link_up(struct phyli else mtk_gdm_mac_link_up(mac, phy, mode, interface, speed, duplex, tx_pause, rx_pause); @@ -339,7 +318,7 @@ Signed-off-by: Daniel Golle } static void mtk_mac_disable_tx_lpi(struct phylink_config *config) -@@ -3765,6 +3845,9 @@ static int mtk_open(struct net_device *d +@@ -3765,6 +3843,9 @@ static int mtk_open(struct net_device *d ppe_num = eth->soc->ppe_num; @@ -349,7 +328,7 @@ Signed-off-by: Daniel Golle err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0); if (err) { netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, -@@ -3912,6 +3995,9 @@ static int mtk_stop(struct net_device *d +@@ -3912,6 +3993,9 @@ static int mtk_stop(struct net_device *d for (i = 0; i < ARRAY_SIZE(eth->ppe); i++) mtk_ppe_stop(eth->ppe[i]); @@ -359,7 +338,7 @@ Signed-off-by: Daniel Golle return 0; } -@@ -4968,6 +5054,7 @@ static const struct net_device_ops mtk_n +@@ -4968,6 +5052,7 @@ static const struct net_device_ops mtk_n static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) { const __be32 *_id = of_get_property(np, "reg", NULL); @@ -367,7 +346,7 @@ Signed-off-by: Daniel Golle phy_interface_t phy_mode; struct phylink *phylink; struct mtk_mac *mac; -@@ -5004,16 +5091,44 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -5004,16 +5089,44 @@ static int mtk_add_mac(struct mtk_eth *e mac->id = id; mac->hw = eth; mac->of_node = np; @@ -420,7 +399,7 @@ Signed-off-by: Daniel Golle } memset(mac->hwlro_ip, 0, sizeof(mac->hwlro_ip)); -@@ -5099,8 +5214,21 @@ static int mtk_add_mac(struct mtk_eth *e +@@ -5099,8 +5212,21 @@ static int mtk_add_mac(struct mtk_eth *e phy_interface_zero(mac->phylink_config.supported_interfaces); __set_bit(PHY_INTERFACE_MODE_INTERNAL, mac->phylink_config.supported_interfaces); @@ -442,7 +421,7 @@ Signed-off-by: Daniel Golle phylink = phylink_create(&mac->phylink_config, of_fwnode_handle(mac->of_node), phy_mode, &mtk_phylink_ops); -@@ -5156,6 +5284,26 @@ free_netdev: +@@ -5156,6 +5282,26 @@ free_netdev: return err; } @@ -469,7 +448,7 @@ Signed-off-by: Daniel Golle void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev) { struct net_device *dev, *tmp; -@@ -5309,7 +5457,8 @@ static int mtk_probe(struct platform_dev +@@ -5309,7 +5455,8 @@ static int mtk_probe(struct platform_dev regmap_write(cci, 0, 3); } @@ -479,7 +458,7 @@ Signed-off-by: Daniel Golle err = mtk_sgmii_init(eth); if (err) -@@ -5418,6 +5567,24 @@ static int mtk_probe(struct platform_dev +@@ -5418,6 +5565,24 @@ static int mtk_probe(struct platform_dev } } @@ -504,7 +483,7 @@ Signed-off-by: Daniel Golle if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) { err = devm_request_irq(eth->dev, eth->irq[MTK_FE_IRQ_SHARED], mtk_handle_irq, 0, -@@ -5528,6 +5695,11 @@ static void mtk_remove(struct platform_d +@@ -5528,6 +5693,11 @@ static void mtk_remove(struct platform_d mtk_stop(eth->netdev[i]); mac = netdev_priv(eth->netdev[i]); phylink_disconnect_phy(mac->phylink); diff --git a/target/linux/generic/pending-6.18/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch b/target/linux/generic/pending-6.18/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch index 0bde1667c0..c479c80a53 100644 --- a/target/linux/generic/pending-6.18/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch +++ b/target/linux/generic/pending-6.18/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch @@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -5733,7 +5733,7 @@ static const struct mtk_soc_data mt2701_ +@@ -5731,7 +5731,7 @@ static const struct mtk_soc_data mt2701_ DESC_SIZE(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -39,7 +39,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5761,7 +5761,7 @@ static const struct mtk_soc_data mt7621_ +@@ -5759,7 +5759,7 @@ static const struct mtk_soc_data mt7621_ DESC_SIZE(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5791,7 +5791,7 @@ static const struct mtk_soc_data mt7622_ +@@ -5789,7 +5789,7 @@ static const struct mtk_soc_data mt7622_ DESC_SIZE(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -57,7 +57,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5820,7 +5820,7 @@ static const struct mtk_soc_data mt7623_ +@@ -5818,7 +5818,7 @@ static const struct mtk_soc_data mt7623_ DESC_SIZE(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5846,7 +5846,7 @@ static const struct mtk_soc_data mt7629_ +@@ -5844,7 +5844,7 @@ static const struct mtk_soc_data mt7629_ DESC_SIZE(struct mtk_rx_dma), .irq_done_mask = MTK_RX_DONE_INT, .dma_l4_valid = RX_DMA_L4_VALID, @@ -75,7 +75,7 @@ Signed-off-by: Felix Fietkau .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, }, -@@ -5878,7 +5878,7 @@ static const struct mtk_soc_data mt7981_ +@@ -5876,7 +5876,7 @@ static const struct mtk_soc_data mt7981_ .dma_l4_valid = RX_DMA_L4_VALID_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau }, }; -@@ -5908,7 +5908,7 @@ static const struct mtk_soc_data mt7986_ +@@ -5906,7 +5906,7 @@ static const struct mtk_soc_data mt7986_ .dma_l4_valid = RX_DMA_L4_VALID_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, @@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau }, }; -@@ -5961,7 +5961,7 @@ static const struct mtk_soc_data rt5350_ +@@ -5959,7 +5959,7 @@ static const struct mtk_soc_data rt5350_ .dma_l4_valid = RX_DMA_L4_VALID_PDMA, .dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_len_offset = 16, diff --git a/target/linux/generic/pending-6.18/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch b/target/linux/generic/pending-6.18/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch index 424a4a83c5..80b3a2c337 100644 --- a/target/linux/generic/pending-6.18/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch +++ b/target/linux/generic/pending-6.18/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch @@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau help --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4863,6 +4863,7 @@ static int mtk_get_sset_count(struct net +@@ -4861,6 +4861,7 @@ static int mtk_get_sset_count(struct net static void mtk_ethtool_pp_stats(struct mtk_eth *eth, u64 *data) { @@ -33,7 +33,7 @@ Signed-off-by: Felix Fietkau struct page_pool_stats stats = {}; int i; -@@ -4875,6 +4876,7 @@ static void mtk_ethtool_pp_stats(struct +@@ -4873,6 +4874,7 @@ static void mtk_ethtool_pp_stats(struct page_pool_get_stats(ring->page_pool, &stats); } page_pool_ethtool_stats_get(data, &stats); diff --git a/target/linux/mediatek/modules.mk b/target/linux/mediatek/modules.mk index 6d09694c3d..1e9a258c2d 100644 --- a/target/linux/mediatek/modules.mk +++ b/target/linux/mediatek/modules.mk @@ -18,7 +18,8 @@ $(eval $(call KernelPackage,ata-ahci-mtk)) define KernelPackage/btmtkuart SUBMENU:=Other modules TITLE:=MediaTek HCI UART driver - DEPENDS:=@TARGET_mediatek_mt7622 +kmod-bluetooth +kmod-btmtk +mt7622bt-firmware + DEPENDS:=@TARGET_mediatek_mt7622 +kmod-bluetooth +kmod-btmtk +mt7622bt-firmware \ + +!LINUX_6_12:kmod-hci-uart KCONFIG:=CONFIG_BT_MTKUART FILES:= \ $(LINUX_DIR)/drivers/bluetooth/btmtkuart.ko diff --git a/target/linux/mediatek/mt7629/config-6.18 b/target/linux/mediatek/mt7629/config-6.18 index 70980897a7..c91da1e199 100644 --- a/target/linux/mediatek/mt7629/config-6.18 +++ b/target/linux/mediatek/mt7629/config-6.18 @@ -171,6 +171,7 @@ CONFIG_IRQ_MSI_LIB=y CONFIG_IRQ_TIME_ACCOUNTING=y CONFIG_IRQ_WORK=y # CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set +# CONFIG_LEDS_SMARTRG_LED is not set CONFIG_LIBFDT=y CONFIG_LOCK_DEBUGGING_SUPPORT=y CONFIG_LOCK_SPIN_ON_OWNER=y diff --git a/target/linux/mediatek/patches-6.18/341-mtd-spinand-Support-dosilicon.patch b/target/linux/mediatek/patches-6.18/341-mtd-spinand-Support-dosilicon.patch index bd1e456d4e..2b5079bcc9 100644 --- a/target/linux/mediatek/patches-6.18/341-mtd-spinand-Support-dosilicon.patch +++ b/target/linux/mediatek/patches-6.18/341-mtd-spinand-Support-dosilicon.patch @@ -55,17 +55,17 @@ Signed-off-by: Jon Lin +#define DOSICON_STATUS_ECC_7TO8_BITFLIPS (5 << 4) + +static SPINAND_OP_VARIANTS(read_cache_variants, -+ SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0)); ++ SPINAND_PAGE_READ_FROM_CACHE_1S_1S_4S_OP(0, 1, NULL, 0, 0), ++ SPINAND_PAGE_READ_FROM_CACHE_FAST_1S_1S_1S_OP(0, 1, NULL, 0, 0), ++ SPINAND_PAGE_READ_FROM_CACHE_1S_1S_1S_OP(0, 1, NULL, 0, 0)); + +static SPINAND_OP_VARIANTS(write_cache_variants, -+ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), -+ SPINAND_PROG_LOAD(true, 0, NULL, 0)); ++ SPINAND_PROG_LOAD_1S_1S_4S_OP(true, 0, NULL, 0), ++ SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0)); + +static SPINAND_OP_VARIANTS(update_cache_variants, -+ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), -+ SPINAND_PROG_LOAD(true, 0, NULL, 0)); ++ SPINAND_PROG_LOAD_1S_1S_4S_OP(true, 0, NULL, 0), ++ SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0)); + +static int ds35xxga_ooblayout_ecc(struct mtd_info *mtd, int section, + struct mtd_oob_region *region) diff --git a/target/linux/mediatek/patches-6.18/343-mtd-spinand-gsto-Add-code.patch b/target/linux/mediatek/patches-6.18/343-mtd-spinand-gsto-Add-code.patch index 654bfaff17..cc8a5d5be5 100644 --- a/target/linux/mediatek/patches-6.18/343-mtd-spinand-gsto-Add-code.patch +++ b/target/linux/mediatek/patches-6.18/343-mtd-spinand-gsto-Add-code.patch @@ -53,20 +53,20 @@ Signed-off-by: Jon Lin +#define SPINAND_MFR_GSTO 0x52 + +static SPINAND_OP_VARIANTS(read_cache_variants, -+ SPINAND_PAGE_READ_FROM_CACHE_QUADIO_OP(0, 2, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_X4_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_DUALIO_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_X2_OP(0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_OP(true, 0, 1, NULL, 0), -+ SPINAND_PAGE_READ_FROM_CACHE_OP(false, 0, 1, NULL, 0)); ++ SPINAND_PAGE_READ_FROM_CACHE_1S_4S_4S_OP(0, 2, NULL, 0, 0), ++ SPINAND_PAGE_READ_FROM_CACHE_1S_1S_4S_OP(0, 1, NULL, 0, 0), ++ SPINAND_PAGE_READ_FROM_CACHE_1S_2S_2S_OP(0, 1, NULL, 0, 0), ++ SPINAND_PAGE_READ_FROM_CACHE_1S_1S_2S_OP(0, 1, NULL, 0, 0), ++ SPINAND_PAGE_READ_FROM_CACHE_FAST_1S_1S_1S_OP(0, 1, NULL, 0, 0), ++ SPINAND_PAGE_READ_FROM_CACHE_1S_1S_1S_OP(0, 1, NULL, 0, 0)); + +static SPINAND_OP_VARIANTS(write_cache_variants, -+ SPINAND_PROG_LOAD_X4(true, 0, NULL, 0), -+ SPINAND_PROG_LOAD(true, 0, NULL, 0)); ++ SPINAND_PROG_LOAD_1S_1S_4S_OP(true, 0, NULL, 0), ++ SPINAND_PROG_LOAD_1S_1S_1S_OP(true, 0, NULL, 0)); + +static SPINAND_OP_VARIANTS(update_cache_variants, -+ SPINAND_PROG_LOAD_X4(false, 0, NULL, 0), -+ SPINAND_PROG_LOAD(false, 0, NULL, 0)); ++ SPINAND_PROG_LOAD_1S_1S_4S_OP(false, 0, NULL, 0), ++ SPINAND_PROG_LOAD_1S_1S_1S_OP(false, 0, NULL, 0)); + +static int gss0xgsak1_ooblayout_ecc(struct mtd_info *mtd, int section, + struct mtd_oob_region *region) diff --git a/target/linux/mediatek/patches-6.18/750-net-ethernet-mtk_eth_soc-add-mt7987-support.patch b/target/linux/mediatek/patches-6.18/750-net-ethernet-mtk_eth_soc-add-mt7987-support.patch index a9184c7021..caa1c8c77e 100644 --- a/target/linux/mediatek/patches-6.18/750-net-ethernet-mtk_eth_soc-add-mt7987-support.patch +++ b/target/linux/mediatek/patches-6.18/750-net-ethernet-mtk_eth_soc-add-mt7987-support.patch @@ -106,7 +106,7 @@ Signed-off-by: Bo-Cun Chen mdelay(20); mtk_m32(mac->hw, XMAC_GLB_CNTCLR, XMAC_GLB_CNTCLR, MTK_XMAC_CNT_CTRL(mac->id)); -@@ -2984,10 +3014,16 @@ static int mtk_tx_alloc(struct mtk_eth * +@@ -2982,10 +3012,16 @@ static int mtk_tx_alloc(struct mtk_eth * mtk_w32(eth, val, soc->reg_map->qdma.qtx_cfg + ofs); val = MTK_QTX_SCH_MIN_RATE_EN | @@ -126,7 +126,7 @@ Signed-off-by: Bo-Cun Chen if (mtk_is_netsys_v1(eth)) val |= MTK_QTX_SCH_LEAKY_BUCKET_EN; mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs); -@@ -5969,6 +6005,36 @@ static const struct mtk_soc_data mt7986_ +@@ -5967,6 +6003,36 @@ static const struct mtk_soc_data mt7986_ }, }; @@ -163,7 +163,7 @@ Signed-off-by: Bo-Cun Chen static const struct mtk_soc_data mt7988_data = { .reg_map = &mt7988_reg_map, .ana_rgc3 = 0x128, -@@ -6030,6 +6096,7 @@ const struct of_device_id of_mtk_match[] +@@ -6028,6 +6094,7 @@ const struct of_device_id of_mtk_match[] { .compatible = "mediatek,mt7629-eth", .data = &mt7629_data }, { .compatible = "mediatek,mt7981-eth", .data = &mt7981_data }, { .compatible = "mediatek,mt7986-eth", .data = &mt7986_data }, diff --git a/target/linux/mediatek/patches-6.18/751-net-ethernet-mtk_eth_soc-revise-hardware-configuration-for-mt7987.patch b/target/linux/mediatek/patches-6.18/751-net-ethernet-mtk_eth_soc-revise-hardware-configuration-for-mt7987.patch index c9f638f5e6..3f3a7bb350 100644 --- a/target/linux/mediatek/patches-6.18/751-net-ethernet-mtk_eth_soc-revise-hardware-configuration-for-mt7987.patch +++ b/target/linux/mediatek/patches-6.18/751-net-ethernet-mtk_eth_soc-revise-hardware-configuration-for-mt7987.patch @@ -15,7 +15,7 @@ Signed-off-by: Bo-Cun Chen --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c -@@ -4570,27 +4570,40 @@ static int mtk_hw_init(struct mtk_eth *e +@@ -4568,27 +4568,40 @@ static int mtk_hw_init(struct mtk_eth *e mtk_w32(eth, PSE_DUMMY_WORK_GDM(1) | PSE_DUMMY_WORK_GDM(2) | PSE_DUMMY_WORK_GDM(3) | DUMMY_PAGE_THR, PSE_DUMY_REQ); diff --git a/target/linux/realtek/base-files/lib/upgrade/platform.sh b/target/linux/realtek/base-files/lib/upgrade/platform.sh index b293a4d673..c2b11bceac 100644 --- a/target/linux/realtek/base-files/lib/upgrade/platform.sh +++ b/target/linux/realtek/base-files/lib/upgrade/platform.sh @@ -44,6 +44,12 @@ platform_do_upgrade() { linksys,lgs352c) nand_do_upgrade "$1" ;; + zyxel,xs1930-10|\ + zyxel,xs1930-12f|\ + zyxel,xs1930-12hp) + PART_NAME="factory" + default_do_upgrade "$1" + ;; *) default_do_upgrade "$1" ;; diff --git a/target/linux/realtek/dts/rtl9313_zyxel_xs1930-10.dts b/target/linux/realtek/dts/rtl9313_zyxel_xs1930-10.dts new file mode 100644 index 0000000000..1f560bd03c --- /dev/null +++ b/target/linux/realtek/dts/rtl9313_zyxel_xs1930-10.dts @@ -0,0 +1,248 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/dts-v1/; + +#include "rtl9313_zyxel_xs1930.dtsi" + +#include +#include +#include +#include + +/ { + compatible = "zyxel,xs1930-10", "realtek,rtl9313-soc"; + model = "Zyxel XS1930-10"; + + leds { + led_pwr_green: led-2 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + led_pwr_red: led-3 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; + }; + led_cloud_green: led-4 { + color = ; + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; + }; + led_cloud_red: led-5 { + color = ; + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; + }; + led_locator: led-6 { + color = ; + function = LED_FUNCTION_INDICATOR; + gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + }; + }; + + led_set: led_set@0 { + compatible = "realtek,rtl9300-leds"; + active-low; + + /* Blue | Green | Red */ + led_set0 = <(RTL93XX_LED_SET_10G | RTL93XX_LED_SET_5G | RTL93XX_LED_SET_2P5G | + RTL93XX_LED_SET_LINK | RTL93XX_LED_SET_ACT) + (RTL93XX_LED_SET_2P5G | RTL93XX_LED_SET_1G | RTL93XX_LED_SET_100M | + RTL93XX_LED_SET_LINK | RTL93XX_LED_SET_ACT) + (RTL93XX_LED_SET_5G | RTL93XX_LED_SET_100M | RTL93XX_LED_SET_LINK | + RTL93XX_LED_SET_ACT)>; + + realtek,led-set0-force-port-mask = <0x00300000 0x00000000>; + }; + + sfp_gpio_mux: gpio-mux { + compatible = "gpio-mux"; + mux-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>, + <&gpio0 14 GPIO_ACTIVE_HIGH>; + #mux-control-cells = <0>; + idle-state = ; + }; + + sfp1_gpio: sfp-gpio-1 { + compatible = "gpio-line-mux"; + gpio-controller; + #gpio-cells = <2>; + + mux-controls = <&sfp_gpio_mux>; + muxed-gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>; + + gpio-line-names = "SFP1_LOS", "SFP1_MOD_ABS", "SFP1_TX_FAULT"; + gpio-line-mux-states = <0>, <1>, <3>; + }; + + sfp2_gpio: sfp-gpio-2 { + compatible = "gpio-line-mux"; + gpio-controller; + #gpio-cells = <2>; + + mux-controls = <&sfp_gpio_mux>; + muxed-gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>; + + gpio-line-names = "SFP2_LOS", "SFP2_MOD_ABS", "SFP2_TX_FAULT"; + gpio-line-mux-states = <0>, <1>, <3>; + }; + + sfp1: sfp-p1 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpio = <&sfp1_gpio 0 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&sfp1_gpio 1 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&sfp1_gpio 2 GPIO_ACTIVE_HIGH>; + }; + + sfp2: sfp-p2 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + los-gpio = <&sfp2_gpio 0 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&sfp2_gpio 1 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&sfp2_gpio 2 GPIO_ACTIVE_HIGH>; + }; +}; + +&gpio0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_disable_jtag>; + + sfp_enable_hog { + gpio-hog; + gpios = <6 GPIO_ACTIVE_LOW>, + <7 GPIO_ACTIVE_LOW>; + output-high; + line-name = "sfp-enable"; + }; +}; + +&i2c_mst1 { + status = "okay"; + + i2c0: i2c@0 { + reg = <0>; + }; + i2c1: i2c@1 { + reg = <1>; + }; + + i2c2: i2c@2 { + reg = <2>; + + lm96000: lm96000@2e { + compatible = "national,lm85"; + reg = <0x2e>; + }; + }; +}; + +&mdio_ctrl { + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_enable_mdc_mdio_0>; +}; + +&mdio_bus0 { + /* External Aquantia AQR813 */ + PHY_C45(0, 8) + PHY_C45(8, 9) + PHY_C45(16, 10) + PHY_C45(24, 11) + PHY_C45(32, 12) + PHY_C45(40, 13) + PHY_C45(48, 14) + PHY_C45(50, 15) +}; + +&switch0 { + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + /* Copper ports behind AQR813 */ + SWITCH_PORT_LED(0, 1, 2, 0, usxgmii) + SWITCH_PORT_LED(8, 2, 3, 0, usxgmii) + SWITCH_PORT_LED(16, 3, 4, 0, usxgmii) + SWITCH_PORT_LED(24, 4, 5, 0, usxgmii) + SWITCH_PORT_LED(32, 5, 6, 0, usxgmii) + SWITCH_PORT_LED(40, 6, 7, 0, usxgmii) + SWITCH_PORT_LED(48, 7, 8, 0, usxgmii) + SWITCH_PORT_LED(50, 8, 9, 0, usxgmii) + + /* SFP+ ports */ + SWITCH_PORT_SFP(54, 9, 12, 0, 1) + SWITCH_PORT_SFP(55, 10, 13, 0, 2) + + /* CPU port */ + port@56 { + reg = <56>; + ethernet = <ðernet0>; + phy-mode = "internal"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; + +&port0 { + managed = "in-band-status"; +}; + +&port8 { + managed = "in-band-status"; +}; + +&port16 { + managed = "in-band-status"; +}; + +&port24 { + managed = "in-band-status"; +}; + +&port32 { + managed = "in-band-status"; +}; + +&port40 { + managed = "in-band-status"; +}; + +&port48 { + managed = "in-band-status"; +}; + +&port50 { + managed = "in-band-status"; +}; + +&serdes6 { + realtek,pnswap-rx; + realtek,pnswap-tx; +}; + +&serdes7 { + realtek,pnswap-rx; + realtek,pnswap-tx; +}; + +&serdes8 { + realtek,pnswap-rx; + realtek,pnswap-tx; +}; + +&serdes9 { + realtek,pnswap-rx; + realtek,pnswap-tx; +}; + +&serdes12 { + realtek,pnswap-tx; +}; + +&serdes13 { + realtek,pnswap-tx; +}; diff --git a/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12f.dts b/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12f.dts new file mode 100644 index 0000000000..1c5989f7e8 --- /dev/null +++ b/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12f.dts @@ -0,0 +1,344 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/dts-v1/; + +#include "rtl9313_zyxel_xs1930.dtsi" + +#include +#include +#include +#include + +/ { + compatible = "zyxel,xs1930-12f", "realtek,rtl9313-soc"; + model = "Zyxel XS1930-12F"; + + leds { + led_pwr_green: led-2 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + led_pwr_red: led-3 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio2 11 GPIO_ACTIVE_LOW>; + }; + led_cloud_green: led-4 { + color = ; + gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; + }; + led_cloud_red: led-5 { + color = ; + gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; + }; + led_locator: led-6 { + color = ; + function = LED_FUNCTION_INDICATOR; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + }; + }; + + led_set: led_set@0 { + compatible = "realtek,rtl9300-leds"; + active-low; + + /* SFP ports */ + led_set0 = <(RTL93XX_LED_SET_10G | RTL93XX_LED_SET_2P5G | RTL93XX_LED_SET_LINK | + RTL93XX_LED_SET_ACT) + (RTL93XX_LED_SET_2P5G | RTL93XX_LED_SET_1G | RTL93XX_LED_SET_LINK | + RTL93XX_LED_SET_ACT)>; + /* Base-T ports */ + led_set1 = <(RTL93XX_LED_SET_10G | RTL93XX_LED_SET_5G | RTL93XX_LED_SET_2P5G | + RTL93XX_LED_SET_LINK | RTL93XX_LED_SET_ACT) + (RTL93XX_LED_SET_2P5G | RTL93XX_LED_SET_1G | RTL93XX_LED_SET_100M | + RTL93XX_LED_SET_LINK | RTL93XX_LED_SET_ACT) + (RTL93XX_LED_SET_5G | RTL93XX_LED_SET_100M | RTL93XX_LED_SET_LINK | + RTL93XX_LED_SET_ACT)>; + }; + + sfp1: sfp-p1 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpio = <&gpio1 10 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 3 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 36 GPIO_ACTIVE_HIGH>; + }; + + sfp2: sfp-p2 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + los-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 4 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 21 GPIO_ACTIVE_HIGH>; + }; + + sfp3: sfp-p3 { + compatible = "sff,sfp"; + i2c-bus = <&i2c2>; + los-gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 25 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>; + }; + + sfp4: sfp-p4 { + compatible = "sff,sfp"; + i2c-bus = <&i2c3>; + los-gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 6 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>; + }; + + sfp5: sfp-p5 { + compatible = "sff,sfp"; + i2c-bus = <&i2c4>; + los-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 7 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>; + }; + + sfp6: sfp-p6 { + compatible = "sff,sfp"; + i2c-bus = <&i2c5>; + los-gpio = <&gpio1 34 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 29 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 25 GPIO_ACTIVE_HIGH>; + }; + + sfp7: sfp-p7 { + compatible = "sff,sfp"; + i2c-bus = <&i2c6>; + los-gpio = <&gpio1 33 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 31 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 6 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>; + }; + + sfp8: sfp-p8 { + compatible = "sff,sfp"; + i2c-bus = <&i2c7>; + los-gpio = <&gpio1 32 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 10 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>; + }; + + sfp9: sfp-p9 { + compatible = "sff,sfp"; + i2c-bus = <&i2c8>; + los-gpio = <&gpio1 31 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 11 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 28 GPIO_ACTIVE_HIGH>; + }; + + sfp10: sfp-p10 { + compatible = "sff,sfp"; + i2c-bus = <&i2c9>; + los-gpio = <&gpio1 30 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&gpio0 12 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&gpio1 29 GPIO_ACTIVE_HIGH>; + }; +}; + +&gpio0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_disable_jtag>, + <&pinmux_disable_led_sync>; +}; + +&i2c_mst1 { + status = "okay"; + + i2c0: i2c@0 { + reg = <0>; + }; + i2c1: i2c@1 { + reg = <1>; + }; + i2c2: i2c@2 { + reg = <2>; + }; + i2c3: i2c@3 { + reg = <3>; + }; + i2c4: i2c@4 { + reg = <4>; + }; + i2c5: i2c@5 { + reg = <5>; + }; +}; + +&i2c_mst2 { + status = "okay"; + + i2c6: i2c@6 { + reg = <6>; + }; + i2c7: i2c@7 { + reg = <7>; + }; + i2c8: i2c@8 { + reg = <8>; + }; + i2c9: i2c@9 { + reg = <9>; + }; + + i2c11: i2c@b { + reg = <0xb>; + + gpio2: pca9555@20 { + compatible = "nxp,pca9555"; + reg = <0x20>; + gpio-controller; + #gpio-cells = <2>; + + /* These GPIOs must be held low to activate SFP slots. + * Otherwise, neither power, signals nor I2C work. + */ + sfp_enable_hog { + gpio-hog; + gpios = <0 GPIO_ACTIVE_LOW>, /* SFP1 */ + <1 GPIO_ACTIVE_LOW>, /* SFP2 */ + <2 GPIO_ACTIVE_LOW>, /* SFP3 */ + <3 GPIO_ACTIVE_LOW>, /* SFP4 */ + <4 GPIO_ACTIVE_LOW>, /* SFP5 */ + <5 GPIO_ACTIVE_LOW>, /* SFP6 */ + <6 GPIO_ACTIVE_LOW>, /* SFP7 */ + <7 GPIO_ACTIVE_LOW>, /* SFP8 */ + <8 GPIO_ACTIVE_LOW>, /* SFP9 */ + <9 GPIO_ACTIVE_LOW>; /* SFP10 */ + output-high; + line-name = "enable-sfp-slots"; + }; + }; + + lm96000: lm96000@2e { + compatible = "national,lm85"; + reg = <0x2e>; + }; + }; +}; + +&mdio_aux { + status = "okay"; + + gpio1: gpio@1f { + compatible = "realtek,rtl8231"; + reg = <0x1f>; + + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&gpio1 0 0 37>; + + led-controller { + compatible = "realtek,rtl8231-leds"; + status = "disabled"; + }; + }; +}; + +&mdio_ctrl { + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_enable_mdc_mdio_1>, + <&pinmux_enable_mdc_mdio_2>; +}; + +&mdio_bus1 { + PHY_C45(54, 0) /* AQR113C */ +}; + +&mdio_bus2 { + PHY_C45(55, 8) /* AQR113C */ +}; + +&switch0 { + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + SWITCH_PORT_SFP(0, 1, 2, 0, 1) + SWITCH_PORT_SFP(8, 2, 3, 0, 2) + SWITCH_PORT_SFP(16, 3, 4, 0, 3) + SWITCH_PORT_SFP(24, 4, 5, 0, 4) + SWITCH_PORT_SFP(32, 5, 6, 0, 5) + SWITCH_PORT_SFP(40, 6, 7, 0, 6) + SWITCH_PORT_SFP(48, 7, 8, 0, 7) + SWITCH_PORT_SFP(50, 8, 9, 0, 8) + SWITCH_PORT_SFP(52, 9, 10, 0, 9) + SWITCH_PORT_SFP(53, 10, 11, 0, 10) + + /* Base-T ports */ + SWITCH_PORT_LED(54, 11, 12, 1, usxgmii) + SWITCH_PORT_LED(55, 12, 13, 1, usxgmii) + + /* CPU port */ + port@56 { + reg = <56>; + ethernet = <ðernet0>; + phy-mode = "internal"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; + +&port54 { + managed = "in-band-status"; +}; + +&port55 { + managed = "in-band-status"; +}; + +&serdes2 { + realtek,pnswap-tx; +}; + +&serdes3 { + realtek,pnswap-tx; +}; + +&serdes4 { + realtek,pnswap-tx; +}; + +&serdes5 { + realtek,pnswap-tx; +}; + +&serdes6 { + realtek,pnswap-tx; +}; + +&serdes7 { + realtek,pnswap-tx; +}; + +&serdes8 { + realtek,pnswap-tx; +}; + +&serdes9 { + realtek,pnswap-tx; +}; + +&serdes10 { + realtek,pnswap-tx; +}; + +&serdes11 { + realtek,pnswap-tx; +}; + diff --git a/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12hp.dts b/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12hp.dts new file mode 100644 index 0000000000..1eab2398ea --- /dev/null +++ b/target/linux/realtek/dts/rtl9313_zyxel_xs1930-12hp.dts @@ -0,0 +1,302 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/dts-v1/; + +#include "rtl9313_zyxel_xs1930.dtsi" + +#include +#include +#include +#include + +/ { + compatible = "zyxel,xs1930-12hp", "realtek,rtl9313-soc"; + model = "Zyxel XS1930-12HP"; + + leds { + led_pwr_green: led-2 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + led_pwr_red: led-3 { + color = ; + function = LED_FUNCTION_POWER; + gpios = <&gpio0 21 GPIO_ACTIVE_LOW>; + }; + led_cloud_green: led-4 { + color = ; + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; + }; + led_cloud_red: led-5 { + color = ; + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; + }; + led_locator: led-6 { + color = ; + function = LED_FUNCTION_INDICATOR; + gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + }; + }; + + led_set: led_set@0 { + compatible = "realtek,rtl9300-leds"; + active-low; + + /* Blue | Green | Red */ + led_set0 = <(RTL93XX_LED_SET_10G | RTL93XX_LED_SET_5G | RTL93XX_LED_SET_2P5G | + RTL93XX_LED_SET_LINK | RTL93XX_LED_SET_ACT) + (RTL93XX_LED_SET_2P5G | RTL93XX_LED_SET_1G | RTL93XX_LED_SET_100M | + RTL93XX_LED_SET_LINK | RTL93XX_LED_SET_ACT) + (RTL93XX_LED_SET_5G | RTL93XX_LED_SET_100M | RTL93XX_LED_SET_LINK | + RTL93XX_LED_SET_ACT)>; + /* Phantom port chain padding (2 LEDs) */ + led_set1 = ; + + /* The LED PCB has two daisy-chained RTL8231 in scan mode. + * Net LEDs for P3-P12 are on the first RTL8231, P1/P2 + * net LEDs are on the second. The 12 real ports provide + * 36 LED bits but the chain requires 65 bits to correctly + * span both chips. Phantom ports 1-7, 9-10 (set0, 3 LEDs + * each) and port 11 (set1, 2 LEDs) pad the chain with + * the remaining 29 bits. + */ + realtek,led-set0-force-port-mask = <0x00000000 0x000006FE>; + realtek,led-set1-force-port-mask = <0x00000000 0x00000800>; + }; + + sfp_gpio_mux: gpio-mux { + compatible = "gpio-mux"; + mux-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>, + <&gpio0 14 GPIO_ACTIVE_HIGH>; + #mux-control-cells = <0>; + idle-state = ; + }; + + sfp1_gpio: sfp-gpio-1 { + compatible = "gpio-line-mux"; + gpio-controller; + #gpio-cells = <2>; + + mux-controls = <&sfp_gpio_mux>; + muxed-gpio = <&gpio0 19 GPIO_ACTIVE_HIGH>; + + gpio-line-names = "SFP1_LOS", "SFP1_MOD_ABS", "SFP1_TX_FAULT"; + gpio-line-mux-states = <0>, <1>, <3>; + }; + + sfp2_gpio: sfp-gpio-2 { + compatible = "gpio-line-mux"; + gpio-controller; + #gpio-cells = <2>; + + mux-controls = <&sfp_gpio_mux>; + muxed-gpio = <&gpio0 27 GPIO_ACTIVE_HIGH>; + + gpio-line-names = "SFP2_LOS", "SFP2_MOD_ABS", "SFP2_TX_FAULT"; + gpio-line-mux-states = <0>, <1>, <3>; + }; + + sfp1: sfp-p1 { + compatible = "sff,sfp"; + i2c-bus = <&i2c0>; + los-gpio = <&sfp1_gpio 0 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&sfp1_gpio 1 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&sfp1_gpio 2 GPIO_ACTIVE_HIGH>; + }; + + sfp2: sfp-p2 { + compatible = "sff,sfp"; + i2c-bus = <&i2c1>; + los-gpio = <&sfp2_gpio 0 GPIO_ACTIVE_HIGH>; + mod-def0-gpio = <&sfp2_gpio 1 GPIO_ACTIVE_LOW>; + tx-disable-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; + tx-fault-gpio = <&sfp2_gpio 2 GPIO_ACTIVE_HIGH>; + }; +}; + +&gpio0 { + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_disable_jtag>; + + sfp_enable_hog { + gpio-hog; + gpios = <6 GPIO_ACTIVE_LOW>, + <7 GPIO_ACTIVE_LOW>; + output-high; + line-name = "sfp-enable"; + }; + poe_enable_hog { + gpio-hog; + gpios = <10 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "poe-enable"; + }; +}; + +&i2c_mst1 { + status = "okay"; + + i2c0: i2c@0 { + reg = <0>; + }; + + i2c1: i2c@1 { + reg = <1>; + }; + + i2c2: i2c@2 { + reg = <2>; + + lm96000: lm96000@2e { + compatible = "national,lm85"; + reg = <0x2e>; + }; + }; + + /* PoE management MCU sits here */ + i2c3: i2c@3 { + reg = <3>; + }; +}; + +&mdio_ctrl { + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_enable_mdc_mdio_0>, + <&pinmux_enable_mdc_mdio_1>, + <&pinmux_enable_mdc_mdio_2>; +}; + +&mdio_bus0 { + /* AQR813 */ + PHY_C45(0, 8) + PHY_C45(8, 9) + PHY_C45(16, 10) + PHY_C45(24, 11) + PHY_C45(32, 12) + PHY_C45(40, 13) + PHY_C45(48, 14) + PHY_C45(50, 15) +}; + +&mdio_bus1 { + PHY_C45(52, 0) /* AQR113C */ +}; + +&mdio_bus2 { + PHY_C45(53, 8) /* AQR113C */ +}; + +&switch0 { + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + /* Copper ports behind AQR813 */ + SWITCH_PORT_LED(0, 1, 2, 0, usxgmii) + SWITCH_PORT_LED(8, 2, 3, 0, usxgmii) + SWITCH_PORT_LED(16, 3, 4, 0, usxgmii) + SWITCH_PORT_LED(24, 4, 5, 0, usxgmii) + SWITCH_PORT_LED(32, 5, 6, 0, usxgmii) + SWITCH_PORT_LED(40, 6, 7, 0, usxgmii) + SWITCH_PORT_LED(48, 7, 8, 0, usxgmii) + SWITCH_PORT_LED(50, 8, 9, 0, usxgmii) + + /* Copper ports behind AQR113C */ + SWITCH_PORT_LED(52, 9, 10, 0, usxgmii) + SWITCH_PORT_LED(53, 10, 11, 0, usxgmii) + + /* SFP+ ports */ + SWITCH_PORT_SFP(54, 11, 12, 0, 1) + SWITCH_PORT_SFP(55, 12, 13, 0, 2) + + /* CPU port */ + port@56 { + ethernet = <ðernet0>; + reg = <56>; + phy-mode = "internal"; + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; +}; + +&port0 { + managed = "in-band-status"; +}; + +&port8 { + managed = "in-band-status"; +}; + +&port16 { + managed = "in-band-status"; +}; + +&port24 { + managed = "in-band-status"; +}; + +&port32 { + managed = "in-band-status"; +}; + +&port40 { + managed = "in-band-status"; +}; + +&port48 { + managed = "in-band-status"; +}; + +&port50 { + managed = "in-band-status"; +}; + +&port52 { + managed = "in-band-status"; +}; + +&port53 { + managed = "in-band-status"; +}; + +&serdes6 { + realtek,pnswap-rx; + realtek,pnswap-tx; +}; + +&serdes7 { + realtek,pnswap-rx; + realtek,pnswap-tx; +}; + +&serdes8 { + realtek,pnswap-rx; + realtek,pnswap-tx; +}; + +&serdes9 { + realtek,pnswap-rx; + realtek,pnswap-tx; +}; + +&serdes10 { + realtek,pnswap-tx; +}; + +&serdes11 { + realtek,pnswap-tx; +}; + +&serdes12 { + realtek,pnswap-tx; +}; + +&serdes13 { + realtek,pnswap-tx; +}; diff --git a/target/linux/realtek/dts/rtl9313_zyxel_xs1930.dtsi b/target/linux/realtek/dts/rtl9313_zyxel_xs1930.dtsi new file mode 100644 index 0000000000..efb517e485 --- /dev/null +++ b/target/linux/realtek/dts/rtl9313_zyxel_xs1930.dtsi @@ -0,0 +1,139 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/dts-v1/; + +#include "rtl931x.dtsi" + +#include +#include +#include +#include + +/ { + aliases { + label-mac-device = ðernet0; + led-boot = &led_sys_green; + led-failsafe = &led_sys_red; + led-running = &led_sys_green; + led-upgrade = &led_sys_green; + }; + + chosen { + bootargs = "console=ttyS0,115200 earlycon"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x00000000 0x10000000>; + }; + + keys { + compatible = "gpio-keys"; + + key-restore { + label = "restore"; + gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds: leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&pinmux_disable_sys_led>; + + led_sys_green: led-0 { + color = ; + function = LED_FUNCTION_INDICATOR; + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + }; + + led_sys_red: led-1 { + color = ; + function = LED_FUNCTION_INDICATOR; + gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "BootBase"; + reg = <0x0 0xa0000>; + read-only; + + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + factory_macaddr: macaddr@9fff8 { + reg = <0x9fff8 0x6>; + }; + }; + }; + + /* DbgArea */ + partition@a0000 { + label = "reserved"; + reg = <0xa0000 0x20000>; + read-only; + }; + + partition@c0000 { + label = "RomDir2"; + reg = <0xc0000 0x120000>; + read-only; + + /* boot image index at offset 0x151 */ + nvmem-layout { + compatible = "fixed-layout"; + #address-cells = <1>; + #size-cells = <1>; + + boot_selector: boot-selector@151 { + reg = <0x151 0x1>; + }; + }; + }; + + /* BootBase has dual-image support. Second partition starts at + * 0x1280000 and has same layout as first partition but smaller size + */ + partition@280000 { + reg = <0x280000 0x1d80000>; + label = "factory"; + + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "loader"; + reg = <0x0 0x10000>; + }; + + partition@10000 { + label = "firmware"; + reg = <0x10000 0x1d70000>; + compatible = "openwrt,uimage", "denx,uimage"; + }; + }; + }; + }; +}; + +ðernet0 { + nvmem-cells = <&factory_macaddr 0>; + nvmem-cell-names = "mac-address"; +}; diff --git a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c index 3bfe8a47d7..c8429b4596 100644 --- a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c +++ b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c @@ -109,6 +109,12 @@ #define RTPCS_931X_SDS_MAIN_AMP_MASK GENMASK(9, 5) #define RTPCS_931X_SDS_POST_AMP_MASK GENMASK(14, 10) +enum rtpcs_sds_type { + RTPCS_SDS_TYPE_UNKNOWN, + RTPCS_SDS_TYPE_5G, + RTPCS_SDS_TYPE_10G, +}; + enum rtpcs_sds_mode { RTPCS_SDS_MODE_OFF = 0, @@ -201,6 +207,7 @@ struct rtpcs_serdes { struct rtpcs_ctrl *ctrl; const struct rtpcs_sds_ops *ops; const struct rtpcs_sds_regs *regs; + enum rtpcs_sds_type type; enum rtpcs_sds_mode hw_mode; u8 id; u8 num_of_links; @@ -244,6 +251,7 @@ struct rtpcs_config { const struct rtpcs_sds_ops *sds_ops; const struct rtpcs_sds_regs *sds_regs; int (*init)(struct rtpcs_ctrl *ctrl); + int (*sds_probe)(struct rtpcs_serdes *sds); int (*setup_serdes)(struct rtpcs_serdes *sds, enum rtpcs_sds_mode hw_mode); }; @@ -835,6 +843,12 @@ static int rtpcs_838x_sds_patch(struct rtpcs_serdes *sds, return 0; } +static int rtpcs_838x_sds_probe(struct rtpcs_serdes *sds) +{ + sds->type = RTPCS_SDS_TYPE_5G; + return 0; +} + static int rtpcs_838x_init(struct rtpcs_ctrl *ctrl) { dev_dbg(ctrl->dev, "Init RTL838X PCS\n"); @@ -896,17 +910,14 @@ static void rtpcs_839x_sds_reset(struct rtpcs_serdes *sds) struct rtpcs_serdes *even_sds = rtpcs_sds_get_even(sds); struct rtpcs_serdes *odd_sds = rtpcs_sds_get_odd(sds); - bool is_10g_sds = (sds->id == 8 || sds->id == 9 || sds->id == 12 || - sds->id == 13); - /* FIXME: The reset sequence seems to break some of the 5G SerDes * though the SDK is calling it for all SerDes during init. Until * this is solved, skip reset. */ - if (!is_10g_sds) + if (sds->type == RTPCS_SDS_TYPE_5G) return; - if (is_10g_sds) { + if (sds->type == RTPCS_SDS_TYPE_10G) { rtpcs_sds_write_bits(odd_sds, 0x2f, 0x1d, 3, 0, 0x5); msleep(500); rtpcs_sds_write_bits(odd_sds, 0x2f, 0x1d, 3, 0, 0xf); @@ -967,18 +978,23 @@ static int rtpcs_839x_sds_set_mode(struct rtpcs_serdes *sds, mode_val << shift); } -static void rtpcs_839x_sds_init(struct rtpcs_serdes *sds) +static int rtpcs_839x_sds_probe(struct rtpcs_serdes *sds) { bool is_even = sds->id % 2 == 0; + if (sds->id == 8 || sds->id == 9 || sds->id == 12 || sds->id == 13) + sds->type = RTPCS_SDS_TYPE_10G; + else + sds->type = RTPCS_SDS_TYPE_5G; + /* * This function is quite "mystic". It has been taken over from the vendor SDK function * rtl839x_serdes_patch_init(). There is not much documentation about it but one could * lookup the fields from the field headers. The 5G SerDes seem to work out of the box * so only setup the 10G SerDes for now. */ - if (sds->id != 8 && sds->id != 9 && sds->id != 12 && sds->id != 13) - return; + if (sds->type == RTPCS_SDS_TYPE_5G) + return 0; /* Part 1: register setup */ rtpcs_sds_write(sds, 0x2e, 0x0, 0x5800); @@ -1080,13 +1096,13 @@ static void rtpcs_839x_sds_init(struct rtpcs_serdes *sds) rtpcs_sds_write_bits(sds, 0x2e, 0x13, 9, 9, 0x0000); rtpcs_sds_write_bits(sds, 0x2e, 0x13, 3, 0, 0x0008); rtpcs_sds_write_bits(sds, 0x2e, 0x13, 8, 5, 0x0008); + + return 0; } static int rtpcs_839x_init(struct rtpcs_ctrl *ctrl) { - for (int sds_id = 0; sds_id < ctrl->cfg->serdes_count; sds_id++) - rtpcs_839x_sds_init(&ctrl->serdes[sds_id]); - + /* reset all SerDes once after patching has been applied before */ for (int sds_id = 0; sds_id < ctrl->cfg->serdes_count; sds_id++) rtpcs_839x_sds_reset(&ctrl->serdes[sds_id]); @@ -1102,7 +1118,7 @@ static int rtpcs_839x_setup_serdes(struct rtpcs_serdes *sds, * at startup for QSGMII. Thus, connected PHYs should work out * of the box. */ - if (sds->id != 8 && sds->id != 9 && sds->id != 12 && sds->id != 13) + if (sds->type == RTPCS_SDS_TYPE_5G) return 0; ret = rtpcs_839x_sds_set_mode(sds, hw_mode); @@ -1455,7 +1471,7 @@ static int __rtpcs_930x_sds_get_usxgmii_submode(struct rtpcs_serdes *sds) u8 sds_id = sds->id; int submode, ret; - if (sds_id < 2 || sds_id > 9) { + if (sds->type != RTPCS_SDS_TYPE_10G) { pr_err("%s: SerDes %u doesn't support USXGMII submode\n", __func__, sds_id); return -ENOTSUPP; } @@ -1472,7 +1488,7 @@ static int __rtpcs_930x_sds_set_usxgmii_submode(struct rtpcs_serdes *sds, u32 su { u8 sds_id = sds->id; - if (sds_id < 2 || sds_id > 9) { + if (sds->type != RTPCS_SDS_TYPE_10G) { pr_err("%s: SerDes %u doesn't support USXGMII submode\n", __func__, sds_id); return -ENOTSUPP; } @@ -2841,7 +2857,7 @@ static int rtpcs_930x_sds_config_hw_mode(struct rtpcs_serdes *sds, enum rtpcs_sd apply_fn = is_xsgmii ? rtpcs_sds_apply_config_xsg : rtpcs_sds_apply_config; if (hw_mode == RTPCS_SDS_MODE_QSGMII) { - if (sds->id >= 2) + if (sds->type != RTPCS_SDS_TYPE_5G) return -ENOTSUPP; return rtpcs_sds_apply_config(sds, rtpcs_930x_sds_cfg_5g_qsgmii, @@ -3031,6 +3047,18 @@ skip_cali: return 0; } +static int rtpcs_930x_sds_probe(struct rtpcs_serdes *sds) +{ + if (sds->id < 2) + sds->type = RTPCS_SDS_TYPE_5G; + else if (sds->id <= 9) + sds->type = RTPCS_SDS_TYPE_10G; + else + sds->type = RTPCS_SDS_TYPE_UNKNOWN; + + return 0; +} + /* RTL931X */ /* @@ -3296,7 +3324,7 @@ static void rtpcs_931x_sds_reset(struct rtpcs_serdes *sds) static void rtpcs_931x_sds_rx_reset(struct rtpcs_serdes *sds) { - if (sds->id < 2) + if (sds->type != RTPCS_SDS_TYPE_10G) return; rtpcs_sds_write(sds, 0x2e, 0x12, 0x2740); @@ -3594,7 +3622,7 @@ static int rtpcs_931x_sds_config_tx(struct rtpcs_serdes *sds, { const struct rtpcs_sds_tx_config *tx_cfg; - if (sds->id < 2) + if (sds->type != RTPCS_SDS_TYPE_10G) return 0; switch (sds_media) { @@ -3920,6 +3948,16 @@ static int rtpcs_931x_init_mac_groups(struct rtpcs_ctrl *ctrl) return 0; } +static int rtpcs_931x_sds_probe(struct rtpcs_serdes *sds) +{ + if (sds->id >= 2) + sds->type = RTPCS_SDS_TYPE_10G; + else + sds->type = RTPCS_SDS_TYPE_UNKNOWN; + + return 0; +} + static int rtpcs_931x_init(struct rtpcs_ctrl *ctrl) { int ret; @@ -4175,6 +4213,10 @@ static int rtpcs_probe(struct platform_device *pdev) sds->id = i; sds->ops = ctrl->cfg->sds_ops; sds->regs = ctrl->cfg->sds_regs; + + ret = ctrl->cfg->sds_probe(sds); + if (ret) + return ret; } for_each_child_of_node(dev->of_node, child) { @@ -4238,6 +4280,7 @@ static const struct rtpcs_config rtpcs_838x_cfg = { .sds_ops = &rtpcs_838x_sds_ops, .sds_regs = &rtpcs_838x_sds_regs, .init = rtpcs_838x_init, + .sds_probe = rtpcs_838x_sds_probe, .setup_serdes = rtpcs_838x_setup_serdes, }; @@ -4273,6 +4316,7 @@ static const struct rtpcs_config rtpcs_839x_cfg = { .sds_ops = &rtpcs_839x_sds_ops, .sds_regs = &rtpcs_839x_sds_regs, .init = rtpcs_839x_init, + .sds_probe = rtpcs_839x_sds_probe, .setup_serdes = rtpcs_839x_setup_serdes, }; @@ -4313,6 +4357,7 @@ static const struct rtpcs_config rtpcs_930x_cfg = { .sds_ops = &rtpcs_930x_sds_ops, .sds_regs = &rtpcs_930x_sds_regs, .init = rtpcs_93xx_init, + .sds_probe = rtpcs_930x_sds_probe, .setup_serdes = rtpcs_930x_setup_serdes, }; @@ -4352,6 +4397,7 @@ static const struct rtpcs_config rtpcs_931x_cfg = { .sds_ops = &rtpcs_931x_sds_ops, .sds_regs = &rtpcs_931x_sds_regs, .init = rtpcs_931x_init, + .sds_probe = rtpcs_931x_sds_probe, .setup_serdes = rtpcs_931x_setup_serdes, }; diff --git a/target/linux/realtek/image/Makefile b/target/linux/realtek/image/Makefile index 965657938e..2b95035e9e 100644 --- a/target/linux/realtek/image/Makefile +++ b/target/linux/realtek/image/Makefile @@ -17,7 +17,9 @@ DEVICE_VARS += \ H3C_DEVICE_ID \ H3C_PRODUCT_ID \ LINKSYS_HEADER \ - ZYXEL_VERS + ZYNFW_BOARD \ + ZYNFW_ALIGN \ + ZYXEL_VERS define Build/rt-compress $(STAGING_DIR_HOST)/bin/xz -9 --format=lzma --stdout "$@" > "$@.new" @@ -168,6 +170,15 @@ define Device/rt-loader-bootbase KERNEL_INITRAMFS := $$(KERNEL/rt-compress) | uImage lzma | rt-loader endef +define Build/zynos-firmware + $(STAGING_DIR_HOST)/bin/mkzynfw \ + -B $(ZYNFW_BOARD) \ + -b $(KDIR)/loader-$(DEVICE_NAME).bin \ + -r $@:$(ZYNFW_ALIGN) \ + -o $@.new + mv $@.new $@ +endef + include $(SUBTARGET).mk $(eval $(call BuildImage)) diff --git a/target/linux/realtek/image/common.mk b/target/linux/realtek/image/common.mk index f8c5d0aa82..3a820fec43 100644 --- a/target/linux/realtek/image/common.mk +++ b/target/linux/realtek/image/common.mk @@ -122,3 +122,20 @@ define Device/zyxel_xgs1210-12 rt-loader | \ uImage none endef + +define Device/zyxel_zynos + $(Device/rt-loader-bootbase) + DEVICE_VENDOR := Zyxel + ZYNFW_BOARD := $$(DEVICE_MODEL) + COMPILE := loader-$(1).bin + COMPILE/loader-$(1).bin := rt-loader-standalone + IMAGES += factory.bin + IMAGE/factory.bin := \ + append-kernel | \ + pad-to 64k | \ + append-rootfs | \ + pad-rootfs | \ + check-size | \ + zynos-firmware + IMAGE/sysupgrade.bin := $$(IMAGE/factory.bin) | append-metadata +endef diff --git a/target/linux/realtek/image/rtl931x.mk b/target/linux/realtek/image/rtl931x.mk index 0302988742..a824376b0f 100644 --- a/target/linux/realtek/image/rtl931x.mk +++ b/target/linux/realtek/image/rtl931x.mk @@ -1,5 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only +include ./common.mk + define Device/plasmacloud-common SOC := rtl9312 UIMAGE_MAGIC := 0x93100000 @@ -44,3 +46,30 @@ define Device/xikestor_sks8300-12x-v1 append-rootfs | pad-rootfs | append-metadata | check-size endef TARGET_DEVICES += xikestor_sks8300-12x-v1 + +define Device/zyxel_xs1930 + SOC := rtl9313 + DEVICE_PACKAGES := kmod-hwmon-lm85 + FLASH_ADDR := 0xb4280000 + IMAGE_SIZE := 31808k + ZYNFW_ALIGN := 0x10000 + $(Device/zyxel_zynos) +endef + +define Device/zyxel_xs1930-10 + DEVICE_MODEL := XS1930-10 + $(Device/zyxel_xs1930) +endef +TARGET_DEVICES += zyxel_xs1930-10 + +define Device/zyxel_xs1930-12f + DEVICE_MODEL := XS1930-12F + $(Device/zyxel_xs1930) +endef +TARGET_DEVICES += zyxel_xs1930-12f + +define Device/zyxel_xs1930-12hp + DEVICE_MODEL := XS1930-12HP + $(Device/zyxel_xs1930) +endef +TARGET_DEVICES += zyxel_xs1930-12hp diff --git a/target/linux/realtek/rtl931x/config-6.18 b/target/linux/realtek/rtl931x/config-6.18 index 5520ff3f35..3f5a7289c6 100644 --- a/target/linux/realtek/rtl931x/config-6.18 +++ b/target/linux/realtek/rtl931x/config-6.18 @@ -4,6 +4,7 @@ CONFIG_ARCH_KEEP_MEMBLOCK=y CONFIG_ARCH_MMAP_RND_BITS_MAX=15 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_AQUANTIA_PHY=y CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_BLK_DEV_RAM_SIZE=4096 @@ -81,6 +82,8 @@ CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB_IRQCHIP=y CONFIG_GPIO_CDEV=y CONFIG_GPIO_GENERIC=y +CONFIG_GPIO_LINE_MUX=y +CONFIG_GPIO_PCA953X=y CONFIG_GPIO_REALTEK_OTTO=y CONFIG_GPIO_REGMAP=y CONFIG_GRO_CELLS=y @@ -163,6 +166,7 @@ CONFIG_MTD_SPLIT_EVA_FW=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_TPLINK_FW=y CONFIG_MTD_SPLIT_UIMAGE_FW=y +CONFIG_MUX_GPIO=y CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_SRCU_NMI_SAFE=y CONFIG_NET_DEVLINK=y diff --git a/target/linux/sifiveu/Makefile b/target/linux/sifiveu/Makefile index 5bf141244c..d33734e81e 100644 --- a/target/linux/sifiveu/Makefile +++ b/target/linux/sifiveu/Makefile @@ -11,8 +11,7 @@ FEATURES:=ext4 KERNELNAME:=Image dtbs SUBTARGETS:=generic -KERNEL_PATCHVER:=6.12 -KERNEL_TESTING_PATCHVER:=6.18 +KERNEL_PATCHVER:=6.18 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/sifiveu/config-6.12 b/target/linux/sifiveu/config-6.12 deleted file mode 100644 index 3f2475626c..0000000000 --- a/target/linux/sifiveu/config-6.12 +++ /dev/null @@ -1,462 +0,0 @@ -CONFIG_64BIT=y -# CONFIG_ACPI is not set -# CONFIG_ARCH_CANAAN is not set -CONFIG_ARCH_DEFAULT_CRASH_DUMP=y -CONFIG_ARCH_DMA_ADDR_T_64BIT=y -CONFIG_ARCH_DMA_DEFAULT_COHERENT=y -CONFIG_ARCH_HIBERNATION_POSSIBLE=y -CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y -# CONFIG_ARCH_MICROCHIP is not set -CONFIG_ARCH_MMAP_RND_BITS=18 -CONFIG_ARCH_MMAP_RND_BITS_MAX=24 -CONFIG_ARCH_MMAP_RND_BITS_MIN=18 -CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17 -CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y -CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y -CONFIG_ARCH_PROC_KCORE_TEXT=y -CONFIG_ARCH_RV64I=y -CONFIG_ARCH_SELECT_MEMORY_MODEL=y -CONFIG_ARCH_SIFIVE=y -# CONFIG_ARCH_SOPHGO is not set -CONFIG_ARCH_SPARSEMEM_ENABLE=y -CONFIG_ARCH_STACKWALK=y -CONFIG_ARCH_SUSPEND_POSSIBLE=y -# CONFIG_ARCH_THEAD is not set -CONFIG_ARCH_WANTS_NO_INSTR=y -CONFIG_ARCH_WANTS_THP_SWAP=y -CONFIG_ASN1=y -CONFIG_ASSOCIATIVE_ARRAY=y -CONFIG_ATA=y -CONFIG_ATA_VERBOSE_ERROR=y -# CONFIG_AX45MP_L2_CACHE is not set -CONFIG_BLK_DEV_SD=y -CONFIG_BLK_DEV_WRITE_MOUNTED=y -CONFIG_BLK_MQ_PCI=y -CONFIG_BUFFER_HEAD=y -CONFIG_CAVIUM_PTP=y -CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y -CONFIG_CLK_SIFIVE=y -CONFIG_CLK_SIFIVE_PRCI=y -CONFIG_CLONE_BACKWARDS=y -CONFIG_CLZ_TAB=y -CONFIG_CMODEL_MEDANY=y -# CONFIG_CMODEL_MEDLOW is not set -CONFIG_COMMON_CLK=y -CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1 -# CONFIG_COMPAT_32BIT_TIME is not set -CONFIG_COMPAT_BRK=y -CONFIG_CONSOLE_TRANSLATIONS=y -CONFIG_CONTEXT_TRACKING=y -CONFIG_CONTEXT_TRACKING_IDLE=y -CONFIG_COREDUMP=y -CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y -CONFIG_CPU_ISOLATION=y -CONFIG_CPU_MITIGATIONS=y -CONFIG_CPU_RMAP=y -CONFIG_CRC16=y -CONFIG_CRC7=y -CONFIG_CRC_ITU_T=y -CONFIG_CRYPTO_CRC32C=y -CONFIG_CRYPTO_DRBG=y -CONFIG_CRYPTO_DRBG_HMAC=y -CONFIG_CRYPTO_DRBG_MENU=y -CONFIG_CRYPTO_ECB=y -CONFIG_CRYPTO_ECHAINIV=y -CONFIG_CRYPTO_GENIV=y -CONFIG_CRYPTO_HMAC=y -CONFIG_CRYPTO_JITTERENTROPY=y -CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64 -CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32 -CONFIG_CRYPTO_JITTERENTROPY_OSR=1 -CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y -CONFIG_CRYPTO_LIB_GF128MUL=y -CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1 -CONFIG_CRYPTO_LIB_SHA1=y -CONFIG_CRYPTO_LIB_SHA256=y -CONFIG_CRYPTO_LIB_UTILS=y -CONFIG_CRYPTO_RNG=y -CONFIG_CRYPTO_RNG2=y -CONFIG_CRYPTO_RNG_DEFAULT=y -CONFIG_CRYPTO_RSA=y -CONFIG_CRYPTO_SHA256=y -CONFIG_CRYPTO_SHA256_RISCV64=y -CONFIG_CRYPTO_SHA3=y -CONFIG_CRYPTO_SHA512=y -CONFIG_CRYPTO_SHA512_RISCV64=y -CONFIG_DEBUG_BUGVERBOSE=y -CONFIG_DEBUG_INFO=y -CONFIG_DECOMPRESS_GZIP=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -CONFIG_DIMLIB=y -CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC=y -CONFIG_DMA_DIRECT_REMAP=y -CONFIG_DMA_NEED_SYNC=y -CONFIG_DMI=y -CONFIG_DMIID=y -# CONFIG_DMI_SYSFS is not set -CONFIG_DNOTIFY=y -CONFIG_DTC=y -CONFIG_DUMMY_CONSOLE=y -CONFIG_DYNAMIC_SIGFRAME=y -CONFIG_EDAC=y -# CONFIG_EDAC_DEBUG is not set -CONFIG_EDAC_LEGACY_SYSFS=y -CONFIG_EDAC_SIFIVE=y -CONFIG_EDAC_SUPPORT=y -CONFIG_EFI=y -CONFIG_EFIVAR_FS=m -# CONFIG_EFI_BOOTLOADER_CONTROL is not set -# CONFIG_EFI_CAPSULE_LOADER is not set -# CONFIG_EFI_COCO_SECRET is not set -# CONFIG_EFI_DISABLE_PCI_DMA is not set -# CONFIG_EFI_DISABLE_RUNTIME is not set -CONFIG_EFI_EARLYCON=y -CONFIG_EFI_ESRT=y -CONFIG_EFI_GENERIC_STUB=y -CONFIG_EFI_PARAMS_FROM_FDT=y -CONFIG_EFI_RUNTIME_WRAPPERS=y -CONFIG_EFI_STUB=y -# CONFIG_EFI_TEST is not set -# CONFIG_EFI_ZBOOT is not set -CONFIG_ELF_CORE=y -# CONFIG_ERRATA_ANDES is not set -CONFIG_ERRATA_SIFIVE=y -CONFIG_ERRATA_SIFIVE_CIP_1200=y -CONFIG_ERRATA_SIFIVE_CIP_453=y -# CONFIG_ERRATA_THEAD is not set -CONFIG_EXCLUSIVE_SYSTEM_RAM=y -CONFIG_EXECMEM=y -CONFIG_EXT4_FS=y -CONFIG_FAILOVER=y -CONFIG_FAT_FS=y -CONFIG_FHANDLE=y -CONFIG_FIXED_PHY=y -CONFIG_FIX_EARLYCON_MEM=y -CONFIG_FONT_8x16=y -CONFIG_FONT_AUTOSELECT=y -CONFIG_FONT_SUPPORT=y -CONFIG_FPU=y -CONFIG_FRAME_POINTER=y -CONFIG_FS_IOMAP=y -CONFIG_FS_MBCACHE=y -CONFIG_FS_STACK=y -CONFIG_FUNCTION_ALIGNMENT=0 -CONFIG_FWNODE_MDIO=y -CONFIG_FW_LOADER_PAGED_BUF=y -CONFIG_FW_LOADER_SYSFS=y -CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE=y -CONFIG_GENERIC_ALLOCATOR=y -CONFIG_GENERIC_ARCH_TOPOLOGY=y -CONFIG_GENERIC_BUG=y -CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y -CONFIG_GENERIC_CLOCKEVENTS=y -CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y -CONFIG_GENERIC_CPU_DEVICES=y -CONFIG_GENERIC_CPU_VULNERABILITIES=y -CONFIG_GENERIC_CSUM=y -CONFIG_GENERIC_EARLY_IOREMAP=y -CONFIG_GENERIC_ENTRY=y -CONFIG_GENERIC_GETTIMEOFDAY=y -CONFIG_GENERIC_IDLE_POLL_SETUP=y -CONFIG_GENERIC_IOREMAP=y -CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y -CONFIG_GENERIC_IRQ_INJECTION=y -CONFIG_GENERIC_IRQ_IPI_MUX=y -CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y -CONFIG_GENERIC_IRQ_MULTI_HANDLER=y -CONFIG_GENERIC_IRQ_SHOW=y -CONFIG_GENERIC_IRQ_SHOW_LEVEL=y -CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y -CONFIG_GENERIC_MSI_IRQ=y -CONFIG_GENERIC_PCI_IOMAP=y -CONFIG_GENERIC_SCHED_CLOCK=y -CONFIG_GENERIC_SMP_IDLE_THREAD=y -CONFIG_GENERIC_STRNCPY_FROM_USER=y -CONFIG_GENERIC_STRNLEN_USER=y -CONFIG_GENERIC_TIME_VSYSCALL=y -CONFIG_GLOB=y -CONFIG_GPIOLIB_IRQCHIP=y -CONFIG_GPIO_CDEV=y -CONFIG_GPIO_CDEV_V1=y -CONFIG_GPIO_GENERIC=y -CONFIG_GPIO_SIFIVE=y -CONFIG_HARDIRQS_SW_RESEND=y -CONFIG_HAS_DMA=y -CONFIG_HAS_IOMEM=y -CONFIG_HAS_IOPORT=y -CONFIG_HAS_IOPORT_MAP=y -CONFIG_HOTPLUG_PCI=y -# CONFIG_HOTPLUG_PCI_CPCI is not set -CONFIG_HOTPLUG_PCI_PCIE=y -CONFIG_HOTPLUG_PCI_SHPC=y -CONFIG_HZ_PERIODIC=y -CONFIG_I2C=y -CONFIG_I2C_BOARDINFO=y -CONFIG_I2C_HELPER_AUTO=y -CONFIG_I2C_OCORES=y -CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 -CONFIG_INITRAMFS_SOURCE="" -CONFIG_INPUT=y -# CONFIG_IOMMUFD is not set -# CONFIG_IOMMU_DEBUGFS is not set -CONFIG_IOMMU_SUPPORT=y -CONFIG_IO_URING=y -CONFIG_IRQCHIP=y -CONFIG_IRQ_DOMAIN=y -CONFIG_IRQ_DOMAIN_HIERARCHY=y -CONFIG_IRQ_FORCED_THREADING=y -CONFIG_IRQ_STACKS=y -CONFIG_IRQ_WORK=y -CONFIG_JBD2=y -CONFIG_KALLSYMS=y -# CONFIG_KERNEL_UNCOMPRESSED is not set -CONFIG_KEYS=y -CONFIG_LEDS_PWM=y -CONFIG_LEDS_TRIGGER_DISK=y -CONFIG_LEGACY_DIRECT_IO=y -CONFIG_LEGACY_PTYS=y -CONFIG_LEGACY_PTY_COUNT=256 -CONFIG_LIBFDT=y -CONFIG_LOCALVERSION_AUTO=y -CONFIG_LOCK_DEBUGGING_SUPPORT=y -CONFIG_LOCK_SPIN_ON_OWNER=y -CONFIG_MACB=y -# CONFIG_MACB_PCI is not set -CONFIG_MACB_USE_HWSTAMP=y -CONFIG_MDIO_BUS=y -CONFIG_MDIO_DEVICE=y -CONFIG_MDIO_DEVRES=y -# CONFIG_MEM_ALLOC_PROFILING is not set -CONFIG_MFD_SYSCON=y -CONFIG_MICROSEMI_PHY=y -CONFIG_MIGRATION=y -CONFIG_MMC=y -CONFIG_MMC_BLOCK=y -CONFIG_MMC_SDHCI=y -CONFIG_MMC_SDHCI_CADENCE=y -CONFIG_MMC_SDHCI_IO_ACCESSORS=y -CONFIG_MMC_SDHCI_PLTFM=y -CONFIG_MMC_SPI=y -CONFIG_MMIOWB=y -CONFIG_MMU_LAZY_TLB_REFCOUNT=y -CONFIG_MODULES_USE_ELF_RELA=y -# CONFIG_MODULE_COMPRESS is not set -CONFIG_MPILIB=y -CONFIG_MQ_IOSCHED_DEADLINE=y -CONFIG_MQ_IOSCHED_KYBER=y -CONFIG_MTD_SPI_NOR=y -CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y -CONFIG_MUTEX_SPIN_ON_OWNER=y -CONFIG_NEED_DMA_MAP_STATE=y -CONFIG_NEED_TASKS_RCU=y -CONFIG_NET_EGRESS=y -CONFIG_NET_FAILOVER=y -CONFIG_NET_FLOW_LIMIT=y -CONFIG_NET_INGRESS=y -CONFIG_NET_PTP_CLASSIFY=y -CONFIG_NET_SELFTESTS=y -CONFIG_NET_XGRESS=y -CONFIG_NLS=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y -# CONFIG_NONPORTABLE is not set -CONFIG_NR_CPUS=8 -CONFIG_NVMEM=y -CONFIG_NVMEM_LAYOUTS=y -CONFIG_NVMEM_SYSFS=y -CONFIG_OF=y -CONFIG_OF_ADDRESS=y -CONFIG_OF_EARLY_FLATTREE=y -CONFIG_OF_FLATTREE=y -CONFIG_OF_GPIO=y -CONFIG_OF_IRQ=y -CONFIG_OF_KOBJ=y -CONFIG_OF_MDIO=y -CONFIG_OID_REGISTRY=y -CONFIG_PADATA=y -CONFIG_PAGE_OFFSET=0xff60000000000000 -CONFIG_PAGE_POOL=y -CONFIG_PAGE_REPORTING=y -CONFIG_PAGE_SHIFT=12 -CONFIG_PAGE_SIZE_LESS_THAN_256KB=y -CONFIG_PAGE_SIZE_LESS_THAN_64KB=y -CONFIG_PCI=y -CONFIG_PCIEAER=y -CONFIG_PCIEAER_INJECT=m -CONFIG_PCIEASPM=y -CONFIG_PCIEASPM_DEFAULT=y -# CONFIG_PCIEASPM_PERFORMANCE is not set -# CONFIG_PCIEASPM_POWERSAVE is not set -# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set -CONFIG_PCIEPORTBUS=y -CONFIG_PCIE_DPC=y -CONFIG_PCIE_ECRC=y -CONFIG_PCIE_FU740=y -CONFIG_PCIE_PTM=y -CONFIG_PCIE_XILINX=y -CONFIG_PCI_DEBUG=y -CONFIG_PCI_DOMAINS=y -CONFIG_PCI_DOMAINS_GENERIC=y -CONFIG_PCI_ECAM=y -CONFIG_PCI_HOST_COMMON=y -CONFIG_PCI_HOST_GENERIC=y -CONFIG_PCI_LABEL=y -CONFIG_PCI_MSI=y -CONFIG_PCI_SW_SWITCHTEC=y -CONFIG_PER_VMA_LOCK=y -CONFIG_PGTABLE_LEVELS=5 -CONFIG_PHYLIB=y -CONFIG_PHYLIB_LEDS=y -CONFIG_PHYLINK=y -CONFIG_PHYS_ADDR_T_64BIT=y -CONFIG_PORTABLE=y -CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y -CONFIG_POWER_RESET=y -CONFIG_POWER_RESET_GPIO=y -CONFIG_POWER_RESET_GPIO_RESTART=y -CONFIG_POWER_RESET_RESTART=y -CONFIG_POWER_RESET_SYSCON=y -CONFIG_POWER_RESET_SYSCON_POWEROFF=y -CONFIG_PPS=y -CONFIG_PRINTK_TIME=y -CONFIG_PTP_1588_CLOCK=y -CONFIG_PTP_1588_CLOCK_OPTIONAL=y -CONFIG_PWM=y -CONFIG_PWM_SIFIVE=y -CONFIG_QUEUED_RWLOCKS=y -CONFIG_RANDSTRUCT_NONE=y -CONFIG_RAS=y -CONFIG_RATIONAL=y -CONFIG_RCU_TRACE=y -CONFIG_RD_GZIP=y -CONFIG_REALTEK_PHY=y -CONFIG_REGMAP=y -CONFIG_REGMAP_MMIO=y -# CONFIG_RESET_ATTACK_MITIGATION is not set -CONFIG_RESET_CONTROLLER=y -CONFIG_RESET_SIMPLE=y -CONFIG_RFS_ACCEL=y -CONFIG_RISCV=y -CONFIG_RISCV_ALTERNATIVE=y -CONFIG_RISCV_APLIC=y -CONFIG_RISCV_APLIC_MSI=y -# CONFIG_RISCV_BOOT_SPINWAIT is not set -CONFIG_RISCV_DMA_NONCOHERENT=y -# CONFIG_RISCV_EMULATED_UNALIGNED_ACCESS is not set -CONFIG_RISCV_IMSIC=y -CONFIG_RISCV_IMSIC_PCI=y -CONFIG_RISCV_INTC=y -CONFIG_RISCV_ISA_C=y -CONFIG_RISCV_ISA_FALLBACK=y -CONFIG_RISCV_ISA_SVNAPOT=y -CONFIG_RISCV_ISA_SVPBMT=y -CONFIG_RISCV_ISA_V=y -CONFIG_RISCV_ISA_VENDOR_EXT=y -CONFIG_RISCV_ISA_VENDOR_EXT_ANDES=y -CONFIG_RISCV_ISA_V_DEFAULT_ENABLE=y -CONFIG_RISCV_ISA_V_UCOPY_THRESHOLD=768 -CONFIG_RISCV_ISA_ZAWRS=y -CONFIG_RISCV_ISA_ZBA=y -CONFIG_RISCV_ISA_ZBB=y -CONFIG_RISCV_ISA_ZBC=y -CONFIG_RISCV_ISA_ZICBOM=y -CONFIG_RISCV_ISA_ZICBOZ=y -CONFIG_RISCV_MISALIGNED=y -CONFIG_RISCV_PROBE_UNALIGNED_ACCESS=y -CONFIG_RISCV_SBI=y -CONFIG_RISCV_SBI_V01=y -CONFIG_RISCV_TIMER=y -CONFIG_RISCV_USE_LINKER_RELAXATION=y -CONFIG_RPS=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_I2C_AND_SPI=y -CONFIG_RUNTIME_KERNEL_TESTING_MENU=y -CONFIG_RUSTC_LLVM_VERSION=0 -CONFIG_RUSTC_SUPPORTS_RISCV=y -CONFIG_RUSTC_VERSION=0 -CONFIG_RWSEM_SPIN_ON_OWNER=y -CONFIG_SCHED_DEBUG=y -CONFIG_SCSI=y -CONFIG_SCSI_COMMON=y -CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y -CONFIG_SERIAL_8250_EXAR=y -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_PCI=y -CONFIG_SERIAL_8250_PCILIB=y -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -CONFIG_SERIAL_EARLYCON_RISCV_SBI=y -CONFIG_SERIAL_MCTRL_GPIO=y -CONFIG_SERIAL_OF_PLATFORM=y -CONFIG_SERIAL_SIFIVE=y -CONFIG_SERIAL_SIFIVE_CONSOLE=y -CONFIG_SERIO=y -CONFIG_SERIO_SERPORT=y -CONFIG_SG_POOL=y -CONFIG_SIFIVE_CCACHE=y -CONFIG_SIFIVE_PLIC=y -CONFIG_SLAB_BUCKETS=y -CONFIG_SMP=y -CONFIG_SOCK_RX_QUEUE_MAPPING=y -# CONFIG_SOC_STARFIVE is not set -CONFIG_SOFTIRQ_ON_OWN_STACK=y -CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y -CONFIG_SPARSE_IRQ=y -CONFIG_SPI=y -CONFIG_SPI_BITBANG=y -CONFIG_SPI_MASTER=y -CONFIG_SPI_MEM=y -CONFIG_SPI_SIFIVE=y -CONFIG_SPLIT_PMD_PTLOCKS=y -CONFIG_SPLIT_PTE_PTLOCKS=y -CONFIG_STACKTRACE=y -CONFIG_SWIOTLB=y -CONFIG_SWPHY=y -CONFIG_SYSCTL_ARCH_UNALIGN_ALLOW=y -CONFIG_SYSCTL_EXCEPTION_TRACE=y -# CONFIG_SYSFB_SIMPLEFB is not set -CONFIG_THREAD_INFO_IN_TASK=y -CONFIG_THREAD_SIZE_ORDER=2 -CONFIG_TICK_CPU_ACCOUNTING=y -CONFIG_TIMER_OF=y -CONFIG_TIMER_PROBE=y -CONFIG_TOOLCHAIN_HAS_V=y -CONFIG_TOOLCHAIN_HAS_VECTOR_CRYPTO=y -CONFIG_TOOLCHAIN_HAS_ZBB=y -CONFIG_TOOLCHAIN_HAS_ZBC=y -CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI=y -CONFIG_TRACE_CLOCK=y -CONFIG_TREE_RCU=y -CONFIG_TREE_SRCU=y -CONFIG_TUNE_GENERIC=y -CONFIG_UCS2_STRING=y -CONFIG_UEVENT_HELPER_PATH="" -CONFIG_USB=y -CONFIG_USB_COMMON=y -CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1 -CONFIG_USB_EHCI_HCD=y -# CONFIG_USB_EHCI_HCD_PLATFORM is not set -CONFIG_USB_EHCI_PCI=y -CONFIG_USB_NET_DRIVERS=y -CONFIG_USB_PCI=y -CONFIG_USB_STORAGE=y -CONFIG_USB_SUPPORT=y -# CONFIG_USB_UHCI_HCD is not set -CONFIG_USB_XHCI_HCD=y -CONFIG_USB_XHCI_PCI=y -# CONFIG_USB_XHCI_PLATFORM is not set -CONFIG_USER_STACKTRACE_SUPPORT=y -CONFIG_VFAT_FS=y -CONFIG_VGA_ARB=y -CONFIG_VGA_ARB_MAX_GPUS=16 -CONFIG_VMAP_STACK=y -CONFIG_VM_EVENT_COUNTERS=y -CONFIG_VT=y -CONFIG_VT_CONSOLE=y -# CONFIG_VT_HW_CONSOLE_BINDING is not set -CONFIG_WATCHDOG_CORE=y -CONFIG_XPS=y -CONFIG_XZ_DEC_RISCV=y -CONFIG_ZLIB_INFLATE=y -CONFIG_ZONE_DMA32=y -CONFIG_ZRAM_DEF_COMP="unset-value" diff --git a/target/linux/sifiveu/patches-6.12/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch b/target/linux/sifiveu/patches-6.12/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch deleted file mode 100644 index fc74b9ba73..0000000000 --- a/target/linux/sifiveu/patches-6.12/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch +++ /dev/null @@ -1,49 +0,0 @@ -From ab5c8f5492cce16ff2104393e2f1fa64a3ff6e88 Mon Sep 17 00:00:00 2001 -From: David Abdurachmanov -Date: Wed, 17 Feb 2021 06:06:14 -0800 -Subject: [PATCH 1/7] riscv: sifive: fu740: cpu{1,2,3,4} set compatible to - sifive,u74-mc - -Signed-off-by: David Abdurachmanov ---- - arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - ---- a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi -+++ b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi -@@ -42,7 +42,7 @@ - }; - }; - cpu1: cpu@1 { -- compatible = "sifive,bullet0", "riscv"; -+ compatible = "sifive,u74-mc", "sifive,bullet0", "riscv"; - d-cache-block-size = <64>; - d-cache-sets = <64>; - d-cache-size = <32768>; -@@ -69,7 +69,7 @@ - }; - }; - cpu2: cpu@2 { -- compatible = "sifive,bullet0", "riscv"; -+ compatible = "sifive,u74-mc", "sifive,bullet0", "riscv"; - d-cache-block-size = <64>; - d-cache-sets = <64>; - d-cache-size = <32768>; -@@ -96,7 +96,7 @@ - }; - }; - cpu3: cpu@3 { -- compatible = "sifive,bullet0", "riscv"; -+ compatible = "sifive,u74-mc", "sifive,bullet0", "riscv"; - d-cache-block-size = <64>; - d-cache-sets = <64>; - d-cache-size = <32768>; -@@ -123,7 +123,7 @@ - }; - }; - cpu4: cpu@4 { -- compatible = "sifive,bullet0", "riscv"; -+ compatible = "sifive,u74-mc", "sifive,bullet0", "riscv"; - d-cache-block-size = <64>; - d-cache-sets = <64>; - d-cache-size = <32768>; diff --git a/target/linux/x86/base-files/etc/board.d/02_network b/target/linux/x86/base-files/etc/board.d/02_network index abe14791ae..4d2d0d9a4a 100644 --- a/target/linux/x86/base-files/etc/board.d/02_network +++ b/target/linux/x86/base-files/etc/board.d/02_network @@ -34,6 +34,13 @@ cisco-mx100-hw) dell-emc-edge620) ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth7" "eth6" ;; +dfi-inc-adn553| \ +dfi-inc-asl553) + ucidef_set_network_device_path "eth0" "pci0000:00/0000:00:1c.0/0000:01:00.0" + ucidef_set_network_device_path "eth1" "pci0000:00/0000:00:1d.0/0000:03:00.0" + ucidef_set_network_device_path "eth2" "pci0000:00/0000:00:1c.6/0000:02:00.0" + ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0" + ;; gowin-solution-co-ltd-gw-mb-u01) ucidef_set_network_device_path "eth1" "pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:02.0/0000:04:00.0" ucidef_set_network_device_path "eth2" "pci0000:00/0000:00:1c.0/0000:01:00.0/0000:02:00.0/0000:03:00.0" diff --git a/target/linux/x86/base-files/lib/preinit/01_sysinfo b/target/linux/x86/base-files/lib/preinit/01_sysinfo index 054c4b3417..8dbe4f4063 100644 --- a/target/linux/x86/base-files/lib/preinit/01_sysinfo +++ b/target/linux/x86/base-files/lib/preinit/01_sysinfo @@ -14,6 +14,7 @@ do_sysinfo_x86() { vendor="$(cat /sys/devices/virtual/dmi/id/$file 2>/dev/null)" case "$vendor" in empty | \ + Default\ string | \ System\ manufacturer | \ To\ [bB]e\ [fF]illed\ [bB]y\ O\.E\.M\.) continue @@ -26,6 +27,7 @@ do_sysinfo_x86() { product="$(cat /sys/devices/virtual/dmi/id/$file 2>/dev/null)" case "$vendor:$product" in ?*:empty | \ + ?*:Default\ string | \ ?*:System\ Product\ Name | \ ?*:To\ [bB]e\ [fF]illed\ [bB]y\ O\.E\.M\.) continue diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index 4e00556cf7..a3687af7fc 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -6,14 +6,6 @@ choice help Select the version of binutils you wish to use. - config BINUTILS_USE_VERSION_2_42 - bool "Binutils 2.42" - select BINUTILS_VERSION_2_42 - - config BINUTILS_USE_VERSION_2_43 - bool "Binutils 2.43.1" - select BINUTILS_VERSION_2_43 - config BINUTILS_USE_VERSION_2_44 bool "Binutils 2.44" select BINUTILS_VERSION_2_44 @@ -21,6 +13,10 @@ choice config BINUTILS_USE_VERSION_2_45 bool "Binutils 2.45.1" select BINUTILS_VERSION_2_45 + + config BINUTILS_USE_VERSION_2_46 + bool "Binutils 2.46" + select BINUTILS_VERSION_2_46 endchoice config EXTRA_BINUTILS_CONFIG_OPTIONS diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index b78565b003..4102dd6dd3 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -1,10 +1,4 @@ -config BINUTILS_VERSION_2_42 - bool - -config BINUTILS_VERSION_2_43 - bool - config BINUTILS_VERSION_2_44 default y if !TOOLCHAINOPTS bool @@ -12,9 +6,11 @@ config BINUTILS_VERSION_2_44 config BINUTILS_VERSION_2_45 bool +config BINUTILS_VERSION_2_46 + bool + config BINUTILS_VERSION string - default "2.42" if BINUTILS_VERSION_2_42 - default "2.43.1" if BINUTILS_VERSION_2_43 default "2.44" if BINUTILS_VERSION_2_44 default "2.45.1" if BINUTILS_VERSION_2_45 + default "2.46.0" if BINUTILS_VERSION_2_46 diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 8eb2460d16..74d7c3c4d6 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=binutils PKG_VERSION:=$(call qstrip,$(CONFIG_BINUTILS_VERSION)) -BIN_VERSION:=$(PKG_VERSION) +BASE_VERSION:=$(subst $(space),.,$(wordlist 1,2,$(subst .,$(space),$(PKG_VERSION)))) PKG_SOURCE_URL:=@GNU/binutils/ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz @@ -16,14 +16,6 @@ PKG_CPE_ID:=cpe:/a:gnu:binutils TAR_OPTIONS += --exclude='*.rej' -ifeq ($(PKG_VERSION),2.42) - PKG_HASH:=f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800 -endif - -ifeq ($(PKG_VERSION),2.43.1) - PKG_HASH:=13f74202a3c4c51118b797a39ea4200d3f6cfbe224da6d1d95bb938480132dfd -endif - ifeq ($(PKG_VERSION),2.44) PKG_HASH:=ce2017e059d63e67ddb9240e9d4ec49c2893605035cd60e92ad53177f4377237 endif @@ -32,9 +24,13 @@ ifeq ($(PKG_VERSION),2.45.1) PKG_HASH:=5fe101e6fe9d18fdec95962d81ed670fdee5f37e3f48f0bef87bddf862513aa5 endif +ifeq ($(PKG_VERSION),2.46.0) + PKG_HASH:=d75a94f4d73e7a4086f7513e67e439e8fcdcbb726ffe63f4661744e6256b2cf2 +endif + HOST_BUILD_PARALLEL:=1 -PATCH_DIR:=./patches/$(PKG_VERSION) +PATCH_DIR:=./patches/$(BASE_VERSION) include $(INCLUDE_DIR)/toolchain-build.mk @@ -53,17 +49,21 @@ HOST_CONFIGURE_ARGS = \ --host=$(GNU_HOST_NAME) \ --target=$(REAL_GNU_TARGET_NAME) \ --with-sysroot=$(TOOLCHAIN_DIR) \ - --with-system-zlib \ - --with-zstd \ + --enable-dependency-tracking \ + --enable-serial-configure \ + --enable-obsolete \ --enable-deterministic-archives \ --enable-plugins \ --enable-lto \ + --disable-werror \ --disable-gprofng \ --disable-multilib \ - --disable-werror \ --disable-nls \ --disable-sim \ --disable-gdb \ + --with-system-zlib \ + --with-zstd \ + --without-debuginfod \ $(GRAPHITE_CONFIGURE) \ $(SOFT_FLOAT_CONFIG_OPTION) \ $(call qstrip,$(CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS)) @@ -81,8 +81,34 @@ ifneq ($(CONFIG_EXTRA_TARGET_ARCH),) --enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX) endif -HOST_CONFIGURE_VARS += \ - acx_cv_cc_gcc_supports_ada=false +BINUTILS_VARS = \ + ac_cv_path_EXPECT= \ + ac_cv_path_GMSGFMT=: \ + ac_cv_path_MSGFMT=: \ + ac_cv_path_MSGMERGE=: \ + ac_cv_path_XGETTEXT=: \ + ac_cv_prog_ACLOCAL=$(STAGING_DIR_HOST)/bin/aclocal \ + ac_cv_prog_AUTOCONF=$(STAGING_DIR_HOST)/bin/autoconf \ + ac_cv_prog_AUTOHEADER=$(STAGING_DIR_HOST)/bin/autoheader \ + ac_cv_prog_AUTOMAKE=$(STAGING_DIR_HOST)/bin/automake \ + ac_cv_prog_CARGO= \ + ac_cv_prog_EXPECT= \ + ac_cv_prog_GDC= \ + ac_cv_prog_GNATBIND= \ + ac_cv_prog_GNATMAKE= \ + ac_cv_prog_MAKEINFO= \ + ac_cv_prog_ac_ct_GDC= \ + ac_cv_prog_ac_ct_GNATBIND= \ + ac_cv_prog_ac_ct_GNATMAKE= \ + ac_cv_dejagnu_compat=no \ + ac_cv_libctf_tcl_try=no \ + acx_cv_cc_gcc_supports_ada=no \ + acx_cv_d_compiler_works=no \ + + +HOST_CONFIGURE_VARS += $(BINUTILS_VARS) + +HOST_MAKE_VARS += $(BINUTILS_VARS) define Host/Prepare $(call Host/Prepare/Default) @@ -91,7 +117,8 @@ define Host/Prepare endef define Host/Compile - +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all + +$(HOST_MAKE_VARS) \ + $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) all endef define Host/Install diff --git a/toolchain/binutils/patches/2.42/001-PR-30569-always-call-elf_backend_size_dynamic_sectio.patch b/toolchain/binutils/patches/2.42/001-PR-30569-always-call-elf_backend_size_dynamic_sectio.patch deleted file mode 100644 index 96f3971f6d..0000000000 --- a/toolchain/binutils/patches/2.42/001-PR-30569-always-call-elf_backend_size_dynamic_sectio.patch +++ /dev/null @@ -1,2228 +0,0 @@ -From af969b14aedcc0ae27dcefab4327ff2d153dec8b Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Thu, 28 Mar 2024 19:25:42 +1030 -Subject: [PATCH 1/2] PR 30569, always call elf_backend_size_dynamic_sections - -This largely mechanical patch is preparation for a followup patch. - -For quite some time I've thought that it would be useful to call -elf_backend_size_dynamic_sections even when no dynamic objects are -seen by the linker. That's what this patch does, with some renaming. -There are no functional changes to the linker, just a move of the -dynobj test in bfd_elf_size_dynamic_sections to target backend -functions, replacing the asserts/aborts already there. No doubt some -of the current always_size_sections functions could be moved to -size_dynamic_sections but I haven't made that change. - -Because both hooks are now always called, I have renamed -always_size_sections to early_size_sections and size_dynamic_sections -to late_size_sections. I condisdered calling late_size_sections plain -size_sections, since this is the usual target dynamic section sizing -hook, but decided that searching the sources for "size_sections" would -then hit early_size_sections and other functions. ---- - bfd/elf-bfd.h | 35 +++++++++++++++++------------------ - bfd/elf-m10300.c | 11 ++++++----- - bfd/elf32-arc.c | 9 +++++---- - bfd/elf32-arm.c | 15 ++++++++------- - bfd/elf32-bfin.c | 31 ++++++++++++++++--------------- - bfd/elf32-cr16.c | 11 ++++++----- - bfd/elf32-cris.c | 13 +++++++------ - bfd/elf32-csky.c | 8 ++++---- - bfd/elf32-frv.c | 23 ++++++++++++----------- - bfd/elf32-hppa.c | 8 ++++---- - bfd/elf32-i386.c | 7 +++---- - bfd/elf32-lm32.c | 15 ++++++++------- - bfd/elf32-m32c.c | 8 ++++---- - bfd/elf32-m32r.c | 11 ++++++----- - bfd/elf32-m68k.c | 16 ++++++++-------- - bfd/elf32-metag.c | 8 ++++---- - bfd/elf32-microblaze.c | 9 +++++---- - bfd/elf32-mips.c | 6 ++---- - bfd/elf32-nds32.c | 9 +++++---- - bfd/elf32-nios2.c | 15 ++++++++------- - bfd/elf32-or1k.c | 9 +++++---- - bfd/elf32-ppc.c | 11 ++++++----- - bfd/elf32-rl78.c | 8 ++++---- - bfd/elf32-s390.c | 10 +++++----- - bfd/elf32-score.c | 35 ++++++++++++++++++----------------- - bfd/elf32-score.h | 4 ++-- - bfd/elf32-score7.c | 13 +++++++------ - bfd/elf32-sh.c | 15 +++++++-------- - bfd/elf32-sparc.c | 3 +-- - bfd/elf32-tic6x.c | 14 +++++++------- - bfd/elf32-tilegx.c | 2 +- - bfd/elf32-tilepro.c | 11 +++++------ - bfd/elf32-vax.c | 16 +++++++--------- - bfd/elf32-xstormy16.c | 8 ++++---- - bfd/elf32-xtensa.c | 13 ++++++------- - bfd/elf64-alpha.c | 19 ++++++++++--------- - bfd/elf64-hppa.c | 11 ++++------- - bfd/elf64-ia64-vms.c | 13 +++++++------ - bfd/elf64-mips.c | 8 ++++---- - bfd/elf64-ppc.c | 12 ++++++------ - bfd/elf64-s390.c | 10 +++++----- - bfd/elf64-sparc.c | 4 ++-- - bfd/elf64-tilegx.c | 2 +- - bfd/elf64-x86-64.c | 7 +++---- - bfd/elflink.c | 9 ++++----- - bfd/elfn32-mips.c | 6 ++---- - bfd/elfnn-aarch64.c | 21 +++++++++++---------- - bfd/elfnn-ia64.c | 11 ++++++----- - bfd/elfnn-kvx.c | 19 +++++++++---------- - bfd/elfnn-loongarch.c | 9 +++++---- - bfd/elfnn-riscv.c | 7 ++++--- - bfd/elfxx-mips.c | 15 ++++++++------- - bfd/elfxx-mips.h | 4 ++-- - bfd/elfxx-sparc.c | 7 ++++--- - bfd/elfxx-sparc.h | 2 +- - bfd/elfxx-target.h | 12 ++++++------ - bfd/elfxx-tilegx.c | 7 ++++--- - bfd/elfxx-tilegx.h | 2 +- - bfd/elfxx-x86.c | 8 ++++---- - bfd/elfxx-x86.h | 8 ++++---- - ld/emultempl/vms.em | 7 +++---- - 61 files changed, 343 insertions(+), 337 deletions(-) - ---- a/bfd/elf-bfd.h -+++ b/bfd/elf-bfd.h -@@ -1187,7 +1187,7 @@ struct elf_backend_data - /* The ADJUST_DYNAMIC_SYMBOL function is called by the ELF backend - linker for every symbol which is defined by a dynamic object and - referenced by a regular object. This is called after all the -- input files have been seen, but before the SIZE_DYNAMIC_SECTIONS -+ input files have been seen, but before the LATE_SIZE_SECTIONS - function has been called. The hash table entry should be - bfd_link_hash_defined ore bfd_link_hash_defweak, and it should be - defined in a section from a dynamic object. Dynamic object -@@ -1199,24 +1199,23 @@ struct elf_backend_data - bool (*elf_backend_adjust_dynamic_symbol) - (struct bfd_link_info *info, struct elf_link_hash_entry *h); - -- /* The ALWAYS_SIZE_SECTIONS function is called by the backend linker -- after all the linker input files have been seen but before the -- section sizes have been set. This is called after -- ADJUST_DYNAMIC_SYMBOL, but before SIZE_DYNAMIC_SECTIONS. */ -- bool (*elf_backend_always_size_sections) -+ /* The EARLY_SIZE_SECTIONS and LATE_SIZE_SECTIONS functions are -+ called by the backend linker after all linker input files have -+ been seen and sections have been assigned to output sections, but -+ before the section sizes have been set. Both of these functions -+ are called even when no dynamic object is seen by the linker. -+ Between them, they must set the sizes of the dynamic sections and -+ other backend specific sections, and may fill in their contents. -+ Most backends need only use LATE_SIZE_SECTIONS. -+ EARLY_SIZE_SECTIONS is called before --export-dynamic makes some -+ symbols dynamic and before ADJUST_DYNAMIC_SYMBOL processes -+ dynamic symbols, LATE_SIZE_SECTIONS afterwards. The generic ELF -+ linker can handle the .dynsym, .dynstr and .hash sections. -+ Besides those, these functions must handle the .interp section -+ and any other sections created by CREATE_DYNAMIC_SECTIONS. */ -+ bool (*elf_backend_early_size_sections) - (bfd *output_bfd, struct bfd_link_info *info); -- -- /* The SIZE_DYNAMIC_SECTIONS function is called by the ELF backend -- linker after all the linker input files have been seen but before -- the sections sizes have been set. This is called after -- ADJUST_DYNAMIC_SYMBOL has been called on all appropriate symbols. -- It is only called when linking against a dynamic object. It must -- set the sizes of the dynamic sections, and may fill in their -- contents as well. The generic ELF linker can handle the .dynsym, -- .dynstr and .hash sections. This function must handle the -- .interp section and any sections created by the -- CREATE_DYNAMIC_SECTIONS entry point. */ -- bool (*elf_backend_size_dynamic_sections) -+ bool (*elf_backend_late_size_sections) - (bfd *output_bfd, struct bfd_link_info *info); - - /* The STRIP_ZERO_SIZED_DYNAMIC_SECTIONS function is called by the ---- a/bfd/elf-m10300.c -+++ b/bfd/elf-m10300.c -@@ -5015,8 +5015,8 @@ _bfd_mn10300_elf_adjust_dynamic_symbol ( - /* Set the sizes of the dynamic sections. */ - - static bool --_bfd_mn10300_elf_size_dynamic_sections (bfd * output_bfd, -- struct bfd_link_info * info) -+_bfd_mn10300_elf_late_size_sections (bfd * output_bfd, -+ struct bfd_link_info * info) - { - struct elf32_mn10300_link_hash_table *htab = elf32_mn10300_hash_table (info); - bfd * dynobj; -@@ -5024,7 +5024,8 @@ _bfd_mn10300_elf_size_dynamic_sections ( - bool relocs; - - dynobj = htab->root.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -5511,8 +5512,8 @@ mn10300_elf_mkobject (bfd *abfd) - _bfd_mn10300_elf_create_dynamic_sections - #define elf_backend_adjust_dynamic_symbol \ - _bfd_mn10300_elf_adjust_dynamic_symbol --#define elf_backend_size_dynamic_sections \ -- _bfd_mn10300_elf_size_dynamic_sections -+#define elf_backend_late_size_sections \ -+ _bfd_mn10300_elf_late_size_sections - #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all - #define elf_backend_finish_dynamic_symbol \ - _bfd_mn10300_elf_finish_dynamic_symbol ---- a/bfd/elf32-arc.c -+++ b/bfd/elf32-arc.c -@@ -2715,8 +2715,8 @@ elf_arc_finish_dynamic_sections (bfd * o - - /* Set the sizes of the dynamic sections. */ - static bool --elf_arc_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf_arc_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; -@@ -2724,7 +2724,8 @@ elf_arc_size_dynamic_sections (bfd *outp - struct elf_link_hash_table *htab = elf_hash_table (info); - - dynobj = htab->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->dynamic_sections_created) - { -@@ -3140,7 +3141,7 @@ arc_elf_relax_section (bfd *abfd, asecti - #define elf_backend_finish_dynamic_symbol elf_arc_finish_dynamic_symbol - - #define elf_backend_finish_dynamic_sections elf_arc_finish_dynamic_sections --#define elf_backend_size_dynamic_sections elf_arc_size_dynamic_sections -+#define elf_backend_late_size_sections elf_arc_late_size_sections - - #define elf_backend_can_gc_sections 1 - #define elf_backend_want_got_plt 1 ---- a/bfd/elf32-arm.c -+++ b/bfd/elf32-arm.c -@@ -16752,8 +16752,8 @@ bfd_elf32_arm_set_byteswap_code (struct - /* Set the sizes of the dynamic sections. */ - - static bool --elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info * info) -+elf32_arm_late_size_sections (bfd * output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info * info) - { - bfd * dynobj; - asection * s; -@@ -16766,7 +16766,9 @@ elf32_arm_size_dynamic_sections (bfd * o - return false; - - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; -+ - check_use_blx (htab); - - if (elf_hash_table (info)->dynamic_sections_created) -@@ -17138,8 +17140,7 @@ elf32_arm_size_dynamic_sections (bfd * o - _TLS_MODULE_BASE_, if needed. */ - - static bool --elf32_arm_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+elf32_arm_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - asection *tls_sec; - struct elf32_arm_link_hash_table *htab; -@@ -20341,8 +20342,8 @@ elf32_arm_backend_symbol_processing (bfd - #define elf_backend_create_dynamic_sections elf32_arm_create_dynamic_sections - #define elf_backend_finish_dynamic_symbol elf32_arm_finish_dynamic_symbol - #define elf_backend_finish_dynamic_sections elf32_arm_finish_dynamic_sections --#define elf_backend_size_dynamic_sections elf32_arm_size_dynamic_sections --#define elf_backend_always_size_sections elf32_arm_always_size_sections -+#define elf_backend_late_size_sections elf32_arm_late_size_sections -+#define elf_backend_early_size_sections elf32_arm_early_size_sections - #define elf_backend_init_index_section _bfd_elf_init_2_index_sections - #define elf_backend_init_file_header elf32_arm_init_file_header - #define elf_backend_reloc_type_class elf32_arm_reloc_type_class ---- a/bfd/elf32-bfin.c -+++ b/bfd/elf32-bfin.c -@@ -4027,8 +4027,8 @@ _bfinfdpic_size_got_plt (bfd *output_bfd - /* Set the sizes of the dynamic sections. */ - - static bool --elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+elf32_bfinfdpic_late_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - struct elf_link_hash_table *htab; - bfd *dynobj; -@@ -4037,7 +4037,8 @@ elf32_bfinfdpic_size_dynamic_sections (b - - htab = elf_hash_table (info); - dynobj = htab->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->dynamic_sections_created) - { -@@ -4086,7 +4087,7 @@ elf32_bfinfdpic_size_dynamic_sections (b - } - - static bool --elf32_bfinfdpic_always_size_sections (bfd *output_bfd, -+elf32_bfinfdpic_early_size_sections (bfd *output_bfd, - struct bfd_link_info *info) - { - if (!bfd_link_relocatable (info) -@@ -5123,15 +5124,16 @@ bfin_discard_copies (struct elf_link_has - } - - static bool --bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+bfin_late_size_sections (bfd * output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; - bool relocs; - - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -5423,8 +5425,7 @@ struct bfd_elf_special_section const elf - #define elf_backend_check_relocs bfin_check_relocs - #define elf_backend_adjust_dynamic_symbol \ - bfin_adjust_dynamic_symbol --#define elf_backend_size_dynamic_sections \ -- bfin_size_dynamic_sections -+#define elf_backend_late_size_sections bfin_late_size_sections - #define elf_backend_relocate_section bfin_relocate_section - #define elf_backend_finish_dynamic_symbol \ - bfin_finish_dynamic_symbol -@@ -5470,9 +5471,9 @@ struct bfd_elf_special_section const elf - #undef bfd_elf32_bfd_link_hash_table_create - #define bfd_elf32_bfd_link_hash_table_create \ - bfinfdpic_elf_link_hash_table_create --#undef elf_backend_always_size_sections --#define elf_backend_always_size_sections \ -- elf32_bfinfdpic_always_size_sections -+#undef elf_backend_early_size_sections -+#define elf_backend_early_size_sections \ -+ elf32_bfinfdpic_early_size_sections - - #undef elf_backend_create_dynamic_sections - #define elf_backend_create_dynamic_sections \ -@@ -5480,9 +5481,9 @@ struct bfd_elf_special_section const elf - #undef elf_backend_adjust_dynamic_symbol - #define elf_backend_adjust_dynamic_symbol \ - elf32_bfinfdpic_adjust_dynamic_symbol --#undef elf_backend_size_dynamic_sections --#define elf_backend_size_dynamic_sections \ -- elf32_bfinfdpic_size_dynamic_sections -+#undef elf_backend_late_size_sections -+#define elf_backend_late_size_sections \ -+ elf32_bfinfdpic_late_size_sections - #undef elf_backend_finish_dynamic_symbol - #define elf_backend_finish_dynamic_symbol \ - elf32_bfinfdpic_finish_dynamic_symbol ---- a/bfd/elf32-cr16.c -+++ b/bfd/elf32-cr16.c -@@ -2391,15 +2391,16 @@ _bfd_cr16_elf_adjust_dynamic_symbol (str - /* Set the sizes of the dynamic sections. */ - - static bool --_bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd, -- struct bfd_link_info * info) -+_bfd_cr16_elf_late_size_sections (bfd * output_bfd, -+ struct bfd_link_info * info) - { - bfd * dynobj; - asection * s; - bool relocs; - - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -2836,8 +2837,8 @@ _bfd_cr16_elf_reloc_type_class (const st - _bfd_cr16_elf_create_dynamic_sections - #define elf_backend_adjust_dynamic_symbol \ - _bfd_cr16_elf_adjust_dynamic_symbol --#define elf_backend_size_dynamic_sections \ -- _bfd_cr16_elf_size_dynamic_sections -+#define elf_backend_late_size_sections \ -+ _bfd_cr16_elf_late_size_sections - #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all - #define elf_backend_finish_dynamic_symbol \ - _bfd_cr16_elf_finish_dynamic_symbol ---- a/bfd/elf32-cris.c -+++ b/bfd/elf32-cris.c -@@ -2527,7 +2527,7 @@ cris_elf_plt_sym_val (bfd_vma i ATTRIBUT - entry but we found we will not create any. Called when we find we will - not have any PLT for this symbol, by for example - elf_cris_adjust_dynamic_symbol when we're doing a proper dynamic link, -- or elf_cris_size_dynamic_sections if no dynamic sections will be -+ or elf_cris_late_size_sections if no dynamic sections will be - created (we're only linking static objects). */ - - static bool -@@ -3508,8 +3508,8 @@ cris_elf_check_relocs (bfd *abfd, - /* Set the sizes of the dynamic sections. */ - - static bool --elf_cris_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf_cris_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_cris_link_hash_table * htab; - bfd *dynobj; -@@ -3521,7 +3521,8 @@ elf_cris_size_dynamic_sections (bfd *out - return false; - - dynobj = htab->root.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->root.dynamic_sections_created) - { -@@ -4090,8 +4091,8 @@ elf_cris_got_elt_size (bfd *abfd ATTRIBU - elf_cris_adjust_dynamic_symbol - #define elf_backend_copy_indirect_symbol \ - elf_cris_copy_indirect_symbol --#define elf_backend_size_dynamic_sections \ -- elf_cris_size_dynamic_sections -+#define elf_backend_late_size_sections \ -+ elf_cris_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_finish_dynamic_symbol \ - elf_cris_finish_dynamic_symbol ---- a/bfd/elf32-csky.c -+++ b/bfd/elf32-csky.c -@@ -1893,8 +1893,8 @@ csky_allocate_dynrelocs (struct elf_link - /* Set the sizes of the dynamic sections. */ - - static bool --csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+csky_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct csky_elf_link_hash_table *htab; - bfd *dynobj; -@@ -1907,7 +1907,7 @@ csky_elf_size_dynamic_sections (bfd *out - return false; - dynobj = htab->elf.dynobj; - if (dynobj == NULL) -- return false; -+ return true; - - if (htab->elf.dynamic_sections_created) - { -@@ -5333,7 +5333,7 @@ elf32_csky_obj_attrs_handle_unknown (bfd - /* Dynamic relocate related API. */ - #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections - #define elf_backend_adjust_dynamic_symbol csky_elf_adjust_dynamic_symbol --#define elf_backend_size_dynamic_sections csky_elf_size_dynamic_sections -+#define elf_backend_late_size_sections csky_elf_late_size_sections - #define elf_backend_finish_dynamic_symbol csky_elf_finish_dynamic_symbol - #define elf_backend_finish_dynamic_sections csky_elf_finish_dynamic_sections - #define elf_backend_rela_normal 1 ---- a/bfd/elf32-frv.c -+++ b/bfd/elf32-frv.c -@@ -5423,15 +5423,16 @@ _frvfdpic_size_got_plt (bfd *output_bfd, - /* Set the sizes of the dynamic sections. */ - - static bool --elf32_frvfdpic_size_dynamic_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+elf32_frvfdpic_late_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; - struct _frvfdpic_dynamic_got_plt_info gpinfo; - - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -5472,8 +5473,8 @@ elf32_frvfdpic_size_dynamic_sections (bf - } - - static bool --elf32_frvfdpic_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+elf32_frvfdpic_early_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - if (!bfd_link_relocatable (info) - && !bfd_elf_stack_segment_size (output_bfd, info, -@@ -6817,9 +6818,9 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_In - #undef bfd_elf32_bfd_link_hash_table_create - #define bfd_elf32_bfd_link_hash_table_create \ - frvfdpic_elf_link_hash_table_create --#undef elf_backend_always_size_sections --#define elf_backend_always_size_sections \ -- elf32_frvfdpic_always_size_sections -+#undef elf_backend_early_size_sections -+#define elf_backend_early_size_sections \ -+ elf32_frvfdpic_early_size_sections - - #undef elf_backend_create_dynamic_sections - #define elf_backend_create_dynamic_sections \ -@@ -6827,9 +6828,9 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_In - #undef elf_backend_adjust_dynamic_symbol - #define elf_backend_adjust_dynamic_symbol \ - elf32_frvfdpic_adjust_dynamic_symbol --#undef elf_backend_size_dynamic_sections --#define elf_backend_size_dynamic_sections \ -- elf32_frvfdpic_size_dynamic_sections -+#undef elf_backend_late_size_sections -+#define elf_backend_late_size_sections \ -+ elf32_frvfdpic_late_size_sections - #undef bfd_elf32_bfd_relax_section - #define bfd_elf32_bfd_relax_section \ - elf32_frvfdpic_relax_section ---- a/bfd/elf32-hppa.c -+++ b/bfd/elf32-hppa.c -@@ -2042,8 +2042,8 @@ clobber_millicode_symbols (struct elf_li - /* Set the sizes of the dynamic sections. */ - - static bool --elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf32_hppa_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf32_hppa_link_hash_table *htab; - bfd *dynobj; -@@ -2057,7 +2057,7 @@ elf32_hppa_size_dynamic_sections (bfd *o - - dynobj = htab->etab.dynobj; - if (dynobj == NULL) -- abort (); -+ return true; - - if (htab->etab.dynamic_sections_created) - { -@@ -4452,7 +4452,7 @@ elf32_hppa_elf_get_symbol_type (Elf_Inte - #define elf_backend_hide_symbol elf32_hppa_hide_symbol - #define elf_backend_finish_dynamic_symbol elf32_hppa_finish_dynamic_symbol - #define elf_backend_finish_dynamic_sections elf32_hppa_finish_dynamic_sections --#define elf_backend_size_dynamic_sections elf32_hppa_size_dynamic_sections -+#define elf_backend_late_size_sections elf32_hppa_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_gc_mark_hook elf32_hppa_gc_mark_hook - #define elf_backend_grok_prstatus elf32_hppa_grok_prstatus ---- a/bfd/elf32-i386.c -+++ b/bfd/elf32-i386.c -@@ -1957,8 +1957,7 @@ elf_i386_scan_relocs (bfd *abfd, - } - - static bool --elf_i386_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+elf_i386_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - bfd *abfd; - -@@ -1971,7 +1970,7 @@ elf_i386_always_size_sections (bfd *outp - elf_i386_scan_relocs)) - return false; - -- return _bfd_x86_elf_always_size_sections (output_bfd, info); -+ return _bfd_x86_elf_early_size_sections (output_bfd, info); - } - - /* Set the correct type for an x86 ELF section. We do this by the -@@ -4479,7 +4478,7 @@ elf_i386_link_setup_gnu_properties (stru - #define bfd_elf32_get_synthetic_symtab elf_i386_get_synthetic_symtab - - #define elf_backend_relocs_compatible _bfd_elf_relocs_compatible --#define elf_backend_always_size_sections elf_i386_always_size_sections -+#define elf_backend_early_size_sections elf_i386_early_size_sections - #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections - #define elf_backend_fake_sections elf_i386_fake_sections - #define elf_backend_finish_dynamic_sections elf_i386_finish_dynamic_sections ---- a/bfd/elf32-lm32.c -+++ b/bfd/elf32-lm32.c -@@ -1906,8 +1906,8 @@ allocate_dynrelocs (struct elf_link_hash - /* Set the sizes of the dynamic sections. */ - - static bool --lm32_elf_size_dynamic_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+lm32_elf_late_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - struct elf_lm32_link_hash_table *htab; - bfd *dynobj; -@@ -1920,7 +1920,8 @@ lm32_elf_size_dynamic_sections (bfd *out - return false; - - dynobj = htab->root.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->root.dynamic_sections_created) - { -@@ -2309,7 +2310,7 @@ lm32_elf_create_dynamic_sections (bfd *a - } - - static bool --lm32_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) -+lm32_elf_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - if (!bfd_link_relocatable (info)) - { -@@ -2395,7 +2396,7 @@ lm32_elf_fdpic_copy_private_bfd_data (bf - #define bfd_elf32_bfd_link_hash_table_create lm32_elf_link_hash_table_create - #define elf_backend_check_relocs lm32_elf_check_relocs - #define elf_backend_reloc_type_class lm32_elf_reloc_type_class --#define elf_backend_size_dynamic_sections lm32_elf_size_dynamic_sections -+#define elf_backend_late_size_sections lm32_elf_late_size_sections - #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all - #define elf_backend_create_dynamic_sections lm32_elf_create_dynamic_sections - #define elf_backend_finish_dynamic_sections lm32_elf_finish_dynamic_sections -@@ -2416,8 +2417,8 @@ lm32_elf_fdpic_copy_private_bfd_data (bf - #undef elf32_bed - #define elf32_bed elf32_lm32fdpic_bed - --#undef elf_backend_always_size_sections --#define elf_backend_always_size_sections lm32_elf_always_size_sections -+#undef elf_backend_early_size_sections -+#define elf_backend_early_size_sections lm32_elf_early_size_sections - #undef bfd_elf32_bfd_copy_private_bfd_data - #define bfd_elf32_bfd_copy_private_bfd_data lm32_elf_fdpic_copy_private_bfd_data - ---- a/bfd/elf32-m32c.c -+++ b/bfd/elf32-m32c.c -@@ -773,8 +773,8 @@ m32c_elf_finish_dynamic_sections (bfd *a - } - - static bool --m32c_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+m32c_elf_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *splt; -@@ -2132,8 +2132,8 @@ _bfd_m32c_elf_eh_frame_address_size (bfd - #define elf_backend_check_relocs m32c_elf_check_relocs - #define elf_backend_object_p m32c_elf_object_p - #define elf_symbol_leading_char ('_') --#define elf_backend_always_size_sections \ -- m32c_elf_always_size_sections -+#define elf_backend_early_size_sections \ -+ m32c_elf_early_size_sections - #define elf_backend_finish_dynamic_sections \ - m32c_elf_finish_dynamic_sections - ---- a/bfd/elf32-m32r.c -+++ b/bfd/elf32-m32r.c -@@ -1958,8 +1958,8 @@ allocate_dynrelocs (struct elf_link_hash - /* Set the sizes of the dynamic sections. */ - - static bool --m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+m32r_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_link_hash_table *htab; - bfd *dynobj; -@@ -1968,7 +1968,7 @@ m32r_elf_size_dynamic_sections (bfd *out - bfd *ibfd; - - #ifdef DEBUG_PIC -- printf ("m32r_elf_size_dynamic_sections()\n"); -+ printf ("m32r_elf_late_size_sections()\n"); - #endif - - htab = m32r_elf_hash_table (info); -@@ -1976,7 +1976,8 @@ m32r_elf_size_dynamic_sections (bfd *out - return false; - - dynobj = htab->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->dynamic_sections_created) - { -@@ -3658,7 +3659,7 @@ m32r_elf_reloc_type_class (const struct - - #define elf_backend_create_dynamic_sections m32r_elf_create_dynamic_sections - #define bfd_elf32_bfd_link_hash_table_create m32r_elf_link_hash_table_create --#define elf_backend_size_dynamic_sections m32r_elf_size_dynamic_sections -+#define elf_backend_late_size_sections m32r_elf_late_size_sections - #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all - #define elf_backend_finish_dynamic_sections m32r_elf_finish_dynamic_sections - #define elf_backend_adjust_dynamic_symbol m32r_elf_adjust_dynamic_symbol ---- a/bfd/elf32-m68k.c -+++ b/bfd/elf32-m68k.c -@@ -2934,7 +2934,7 @@ elf_m68k_get_plt_info (bfd *output_bfd) - It's a convenient place to determine the PLT style. */ - - static bool --elf_m68k_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) -+elf_m68k_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - /* Bind input BFDs to GOTs and calculate sizes of .got and .rela.got - sections. */ -@@ -3107,15 +3107,16 @@ elf_m68k_adjust_dynamic_symbol (struct b - /* Set the sizes of the dynamic sections. */ - - static bool --elf_m68k_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf_m68k_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; - bool relocs; - - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -4628,12 +4629,11 @@ elf_m68k_grok_psinfo (bfd *abfd, Elf_Int - #define bfd_elf32_bfd_final_link bfd_elf_final_link - - #define elf_backend_check_relocs elf_m68k_check_relocs --#define elf_backend_always_size_sections \ -- elf_m68k_always_size_sections -+#define elf_backend_early_size_sections \ -+ elf_m68k_early_size_sections - #define elf_backend_adjust_dynamic_symbol \ - elf_m68k_adjust_dynamic_symbol --#define elf_backend_size_dynamic_sections \ -- elf_m68k_size_dynamic_sections -+#define elf_backend_late_size_sections elf_m68k_late_size_sections - #define elf_backend_final_write_processing elf_m68k_final_write_processing - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_relocate_section elf_m68k_relocate_section ---- a/bfd/elf32-metag.c -+++ b/bfd/elf32-metag.c -@@ -2717,8 +2717,8 @@ allocate_dynrelocs (struct elf_link_hash - /* Set the sizes of the dynamic sections. */ - - static bool --elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf_metag_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_metag_link_hash_table *htab; - bfd *dynobj; -@@ -2729,7 +2729,7 @@ elf_metag_size_dynamic_sections (bfd *ou - htab = metag_link_hash_table (info); - dynobj = htab->etab.dynobj; - if (dynobj == NULL) -- abort (); -+ return true; - - if (htab->etab.dynamic_sections_created) - { -@@ -4019,7 +4019,7 @@ elf_metag_plt_sym_val (bfd_vma i, const - #define elf_backend_adjust_dynamic_symbol elf_metag_adjust_dynamic_symbol - #define elf_backend_finish_dynamic_symbol elf_metag_finish_dynamic_symbol - #define elf_backend_finish_dynamic_sections elf_metag_finish_dynamic_sections --#define elf_backend_size_dynamic_sections elf_metag_size_dynamic_sections -+#define elf_backend_late_size_sections elf_metag_late_size_sections - #define elf_backend_omit_section_dynsym \ - _bfd_elf_omit_section_dynsym_all - #define elf_backend_init_file_header elf_metag_init_file_header ---- a/bfd/elf32-microblaze.c -+++ b/bfd/elf32-microblaze.c -@@ -2966,8 +2966,8 @@ allocate_dynrelocs (struct elf_link_hash - /* Set the sizes of the dynamic sections. */ - - static bool --microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+microblaze_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf32_mb_link_hash_table *htab; - bfd *dynobj; -@@ -2979,7 +2979,8 @@ microblaze_elf_size_dynamic_sections (bf - return false; - - dynobj = htab->elf.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - /* Set up .got offsets for local syms, and space for local dynamic - relocs. */ -@@ -3497,7 +3498,7 @@ microblaze_elf_add_symbol_hook (bfd *abf - #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections - #define elf_backend_finish_dynamic_sections microblaze_elf_finish_dynamic_sections - #define elf_backend_finish_dynamic_symbol microblaze_elf_finish_dynamic_symbol --#define elf_backend_size_dynamic_sections microblaze_elf_size_dynamic_sections -+#define elf_backend_late_size_sections microblaze_elf_late_size_sections - #define elf_backend_add_symbol_hook microblaze_elf_add_symbol_hook - - #include "elf32-target.h" ---- a/bfd/elf32-mips.c -+++ b/bfd/elf32-mips.c -@@ -2537,10 +2537,8 @@ static const struct ecoff_debug_swap mip - #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag - #define elf_backend_adjust_dynamic_symbol \ - _bfd_mips_elf_adjust_dynamic_symbol --#define elf_backend_always_size_sections \ -- _bfd_mips_elf_always_size_sections --#define elf_backend_size_dynamic_sections \ -- _bfd_mips_elf_size_dynamic_sections -+#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections -+#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_relocate_section _bfd_mips_elf_relocate_section - #define elf_backend_finish_dynamic_symbol \ ---- a/bfd/elf32-nds32.c -+++ b/bfd/elf32-nds32.c -@@ -4302,8 +4302,8 @@ elf32_nds32_add_dynreloc (bfd *output_bf - /* Set the sizes of the dynamic sections. */ - - static bool --nds32_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+nds32_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_nds32_link_hash_table *htab; - bfd *dynobj; -@@ -4316,7 +4316,8 @@ nds32_elf_size_dynamic_sections (bfd *ou - return false; - - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -13984,7 +13985,7 @@ nds32_elf_unify_tls_model (bfd *inbfd, a - #define elf_backend_create_dynamic_sections nds32_elf_create_dynamic_sections - #define elf_backend_finish_dynamic_sections nds32_elf_finish_dynamic_sections - #define elf_backend_finish_dynamic_symbol nds32_elf_finish_dynamic_symbol --#define elf_backend_size_dynamic_sections nds32_elf_size_dynamic_sections -+#define elf_backend_late_size_sections nds32_elf_late_size_sections - #define elf_backend_relocate_section nds32_elf_relocate_section - #define elf_backend_gc_mark_hook nds32_elf_gc_mark_hook - #define elf_backend_grok_prstatus nds32_elf_grok_prstatus ---- a/bfd/elf32-nios2.c -+++ b/bfd/elf32-nios2.c -@@ -5405,7 +5405,7 @@ nios2_elf32_adjust_dynamic_symbol (struc - return true; - } - --/* Worker function for nios2_elf32_size_dynamic_sections. */ -+/* Worker function for nios2_elf32_late_size_sections. */ - static bool - adjust_dynrelocs (struct elf_link_hash_entry *h, void *inf) - { -@@ -5432,7 +5432,7 @@ adjust_dynrelocs (struct elf_link_hash_e - return true; - } - --/* Another worker function for nios2_elf32_size_dynamic_sections. -+/* Another worker function for nios2_elf32_late_size_sections. - Allocate space in .plt, .got and associated reloc sections for - dynamic relocs. */ - static bool -@@ -5667,11 +5667,11 @@ allocate_dynrelocs (struct elf_link_hash - return true; - } - --/* Implement elf_backend_size_dynamic_sections: -+/* Implement elf_backend_late_size_sections: - Set the sizes of the dynamic sections. */ - static bool --nios2_elf32_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+nios2_elf32_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; -@@ -5681,7 +5681,8 @@ nios2_elf32_size_dynamic_sections (bfd * - - htab = elf32_nios2_hash_table (info); - dynobj = htab->root.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - htab->res_n_size = 0; - if (htab->root.dynamic_sections_created) -@@ -6052,7 +6053,7 @@ const struct bfd_elf_special_section elf - nios2_elf32_finish_dynamic_sections - #define elf_backend_adjust_dynamic_symbol nios2_elf32_adjust_dynamic_symbol - #define elf_backend_reloc_type_class nios2_elf32_reloc_type_class --#define elf_backend_size_dynamic_sections nios2_elf32_size_dynamic_sections -+#define elf_backend_late_size_sections nios2_elf32_late_size_sections - #define elf_backend_add_symbol_hook nios2_elf_add_symbol_hook - #define elf_backend_copy_indirect_symbol nios2_elf32_copy_indirect_symbol - #define elf_backend_object_p nios2_elf32_object_p ---- a/bfd/elf32-or1k.c -+++ b/bfd/elf32-or1k.c -@@ -3047,8 +3047,8 @@ allocate_dynrelocs (struct elf_link_hash - /* Set the sizes of the dynamic sections. */ - - static bool --or1k_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+or1k_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_or1k_link_hash_table *htab; - bfd *dynobj; -@@ -3061,7 +3061,8 @@ or1k_elf_size_dynamic_sections (bfd *out - return false; - - dynobj = htab->root.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->root.dynamic_sections_created) - { -@@ -3414,7 +3415,7 @@ or1k_grok_psinfo (bfd *abfd, Elf_Interna - #define elf_backend_copy_indirect_symbol or1k_elf_copy_indirect_symbol - #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections - #define elf_backend_finish_dynamic_sections or1k_elf_finish_dynamic_sections --#define elf_backend_size_dynamic_sections or1k_elf_size_dynamic_sections -+#define elf_backend_late_size_sections or1k_elf_late_size_sections - #define elf_backend_adjust_dynamic_symbol or1k_elf_adjust_dynamic_symbol - #define elf_backend_finish_dynamic_symbol or1k_elf_finish_dynamic_symbol - ---- a/bfd/elf32-ppc.c -+++ b/bfd/elf32-ppc.c -@@ -5479,8 +5479,8 @@ static const unsigned char glink_eh_fram - /* Set the sizes of the dynamic sections. */ - - static bool --ppc_elf_size_dynamic_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+ppc_elf_late_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - struct ppc_elf_link_hash_table *htab; - asection *s; -@@ -5488,11 +5488,12 @@ ppc_elf_size_dynamic_sections (bfd *outp - bfd *ibfd; - - #ifdef DEBUG -- fprintf (stderr, "ppc_elf_size_dynamic_sections called\n"); -+ fprintf (stderr, "ppc_elf_late_size_sections called\n"); - #endif - - htab = ppc_elf_hash_table (info); -- BFD_ASSERT (htab->elf.dynobj != NULL); -+ if (htab->elf.dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -10433,7 +10434,7 @@ ppc_elf_finish_dynamic_sections (bfd *ou - #define elf_backend_copy_indirect_symbol ppc_elf_copy_indirect_symbol - #define elf_backend_adjust_dynamic_symbol ppc_elf_adjust_dynamic_symbol - #define elf_backend_add_symbol_hook ppc_elf_add_symbol_hook --#define elf_backend_size_dynamic_sections ppc_elf_size_dynamic_sections -+#define elf_backend_late_size_sections ppc_elf_late_size_sections - #define elf_backend_hash_symbol ppc_elf_hash_symbol - #define elf_backend_finish_dynamic_symbol ppc_elf_finish_dynamic_symbol - #define elf_backend_finish_dynamic_sections ppc_elf_finish_dynamic_sections ---- a/bfd/elf32-rl78.c -+++ b/bfd/elf32-rl78.c -@@ -1440,8 +1440,8 @@ rl78_elf_finish_dynamic_sections (bfd *a - } - - static bool --rl78_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+rl78_elf_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *splt; -@@ -2610,8 +2610,8 @@ rl78_elf_relax_section (bfd *abfd, - - #define bfd_elf32_bfd_relax_section rl78_elf_relax_section - #define elf_backend_check_relocs rl78_elf_check_relocs --#define elf_backend_always_size_sections \ -- rl78_elf_always_size_sections -+#define elf_backend_early_size_sections \ -+ rl78_elf_early_size_sections - #define elf_backend_finish_dynamic_sections \ - rl78_elf_finish_dynamic_sections - ---- a/bfd/elf32-s390.c -+++ b/bfd/elf32-s390.c -@@ -1366,7 +1366,7 @@ elf_s390_gc_mark_hook (asection *sec, - entry but we found we will not create any. Called when we find we will - not have any PLT for this symbol, by for example - elf_s390_adjust_dynamic_symbol when we're doing a proper dynamic link, -- or elf_s390_size_dynamic_sections if no dynamic sections will be -+ or elf_s390_late_size_sections if no dynamic sections will be - created (we're only linking static objects). */ - - static void -@@ -1778,8 +1778,8 @@ allocate_dynrelocs (struct elf_link_hash - /* Set the sizes of the dynamic sections. */ - - static bool --elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf_s390_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_s390_link_hash_table *htab; - bfd *dynobj; -@@ -1790,7 +1790,7 @@ elf_s390_size_dynamic_sections (bfd *out - htab = elf_s390_hash_table (info); - dynobj = htab->elf.dynobj; - if (dynobj == NULL) -- abort (); -+ return true; - - if (htab->elf.dynamic_sections_created) - { -@@ -3926,7 +3926,7 @@ elf32_s390_merge_private_bfd_data (bfd * - #define elf_backend_gc_mark_hook elf_s390_gc_mark_hook - #define elf_backend_reloc_type_class elf_s390_reloc_type_class - #define elf_backend_relocate_section elf_s390_relocate_section --#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections -+#define elf_backend_late_size_sections elf_s390_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_grok_prstatus elf_s390_grok_prstatus - #define elf_backend_grok_psinfo elf_s390_grok_psinfo ---- a/bfd/elf32-score.c -+++ b/bfd/elf32-score.c -@@ -1089,7 +1089,7 @@ score_elf_got_info (bfd *abfd, asection - appear towards the end. This reduces the amount of GOT space - required. MAX_LOCAL is used to set the number of local symbols - known to be in the dynamic symbol table. During -- s3_bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the -+ s3_bfd_score_elf_late_size_sections, this value is 1. Afterward, the - section symbols are added and the count is higher. */ - static bool - score_elf_sort_hash_table (struct bfd_link_info *info, -@@ -3160,8 +3160,8 @@ s3_bfd_score_elf_adjust_dynamic_symbol ( - /* This function is called after all the input files have been read, - and the input sections have been assigned to output sections. */ - static bool --s3_bfd_score_elf_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+s3_bfd_score_elf_early_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; -@@ -3237,14 +3237,15 @@ s3_bfd_score_elf_always_size_sections (b - - /* Set the sizes of the dynamic sections. */ - static bool --s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) -+s3_bfd_score_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; - bool reltext; - - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -3313,7 +3314,7 @@ s3_bfd_score_elf_size_dynamic_sections ( - } - else if (startswith (name, ".got")) - { -- /* s3_bfd_score_elf_always_size_sections() has already done -+ /* s3_bfd_score_elf_early_size_sections() has already done - most of the work, but some symbols may have been mapped - to versions that we must now resolve in the got_entries - hash tables. */ -@@ -4177,22 +4178,22 @@ _bfd_score_elf_adjust_dynamic_symbol (st - } - - static bool --_bfd_score_elf_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+_bfd_score_elf_early_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - if (bfd_get_mach (output_bfd) == bfd_mach_score3) -- return s3_bfd_score_elf_always_size_sections (output_bfd, info); -+ return s3_bfd_score_elf_early_size_sections (output_bfd, info); - else -- return s7_bfd_score_elf_always_size_sections (output_bfd, info); -+ return s7_bfd_score_elf_early_size_sections (output_bfd, info); - } - - static bool --_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) -+_bfd_score_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - if (bfd_get_mach (output_bfd) == bfd_mach_score3) -- return s3_bfd_score_elf_size_dynamic_sections (output_bfd, info); -+ return s3_bfd_score_elf_late_size_sections (output_bfd, info); - else -- return s7_bfd_score_elf_size_dynamic_sections (output_bfd, info); -+ return s7_bfd_score_elf_late_size_sections (output_bfd, info); - } - - static bool -@@ -4455,10 +4456,10 @@ _bfd_score_elf_common_definition (Elf_In - _bfd_score_elf_section_from_bfd_section - #define elf_backend_adjust_dynamic_symbol \ - _bfd_score_elf_adjust_dynamic_symbol --#define elf_backend_always_size_sections \ -- _bfd_score_elf_always_size_sections --#define elf_backend_size_dynamic_sections \ -- _bfd_score_elf_size_dynamic_sections -+#define elf_backend_early_size_sections \ -+ _bfd_score_elf_early_size_sections -+#define elf_backend_late_size_sections \ -+ _bfd_score_elf_late_size_sections - #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all - #define elf_backend_create_dynamic_sections \ - _bfd_score_elf_create_dynamic_sections ---- a/bfd/elf32-score.h -+++ b/bfd/elf32-score.h -@@ -78,10 +78,10 @@ s7_bfd_score_elf_adjust_dynamic_symbol ( - struct elf_link_hash_entry *); - - extern bool --s7_bfd_score_elf_always_size_sections (bfd *, struct bfd_link_info *); -+s7_bfd_score_elf_early_size_sections (bfd *, struct bfd_link_info *); - - extern bool --s7_bfd_score_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); -+s7_bfd_score_elf_late_size_sections (bfd *, struct bfd_link_info *); - - extern bool - s7_bfd_score_elf_create_dynamic_sections (bfd *, struct bfd_link_info *); ---- a/bfd/elf32-score7.c -+++ b/bfd/elf32-score7.c -@@ -975,7 +975,7 @@ score_elf_got_info (bfd *abfd, asection - appear towards the end. This reduces the amount of GOT space - required. MAX_LOCAL is used to set the number of local symbols - known to be in the dynamic symbol table. During -- s7_bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the -+ s7_bfd_score_elf_late_size_sections, this value is 1. Afterward, the - section symbols are added and the count is higher. */ - - static bool -@@ -2969,8 +2969,8 @@ s7_bfd_score_elf_adjust_dynamic_symbol ( - and the input sections have been assigned to output sections. */ - - bool --s7_bfd_score_elf_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+s7_bfd_score_elf_early_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; -@@ -3047,14 +3047,15 @@ s7_bfd_score_elf_always_size_sections (b - /* Set the sizes of the dynamic sections. */ - - bool --s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) -+s7_bfd_score_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; - bool reltext; - - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -3123,7 +3124,7 @@ s7_bfd_score_elf_size_dynamic_sections ( - } - else if (startswith (name, ".got")) - { -- /* s7_bfd_score_elf_always_size_sections() has already done -+ /* s7_bfd_score_elf_early_size_sections() has already done - most of the work, but some symbols may have been mapped - to versions that we must now resolve in the got_entries - hash tables. */ ---- a/bfd/elf32-sh.c -+++ b/bfd/elf32-sh.c -@@ -2927,7 +2927,7 @@ allocate_dynrelocs (struct elf_link_hash - It's a convenient place to determine the PLT style. */ - - static bool --sh_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) -+sh_elf_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - sh_elf_hash_table (info)->plt_info = get_plt_info (output_bfd, - bfd_link_pic (info)); -@@ -2942,8 +2942,8 @@ sh_elf_always_size_sections (bfd *output - /* Set the sizes of the dynamic sections. */ - - static bool --sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+sh_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_sh_link_hash_table *htab; - bfd *dynobj; -@@ -2956,7 +2956,8 @@ sh_elf_size_dynamic_sections (bfd *outpu - return false; - - dynobj = htab->root.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->root.dynamic_sections_created) - { -@@ -6600,10 +6601,8 @@ sh_elf_encode_eh_address (bfd *abfd, - sh_elf_link_hash_table_create - #define elf_backend_adjust_dynamic_symbol \ - sh_elf_adjust_dynamic_symbol --#define elf_backend_always_size_sections \ -- sh_elf_always_size_sections --#define elf_backend_size_dynamic_sections \ -- sh_elf_size_dynamic_sections -+#define elf_backend_early_size_sections sh_elf_early_size_sections -+#define elf_backend_late_size_sections sh_elf_late_size_sections - #define elf_backend_omit_section_dynsym sh_elf_omit_section_dynsym - #define elf_backend_finish_dynamic_symbol \ - sh_elf_finish_dynamic_symbol ---- a/bfd/elf32-sparc.c -+++ b/bfd/elf32-sparc.c -@@ -248,8 +248,7 @@ elf32_sparc_reloc_type_class (const stru - #define elf_backend_adjust_dynamic_symbol \ - _bfd_sparc_elf_adjust_dynamic_symbol - #define elf_backend_omit_section_dynsym _bfd_sparc_elf_omit_section_dynsym --#define elf_backend_size_dynamic_sections \ -- _bfd_sparc_elf_size_dynamic_sections -+#define elf_backend_late_size_sections _bfd_sparc_elf_late_size_sections - #define elf_backend_relocate_section _bfd_sparc_elf_relocate_section - #define elf_backend_finish_dynamic_symbol \ - _bfd_sparc_elf_finish_dynamic_symbol ---- a/bfd/elf32-tic6x.c -+++ b/bfd/elf32-tic6x.c -@@ -3160,7 +3160,7 @@ elf32_tic6x_allocate_dynrelocs (struct e - /* Set the sizes of the dynamic sections. */ - - static bool --elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) -+elf32_tic6x_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - struct elf32_tic6x_link_hash_table *htab; - bfd *dynobj; -@@ -3171,7 +3171,7 @@ elf32_tic6x_size_dynamic_sections (bfd * - htab = elf32_tic6x_hash_table (info); - dynobj = htab->elf.dynobj; - if (dynobj == NULL) -- abort (); -+ return true; - - if (htab->elf.dynamic_sections_created) - { -@@ -3358,7 +3358,7 @@ elf32_tic6x_size_dynamic_sections (bfd * - and the input sections have been assigned to output sections. */ - - static bool --elf32_tic6x_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) -+elf32_tic6x_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - if (elf32_tic6x_using_dsbt (output_bfd) && !bfd_link_relocatable (info) - && !bfd_elf_stack_segment_size (output_bfd, info, -@@ -4261,10 +4261,10 @@ elf32_tic6x_write_section (bfd *output_b - #define elf_backend_relocs_compatible _bfd_elf_relocs_compatible - #define elf_backend_finish_dynamic_symbol \ - elf32_tic6x_finish_dynamic_symbol --#define elf_backend_always_size_sections \ -- elf32_tic6x_always_size_sections --#define elf_backend_size_dynamic_sections \ -- elf32_tic6x_size_dynamic_sections -+#define elf_backend_early_size_sections \ -+ elf32_tic6x_early_size_sections -+#define elf_backend_late_size_sections \ -+ elf32_tic6x_late_size_sections - #define elf_backend_finish_dynamic_sections \ - elf32_tic6x_finish_dynamic_sections - #define bfd_elf32_bfd_final_link \ ---- a/bfd/elf32-tilegx.c -+++ b/bfd/elf32-tilegx.c -@@ -105,7 +105,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_I - #define elf_backend_check_relocs tilegx_elf_check_relocs - #define elf_backend_adjust_dynamic_symbol tilegx_elf_adjust_dynamic_symbol - #define elf_backend_omit_section_dynsym tilegx_elf_omit_section_dynsym --#define elf_backend_size_dynamic_sections tilegx_elf_size_dynamic_sections -+#define elf_backend_late_size_sections tilegx_elf_late_size_sections - #define elf_backend_relocate_section tilegx_elf_relocate_section - #define elf_backend_finish_dynamic_symbol tilegx_elf_finish_dynamic_symbol - #define elf_backend_finish_dynamic_sections tilegx_elf_finish_dynamic_sections ---- a/bfd/elf32-tilepro.c -+++ b/bfd/elf32-tilepro.c -@@ -2182,11 +2182,9 @@ tilepro_elf_omit_section_dynsym (bfd *ou - #define ELF32_DYNAMIC_INTERPRETER "/lib/ld.so.1" - - static bool --tilepro_elf_size_dynamic_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+tilepro_elf_late_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { -- (void)output_bfd; -- - struct elf_link_hash_table *htab; - bfd *dynobj; - asection *s; -@@ -2195,7 +2193,8 @@ tilepro_elf_size_dynamic_sections (bfd * - htab = tilepro_elf_hash_table (info); - BFD_ASSERT (htab != NULL); - dynobj = htab->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -3739,7 +3738,7 @@ tilepro_additional_program_headers (bfd - #define elf_backend_check_relocs tilepro_elf_check_relocs - #define elf_backend_adjust_dynamic_symbol tilepro_elf_adjust_dynamic_symbol - #define elf_backend_omit_section_dynsym tilepro_elf_omit_section_dynsym --#define elf_backend_size_dynamic_sections tilepro_elf_size_dynamic_sections -+#define elf_backend_late_size_sections tilepro_elf_late_size_sections - #define elf_backend_relocate_section tilepro_elf_relocate_section - #define elf_backend_finish_dynamic_symbol tilepro_elf_finish_dynamic_symbol - #define elf_backend_finish_dynamic_sections tilepro_elf_finish_dynamic_sections ---- a/bfd/elf32-vax.c -+++ b/bfd/elf32-vax.c -@@ -36,7 +36,6 @@ static bool elf_vax_check_relocs (bfd *, - asection *, const Elf_Internal_Rela *); - static bool elf_vax_adjust_dynamic_symbol (struct bfd_link_info *, - struct elf_link_hash_entry *); --static bool elf_vax_size_dynamic_sections (bfd *, struct bfd_link_info *); - static int elf_vax_relocate_section (bfd *, struct bfd_link_info *, - bfd *, asection *, bfd_byte *, - Elf_Internal_Rela *, -@@ -985,8 +984,8 @@ elf_vax_discard_got_entries (struct elf_ - /* Discard unused dynamic data if this is a static link. */ - - static bool --elf_vax_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf_vax_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; -@@ -1024,14 +1023,15 @@ elf_vax_always_size_sections (bfd *outpu - /* Set the sizes of the dynamic sections. */ - - static bool --elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) -+elf_vax_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; - bool relocs; - - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -1861,10 +1861,8 @@ elf_vax_plt_sym_val (bfd_vma i, const as - #define elf_backend_check_relocs elf_vax_check_relocs - #define elf_backend_adjust_dynamic_symbol \ - elf_vax_adjust_dynamic_symbol --#define elf_backend_always_size_sections \ -- elf_vax_always_size_sections --#define elf_backend_size_dynamic_sections \ -- elf_vax_size_dynamic_sections -+#define elf_backend_early_size_sections elf_vax_early_size_sections -+#define elf_backend_late_size_sections elf_vax_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_relocate_section elf_vax_relocate_section - #define elf_backend_finish_dynamic_symbol \ ---- a/bfd/elf32-xstormy16.c -+++ b/bfd/elf32-xstormy16.c -@@ -706,8 +706,8 @@ xstormy16_elf_relax_section (bfd *dynobj - } - - static bool --xstormy16_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+xstormy16_elf_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *splt; -@@ -1013,8 +1013,8 @@ xstormy16_elf_gc_mark_hook (asection *se - #define elf_backend_relocate_section xstormy16_elf_relocate_section - #define elf_backend_gc_mark_hook xstormy16_elf_gc_mark_hook - #define elf_backend_check_relocs xstormy16_elf_check_relocs --#define elf_backend_always_size_sections \ -- xstormy16_elf_always_size_sections -+#define elf_backend_early_size_sections \ -+ xstormy16_elf_early_size_sections - #define elf_backend_omit_section_dynsym \ - _bfd_elf_omit_section_dynsym_all - #define elf_backend_finish_dynamic_sections \ ---- a/bfd/elf32-xtensa.c -+++ b/bfd/elf32-xtensa.c -@@ -1557,8 +1557,8 @@ elf_xtensa_allocate_local_got_size (stru - /* Set the sizes of the dynamic sections. */ - - static bool --elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf_xtensa_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_xtensa_link_hash_table *htab; - bfd *dynobj, *abfd; -@@ -1575,7 +1575,7 @@ elf_xtensa_size_dynamic_sections (bfd *o - - dynobj = elf_hash_table (info)->dynobj; - if (dynobj == NULL) -- abort (); -+ return true; - srelgot = htab->elf.srelgot; - srelplt = htab->elf.srelplt; - -@@ -1780,8 +1780,7 @@ elf_xtensa_size_dynamic_sections (bfd *o - } - - static bool --elf_xtensa_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+elf_xtensa_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - struct elf_xtensa_link_hash_table *htab; - asection *tls_sec; -@@ -11544,8 +11543,8 @@ static const struct bfd_elf_special_sect - #define elf_backend_object_p elf_xtensa_object_p - #define elf_backend_reloc_type_class elf_xtensa_reloc_type_class - #define elf_backend_relocate_section elf_xtensa_relocate_section --#define elf_backend_size_dynamic_sections elf_xtensa_size_dynamic_sections --#define elf_backend_always_size_sections elf_xtensa_always_size_sections -+#define elf_backend_late_size_sections elf_xtensa_late_size_sections -+#define elf_backend_early_size_sections elf_xtensa_early_size_sections - #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all - #define elf_backend_special_sections elf_xtensa_special_sections - #define elf_backend_action_discarded elf_xtensa_action_discarded ---- a/bfd/elf64-alpha.c -+++ b/bfd/elf64-alpha.c -@@ -2562,8 +2562,8 @@ elf64_alpha_size_plt_section (struct bfd - } - - static bool --elf64_alpha_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf64_alpha_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *i; - struct alpha_elf_link_hash_table * htab; -@@ -2789,8 +2789,8 @@ elf64_alpha_size_rela_got_section (struc - /* Set the sizes of the dynamic sections. */ - - static bool --elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf64_alpha_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s; -@@ -2802,7 +2802,8 @@ elf64_alpha_size_dynamic_sections (bfd * - return false; - - dynobj = elf_hash_table(info)->dynobj; -- BFD_ASSERT(dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -5448,10 +5449,10 @@ static const struct elf_size_info alpha_ - elf64_alpha_merge_symbol_attribute - #define elf_backend_copy_indirect_symbol \ - elf64_alpha_copy_indirect_symbol --#define elf_backend_always_size_sections \ -- elf64_alpha_always_size_sections --#define elf_backend_size_dynamic_sections \ -- elf64_alpha_size_dynamic_sections -+#define elf_backend_early_size_sections \ -+ elf64_alpha_early_size_sections -+#define elf_backend_late_size_sections \ -+ elf64_alpha_late_size_sections - #define elf_backend_omit_section_dynsym \ - _bfd_elf_omit_section_dynsym_all - #define elf_backend_relocate_section \ ---- a/bfd/elf64-hppa.c -+++ b/bfd/elf64-hppa.c -@@ -176,9 +176,6 @@ static bool elf64_hppa_adjust_dynamic_sy - static bool elf64_hppa_mark_milli_and_exported_functions - (struct elf_link_hash_entry *, void *); - --static bool elf64_hppa_size_dynamic_sections -- (bfd *, struct bfd_link_info *); -- - static int elf64_hppa_link_output_symbol_hook - (struct bfd_link_info *, const char *, Elf_Internal_Sym *, - asection *, struct elf_link_hash_entry *); -@@ -1520,7 +1517,7 @@ elf64_hppa_mark_milli_and_exported_funct - the contents of our special sections. */ - - static bool --elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) -+elf64_hppa_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - struct elf64_hppa_link_hash_table *hppa_info; - struct elf64_hppa_allocate_data data; -@@ -1534,7 +1531,8 @@ elf64_hppa_size_dynamic_sections (bfd *o - return false; - - dynobj = hppa_info->root.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - /* Mark each function this program exports so that we will allocate - space in the .opd section for each function's FPTR. If we are -@@ -3984,8 +3982,7 @@ const struct elf_size_info hppa64_elf_si - #define elf_backend_adjust_dynamic_symbol \ - elf64_hppa_adjust_dynamic_symbol - --#define elf_backend_size_dynamic_sections \ -- elf64_hppa_size_dynamic_sections -+#define elf_backend_late_size_sections elf64_hppa_late_size_sections - - #define elf_backend_finish_dynamic_symbol \ - elf64_hppa_finish_dynamic_symbol ---- a/bfd/elf64-ia64-vms.c -+++ b/bfd/elf64-ia64-vms.c -@@ -2591,8 +2591,8 @@ elf64_ia64_adjust_dynamic_symbol (struct - } - - static bool --elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf64_ia64_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf64_ia64_allocate_data data; - struct elf64_ia64_link_hash_table *ia64_info; -@@ -2601,11 +2601,12 @@ elf64_ia64_size_dynamic_sections (bfd *o - struct elf_link_hash_table *hash_table; - - hash_table = elf_hash_table (info); -- dynobj = hash_table->dynobj; - ia64_info = elf64_ia64_hash_table (info); - if (ia64_info == NULL) - return false; -- BFD_ASSERT(dynobj != NULL); -+ dynobj = hash_table->dynobj; -+ if (dynobj == NULL) -+ return true; - data.info = info; - - /* Allocate the GOT entries. */ -@@ -5488,8 +5489,8 @@ static const struct elf_size_info elf64_ - elf64_ia64_check_relocs - #define elf_backend_adjust_dynamic_symbol \ - elf64_ia64_adjust_dynamic_symbol --#define elf_backend_size_dynamic_sections \ -- elf64_ia64_size_dynamic_sections -+#define elf_backend_late_size_sections \ -+ elf64_ia64_late_size_sections - #define elf_backend_omit_section_dynsym \ - _bfd_elf_omit_section_dynsym_all - #define elf_backend_relocate_section \ ---- a/bfd/elf64-mips.c -+++ b/bfd/elf64-mips.c -@@ -4748,10 +4748,10 @@ const struct elf_size_info mips_elf64_si - #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag - #define elf_backend_adjust_dynamic_symbol \ - _bfd_mips_elf_adjust_dynamic_symbol --#define elf_backend_always_size_sections \ -- _bfd_mips_elf_always_size_sections --#define elf_backend_size_dynamic_sections \ -- _bfd_mips_elf_size_dynamic_sections -+#define elf_backend_early_size_sections \ -+ _bfd_mips_elf_early_size_sections -+#define elf_backend_late_size_sections \ -+ _bfd_mips_elf_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_relocate_section _bfd_mips_elf_relocate_section - #define elf_backend_finish_dynamic_symbol \ ---- a/bfd/elf64-ppc.c -+++ b/bfd/elf64-ppc.c -@@ -119,8 +119,8 @@ static bfd_vma opd_entry_value - #define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol - #define elf_backend_hide_symbol ppc64_elf_hide_symbol - #define elf_backend_maybe_function_sym ppc64_elf_maybe_function_sym --#define elf_backend_always_size_sections ppc64_elf_edit --#define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections -+#define elf_backend_early_size_sections ppc64_elf_edit -+#define elf_backend_late_size_sections ppc64_elf_late_size_sections - #define elf_backend_hash_symbol ppc64_elf_hash_symbol - #define elf_backend_init_index_section _bfd_elf_init_2_index_sections - #define elf_backend_action_discarded ppc64_elf_action_discarded -@@ -10148,7 +10148,7 @@ allocate_dynrelocs (struct elf_link_hash - ((((v) & 0x3ffff0000ULL) << 16) | (v & 0xffff)) - #define HA34(v) ((v + (1ULL << 33)) >> 34) - --/* Called via elf_link_hash_traverse from ppc64_elf_size_dynamic_sections -+/* Called via elf_link_hash_traverse from ppc64_elf_late_size_sections - to set up space for global entry stubs. These are put in glink, - after the branch table. */ - -@@ -10225,8 +10225,8 @@ size_global_entry_stubs (struct elf_link - /* Set the sizes of the dynamic sections. */ - - static bool --ppc64_elf_size_dynamic_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+ppc64_elf_late_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - struct ppc_link_hash_table *htab; - bfd *dynobj; -@@ -10241,7 +10241,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou - - dynobj = htab->elf.dynobj; - if (dynobj == NULL) -- abort (); -+ return true; - - if (htab->elf.dynamic_sections_created) - { ---- a/bfd/elf64-s390.c -+++ b/bfd/elf64-s390.c -@@ -1301,7 +1301,7 @@ elf_s390_gc_mark_hook (asection *sec, - entry but we found we will not create any. Called when we find we will - not have any PLT for this symbol, by for example - elf_s390_adjust_dynamic_symbol when we're doing a proper dynamic link, -- or elf_s390_size_dynamic_sections if no dynamic sections will be -+ or elf_s390_late_size_sections if no dynamic sections will be - created (we're only linking static objects). */ - - static void -@@ -1714,8 +1714,8 @@ allocate_dynrelocs (struct elf_link_hash - /* Set the sizes of the dynamic sections. */ - - static bool --elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elf_s390_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_s390_link_hash_table *htab; - bfd *dynobj; -@@ -1729,7 +1729,7 @@ elf_s390_size_dynamic_sections (bfd *out - - dynobj = htab->elf.dynobj; - if (dynobj == NULL) -- abort (); -+ return true; - - if (htab->elf.dynamic_sections_created) - { -@@ -3912,7 +3912,7 @@ const struct elf_size_info s390_elf64_si - #define elf_backend_gc_mark_hook elf_s390_gc_mark_hook - #define elf_backend_reloc_type_class elf_s390_reloc_type_class - #define elf_backend_relocate_section elf_s390_relocate_section --#define elf_backend_size_dynamic_sections elf_s390_size_dynamic_sections -+#define elf_backend_late_size_sections elf_s390_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_grok_prstatus elf_s390_grok_prstatus - #define elf_backend_grok_psinfo elf_s390_grok_psinfo ---- a/bfd/elf64-sparc.c -+++ b/bfd/elf64-sparc.c -@@ -953,8 +953,8 @@ const struct elf_size_info elf64_sparc_s - _bfd_sparc_elf_adjust_dynamic_symbol - #define elf_backend_omit_section_dynsym \ - _bfd_sparc_elf_omit_section_dynsym --#define elf_backend_size_dynamic_sections \ -- _bfd_sparc_elf_size_dynamic_sections -+#define elf_backend_late_size_sections \ -+ _bfd_sparc_elf_late_size_sections - #define elf_backend_relocate_section \ - _bfd_sparc_elf_relocate_section - #define elf_backend_finish_dynamic_symbol \ ---- a/bfd/elf64-tilegx.c -+++ b/bfd/elf64-tilegx.c -@@ -106,7 +106,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_I - #define elf_backend_check_relocs tilegx_elf_check_relocs - #define elf_backend_adjust_dynamic_symbol tilegx_elf_adjust_dynamic_symbol - #define elf_backend_omit_section_dynsym tilegx_elf_omit_section_dynsym --#define elf_backend_size_dynamic_sections tilegx_elf_size_dynamic_sections -+#define elf_backend_late_size_sections tilegx_elf_late_size_sections - #define elf_backend_relocate_section tilegx_elf_relocate_section - #define elf_backend_finish_dynamic_symbol tilegx_elf_finish_dynamic_symbol - #define elf_backend_finish_dynamic_sections tilegx_elf_finish_dynamic_sections ---- a/bfd/elf64-x86-64.c -+++ b/bfd/elf64-x86-64.c -@@ -2549,8 +2549,7 @@ elf_x86_64_scan_relocs (bfd *abfd, struc - } - - static bool --elf_x86_64_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+elf_x86_64_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - bfd *abfd; - -@@ -2563,7 +2562,7 @@ elf_x86_64_always_size_sections (bfd *ou - elf_x86_64_scan_relocs)) - return false; - -- return _bfd_x86_elf_always_size_sections (output_bfd, info); -+ return _bfd_x86_elf_early_size_sections (output_bfd, info); - } - - /* Return the relocation value for @tpoff relocation -@@ -5638,7 +5637,7 @@ elf_x86_64_special_sections[]= - elf_x86_64_reloc_name_lookup - - #define elf_backend_relocs_compatible elf_x86_64_relocs_compatible --#define elf_backend_always_size_sections elf_x86_64_always_size_sections -+#define elf_backend_early_size_sections elf_x86_64_early_size_sections - #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections - #define elf_backend_finish_dynamic_sections elf_x86_64_finish_dynamic_sections - #define elf_backend_finish_dynamic_symbol elf_x86_64_finish_dynamic_symbol ---- a/bfd/elflink.c -+++ b/bfd/elflink.c -@@ -6676,8 +6676,8 @@ bfd_elf_size_dynamic_sections (bfd *outp - - /* The backend may have to create some sections regardless of whether - we're dynamic or not. */ -- if (bed->elf_backend_always_size_sections -- && ! (*bed->elf_backend_always_size_sections) (output_bfd, info)) -+ if (bed->elf_backend_early_size_sections -+ && !bed->elf_backend_early_size_sections (output_bfd, info)) - return false; - - dynobj = elf_hash_table (info)->dynobj; -@@ -7483,9 +7483,8 @@ NOTE: This behaviour is deprecated and w - - /* The backend must work out the sizes of all the other dynamic - sections. */ -- if (dynobj != NULL -- && bed->elf_backend_size_dynamic_sections != NULL -- && ! (*bed->elf_backend_size_dynamic_sections) (output_bfd, info)) -+ if (bed->elf_backend_late_size_sections != NULL -+ && !bed->elf_backend_late_size_sections (output_bfd, info)) - return false; - - if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created) ---- a/bfd/elfn32-mips.c -+++ b/bfd/elfn32-mips.c -@@ -4138,10 +4138,8 @@ static const struct ecoff_debug_swap mip - #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag - #define elf_backend_adjust_dynamic_symbol \ - _bfd_mips_elf_adjust_dynamic_symbol --#define elf_backend_always_size_sections \ -- _bfd_mips_elf_always_size_sections --#define elf_backend_size_dynamic_sections \ -- _bfd_mips_elf_size_dynamic_sections -+#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections -+#define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_relocate_section _bfd_mips_elf_relocate_section - #define elf_backend_finish_dynamic_symbol \ ---- a/bfd/elfnn-aarch64.c -+++ b/bfd/elfnn-aarch64.c -@@ -112,7 +112,7 @@ - allocate space for one relocation on the slot. Record the GOT offset - for this symbol. - -- elfNN_aarch64_size_dynamic_sections () -+ elfNN_aarch64_late_size_sections () - - Iterate all input BFDS, look for in the local symbol data structure - constructed earlier for local TLS symbols and allocate them double -@@ -9175,8 +9175,8 @@ elfNN_aarch64_allocate_local_ifunc_dynre - though ! */ - - static bool --elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elfNN_aarch64_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_aarch64_link_hash_table *htab; - bfd *dynobj; -@@ -9187,7 +9187,8 @@ elfNN_aarch64_size_dynamic_sections (bfd - htab = elf_aarch64_hash_table ((info)); - dynobj = htab->root.dynobj; - -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->root.dynamic_sections_created) - { -@@ -9589,8 +9590,8 @@ elfNN_aarch64_create_small_pltn_entry (s - _TLS_MODULE_BASE_, if needed. */ - - static bool --elfNN_aarch64_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+elfNN_aarch64_early_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - asection *tls_sec; - -@@ -10323,8 +10324,8 @@ const struct elf_size_info elfNN_aarch64 - #define elf_backend_adjust_dynamic_symbol \ - elfNN_aarch64_adjust_dynamic_symbol - --#define elf_backend_always_size_sections \ -- elfNN_aarch64_always_size_sections -+#define elf_backend_early_size_sections \ -+ elfNN_aarch64_early_size_sections - - #define elf_backend_check_relocs \ - elfNN_aarch64_check_relocs -@@ -10379,8 +10380,8 @@ const struct elf_size_info elfNN_aarch64 - #define elf_backend_modify_headers \ - elfNN_aarch64_modify_headers - --#define elf_backend_size_dynamic_sections \ -- elfNN_aarch64_size_dynamic_sections -+#define elf_backend_late_size_sections \ -+ elfNN_aarch64_late_size_sections - - #define elf_backend_size_info \ - elfNN_aarch64_size_info ---- a/bfd/elfnn-ia64.c -+++ b/bfd/elfnn-ia64.c -@@ -2987,8 +2987,8 @@ elfNN_ia64_adjust_dynamic_symbol (struct - } - - static bool --elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elfNN_ia64_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elfNN_ia64_allocate_data data; - struct elfNN_ia64_link_hash_table *ia64_info; -@@ -2999,8 +2999,9 @@ elfNN_ia64_size_dynamic_sections (bfd *o - if (ia64_info == NULL) - return false; - dynobj = ia64_info->root.dynobj; -+ if (dynobj == NULL) -+ return true; - ia64_info->self_dtpmod_offset = (bfd_vma) -1; -- BFD_ASSERT(dynobj != NULL); - data.info = info; - - /* Set the contents of the .interp section to the interpreter. */ -@@ -5036,8 +5037,8 @@ ignore_errors (const char *fmt ATTRIBUTE - elfNN_ia64_check_relocs - #define elf_backend_adjust_dynamic_symbol \ - elfNN_ia64_adjust_dynamic_symbol --#define elf_backend_size_dynamic_sections \ -- elfNN_ia64_size_dynamic_sections -+#define elf_backend_late_size_sections \ -+ elfNN_ia64_late_size_sections - #define elf_backend_omit_section_dynsym \ - _bfd_elf_omit_section_dynsym_all - #define elf_backend_relocate_section \ ---- a/bfd/elfnn-kvx.c -+++ b/bfd/elfnn-kvx.c -@@ -4033,8 +4033,8 @@ kvx_readonly_dynrelocs (struct elf_link_ - /* This is the most important function of all . Innocuosly named - though ! */ - static bool --elfNN_kvx_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+elfNN_kvx_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct elf_kvx_link_hash_table *htab; - bfd *dynobj; -@@ -4044,8 +4044,8 @@ elfNN_kvx_size_dynamic_sections (bfd *ou - - htab = elf_kvx_hash_table ((info)); - dynobj = htab->root.dynobj; -- -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->root.dynamic_sections_created) - { -@@ -4359,8 +4359,7 @@ elfNN_kvx_create_small_pltn_entry (struc - _TLS_MODULE_BASE_, if needed. */ - - static bool --elfNN_kvx_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+elfNN_kvx_early_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - asection *tls_sec; - -@@ -4715,8 +4714,8 @@ elfNN_kvx_plt_sym_val (bfd_vma i, const - #define elf_backend_adjust_dynamic_symbol \ - elfNN_kvx_adjust_dynamic_symbol - --#define elf_backend_always_size_sections \ -- elfNN_kvx_always_size_sections -+#define elf_backend_early_size_sections \ -+ elfNN_kvx_early_size_sections - - #define elf_backend_check_relocs \ - elfNN_kvx_check_relocs -@@ -4759,8 +4758,8 @@ elfNN_kvx_plt_sym_val (bfd_vma i, const - #define elf_backend_reloc_type_class \ - elfNN_kvx_reloc_type_class - --#define elf_backend_size_dynamic_sections \ -- elfNN_kvx_size_dynamic_sections -+#define elf_backend_late_size_sections \ -+ elfNN_kvx_late_size_sections - - #define elf_backend_can_refcount 1 - #define elf_backend_can_gc_sections 1 ---- a/bfd/elfnn-loongarch.c -+++ b/bfd/elfnn-loongarch.c -@@ -1731,8 +1731,8 @@ maybe_set_textrel (struct elf_link_hash_ - } - - static bool --loongarch_elf_size_dynamic_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+loongarch_elf_late_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - struct loongarch_elf_link_hash_table *htab; - bfd *dynobj; -@@ -1742,7 +1742,8 @@ loongarch_elf_size_dynamic_sections (bfd - htab = loongarch_elf_hash_table (info); - BFD_ASSERT (htab != NULL); - dynobj = htab->elf.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (htab->elf.dynamic_sections_created) - { -@@ -5340,7 +5341,7 @@ elf_loongarch64_hash_symbol (struct elf_ - loongarch_elf_create_dynamic_sections - #define elf_backend_check_relocs loongarch_elf_check_relocs - #define elf_backend_adjust_dynamic_symbol loongarch_elf_adjust_dynamic_symbol --#define elf_backend_size_dynamic_sections loongarch_elf_size_dynamic_sections -+#define elf_backend_late_size_sections loongarch_elf_late_size_sections - #define elf_backend_relocate_section loongarch_elf_relocate_section - #define elf_backend_finish_dynamic_symbol loongarch_elf_finish_dynamic_symbol - #define elf_backend_output_arch_local_syms \ ---- a/bfd/elfnn-riscv.c -+++ b/bfd/elfnn-riscv.c -@@ -1482,7 +1482,7 @@ allocate_local_ifunc_dynrelocs (void **s - } - - static bool --riscv_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) -+riscv_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) - { - struct riscv_elf_link_hash_table *htab; - bfd *dynobj; -@@ -1492,7 +1492,8 @@ riscv_elf_size_dynamic_sections (bfd *ou - htab = riscv_elf_hash_table (info); - BFD_ASSERT (htab != NULL); - dynobj = htab->elf.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -5570,7 +5571,7 @@ riscv_elf_merge_symbol_attribute (struct - #define elf_backend_create_dynamic_sections riscv_elf_create_dynamic_sections - #define elf_backend_check_relocs riscv_elf_check_relocs - #define elf_backend_adjust_dynamic_symbol riscv_elf_adjust_dynamic_symbol --#define elf_backend_size_dynamic_sections riscv_elf_size_dynamic_sections -+#define elf_backend_late_size_sections riscv_elf_late_size_sections - #define elf_backend_relocate_section riscv_elf_relocate_section - #define elf_backend_finish_dynamic_symbol riscv_elf_finish_dynamic_symbol - #define elf_backend_finish_dynamic_sections riscv_elf_finish_dynamic_sections ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -9649,8 +9649,8 @@ _bfd_mips_elf_adjust_dynamic_symbol (str - check for any mips16 stub sections that we can discard. */ - - bool --_bfd_mips_elf_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+_bfd_mips_elf_early_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - asection *sect; - struct mips_elf_link_hash_table *htab; -@@ -9993,8 +9993,8 @@ mips_elf_set_plt_sym_value (struct mips_ - /* Set the sizes of the dynamic sections. */ - - bool --_bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+_bfd_mips_elf_late_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - bfd *dynobj; - asection *s, *sreldyn; -@@ -10004,7 +10004,8 @@ _bfd_mips_elf_size_dynamic_sections (bfd - htab = mips_elf_hash_table (info); - BFD_ASSERT (htab != NULL); - dynobj = elf_hash_table (info)->dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { -@@ -14938,7 +14939,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str - input_section->flags &= ~SEC_HAS_CONTENTS; - } - -- /* Size has been set in _bfd_mips_elf_always_size_sections. */ -+ /* Size has been set in _bfd_mips_elf_early_size_sections. */ - BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0)); - - /* Skip this section later on (I don't think this currently -@@ -14997,7 +14998,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str - input_section->flags &= ~SEC_HAS_CONTENTS; - } - -- /* Size has been set in _bfd_mips_elf_always_size_sections. */ -+ /* Size has been set in _bfd_mips_elf_early_size_sections. */ - BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo)); - - /* Skip this section later on (I don't think this currently ---- a/bfd/elfxx-mips.h -+++ b/bfd/elfxx-mips.h -@@ -67,9 +67,9 @@ extern bool _bfd_mips_elf_check_relocs - (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); - extern bool _bfd_mips_elf_adjust_dynamic_symbol - (struct bfd_link_info *, struct elf_link_hash_entry *); --extern bool _bfd_mips_elf_always_size_sections -+extern bool _bfd_mips_elf_early_size_sections - (bfd *, struct bfd_link_info *); --extern bool _bfd_mips_elf_size_dynamic_sections -+extern bool _bfd_mips_elf_late_size_sections - (bfd *, struct bfd_link_info *); - extern int _bfd_mips_elf_relocate_section - (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, ---- a/bfd/elfxx-sparc.c -+++ b/bfd/elfxx-sparc.c -@@ -2381,8 +2381,8 @@ _bfd_sparc_elf_omit_section_dynsym (bfd - /* Set the sizes of the dynamic sections. */ - - bool --_bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+_bfd_sparc_elf_late_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - struct _bfd_sparc_elf_link_hash_table *htab; - bfd *dynobj; -@@ -2392,7 +2392,8 @@ _bfd_sparc_elf_size_dynamic_sections (bf - htab = _bfd_sparc_elf_hash_table (info); - BFD_ASSERT (htab != NULL); - dynobj = htab->elf.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { ---- a/bfd/elfxx-sparc.h -+++ b/bfd/elfxx-sparc.h -@@ -117,7 +117,7 @@ extern bool _bfd_sparc_elf_adjust_dynami - (struct bfd_link_info *, struct elf_link_hash_entry *); - extern bool _bfd_sparc_elf_omit_section_dynsym - (bfd *, struct bfd_link_info *, asection *); --extern bool _bfd_sparc_elf_size_dynamic_sections -+extern bool _bfd_sparc_elf_late_size_sections - (bfd *, struct bfd_link_info *); - extern bool _bfd_sparc_elf_new_section_hook - (bfd *, asection *); ---- a/bfd/elfxx-target.h -+++ b/bfd/elfxx-target.h -@@ -487,11 +487,11 @@ - #ifndef elf_backend_adjust_dynamic_symbol - #define elf_backend_adjust_dynamic_symbol 0 - #endif --#ifndef elf_backend_always_size_sections --#define elf_backend_always_size_sections 0 -+#ifndef elf_backend_early_size_sections -+#define elf_backend_early_size_sections 0 - #endif --#ifndef elf_backend_size_dynamic_sections --#define elf_backend_size_dynamic_sections 0 -+#ifndef elf_backend_late_size_sections -+#define elf_backend_late_size_sections 0 - #endif - #ifndef elf_backend_strip_zero_sized_dynamic_sections - #define elf_backend_strip_zero_sized_dynamic_sections 0 -@@ -853,8 +853,8 @@ static const struct elf_backend_data elf - elf_backend_check_directives, - elf_backend_notice_as_needed, - elf_backend_adjust_dynamic_symbol, -- elf_backend_always_size_sections, -- elf_backend_size_dynamic_sections, -+ elf_backend_early_size_sections, -+ elf_backend_late_size_sections, - elf_backend_strip_zero_sized_dynamic_sections, - elf_backend_init_index_section, - elf_backend_relocate_section, ---- a/bfd/elfxx-tilegx.c -+++ b/bfd/elfxx-tilegx.c -@@ -2430,8 +2430,8 @@ tilegx_elf_omit_section_dynsym (bfd *out - } - - bool --tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -- struct bfd_link_info *info) -+tilegx_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, -+ struct bfd_link_info *info) - { - struct tilegx_elf_link_hash_table *htab; - bfd *dynobj; -@@ -2441,7 +2441,8 @@ tilegx_elf_size_dynamic_sections (bfd *o - htab = tilegx_elf_hash_table (info); - BFD_ASSERT (htab != NULL); - dynobj = htab->elf.dynobj; -- BFD_ASSERT (dynobj != NULL); -+ if (dynobj == NULL) -+ return true; - - if (elf_hash_table (info)->dynamic_sections_created) - { ---- a/bfd/elfxx-tilegx.h -+++ b/bfd/elfxx-tilegx.h -@@ -57,7 +57,7 @@ tilegx_elf_omit_section_dynsym (bfd *, - asection *); - - extern bool --tilegx_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); -+tilegx_elf_late_size_sections (bfd *, struct bfd_link_info *); - - extern int - tilegx_elf_relocate_section (bfd *, struct bfd_link_info *, ---- a/bfd/elfxx-x86.c -+++ b/bfd/elfxx-x86.c -@@ -2241,7 +2241,7 @@ _bfd_elf_x86_valid_reloc_p (asection *in - /* Set the sizes of the dynamic sections. */ - - bool --_bfd_x86_elf_size_dynamic_sections (bfd *output_bfd, -+_bfd_x86_elf_late_size_sections (bfd *output_bfd, - struct bfd_link_info *info) - { - struct elf_x86_link_hash_table *htab; -@@ -2257,7 +2257,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd - return false; - dynobj = htab->elf.dynobj; - if (dynobj == NULL) -- abort (); -+ return true; - - /* Set up .got offsets for local syms, and space for local dynamic - relocs. */ -@@ -3003,8 +3003,8 @@ _bfd_x86_elf_finish_dynamic_sections (bf - - - bool --_bfd_x86_elf_always_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) -+_bfd_x86_elf_early_size_sections (bfd *output_bfd, -+ struct bfd_link_info *info) - { - asection *tls_sec = elf_hash_table (info)->tls_sec; - ---- a/bfd/elfxx-x86.h -+++ b/bfd/elfxx-x86.h -@@ -850,13 +850,13 @@ extern bool _bfd_elf_x86_valid_reloc_p - const Elf_Internal_Rela *, struct elf_link_hash_entry *, - Elf_Internal_Sym *, Elf_Internal_Shdr *, bool *); - --extern bool _bfd_x86_elf_size_dynamic_sections -+extern bool _bfd_x86_elf_late_size_sections - (bfd *, struct bfd_link_info *); - - extern struct elf_x86_link_hash_table *_bfd_x86_elf_finish_dynamic_sections - (bfd *, struct bfd_link_info *); - --extern bool _bfd_x86_elf_always_size_sections -+extern bool _bfd_x86_elf_early_size_sections - (bfd *, struct bfd_link_info *); - - extern void _bfd_x86_elf_merge_symbol_attribute -@@ -928,8 +928,8 @@ extern void _bfd_x86_elf_link_report_rel - - #define elf_backend_check_relocs \ - _bfd_x86_elf_check_relocs --#define elf_backend_size_dynamic_sections \ -- _bfd_x86_elf_size_dynamic_sections -+#define elf_backend_late_size_sections \ -+ _bfd_x86_elf_late_size_sections - #define elf_backend_merge_symbol_attribute \ - _bfd_x86_elf_merge_symbol_attribute - #define elf_backend_copy_indirect_symbol \ ---- a/ld/emultempl/vms.em -+++ b/ld/emultempl/vms.em -@@ -197,10 +197,9 @@ gld${EMULATION_NAME}_before_allocation ( - - /* The backend must work out the sizes of all the other dynamic - sections. */ -- if (elf_hash_table (&link_info)->dynamic_sections_created -- && bed->elf_backend_size_dynamic_sections -- && ! (*bed->elf_backend_size_dynamic_sections) (link_info.output_bfd, -- &link_info)) -+ if (bed->elf_backend_late_size_sections -+ && !bed->elf_backend_late_size_sections (link_info.output_bfd, -+ &link_info)) - einfo (_("%F%P: failed to set dynamic section sizes: %E\n")); - - before_allocation_default (); diff --git a/toolchain/binutils/patches/2.42/002-PR-30569-delete-_bfd_mips_elf_early_size_sections.patch b/toolchain/binutils/patches/2.42/002-PR-30569-delete-_bfd_mips_elf_early_size_sections.patch deleted file mode 100644 index 49381a4fa9..0000000000 --- a/toolchain/binutils/patches/2.42/002-PR-30569-delete-_bfd_mips_elf_early_size_sections.patch +++ /dev/null @@ -1,218 +0,0 @@ -From 3c6c32951e292a51ede70b8087bb0308d7dbc4fc Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Thu, 28 Mar 2024 20:33:32 +1030 -Subject: [PATCH 2/2] PR 30569, delete _bfd_mips_elf_early_size_sections - -PR30569 was triggered by a patch of mine 6540edd52cc0 moving the call -to always_size_sections in bfd_elf_size_dynamic_sections earlier, made -to support the x86 DT_RELR implementation. This broke mips16 code -handling stubs when --export-dynamic is passed to the linker, because -numerous symbols then became dynamic after always_size_sections. The -mips backend fiddles with symbols in its always_size_sections. Maciej -in 902e9fc76a0e had moved the call to always_size_sections to after -the export-dynamic code. Prior to that, Nathan in 04c3a75556c0 moved -it before the exec stack code, back to the start of -bfd_elf_size_dynamic_sections which was where Ian put it originally -in ff12f303355b. So the call has moved around a little. I'm leaving -it where it is, and instead calling mips_elf_check_symbols from -late_size_sections (the old size_dynamic_sections) which is now always -called. In fact, the whole of _bfd_mips_elf_early_size_sections can -be merged into _bfd_mips_elf_late_size_sections. ---- - bfd/elf32-mips.c | 1 - - bfd/elf64-mips.c | 2 -- - bfd/elfn32-mips.c | 1 - - bfd/elfxx-mips.c | 84 +++++++++++++++++++---------------------------- - bfd/elfxx-mips.h | 2 -- - 5 files changed, 34 insertions(+), 56 deletions(-) - ---- a/bfd/elf32-mips.c -+++ b/bfd/elf32-mips.c -@@ -2537,7 +2537,6 @@ static const struct ecoff_debug_swap mip - #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag - #define elf_backend_adjust_dynamic_symbol \ - _bfd_mips_elf_adjust_dynamic_symbol --#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections - #define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_relocate_section _bfd_mips_elf_relocate_section ---- a/bfd/elf64-mips.c -+++ b/bfd/elf64-mips.c -@@ -4748,8 +4748,6 @@ const struct elf_size_info mips_elf64_si - #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag - #define elf_backend_adjust_dynamic_symbol \ - _bfd_mips_elf_adjust_dynamic_symbol --#define elf_backend_early_size_sections \ -- _bfd_mips_elf_early_size_sections - #define elf_backend_late_size_sections \ - _bfd_mips_elf_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section ---- a/bfd/elfn32-mips.c -+++ b/bfd/elfn32-mips.c -@@ -4138,7 +4138,6 @@ static const struct ecoff_debug_swap mip - #define elf_backend_get_target_dtag _bfd_mips_elf_get_target_dtag - #define elf_backend_adjust_dynamic_symbol \ - _bfd_mips_elf_adjust_dynamic_symbol --#define elf_backend_early_size_sections _bfd_mips_elf_early_size_sections - #define elf_backend_late_size_sections _bfd_mips_elf_late_size_sections - #define elf_backend_init_index_section _bfd_elf_init_1_index_section - #define elf_backend_relocate_section _bfd_mips_elf_relocate_section ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -9644,48 +9644,6 @@ _bfd_mips_elf_adjust_dynamic_symbol (str - return _bfd_elf_adjust_dynamic_copy (info, h, s); - } - --/* This function is called after all the input files have been read, -- and the input sections have been assigned to output sections. We -- check for any mips16 stub sections that we can discard. */ -- --bool --_bfd_mips_elf_early_size_sections (bfd *output_bfd, -- struct bfd_link_info *info) --{ -- asection *sect; -- struct mips_elf_link_hash_table *htab; -- struct mips_htab_traverse_info hti; -- -- htab = mips_elf_hash_table (info); -- BFD_ASSERT (htab != NULL); -- -- /* The .reginfo section has a fixed size. */ -- sect = bfd_get_section_by_name (output_bfd, ".reginfo"); -- if (sect != NULL) -- { -- bfd_set_section_size (sect, sizeof (Elf32_External_RegInfo)); -- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS; -- } -- -- /* The .MIPS.abiflags section has a fixed size. */ -- sect = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags"); -- if (sect != NULL) -- { -- bfd_set_section_size (sect, sizeof (Elf_External_ABIFlags_v0)); -- sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS; -- } -- -- hti.info = info; -- hti.output_bfd = output_bfd; -- hti.error = false; -- mips_elf_link_hash_traverse (mips_elf_hash_table (info), -- mips_elf_check_symbols, &hti); -- if (hti.error) -- return false; -- -- return true; --} -- - /* If the link uses a GOT, lay it out and work out its size. */ - - static bool -@@ -9990,7 +9948,8 @@ mips_elf_set_plt_sym_value (struct mips_ - return true; - } - --/* Set the sizes of the dynamic sections. */ -+/* Set the sizes of the dynamic sections, some mips non-dynamic sections, -+ and check for any mips16 stub sections that we can discard. */ - - bool - _bfd_mips_elf_late_size_sections (bfd *output_bfd, -@@ -10000,14 +9959,39 @@ _bfd_mips_elf_late_size_sections (bfd *o - asection *s, *sreldyn; - bool reltext; - struct mips_elf_link_hash_table *htab; -+ struct mips_htab_traverse_info hti; - - htab = mips_elf_hash_table (info); - BFD_ASSERT (htab != NULL); -- dynobj = elf_hash_table (info)->dynobj; -+ -+ /* The .reginfo section has a fixed size. */ -+ s = bfd_get_section_by_name (output_bfd, ".reginfo"); -+ if (s != NULL) -+ { -+ bfd_set_section_size (s, sizeof (Elf32_External_RegInfo)); -+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS; -+ } -+ -+ /* The .MIPS.abiflags section has a fixed size. */ -+ s = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags"); -+ if (s != NULL) -+ { -+ bfd_set_section_size (s, sizeof (Elf_External_ABIFlags_v0)); -+ s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS; -+ } -+ -+ hti.info = info; -+ hti.output_bfd = output_bfd; -+ hti.error = false; -+ mips_elf_link_hash_traverse (htab, mips_elf_check_symbols, &hti); -+ if (hti.error) -+ return false; -+ -+ dynobj = htab->root.dynobj; - if (dynobj == NULL) - return true; - -- if (elf_hash_table (info)->dynamic_sections_created) -+ if (htab->root.dynamic_sections_created) - { - /* Set the contents of the .interp section to the interpreter. */ - if (bfd_link_executable (info) && !info->nointerp) -@@ -10147,7 +10131,7 @@ _bfd_mips_elf_late_size_sections (bfd *o - } - } - else if (bfd_link_executable (info) -- && ! mips_elf_hash_table (info)->use_rld_obj_head -+ && !htab->use_rld_obj_head - && startswith (name, ".rld_map")) - { - /* We add a room for __rld_map. It will be filled in by the -@@ -10156,7 +10140,7 @@ _bfd_mips_elf_late_size_sections (bfd *o - } - else if (SGI_COMPAT (output_bfd) - && startswith (name, ".compact_rel")) -- s->size += mips_elf_hash_table (info)->compact_rel_size; -+ s->size += htab->compact_rel_size; - else if (s == htab->root.splt) - { - /* If the last PLT entry has a branch delay slot, allocate -@@ -10196,7 +10180,7 @@ _bfd_mips_elf_late_size_sections (bfd *o - } - } - -- if (elf_hash_table (info)->dynamic_sections_created) -+ if (htab->root.dynamic_sections_created) - { - /* Add some entries to the .dynamic section. We fill in the - values later, in _bfd_mips_elf_finish_dynamic_sections, but we -@@ -14939,7 +14923,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str - input_section->flags &= ~SEC_HAS_CONTENTS; - } - -- /* Size has been set in _bfd_mips_elf_early_size_sections. */ -+ /* Size has been set in _bfd_mips_elf_late_size_sections. */ - BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0)); - - /* Skip this section later on (I don't think this currently -@@ -14998,7 +14982,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str - input_section->flags &= ~SEC_HAS_CONTENTS; - } - -- /* Size has been set in _bfd_mips_elf_early_size_sections. */ -+ /* Size has been set in _bfd_mips_elf_late_size_sections. */ - BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo)); - - /* Skip this section later on (I don't think this currently ---- a/bfd/elfxx-mips.h -+++ b/bfd/elfxx-mips.h -@@ -67,8 +67,6 @@ extern bool _bfd_mips_elf_check_relocs - (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); - extern bool _bfd_mips_elf_adjust_dynamic_symbol - (struct bfd_link_info *, struct elf_link_hash_entry *); --extern bool _bfd_mips_elf_early_size_sections -- (bfd *, struct bfd_link_info *); - extern bool _bfd_mips_elf_late_size_sections - (bfd *, struct bfd_link_info *); - extern int _bfd_mips_elf_relocate_section diff --git a/toolchain/binutils/patches/2.42/003-PR-32372-opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch b/toolchain/binutils/patches/2.42/003-PR-32372-opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch deleted file mode 100644 index 9454f3fa9f..0000000000 --- a/toolchain/binutils/patches/2.42/003-PR-32372-opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Sat, 16 Nov 2024 05:03:52 +0000 -Subject: [PATCH] opcodes: fix -std=gnu23 compatibility wrt static_assert - -static_assert is declared in C23 so we can't reuse that identifier: -* Define our own static_assert conditionally; - -* Rename "static assert" hacks to _N as we do already in some places - to avoid a conflict. - -ChangeLog: - PR ld/32372 - - * i386-gen.c (static_assert): Define conditionally. - * mips-formats.h (MAPPED_INT): Rename identifier. - (MAPPED_REG): Rename identifier. - (OPTIONAL_MAPPED_REG): Rename identifier. - * s390-opc.c (static_assert): Define conditionally. ---- - opcodes/i386-gen.c | 2 ++ - opcodes/mips-formats.h | 6 +++--- - opcodes/s390-opc.c | 2 ++ - 3 files changed, 7 insertions(+), 3 deletions(-) - ---- a/opcodes/i386-gen.c -+++ b/opcodes/i386-gen.c -@@ -30,7 +30,9 @@ - - /* Build-time checks are preferrable over runtime ones. Use this construct - in preference where possible. */ -+#ifndef static_assert - #define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); })) -+#endif - - static const char *program_name = NULL; - static int debug = 0; ---- a/opcodes/mips-formats.h -+++ b/opcodes/mips-formats.h -@@ -49,7 +49,7 @@ - #define MAPPED_INT(SIZE, LSB, MAP, PRINT_HEX) \ - { \ - typedef char ATTRIBUTE_UNUSED \ -- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ -+ static_assert_3[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ - static const struct mips_mapped_int_operand op = { \ - { OP_MAPPED_INT, SIZE, LSB }, MAP, PRINT_HEX \ - }; \ -@@ -83,7 +83,7 @@ - #define MAPPED_REG(SIZE, LSB, BANK, MAP) \ - { \ - typedef char ATTRIBUTE_UNUSED \ -- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ -+ static_assert_4[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ - static const struct mips_reg_operand op = { \ - { OP_REG, SIZE, LSB }, OP_REG_##BANK, MAP \ - }; \ -@@ -93,7 +93,7 @@ - #define OPTIONAL_MAPPED_REG(SIZE, LSB, BANK, MAP) \ - { \ - typedef char ATTRIBUTE_UNUSED \ -- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ -+ static_assert_5[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ - static const struct mips_reg_operand op = { \ - { OP_OPTIONAL_REG, SIZE, LSB }, OP_REG_##BANK, MAP \ - }; \ ---- a/opcodes/s390-opc.c -+++ b/opcodes/s390-opc.c -@@ -36,7 +36,9 @@ - - /* Build-time checks are preferrable over runtime ones. Use this construct - in preference where possible. */ -+#ifndef static_assert - #define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); })) -+#endif - - #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - diff --git a/toolchain/binutils/patches/2.43.1/003-PR-32372-opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch b/toolchain/binutils/patches/2.43.1/003-PR-32372-opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch deleted file mode 100644 index 9454f3fa9f..0000000000 --- a/toolchain/binutils/patches/2.43.1/003-PR-32372-opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4 Mon Sep 17 00:00:00 2001 -From: Sam James -Date: Sat, 16 Nov 2024 05:03:52 +0000 -Subject: [PATCH] opcodes: fix -std=gnu23 compatibility wrt static_assert - -static_assert is declared in C23 so we can't reuse that identifier: -* Define our own static_assert conditionally; - -* Rename "static assert" hacks to _N as we do already in some places - to avoid a conflict. - -ChangeLog: - PR ld/32372 - - * i386-gen.c (static_assert): Define conditionally. - * mips-formats.h (MAPPED_INT): Rename identifier. - (MAPPED_REG): Rename identifier. - (OPTIONAL_MAPPED_REG): Rename identifier. - * s390-opc.c (static_assert): Define conditionally. ---- - opcodes/i386-gen.c | 2 ++ - opcodes/mips-formats.h | 6 +++--- - opcodes/s390-opc.c | 2 ++ - 3 files changed, 7 insertions(+), 3 deletions(-) - ---- a/opcodes/i386-gen.c -+++ b/opcodes/i386-gen.c -@@ -30,7 +30,9 @@ - - /* Build-time checks are preferrable over runtime ones. Use this construct - in preference where possible. */ -+#ifndef static_assert - #define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); })) -+#endif - - static const char *program_name = NULL; - static int debug = 0; ---- a/opcodes/mips-formats.h -+++ b/opcodes/mips-formats.h -@@ -49,7 +49,7 @@ - #define MAPPED_INT(SIZE, LSB, MAP, PRINT_HEX) \ - { \ - typedef char ATTRIBUTE_UNUSED \ -- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ -+ static_assert_3[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ - static const struct mips_mapped_int_operand op = { \ - { OP_MAPPED_INT, SIZE, LSB }, MAP, PRINT_HEX \ - }; \ -@@ -83,7 +83,7 @@ - #define MAPPED_REG(SIZE, LSB, BANK, MAP) \ - { \ - typedef char ATTRIBUTE_UNUSED \ -- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ -+ static_assert_4[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ - static const struct mips_reg_operand op = { \ - { OP_REG, SIZE, LSB }, OP_REG_##BANK, MAP \ - }; \ -@@ -93,7 +93,7 @@ - #define OPTIONAL_MAPPED_REG(SIZE, LSB, BANK, MAP) \ - { \ - typedef char ATTRIBUTE_UNUSED \ -- static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ -+ static_assert_5[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \ - static const struct mips_reg_operand op = { \ - { OP_OPTIONAL_REG, SIZE, LSB }, OP_REG_##BANK, MAP \ - }; \ ---- a/opcodes/s390-opc.c -+++ b/opcodes/s390-opc.c -@@ -36,7 +36,9 @@ - - /* Build-time checks are preferrable over runtime ones. Use this construct - in preference where possible. */ -+#ifndef static_assert - #define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); })) -+#endif - - #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) - diff --git a/toolchain/binutils/patches/2.43.1/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.43.1/300-001_ld_makefile_patch.patch deleted file mode 100644 index 64dae55dd7..0000000000 --- a/toolchain/binutils/patches/2.43.1/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -583,7 +583,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.43.1/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.43.1/400-mips_no_dynamic_linking_sym.patch deleted file mode 100644 index d0cc7ddc69..0000000000 --- a/toolchain/binutils/patches/2.43.1/400-mips_no_dynamic_linking_sym.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -8161,6 +8161,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; - bh = NULL; -+ if (0) { - if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, false, get_elf_backend_data (abfd)->collect, &bh))) -@@ -8173,6 +8174,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return false; -+ } - - if (! mips_elf_hash_table (info)->use_rld_obj_head) - { diff --git a/toolchain/binutils/patches/2.43.1/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.43.1/500-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index df38fcaba1..0000000000 --- a/toolchain/binutils/patches/2.43.1/500-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -962,8 +962,8 @@ case "${targ}" in - want64=true - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*-gnuabi64) - targ_defvec=mips_elf64_trad_be_vec -@@ -971,8 +971,8 @@ case "${targ}" in - want64=true - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -597,8 +597,8 @@ mips64*el-*-linux-gnuabi64) - targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip" - targ_extra_libpath=$targ_extra_emuls - ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls - ;; - mips64*-*-linux-gnuabi64) -@@ -606,8 +606,8 @@ mips64*-*-linux-gnuabi64) - targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip" - targ_extra_libpath=$targ_extra_emuls - ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls - ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip diff --git a/toolchain/binutils/patches/2.42/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.46/300-001_ld_makefile_patch.patch similarity index 85% rename from toolchain/binutils/patches/2.42/300-001_ld_makefile_patch.patch rename to toolchain/binutils/patches/2.46/300-001_ld_makefile_patch.patch index 64dae55dd7..9b4568d352 100644 --- a/toolchain/binutils/patches/2.42/300-001_ld_makefile_patch.patch +++ b/toolchain/binutils/patches/2.46/300-001_ld_makefile_patch.patch @@ -1,6 +1,6 @@ --- a/ld/Makefile.am +++ b/ld/Makefile.am -@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) +@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) # We put the scripts in the directory $(scriptdir)/ldscripts. # We can't put the scripts in $(datadir) because the SEARCH_DIR # directives need to be different for native and cross linkers. @@ -11,7 +11,7 @@ EMULATION_OFILES = @EMULATION_OFILES@ --- a/ld/Makefile.in +++ b/ld/Makefile.in -@@ -583,7 +583,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) +@@ -588,7 +588,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) # We put the scripts in the directory $(scriptdir)/ldscripts. # We can't put the scripts in $(datadir) because the SEARCH_DIR # directives need to be different for native and cross linkers. diff --git a/toolchain/binutils/patches/2.42/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.46/400-mips_no_dynamic_linking_sym.patch similarity index 79% rename from toolchain/binutils/patches/2.42/400-mips_no_dynamic_linking_sym.patch rename to toolchain/binutils/patches/2.46/400-mips_no_dynamic_linking_sym.patch index 30f70c2123..6c6418a2a0 100644 --- a/toolchain/binutils/patches/2.42/400-mips_no_dynamic_linking_sym.patch +++ b/toolchain/binutils/patches/2.46/400-mips_no_dynamic_linking_sym.patch @@ -1,6 +1,6 @@ --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c -@@ -8149,6 +8149,7 @@ _bfd_mips_elf_create_dynamic_sections (b +@@ -8214,6 +8214,7 @@ _bfd_mips_elf_create_dynamic_sections (b name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; bh = NULL; @@ -8,7 +8,7 @@ if (!(_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) -@@ -8161,6 +8162,7 @@ _bfd_mips_elf_create_dynamic_sections (b +@@ -8226,6 +8227,7 @@ _bfd_mips_elf_create_dynamic_sections (b if (! bfd_elf_link_record_dynamic_symbol (info, h)) return false; diff --git a/toolchain/binutils/patches/2.42/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.46/500-Change-default-emulation-for-mips64-linux.patch similarity index 54% rename from toolchain/binutils/patches/2.42/500-Change-default-emulation-for-mips64-linux.patch rename to toolchain/binutils/patches/2.46/500-Change-default-emulation-for-mips64-linux.patch index df38fcaba1..ffeb42ef6d 100644 --- a/toolchain/binutils/patches/2.42/500-Change-default-emulation-for-mips64-linux.patch +++ b/toolchain/binutils/patches/2.46/500-Change-default-emulation-for-mips64-linux.patch @@ -1,7 +1,7 @@ --- a/bfd/config.bfd +++ b/bfd/config.bfd -@@ -962,8 +962,8 @@ case "${targ}" in - want64=true +@@ -963,16 +963,16 @@ case "${targ}" in + targ_selvecs="mips_elf64_trad_be_vec mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec" ;; mips64*el-*-linux*) - targ_defvec=mips_elf32_ntrad_le_vec @@ -11,8 +11,7 @@ ;; mips64*-*-linux*-gnuabi64) targ_defvec=mips_elf64_trad_be_vec -@@ -971,8 +971,8 @@ case "${targ}" in - want64=true + targ_selvecs="mips_elf64_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec" ;; mips64*-*-linux*) - targ_defvec=mips_elf32_ntrad_be_vec @@ -24,25 +23,23 @@ targ_defvec=mips_elf32_trad_le_vec --- a/ld/configure.tgt +++ b/ld/configure.tgt -@@ -597,8 +597,8 @@ mips64*el-*-linux-gnuabi64) - targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip" - targ_extra_libpath=$targ_extra_emuls +@@ -574,15 +574,15 @@ mips64*el-*-linux-gnuabi64) + targ_emul=elf64ltsmip + targ_extra_libpath="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip" ;; -mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" +- targ_extra_libpath="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" +mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls ++ targ_extra_libpath="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" ;; mips64*-*-linux-gnuabi64) -@@ -606,8 +606,8 @@ mips64*-*-linux-gnuabi64) - targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip" - targ_extra_libpath=$targ_extra_emuls + targ_emul=elf64btsmip + targ_extra_libpath="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip" ;; -mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" +- targ_extra_libpath="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" +mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls ++ targ_extra_libpath="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" ;; mips*el-*-linux-*) targ_emul=elf32ltsmip + targ_extra_libpath="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile index 8bacf2781c..f6af56207c 100644 --- a/tools/ccache/Makefile +++ b/tools/ccache/Makefile @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ccache -PKG_VERSION:=4.12.1 +PKG_VERSION:=4.13.3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/ccache/ccache/releases/download/v$(PKG_VERSION) -PKG_HASH:=a3da50ab0fb0d42f60c17d1450312e6ace9b681f6221cb77c8a09a845f9d760c +PKG_HASH:=c149d71f47f6fe08e4f2e43db4b0b091c61e8ea3daa23aa998b094bd84ecdfe8 include $(INCLUDE_DIR)/host-build.mk include $(INCLUDE_DIR)/cmake.mk diff --git a/tools/ccache/patches/100-honour-copts.patch b/tools/ccache/patches/100-honour-copts.patch index 447a060064..bf4ff9787b 100644 --- a/tools/ccache/patches/100-honour-copts.patch +++ b/tools/ccache/patches/100-honour-copts.patch @@ -1,6 +1,6 @@ --- a/src/ccache/ccache.cpp +++ b/src/ccache/ccache.cpp -@@ -2181,6 +2181,7 @@ get_manifest_key(Context& ctx, Hash& has +@@ -2321,6 +2321,7 @@ get_manifest_key(Context& ctx, Hash& has "OBJCPLUS_INCLUDE_PATH", // Clang "CLANG_CONFIG_FILE_SYSTEM_DIR", // Clang "CLANG_CONFIG_FILE_USER_DIR", // Clang diff --git a/tools/dosfstools/Makefile b/tools/dosfstools/Makefile index b332efdb96..8222167207 100644 --- a/tools/dosfstools/Makefile +++ b/tools/dosfstools/Makefile @@ -13,7 +13,7 @@ PKG_VERSION:=4.2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://github.com/dosfstools/dosfstools/releases/download/v$(PKG_VERSION)/ \ - http://fossies.org/linux/misc + https://fossies.org/linux/misc PKG_HASH:=64926eebf90092dca21b14259a5301b7b98e7b1943e8a201c7d726084809b527 HOST_FIXUP:=autoreconf diff --git a/tools/elftosb/Makefile b/tools/elftosb/Makefile index 9079ac5803..02951d72d8 100644 --- a/tools/elftosb/Makefile +++ b/tools/elftosb/Makefile @@ -10,7 +10,7 @@ PKG_NAME:=elftosb PKG_VERSION:=10.12.01 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://repository.timesys.com/buildsources/e/elftosb/elftosb-10.12.01/ +PKG_SOURCE_URL:=https://repository.timesys.com/buildsources/e/elftosb/elftosb-10.12.01/ PKG_HASH:=77bb6981620f7575b87d136d94c7daa88dd09195959cc75fc18b138369ecd42b include $(INCLUDE_DIR)/host-build.mk diff --git a/tools/expat/Makefile b/tools/expat/Makefile index 7ad86b08f9..ef7968ad08 100644 --- a/tools/expat/Makefile +++ b/tools/expat/Makefile @@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=expat PKG_CPE_ID:=cpe:/a:libexpat_project:libexpat -PKG_VERSION:=2.7.4 +PKG_VERSION:=2.7.5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_HASH:=461ecc8aa98ab1a68c2db788175665d1a4db640dc05bf0e289b6ea17122144ec +PKG_HASH:=9931f9860d18e6cf72d183eb8f309bfb96196c00e1d40caa978e95bc9aa978b6 PKG_SOURCE_URL:=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$(PKG_VERSION)) HOST_BUILD_PARALLEL:=1 diff --git a/tools/liblzo/Makefile b/tools/liblzo/Makefile index 9313537080..2f585ace70 100644 --- a/tools/liblzo/Makefile +++ b/tools/liblzo/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=2.10 PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/lzo/download/ +PKG_SOURCE_URL:=https://www.oberhumer.com/opensource/lzo/download/ PKG_HASH:=c0f892943208266f9b6543b3ae308fab6284c5c90e627931446fb49b4221a072 PKG_LICENSE:=GPL-2.0-or-later diff --git a/tools/libressl/Makefile b/tools/libressl/Makefile index 621fd7c3bd..767efb645b 100644 --- a/tools/libressl/Makefile +++ b/tools/libressl/Makefile @@ -16,7 +16,7 @@ PKG_CPE_ID:=cpe:/a:openbsd:libressl PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://mirrors.tencent.com/OpenBSD/LibreSSL/ \ https://mirror.ox.ac.uk/pub/OpenBSD/LibreSSL \ - http://ftp.jaist.ac.jp/pub/OpenBSD/LibreSSL \ + https://ftp.jaist.ac.jp/pub/OpenBSD/LibreSSL \ https://ftp.openbsd.org/pub/OpenBSD/LibreSSL HOST_BUILD_PARALLEL:=1 diff --git a/tools/lzop/Makefile b/tools/lzop/Makefile index 65bd7fe67c..e354f1472b 100644 --- a/tools/lzop/Makefile +++ b/tools/lzop/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=lzop PKG_VERSION:=1.04 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz -PKG_SOURCE_URL:=http://www.lzop.org/download/ +PKG_SOURCE_URL:=https://www.lzop.org/download/ PKG_HASH:=7e72b62a8a60aff5200a047eea0773a8fb205caf7acbe1774d95147f305a2f41 PKG_LICENSE:=GPL-2.0-or-later diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile index 7a4b0c1a34..fa39d57050 100644 --- a/tools/mkimage/Makefile +++ b/tools/mkimage/Makefile @@ -12,8 +12,7 @@ PKG_VERSION:=2026.04 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 + https://ftp.denx.de/pub/u-boot PKG_HASH:=ac7c04b8b7004923b00a4e5d6699c5df4d21233bac9fda690d8cfbc209fff2fd HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION) diff --git a/tools/mpfr/Makefile b/tools/mpfr/Makefile index 9e9a0ae879..5863d63221 100644 --- a/tools/mpfr/Makefile +++ b/tools/mpfr/Makefile @@ -10,7 +10,7 @@ PKG_NAME:=mpfr PKG_VERSION:=4.2.2 PKG_CPE_ID:=cpe:/a:mpfr:gnu_mpfr -PKG_SOURCE_URL:=@GNU/mpfr http://www.mpfr.org/mpfr-$(PKG_VERSION) +PKG_SOURCE_URL:=@GNU/mpfr https://www.mpfr.org/mpfr-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_HASH:=826cbb24610bd193f36fde172233fb8c009f3f5c2ad99f644d0dea2e16a20e42 diff --git a/tools/xz/Makefile b/tools/xz/Makefile index 950bff4e1b..f556236c15 100644 --- a/tools/xz/Makefile +++ b/tools/xz/Makefile @@ -12,7 +12,7 @@ PKG_VERSION:=5.8.3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=https://github.com/tukaani-project/xz/releases/download/v$(PKG_VERSION) \ @SF/lzmautils \ - http://tukaani.org/xz + https://tukaani.org/xz PKG_HASH:=33bf69c0d6c698e83a68f77e6c1f465778e418ca0b3d59860d3ab446f4ac99a6 PKG_CPE_ID:=cpe:/a:tukaani:xz