SlideShare a Scribd company logo
Team Emertxe
Toolchain
Toolchain
Contents
Toolchain
Contents
● Introduction
● Components
● Building
Toolchain
Introduction
Toolchain
Introduction
● Set of applications used to perform a complex task or to
create a product, which is typically another computer program
or a system of programs.
● Tools are linked (or chained) together by specific stages
● Output or resulting environment state of each tool becomes
the input or starting environment for the next one
● By default the host contains some development tools which
ate called as native toolchain
Toolchain
Introduction
● When you use these tool the code generation would be
for native architecture (say x86)
● In case of developing embedded systems these toolchains
does not serve the purpose
● The targets some times might have the following
restrictions too!
– Less memory footprints
– Slow compared to host
– You may not wish to have in a developed system finally
● So cross compiling toolchain are used
Toolchain
Introduction - Flow
Native
Tools
Cross Compiling
Tools
Toolchain
Components
Toolchain
Components
Compiler
Binary Utilities
C / C++ Libraries
Kernel Headers
Debuggers
Toolchain
Components – GCC
● Abbreviated as GNU Compiler Collection, one of the
famous free software compiler
● Can compile many programming languages and generate
code for many different types of architecture
Toolchain
Components – Binary Utilities
● Set of programming tools for creating and managing
binary programs, object files, libraries, profile data, and
assembly source code
● Includes an assembler, linker and several other software
tools
● Often used with a compiler and libraries to design
programs for Linux
● GNU Binary Utilities are called binutils
Toolchain
Components – binutils
● as - the assembler, that generates binary code from
assembler source code
● ld - the linker
● ar, ranlib - to generate .a archives, used for libraries
● objdump, readelf, size, nm, strings - to inspect binaries.
Very useful analysis tools !
● strip - to strip useless parts of binaries in order to reduce
their size
Toolchain
Components - Libraries
● The C library is an essential
component which provides
interface between the
applications and the kernel
● Provides macros, type
definitions, and functions for
tasks like string handling,
mathematical computations,
input/output processing,
memory allocation and
several other operating
system services
Toolchain
Components - Libraries
● Several C libraries are available: glibc, uClibc, dietlibc,
etc
● The selection of the library has to be made while
generation the toolchain as gcc is compiled against the
selected library
● Some common used libraries
– glibc
– uclibc
Toolchain
Components – Libraries - glibc
● C library from the GNU project
● Good performance optimization, standards compliance
and portability
● Well maintained and used on all GNU / Linux host systems
● Require large memory footprint making it not suitable for
small embedded systems
● Used in systems that run many different kernels and
different hardware architectures
● License: LGPL
● Website: http://www.gnu.org/software/libc/
Toolchain
Components – Libraries - uclibc
●
Smaller than the GNU C Library, but nearly all applications
supported by glibc also work perfectly with uClibc
●
Recommended for lower footprint embedded systems
●
Excellent configuration options at the cost of ABI
differences for different configurations
●
Features can be enabled or disabled according to space
requirements
●
Works on most embedded architectures with embedded
Linux
●
Focus on size rather than performance with less compile
time
Toolchain
Components – Libraries - uclibc
Toolchain
Components – Libraries - uclibc
● Created for support uclinux, a Linux for MMU less system
● Actively maintained, large developer and user base
● Used on a large number of production embedded
products, including consumer electronic devices
Toolchain
Components – Kernel Headers
● The compiled applications and
the libraries sometimes need to
interact with the kernel
● So the Linux kernel need to
expose the available interfaces
for the libraries and applications
to use, like
– System calls and its numbers
– MACRO definitions
– Data structures, etc.
Toolchain
Components – Kernel Headers
● Therefore, compiling the C library requires kernel
headers, and many applications also require them.
● You may find these in <linux/...> and <asm/...> and a
few other directories corresponding to the ones visible in
include/ in the kernel sources
● Compatibility with running kernel has to be considered
Toolchain
Building
Toolchain
Building
● Toolchain building is one of the time consuming process
● A very clear picture of the system architecture is
sometimes required
● We might have to identify three systems in this case, like
– Build System – which is used to create the toolchain
– Host – which will be used to execute the created toolchain
– Target – which will execute the binaries created by the
toolchain
● So by considering the above points some possible build
options are provided in next slide
Toolchain
Building
● Possible Build System
● Build Considerations
● Toolchain Build Possibilities
– Prebuilt
– Home Built
– Automated Tools
● Crosstool NG
● Buildroot
Toolchain
Building – Build Systems
Native Build Cross Build
Canadian BuildCross Native Build
Toolchain
Building - Considerations
● Before building the toolchain following decisions have to
be made
– Which library to be used?
– What version of the components to selected?
– Certain important configurations like
● Architecture features like floating point
● ABI selections
● Networking features etc.,
● So you might have to put good amount of time in
investigations
Toolchain
Building – Pre-built
● Get a pre-built open toolchain either from a web or from your
hardware vendor
● This is the easiest solution, as the toolchain is already built,
and has supposedly been tested by the vendor
● The drawback is that you don't have flexibility on your
toolchain features (which C library? hard-float or soft-float?
which ABI?)
Toolchain
Building – Home Built
●
Building toolchain from scratch is one of the tiring and time
consuming task which might go upto several weeks.
●
Several information to be know. Lots of components to be
considered to build.
●
Proper decision on the components and its configuration
have to be made
●
Need kernel headers and C library sources
●
There are version dependency issues, patches required to
make something work etc.
●
The order of build is to be known, but have complete
freedom of choice
Toolchain
Building – Home Built
● Can get some idea from the crosstool matrix by Kegel (Note
this is outdated)
Toolchain
Building – Automated Tools
● Lots of open community has built several scripts or more
elaborate systems to ease the process of building a
toolchain
● More easy procedure since no need of breaking your
heads on dependency resolutions
● Provides easy configuration mechanism
● Recipes and patches needed to build a toolchain made of
particular versions of the various components are shared
and easily available
● Some common automated tools are discussed in following
slides
Toolchain
Building – Automated Tools – Crosstool-NG
● Updated version of Crosstool, with a kernel-like
menuconfig like configuration system
● Supports uClibc, glibc, eglibc, hard and soft float, many
architectures
● Support different target OS: Linux, bare metal
● Debug facilities like native and cross gdb, gdb server
● Actively maintained
● Targeted at building toolchains
● http://crosstool-ng.org/
Toolchain
Building – Automated Tools – Buildroot
● Buildroot is a set of Makefiles and patches that makes it
easy to generate a complete embedded Linux system
● Generates root file system images ready to be used
● Complete build system based on the Linux Kernel
configuration system and supports a wide range of target
architectures
● It automates the building process of your embedded
system and eases the cross-compilation process
● Supports multiple filesystem types for the root
filesystem image
Toolchain
Building – Automated Tools – Buildroot
● Can generate an (e)glibc or uClibc cross-compilation
toolchain, or re-use your existing glibc, eglibc or uClibc
cross-compilation toolchain
● Supports several hundreds of packages for userspace
applications and libraries
● http://buildroot.uclibc.org
Thank You

