SlideShare a Scribd company logo
1 of 16
HOW TO BUILD AND LOAD LINUX ON
EMBEDDED SYSTEM
Linux Booting Process on Embedded Board
Linux load process can be divided on next stages:
1.BootRoom is internal loader of BootStrap from ROM
flash (NandFlash or SD card)
2.BootStrap (X-Loader in case BeagleBoard) –
initializes eternal RAM and loads to it U-Boot from SD
card fist FAT partition
3.BootLoader (U-Boot) – loads kernel and provides
boot arguments
4.Kernel mount Root FS
5. Kernel start Init proccess
BootStrap (X-Loader)
X-Loader is 2nd stage bootstrap loader loaded by OMAP3
BootRom from NAND flash to internal RAM to start 3rd
stage tool like U-Boot.
Bootstrap is usually limited by internal RAM size and has
serial console to manage update of BootLoader (U-Boot).
X-loader can be updated from SD card to NAND

Must have 255 heads and 63 sectors/track

First partition is FAT and bootable

Must have “MLO” file of X-Loader.bin
For detail instruction how format SD card please refer to
https://code.google.com/p/beagleboard/wiki/LinuxBoot
DiskFormat
BootLoader (U-Boot)
Universal Bootloader is an open source, primary boot loader
used in embedded devices to start linux kernel.
X-Loader uploads U-Boot to external RAM (SDRAM or DDR)
from NAND flash or SD card.
U-Boot is responsible for next actions

Implement FAT file system and TCP/IP stack.

Load kernel image from SD card first FAT partition to ext
RAM (in case BeagleBoard at address 0x80300000)

Manage bootargs and bootcmd and provide it for kernel
U-Boot how to manage bootargs and
bootcmd
To manage U-Boot used one of the next serial ports

/dev/ttyS0

/dev/ttyUSB0
As console terminal can be used for Linux “Minicom” and for
Windows “PuTTY”. The serial port settings is 115200 8N1,
no flow control.
Environment settings bootargs and bootcmd managed by
next U-boot commands

printenv (lists all env vars)

seteenv (saves variables to flash for next boot)

bootargs (lists all kernel arguments)

bootcmd (default boot command)
U-Boot how to manage bootargs and
bootcmd
To set up kernel argument used next string:
setenv bootargs 'console=ttyS0,115200n8
root=/dev/mmcblk0p2 rootfstype=ext2 rw'
Here you can see next arguments:
1) console kernel settings 115200n8 and ttyS0
(can be ttyS2 in case console on ext screen)
2) Root fs mount path to SD card
/dev/mmcblk0p2, filetype ext2 (can be ext3)
privileges read and write
U-Boot how to manage bootargs and
bootcmd
To set up boot command used next string:
setenv bootcmd 'mmcinit; fatload mmc 0
0x80300000 uImage; bootm 0x80300000'
String above contain next boot commands:

Init mmc (also work for SD) card

Load kernel image file “uImage” from mmc (SD)
card partition 0 to memory at address
0x80300000

Boot application image from address
0x80300000
BuildRoot
BuildRoot is an embedded Linux build system
Its goal is to build

a cross-compiling toolchain

a root file-system with multiple cross-compiled libraries and
applications

a kernel image and bootloader images
or any combination of these

It has a menuconfig configuration mechanism, identical to the one

used in the kernel

It is completely written in make

It builds only what's necessary. A base system, containing just
Busybox, takes less than 2 minutes to be built from scratch.
BusyBox combines tiny versions of many common UNIX utilities into
a single small executable. It provides replacements for most of the
utilities you usually find in GNU fileutils, shellutils, etc.
BuildRoot basic usage
To tune buildroot use next command:
$ make menuconfig
BuildRoot basic usage
To config linux kernel type:
$ make linux-menuconfig
To build all run simple command:
$ make
...
Here You will be involved to install all necessary libs and
tools
...
$ ls output/images/
dataflash_at91sam9m10g45ek.bin rootfs.tar
rootfs.ubi rootfs.ubifs
u-boot.bin u-boot-env.bin
uImage
BuildRoot how does it work

Configuration options defined in Config.in files, and
stored in a .config file

