SlideShare une entreprise Scribd logo
1  sur  14
Embedded Linux Crash Course

               Eric Gustafson



  http://embedded.gustafson-consulting.com


      ericg@gustafson-consulting.com
Agenda
●   What is “Embedded”?

●   Example Walk Through
●   Why Linux as an embedded platform?
●   References
    –   Convention: colored names have a reference in the references.
What is Embedded?
●   Embedded is a very nebulous term.
●   My Definition: NOT a General Purpose Computer
●   Some Linux Examples:


    ●   TiVo                        ●   PrismIQ
    ●   Google Phone (Android)      ●   RioReceiver
    ●   Home Routers                ●   Soekris
        –   ActionTec (Qwest DSL)   ●   An Old PC
Target System

                “Application”


                                     BusyBox
    C Library (uClibc)          (system programs)



Linux Kernel             Boot   syslinux (on disk)
                                 BIOS (firmware)
    Hardware – Intel x86 / PC Architecture
System Boot
1. Hardware Reset → Bootloader
  ●   BIOS Executes → syslinux (i.e. DOS format floppy/CF)
  ●   syslinux → loads the Linux Kernel

2. Linux Kernel initializes
  ●   Kernel mounts initrd.gz, the “root” filesystem.

3. Kernel → /sbin/init (from BusyBox)
4. init → /etc/rc (sh script – developer provided)
5. rc script → “Application”
The Build Artifacts
          – What makes up our system –
●   Hardware – provided
●   BIOS – provided
●   syslinux – {download, precompiled}
●   Linux Kernel – BUILD
●   µclibc (C Library) - BUILD
●   BusyBox (core programs) – BUILD
●   “Application” – BUILD
Cross Compiler Tool Chain
                – How to build the Artifacts –

●   Cross Compilation
    –   Gnu Binutils
         ●   Assembler, linker, etc.
    –   Gnu C Compiler
    –   C Library – uClibc
         ●   Others: Newlib, Gnu C Library
    –   Linux Kernel – just the headers
●   Packaging
     – initrd.gz – cramfs tools
        ● Alternatives: ext2fs, jffs2, many others
End to End Build
             – Getting our hands a little dirty –

●   Buildroot
         ●   http://buildroot.uclibc.org
    –   Menu based configuration
    –   Many options for configuration and architecture
    –   Does everything
         ●   builds cross compiler tool chain
         ●   compiles kernel, C library (μClibc), BusyBox
         ●   packages root filesystem image
    –   Leaves all artifacts, and configuration, in place.
    –   Buildroot is an excellent place to start.
From Scratch
             – Getting our hands really dirty –

●   Build Cross Development Tools
    –   Build Binutils
    –   Install Linux Kernel Headers
    –   Build gcc-initial (no C Library dependencies)
    –   Build C library (μClibc)
    –   Build gcc-final (which uses the C library)
●   X-Compile Target Artifacts
    –   Configure & Compile Linux Kernel → bzImage (the Kernel)
    –   Configure & Compile BusyBox
    –   Compile “Application”
From Scratch (2)
              – Getting our hands really dirty –
●   Package Root Filesystem
    –   Make a temp directory to act as “/”, call it “root_dir”
    –   Place BusyBox, μClibc, and “Application” in directory “root_dir” using a typical root layout.
    –   mkfs -t cramfs root_dir initrd
    –   gzip -9 initrd → “initrd.gz”, the initrd image
●   Place Artifacts on boot media.
    –   Create a DOS format floppy (or CF card)
    –   syslinux /dev/fd0 # only needed the first time
    –   Mount /dev/fd0
          ● Create and copy syslinux.cfg to /dev/fd0
               – This is a small config file w/ kernel boot arguments
          ● Copy kernel, bzImage, to /dev/fd0
          ● Copy the root filesystem, initrd.gz, to /dev/fd0
Why Linux?
●   Open Source
         ●   Modifications are common, and easy.
         ●   Entire tool chain is freely available – low cost to entry.
●   The Kernel has LOTS of configurable
    drivers.
    –   Common embedded chipset support.
    –   Theres more than just chipset support though.
         ●   File systems, network protocols, and lots more.