More Related Content

What's hot

Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
Module 4 Embedded Linux
Module 4 Embedded LinuxModule 4 Embedded Linux
Module 4 Embedded LinuxTushar B Kute
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in EnglishOtavio Salvador
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectYen-Chin Lee
 
Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yoctoAlex Gonzalez
 
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdateAngelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdatelinuxlab_conf
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel SourceMotaz Saad
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal BootloaderSatpal Parmar
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/CoreShay Cohen
 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driverVandana Salve
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded trainingH Ming
 

What's hot (20)

Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Module 4 Embedded Linux
Module 4 Embedded LinuxModule 4 Embedded Linux
Module 4 Embedded Linux
 
Yocto: Training in English
Yocto: Training in EnglishYocto: Training in English
Yocto: Training in English
 
Linux Internals - Part III
Linux Internals - Part IIILinux Internals - Part III
Linux Internals - Part III
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yocto
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
A practical guide to buildroot
A practical guide to buildrootA practical guide to buildroot
A practical guide to buildroot
 
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdateAngelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
 
File systems for Embedded Linux
File systems for Embedded LinuxFile systems for Embedded Linux
File systems for Embedded Linux
 
Embedded Operating System - Linux
Embedded Operating System - LinuxEmbedded Operating System - Linux
Embedded Operating System - Linux
 
