Because the version of grep from the sdk needs it, and it will comes first in your path, before the busybox version.
For rc12: zgcc-3.4.4.img
One way to do this is to put the zgcc-XXX.img in /home/root and reboot.
You can also put the file somewhere, create a link to this file in /home/root and reboot.
For instance if you put the file in /mnt/card you need to type:
ln -s /mnt/card/zggc-3.4.4.img /home/root
You can also mount the image by hand, but you have to make sure that the image is mounted at the right place.
Otherwise gcc will not work correctly.
You can find the path by doing the following in a terminal
# grep zgcc /etc/rc.d/rc.sysinit if [ -f /home/root/zgcc-3.4.4.img ]; then mount -o loop /home/root/zgcc-3.4.4.img /opt/native/arm/3.4.4-xscale-softvfp #
In my case the right path is /opt/native/arm/3.4.4-xscale-softvfp. To mount the image you first need to create the directory if it does not exist and mount the image. For instance, assuming the image is in /mnt/card:
# mkdir -p /opt/native/arm/3.4.4-xscale-softvfp # mount -o loop /mnt/card/zggc-3.4.4.img /opt/native/arm/3.4.4-xscale-softvfp
That's it
If you want to see gcc in action try:
# echo -e '#include\n int main(){ printf("Hello World\\n"); }' > hello.c # gcc -o hello hello.c # ./hello Hello World #