forked from freifunk-franken/firmware
Port changes from DIR300 to Fonera
This saves Memory and removes fastd Signed-off-by: Tim Niemeyer <tim.niemeyer@mastersword.de>
This commit is contained in:
parent
239234c0fa
commit
f2d8743554
|
@ -10,6 +10,13 @@ board_prebuild() {
|
||||||
cp ./bsp/$machine/.config $target/.config
|
cp ./bsp/$machine/.config $target/.config
|
||||||
cp ./bsp/$machine/kernel_config-3.3 $target/target/linux/atheros/config-3.3
|
cp ./bsp/$machine/kernel_config-3.3 $target/target/linux/atheros/config-3.3
|
||||||
cp -r ./bsp/$machine/root_file_system/* $target/files/
|
cp -r ./bsp/$machine/root_file_system/* $target/files/
|
||||||
|
|
||||||
|
# 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
|
||||||
}
|
}
|
||||||
|
|
||||||
board_postbuild() {
|
board_postbuild() {
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,3 +1,4 @@
|
||||||
|
CONFIG_ADM6996_PHY=y
|
||||||
CONFIG_AR8216_PHY=y
|
CONFIG_AR8216_PHY=y
|
||||||
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
|
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
|
||||||
CONFIG_ARCH_DISCARD_MEMBLOCK=y
|
CONFIG_ARCH_DISCARD_MEMBLOCK=y
|
||||||
|
@ -9,15 +10,16 @@ CONFIG_ATHEROS_AR2315=y
|
||||||
CONFIG_ATHEROS_AR231X=y
|
CONFIG_ATHEROS_AR231X=y
|
||||||
# CONFIG_ATHEROS_AR5312 is not set
|
# CONFIG_ATHEROS_AR5312 is not set
|
||||||
CONFIG_ATHEROS_WDT=y
|
CONFIG_ATHEROS_WDT=y
|
||||||
# CONFIG_BASE_FULL is not set
|
|
||||||
CONFIG_BASE_SMALL=1
|
|
||||||
CONFIG_BCMA_POSSIBLE=y
|
CONFIG_BCMA_POSSIBLE=y
|
||||||
|
# CONFIG_BUG is not set
|
||||||
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
|
||||||
CONFIG_CEVT_R4K=y
|
CONFIG_CEVT_R4K=y
|
||||||
CONFIG_CEVT_R4K_LIB=y
|
CONFIG_CEVT_R4K_LIB=y
|
||||||
CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2"
|
CONFIG_CMDLINE="console=ttyS0,9600 rootfstype=squashfs,jffs2"
|
||||||
CONFIG_CMDLINE_BOOL=y
|
CONFIG_CMDLINE_BOOL=y
|
||||||
# CONFIG_CMDLINE_OVERRIDE is not set
|
# CONFIG_CMDLINE_OVERRIDE is not set
|
||||||
|
CONFIG_COMPACTION=y
|
||||||
|
CONFIG_COMPAT_BRK=y
|
||||||
CONFIG_CPU_BIG_ENDIAN=y
|
CONFIG_CPU_BIG_ENDIAN=y
|
||||||
CONFIG_CPU_HAS_PREFETCH=y
|
CONFIG_CPU_HAS_PREFETCH=y
|
||||||
CONFIG_CPU_HAS_SYNC=y
|
CONFIG_CPU_HAS_SYNC=y
|
||||||
|
@ -29,6 +31,7 @@ CONFIG_CPU_SUPPORTS_HIGHMEM=y
|
||||||
CONFIG_CSRC_R4K=y
|
CONFIG_CSRC_R4K=y
|
||||||
CONFIG_CSRC_R4K_LIB=y
|
CONFIG_CSRC_R4K_LIB=y
|
||||||
CONFIG_DECOMPRESS_LZMA=y
|
CONFIG_DECOMPRESS_LZMA=y
|
||||||
|
CONFIG_DEFAULT_MMAP_MIN_ADDR=0
|
||||||
CONFIG_DMA_NONCOHERENT=y
|
CONFIG_DMA_NONCOHERENT=y
|
||||||
CONFIG_EARLY_PRINTK=y
|
CONFIG_EARLY_PRINTK=y
|
||||||
CONFIG_ETHERNET_PACKET_MANGLE=y
|
CONFIG_ETHERNET_PACKET_MANGLE=y
|
||||||
|
@ -74,13 +77,14 @@ CONFIG_IRQ_FORCED_THREADING=y
|
||||||
# CONFIG_ISDN is not set
|
# CONFIG_ISDN is not set
|
||||||
# CONFIG_LBDAF is not set
|
# CONFIG_LBDAF is not set
|
||||||
CONFIG_LEDS_GPIO=y
|
CONFIG_LEDS_GPIO=y
|
||||||
CONFIG_LOG_BUF_SHIFT=12
|
CONFIG_LZO_COMPRESS=y
|
||||||
|
CONFIG_LZO_DECOMPRESS=y
|
||||||
CONFIG_MDIO_BOARDINFO=y
|
CONFIG_MDIO_BOARDINFO=y
|
||||||
|
CONFIG_MIGRATION=y
|
||||||
CONFIG_MIPS=y
|
CONFIG_MIPS=y
|
||||||
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
CONFIG_MIPS_L1_CACHE_SHIFT=5
|
||||||
# CONFIG_MIPS_MACHINE is not set
|
# CONFIG_MIPS_MACHINE is not set
|
||||||
CONFIG_MIPS_MT_DISABLED=y
|
CONFIG_MIPS_MT_DISABLED=y
|
||||||
# CONFIG_MODULE_UNLOAD is not set
|
|
||||||
CONFIG_MTD_AR2315=y
|
CONFIG_MTD_AR2315=y
|
||||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||||
# CONFIG_MTD_CFI_GEOMETRY is not set
|
# CONFIG_MTD_CFI_GEOMETRY is not set
|
||||||
|
@ -105,11 +109,17 @@ CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||||
# CONFIG_SHMEM is not set
|
# CONFIG_SHMEM is not set
|
||||||
# CONFIG_SLAB is not set
|
# CONFIG_SLAB is not set
|
||||||
CONFIG_SLOB=y
|
CONFIG_SLOB=y
|
||||||
|
CONFIG_SQUASHFS_EMBEDDED=y
|
||||||
|
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=1
|
||||||
|
CONFIG_SQUASHFS_LZO=y
|
||||||
CONFIG_SWCONFIG=y
|
CONFIG_SWCONFIG=y
|
||||||
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
CONFIG_SYS_HAS_CPU_MIPS32_R1=y
|
||||||
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
CONFIG_SYS_HAS_EARLY_PRINTK=y
|
||||||
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
|
||||||
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
|
||||||
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
|
||||||
|
CONFIG_XVMALLOC=y
|
||||||
CONFIG_XZ_DEC=y
|
CONFIG_XZ_DEC=y
|
||||||
CONFIG_ZONE_DMA_FLAG=0
|
CONFIG_ZONE_DMA_FLAG=0
|
||||||
|
CONFIG_ZRAM=y
|
||||||
|
CONFIG_ZRAM_DEBUG=y
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
*/5 * * * * sh /etc/fastdstart.sh; sh /etc/nodewatcher.sh; sh /etc/configurator.sh
|
*/5 * * * * sh /etc/nodewatcher.sh; sh /etc/configurator.sh
|
||||||
|
|
||||||
#15 01 * * * rdate -s time.fu-berlin.de > /dev/null
|
#15 01 * * * rdate -s time.fu-berlin.de > /dev/null
|
||||||
|
|
||||||
|
|
|
@ -1,26 +1,20 @@
|
||||||
# Put your custom commands here that should be executed once
|
# Put your custom commands here that should be executed once
|
||||||
# the system init finished. By default this file does nothing.
|
# 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
|
batctl if add wlan0-1
|
||||||
|
|
||||||
|
#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() {
|
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"
|
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
. /etc/firewall.user
|
|
||||||
|
|
||||||
/etc/init.d/qos disable
|
|
||||||
/etc/init.d/qos stop
|
|
||||||
|
|
||||||
#busybox-httpd for crawldata
|
|
||||||
mkdir /tmp/crawldata
|
|
||||||
httpd -h /tmp/crawldata
|
|
||||||
|
|
||||||
# todo: all devices or only dir300 ?
|
# todo: all devices or only dir300 ?
|
||||||
|
|
||||||
# fonera to slow?
|
|
||||||
sleep 10
|
|
||||||
|
|
||||||
if uci get network.mesh.macaddr
|
if uci get network.mesh.macaddr
|
||||||
then
|
then
|
||||||
echo "MAC is set already"
|
echo "MAC is set already"
|
||||||
|
@ -32,15 +26,17 @@ else
|
||||||
ETMAC=`ip link | grep eth0 -A1 | grep link | awk '{ print $2 }'`
|
ETMAC=`ip link | grep eth0 -A1 | grep link | awk '{ print $2 }'`
|
||||||
ETMAC=`toLower $ETMAC`
|
ETMAC=`toLower $ETMAC`
|
||||||
|
|
||||||
if [ "$WLMAC" != "" ] && [ "$BRMAC" != "" ] && [ "$BRMAC" != "$ETMAC" ]; then
|
if [ "$WLMAC" != "" ] && [ "$BRMAC" != "" ] && [ "$BRMAC" = "$ETMAC" ]; then
|
||||||
|
if [[ "$BRMAC" != "$WLMAC" ]]; then
|
||||||
echo "Fixing wrong MAC on br-mesh"
|
echo "Fixing wrong MAC on br-mesh"
|
||||||
uci set network.mesh.macaddr=$ETMAC
|
uci set network.mesh.macaddr=$WLMAC
|
||||||
uci commit
|
uci commit
|
||||||
ifconfig br-mesh hw ether $ETMAC
|
ifconfig br-mesh hw ether $WLMAC
|
||||||
ifconfig br-mesh down
|
ifconfig br-mesh down
|
||||||
ifconfig br-mesh up
|
ifconfig br-mesh up
|
||||||
#wait before reboot to generate tinc certificates and to be able
|
#wait before reboot to generate tinc certificates and to be able
|
||||||
#to login over ssh bevore reboot in case of errors
|
#to login over ssh bevore reboot in case of errors
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -48,4 +44,10 @@ fi
|
||||||
# uses to much ram
|
# uses to much ram
|
||||||
#ntpd -p "fe80::201:2ff:fe03:405%br-mesh"
|
#ntpd -p "fe80::201:2ff:fe03:405%br-mesh"
|
||||||
|
|
||||||
|
#. /etc/firewall.user
|
||||||
|
|
||||||
|
#busybox-httpd for crawldata
|
||||||
|
mkdir /tmp/crawldata
|
||||||
|
httpd -h /tmp/crawldata
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue