[PATCH 5/5] mediatek: fix bpi-r64 default switch config
Oskari Lemmela
oskari at lemmela.net
Wed Feb 24 14:10:39 EST 2021
bananapi r64 uses mediatek,mt753x gsw switch device.
configure network defaults accordingly.
Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
---
target/linux/mediatek/image/mt7622.mk | 6 ++++--
.../linux/mediatek/mt7622/base-files/etc/board.d/02_network | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/target/linux/mediatek/image/mt7622.mk b/target/linux/mediatek/image/mt7622.mk
index 1d1c2f8a80..50d319ba5c 100644
--- a/target/linux/mediatek/image/mt7622.mk
+++ b/target/linux/mediatek/image/mt7622.mk
@@ -6,7 +6,8 @@ define Device/bpi_bananapi-r64
DEVICE_MODEL := Banana Pi R64
DEVICE_DTS := mt7622-bananapi-bpi-r64
SUPPORTED_DEVICES := bananapi,bpi-r64
- DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk
+ DEVICE_PACKAGES := kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk \
+ swconfig
endef
TARGET_DEVICES += bpi_bananapi-r64
@@ -17,7 +18,8 @@ define Device/bpi_bananapi-r64-rootdisk
DEVICE_DTS_DIR := ../dts
SUPPORTED_DEVICES := bananapi,bpi-r64
DEVICE_PACKAGES := kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 \
- mkf2fs e2fsprogs kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk
+ mkf2fs e2fsprogs kmod-usb-ohci kmod-usb2 kmod-usb3 kmod-ata-ahci-mtk \
+ swconfig
IMAGES := sysupgrade-emmc.bin.gz
IMAGE/sysupgrade-emmc.bin.gz := sysupgrade-emmc | gzip | append-metadata
endef
diff --git a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
index 3a409c8ec9..88a22dfb74 100755
--- a/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/mt7622/base-files/etc/board.d/02_network
@@ -11,7 +11,8 @@ mediatek_setup_interfaces()
case $board in
bananapi,bpi-r64-rootdisk|\
bananapi,bpi-r64)
- ucidef_set_interfaces_lan_wan "lan0 lan1 lan2 lan3" wan
+ ucidef_add_switch "switch0" \
+ "1:lan" "2:lan" "3:lan" "4:lan" "6u at eth0" "0:wan" "5u at eth1"
;;
mediatek,mt7622-rfb1)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
--
2.25.1
More information about the openwrt-devel
mailing list