mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Tagged PHY or DSA mode in /etc and added kernel bridge vlan filter support
This commit is contained in:
parent
6a6941c379
commit
ef75c95d50
3 changed files with 20 additions and 6 deletions
8
build.sh
8
build.sh
|
@ -241,12 +241,15 @@ if [ "$OMR_TARGET" = "bpi-r1" ]; then
|
|||
|
||||
# Add support for distributed switch architecture
|
||||
echo -n "Adding B53 DSA support to kernel 5.4..."
|
||||
for i in B53 B53_MDIO_DRIVER MDIO_BUS_MUX_MULTIPLEXER NET_DSA NET_DSA_TAG_8021Q NET_DSA_TAG_BRCM NET_DSA_TAG_BRCM_PREPEND; do
|
||||
for i in B53 B53_MDIO_DRIVER BRIDGE_VLAN_FILTERING MDIO_BUS_MUX_MULTIPLEXER NET_DSA NET_DSA_TAG_8021Q NET_DSA_TAG_BRCM NET_DSA_TAG_BRCM_PREPEND; do
|
||||
cat "$OMR_TARGET/source/target/linux/sunxi/config-5.4" | grep "CONFIG_${i}=y" || \
|
||||
cat "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-5.4" | grep "CONFIG_${i}=y" || \
|
||||
echo "CONFIG_${i}=y" >> "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-5.4"
|
||||
done
|
||||
echo "done"
|
||||
|
||||
# Mark as DSA
|
||||
touch "$OMR_TARGET/source/target/linux/sunxi/base-files/etc/.lamobo-r1.dsa"
|
||||
else
|
||||
# Remove ip-bridge
|
||||
echo -n "Removing ip-bridge support from openwrt config..."
|
||||
|
@ -262,6 +265,9 @@ if [ "$OMR_TARGET" = "bpi-r1" ]; then
|
|||
sed -i "s/CONFIG_${i}/# CONFIG_${i} is not set/" "$OMR_TARGET/source/target/linux/sunxi/cortexa7/config-5.4"
|
||||
done
|
||||
echo "done"
|
||||
|
||||
# Mark as PHY
|
||||
touch "$OMR_TARGET/source/target/linux/sunxi/base-files/etc/.lamobo-r1.phy"
|
||||
fi
|
||||
|
||||
# Add led support
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
uci set network.@switch_vlan[0].vlan=10
|
||||
uci set network.@switch_vlan[1].vlan=20
|
||||
if [ -f "/etc/.lamobo-r1.dsa" ]; then
|
||||
uci delete network.@switch_vlan[1]
|
||||
uci delete network.@switch_vlan[0]
|
||||
uci delete network.@switch[0]
|
||||
else
|
||||
uci set network.@switch_vlan[0].vlan=10
|
||||
uci set network.@switch_vlan[1].vlan=20
|
||||
fi
|
||||
uci commit
|
||||
exit 0
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
uci set network.@switch_vlan[0].ports="4 0 1 2 8t"
|
||||
uci set network.@switch_vlan[1].ports="3 8"
|
||||
uci commit
|
||||
if [ -f "/etc/.lamobo-r1.phy" ]; then
|
||||
uci set network.@switch_vlan[0].ports="4 0 1 2 8t"
|
||||
uci set network.@switch_vlan[1].ports="3 8"
|
||||
uci commit
|
||||
fi
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue