This better than turbo c on dosemu![]()
step1: download zgcc
download zgcc from http://s91215199.onlinehome.us/zaurus/
GCC and Qt binary files -- the zgcc2Bin.cramfs file
GCC and Qtopia include files -- the zgcc2Inc.cramfs file
step2: make directories
mkdir /mmc/mmca1/ezx
mkdir /mmc/mmca1/ezx/zgcc
mkdir /mmc/mmca1/ezx/include
mkdir /mmc/mmca1/ezx/lib
mkdir /mmc/mmca1/ezx/driver
step3: prepare files
copy zgcc2Bin.cramfs and zgcc2Inc.cramfs to /mmc/mmca1/ezx
copy loop.o to /mmc/mmca1/ezx/driver (loop.o can be found in some projects like opie and ezx-qtopia)
run qconsole or ekonsole
cp /lib/libc.so.6 /mmc/mmca1/ezx/lib/libc.so
step4: create scripts for zgcc
file /mmc/mmca1/ezx/zgcc.sh
==========================
insmod /mmc/mmca1/ezx/driver/loop.o
mount -t cramfs /mmc/mmca1/ezx/zgcc2Bin.cramfs /mmc/mmca1/ezx/zgcc -o loop
mount -t cramfs /mmc/mmca1/ezx/zgcc2Inc.cramfs /mmc/mmca1/ezx/include -o loop
===========================
file /mmc/mmca1/ezx/zgcc.env
==========================
export GCC_EXEC_PREFIX=/mmc/mmca1/ezx/zgcc/lib/gcc-lib/arm-linux/2.95.2/
export COMPILER_PATH=/mmc/mmca1/ezx/zgcc/lib/gcc-lib/arm-linux/2.95.2/
export CPATH=/mmc/mmca1/ezx/include/
export LIBRARY_PATH=/lib:/usr/lib:/mmc/mmca1/ezx/lib:/mmc/mmca1/ezx/zgcc/lib/:/mmc/mmca1/ezx/zgcc/lib/gcc-lib/arm-linux/2.95.2/
export CPLUS_INCLUDE_PATH=/mmc/mmca1/ezx/include/g++-3/
export PATH=/mmc/mmca1/ezx/zgcc/bin:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mmc/mmca1/ezx/zgcc/lib
==============================
file unzgcc.sh
=============================
umount /mmc/mmca1/ezx/zgcc
umount /mmc/mmca1/ezx/include
=============================
step5: test
test.c
======================
#include <stdio.h>
int main()
{
printf("hello,world\n");
}
======================
open qconsole
cd /mmc/mmca1/ezx
./zgcc.sh
source zgcc.env
gcc -o test test.c
./test
hello,world
./unzgcc.sh
Last edited by bitfly; 01-19-2008 at 05:40 AM.
This better than turbo c on dosemu![]()
bitfly, very good.
But i think that you can use standard gcc compiled for arm without a different libc on the phone.
have you tried standard gcc compiled with the mkezx toolchain? I believe it will work (altough big c++ files will not compile because of the lack of RAM).
@wyrm
Maybe a big swap memory will help.
Wow! BTW can we make the gcc run in E2?
E6/a12000???????
wow.....that is a great job you have done......
i have tried to run zgcc that used in zarus,but failed......
Btw i succeed run it in my E2...Anyone have the perl run in ezx? So we can use progen and tmake... Ah, one more...is it compatible with the SDK (unofficial) out here?
Anyway, thanks bitfly... ;D
ya,thanks a lot for your work and share,it helps!!