Подскажите как скомпилировать приложение для модема (чтобы оно, закачивалось в папку /var/ wget ом ) а то я не могу понять как и чем?
пробовал вот так:
Код:
$ mipsel-linux-gcc test.c
/home/xxx/tmp/ccAcLzGZ.o: In function `__start':
test.c:(.text+0x0): multiple definition of `__start'
/usr/lib/gcc/mipsel-linux/3.4.4/../../../../mipsel-linux/lib/crt1.o:crt0.S:(.text+0x0): first defined here
/usr/lib/gcc/mipsel-linux/3.4.4/../../../../mipsel-linux/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
а так он собирается но не работает:
Код:
$mipsel-linux-gcc test.c -c
$ mipsel-linux-ld test.o
а запускаю так:
Код:
[xxx@localhost test]$ telnet 192.168.1.1
Trying 192.168.1.1...
Connected to 192.168.1.1 (192.168.1.1).
Escape character is '^]'.
login: root
Password:
BusyBox v0.61.pre (2004.08.30-08:35+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
# cd /var
# wget http://192.168.1.2/a.out
a.out 100% |*****************************| 66605 00:00 ETA
# chmod 777 a.out
# ./a.out
./a.out: Segmentation fault
при этом
http://mcmcc.bat.ru/dlinkt/test/tcpdump работает:
Код:
# wget http://192.168.1.22/tcpdump
tcpdump 100% |*****************************| 751 KB 00:00 ETA
# chmod 777 tcpdump