Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2024-10-14 13:24:09 +08:00
commit a9ce8142cb
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
8 changed files with 59 additions and 42 deletions

View File

@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libbpf
PKG_VERSION:=1.4.5
PKG_VERSION:=1.4.6
PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/libbpf/libbpf
PKG_MIRROR_HASH:=09ad44597d170c12f9f710f7ac4bacfa2b01d110c45810ac0f16c6a3f5d51a0d
PKG_MIRROR_HASH:=0d0d70750c8e45baba19f8cc065771e5d842a90f3ad1637003cae6887dabf11e
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))

View File

@ -2,8 +2,8 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=xdp-tools
PKG_RELEASE:=1
PKG_VERSION:=1.4.2
PKG_HASH:=49c2b96b2be878449a797a74ca515a63e13418cb8ea904df08f8ef9cb2ac5570
PKG_VERSION:=1.4.3
PKG_HASH:=6e727e2c7c079dec86575c5d0e7aac7ecd582aabe04b3b176d7ef50e653b60c0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/xdp-project/xdp-tools/tar.gz/v$(PKG_VERSION)?

View File

@ -1,30 +0,0 @@
From cb1ef3322671a67e2050a3eee18b49cdb4ed4bed Mon Sep 17 00:00:00 2001
From: Andre Heider <a.heider@gmail.com>
Date: Wed, 18 Jan 2023 20:54:41 +0100
Subject: [PATCH] libxdp: fix compilation on multiarch systems
Multiarch systems require an additional include path, which is covered
by ARCH_INCLUDES here. Just as lib/util, add it to BPF_CFLAGS.
Fixes compilation on debian:
In file included from xdp-dispatcher.c:3:
In file included from ../../headers/linux/bpf.h:11:
/usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found
Signed-off-by: Andre Heider <a.heider@gmail.com>
---
lib/libxdp/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/lib/libxdp/Makefile
+++ b/lib/libxdp/Makefile
@@ -28,7 +28,7 @@ PC_FILE := $(OBJDIR)/libxdp.pc
TEMPLATED_SOURCES := xdp-dispatcher.c
CFLAGS += -I$(HEADER_DIR)
-BPF_CFLAGS += -I$(HEADER_DIR)
+BPF_CFLAGS += -I$(HEADER_DIR) $(ARCH_INCLUDES)
ifndef BUILD_STATIC_ONLY

View File

@ -8,7 +8,7 @@ ARCH:=powerpc64
BOARD:=qoriq
BOARDNAME:=NXP QorIQ (PowerPC)
CPU_TYPE:=e5500
FEATURES:=boot-part ext4 fpu legacy-sdcard powerpc64 ramdisk rootfs-part rtc source-only
FEATURES:=boot-part ext4 fpu legacy-sdcard powerpc64 ramdisk rootfs-part rtc
SUBTARGETS:=generic
KERNEL_PATCHVER:=6.6

View File

@ -19,15 +19,9 @@ watchguard,firebox-m300)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
wg_set_opt_interface "eth2" "2"
sweth_mac_offset=0x186d
for sweth in $(find /sys/class/net/ -name 'sweth*' -print); do
device="$(basename "$sweth")"
mac="$(mtd_get_mac_text wg_cfg0 "$sweth_mac_offset")"
switchports="$switchports $device"
ucidef_set_network_device_mac "$device" "$mac"
wg_set_opt_interface "$device" "${device#sweth}"
sweth_mac_offset=$(printf "0x%X\n" $(( $sweth_mac_offset + 0x14)))
done
;;

View File

@ -280,6 +280,8 @@ CONFIG_NO_HZ_COMMON=y
CONFIG_NO_HZ_IDLE=y
CONFIG_NR_CPUS=24
CONFIG_NR_IRQS=512
CONFIG_NVMEM=y
CONFIG_NVMEM_LAYOUTS=y
CONFIG_OF=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_EARLY_FLATTREE=y

View File

@ -115,6 +115,42 @@
reg = <0x10000 0x20000>;
label = "wg_cfg0";
read-only;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
macaddr_cfg_186c: macaddr@186c {
compatible = "mac-base";
reg = <0x186c 0x11>;
#nvmem-cell-cells = <1>;
};
macaddr_cfg_1880: macaddr@1880 {
compatible = "mac-base";
reg = <0x1880 0x11>;
#nvmem-cell-cells = <1>;
};
macaddr_cfg_1894: macaddr@1894 {
compatible = "mac-base";
reg = <0x1894 0x11>;
#nvmem-cell-cells = <1>;
};
macaddr_cfg_18a8: macaddr@18a8 {
compatible = "mac-base";
reg = <0x18a8 0x11>;
#nvmem-cell-cells = <1>;
};
macaddr_cfg_18bc: macaddr@18bc {
compatible = "mac-base";
reg = <0x18bc 0x11>;
#nvmem-cell-cells = <1>;
};
};
};
partition@30000 {
@ -237,30 +273,45 @@
reg = <0>;
label = "sweth3";
phy-handle = <&switch0phy0>;
nvmem-cells = <&macaddr_cfg_186c 0>;
nvmem-cell-names = "mac-address";
};
port@1 {
reg = <1>;
label = "sweth4";
phy-handle = <&switch0phy1>;
nvmem-cells = <&macaddr_cfg_1880 0>;
nvmem-cell-names = "mac-address";
};
port@2 {
reg = <2>;
label = "sweth5";
phy-handle = <&switch0phy2>;
nvmem-cells = <&macaddr_cfg_1894 0>;
nvmem-cell-names = "mac-address";
};
port@3 {
reg = <3>;
label = "sweth6";
phy-handle = <&switch0phy3>;
nvmem-cells = <&macaddr_cfg_18a8 0>;
nvmem-cell-names = "mac-address";
};
port@4 {
reg = <4>;
label = "sweth7";
phy-handle = <&switch0phy4>;
nvmem-cells = <&macaddr_cfg_18bc 0>;
nvmem-cell-names = "mac-address";
};
// OEM bootlog suggests multiple ports are attached to switch

View File

@ -374,7 +374,7 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv)
/* Check for the integrated SerDes of the RTL8380M first */
if (of_property_read_bool(phy_node, "phy-is-integrated")
&& priv->id == 0x8380 && pn >= 24) {
pr_debug("----> FÓUND A SERDES\n");
pr_debug("----> FOUND A SERDES\n");
priv->ports[pn].phy = PHY_RTL838X_SDS;
continue;
}