Browsing Linux Kernel Source
Browsing Linux Kernel SourceBrowsing Linux Kernel Source
Browsing Linux Kernel Source
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
Linux Programming
Linux ProgrammingLinux Programming
Linux Programming
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driver
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
 

Viewers also liked

Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design processRayees CK
 
Embedded System Tools ppt
Embedded System Tools  pptEmbedded System Tools  ppt
Embedded System Tools pptHalai Hansika
 

Viewers also liked (20)

Communication Protocols (UART, SPI,I2C)
Communication Protocols (UART, SPI,I2C)Communication Protocols (UART, SPI,I2C)
Communication Protocols (UART, SPI,I2C)
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Interview preparation workshop
Interview preparation workshopInterview preparation workshop
Interview preparation workshop
 
Embedded Android : System Development - Part III
Embedded Android : System Development - Part IIIEmbedded Android : System Development - Part III
Embedded Android : System Development - Part III
 
Embedded Android : System Development - Part IV
Embedded Android : System Development - Part IVEmbedded Android : System Development - Part IV
Embedded Android : System Development - Part IV
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
 
Embedded C - Optimization techniques
Embedded C - Optimization techniquesEmbedded C - Optimization techniques
Embedded C - Optimization techniques
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Getting started with BeagleBone Black - Embedded Linux
Getting started with BeagleBone Black - Embedded LinuxGetting started with BeagleBone Black - Embedded Linux
Getting started with BeagleBone Black - Embedded Linux
 
Linux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platformLinux systems - Getting started with setting up and embedded platform
Linux systems - Getting started with setting up and embedded platform
 
Data Structures & Algorithm design using C
Data Structures & Algorithm design using C Data Structures & Algorithm design using C
Data Structures & Algorithm design using C
 
Emertxe : Linux training portfolio
Emertxe : Linux training portfolioEmertxe : Linux training portfolio
Emertxe : Linux training portfolio
 
Resume Preparation - Workshop
Resume Preparation - WorkshopResume Preparation - Workshop
Resume Preparation - Workshop
 
Emertxe : Training portfolio
Emertxe : Training portfolioEmertxe : Training portfolio
Emertxe : Training portfolio
 
Introduction to Embedded Systems
Introduction to Embedded Systems Introduction to Embedded Systems
Introduction to Embedded Systems
 
Embedded C
Embedded CEmbedded C
Embedded C
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Emertxe Certified Embedded Professional (ECEP): Assessment system
Emertxe Certified Embedded Professional (ECEP): Assessment systemEmertxe Certified Embedded Professional (ECEP): Assessment system
Emertxe Certified Embedded Professional (ECEP): Assessment system
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
 
Embedded System Tools ppt
Embedded System Tools  pptEmbedded System Tools  ppt
Embedded System Tools ppt
 

Similar to Embedded Linux - Building toolchain

EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...melbats
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
Embedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxEmbedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxlematadese670
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoSherif Mousa
 
Embedded platform choices
Embedded platform choicesEmbedded platform choices
Embedded platform choicesTavish Naruka
 
Guided overview of software frameworks qt framework
Guided overview of software frameworks   qt frameworkGuided overview of software frameworks   qt framework
Guided overview of software frameworks qt frameworkBenjamin Cottrell
 
Top 10 dev ops tools (1)
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)yalini97
 
Don't Fear the Autotools
Don't Fear the AutotoolsDon't Fear the Autotools
Don't Fear the AutotoolsScott Garman
 
Crafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/SourceCrafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/SourceSourabh Singh Tomar
 
Embedded Linux primer
Embedded Linux primerEmbedded Linux primer
Embedded Linux primerDrew Fustini
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterHossam Hassan
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftYaniv cohen
 
