Mindstab Apprentice
Joined: 02 Jan 2003 Posts: 271 Location: Vancouver, Canada
|
Posted: Sat Dec 09, 2006 8:03 am Post subject: Howto manually cross compile coreutils for the GP2X |
|
|
Hey, I want to port a few utilities to my GP2X (a 200 mhz arm "toy")
crossdev won't let me set up the right environment (kernel 2.4, glibc 2.2) but that's ok because it has an official sdk which can do everything I need.
a simple hello world program can be made with the sdk like this
Code: |
$ /gp2xsdk/Tools/bin/arm-gp2x-linux-gcc hello.c
|
Now the tools I want are from core utils. The GP2X's busybox environment is sorely lacking a few things I'd like. I was able to manually compile a single .c utility already and it worked, but coreutils is complex. I can't figure out how to get the configure script to fully use the sdk. I'm currently trying this ugly mess
Code: |
CC=/gp2xsdk/Tools/bin/arm-gp2x-linux-gcc ./configure --build=arm-unknown-linux-gnu --target=arm-unknown-linux-gnu --with-target-subdir=/gp2xsdk/Tools/arm-gp2x-linux/ --bindir=/gp2xsdk/Tools/arm-gp2x-linux/bin/ --sbindir=/gp2xsdk/Tools/arm-gp2x-linux/sbin/ --libexecdir=/gp2xsdk/Tools/arm-gp2x-linux/libexec/ --libdir=/gp2xsdk/Tools/arm-gp2x-linux/lib --includedir=/gp2xsdk/Tools/arm-gp2x-linux/include/
|
And it seems to be close. It is using the right arm-gcc and stuff. However, when I copy the files over to the gp2x, they seg fault. Anyone know how I can get this to work? I'd greatly appreciate it.
(oh, and for the record the box I'm using to compile stuff is a Gentoo box on an Athlon 1800XP+) |
|