forked from freifunk-franken/firmware
* seperate general AR231X- and DIR300-patches
* use extra rc.local for DIR300
This commit is contained in:
parent
f539ea7246
commit
c0ddede5cb
|
@ -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() {
|
||||
|
|
|
@ -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"
|
||||
|
|
55
root_file_system/dir300/etc/rc.local
Executable file
55
root_file_system/dir300/etc/rc.local
Executable 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
|
Loading…
Reference in New Issue
Block a user