forked from freifunk-franken/firmware
Drop support for DIR300 / Fonera
Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
fd270fb92f
commit
cef74cb83b
|
@ -1,77 +0,0 @@
|
|||
|
||||
machine=dir300
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
#cat ./bsp/$machine/000-squashfs-image-params.patch | patch -p0 -d $target
|
||||
|
||||
#cat build_patches/dont_overwrite_wan_config.patch | patch -p0 -d $target
|
||||
#/bin/rm $target/target/linux/atheros/base-files/etc/uci-defaults/network
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
# Remove fastd and configurator start on WAN event
|
||||
/bin/rm $target/files/etc/hotplug.d/iface/50-fastdstart
|
||||
/bin/rm $target/files/etc/hotplug.d/iface/51-configurator
|
||||
|
||||
# Remove fastd
|
||||
/bin/rm $target/files/etc/fastdstart.sh.tpl
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/atheros/openwrt-atheros-root.squashfs ./bin/openwrt-$machine-root.squashfs
|
||||
cp $target/bin/atheros/openwrt-atheros-vmlinux.lzma ./bin/openwrt-$machine-vmlinux.lzma
|
||||
cp $target/bin/atheros/openwrt-atheros-combined.squashfs.img ./bin/openwrt-$machine-combined.squashfs.img
|
||||
}
|
||||
|
||||
board_flash() {
|
||||
if [ ! "`whoami`" = "root" ]
|
||||
then
|
||||
echo "You need to be root to flash!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Do not plugin your router now, you will be asked to do this later!"
|
||||
echo "Stopping Network manager and starting normal network and tftp server..."
|
||||
if [ -f /etc/rc.d/networkmanager ];then
|
||||
/etc/rc.d/networkmanager stop
|
||||
/etc/rc.d/tftpd start
|
||||
elif [ -f /etc/init.d/networkmanager ];then
|
||||
/etc/init.d/networkmanager stop
|
||||
/etc/init.d/tftpd start
|
||||
elif [ -f /usr/sbin/invoke-rc.d ];then
|
||||
invoke-rc.d tftpd-hpa start || invoke-rc.d tftpd-hpa start || invoke-rc.d tftpd-hpa start || echo "FAILED TO START TFTD"
|
||||
invoke-rc.d network-manager stop
|
||||
elif [ -f /usr/sbin/systemctl ];then
|
||||
systemctl start tftpd.socket tftpd.service
|
||||
fi
|
||||
|
||||
ifconfig $1 up
|
||||
|
||||
echo "Clearing Firewall!"
|
||||
iptables -F
|
||||
iptables -P INPUT ACCEPT
|
||||
iptables -P OUTPUT ACCEPT
|
||||
|
||||
echo "Flashing now! Please plugin your router into the powerline now"
|
||||
./flash_tools/dir300-flash/dir300-flash.sh $1 ./bin/openwrt-$machine-vmlinux.lzma ./bin/openwrt-$machine-root.squashfs
|
||||
|
||||
echo "Starting Networkmanager again"
|
||||
sleep 5;
|
||||
if [ -f /etc/rc.d/networkmanager ];then
|
||||
/etc/rc.d/networkmanager start
|
||||
elif [ -f /etc/init.d/networkmanager ];then
|
||||
/etc/init.d/networkmanager start
|
||||
elif [ -f /usr/sbin/invoke-rc.d ];then
|
||||
invoke-rc.d tftpd-hpa stop
|
||||
invoke-rc.d network-manager start
|
||||
elif [ -f /usr/sbin/systemctl ];then
|
||||
systemctl stop tftpd.socket tftpd.service
|
||||
fi
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
|
||||
machine=fonera
|
||||
target=$builddir/$machine
|
||||
|
||||
board_prepare() {
|
||||
#cat ./bsp/$machine/000-squashfs-image-params.patch | patch -p0 -d $target
|
||||
|
||||
#cat build_patches/dont_overwrite_wan_config.patch | patch -p0 -d $target
|
||||
#/bin/rm $target/target/linux/atheros/base-files/etc/uci-defaults/network
|
||||
echo "nothing todo" > /dev/null
|
||||
}
|
||||
|
||||
board_prebuild() {
|
||||
# Remove fastd and configurator start on WAN event
|
||||
/bin/rm $target/files/etc/hotplug.d/iface/50-fastdstart
|
||||
/bin/rm $target/files/etc/hotplug.d/iface/51-configurator
|
||||
|
||||
# Remove fastd
|
||||
/bin/rm $target/files/etc/fastdstart.sh.tpl
|
||||
}
|
||||
|
||||
board_postbuild() {
|
||||
cp $target/bin/atheros/openwrt-atheros-root.squashfs ./bin/openwrt-$machine-root.squashfs
|
||||
cp $target/bin/atheros/openwrt-atheros-vmlinux.lzma ./bin/openwrt-$machine-vmlinux.lzma
|
||||
cp $target/bin/atheros/openwrt-atheros-combined.squashfs.img ./bin/openwrt-$machine-combined.squashfs.img
|
||||
}
|
||||
|
||||
board_flash() {
|
||||
#Get flash tools
|
||||
# i thought they are already there..
|
||||
#svn export http://svn.freifunk-ol.de/firmware/Trunk/flash_tools
|
||||
|
||||
if [ "$1" = "" ]
|
||||
then
|
||||
echo "$0 flash <netdev>";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ ! "`whoami`" = "root" ]
|
||||
then
|
||||
echo "You need to be root to flash!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# echo "Do not plugin your router now, you will be asked to do this later!"
|
||||
# echo "Stopping Network manager and starting normal network and tftp server..."
|
||||
# if [ -f /etc/rc.d/networkmanager ];then
|
||||
# /etc/rc.d/networkmanager stop
|
||||
# /etc/rc.d/tftpd start
|
||||
# elif [ -f /etc/init.d/networkmanager ];then
|
||||
# /etc/init.d/networkmanager stop
|
||||
# /etc/init.d/tftpd start
|
||||
# elif [ -f /usr/sbin/invoke-rc.d ];then
|
||||
# invoke-rc.d tftpd-hpa start || invoke-rc.d tftpd-hpa start || invoke-rc.d tftpd-hpa start || echo "FAILED TO START TFTD"
|
||||
# invoke-rc.d network-manager stop
|
||||
# fi
|
||||
#
|
||||
# ifconfig $1 up
|
||||
#
|
||||
# echo "Clearing Firewall!"
|
||||
# iptables -F
|
||||
# iptables -P INPUT ACCEPT
|
||||
# iptables -P OUTPUT ACCEPT
|
||||
|
||||
echo "Flashing now! Please plugin your router into the powerline now"
|
||||
|
||||
echo "In some cases you have to set a symlink to libpcap to make flashing work (Tim told me that it is evil if I do that for you):"
|
||||
echo "ln -s /usr/lib/libpcap.so.1.1.1 /usr/lib/libpcap.so.0.8"
|
||||
echo "better use \"aptitude install libpcap0.8:i386\""
|
||||
|
||||
#cd ./flash_tools/fonera-flash/
|
||||
#./build_libpcap.sh
|
||||
#cd ../../
|
||||
|
||||
#LD_LIBRARY_PATH=`pwd`flash_tools/fonera-flash/libpcap-0.8.1/
|
||||
#export LD_LIBRARY_PATH
|
||||
|
||||
#arch=`uname -m`
|
||||
arch=i686
|
||||
./flash_tools/fonera-flash/ap51-flash-$arch $1 ./bin/openwrt-$machine-root.squashfs ./bin/openwrt-$machine-vmlinux.lzma freifunc
|
||||
|
||||
#echo "Starting Networkmanager again"
|
||||
#sleep 5;
|
||||
#if [ -f /etc/rc.d/networkmanager ];then
|
||||
# /etc/rc.d/networkmanager start
|
||||
# elif [ -f /etc/init.d/networkmanager ];then
|
||||
# /etc/init.d/networkmanager start
|
||||
# elif [ -f /usr/sbin/invoke-rc.d ];then
|
||||
# invoke-rc.d tftpd-hpa stop
|
||||
# invoke-rc.d network-manager start
|
||||
# fi
|
||||
}
|
||||
|
||||
board_clean() {
|
||||
/bin/rm -rf $target bin/*$machine*
|
||||
}
|
||||
|
1490
bsp/dir300/.config
1490
bsp/dir300/.config
File diff suppressed because it is too large
Load Diff
|
@ -1,17 +0,0 @@
|
|||
Index: include/image.mk
|
||||
===================================================================
|
||||
--- include/image.mk (Revision 35298)
|
||||
+++ include/image.mk (Arbeitskopie)
|
||||
@@ -42,10 +42,10 @@
|
||||
JFFS2OPTS += -x lzma
|
||||
endif
|
||||
|
||||
-SQUASHFS_BLOCKSIZE := 256k
|
||||
+SQUASHFS_BLOCKSIZE := 64k
|
||||
SQUASHFSOPT := -b $(SQUASHFS_BLOCKSIZE)
|
||||
SQUASHFSCOMP := gzip
|
||||
-LZMA_XZ_OPTIONS := -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2
|
||||
+LZMA_XZ_OPTIONS := -Xpreset 1
|
||||
ifeq ($(CONFIG_SQUASHFS_LZMA),y)
|
||||
SQUASHFSCOMP := lzma $(LZMA_XZ_OPTIONS)
|
||||
endif
|
|
@ -1,142 +0,0 @@
|
|||
# CONFIG_AIO is not set
|
||||
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
|
||||
CONFIG_ARCH_DISCARD_MEMBLOCK=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
# CONFIG_ARPD is not set
|
||||
CONFIG_ATHEROS_AR2315=y
|
||||
# CONFIG_ATHEROS_AR2315_PCI is not set
|
||||
CONFIG_ATHEROS_AR231X=y
|
||||
# CONFIG_ATHEROS_AR5312 is not set
|
||||
CONFIG_ATHEROS_WDT=y
|
||||
# CONFIG_BASE_FULL is not set
|
||||
CONFIG_BASE_SMALL=1
|
||||
CONFIG_BCMA_POSSIBLE=y
|
||||
# CONFIG_BUG is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CEVT_R4K_LIB=y
|
||||
CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
CONFIG_COMPACTION=y
|
||||
CONFIG_COMPAT_BRK=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_CSRC_R4K_LIB=y
|
||||
CONFIG_DECOMPRESS_LZMA=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=0
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_DEVICE=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_HAMRADIO is not set
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||
CONFIG_HAVE_DMA_API_DEBUG=y
|
||||
CONFIG_HAVE_DMA_ATTRS=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_GENERIC_HARDIRQS=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_IRQ_WORK=y
|
||||
CONFIG_HAVE_MEMBLOCK=y
|
||||
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
# CONFIG_HIGH_RES_TIMERS is not set
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_IMAGE_CMDLINE_HACK=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IP17XX_PHY=y
|
||||
# CONFIG_IP_ADVANCED_ROUTER is not set
|
||||
# CONFIG_IP_MULTICAST is not set
|
||||
CONFIG_IRQ_CPU=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
# CONFIG_ISDN is not set
|
||||
CONFIG_JFFS2_CMODE_FAVOURLZO=y
|
||||
# CONFIG_JFFS2_CMODE_PRIORITY is not set
|
||||
# CONFIG_JFFS2_LZMA is not set
|
||||
CONFIG_JFFS2_LZO=y
|
||||
# CONFIG_LBDAF is not set
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LOG_BUF_SHIFT=12
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BOARDINFO=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
# CONFIG_MIPS_MACHINE is not set
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
CONFIG_MTD_AR2315=y
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
CONFIG_MTD_MYLOADER_PARTS=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-3
|
||||
CONFIG_MTD_REDBOOT_PARTS=y
|
||||
CONFIG_MVSWITCH_PHY=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
CONFIG_NET_VENDOR_AR231X=y
|
||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||
# CONFIG_NET_VENDOR_CHELSIO is not set
|
||||
# CONFIG_NET_VENDOR_INTEL is not set
|
||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_NATSEMI is not set
|
||||
# CONFIG_NET_VENDOR_SEEQ is not set
|
||||
# CONFIG_NET_VENDOR_SMSC is not set
|
||||
# CONFIG_NET_VENDOR_STMICRO is not set
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PREEMPT_RCU is not set
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||
# CONFIG_SHMEM is not set
|
||||
# CONFIG_SLAB is not set
|
||||
CONFIG_SLOB=y
|
||||
CONFIG_SQUASHFS_EMBEDDED=y
|
||||
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=1
|
||||
# CONFIG_STAGING is not set
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_XZ_DEC=y
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
|
@ -1,2 +0,0 @@
|
|||
config model 'model'
|
||||
option name 'dir300'
|
|
@ -1,44 +0,0 @@
|
|||
config 'interface' 'loopback'
|
||||
option 'ifname' 'lo'
|
||||
option 'proto' 'static'
|
||||
option 'ipaddr' '127.0.0.1'
|
||||
option 'netmask' '255.0.0.0'
|
||||
|
||||
#config 'interface' 'lan'
|
||||
# option 'proto' 'dhcp'
|
||||
# option 'ifname' 'eth0.1'
|
||||
|
||||
config 'interface' 'wlanmesh'
|
||||
option 'mtu' '1528'
|
||||
|
||||
config 'interface' 'mesh'
|
||||
option 'type' 'bridge'
|
||||
option 'ifname' 'eth0.1 bat0 tap0'
|
||||
option 'auto' '1'
|
||||
|
||||
config 'switch' 'eth0'
|
||||
option 'name' 'eth0'
|
||||
option 'reset' '1'
|
||||
option 'enable_vlan' '1'
|
||||
|
||||
config 'switch_vlan' 'eth0_1'
|
||||
option 'device' 'eth0'
|
||||
option 'vlan' '1'
|
||||
option 'ports' '0 1 5t'
|
||||
|
||||
config 'switch_vlan' 'eth0_2'
|
||||
option 'device' 'eth0'
|
||||
option 'vlan' '2'
|
||||
option 'ports' '4 5t'
|
||||
|
||||
config 'switch_vlan' 'eth0_3'
|
||||
option 'device' 'eth0'
|
||||
option 'vlan' '3'
|
||||
option 'ports' '2 3 5t'
|
||||
|
||||
config 'interface' 'ethmesh'
|
||||
option 'ifname' 'eth0.3'
|
||||
|
||||
config 'interface' 'unused'
|
||||
option 'ifname' 'eth0.2'
|
||||
option 'proto' 'static'
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
config system
|
||||
option timezone 'CET-1CEST,M3.5.0,M10.5.0/3'
|
||||
option hostname 'OpenWrt'
|
||||
|
||||
config led 'led_wlan'
|
||||
option name 'wlan'
|
||||
option sysfs 'gpio2'
|
||||
option trigger 'netdev'
|
||||
option dev 'wlan0'
|
||||
option mode 'link tx rx'
|
||||
|
||||
config led 'led_status'
|
||||
option name 'status'
|
||||
option sysfs 'wlan'
|
||||
option trigger 'heartbeat'
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
config 'wifi-device' 'wifi0'
|
||||
option 'type' 'mac80211'
|
||||
option 'phy' 'phy0'
|
||||
option 'disabled' '0'
|
||||
option 'channel' '${BATMAN_CHANNEL}'
|
||||
option 'hwmode' '11g'
|
||||
|
||||
config 'wifi-iface'
|
||||
option 'device' 'wifi0'
|
||||
option 'network' 'wlanmesh'
|
||||
option 'mode' 'adhoc'
|
||||
option 'ssid' '${ESSID_MESH}'
|
||||
option 'bssid' '${BSSID_MESH}'
|
||||
option 'encryption' 'none'
|
||||
option 'hidden' '1'
|
||||
|
||||
config 'wifi-iface'
|
||||
option 'device' 'wifi0'
|
||||
option 'network' 'mesh'
|
||||
option 'mode' 'ap'
|
||||
option 'ssid' '${ESSID_AP}'
|
||||
option 'encryption' 'none'
|
|
@ -1,10 +0,0 @@
|
|||
*/5 * * * * sh /etc/nodewatcher.sh; sh /etc/configurator.sh; sh /etc/statistics.sh
|
||||
|
||||
#15 01 * * * rdate -s time.fu-berlin.de > /dev/null
|
||||
|
||||
#Enable zapp script if you are running a gateway
|
||||
#*/1 * * * * /etc/init.d/zapp
|
||||
|
||||
#Reboot dir300 every 3 days at 04:05
|
||||
#5 4 */3 * * reboot
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
|
||||
if uci get network.mesh.macaddr
|
||||
then
|
||||
echo "MAC is set already"
|
||||
else
|
||||
BRMAC=$(awk '{ tolower($0); print }' /sys/class/net/br-mesh/address)
|
||||
WLMAC=$(awk '{ tolower($0); print }' /sys/class/net/wlan0/address)
|
||||
ETMAC=$(awk '{ tolower($0); print }' /sys/class/net/eth0/address)
|
||||
|
||||
if [ "$WLMAC" != "" ] && [ "$BRMAC" != "" ] && [ "$BRMAC" = "$ETMAC" ]; then
|
||||
if [[ "$BRMAC" != "$WLMAC" ]]; then
|
||||
echo "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
|
||||
fi
|
||||
|
||||
if uci get network.ethmesh.macaddr
|
||||
then
|
||||
echo "MAC for ETH-BATMAN is set already"
|
||||
else
|
||||
echo "Fixing MAC on eth0.3 (ethmesh)"
|
||||
NEW=$(awk -F: '{ printf("%02x:%02x:%02x:%02x:%02x:%02x\n", ("0x"$1)+2, "0x"$2, "0x"$3, "0x"$4, "0x"$5, "0x"$6 ) }' /sys/class/net/eth0/address)
|
||||
uci set network.ethmesh.macaddr=$NEW
|
||||
uci commit
|
||||
ifconfig eth0.3 hw ether $NEW
|
||||
ifconfig eth0.3 down
|
||||
ifconfig eth0.3 up
|
||||
fi
|
||||
|
||||
batctl if add wlan0-1
|
||||
batctl if add eth0.3
|
||||
|
1490
bsp/fonera/.config
1490
bsp/fonera/.config
File diff suppressed because it is too large
Load Diff
|
@ -1,17 +0,0 @@
|
|||
Index: include/image.mk
|
||||
===================================================================
|
||||
--- include/image.mk (Revision 35298)
|
||||
+++ include/image.mk (Arbeitskopie)
|
||||
@@ -42,10 +42,10 @@
|
||||
JFFS2OPTS += -x lzma
|
||||
endif
|
||||
|
||||
-SQUASHFS_BLOCKSIZE := 256k
|
||||
+SQUASHFS_BLOCKSIZE := 64k
|
||||
SQUASHFSOPT := -b $(SQUASHFS_BLOCKSIZE)
|
||||
SQUASHFSCOMP := gzip
|
||||
-LZMA_XZ_OPTIONS := -Xpreset 9 -Xe -Xlc 0 -Xlp 2 -Xpb 2
|
||||
+LZMA_XZ_OPTIONS := -Xpreset 1
|
||||
ifeq ($(CONFIG_SQUASHFS_LZMA),y)
|
||||
SQUASHFSCOMP := lzma $(LZMA_XZ_OPTIONS)
|
||||
endif
|
|
@ -1,143 +0,0 @@
|
|||
# CONFIG_AIO is not set
|
||||
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
|
||||
CONFIG_ARCH_DISCARD_MEMBLOCK=y
|
||||
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
|
||||
CONFIG_ARCH_REQUIRE_GPIOLIB=y
|
||||
CONFIG_ARCH_SUSPEND_POSSIBLE=y
|
||||
# CONFIG_ARPD is not set
|
||||
CONFIG_ATHEROS_AR2315=y
|
||||
# CONFIG_ATHEROS_AR2315_PCI is not set
|
||||
CONFIG_ATHEROS_AR231X=y
|
||||
# CONFIG_ATHEROS_AR5312 is not set
|
||||
CONFIG_ATHEROS_WDT=y
|
||||
# CONFIG_BASE_FULL is not set
|
||||
CONFIG_BASE_SMALL=1
|
||||
CONFIG_BCMA_POSSIBLE=y
|
||||
# CONFIG_BUG is not set
|
||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||
CONFIG_CEVT_R4K=y
|
||||
CONFIG_CEVT_R4K_LIB=y
|
||||
CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2"
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||
CONFIG_COMPACTION=y
|
||||
CONFIG_COMPAT_BRK=y
|
||||
CONFIG_CPU_BIG_ENDIAN=y
|
||||
CONFIG_CPU_HAS_PREFETCH=y
|
||||
CONFIG_CPU_HAS_SYNC=y
|
||||
CONFIG_CPU_MIPS32=y
|
||||
CONFIG_CPU_MIPS32_R1=y
|
||||
CONFIG_CPU_MIPSR1=y
|
||||
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||
CONFIG_CSRC_R4K=y
|
||||
CONFIG_CSRC_R4K_LIB=y
|
||||
CONFIG_DECOMPRESS_LZMA=y
|
||||
CONFIG_DEFAULT_MMAP_MIN_ADDR=0
|
||||
CONFIG_DMA_NONCOHERENT=y
|
||||
CONFIG_EARLY_PRINTK=y
|
||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||
CONFIG_GENERIC_ATOMIC64=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS=y
|
||||
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
|
||||
CONFIG_GENERIC_CMOS_UPDATE=y
|
||||
CONFIG_GENERIC_GPIO=y
|
||||
CONFIG_GENERIC_IRQ_SHOW=y
|
||||
CONFIG_GPIOLIB=y
|
||||
CONFIG_GPIO_DEVICE=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
# CONFIG_HAMRADIO is not set
|
||||
CONFIG_HARDWARE_WATCHPOINTS=y
|
||||
CONFIG_HAS_DMA=y
|
||||
CONFIG_HAS_IOMEM=y
|
||||
CONFIG_HAS_IOPORT=y
|
||||
CONFIG_HAVE_ARCH_JUMP_LABEL=y
|
||||
CONFIG_HAVE_ARCH_KGDB=y
|
||||
CONFIG_HAVE_C_RECORDMCOUNT=y
|
||||
CONFIG_HAVE_DMA_API_DEBUG=y
|
||||
CONFIG_HAVE_DMA_ATTRS=y
|
||||
CONFIG_HAVE_DYNAMIC_FTRACE=y
|
||||
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
|
||||
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACER=y
|
||||
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
|
||||
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
|
||||
CONFIG_HAVE_GENERIC_HARDIRQS=y
|
||||
CONFIG_HAVE_IDE=y
|
||||
CONFIG_HAVE_IRQ_WORK=y
|
||||
CONFIG_HAVE_MEMBLOCK=y
|
||||
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
|
||||
CONFIG_HAVE_OPROFILE=y
|
||||
CONFIG_HAVE_PERF_EVENTS=y
|
||||
# CONFIG_HIGH_RES_TIMERS is not set
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_ICPLUS_PHY=y
|
||||
CONFIG_IMAGE_CMDLINE_HACK=y
|
||||
CONFIG_INITRAMFS_SOURCE=""
|
||||
CONFIG_IP17XX_PHY=y
|
||||
# CONFIG_IP_ADVANCED_ROUTER is not set
|
||||
# CONFIG_IP_MULTICAST is not set
|
||||
CONFIG_IRQ_CPU=y
|
||||
CONFIG_IRQ_FORCED_THREADING=y
|
||||
# CONFIG_ISDN is not set
|
||||
CONFIG_JFFS2_CMODE_FAVOURLZO=y
|
||||
# CONFIG_JFFS2_CMODE_PRIORITY is not set
|
||||
# CONFIG_JFFS2_LZMA is not set
|
||||
CONFIG_JFFS2_LZO=y
|
||||
# CONFIG_LBDAF is not set
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LOG_BUF_SHIFT=12
|
||||
CONFIG_LZO_COMPRESS=y
|
||||
CONFIG_LZO_DECOMPRESS=y
|
||||
CONFIG_MDIO_BOARDINFO=y
|
||||
CONFIG_MIGRATION=y
|
||||
CONFIG_MIPS=y
|
||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||
# CONFIG_MIPS_MACHINE is not set
|
||||
CONFIG_MIPS_MT_DISABLED=y
|
||||
CONFIG_MTD_AR2315=y
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||
# CONFIG_MTD_CFI_INTELEXT is not set
|
||||
CONFIG_MTD_MYLOADER_PARTS=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-3
|
||||
CONFIG_MTD_REDBOOT_PARTS=y
|
||||
CONFIG_MVSWITCH_PHY=y
|
||||
CONFIG_NEED_DMA_MAP_STATE=y
|
||||
CONFIG_NEED_PER_CPU_KM=y
|
||||
# CONFIG_NETWORK_FILESYSTEMS is not set
|
||||
# CONFIG_NET_SCHED is not set
|
||||
CONFIG_NET_VENDOR_AR231X=y
|
||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||
# CONFIG_NET_VENDOR_CHELSIO is not set
|
||||
# CONFIG_NET_VENDOR_INTEL is not set
|
||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||
# CONFIG_NET_VENDOR_MICREL is not set
|
||||
# CONFIG_NET_VENDOR_NATSEMI is not set
|
||||
# CONFIG_NET_VENDOR_SEEQ is not set
|
||||
# CONFIG_NET_VENDOR_SMSC is not set
|
||||
# CONFIG_NET_VENDOR_STMICRO is not set
|
||||
CONFIG_PAGEFLAGS_EXTENDED=y
|
||||
# CONFIG_PARTITION_ADVANCED is not set
|
||||
CONFIG_PERF_USE_VMALLOC=y
|
||||
CONFIG_PHYLIB=y
|
||||
# CONFIG_PREEMPT_RCU is not set
|
||||
# CONFIG_SCSI_DMA is not set
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||
# CONFIG_SHMEM is not set
|
||||
# CONFIG_SLAB is not set
|
||||
CONFIG_SLOB=y
|
||||
CONFIG_SQUASHFS_EMBEDDED=y
|
||||
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=1
|
||||
# CONFIG_STAGING is not set
|
||||
# CONFIG_SWAP is not set
|
||||
CONFIG_SWCONFIG=y
|
||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||
CONFIG_XZ_DEC=y
|
||||
CONFIG_ZONE_DMA_FLAG=0
|
|
@ -1,2 +0,0 @@
|
|||
config model 'model'
|
||||
option name 'fonera'
|
|
@ -1,42 +0,0 @@
|
|||
config 'interface' 'loopback'
|
||||
option 'ifname' 'lo'
|
||||
option 'proto' 'static'
|
||||
option 'ipaddr' '127.0.0.1'
|
||||
option 'netmask' '255.0.0.0'
|
||||
|
||||
config 'interface' 'wlanmesh'
|
||||
option 'mtu' '1528'
|
||||
|
||||
|
||||
# this is for MESH on the Ethernet Port
|
||||
#config 'interface' 'ethmesh1'
|
||||
# option 'type' 'bridge'
|
||||
# option 'ifname' 'eth0'
|
||||
# option 'mtu' '1528'
|
||||
#config 'interface' 'mesh'
|
||||
# option 'type' 'bridge'
|
||||
# option 'ifname' 'bat0 tap0'
|
||||
# option 'auto' '1'
|
||||
#END MESH
|
||||
|
||||
|
||||
|
||||
# this is for CLIENT on the Ethernet Port
|
||||
#config 'interface' 'mesh'
|
||||
# option 'type' 'bridge'
|
||||
# option 'ifname' 'eth0 bat0 tap0'
|
||||
# option 'auto' '1'
|
||||
# END CLIENT
|
||||
|
||||
|
||||
|
||||
# this is for the WAN/VPN on the Ethernet Port
|
||||
config 'interface' 'unused'
|
||||
option 'ifname' 'eth0'
|
||||
option 'proto' 'static'
|
||||
config 'interface' 'mesh'
|
||||
option 'type' 'bridge'
|
||||
option 'ifname' 'bat0 tap0'
|
||||
option 'auto' '1'
|
||||
# END WAN/VPN
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
|
||||
config system
|
||||
option timezone 'CET-1CEST,M3.5.0,M10.5.0/3'
|
||||
option hostname 'OpenWrt'
|
||||
|
||||
config led 'led_wlan'
|
||||
option name 'wlan'
|
||||
option sysfs 'wlan'
|
||||
option trigger 'netdev'
|
||||
option dev 'wlan0'
|
||||
option mode 'link tx rx'
|
||||
|
||||
# works only on 2200 :(
|
||||
config led 'led_status'
|
||||
option name 'status'
|
||||
option sysfs 'gpio7'
|
||||
option trigger 'heartbeat'
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
config 'wifi-device' 'wifi0'
|
||||
option 'type' 'mac80211'
|
||||
option 'phy' 'phy0'
|
||||
option 'disabled' '0'
|
||||
option 'channel' '${BATMAN_CHANNEL}'
|
||||
option 'hwmode' '11g'
|
||||
|
||||
config 'wifi-iface'
|
||||
option 'device' 'wifi0'
|
||||
option 'network' 'wlanmesh'
|
||||
option 'mode' 'adhoc'
|
||||
option 'ssid' '${ESSID_MESH}'
|
||||
option 'bssid' '${BSSID_MESH}'
|
||||
option 'encryption' 'none'
|
||||
option 'hidden' '1'
|
||||
|
||||
config 'wifi-iface'
|
||||
option 'device' 'wifi0'
|
||||
option 'network' 'mesh'
|
||||
option 'mode' 'ap'
|
||||
option 'ssid' '${ESSID_AP}'
|
||||
option 'encryption' 'none'
|
|
@ -1,10 +0,0 @@
|
|||
*/5 * * * * sh /etc/nodewatcher.sh; sh /etc/configurator.sh; sh /etc/statistics.sh
|
||||
|
||||
#15 01 * * * rdate -s time.fu-berlin.de > /dev/null
|
||||
|
||||
#Enable zapp script if you are running a gateway
|
||||
#*/1 * * * * /etc/init.d/zapp
|
||||
|
||||
#Reboot dir300 every 3 days at 04:05
|
||||
#5 4 */3 * * reboot
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# fonera to slow?
|
||||
sleep 10
|
||||
|
||||
# todo: all devices or only dir300 ?
|
||||
if uci get network.mesh.macaddr
|
||||
then
|
||||
echo "MAC is set already"
|
||||
else
|
||||
BRMAC=$(awk '{ tolower($0); print }' /sys/class/net/br-mesh/address)
|
||||
WLMAC=$(awk '{ tolower($0); print }' /sys/class/net/wlan0/address)
|
||||
ETMAC=$(awk '{ tolower($0); print }' /sys/class/net/eth0/address)
|
||||
|
||||
if [ "$WLMAC" != "" ] && [ "$BRMAC" != "" ] && [ "$BRMAC" != "$ETMAC" ]; then
|
||||
echo "Fixing wrong MAC on br-mesh"
|
||||
uci set network.mesh.macaddr=$ETMAC
|
||||
uci commit
|
||||
ifconfig br-mesh hw ether $ETMAC
|
||||
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
|
||||
|
||||
batctl if add wlan0-1
|
||||
|
Loading…
Reference in New Issue