... 311 K25Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008Scratchbox featuresMain benefitsChrooted environment:you are still on the host, but you only see the target files.Transparent crosscompiling: the crosscompiler looks like a native one.Transparent execution: either through remote execution on the target. Or through CPU code emulation (qemu).Other featuresShips with crosscompiling toolchainsand software to create Debian packages.Supports both uClibc and glibc.Very basic root filesystems available.26Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008Toolchains useful resourceseLinux.org toolchain page:http://elinux.org/Tool_Chains27Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008Crosscompiling toolchains SummaryBuilding a toolchain by yourselfTough and very long to master.Readytouse toolchainsAvailable from several locations for most platforms.Tools to build toolchains: Buildroot and Crosstool.Make it easy to create a toolchain for your exact needs.Build systems: Scratchbox, OpenEmbedded (see annex section)Help you to create and populate root filesystem.28Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008Practical lab – Using buildrootTime to start Lab 1!Configure buildrootRun it to build your own crosscompiling toolchain29Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008Free Software tools for embedded systems GNU / Linux workstationEmulators3Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008Best viewed with ... 1Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008Free Software tools for embedded systems Free Software tools for embedded systems Thomas Petazzoni / Michael OpdenackerFree Electronshttp://freeelectrons.com/Created with OpenOffice.org 2 .x 24Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008Scratchboxhttp://scratchbox.org/ A crosscompiling toolkit projectMakes it easier to crosscompilea complete embedded Linux system.Works by allowing tools to be crosscompiled in a transparent way, making building tools believe they are doing a native compile job.Supported platforms: arm, x8 6Uses the qemu emulator to transparently run built arm binaries.Experimental support for ppc, mips and cris.10Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008Honey, I shrunk the programs!C program ... This document is best viewed with a recent PDF readeror with OpenOffice.org itself!Take advantage of internal or external hyperlinks.So, don’t hesitate to click on them!Find pages quickly thanks to automatic searchUse thumbnails to navigate in the document in a quick wayIf you’re reading a paper or HTML copy, you should get your copy in PDF or OpenOffice.org format on http://freeelectrons.com/training/devtools!30Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008qemuhttp://fabrice.bellard.free.fr/qemu/Fast processor emulatorusing a portable dynamic translator.Full system emulationEmulates the processor and various peripheralsSupported: x8 6, x8 6_64, ppc, arm, sparc, mips, m68kTo know which machine types are supported:qemusystemarm M ?i386, x8 6_64 system emulation: now close to native speedsthanks to the kqemu kernel module (now GPL v2!).31Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008qemu user emulationUser emulation(Linux host only)User mode emulation : can run applications compiled for another CPU. Supported: x8 6, ppc, arm, sparc, mips, m68kEasy to run BusyBox for arm on i386 GNU / Linux:qemuarm L /usr/local/arm/3.3.2 \/home/bart/arm/busybox1.4.1/busybox lsL: target C library binaries path (here crosscompiler toolchain path)32Free Software tools for embedded systems © Copyright 20042008, Free ElectronsCreative Commons AttributionShareAlike 2.5 licensehttp://freeelectrons.comJan 24, 2008ARM emulatorsOnly Free Software, of course!SkyEye: http://skyeye.sourceforge.netEmulates several ARM platforms (AT91, Xscale...