* seperate general AR231X- and DIR300-patches

* use extra rc.local for DIR300
This commit is contained in:
bjo 2012-01-10 18:06:45 +00:00
parent f539ea7246
commit c0ddede5cb
4 changed files with 62 additions and 9 deletions

View File

@ -21,14 +21,18 @@ prepare() {
cp ./build_patches/tinc/001_fix_a_few_small_memory_leaks.patch ./build_dir/feeds/packages/net/tinc/patches/001_fix_a_few_small_memory_leaks.patch
case "$1" in
"dir300" | "fonera")
"dir300")
svn export ./build_patches/ar23xx/260_fixdmaoffset.patch ./build_dir/target/linux/atheros/patches-2.6.30/260_fixdmaoffset.patch
svn export ./build_patches/dir300/990_fix_wifi_led.patch ./build_dir/package/mac80211/patches/990_fix_wifi_led.patch
#fix bad switch behaveior:
/bin/rm ./build_dir/target/linux/atheros/base-files/etc/uci-defaults/network
;;
"fonera")
svn export ./build_patches/ar23xx/260_fixdmaoffset.patch ./build_dir/target/linux/atheros/patches-2.6.30/260_fixdmaoffset.patch
;;
esac
#fix bad switch behaveior:
/bin/rm ./build_dir/target/linux/atheros/base-files/etc/uci-defaults/network
}
configure_build() {

View File

@ -3,16 +3,10 @@
# batman seems to be to stupid to regocnice the devices
# todo: uci.get ..
batctl if add eth0.3
batctl if add eth0.4
batctl if add wlan0-1
ifconfig eth0 mtu 1528
ifconfig eth0.3 mtu 1528
ifconfig eth0.4 mtu 1528
echo none > /sys/devices/platform/ar231x-wmac.0/leds/ath5k-phy0\:\:rx/trigger
echo phy0tx > /sys/devices/platform/ar231x-wmac.0/leds/ath5k-phy0\:\:tx/trigger
toLower() {
echo $1 | sed -e "s/A/a/g" -e "s/B/b/g" -e "s/C/c/g" -e "s/D/d/g" -e "s/E/e/g" -e "s/F/f/g"

View File

@ -0,0 +1,55 @@
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
# batman seems to be to stupid to regocnice the devices
# todo: uci.get ..
batctl if add eth0.3
batctl if add eth0.4
batctl if add wlan0-1
ifconfig eth0 mtu 1528
ifconfig eth0.3 mtu 1528
ifconfig eth0.4 mtu 1528
echo none > /sys/devices/platform/ar231x-wmac.0/leds/ath5k-phy0\:\:rx/trigger
echo phy0tx > /sys/devices/platform/ar231x-wmac.0/leds/ath5k-phy0\:\:tx/trigger
toLower() {
echo $1 | sed -e "s/A/a/g" -e "s/B/b/g" -e "s/C/c/g" -e "s/D/d/g" -e "s/E/e/g" -e "s/F/f/g"
}
# todo: all devices or only dir300 ?
BRMAC=`ip link | grep br-mesh -A1 | grep link | awk '{ print $2 }'`
BRMAC=`toLower $BRMAC`
WLMAC=`ip link | grep wlan0 -A1 | grep link | awk '{ print $2 }'`
WLMAC=`toLower $WLMAC`
ETMAC=`ip link | grep eth0 -A1 | grep link | awk '{ print $2 }'`
ETMAC=`toLower $ETMAC`
if [ "$WLMAC" != "" ] && [ "$BRMAC" != "" ] && [ "$BRMAC" = "$ETMAC" ]; then
if [[ "$BRMAC" != "$WLMAC" ]]; then
logger -s "Fixing wrong MAC on br-mesh"
uci set network.mesh.macaddr=$WLMAC
uci commit
ifconfig br-mesh hw ether $WLMAC
ifconfig br-mesh down
ifconfig br-mesh up
#wait before reboot to generate tinc certificates and to be able
#to login over ssh bevore reboot in case of errors
fi
fi
# todo: find time-server in Freifunk-Network
rdate -s time.fu-berlin.de
sh /etc/firewall.user
/etc/init.d/qos disable
/etc/init.d/qos stop
#busybox-httpd for crawldata
httpd -h /tmp/
sh /etc/configurator.sh
exit 0