embedded-linux-120203.pdf
embedded-linux-120203.pdfembedded-linux-120203.pdf
embedded-linux-120203.pdftwtester
 
MariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introductionMariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introductionMariaDB plc
 
Bba i-introduction to computer-u-2- application and system software
Bba  i-introduction to computer-u-2- application and system softwareBba  i-introduction to computer-u-2- application and system software
Bba i-introduction to computer-u-2- application and system softwareRai University
 
LCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at LinaroLCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at LinaroLinaro
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...Linaro
 

Similar to Embedded Linux - Building toolchain (20)

Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
 
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
EclipseCon Eu 2012 - Buildroot Eclipse Bundle : A powerful IDE for Embedded L...
 
JOSA TechTalks - Docker in Production
JOSA TechTalks - Docker in ProductionJOSA TechTalks - Docker in Production
JOSA TechTalks - Docker in Production
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Embedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxEmbedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptx
 
Intro to linux
Intro to linux Intro to linux
Intro to linux
 
Embedded Linux from Scratch to Yocto
Embedded Linux from Scratch to YoctoEmbedded Linux from Scratch to Yocto
Embedded Linux from Scratch to Yocto
 
Embedded platform choices
Embedded platform choicesEmbedded platform choices
Embedded platform choices
 
Guided overview of software frameworks qt framework
Guided overview of software frameworks   qt frameworkGuided overview of software frameworks   qt framework
Guided overview of software frameworks qt framework
 
Top 10 dev ops tools (1)
Top 10 dev ops tools (1)Top 10 dev ops tools (1)
Top 10 dev ops tools (1)
 
Don't Fear the Autotools
Don't Fear the AutotoolsDon't Fear the Autotools
Don't Fear the Autotools
 
Crafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/SourceCrafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/Source
 
Embedded Linux primer
Embedded Linux primerEmbedded Linux primer
Embedded Linux primer
 
Embedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals masterEmbedded c c++ programming fundamentals master
Embedded c c++ programming fundamentals master
 
Devops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShiftDevops with Python by Yaniv Cohen DevopShift
Devops with Python by Yaniv Cohen DevopShift
 
embedded-linux-120203.pdf
embedded-linux-120203.pdfembedded-linux-120203.pdf
embedded-linux-120203.pdf
 
MariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introductionMariaDB Enterprise Tools introduction
MariaDB Enterprise Tools introduction
 
Bba i-introduction to computer-u-2- application and system software
Bba  i-introduction to computer-u-2- application and system softwareBba  i-introduction to computer-u-2- application and system software
Bba i-introduction to computer-u-2- application and system software
 
LCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at LinaroLCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at Linaro
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
 

More from Emertxe Information Technologies Pvt Ltd

More from Emertxe Information Technologies Pvt Ltd (20)

premium post (1).pdf
premium post (1).pdfpremium post (1).pdf
premium post (1).pdf
 
Career Transition (1).pdf
Career Transition (1).pdfCareer Transition (1).pdf
Career Transition (1).pdf
 
10_isxdigit.pdf
10_isxdigit.pdf10_isxdigit.pdf
10_isxdigit.pdf
 
01_student_record.pdf
01_student_record.pdf01_student_record.pdf
01_student_record.pdf
 
02_swap.pdf
02_swap.pdf02_swap.pdf
02_swap.pdf
 
01_sizeof.pdf
01_sizeof.pdf01_sizeof.pdf
01_sizeof.pdf
 
07_product_matrix.pdf
07_product_matrix.pdf07_product_matrix.pdf
07_product_matrix.pdf
 
06_sort_names.pdf
06_sort_names.pdf06_sort_names.pdf
06_sort_names.pdf
 
05_fragments.pdf
05_fragments.pdf05_fragments.pdf
05_fragments.pdf
 
04_magic_square.pdf
04_magic_square.pdf04_magic_square.pdf
04_magic_square.pdf
 
03_endianess.pdf
03_endianess.pdf03_endianess.pdf
03_endianess.pdf
 
