[PATCH 5/5] mediatek: fix bpi-r64 default switch config
Oskari Lemmelä
oskari at lemmela.net
Thu Feb 25 02:03:30 EST 2021
On 24.2.2021 22.12, Daniel Golle wrote:
> On Wed, Feb 24, 2021 at 09:10:39PM +0200, Oskari Lemmela wrote:
>> 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
> This will be obsolete with 5.10 and using DSA where the previous
> defaults are just fine.
> Let's not introduce swconfig now just to drop it again in a few days
> when Linux 5.10 support will be in openwrt.git as well.
>
> The other 4 patches look good, I'll merge them after a round of
> testing.
Thanks for merging patches. Should these other four patches also merged
to 21.02 branch?
I suppose DSA is recommended way also for 21.02 branch?
I'll send one more patch to drop gsw from mt7622-bananapi-bpi-r64.dts.
Then network defaults are matching to dts.
Oskari
>> 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
>>
>>
>> _______________________________________________
>> openwrt-devel mailing list
>> openwrt-devel at lists.openwrt.org
>> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list