Buildroot for AVR32 AP7 family microprocessors

Known issues

Issue when installing C++ header files

/usr/bin/install: cannot stat
`./avr32-linux-uclibc/bits/stdc++.h.gch/*': No such file or directory

Solution is to delete the final GCC stage directory and start the make process from the begining. Example:

rm -r toolchain_build_avr32_nofpu/gcc-4.1.2-final
make

Package NN failed to download

Buildroot is not able to download a package due to timeout error or bad request error.

Solution is to try to download again, this is done by typing make. You should see that Buildroot tries to download the package again. Try multiple times.

If retrying does not work, try to open til URL to the package in a web browser and download the file manually into the download directory. The download directory is by default in src/dl.

It is also possible to download the needed source code packages from the mirror site.

Application NN fails during compile

The user gets an error when compiling an application or library.

Since Buildroot consists of many packages which different applications and libraries, not all have been tested to compile and run for AVR32 architecture. Some software may need architecture patches and other software may have a faulty build process.

If a package fails to compile, remove the dependency using the command:

  • make menuconfig

Locate the package and deselect it.

Buildroot is tested to compile and install all packages used with the default configuration for AVR32 target boards. Other packages may or may not work.

Patching fails, file already exists

The user experiences that the patching of some software in Buildroot fails. The error message is something similar to:

Applying 900-avr32-support.patch using plaintext:
patching file configure.in
...
The next patch would create the file gcc/config/avr32/avr32.c,
which already exists!  Assume -R? [n] y
...

Solution is to delete the directory which holds the failing software and try to build again. This can happen if Buildroot is halted during a build and then restarted.

If the user experiences the same problem again, contact the support line.

Qtopia can not find zlib.h and fails to build

The user experiences that Qtopia fails to build, producing an error message similar to:

make[3]: Entering directory
  `toolchain_build_avr32_nofpu/qtopia-core-opensource-src-4.2.2/src/tools/rcc'
g++ -c -pipe -O2 -Wall -W  -DQT_BOOTSTRAPPED -DQT_RCC -DQT_LITE_UNICODE
  -DQT_NO_DATASTREAM -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_UNICODETABLES
  -DQT_NO_LIBRARY -DQT_NO_SYSTEMLOCALE -D_LARGEFILE64_SOURCE
  -D_LARGEFILE_SOURCE -I../../../mkspecs/linux-g++ -I.
  -I../../corelib/arch/generic
  -I../../../include -I. -I../../../include/QtCore -I../../../include/QtXml
  -I.uic/release-shared-emb-avr32
  -o .obj/release-shared-emb-avr32/qbytearray.o
  ../../corelib/tools/qbytearray.cpp
../../corelib/tools/qbytearray.cpp:37:18: error:
  zlib.h: No such file or directory
../../corelib/tools/qbytearray.cpp: In function
  'QByteArray qCompress(const uchar*, int, int)':
../../corelib/tools/qbytearray.cpp:385:
  error: '::compress2' has not been declared
../../corelib/tools/qbytearray.cpp:388:
  error: 'Z_OK' was not declared in this scope
../../corelib/tools/qbytearray.cpp:395:
  error: 'Z_MEM_ERROR' was not declared in this scope
../../corelib/tools/qbytearray.cpp:399:
  error: 'Z_BUF_ERROR' was not declared in this scope
../../corelib/tools/qbytearray.cpp:403:
  error: 'Z_BUF_ERROR' was not declared in this scope
../../corelib/tools/qbytearray.cpp: In function
  'QByteArray qUncompress(const uchar*, int)':
../../corelib/tools/qbytearray.cpp:458:
  error: '::uncompress' has not been declared
../../corelib/tools/qbytearray.cpp:462:
  error: 'Z_OK' was not declared in this scope
../../corelib/tools/qbytearray.cpp:466:
  error: 'Z_MEM_ERROR' was not declared in this scope
../../corelib/tools/qbytearray.cpp:469:
  error: 'Z_BUF_ERROR' was not declared in this scope
../../corelib/tools/qbytearray.cpp:472:
  error: 'Z_DATA_ERROR' was not declared in this scope
../../corelib/tools/qbytearray.cpp:476:
  error: 'Z_BUF_ERROR' was not declared in this scope
../../corelib/tools/qbytearray.cpp:478:
  error: 'Z_OK' was not declared in this scope
make[3]: *** [.obj/release-shared-emb-avr32/qbytearray.o] Error 1

This problem occurs due to the build machine does not have a native zlib development library installed. This is solved by installing the development version of zlib for your distribution. Most Linux distribution names this package zlib<version>-dev.

