Exam zone
buildroot CS-423 Dick Steflik
buildroot • uClibc – C library for developing for embedded Linux – much smaller than GNU C
• tools to make a cross-compilation tool chain and root file system for embedded systems using the uClibc library • buildroot and uClibc are developed and supported by Erik Anderson (codepoet.org)
Architectures Supported • • • • • • • •
AVR32 Power PC MIPS ARM i386 Blackfin sparc alpha
Requirements • Linux – – – – – – – – – –
gcc g++ (for Qtopia) GNU make sed bison flex autoconf ncurses zlib libaci lzo
Steps • Download/unpack buildroot from Atmel (AVR32) – http://buildroot.uclibc.org (for other architectures)
• Atmel version includes setups for Atmel development boards and board specific setup.c files • Make sure your system has the required software packages or you’ll end up starting over several time until everything is in place.
First time… • go to the buildroot directory – make atngw100_defconfig – this downloads the boards default configuration – make source – this will download the files, you should now have everything you need to build the default file systems (root and user) • this step can take a couple of hours
– make – this will start the build process and may take a more than an hour.
more…. • To change the configuration use: make menuconfig – this will present you with a text based menu system to modify the configuration files for the build • name the project with something relavant
– upon exiting menuconfig your are ready to do a build • after the build the file systems will be in binaries/[project_name]/
Directories (before build) • • • • • • • •
Config.in/ .defconfig/ docs/ Makefile package/ target/ TODO tool/chain
Directories (after build) • 6 additional directories – binaries/ – build_avr32_nopfu/ – include/ – project_build_avr32_nopfu/ – src/ – toolchain_build_avr32_nopfu/
Binaries • atngw100-linux-kernel-[version] – the linux kernel you just built, also included in the rootfs
• rootfs-avr32-jffs2-root – rootfs targeted for jffs2 for flash (can also be targetted to ext2 for booting from MMC/SD card
• rootfs-avr32-jffs2-usr – the user file system in jffs2 format for flash
• u-boot.bin – u-boot binary, must be loaded via avr32programm/JTAGICE