Buildroot starts with the toolchain: either it generates it,
or imports an existing toolchain for instance
CodeSourcery ARM GNU/Linux tool chain

It creates a basic root filesystem from a skeleton (just a
few conguration files)

Once the toolchain is ready, Buildroot goes through the
list of selected packages. It simply fetches, configures,
builds and installs all packages, respecting their
dependencies.

It builds the kernel image and/or bootloader images, if
requested

It creates root file system images
BuildRoot source code organization

board/
contains hardware-specific and project-specific files.

boot/
contains config options and recipes for various
bootloaders

configs/
the default congurations

docs/
some documentation.

fs/
contains config options and makefiles to generate the
various filesystem images (j
s2, ubifs, ext2, iso9660, initramfs, tar and more). Also
contains the root file system skeleton
BuildRoot source code organization

linux/
contains the config options and makefile to generate the
Linux kernel

package/
contains the config options and makefiles for all
userspace packages

support/
various misc stuff
needed for the build (kcong code, etc.)

target/
mostly historic directory. No longer contains anything
useful

toolchain/
config options and makefiles to build or import the
toolchain
BuildRoot output generated source and
images

output/build/
a directory with one sub-directory per component build.
The directory contains the source of that component and
this is where it is built.

output/host/
a directory that contains the utilities built for the host
machine, including the toolchain

output/target/ the target root file system

output/images/ where final images are stored
Build Linux for Embedded with BuildRoot
Build Linux for Embedded with BuildRoot

More Related Content

What's hot

System Booting Process overview
System Booting Process overviewSystem Booting Process overview
System Booting Process overviewRajKumar Rampelli
 
101 2.2 install boot manager
101 2.2 install boot manager101 2.2 install boot manager
101 2.2 install boot managerAcácio Oliveira
 
Making your own bootloader
Making your own bootloaderMaking your own bootloader
Making your own bootloaderiamumr
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Macpaul Lin
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloadingArpita Gupta
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processHari Shankar
 
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...
[DEFCON 16] Bypassing pre-boot authentication passwords  by instrumenting the...[DEFCON 16] Bypassing pre-boot authentication passwords  by instrumenting the...
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...Moabi.com
 
BOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTBOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTShahzeb Pirzada
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentalsBimal Jain
 
Linux boot process
Linux boot processLinux boot process
Linux boot processbrusnigin
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedureDhaval Kaneria
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting processSiddharth Jain
 

What's hot (20)

Linux booting sequence
Linux booting sequenceLinux booting sequence
Linux booting sequence
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
System Booting Process overview
System Booting Process overviewSystem Booting Process overview
System Booting Process overview
 
101 2.2 install boot manager
101 2.2 install boot manager101 2.2 install boot manager
101 2.2 install boot manager
 
Boot process: BIOS vs UEFI
Boot process: BIOS vs UEFIBoot process: BIOS vs UEFI
Boot process: BIOS vs UEFI
 
Making your own bootloader
Making your own bootloaderMaking your own bootloader
Making your own bootloader
 
Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)Bootstrap process of u boot (NDS32 RISC CPU)
Bootstrap process of u boot (NDS32 RISC CPU)
 
Bootloader and bootloading
Bootloader and bootloadingBootloader and bootloading
Bootloader and bootloading
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
Booting
BootingBooting
Booting
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...
[DEFCON 16] Bypassing pre-boot authentication passwords  by instrumenting the...[DEFCON 16] Bypassing pre-boot authentication passwords  by instrumenting the...
[DEFCON 16] Bypassing pre-boot authentication passwords by instrumenting the...
 
BOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPTBOOTABLE OPERATING SYSTEM PPT
BOOTABLE OPERATING SYSTEM PPT
 
Unix fundamentals
Unix fundamentalsUnix fundamentals
Unix fundamentals
 
Booting & shut down,
Booting & shut down,Booting & shut down,
Booting & shut down,
 
Linux boot process
Linux boot processLinux boot process
Linux boot process
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
101 1.2 boot the system
101 1.2 boot the system101 1.2 boot the system
101 1.2 boot the system
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting process
 

Viewers also liked

