====== Embedded linux components ====== * Toolchain * Boot loader * kernel * user space ====== Embedded linux tools ====== **U-Boot** - GPL boot loader **uClibc** is a small C standard library intended for embedded linux systems that was created to support uClinux, a version of linux that does not require an MMU. Currently, the kernel codebases for uClinux and linux are the same, having just different configurations (since the 2.6 Linux release). It is now supported by MontaVista, TimeSys and Windriver. A native uClibc toolchain can be built using the uClibc buildroot-based system (see [[http://free-electrons.com/docs/uclinux/]]). **[[http://linux.die.net/man/1/busybox|Busybox]]** is a userland software running on top of the linux kernel, that provides the usual set of Unix tools (sh, ls....). Its size is less than 500KB when compiled statically with uClibc. A cross-compiling toolchain for a specific architecture, like PowerPC or ARM, contains the following components: * GCC compiler * C libraries - glibc (1.7MB on ARM), uClibc (400kB on ARM), eglibc, dietlibc, newlibc, etc. It should be chosen at the toolchain generation time, as the GCC compiler has been compiled against a specific C library * an assembler * a linker/loader * associated binary utilities, binutils, which includes e.g. objdump and readelf * kernel header files (required for compilation of the C library as well as many applications) * a debugger, like gdb (equivalent to dbx in UNIX) (an useful tutorial is http://dirac.org/linux/gdb/) * trace tools like strace/ltrace libgcc is a low-level runtime library used by gcc-compiled code, e.g. to support complex arithmetic operations ===== Boot process ===== * https://www.0xkato.xyz/linux-boot/ ===== Cross-compiling toolchains ===== * Code Sourcery G++, which includes their modified GNU C and C++ compilers and the Eclipse IDE framework * DENX ELDK (U-Boot). They offer [[http://www.denx.de/wiki/Training2/GenericOverview|training]]. See their further reading [[http://www.denx.de/wiki/view/DULG/MoreInformationFurtherReading|list]]. * Free Electrons * CrossWorks for ARM (using the GNU gcc compiler) * SnapGear (using the GNU gcc compiler) * [[http://store.kagi.com/cgi-bin/store.cgi?storeID=6FFKK_LIVE&&|Code Red]] * Emdebian is Debian for embedded devices, providing different architectures: * arm, using old ABI, by default generates armv5t code, retired in favour of armel. * armel, new ARM EABI Little-endian, doesn't require an fpu, by default generates code for armv4t code. * armhf, makes use of fpu, needs at least ARMv7 CPU with Thumb-2. In practice armel will be used for older CPUs (armv4t, armv5, armv6), and armhf for newer CPUs (armv7+VFP). * (see also http://elinux.org/Toolchains) Other third party development tools (with their own compilers): * ARM RealView Development Suite, RVDS4 (RVCT tools, including armcc, the ARM compiler), succesor of the ARM Developer Suite (ADS) * Green Hills MULTI Integrated Development Environment * [[http://www.iar.com/website1/1.0.1.0/68/1/|IAR]] Embedded Workbench for ARM * Keil Development Studio 5 (DS-5), using a modified GNU gcc compiler * Keil [[http://www.mcu-related.com/the-news/1-latest-news/53-uvision4-by-keil|uVision]] (mdk-arm), supporting full simulation on the host computer We can build our own toolchain instead of using a third-party one, using tools like these: * [[http://crosstool-ng.org/|crosstool-ng]] * [[http://buildroot.uclibc.org/|Buildroot]] is a set of Makefiles and patches that make it easy to generate a cross-compilation toolchain and root filesystem for your target Linux system using the uClibc C library. Some instructions [[http://free-electrons.com/pub/conferences/2011/elce/using-buildroot-real-project.pdf|here]]. See http://autobuild.buildroot.org/. * [[http://www.pengutronix.de/software/ptxdist/index_en.html|PTXDist]] is a tool to create a Linux **root filesystem** (kernel, scripts, programs and libraries) for small/embedded computer systems. PTXDist provides a defined and repeatable way of building toolchains and root filesystems, consisting of open-source packages and user applications/libraries. In contrast to tools like OpenWrt or Buildroot, its principal library is glibc and not one of its lightweight counterparts like uclibc or dietlibc. * [[http://www.openembedded.org/index.php/Main_Page|Open Embedded]] is a software framework to create Linux distributions aimed at embedded devices. * Buildcross, used by emdebian The above tools also build the needed **root filesystem**, which can also be built manually with [[http://www.scratchbox.org/|Scratchbox]] (used by Nokia for its internet tablets). ===== Workstation emulators ===== [[http://wiki.qemu.org/Index.html|Qemu]] (supports x86, x86_64, ppc, arm, sparc, mips, m68k). User mode emulation on linux hosts (can run applications compiled for another CPU, e.g. we can run busybox compiled for ARM on a i386 linux host). ARM-specific emulators: * [[http://skyeye.sourceforge.net/index.shtml|Skyeye]] * [[http://softgun.sourceforge.net/|Softgun]] * [[http://www.cl.cam.ac.uk/~mwd24/phd/swarm.html|Swarm]] * [[http://www.slicer.ca/coldfire/|Coldfire]] ===== Flash utilities ===== * Flash Magic (Windows) * lpc21isp ===== Debugging ===== * OpenOCD * gdb/ddd ====== Embedded linux distributions ====== * [[http://www.yoctoproject.org/|Yocto]] is not a distribution per se, but provides templates and tools to create custom distributions. It uses Open Embedded. * Angstrom, using also the Open Embedded framework. ====== ELC2010 ====== Board bring up\\ http://www.embeddedlinuxconference.com/elc_europe10/sessions.html#Anders ====== ELC2011 ====== https://events.linuxfoundation.org/images/stories/pdf/lf_elc12_yau.pdf ====== Interesting links ====== podcast on embedded linux:\\ http://www.timesys.com/resources/podcast good embedded linux documents\\ http://free-electrons.com/docs