uClibc 0.9.29 for AVR32

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On http://avr32linux.org/twiki/bin/... you can find an uClibc patch against upstream version 0.9.29.

Grab the uClibc-0.9.29.atmel.1 patch, fixes several issues with the C library for me ;)

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Excellent :D

Going to test it later today. Thanks alot :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, there

Could you post .config file ?
And what was the issues with 0.9.28? I couldn't find
any problem with 0.9.28.

Thanks,

James

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The main issue (I had) with .28 was that it didn't define __cxa_atexit, that was done by the compiler. The latest compiler binaries are compiled without __cxa_atexit support since they assume this to be in the library. End result: C++ destructors explode.

I think there was also an issue with the assembly-optimized memcmp function.

As for a config, make defconfig, make menuconfig, select avr32 as target arch and avr32-linux- as cross-compilation prefix, point it to the location of your kernel headers and away you go. If you don't have kernel headers you'll need to get a copy of the kernel source you're using and run make headers_install INSTALL_HDR_PATH=[someplace] then point the uClibc config at that [someplace].

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi i try to compile uClibc 29 on my Ubuntu (Feisty). I get the following error:

Quote:
./extra/scripts/conf-header.sh .config > include/bits/uClibc_config.h
:1:24: error: asm/unistd.h: No such file or directory
:1:24: error: asm/unistd.h: No such file or directory
CC ldso/ldso/ldso.oS
In file included from ./ldso/include/ldso.h:36,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h: In function '_dl_exit':
./ldso/include/dl-syscall.h:58: error: '__NR_exit' undeclared (first use in this function)
./ldso/include/dl-syscall.h:58: error: (Each undeclared identifier is reported only once
./ldso/include/dl-syscall.h:58: error: for each function it appears in.)
./ldso/include/dl-syscall.h: In function '_dl_close':
./ldso/include/dl-syscall.h:61: error: '__NR_close' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_open':
./ldso/include/dl-syscall.h:64: error: '__NR_open' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_write':
./ldso/include/dl-syscall.h:68: error: '__NR_write' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_read':
./ldso/include/dl-syscall.h:72: error: '__NR_read' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_mprotect':
./ldso/include/dl-syscall.h:76: error: '__NR_mprotect' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_stat':
./ldso/include/dl-syscall.h:80: error: '__NR_stat' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_fstat':
./ldso/include/dl-syscall.h:84: error: '__NR_fstat' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_munmap':
./ldso/include/dl-syscall.h:87: error: '__NR_munmap' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_getuid':
./ldso/include/dl-syscall.h:93: error: '__NR_getuid' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_geteuid':
./ldso/include/dl-syscall.h:99: error: '__NR_getuid' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_getgid':
./ldso/include/dl-syscall.h:105: error: '__NR_getgid' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_getegid':
./ldso/include/dl-syscall.h:111: error: '__NR_getgid' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_getpid':
./ldso/include/dl-syscall.h:117: error: '__NR_getpid' undeclared (first use in this function)
./ldso/include/dl-syscall.h: In function '_dl_readlink':
./ldso/include/dl-syscall.h:120: error: '__NR_readlink' undeclared (first use in this function)
In file included from ./ldso/include/ldso.h:36,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:196:3: error: #error "Your architecture doesn't seem to provide mmap() !?"
In file included from ldso/ldso/ldso.c:42:
ldso/ldso/avr32/elfinterp.c: In function '_dl_linux_resolver':
ldso/ldso/avr32/elfinterp.c:39: warning: unused variable 'sym_index'
ldso/ldso/avr32/elfinterp.c:38: warning: unused variable 'entry'
ldso/ldso/avr32/elfinterp.c:37: warning: unused variable 'symname'
ldso/ldso/avr32/elfinterp.c:37: warning: unused variable 'strtab'
ldso/ldso/avr32/elfinterp.c:35: warning: unused variable 'gotsym'
ldso/ldso/avr32/elfinterp.c:34: warning: unused variable 'local_gotno'
ldso/ldso/avr32/elfinterp.c:33: warning: unused variable 'sym'
ldso/ldso/avr32/elfinterp.c:32: warning: unused variable 'tpnt'
ldso/ldso/ldso.c: In function '_dl_malloc':
ldso/ldso/ldso.c:893: warning: implicit declaration of function '_dl_mmap'
ldso/ldso/ldso.c:894: warning: assignment makes pointer from integer without a cast
In file included from ldso/ldso/ldso.c:913:
ldso/ldso/dl-elf.c: In function '_dl_map_cache':
ldso/ldso/dl-elf.c:60: warning: assignment makes pointer from integer without a cast
ldso/ldso/dl-elf.c: In function '_dl_load_elf_shared_library':
ldso/ldso/dl-elf.c:386: warning: assignment makes pointer from integer without a cast
ldso/ldso/dl-elf.c: In function '_dl_dprintf':
ldso/ldso/dl-elf.c:729: warning: assignment makes pointer from integer without a cast
make: *** [ldso/ldso/ldso.oS] Fehler 1

