wow.... great work ...
sanitaru wrote:It is working in router mode with 2 vlans. 1 and 2 where vlan2 is the wan port we can choose in mvswitch.h and fix in mvswitch.c
Also i put dnsmasq + iptables and bridged eth0.1/ath0.
how much free space is left....... does everything work fine after the router is restarted. ? Does it work after a power cycle...... ? the images i made before does not work after a reboot or power cycle
here is this thread it is a little old but it discusses on 2mb flash router
https://forum.openwrt.org/viewtopic.php?id=4039&p=1
(read both pages)
i can't do anything to my router currently.. as i need a serial console to access the router after i acccidentally initialized the redboot config....... so i can't help yet......
take a look at this script below it is a briiliant hack don't know if it will work for trunk.... it reduces the size of the library (check the link above)
Here's a sample optimize_lib.sh taken from the wrtsl54g firmware source, to save anyone the effort. Again, it does have some drawbacks, but is absolutely necessary if you want a small firmware.
Code:
#!/bin/sh
#set -x
NM=mipsel-uclibc-nm
LD=mipsel-uclibc-ld
STRIP=mipsel-uclibc-strip
DIR=$1
LIB_SO=$2
LIB_A=$3
LIB_SO_M=$4
SEARCHDIR=$5
INSTALLLIB=$6
MAP=${DIR}/.map
SYM=${DIR}/.sybmols
UNR=${DIR}/.unresolved
BINARIES=`find $SEARCHDIR -path $SEARCHDIR/lib -prune -o -type f -print | file -f - | grep ELF | cut -d':' -f1`
if [ ! -f ${DIR}/${LIB_SO} ] ; then
echo "Cann't find ${DIR}/${LIB_SO}";
exit 0;
fi
if [ ! -f ${DIR}/${LIB_A} ] ; then
echo "Cann't find ${DIR}/${LIB_A}";
exit 0;
fi
rm -f $MAP
rm -f $SYM
rm -f $UNR
$NM -o --defined-only --no-sort ${DIR}/${LIB_SO} | cut -d' ' -f3 > $MAP
$NM --dynamic -u --no-sort $BINARIES | sort -u > $UNR
for symbol in `cat $UNR` ; do
if grep -q "^$symbol" $MAP ; then echo "-u $symbol" >> $SYM ;
fi ; done
if ls $SYM ; then
xargs -t $LD -shared -o ${DIR}/${LIB_SO_M} ${DIR}/${LIB_A} < $SYM ;
fi
if [ "a$INSTALLLIB" != "a" -a -f ${DIR}/${LIB_SO_M} ] ; then
install ${DIR}/${LIB_SO_M} $INSTALLLIB
$STRIP $INSTALLLIB
fi
(Last edited by drekthar on 6 Oct 2011, 06:31)