Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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 <jo@mein.io>
|
||||
|
||||
@@ -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 <jo@mein.io>
|
||||
PKG_LICENSE:=GPL-2.0+
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
From 9ba0b4add39e578ccdb91ca23b62a7de6ff45995 Mon Sep 17 00:00:00 2001
|
||||
From: Mykyta Yatsenko <yatsenko@meta.com>
|
||||
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 <yatsenko@meta.com>
|
||||
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
|
||||
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
|
||||
@@ -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
|
||||
|
||||
|
||||
+6
-3
@@ -1,5 +1,8 @@
|
||||
From f01fbee19b56b41f1e36f15a0d9334d2dc4da3ca Mon Sep 17 00:00:00 2001
|
||||
From: Nick Hainke <vincent@systemli.org>
|
||||
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 <linux/if_ether.h>
|
||||
from params.h triggers a chain through net/ethernet.h ->
|
||||
@@ -12,8 +15,8 @@ to avoid the conflict.
|
||||
|
||||
Signed-off-by: Nick Hainke <vincent@systemli.org>
|
||||
---
|
||||
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
|
||||
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
From ab5415551c7c7e2e34327446c65faf924e362ad7 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Hainke <vincent@systemli.org>
|
||||
Date: Sun, 19 Apr 2026 09:46:11 +0200
|
||||
Subject: [PATCH 2/3] xdpsock: fix struct ethhdr redefinition on musl
|
||||
|
||||
On musl, including <net/ethernet.h> or <netinet/ether.h> after
|
||||
<linux/if_ether.h> 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 <linux/if_ether.h> include) and dropping the conflicting
|
||||
<net/ethernet.h> and <netinet/ether.h> includes.
|
||||
|
||||
Fix xdpsock.h by replacing <netinet/ether.h> with <linux/if_ether.h>,
|
||||
which provides ETH_ALEN and struct ethhdr without the redefinition.
|
||||
|
||||
Signed-off-by: Nick Hainke <vincent@systemli.org>
|
||||
---
|
||||
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 <linux/udp.h>
|
||||
#include <locale.h>
|
||||
#include <arpa/inet.h>
|
||||
-#include <net/ethernet.h>
|
||||
-#include <netinet/ether.h>
|
||||
#include <net/if.h>
|
||||
#include <poll.h>
|
||||
#include <pthread.h>
|
||||
@@ -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 <linux/if_xdp.h>
|
||||
#include <stdbool.h>
|
||||
-#include <netinet/ether.h>
|
||||
+#include <linux/if_ether.h>
|
||||
#include <time.h>
|
||||
#include <sched.h>
|
||||
#include <xdp/libxdp.h>
|
||||
+339
@@ -0,0 +1,339 @@
|
||||
From bdb036b8015f5f55092cda9b140d79673007f4ca Mon Sep 17 00:00:00 2001
|
||||
From: Nick Hainke <vincent@systemli.org>
|
||||
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 <vincent@systemli.org>
|
||||
---
|
||||
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 <stdbool.h>
|
||||
#include <linux/types.h>
|
||||
#include <asm/errno.h>
|
||||
|
||||
--- a/headers/linux/hashtable.h
|
||||
+++ b/headers/linux/hashtable.h
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
-#include <stdbool.h>
|
||||
#include <linux/hlist.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/kernel.h>
|
||||
--- a/headers/linux/netfilter.h
|
||||
+++ b/headers/linux/netfilter.h
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef _LINUX_NETFILTER_H
|
||||
#define _LINUX_NETFILTER_H
|
||||
|
||||
-#include <stdbool.h>
|
||||
#include <linux/types.h>
|
||||
#include <bpf/bpf_helpers.h>
|
||||
#include <xdp/parsing_helpers.h>
|
||||
--- 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 <bpf/vmlinux.h>
|
||||
-#include <stdbool.h>
|
||||
#include <bpf/bpf_tracing.h>
|
||||
#include <bpf/bpf_core_read.h>
|
||||
#include <bpf/bpf_helpers.h>
|
||||
--- 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 <linux/err.h>
|
||||
#include <net/if.h>
|
||||
#include <pthread.h>
|
||||
-#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/resource.h>
|
||||
--- a/lib/libxdp/tests/test_link_detach.c
|
||||
+++ b/lib/libxdp/tests/test_link_detach.c
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <linux/err.h>
|
||||
#include <net/if.h>
|
||||
#include <pthread.h>
|
||||
-#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/resource.h>
|
||||
--- a/lib/libxdp/tests/test_xdp_devbound.c
|
||||
+++ b/lib/libxdp/tests/test_xdp_devbound.c
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <linux/err.h>
|
||||
#include <net/if.h>
|
||||
#include <pthread.h>
|
||||
-#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/resource.h>
|
||||
--- a/lib/libxdp/tests/test_xdp_frags.c
|
||||
+++ b/lib/libxdp/tests/test_xdp_frags.c
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <linux/err.h>
|
||||
#include <net/if.h>
|
||||
#include <pthread.h>
|
||||
-#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/resource.h>
|
||||
--- a/lib/libxdp/tests/test_xsk_refcnt.c
|
||||
+++ b/lib/libxdp/tests/test_xsk_refcnt.c
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <linux/err.h>
|
||||
#include <net/if.h>
|
||||
#include <pthread.h>
|
||||
-#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/resource.h>
|
||||
--- a/lib/testing/test-tool.c
|
||||
+++ b/lib/testing/test-tool.c
|
||||
@@ -2,7 +2,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
-#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
--- a/lib/util/params.c
|
||||
+++ b/lib/util/params.c
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
-#include <stdbool.h>
|
||||
#include <getopt.h>
|
||||
#include <errno.h>
|
||||
|
||||
--- a/lib/util/params.h
|
||||
+++ b/lib/util/params.h
|
||||
@@ -4,7 +4,6 @@
|
||||
#define __PARAMS_H
|
||||
|
||||
#include <getopt.h>
|
||||
-#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <linux/in.h>
|
||||
#include <linux/in6.h>
|
||||
--- a/lib/util/xdp_sample.c
|
||||
+++ b/lib/util/xdp_sample.c
|
||||
@@ -15,7 +15,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <bpf/bpf.h>
|
||||
-#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/mman.h>
|
||||
#include <arpa/inet.h>
|
||||
--- a/lib/util/xdpsock.c
|
||||
+++ b/lib/util/xdpsock.c
|
||||
@@ -19,7 +19,6 @@
|
||||
#include <poll.h>
|
||||
#include <pthread.h>
|
||||
#include <signal.h>
|
||||
-#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
--- a/lib/util/xdpsock.h
|
||||
+++ b/lib/util/xdpsock.h
|
||||
@@ -7,7 +7,6 @@
|
||||
#define XDPSOCK_H_
|
||||
|
||||
#include <linux/if_xdp.h>
|
||||
-#include <stdbool.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <time.h>
|
||||
#include <sched.h>
|
||||
--- a/lib/util/xpcapng.c
|
||||
+++ b/lib/util/xpcapng.c
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
-#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
--- a/xdp-bench/xdp_basic.c
|
||||
+++ b/xdp-bench/xdp_basic.c
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <bpf/bpf.h>
|
||||
-#include <stdbool.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <bpf/libbpf.h>
|
||||
#include <sys/resource.h>
|
||||
--- a/xdp-bench/xdp_redirect_basic.c
|
||||
+++ b/xdp-bench/xdp_redirect_basic.c
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <bpf/bpf.h>
|
||||
-#include <stdbool.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <bpf/libbpf.h>
|
||||
#include <sys/resource.h>
|
||||
--- a/xdp-bench/xdp_redirect_cpumap.c
|
||||
+++ b/xdp-bench/xdp_redirect_cpumap.c
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <bpf/bpf.h>
|
||||
-#include <stdbool.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <bpf/libbpf.h>
|
||||
#include <sys/sysinfo.h>
|
||||
--- a/xdp-bench/xdp_redirect_devmap.c
|
||||
+++ b/xdp-bench/xdp_redirect_devmap.c
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <bpf/bpf.h>
|
||||
-#include <stdbool.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <bpf/libbpf.h>
|
||||
#include <xdp/libxdp.h>
|
||||
--- a/xdp-bench/xdp_socket.c
|
||||
+++ b/xdp-bench/xdp_socket.c
|
||||
@@ -2,7 +2,6 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <bpf/bpf.h>
|
||||
-#include <stdbool.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <pthread.h>
|
||||
#include <bpf/libbpf.h>
|
||||
--- a/xdp-dump/xdpdump.c
|
||||
+++ b/xdp-dump/xdpdump.c
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <signal.h>
|
||||
-#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
--- a/xdp-dump/xdpdump_bpf.c
|
||||
+++ b/xdp-dump/xdpdump_bpf.c
|
||||
@@ -3,7 +3,6 @@
|
||||
/*****************************************************************************
|
||||
* Include files
|
||||
*****************************************************************************/
|
||||
-#include <stdbool.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <bpf/bpf_helpers.h>
|
||||
#include <bpf/bpf_trace_helpers.h>
|
||||
--- a/xdp-dump/xdpdump_xdp.c
|
||||
+++ b/xdp-dump/xdpdump_xdp.c
|
||||
@@ -3,7 +3,6 @@
|
||||
/*****************************************************************************
|
||||
* Include files
|
||||
*****************************************************************************/
|
||||
-#include <stdbool.h>
|
||||
#include <linux/bpf.h>
|
||||
#include <bpf/bpf_helpers.h>
|
||||
#include <bpf/bpf_trace_helpers.h>
|
||||
--- a/xdp-filter/xdp-filter.c
|
||||
+++ b/xdp-filter/xdp-filter.c
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
-#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
--- a/xdp-loader/xdp-loader.c
|
||||
+++ b/xdp-loader/xdp-loader.c
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
-#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
--- a/xdp-monitor/xdp-monitor.c
|
||||
+++ b/xdp-monitor/xdp-monitor.c
|
||||
@@ -23,7 +23,6 @@ static const char *__doc_err_only__=
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <bpf/bpf.h>
|
||||
-#include <stdbool.h>
|
||||
#include <bpf/libbpf.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
--- a/xdp-trafficgen/xdp-trafficgen.c
|
||||
+++ b/xdp-trafficgen/xdp-trafficgen.c
|
||||
@@ -6,7 +6,6 @@
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
-#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <pthread.h>
|
||||
+2
-2
@@ -37,7 +37,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
|
||||
.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 <bc-bocun.chen@mediatek.com>
|
||||
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);
|
||||
|
||||
|
||||
+20
-41
@@ -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 <daniel@makrotopia.org>
|
||||
+ 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 <daniel@makrotopia.org>
|
||||
/* 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 <daniel@makrotopia.org>
|
||||
}
|
||||
|
||||
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 <daniel@makrotopia.org>
|
||||
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 <daniel@makrotopia.org>
|
||||
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 <daniel@makrotopia.org>
|
||||
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 <daniel@makrotopia.org>
|
||||
}
|
||||
|
||||
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 <daniel@makrotopia.org>
|
||||
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 <daniel@makrotopia.org>
|
||||
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 <daniel@makrotopia.org>
|
||||
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 <daniel@makrotopia.org>
|
||||
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);
|
||||
|
||||
+8
-8
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- 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 <nbd@nbd.name>
|
||||
.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 <nbd@nbd.name>
|
||||
.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 <nbd@nbd.name>
|
||||
.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 <nbd@nbd.name>
|
||||
.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 <nbd@nbd.name>
|
||||
.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 <nbd@nbd.name>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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 <nbd@nbd.name>
|
||||
},
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
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 <nbd@nbd.name>
|
||||
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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -55,17 +55,17 @@ Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
|
||||
+#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)
|
||||
|
||||
@@ -53,20 +53,20 @@ Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
|
||||
+#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)
|
||||
|
||||
+3
-3
@@ -106,7 +106,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
|
||||
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 <bc-bocun.chen@mediatek.com>
|
||||
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 <bc-bocun.chen@mediatek.com>
|
||||
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 },
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen@mediatek.com>
|
||||
|
||||
--- 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);
|
||||
|
||||
|
||||
@@ -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"
|
||||
;;
|
||||
|
||||
@@ -0,0 +1,248 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/dts-v1/;
|
||||
|
||||
#include "rtl9313_zyxel_xs1930.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/mux/mux.h>
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,xs1930-10", "realtek,rtl9313-soc";
|
||||
model = "Zyxel XS1930-10";
|
||||
|
||||
leds {
|
||||
led_pwr_green: led-2 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
led_pwr_red: led-3 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_cloud_green: led-4 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_cloud_red: led-5 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_locator: led-6 {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
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 = <MUX_IDLE_AS_IS>;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
@@ -0,0 +1,344 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/dts-v1/;
|
||||
|
||||
#include "rtl9313_zyxel_xs1930.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/mux/mux.h>
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,xs1930-12f", "realtek,rtl9313-soc";
|
||||
model = "Zyxel XS1930-12F";
|
||||
|
||||
leds {
|
||||
led_pwr_green: led-2 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio2 10 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
led_pwr_red: led-3 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio2 11 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_cloud_green: led-4 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_cloud_red: led-5 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_locator: led-6 {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,302 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/dts-v1/;
|
||||
|
||||
#include "rtl9313_zyxel_xs1930.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/mux/mux.h>
|
||||
|
||||
/ {
|
||||
compatible = "zyxel,xs1930-12hp", "realtek,rtl9313-soc";
|
||||
model = "Zyxel XS1930-12HP";
|
||||
|
||||
leds {
|
||||
led_pwr_green: led-2 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "on";
|
||||
};
|
||||
led_pwr_red: led-3 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
function = LED_FUNCTION_POWER;
|
||||
gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_cloud_green: led-4 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_cloud_red: led-5 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
led_locator: led-6 {
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
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 = <RTL93XX_LED_SET_NONE
|
||||
RTL93XX_LED_SET_NONE>;
|
||||
|
||||
/* 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 = <MUX_IDLE_AS_IS>;
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
@@ -0,0 +1,139 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/dts-v1/;
|
||||
|
||||
#include "rtl931x.dtsi"
|
||||
|
||||
#include <dt-bindings/input/input.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
#include <dt-bindings/mux/mux.h>
|
||||
|
||||
/ {
|
||||
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 = <KEY_RESTART>;
|
||||
};
|
||||
};
|
||||
|
||||
leds: leds {
|
||||
compatible = "gpio-leds";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinmux_disable_sys_led>;
|
||||
|
||||
led_sys_green: led-0 {
|
||||
color = <LED_COLOR_ID_GREEN>;
|
||||
function = LED_FUNCTION_INDICATOR;
|
||||
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
led_sys_red: led-1 {
|
||||
color = <LED_COLOR_ID_RED>;
|
||||
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";
|
||||
};
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
From ab5c8f5492cce16ff2104393e2f1fa64a3ff6e88 Mon Sep 17 00:00:00 2001
|
||||
From: David Abdurachmanov <david.abdurachmanov@sifive.com>
|
||||
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 <david.abdurachmanov@sifive.com>
|
||||
---
|
||||
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>;
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+43
-16
@@ -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
|
||||
|
||||
-2228
File diff suppressed because it is too large
Load Diff
-218
@@ -1,218 +0,0 @@
|
||||
From 3c6c32951e292a51ede70b8087bb0308d7dbc4fc Mon Sep 17 00:00:00 2001
|
||||
From: Alan Modra <amodra@gmail.com>
|
||||
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
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
From 8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
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]))
|
||||
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
From 8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4 Mon Sep 17 00:00:00 2001
|
||||
From: Sam James <sam@gentoo.org>
|
||||
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]))
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
{
|
||||
@@ -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
|
||||
+2
-2
@@ -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.
|
||||
+2
-2
@@ -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;
|
||||
+13
-16
@@ -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"
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user