I do the following:
1. make defconfig
2. make menuconfig
3. select avr32 as target architecture
4. in uClibc development/debugging options:
Cross-compiling toolchain prefix: avr32-linux-
5. in Target Architecture Features and Options:
Linux kernel header location: /usr/src/linux-headers-2.6.20-16-generic/
6: make

Imho Kernelheaders are installed and located in the location mentioned above.
Can anyone help me?

Thx Sebus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think you've got the wrong kernel headers -- the directory you specified looks like it belongs to your host PC.

Grab a recent linux kernel (from avr32linux.org or kernel.org), unpack it and run

make ARCH=avr32 INSTALL_HDR_PATH=/tmp/avr32-linux-headers headers_install

and use /tmp/avr32-linux-headers as the "Linux kernel header location". You may of course put it somewhere more permanent than /tmp if you want.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok. Your tip works. Thx a lot.
The next problem is that i do not known where and how to install it so that aptitude recognize it. I have install the uClibc version 28 using aptitude. If i remove this Version (package name uclibc-avr32) he also removes the package called avr32-linux-devel because of dependencies. Im not sure how to solve this problem.

Thx Sebus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avr32-linux-devel devel is just a meta-package existing purely for it's dependencies on all the required tools. If you provide one of the tools yourself then you can remove the package which used to supply it as well as avr32-linux-devel with no ill effects.

When Atmel release some binaries containing uClibc 0.9.29 then you can uninstall the what you've just built here, reinstall the uclibc-avr32 package and all will be right.

-S.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi. with out the avr32-linux-devel package the following error occurs:

In avr32 studio (only the beginning of the error):

**** Build of configuration Debug for project measurement_project ****

make -k all 
Building file: ../measurement_control.cpp
Invoking: AVR32/GNU Linux C++ Compiler
avr32-linux-g++ -O0 -g3 -Wall -c -fmessage-length=0 -mpart=ap7000 -MMD -MP -MF"measurement_control.d" -MT"measurement_control.d" -o"measurement_control.o" "../measurement_control.cpp"
In file included from ../measurement_control.h:4,
                 from ../measurement_control.cpp:1:
../led_control.h:4:20: warning: unistd.h: No such file or directory
../led_control.h:5:19: warning: fcntl.h: No such file or directory
In file included from ../measurement_control.h:6,
                 from ../measurement_control.cpp:1:
../serial_control.h:7:23: warning: sys/types.h: No such file or directory
../serial_control.h:8:22: warning: sys/stat.h: No such file or directory
../serial_control.h:10:21: warning: termios.h: No such file or directory
In file included from /usr/lib/gcc/avr32-linux/4.2.1/include/c++/bits/char_traits.h:45,
                 from /usr/lib/gcc/avr32-linux/4.2.1/include/c++/string:47,
                 from ../log_data.h:4,
                 from ../measurement_control.h:5,
                 from ../measurement_control.cpp:1:
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:80: error: '::memcpy' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:81: error: '::memmove' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:82: error: '::strcpy' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:83: error: '::strncpy' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:84: error: '::strcat' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:85: error: '::strncat' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:86: error: '::memcmp' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:87: error: '::strcmp' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:88: error: '::strcoll' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:89: error: '::strncmp' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:90: error: '::strxfrm' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:91: error: '::strcspn' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:92: error: '::strspn' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:93: error: '::strtok' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:94: error: '::memset' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:95: error: '::strerror' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:96: error: '::strlen' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:98: error: '::memchr' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring: In function 'void* std::memchr(void*, int, size_t)':
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:102: error: invalid conversion from 'const void*' to 'void*'
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:102: error:   initializing argument 1 of 'void* std::memchr(void*, int, size_t)'
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring: At global scope:
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:104: error: '::strchr' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:110: error: '::strpbrk' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:116: error: '::strrchr' has not been declared
/usr/lib/gcc/avr32-linux/4.2.1/include/c++/cstring:122: error: '::strstr' has not been declared
In file included from /usr/lib/gcc/avr32-linux/4.2.1/include/c++/bits/stl_algobase.h:68,
                 from /usr/lib/gcc/avr32-linux/4.2.1/include/c++/bits/char_traits.h:46,
                 from /usr/lib/gcc/avr32-linux/4.2.1/include/c++/string:47,
                 from ../log_data.h:4,
                 from ../measurement_control.h:5,
                 from ../measurement_control.cpp:1:

I think the compiler has problem because of the missing uClibc Version 28 and he did not find my compiled version 29. My Question is which path i have to my install uClibc so that the compiler find the files? Maybe you have an idea?

Thx Sebus

Thx Sebus