Busybox / mips / embedded Linux question
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 HI gang, I am playing with a single board computer (SBC) in an attempt to make a diskless, fanless, silent firewall. Specifically, its the RouterBoard 532 (http://www.routerboard.com). The processor is MIPS based (4Kc). I've been using the buildroot software (nice!) which made creating the cross compiler enviroment considerably easier than my previous (failed) attempts at doing this by hand. My cross compiler environment is now working quite nicely. I have created an environment where I have loaded software onto a compact flash card and booted Linux 2.4.30 on this box. I have logged in and gotten the box talking on the net. All 3 ethernet ports function, as well as ssh and dhcp. Sweet! My next step is to take the SuSE firewall scripts (they are GPL) and run them on this box. However, I'm hitting a wall that I don't think I should be hitting. Within busybox, command substitution and pipes don't work on this MIPS box (but they do work on my x86_64). command substitution example: echo `cat /etc/hostname` pipes: ls -l | grep foo With neither of these working, real scripts don't work too well. :-( I've traced the source code (gotta love free software!) and the code fails whenever it calls the function dup2(). I'm not sure why dup2() fails, but it does, returning EBADF (bad file descriptor). I tried installing bash and noticed exactly the same thing. dup2() seems to be implemented as a system call into the kernel, but that's where I get lost. I've been scouring the net and cannot find an answer. I must be doing something wrong, but I know not what. Does anybody have any helpful hints? Thanks! Andy - -- Andy Stewart, Founder Worcester Linux Users' Group Worcester, MA, USA http://www.wlug.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDtGZXHl0iXDssISsRAjuLAKCFg/zGddsXpVH8rIe/m4n2I/OSTACaAoQf BDkJ30y7RJ634XazzPgGAWY= =w+LK -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I've been scouring the net and cannot find an answer. I must be doing something wrong, but I know not what. Does anybody have any helpful hints?
Other notes: With respect to file descriptors, I noticed on my x86_64 system that /dev/fd is a symlink to /proc/self/fd, but not so on the MIPS box. I added that link to no avail. It seemed relevant, but perhaps not. /proc is enabled on the MIPS box. I also checked via ulimit to insure that I wasn't somehow limited in the number of open file descriptors. No problems there as far as I can tell. I think that's it for now. Andy - -- Andy Stewart, Founder Worcester Linux Users' Group Worcester, MA, USA http://www.wlug.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDtGfoHl0iXDssISsRAlMbAJ4odnJkq+6nmuUmwqnobUFHCeKnCQCfW0lo Ih8arrn+mj7WxdbUpmCHmqo= =R4qz -----END PGP SIGNATURE-----
On Thursday 29 December 2005 17:42, Andy Stewart wrote:
Within busybox, command substitution and pipes don't work on this MIPS box (but they do work on my x86_64).
are you using uClibc 0.9.28 or the uClibc snapshot ? busybox release or busybox snapshot ? is your cpu big endian mips ? i can gen a buildroot over here and test it on a little endian mips box pretty quickly, but i'll have to fiddle to boot my big endian mips ... also, you could have just posted this to the busybox mailing list, we dont mind these sort of things ;) -mike
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mike Frysinger wrote:
On Thursday 29 December 2005 17:42, Andy Stewart wrote:
Within busybox, command substitution and pipes don't work on this MIPS box (but they do work on my x86_64).
are you using uClibc 0.9.28 or the uClibc snapshot ? busybox release or busybox snapshot ? is your cpu big endian mips ? i can gen a buildroot over here and test it on a little endian mips box pretty quickly, but i'll have to fiddle to boot my big endian mips ...
Hi Mike, Here's what I'm using: uClibc-0.9.28 busybox-1.01 target cpu is little endian (mipsel) Linux kernel is 2.4.30 (yes, I hacked in the headers...)
also, you could have just posted this to the busybox mailing list, we dont mind these sort of things ;) -mike
I considered that, especially when I saw a "Mike Frysinger" over there, and wondered if there was more than one of you on the Internet. :-) Thanks! Andy - -- Andy Stewart, Founder Worcester Linux Users' Group Worcester, MA, USA http://www.wlug.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDtH0/Hl0iXDssISsRAr0iAKCIAgChF0hmBtJacLyW0yp1mp/WGQCeLgkh hyrJzp8NzhaDf5QV2AUYhPc= =OQGz -----END PGP SIGNATURE-----
participants (2)
-
Andy Stewart
-
Mike Frysinger