Real Estate Stats for 2013 - Boulder County
Real Estate Stats for 2013 - Boulder CountyReal Estate Stats for 2013 - Boulder County
Real Estate Stats for 2013 - Boulder CountyDaveFish
 
"Personal Branding"_By_ Saddam_Rahmani
"Personal Branding"_By_ Saddam_Rahmani"Personal Branding"_By_ Saddam_Rahmani
"Personal Branding"_By_ Saddam_RahmaniSaddam Rahmani
 
E commerce? It' fashion - Chibimart Fiera Milano
E commerce? It' fashion - Chibimart Fiera MilanoE commerce? It' fashion - Chibimart Fiera Milano
E commerce? It' fashion - Chibimart Fiera MilanoNicolo' Fasce
 
Diagrama de espina o pescado ishikawa
Diagrama de espina o          pescado ishikawaDiagrama de espina o          pescado ishikawa
Diagrama de espina o pescado ishikawaoscarpineda1900
 
Showrooming, webrooming and outshopping: How to address these new consumer b...
Showrooming, webrooming and outshopping:  How to address these new consumer b...Showrooming, webrooming and outshopping:  How to address these new consumer b...
Showrooming, webrooming and outshopping: How to address these new consumer b...Sylvain Senecal
 
Shopper Showrooming: Retailer Strategies in a Smartphone World
Shopper Showrooming: Retailer Strategies in a Smartphone World Shopper Showrooming: Retailer Strategies in a Smartphone World
Shopper Showrooming: Retailer Strategies in a Smartphone World Self-employed
 
Come gli smartphone stanno cambiando le imprese
Come gli smartphone stanno cambiando le impreseCome gli smartphone stanno cambiando le imprese
Come gli smartphone stanno cambiando le impreseAproweb
 
Le vrai impact du showrooming sur les ventes en magasin selon Ipsos
Le vrai impact du showrooming sur les ventes en magasin selon Ipsos Le vrai impact du showrooming sur les ventes en magasin selon Ipsos
Le vrai impact du showrooming sur les ventes en magasin selon Ipsos Bertrand Jonquois
 
GIN TONIC SHOP - Jennifer Menten, Zaakvoerder
GIN TONIC SHOP - Jennifer Menten, ZaakvoerderGIN TONIC SHOP - Jennifer Menten, Zaakvoerder
GIN TONIC SHOP - Jennifer Menten, Zaakvoerderecommercexpokortrijk
 

Viewers also liked (15)

Real Estate Stats for 2013 - Boulder County
Real Estate Stats for 2013 - Boulder CountyReal Estate Stats for 2013 - Boulder County
Real Estate Stats for 2013 - Boulder County
 
"Personal Branding"_By_ Saddam_Rahmani
"Personal Branding"_By_ Saddam_Rahmani"Personal Branding"_By_ Saddam_Rahmani
"Personal Branding"_By_ Saddam_Rahmani
 
ESL: Coraline
ESL: CoralineESL: Coraline
ESL: Coraline
 
Digital strategy
Digital strategyDigital strategy
Digital strategy
 
E commerce? It' fashion - Chibimart Fiera Milano
E commerce? It' fashion - Chibimart Fiera MilanoE commerce? It' fashion - Chibimart Fiera Milano
E commerce? It' fashion - Chibimart Fiera Milano
 
Diagrama de espina o pescado ishikawa
Diagrama de espina o          pescado ishikawaDiagrama de espina o          pescado ishikawa
Diagrama de espina o pescado ishikawa
 
Digital strategy
Digital strategyDigital strategy
Digital strategy
 
Ideolo - Snapshot su iBeacon e opportunità
Ideolo - Snapshot su iBeacon e opportunitàIdeolo - Snapshot su iBeacon e opportunità
Ideolo - Snapshot su iBeacon e opportunità
 
Showrooming, webrooming and outshopping: How to address these new consumer b...
Showrooming, webrooming and outshopping:  How to address these new consumer b...Showrooming, webrooming and outshopping:  How to address these new consumer b...
Showrooming, webrooming and outshopping: How to address these new consumer b...
 
Introduction to embedded systems
Introduction to embedded systemsIntroduction to embedded systems
Introduction to embedded systems
 
