Fwd: problem about crossgcc for xscale at x86 mandrake linux 8.1 host

Kai Ruottu kai.ruottu@luukku.com
Thu May 9 12:26:00 GMT 2002

psp wrote:
> in fact, i only want to build or construct a development platform for xscale.
> so i should have an os (the only choice is linux),

 Hmmm, I could add RTEMS (www.rtems.com) and eCos (http://sources.redhat.com)
RTOS'es and NetBSD (www.netbsd.org) and uClinux from the free OS'es.. Whether
NetBSD has been ported to your HW, or RTEMS, eCos or uClinux, the given URLs
should answer... And answer to the question "how to install the opsys into the
target HW"...

> and a c compiler. but when i porting linux to xscale, the cross-compiler, which
> can build os kernel and applications such as shell, init and so on,  is necessary.
> how should i do ?

 Didn't fully understand your problem, but for building the ARM/Linux kernel and for
building apps for ARM/Linux, you will need a ARM/Linux-targeted cross-toolchain with
the compiler, binutils and the C-library (glibc) in it... The C-library is necessary
for the apps, probably not for the kernel only...

> by the way, when i build a program using arm-linux-elf-gcc which is prebuilt
> and downloaded from arm, if i use static link it is ok, if i use dynamic link
> there are some errers and then hang when the program load library.

 You should install the dynamic libraries from the downloaded toolchain to the target
system, into their default places. They will be needed both at link-time (in the cross-
environment) and at run-time (in the target environment) when producing and running
dynamically linked executables. You can also update the glibc with a newer one and then
copy the new updated shared libs into the target... If the GCC in the toolchain now knows
about XScale ('-mcpu=xscale' or something), generating a xscale-optimized glibc and later
xscale-optimized apps, can be possible...

 You seem to have solved the "how to copy the binaries to the target system" problem
already, so copying the shared libs into the target filesystem shouldn't be a problem.

Cheers, Kai

PS. Building a xscale-defaulted toolchain for Linux is possible, the 'arm-linux-elf'
toolchain default probably is 'arm7t'... But this needs some know-how about cross-tools
building, and about Linux. But when you already have the prebuilt toolchain, using the
glibc in it as the 'bootstrap' C-library during the GCC-build makes things much easier
than the 'build from scratch' approach tried even by novices, almost too often, sigh...

Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com

More information about the crossgcc mailing list