[uClibc]uclibc/powerpc status ?

John Traill john.traill at motorola.com
Fri Mar 22 11:55:52 UTC 2002


Subject says it all - What is the status of uclibc + powerpc ?

I tried using my homegrown powerpc cross compiler ( hosted on x86 ) and although 
  busybox and uclibc appeared to compile correctly all I got was a kernel panic 
with no init found.

I downloaded Eriks 3.0.3 toolchain ( modified TARGET_PATH and TARGET_CPU ) but 
it failed during stage 5 with the following.

<snip>
make[4]: Leaving directory 
`/home2/FileSystems/BUILD-HOST/bigbuild/powerpc-linux-gcc/gcc'
/home2/FileSystems/BUILD-HOST/bigbuild/powerpc-linux-gcc/gcc/xgcc 
-B/home2/FileSystems/BUILD-HOST/bigbuild/powerpc-linux-gcc/gcc/ 
-B/home2/opt/tools5/powerpc-linux/bin/ -B/home2/opt/tools5/powerpc-linux/lib/ 
-isystem /home2/opt/tools5/powerpc-linux/include -O2  -DCROSS_COMPILE -DIN_GCC 
   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem 
./include  -fPIC -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc 
-shared -nodefaultlibs -Wl,--soname=libgcc_s.so.0.9.9 
-Wl,--version-script=libgcc.map -o libgcc_s.so   libgcc/./_muldi3.o 
libgcc/./_divdi3.o libgcc/./_moddi3.o libgcc/./_udivdi3.o libgcc/./_umoddi3.o 
libgcc/./_negdi2.o libgcc/./_lshrdi3.o libgcc/./_ashldi3.o libgcc/./_ashrdi3.o 
libgcc/./_ffsdi2.o libgcc/./_clz.o libgcc/./_udiv_w_sdiv.o 
libgcc/./_udivmoddi4.o libgcc/./_cmpdi2.o libgcc/./_ucmpdi2.o
libgcc/./_floatdidf.o libgcc/./_floatdisf.o libgcc/./_fixunsdfsi.o 
libgcc/./_fixunssfsi.o libgcc/./_fixunsdfdi.o libgcc/./_fixdfdi.o 
libgcc/./_fixunssfdi.o libgcc/./_fixsfdi.o libgcc/./_fixxfdi.o 
libgcc/./_fixunsxfdi.o libgcc/./_floatdixf.o libgcc/./_fixunsxfsi.o 
libgcc/./_fixtfdi.o libgcc/./_fixunstfdi.o libgcc/./_floatditf.o 
libgcc/./_clear_cache.o libgcc/./_trampoline.o libgcc/./__main.o 
libgcc/./_exit.o libgcc/./_absvsi2.o libgcc/./_absvdi2.o libgcc/./_addvsi3.o 
libgcc/./_addvdi3.o libgcc/./_subvsi3.o libgcc/./_subvdi3.o libgcc/./_mulvsi3.o 
libgcc/./_mulvdi3.o libgcc/./_negvsi2.o libgcc/./_negvdi2.o libgcc/./_ctors.o 
libgcc/./_pack_sf.o libgcc/./_unpack_sf.o libgcc/./_addsub_sf.o 
libgcc/./_mul_sf.o libgcc/./_div_sf.o libgcc/./_fpcmp_parts_sf.o 
libgcc/./_compare_sf.o libgcc/./_eq_sf.o libgcc/./_ne_sf.o libgcc/./_gt_sf.o 
libgcc/./_ge_sf.o libgcc/./_lt_sf.o libgcc/./_le_sf.o libgcc/./_unord_sf.o 
libgcc/./_si_to_sf.o libgcc/./_sf_to_si.o libgcc/./_negate_sf.o 
libgcc/./_make_sf.o libgcc/./_sf_to_df.o libgcc/./_thenan_sf.o 
libgcc/./_sf_to_usi.o libgcc/./_usi_to_sf.o libgcc/./_pack_df.o 
libgcc/./_unpack_df.o libgcc/./_addsub_df.o libgcc/./_mul_df.o 
libgcc/./_div_df.o libgcc/./_fpcmp_parts_df.o libgcc/./_compare_df.o 
libgcc/./_eq_df.o libgcc/./_ne_df.o libgcc/./_gt_df.o libgcc/./_ge_df.o 
libgcc/./_lt_df.o libgcc/./_le_df.o libgcc/./_unord_df.o libgcc/./_si_to_df.o 
libgcc/./_df_to_si.o libgcc/./_negate_df.o libgcc/./_make_df.o 
libgcc/./_df_to_sf.o libgcc/./_thenan_df.o libgcc/./_df_to_usi.o 
libgcc/./_usi_to_df.o libgcc/./tramp.o libgcc/./unwind-dw2.o 
libgcc/./unwind-dw2-fde.o libgcc/./unwind-sjlj.o -lc && rm -f libgcc_s.so.0.9.9 
&& ln -s libgcc_s.so libgcc_s.so.0.9.9
/home2/opt/tools5/powerpc-linux/bin/ld: cannot open crti.o: No such file or 
directory
collect2: ld returned 1 exit status
</snip>

I also tried gcc-2.95 but this failed trying to find _G_config.h

<snip>
test x"yes" != xyes ||\ 
/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/powerpc-linux-gcc/gcc/xgcc 
-B/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/powerpc-linux-gcc/gcc/ 
-B/home2/opt/tools6/powerpc-linux/bin/ -c -g -Os -I. 
-I/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/gcc-20011006/libio 
-D_IO_MTSAFE_IO -fPIC 
/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/gcc-20011006/libio/iogetline.c 
-o pic/iogetline.o
In file included from 
/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/gcc-20011006/libio/iolibio.h:1,
                  from 
/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/gcc-20011006/libio/libioP.h:47,
                  from 
/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/gcc-20011006/libio/iogetline.c:26:
/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/gcc-20011006/libio/libio.h:30: 
_G_config.h: No such file or directory
make[2]: *** [iogetline.o] Error 1
make[2]: Leaving directory 
`/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/powerpc-linux-gcc/powerpc-linux/libio'
make[1]: *** [all-target-libio] Error 2
make[1]: Leaving directory 
`/home2/FileSystems/BUILD-HOST/bigbuild2/test/gcc-2.95/powerpc-linux-gcc'
make: *** [.stage6] Error 2
</snip>

Removing the c++ language support gave me a working toolchain. However the the 
final gcc and gccbug mv's failed as they weren't present in {TARGET_PATH}/bin. 
Is ths important ?

Trying to compile busbox directly with the new toolchain gave the following error -
<snip>
/home2/opt/tools6/bin/powerpc-linux-gcc -s -Wl,-warn-common --static -o busybox 
ash.o basename.o cat.o chgrp.o chmod.o chown.o chroot.o chvt.o clear.o cmdedit.o 
cmp.o cp.o cpio.o cut.o date.o dd.o df.o dirname.o dmesg.o dos2unix.o du.o 
echo.o env.o find.o free.o grep.o gunzip.o gzip.o halt.o head.o hostid.o 
hostname.o id.o ifconfig.o init.o insmod.o kill.o klogd.o ln.o logger.o ls.o 
lsmod.o mkdir.o mkfifo.o mkfs_minix.o mknod.o mkswap.o modprobe.o more.o mount.o 
mv.o nfsmount.o nslookup.o pidof.o ping.o poweroff.o ps.o
pwd.o reboot.o reset.o rm.o rmdir.o rmmod.o sed.o sleep.o sort.o swaponoff.o 
sync.o syslogd.o tail.o tar.o tee.o telnet.o test.o tftp.o touch.o traceroute.o 
true_false.o tty.o umount.o uname.o uniq.o uptime.o vi.o wc.o wget.o which.o 
whoami.o xargs.o yes.o  busybox.o usage.o applets.o libbb.a
/home2/opt/tools6/powerpc-linux/bin/ld: cannot open crt0.o: No such file or 
directory
collect2: ld returned 1 exit status
make: *** [busybox] Error 1
</snip>

I tried compiling busybox dynamically linked to uclibc using the uclibc wrapper 
and got a kernel panic. Statically linking allowed me to enter the shell (ash) 
but all commands had to run with the full pathname and "/bin/ls /" only gave a 
"/" as output. O

I've tried building with malloc and malloc-simple as hinted in the uClibc Config 
but with no success.

The target platform works with the same kernel but with busybox dynamically 
linked to glibc.

Any hints/tips would be gratefully received ?


PS. Is there a searchable version of the uClibc mailing list archive out there ?

-- 

Regards, John




More information about the uClibc mailing list