Shopper Showrooming: Retailer Strategies in a Smartphone World
Shopper Showrooming: Retailer Strategies in a Smartphone World Shopper Showrooming: Retailer Strategies in a Smartphone World
Shopper Showrooming: Retailer Strategies in a Smartphone World
 
Come gli smartphone stanno cambiando le imprese
Come gli smartphone stanno cambiando le impreseCome gli smartphone stanno cambiando le imprese
Come gli smartphone stanno cambiando le imprese
 
Le vrai impact du showrooming sur les ventes en magasin selon Ipsos
Le vrai impact du showrooming sur les ventes en magasin selon Ipsos Le vrai impact du showrooming sur les ventes en magasin selon Ipsos
Le vrai impact du showrooming sur les ventes en magasin selon Ipsos
 
Digital strategy
Digital strategyDigital strategy
Digital strategy
 
GIN TONIC SHOP - Jennifer Menten, Zaakvoerder
GIN TONIC SHOP - Jennifer Menten, ZaakvoerderGIN TONIC SHOP - Jennifer Menten, Zaakvoerder
GIN TONIC SHOP - Jennifer Menten, Zaakvoerder
 

Similar to Build Linux for Embedded with BuildRoot

U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New HardwareRuggedBoardGroup
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot) Omkar Rane
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal BootloaderSatpal Parmar
 
An Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessAn Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessHardeep Bhurji
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut iiplarsen67
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux SystemJian-Hong Pan
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processsagarpdalvi
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explainedLinuxConcept
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedAdrian Huang
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System AdministrationSreenatha Reddy K R
 
Character_device_driver_bbb
Character_device_driver_bbbCharacter_device_driver_bbb
Character_device_driver_bbbRashila Rr
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processTeja Bheemanapally
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot processTeja Bheemanapally
 

Similar to Build Linux for Embedded with BuildRoot (20)

U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
An Insight into the Linux Booting Process
An Insight into the Linux Booting ProcessAn Insight into the Linux Booting Process
An Insight into the Linux Booting Process
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
Linux startup
Linux startupLinux startup
Linux startup
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Grub and dracut ii
Grub and dracut iiGrub and dracut ii
Grub and dracut ii
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
Beagleboard xm-setup
Beagleboard xm-setupBeagleboard xm-setup
Beagleboard xm-setup
 
Linux boot process – explained
Linux boot process – explainedLinux boot process – explained
Linux boot process – explained
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Character_device_driver_bbb
Character_device_driver_bbbCharacter_device_driver_bbb
Character_device_driver_bbb
 
Ch04 system administration
Ch04 system administration Ch04 system administration
Ch04 system administration
 
Ch04
Ch04Ch04
Ch04
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 
6 stages of linux boot process
6 stages of linux boot process6 stages of linux boot process
6 stages of linux boot process
 

Recently uploaded

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Recently uploaded (20)

Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