02_variance.pdf
02_variance.pdf02_variance.pdf
02_variance.pdf
 
01_memory_manager.pdf
01_memory_manager.pdf01_memory_manager.pdf
01_memory_manager.pdf
 
09_nrps.pdf
09_nrps.pdf09_nrps.pdf
09_nrps.pdf
 
11_pangram.pdf
11_pangram.pdf11_pangram.pdf
11_pangram.pdf
 
10_combinations.pdf
10_combinations.pdf10_combinations.pdf
10_combinations.pdf
 
08_squeeze.pdf
08_squeeze.pdf08_squeeze.pdf
08_squeeze.pdf
 
07_strtok.pdf
07_strtok.pdf07_strtok.pdf
07_strtok.pdf
 
06_reverserec.pdf
06_reverserec.pdf06_reverserec.pdf
06_reverserec.pdf
 
05_reverseiter.pdf
05_reverseiter.pdf05_reverseiter.pdf
05_reverseiter.pdf
 

Recently uploaded

Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationZilliz
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2DianaGray10
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...Product School
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...Product School
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀DianaGray10
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekCzechDreamin
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Product School
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...CzechDreamin
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIES VE
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutesconfluent
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsExpeed Software
 

Recently uploaded (20)

Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 

Embedded Linux - Building toolchain

  • 5. Toolchain Introduction ● Set of applications used to perform a complex task or to create a product, which is typically another computer program or a system of programs. ● Tools are linked (or chained) together by specific stages ● Output or resulting environment state of each tool becomes the input or starting environment for the next one ● By default the host contains some development tools which ate called as native toolchain
  • 6. Toolchain Introduction ● When you use these tool the code generation would be for native architecture (say x86) ● In case of developing embedded systems these toolchains does not serve the purpose ● The targets some times might have the following restrictions too! – Less memory footprints – Slow compared to host – You may not wish to have in a developed system finally ● So cross compiling toolchain are used
  • 9. Toolchain Components Compiler Binary Utilities C / C++ Libraries Kernel Headers Debuggers
  • 10. Toolchain Components – GCC ● Abbreviated as GNU Compiler Collection, one of the famous free software compiler ● Can compile many programming languages and generate code for many different types of architecture
  • 11. Toolchain Components – Binary Utilities ● Set of programming tools for creating and managing binary programs, object files, libraries, profile data, and assembly source code ● Includes an assembler, linker and several other software tools ● Often used with a compiler and libraries to design programs for Linux ● GNU Binary Utilities are called binutils
  • 12. Toolchain Components – binutils ● as - the assembler, that generates binary code from assembler source code ● ld - the linker ● ar, ranlib - to generate .a archives, used for libraries ● objdump, readelf, size, nm, strings - to inspect binaries. Very useful analysis tools ! ● strip - to strip useless parts of binaries in order to reduce their size
  • 13. Toolchain Components - Libraries ● The C library is an essential component which provides interface between the applications and the kernel ● Provides macros, type definitions, and functions for tasks like string handling, mathematical computations, input/output processing, memory allocation and several other operating system services
  • 14. Toolchain Components - Libraries ● Several C libraries are available: glibc, uClibc, dietlibc, etc ● The selection of the library has to be made while generation the toolchain as gcc is compiled against the selected library ● Some common used libraries – glibc – uclibc
  • 15. Toolchain Components – Libraries - glibc ● C library from the GNU project ● Good performance optimization, standards compliance and portability ● Well maintained and used on all GNU / Linux host systems ● Require large memory footprint making it not suitable for small embedded systems ● Used in systems that run many different kernels and different hardware architectures ● License: LGPL ● Website: http://www.gnu.org/software/libc/
  • 16. Toolchain Components – Libraries - uclibc ● Smaller than the GNU C Library, but nearly all applications supported by glibc also work perfectly with uClibc ● Recommended for lower footprint embedded systems ● Excellent configuration options at the cost of ABI differences for different configurations ● Features can be enabled or disabled according to space requirements ● Works on most embedded architectures with embedded Linux ● Focus on size rather than performance with less compile time
  • 18. Toolchain Components – Libraries - uclibc ● Created for support uclinux, a Linux for MMU less system ● Actively maintained, large developer and user base ● Used on a large number of production embedded products, including consumer electronic devices
  • 19. Toolchain Components – Kernel Headers ● The compiled applications and the libraries sometimes need to interact with the kernel ● So the Linux kernel need to expose the available interfaces for the libraries and applications to use, like – System calls and its numbers – MACRO definitions – Data structures, etc.
  • 20. Toolchain Components – Kernel Headers ● Therefore, compiling the C library requires kernel headers, and many applications also require them. ● You may find these in <linux/...> and <asm/...> and a few other directories corresponding to the ones visible in include/ in the kernel sources ● Compatibility with running kernel has to be considered
  • 22. Toolchain Building ● Toolchain building is one of the time consuming process ● A very clear picture of the system architecture is sometimes required ● We might have to identify three systems in this case, like – Build System – which is used to create the toolchain – Host – which will be used to execute the created toolchain – Target – which will execute the binaries created by the toolchain ● So by considering the above points some possible build options are provided in next slide
  • 23. Toolchain Building ● Possible Build System ● Build Considerations ● Toolchain Build Possibilities – Prebuilt – Home Built – Automated Tools ● Crosstool NG ● Buildroot
  • 24. Toolchain Building – Build Systems Native Build Cross Build Canadian BuildCross Native Build
  • 25. Toolchain Building - Considerations ● Before building the toolchain following decisions have to be made – Which library to be used? – What version of the components to selected? – Certain important configurations like ● Architecture features like floating point ● ABI selections ● Networking features etc., ● So you might have to put good amount of time in investigations
  • 26. Toolchain Building – Pre-built ● Get a pre-built open toolchain either from a web or from your hardware vendor ● This is the easiest solution, as the toolchain is already built, and has supposedly been tested by the vendor ● The drawback is that you don't have flexibility on your toolchain features (which C library? hard-float or soft-float? which ABI?)
  • 27. Toolchain Building – Home Built ● Building toolchain from scratch is one of the tiring and time consuming task which might go upto several weeks. ● Several information to be know. Lots of components to be considered to build. ● Proper decision on the components and its configuration have to be made ● Need kernel headers and C library sources ● There are version dependency issues, patches required to make something work etc. ● The order of build is to be known, but have complete freedom of choice
  • 28. Toolchain Building – Home Built ● Can get some idea from the crosstool matrix by Kegel (Note this is outdated)
  • 29. Toolchain Building – Automated Tools ● Lots of open community has built several scripts or more elaborate systems to ease the process of building a toolchain ● More easy procedure since no need of breaking your heads on dependency resolutions ● Provides easy configuration mechanism ● Recipes and patches needed to build a toolchain made of particular versions of the various components are shared and easily available ● Some common automated tools are discussed in following slides
  • 30. Toolchain Building – Automated Tools – Crosstool-NG ● Updated version of Crosstool, with a kernel-like menuconfig like configuration system ● Supports uClibc, glibc, eglibc, hard and soft float, many architectures ● Support different target OS: Linux, bare metal ● Debug facilities like native and cross gdb, gdb server ● Actively maintained ● Targeted at building toolchains ● http://crosstool-ng.org/
  • 31. Toolchain Building – Automated Tools – Buildroot ● Buildroot is a set of Makefiles and patches that makes it easy to generate a complete embedded Linux system ● Generates root file system images ready to be used ● Complete build system based on the Linux Kernel configuration system and supports a wide range of target architectures ● It automates the building process of your embedded system and eases the cross-compilation process ● Supports multiple filesystem types for the root filesystem image
  • 32. Toolchain Building – Automated Tools – Buildroot ● Can generate an (e)glibc or uClibc cross-compilation toolchain, or re-use your existing glibc, eglibc or uClibc cross-compilation toolchain ● Supports several hundreds of packages for userspace applications and libraries ● http://buildroot.uclibc.org