lzo/lzo1x.h: No such file or directory

The user experiences that compiling software complains about missing file or directory. This happens because the build machine lacks the lzo2 library.The error message is something similar to:

compr_lzo.c:29:23: error: lzo/lzo1x.h: No such file or directory
compr_lzo.c: In function 'jffs2_lzo_cmpr':
compr_lzo.c:54: warning: implicit declaration of function 'lzo1x_999_compress'
compr_lzo.c:56: error: 'LZO_E_OK' undeclared (first use in this function)
compr_lzo.c:56: error: (Each undeclared identifier is reported only once
compr_lzo.c:56: error: for each function it appears in.)
compr_lzo.c: In function 'jffs2_lzo_decompress':
compr_lzo.c:74: warning: implicit declaration of function 'lzo1x_decompress_safe'
compr_lzo.c:76: error: 'LZO_E_OK' undeclared (first use in this function)
compr_lzo.c: In function 'jffs2_lzo_init':
( ... )

Solution is to delete the directory which holds the failing software, install liblzo2 development headers and libraries and build again.

If the user experiences the same problem again, contact the support line.

Undefined reference to `crc32_table'

The user experiences, when compiling mkfs.jffs2, that it fails with errors about undefined reference to crc32_table. The error message is something similar to:

mtd_orig/crc32.h:15: undefined reference to 'crc32_table'
mtd_orig/crc32.h:15: undefined reference to 'crc32_table'
mtd_orig/crc32.h:15: undefined reference to `crc32_table'
mtd_orig/crc32.h:15: undefined reference to `crc32_table'
mtd_orig/crc32.h:15: undefined reference to `crc32_table'
mkfs.jffs2.o: mtd_orig/crc32.h:15: more undefined references
              to `crc32_table' follow
mkfs.jffs2.o: In function `write_regular_file':

Solution is to delete the directory toolchain_build_avr32_nofpu/mtd_orig and type make to continue the build process.

If the user experiences the same problem again, contact the support line.

Error: invalid register list

The user experiences that compiling GCC fails due to invalid register list errors. This is due to GCC version 4.2 for AVR32 is not compilable by GCC version 4.3 on the host. The output when building is something similar to:

(...)
/tmp/ccLmOva9.s: Assembler messages:
/tmp/ccLmOva9.s:12: Error: invalid register list `,lr'
/tmp/ccLmOva9.s:22: Error: invalid register list `,pc'
/tmp/ccLmOva9.s:36: Error: invalid register list `,pc'
/tmp/ccLmOva9.s:54: Error: invalid register list `,lr'
/tmp/ccLmOva9.s:68: Error: invalid register list `,pc'
make[2]: *** [crtbegin.o] Error 1
make[2]: Leaving directory '/home/avr32/buildroot/toolchain_build_avr32/ \
		gcc-4.2.2-initial/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory '/home/avr32/buildroot/toolchain_build_avr32/ \
		gcc-4.2.2-initial'
make: *** [/home/avr32/buildroot/toolchain_build_avr32/gcc-4.2.2-initial/ \
		.compiled] Error 2

Solution is to replace the host GCC version 4.3 with version 4.2. Depending on your distribution this can be solved in many ways. A known hack to do this is to replace the symlinks to your compiler binaries in /usr/bin. Running the following commands works on Ubuntu:

sudo ln -sf /usr/bin/gcc-4.2 /usr/bin/gcc
sudo ln -sf /usr/bin/g++-4.2 /usr/bin/g++
sudo ln -sf /usr/bin/cpp-4.2 /usr/bin/cpp
sudo ln -sf /usr/bin/c++-4.2 /usr/bin/c++

Error compiling alsa-utils with ncurses

The user experiences that compiling alsa-utils which uses the ncurses library fails. The output when building is something similar to:

(...)
In file included from alsamixer.c:122:
/usr/include/ncurses/ncurses.h:58:33: error: ncurses/ncurses_dll.h: \
		No such file or directory
/usr/include/ncurses/ncurses.h:109:28: error: ncurses/unctrl.h: \
		No such file or directory
In file included from alsamixer.c:122:
/usr/include/ncurses/ncurses.h: In function 'NCURSES_EXPORT_VAR':
/usr/include/ncurses/ncurses.h:181: error: expected declaration \
		specifiers before 'COLORS'
(...)

Solution is to backport the ncurses Makefile in Buildroot from the upstream project. A patch for Buildroot for AVR32 v2.3.0 is available here. For older Buildroot releases a copy of the ncurses.mk file from upstream Buildroot might solve the problem.

footer