Build Linux for Embedded with BuildRoot

  • 1. HOW TO BUILD AND LOAD LINUX ON EMBEDDED SYSTEM
  • 2. Linux Booting Process on Embedded Board Linux load process can be divided on next stages: 1.BootRoom is internal loader of BootStrap from ROM flash (NandFlash or SD card) 2.BootStrap (X-Loader in case BeagleBoard) – initializes eternal RAM and loads to it U-Boot from SD card fist FAT partition 3.BootLoader (U-Boot) – loads kernel and provides boot arguments 4.Kernel mount Root FS 5. Kernel start Init proccess
  • 3. BootStrap (X-Loader) X-Loader is 2nd stage bootstrap loader loaded by OMAP3 BootRom from NAND flash to internal RAM to start 3rd stage tool like U-Boot. Bootstrap is usually limited by internal RAM size and has serial console to manage update of BootLoader (U-Boot). X-loader can be updated from SD card to NAND  Must have 255 heads and 63 sectors/track  First partition is FAT and bootable  Must have “MLO” file of X-Loader.bin For detail instruction how format SD card please refer to https://code.google.com/p/beagleboard/wiki/LinuxBoot DiskFormat
  • 4. BootLoader (U-Boot) Universal Bootloader is an open source, primary boot loader used in embedded devices to start linux kernel. X-Loader uploads U-Boot to external RAM (SDRAM or DDR) from NAND flash or SD card. U-Boot is responsible for next actions  Implement FAT file system and TCP/IP stack.  Load kernel image from SD card first FAT partition to ext RAM (in case BeagleBoard at address 0x80300000)  Manage bootargs and bootcmd and provide it for kernel
  • 5. U-Boot how to manage bootargs and bootcmd To manage U-Boot used one of the next serial ports  /dev/ttyS0  /dev/ttyUSB0 As console terminal can be used for Linux “Minicom” and for Windows “PuTTY”. The serial port settings is 115200 8N1, no flow control. Environment settings bootargs and bootcmd managed by next U-boot commands  printenv (lists all env vars)  seteenv (saves variables to flash for next boot)  bootargs (lists all kernel arguments)  bootcmd (default boot command)
  • 6. U-Boot how to manage bootargs and bootcmd To set up kernel argument used next string: setenv bootargs 'console=ttyS0,115200n8 root=/dev/mmcblk0p2 rootfstype=ext2 rw' Here you can see next arguments: 1) console kernel settings 115200n8 and ttyS0 (can be ttyS2 in case console on ext screen) 2) Root fs mount path to SD card /dev/mmcblk0p2, filetype ext2 (can be ext3) privileges read and write
  • 7. U-Boot how to manage bootargs and bootcmd To set up boot command used next string: setenv bootcmd 'mmcinit; fatload mmc 0 0x80300000 uImage; bootm 0x80300000' String above contain next boot commands:  Init mmc (also work for SD) card  Load kernel image file “uImage” from mmc (SD) card partition 0 to memory at address 0x80300000  Boot application image from address 0x80300000
  • 8. BuildRoot BuildRoot is an embedded Linux build system Its goal is to build  a cross-compiling toolchain  a root file-system with multiple cross-compiled libraries and applications  a kernel image and bootloader images or any combination of these  It has a menuconfig configuration mechanism, identical to the one  used in the kernel  It is completely written in make  It builds only what's necessary. A base system, containing just Busybox, takes less than 2 minutes to be built from scratch. BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc.
  • 9. BuildRoot basic usage To tune buildroot use next command: $ make menuconfig
  • 10. BuildRoot basic usage To config linux kernel type: $ make linux-menuconfig To build all run simple command: $ make ... Here You will be involved to install all necessary libs and tools ... $ ls output/images/ dataflash_at91sam9m10g45ek.bin rootfs.tar rootfs.ubi rootfs.ubifs u-boot.bin u-boot-env.bin uImage
  • 11. BuildRoot how does it work  Configuration options defined in Config.in files, and stored in a .config file  Buildroot starts with the toolchain: either it generates it, or imports an existing toolchain for instance CodeSourcery ARM GNU/Linux tool chain  It creates a basic root filesystem from a skeleton (just a few conguration files)  Once the toolchain is ready, Buildroot goes through the list of selected packages. It simply fetches, configures, builds and installs all packages, respecting their dependencies.  It builds the kernel image and/or bootloader images, if requested  It creates root file system images
  • 12. BuildRoot source code organization  board/ contains hardware-specific and project-specific files.  boot/ contains config options and recipes for various bootloaders  configs/ the default congurations  docs/ some documentation.  fs/ contains config options and makefiles to generate the various filesystem images (j s2, ubifs, ext2, iso9660, initramfs, tar and more). Also contains the root file system skeleton
  • 13. BuildRoot source code organization  linux/ contains the config options and makefile to generate the Linux kernel  package/ contains the config options and makefiles for all userspace packages  support/ various misc stuff needed for the build (kcong code, etc.)  target/ mostly historic directory. No longer contains anything useful  toolchain/ config options and makefiles to build or import the toolchain
  • 14. BuildRoot output generated source and images  output/build/ a directory with one sub-directory per component build. The directory contains the source of that component and this is where it is built.  output/host/ a directory that contains the utilities built for the host machine, including the toolchain  output/target/ the target root file system  output/images/ where final images are stored