●   Momentum – Linux's success is feeding on itself.
References
●   Compiler Tools                         ●   C Libraries
–   GNU Binutils -                         –   μClibc - http://uclibc.org/
    http://www.gnu.org/software/binutils   –   Newlib -
–   GNU C Compiler -                           http://sourceware.org/newlib/
    http://gcc.gnu.org                     –   Gnu C Library -
●   GCC requires GMP and MPFR                  http://www.gnu.org/software/libc/
–   GMP - http://gmplib.org/
–   MPFR - http://www.mpfr.org/
●   Linux Kernel
     –   http://www.kernel.org/
     –   http://www.linuxdocs.org/
         HOWTOs/Kernel-HOWTO.html
References
●   Boot loaders                          ●   File system creation
–   syslinux -                            –   cramfs -
    http://syslinux.zytor.com/wiki/           http://sourceforge.net/projects/cramfs/
    ● pxelinux – Ethernet Boot            –   JFFS2 -
    ● isolinux – CD Boot                      http://sourceware.org/jffs2/
–   GRUB -                                –   Ext2fs -
                                              http://e2fsprogs.sourceforge.net/ext2.html
    http://www.gnu.org/software/grub/
–   LILO
    ●   http://lilo.go.dyndns.org/
    ●   http://tldp.org/HOWTO/LILO.html
References
●   Cross Dev Systems                 ●   Embedded Linux Howto
–   Buildroot -                       –   http://linuxant.hit.bg/Embedded-
    http://buildroot.uclibc.org/          Linux-Howto.html
–   crosstools -
    http://www.kegel.com/crosstool/

Contenu connexe

Tendances

Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesWilliam Lee
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo家榮 吳
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchlinuxlab_conf
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCapWilliam Lee
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 William Lee
 
2 docker engine_hands_on
2 docker engine_hands_on2 docker engine_hands_on
2 docker engine_hands_onFEG
 
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
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxWilliam Lee
 
Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHPWilliam Lee
 
Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3William Lee
 
SaltStack – (Not) just another Automation & Remote Execution Tool
SaltStack – (Not) just another Automation & Remote Execution ToolSaltStack – (Not) just another Automation & Remote Execution Tool
SaltStack – (Not) just another Automation & Remote Execution Toolinovex GmbH
 
