diff --git a/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh b/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh index e9cb4f921d9..1a9ddc679d7 100644 --- a/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh +++ b/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh @@ -12,6 +12,7 @@ unielec,u7623-02) bananapi,bpi-r3|\ bananapi,bpi-r3-mini|\ bananapi,bpi-r4|\ +bananapi,bpi-r4-2g5|\ bananapi,bpi-r4-poe) [ -z "$(fw_printenv -n ethaddr 2>/dev/null)" ] && fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds index d6a2eb523b5..19e815b415a 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds @@ -42,6 +42,7 @@ bananapi,bpi-r3-mini) ucidef_set_led_netdev "wlan5g" "WLAN5G" "blue:wlan-2" "phy1-ap0" ;; bananapi,bpi-r4|\ +bananapi,bpi-r4-2g5|\ bananapi,bpi-r4-poe) ucidef_set_led_netdev "wan" "wan" "mt7530-0:00:green:wan" "wan" "link tx rx" ucidef_set_led_netdev "lan1" "lan1" "mt7530-0:01:green:lan" "lan1" "link tx rx" diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network index 0bff673e788..3fb91d39615 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network @@ -79,6 +79,7 @@ mediatek_setup_interfaces() bananapi,bpi-r4) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 sfp-lan" "wan sfp-wan" ;; + bananapi,bpi-r4-2g5|\ bananapi,bpi-r4-poe) ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan sfp-wan" ;; diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version b/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version index 5ffc4e33743..a1ee81cf0a2 100644 --- a/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version +++ b/target/linux/mediatek/filogic/base-files/etc/board.d/05_compat-version @@ -12,6 +12,7 @@ case "$(board_name)" in ucidef_set_compat_version "1.1" ;; bananapi,bpi-r4|\ + bananapi,bpi-r4-2g5|\ bananapi,bpi-r4-poe) ucidef_set_compat_version "1.1" ;; diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac index 8d7531800cc..f92c2649483 100644 --- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac +++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac @@ -55,6 +55,7 @@ case "$board" in [ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress ;; bananapi,bpi-r4|\ + bananapi,bpi-r4-2g5|\ bananapi,bpi-r4-poe) addr=$(cat /sys/class/net/eth0/address) [ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh index f61c8431f86..92eb5ccb45e 100755 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh @@ -71,6 +71,7 @@ platform_do_upgrade() { bananapi,bpi-r3|\ bananapi,bpi-r3-mini|\ bananapi,bpi-r4|\ + bananapi,bpi-r4-2g5|\ bananapi,bpi-r4-poe|\ cmcc,a10-ubootmod|\ cmcc,rax3000m|\ @@ -203,6 +204,7 @@ platform_check_image() { bananapi,bpi-r3|\ bananapi,bpi-r3-mini|\ bananapi,bpi-r4|\ + bananapi,bpi-r4-2g5|\ bananapi,bpi-r4-poe|\ cmcc,a10-ubootmod|\ cmcc,rax3000m|\ @@ -254,6 +256,7 @@ platform_copy_config() { bananapi,bpi-r3|\ bananapi,bpi-r3-mini|\ bananapi,bpi-r4|\ + bananapi,bpi-r4-2g5|\ bananapi,bpi-r4-poe|\ cmcc,rax3000m) if [ "$CI_METHOD" = "emmc" ]; then diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk index d53b4e0bd08..235b85434ef 100644 --- a/target/linux/mediatek/image/filogic.mk +++ b/target/linux/mediatek/image/filogic.mk @@ -460,7 +460,7 @@ define Device/bananapi_bpi-r4-common DEVICE_VENDOR := Bananapi DEVICE_DTS_DIR := $(DTS_DIR)/ DEVICE_DTS_LOADADDR := 0x45f00000 - DEVICE_DTS_OVERLAY:= mt7988a-bananapi-bpi-r4-emmc mt7988a-bananapi-bpi-r4-rtc mt7988a-bananapi-bpi-r4-sd mt7988a-bananapi-bpi-r4-wifi-mt7996a + DEVICE_DTS_OVERLAY:= mt7988a-bananapi-bpi-r4-emmc mt7988a-bananapi-bpi-r4-rtc mt7988a-bananapi-bpi-r4-sd DEVICE_DTC_FLAGS := --pad 4096 DEVICE_PACKAGES := kmod-hwmon-pwmfan kmod-i2c-mux-pca954x kmod-eeprom-at24 kmod-mt7996-firmware kmod-mt7996-233-firmware \ kmod-rtc-pcf8563 kmod-sfp kmod-usb3 e2fsprogs f2fsck mkf2fs mt7988-wo-firmware @@ -510,10 +510,15 @@ TARGET_DEVICES += bananapi_bpi-r4 define Device/bananapi_bpi-r4-poe DEVICE_MODEL := BPi-R4 2.5GE +ifneq ($(CONFIG_LINUX_6_6),) DEVICE_DTS := mt7988a-bananapi-bpi-r4-poe +else + DEVICE_DTS := mt7988a-bananapi-bpi-r4-2g5 +endif DEVICE_DTS_CONFIG := config-mt7988a-bananapi-bpi-r4-poe $(call Device/bananapi_bpi-r4-common) DEVICE_PACKAGES += mt7988-2p5g-phy-firmware + SUPPORTED_DEVICES += bananapi,bpi-r4-2g5 endef TARGET_DEVICES += bananapi_bpi-r4-poe