hey,
i'm kinda new to linux, but i'm getting there....
For the past few months, I've wanted to get a large RC car, put a computer on it, and drive that around. But my motherboard, a MicroATX (22x22 cm) will only fit on **LARGE** RC cars, and I'm kinda using it right now. But the router - what a great small, wireless, linux platform! And using the GPIO pins discovered by the developers of the SD card mod, that's the critical components that I needed. All I need to do is add a small driver chip like the SN754410. Its outputs would go to the motors and the inputs would be the GPIO lines. So all I need is a small script to read bytes from a socket and output to the GPIO lines.
I've got the GPIO script to control the gpio lines. I got a sample socket script from http://www.linuxgazette.com/issue74/tougher.html . It runs fine on Slackware, but it gives either "permission denied", or after I fixed that, i get unexpected "(" errors. Here's the telnet transcript:
@OpenWrt:/rccar# ./simple_server
/bin/ash: ./simple_server: Permission denied
@OpenWrt:/rccar# sh simple_server
simple_server: 1: Syntax error: "(" unexpected
It doesn't say "root@OpenWrt" because I added a password, then wanted to remove it, but it still would only run SSH; I renamed the passwd files /etc and now telnet works, but only displays "@OpenWrt" instead of root@OpenWrt.. whatever, it works.
To stay on target: The script uses some socket modules; in another post, I read that glib should have those and that's not the problem - it's just me. For compiling on Slackware I just use "make" or "gcc -c" - OpenWrt doesn't have gcc, so I have to compile on the PC and send it over (I have to get NFS working, too... right now, I put it on ftp and wget it on the router. must.. get...nfs... ). But I fear that gcc is compiling for my i686 (AMD Sempron).
Now to the real question: How can I force gcc to compile for a different platform? I just realized that I could check the "man" page - it says that "-c" removes linking. Could that be the problem? The man page for gcc is 8,778 lines long. I don't need a whole book on it; just one thing at a time - how to compile for a different platform.
Thanks for helping me out.
(Last edited by flyashi on 30 Jun 2005, 01:44)