[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선ethconkr
 
Steam Learn: Composer
Steam Learn: ComposerSteam Learn: Composer
Steam Learn: Composerinovia
 
9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linuxchinkshady
 

Tendances (20)

Light my-fuse
Light my-fuseLight my-fuse
Light my-fuse
 
Usage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP LanguagesUsage Note of Apache Thrift for C++ Java PHP Languages
Usage Note of Apache Thrift for C++ Java PHP Languages
 
OpenWRT guide and memo
OpenWRT guide and memoOpenWRT guide and memo
OpenWRT guide and memo
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratch
 
Usage Note of PlayCap
Usage Note of PlayCapUsage Note of PlayCap
Usage Note of PlayCap
 
NetBSDworkshop
NetBSDworkshopNetBSDworkshop
NetBSDworkshop
 
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5 Upgrade GCC & Install Qt 5.4 on CentOS 6.5
Upgrade GCC & Install Qt 5.4 on CentOS 6.5
 
2 docker engine_hands_on
2 docker engine_hands_on2 docker engine_hands_on
2 docker engine_hands_on
 
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
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on Linux
 
Usage Note of SWIG for PHP
Usage Note of SWIG for PHPUsage Note of SWIG for PHP
Usage Note of SWIG for PHP
 
Building Embedded Linux UDOONEO
Building Embedded Linux UDOONEOBuilding Embedded Linux UDOONEO
Building Embedded Linux UDOONEO
 
Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3Usage Notes of The Bro 2.2 / 2.3
Usage Notes of The Bro 2.2 / 2.3
 
SaltStack – (Not) just another Automation & Remote Execution Tool
SaltStack – (Not) just another Automation & Remote Execution ToolSaltStack – (Not) just another Automation & Remote Execution Tool
SaltStack – (Not) just another Automation & Remote Execution Tool
 
NetBSD workshop
NetBSD workshopNetBSD workshop
NetBSD workshop
 
FreeBSD hosting
FreeBSD hostingFreeBSD hosting
FreeBSD hosting
 
[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선[ETHCon Korea 2019] Shin mansun 신만선
[ETHCon Korea 2019] Shin mansun 신만선
 
Steam Learn: Composer
Steam Learn: ComposerSteam Learn: Composer
Steam Learn: Composer
 
CoreOS Overview
CoreOS OverviewCoreOS Overview
CoreOS Overview
 
9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux
 

En vedette

Ajax On S2 Odp
Ajax On S2 OdpAjax On S2 Odp
Ajax On S2 Odpghessler
 
openHAB @ Eclipse DemoCamp Darmstadt
openHAB @ Eclipse DemoCamp DarmstadtopenHAB @ Eclipse DemoCamp Darmstadt
openHAB @ Eclipse DemoCamp DarmstadtKai Kreuzer
 
openHAB @ Devoxx 2012
openHAB @ Devoxx 2012openHAB @ Devoxx 2012
openHAB @ Devoxx 2012Kai Kreuzer
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BJingfeng Liu
 
Home Automation with LinkSprite IO
Home Automation with LinkSprite IOHome Automation with LinkSprite IO
Home Automation with LinkSprite IOJingfeng Liu
 
Board support package_on_linux
Board support package_on_linuxBoard support package_on_linux
Board support package_on_linuxVandana Salve
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systemsVandana Salve
 
Build your own block chain
Build your own block chainBuild your own block chain
Build your own block chainBohdan Szymanik
 
Practical Applications of Block Chain Technologies
Practical Applications of Block Chain Technologies Practical Applications of Block Chain Technologies
Practical Applications of Block Chain Technologies Priyanka Aash
 
Zigbee network
Zigbee networkZigbee network
Zigbee networkbhavithd
 
Zigbee technology ppt edited
Zigbee technology ppt editedZigbee technology ppt edited
Zigbee technology ppt editedrakeshkumarchary
 

En vedette (16)

Ajax On S2 Odp
Ajax On S2 OdpAjax On S2 Odp
Ajax On S2 Odp
 
openHAB @ Eclipse DemoCamp Darmstadt
openHAB @ Eclipse DemoCamp DarmstadtopenHAB @ Eclipse DemoCamp Darmstadt
openHAB @ Eclipse DemoCamp Darmstadt
 
openHAB @ Devoxx 2012
openHAB @ Devoxx 2012openHAB @ Devoxx 2012
openHAB @ Devoxx 2012
 
IoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3BIoT with openHAB on pcDuino3B
IoT with openHAB on pcDuino3B
 
Home Automation with LinkSprite IO
Home Automation with LinkSprite IOHome Automation with LinkSprite IO
Home Automation with LinkSprite IO
 
Board support package_on_linux
Board support package_on_linuxBoard support package_on_linux
Board support package_on_linux
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systems
 
Zig Bee
Zig BeeZig Bee
Zig Bee
 
Build your own block chain
Build your own block chainBuild your own block chain
Build your own block chain
 
Basics of Vhdl
Basics of VhdlBasics of Vhdl
Basics of Vhdl
 
Practical Applications of Block Chain Technologies
Practical Applications of Block Chain Technologies Practical Applications of Block Chain Technologies
Practical Applications of Block Chain Technologies
 
Zigbee network
Zigbee networkZigbee network
Zigbee network
 
Zigbee technology ppt edited
Zigbee technology ppt editedZigbee technology ppt edited
Zigbee technology ppt edited
 
Zigbee ppt
Zigbee pptZigbee ppt
Zigbee ppt
 
zigbee full ppt
zigbee full pptzigbee full ppt
zigbee full ppt
 
Zigbee Presentation
Zigbee PresentationZigbee Presentation
Zigbee Presentation
 

Similaire à Embedded Linux Odp

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
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012Philip Polstra
 
2345014 unix-linux-bsd-cheat-sheets-i
2345014 unix-linux-bsd-cheat-sheets-i2345014 unix-linux-bsd-cheat-sheets-i
2345014 unix-linux-bsd-cheat-sheets-iLogesh Kumar Anandhan
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux DevelopersOpersys inc.
 
unixtoolbox.pdf
unixtoolbox.pdfunixtoolbox.pdf
unixtoolbox.pdfqqlove2
 
unixtoolbox.pdf
unixtoolbox.pdfunixtoolbox.pdf
unixtoolbox.pdfsptlove
 

Similaire à Embedded Linux Odp (20)

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
 
unixtoolbox
unixtoolboxunixtoolbox
unixtoolbox
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 
2345014 unix-linux-bsd-cheat-sheets-i
2345014 unix-linux-bsd-cheat-sheets-i2345014 unix-linux-bsd-cheat-sheets-i
2345014 unix-linux-bsd-cheat-sheets-i
 
KCC_Final.pdf
KCC_Final.pdfKCC_Final.pdf
KCC_Final.pdf
 
Jana treek 4
Jana treek 4Jana treek 4
Jana treek 4
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
Unixtoolbox
UnixtoolboxUnixtoolbox
Unixtoolbox
 
unixtoolbox.pdf
unixtoolbox.pdfunixtoolbox.pdf
unixtoolbox.pdf
 
unixtoolbox.pdf
unixtoolbox.pdfunixtoolbox.pdf
unixtoolbox.pdf
 
 
unixtoolbox.pdf
unixtoolbox.pdfunixtoolbox.pdf
unixtoolbox.pdf
 
unixtoolbox.pdf
unixtoolbox.pdfunixtoolbox.pdf
unixtoolbox.pdf
 
 
Unixtoolbox
UnixtoolboxUnixtoolbox
Unixtoolbox
 
unixtoolbox.pdf
unixtoolbox.pdfunixtoolbox.pdf
unixtoolbox.pdf
 
 
 
Develop
DevelopDevelop
Develop
 

Plus de ghessler

Joomla! Installation
Joomla! InstallationJoomla! Installation
Joomla! Installationghessler
 
Joomla Presentation
Joomla PresentationJoomla Presentation
Joomla Presentationghessler
 
Apache Commons Overview
Apache Commons OverviewApache Commons Overview
Apache Commons Overviewghessler
 
Overview Of Xaware
Overview Of XawareOverview Of Xaware
Overview Of Xawareghessler
 
Gimp In Hollywood
Gimp In HollywoodGimp In Hollywood
Gimp In Hollywoodghessler
 
Service Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixService Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixghessler
 

Plus de ghessler (7)

Joomla! Installation
Joomla! InstallationJoomla! Installation
Joomla! Installation
 
Joomla Presentation
Joomla PresentationJoomla Presentation
Joomla Presentation
 
Apache Commons Overview
Apache Commons OverviewApache Commons Overview
Apache Commons Overview
 
Overview Of Xaware
Overview Of XawareOverview Of Xaware
Overview Of Xaware
 
Gimp In Hollywood
Gimp In HollywoodGimp In Hollywood
Gimp In Hollywood
 
JCatapult
JCatapultJCatapult
JCatapult
 
Service Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMixService Oriented Integration with ServiceMix
Service Oriented Integration with ServiceMix
 

Dernier

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Dernier (20)

New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

Embedded Linux Odp

  • 1. Embedded Linux Crash Course Eric Gustafson http://embedded.gustafson-consulting.com ericg@gustafson-consulting.com
  • 2. Agenda ● What is “Embedded”? ● Example Walk Through ● Why Linux as an embedded platform? ● References – Convention: colored names have a reference in the references.
  • 3. What is Embedded? ● Embedded is a very nebulous term. ● My Definition: NOT a General Purpose Computer ● Some Linux Examples: ● TiVo ● PrismIQ ● Google Phone (Android) ● RioReceiver ● Home Routers ● Soekris – ActionTec (Qwest DSL) ● An Old PC
  • 4. Target System “Application” BusyBox C Library (uClibc) (system programs) Linux Kernel Boot syslinux (on disk) BIOS (firmware) Hardware – Intel x86 / PC Architecture
  • 5. System Boot 1. Hardware Reset → Bootloader ● BIOS Executes → syslinux (i.e. DOS format floppy/CF) ● syslinux → loads the Linux Kernel 2. Linux Kernel initializes ● Kernel mounts initrd.gz, the “root” filesystem. 3. Kernel → /sbin/init (from BusyBox) 4. init → /etc/rc (sh script – developer provided) 5. rc script → “Application”
  • 6. The Build Artifacts – What makes up our system – ● Hardware – provided ● BIOS – provided ● syslinux – {download, precompiled} ● Linux Kernel – BUILD ● µclibc (C Library) - BUILD ● BusyBox (core programs) – BUILD ● “Application” – BUILD
  • 7. Cross Compiler Tool Chain – How to build the Artifacts – ● Cross Compilation – Gnu Binutils ● Assembler, linker, etc. – Gnu C Compiler – C Library – uClibc ● Others: Newlib, Gnu C Library – Linux Kernel – just the headers ● Packaging – initrd.gz – cramfs tools ● Alternatives: ext2fs, jffs2, many others
  • 8. End to End Build – Getting our hands a little dirty – ● Buildroot ● http://buildroot.uclibc.org – Menu based configuration – Many options for configuration and architecture – Does everything ● builds cross compiler tool chain ● compiles kernel, C library (μClibc), BusyBox ● packages root filesystem image – Leaves all artifacts, and configuration, in place. – Buildroot is an excellent place to start.
  • 9. From Scratch – Getting our hands really dirty – ● Build Cross Development Tools – Build Binutils – Install Linux Kernel Headers – Build gcc-initial (no C Library dependencies) – Build C library (μClibc) – Build gcc-final (which uses the C library) ● X-Compile Target Artifacts – Configure & Compile Linux Kernel → bzImage (the Kernel) – Configure & Compile BusyBox – Compile “Application”
  • 10. From Scratch (2) – Getting our hands really dirty – ● Package Root Filesystem – Make a temp directory to act as “/”, call it “root_dir” – Place BusyBox, μClibc, and “Application” in directory “root_dir” using a typical root layout. – mkfs -t cramfs root_dir initrd – gzip -9 initrd → “initrd.gz”, the initrd image ● Place Artifacts on boot media. – Create a DOS format floppy (or CF card) – syslinux /dev/fd0 # only needed the first time – Mount /dev/fd0 ● Create and copy syslinux.cfg to /dev/fd0 – This is a small config file w/ kernel boot arguments ● Copy kernel, bzImage, to /dev/fd0 ● Copy the root filesystem, initrd.gz, to /dev/fd0
  • 11. Why Linux? ● Open Source ● Modifications are common, and easy. ● Entire tool chain is freely available – low cost to entry. ● The Kernel has LOTS of configurable drivers. – Common embedded chipset support. – Theres more than just chipset support though. ● File systems, network protocols, and lots more. ● Momentum – Linux's success is feeding on itself.
  • 12. References ● Compiler Tools ● C Libraries – GNU Binutils - – μClibc - http://uclibc.org/ http://www.gnu.org/software/binutils – Newlib - – GNU C Compiler - http://sourceware.org/newlib/ http://gcc.gnu.org – Gnu C Library - ● GCC requires GMP and MPFR http://www.gnu.org/software/libc/ – GMP - http://gmplib.org/ – MPFR - http://www.mpfr.org/ ● Linux Kernel – http://www.kernel.org/ – http://www.linuxdocs.org/ HOWTOs/Kernel-HOWTO.html
  • 13. References ● Boot loaders ● File system creation – syslinux - – cramfs - http://syslinux.zytor.com/wiki/ http://sourceforge.net/projects/cramfs/ ● pxelinux – Ethernet Boot – JFFS2 - ● isolinux – CD Boot http://sourceware.org/jffs2/ – GRUB - – Ext2fs - http://e2fsprogs.sourceforge.net/ext2.html http://www.gnu.org/software/grub/ – LILO ● http://lilo.go.dyndns.org/ ● http://tldp.org/HOWTO/LILO.html
  • 14. References ● Cross Dev Systems ● Embedded Linux Howto – Buildroot - – http://linuxant.hit.bg/Embedded- http://buildroot.uclibc.org/ Linux-Howto.html – crosstools - http://www.kegel.com/crosstool/