SlideShare a Scribd company logo
1 of 25
© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
BeagleBoard Booting Process
2© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What to Expect?
PC Booting Process
Beagle Booting Process
Booting through SD Card
Partitioning & Creating Root Filesystem
W's of Bootloaders
UBoot
Booting through Serial
3© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
PC Booting Process
System Startup
Stage 2 Bootloader
Stage 1 Bootloader
Kernel
Init
Power-Up /
Reset
Operation
4© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
General Booting of BeagleBoard
Image under “CC BY-SA 3.0 US” from http://omappedia.org/wiki/Bootloader_Project
5© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
DM3730 Processor Boot Modes
Memory Booting
NAND, NOR, MMC
Peripheral Booting
USB, UART
The Order / Sequence is determined by
The set of GPIO configuration pins called SYSBOOT pins (5
pins)
Default Booting Sequence
USB -> UART3 -> MMC1 -> NAND (for processor)
NAND-> USB-> UART3 -> MMC (for BeagleBoard)
6© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Beagle Booting Process
(SD Card)
ROM code loads x-loader (MLO)
Performs External DRAM configuration
X-loader loads u-boot
Default location is /media/mmcblkp01/u-boot.bin
U-boot executes default environment/commands
Default location is /mmcblkp01/uEnv.txt
Commands load the Kernel
Default location is /media/mmcblkop2/boot/uImage
Kernel reads root file system
7© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Recovering the Board
Copy the user.txt and u-boot.bin
tftp -g <serverip> -r u-boot_destroy.bin -l u-
boot.bin
tftp -g <serverip> -r user.txt -l user.txt
Change the ip address in user.txt
Delete the kernel - /boot/uImage
Delete the Root Filesystem.
Reboot the sytem.
8© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
SD Card Partitioning
Fdisk /dev/mmcblk0
Create a window partition of 116MB
Make it bootable
Create two primary Linux partitions of sizes
3GB and 1GB aprox.
9© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Creating & Filling the Filesystem
Create the Filesystem of type Fat 32 on first partition
mkfs.vfat -F 32 /dev/mmcblk0p1 -n boot
Create the Filesystem of type ext2 on Second and third partitions
mke2fs -L FirstRootFs /dev/mmcblk0p2
mke2fs -L SecondRootFs /dev/mmcblk0p3
Fill the filesystem with contents
tftp -g 192.168.20.181 -r Narcisus.tgz
tar -zxvf Narcisus.tgz
Copy u-boot_destroy.bin, user.txt and uEnv.txt in vfat partition
tftp -g 192.168.20.181 -r u-boot_destroy.bin -l u-boot.bin
tftp -g 192.168.20.181 -r user.txt
tftp -g 192.168.20.181 -r uEnvAng.txt -l uEnv.txt
10© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What is a Bootloader?
Also, referred to as boot monitor, is a small
piece of software that executes soon after
powering up a system
Simply, a loader (program), which boots up
(starts) the system
A Customized Program started by
Controller's Internal Code in Embedded
Systems, Or
External Pre-programmed Code (like BIOS) in
Desktops
11© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Tasks of a Bootloader
Initialization Tasks
Memory Setup & Initialization
System Peripheral Initialization
for the kernel
Actual Task
Load the RAM-based File System, like initrd, initramfs, ...
Load the Kernel with proper arguments
Jump to the start of the Kernel
Additional Tasks
Multiple Kernel Boots
12© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Design of Bootloaders
As Bootloader is started by a fixed code
It needs to be placed at a hard-coded
location
Hard-coded locations are not big enough for
the complete code (/ logic / tasks) of the
bootloader
Hence, it is typically split into 2 portions
Stage 1 – Small enough to load Stage 2 from our
desired location
Stage 2 – The actual bootloader we want to have
13© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Bootloader Comparisons
On Desktops
Initialization Tasks are done by BIOS
Bootloader is to just Boot the Kernel
On Embedded Systems
All needs to be done by the Bootloader
But in an optimized way
Hence, the 2 bootloaders are
Quite different from each other
Later being more board dependent & constrained
14© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Stage 2 Bootloader Flavours
Prevalent Desktop Bootloaders
LILO
GRUB
SYSLINUX
loadlin
Coreboot (Earlier called LinuxBIOS)
Popular Embedded System Bootloaders
BootLoader Object (BLOB)
Redboot
U-Boot
15© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Check
Name the Stage 1 & Stage 2 bootloaders
Desktops
Embedded Systems
16© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
U-Boot
17© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
W's of U-Boot
Universal Bootloader (U-Boot)
An Open Source Bootloader
With minimal changes, can be ported for any
board
GRUB/LILO
Designed with x-86 in mind
Huge in Size
Needs to be changed drastically for porting on
other architecture
18© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
U-Boot Source Tree
arch – Architecture dependent Code
board – Board dependent Code
common – Environment & Command Line Code
doc – Documentation
drivers – Device specific Drivers
fs – File System support Code
include – Headers
lib – Compression, Encryption related Code
net – Minimal Network Stack
tools – U-Boot Utilities (mkimage is here)
19© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
U-boot Hands-on
Stopping at the U-Boot
Help - “?”
Commands
Booting: bootp, bootm, boot, ...
NOR Flash: erase, cp, protect, …
NAND Flash: nand
Miscellaneous: reset, ...
...
Environment Variables
printenv
setenv
saveenv
20© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Booting through the Serial
Boot ROM can load any binary x-loader
image into the internal SRAM of 64K
For Serial Boot,
A simple ID is written out of the serial port
If host responds within that short window of
time
The ROM reads from serial port
Transfers the data to the internal SRAM
Control is passed to the start of the SRAM.
21© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Steps For Serial Booting
Remove the SD Card
Load the X-loader
./pserial -p /dev/ttyS0 -f x-load.bin
Load the U-boot
./ukermit -p /dev/ttyS0 -f u-boot.bin
Prepare the board for the using Ethernet
usb start
setenv serverip 192.168.20.181
setenv ipaddr <ipaddr>
Load & Import the Environmental Variables
tftpboot EnvSerial.txt
run importbootenv
Run the command – run uenvcmd
22© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
U-Boot Compiling
Preparing the Makefile
Setup CROSS_COMPILE for cross compilation
Or, invoke make with these options
Configuring for a particular board
make <board>_config
Compiling for the configured board
make (Output would be u-boot.bin)
Cleaning up
make clean
23© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Adding the Command in uboot
Create the file cmd_<file>.c
Fill the Macro 'U_BOOT_CMD()'
name : the name of the command
maxargs: the maximum number of arguments this function takes
command : function pointer (*cmd)(struct cmd_tbl_s *, int, int, char
*[])
usage : Short Description
help : Long description
Add the entry into common/Makefile
COBJS-$(CONFIG_CMD_<NAME>) += cmd_<file>.o
Include the macro CONFIG_CMD_<NAME> in board.h file
24© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What all have learnt?
PC Booting Process
Beagle Booting Process
Booting through SD Card
Booting through Serial
Partitioning & Creating Root Filesystem
W's of Bootloaders
UBoot
25© 2012-14 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Any Queries?

More Related Content

What's hot

HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareLinaro
 
ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!Mr. Vengineer
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot) Omkar Rane
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3Linaro
 
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
 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Joblinuxlab_conf
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Linaro
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernelguest547d74
 
twlkh-linux-vsyscall-and-vdso
twlkh-linux-vsyscall-and-vdsotwlkh-linux-vsyscall-and-vdso
twlkh-linux-vsyscall-and-vdsoViller Hsiao
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogicAleem Shariff
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIAnne Nicolas
 

What's hot (20)

Interrupts
InterruptsInterrupts
Interrupts
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
 
ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!ARM Trusted FirmwareのBL31を単体で使う!
ARM Trusted FirmwareのBL31を単体で使う!
 
U-Boot - An universal bootloader
U-Boot - An universal bootloader U-Boot - An universal bootloader
U-Boot - An universal bootloader
 
Bootloaders (U-Boot)
Bootloaders (U-Boot) Bootloaders (U-Boot)
Bootloaders (U-Boot)
 
Linux Booting Steps
Linux Booting StepsLinux Booting Steps
Linux Booting Steps
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
I2C Drivers
I2C DriversI2C Drivers
I2C Drivers
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
 
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
 
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily JobLuca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
Luca Ceresoli - Buildroot vs Yocto: Differences for Your Daily Job
 
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
Secure Boot on ARM systems – Building a complete Chain of Trust upon existing...
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Board Bringup
Board BringupBoard Bringup
Board Bringup
 
twlkh-linux-vsyscall-and-vdso
twlkh-linux-vsyscall-and-vdsotwlkh-linux-vsyscall-and-vdso
twlkh-linux-vsyscall-and-vdso
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 

Viewers also liked (20)

Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
Arduino Robotics workshop day2
Arduino Robotics workshop day2Arduino Robotics workshop day2
Arduino Robotics workshop day2
 
Introduction to BeagleBone Black
Introduction to BeagleBone BlackIntroduction to BeagleBone Black
Introduction to BeagleBone Black
 
Arduino Robotics workshop Day1
Arduino Robotics workshop Day1Arduino Robotics workshop Day1
Arduino Robotics workshop Day1
 
Introduction to BeagleBoard-xM
Introduction to BeagleBoard-xMIntroduction to BeagleBoard-xM
Introduction to BeagleBoard-xM
 
Embedded Applications
Embedded ApplicationsEmbedded Applications
Embedded Applications
 
Kernel Programming
Kernel ProgrammingKernel Programming
Kernel Programming
 
Low-level Accesses
Low-level AccessesLow-level Accesses
Low-level Accesses
 
BeagleBoard-xM Bootloaders
BeagleBoard-xM BootloadersBeagleBoard-xM Bootloaders
BeagleBoard-xM Bootloaders
 
File Systems
File SystemsFile Systems
File Systems
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
File System Modules
File System ModulesFile System Modules
File System Modules
 
Platform Drivers
Platform DriversPlatform Drivers
Platform Drivers
 
Serial Drivers
Serial DriversSerial Drivers
Serial Drivers
 
SPI Drivers
SPI DriversSPI Drivers
SPI Drivers
 
Block Drivers
Block DriversBlock Drivers
Block Drivers
 
References
ReferencesReferences
References
 
Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
Introduction to Linux Drivers
Introduction to Linux DriversIntroduction to Linux Drivers
Introduction to Linux Drivers
 

Similar to BeagleBoard-xM Booting Process

U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New HardwareRuggedBoardGroup
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devicesMender.io
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadAndrewWright224
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220AndrewWright224
 
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
 
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hoodEmbedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hoodEmbeddedFest
 
建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card艾鍗科技
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android EmulatorSamael Wang
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)RuggedBoardGroup
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI securityDenis Gundarev
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial艾鍗科技
 
Step by step migration ufs to zfs file system on solaris 10
Step by step migration ufs to zfs file system on solaris 10Step by step migration ufs to zfs file system on solaris 10
Step by step migration ufs to zfs file system on solaris 10Md. Budrul Hasan Bhuiyan
 
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
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal BootloaderSatpal Parmar
 
SiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingSiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingMarian Marinov
 

Similar to BeagleBoard-xM Booting Process (20)

U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
2.2 install boot manager
2.2 install boot manager2.2 install boot manager
2.2 install boot manager
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
 
101 2.2 install boot manager
101 2.2 install boot manager101 2.2 install boot manager
101 2.2 install boot manager
 
5. boot process
5. boot process5. boot process
5. boot process
 
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hoodEmbedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
 
建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card
 
Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
C C N A Day2
C C N A  Day2C C N A  Day2
C C N A Day2
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI security
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial
 
Step by step migration ufs to zfs file system on solaris 10
Step by step migration ufs to zfs file system on solaris 10Step by step migration ufs to zfs file system on solaris 10
Step by step migration ufs to zfs file system on solaris 10
 
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)
 
1.2 boot the system v2
1.2 boot the system v21.2 boot the system v2
1.2 boot the system v2
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
SiteGround Tech TeamBuilding
SiteGround Tech TeamBuildingSiteGround Tech TeamBuilding
SiteGround Tech TeamBuilding
 

More from SysPlay eLearning Academy for You (10)

Linux Internals Part - 3
Linux Internals Part - 3Linux Internals Part - 3
Linux Internals Part - 3
 
Linux Internals Part - 2
Linux Internals Part - 2Linux Internals Part - 2
Linux Internals Part - 2
 
Linux Internals Part - 1
Linux Internals Part - 1Linux Internals Part - 1
Linux Internals Part - 1
 
Kernel Timing Management
Kernel Timing ManagementKernel Timing Management
Kernel Timing Management
 
Understanding the BBB
Understanding the BBBUnderstanding the BBB
Understanding the BBB
 
POSIX Threads
POSIX ThreadsPOSIX Threads
POSIX Threads
 
Linux DMA Engine
Linux DMA EngineLinux DMA Engine
Linux DMA Engine
 
Cache Management
Cache ManagementCache Management
Cache Management
 
SPI Drivers
SPI DriversSPI Drivers
SPI Drivers
 
Linux System
Linux SystemLinux System
Linux System
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
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
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
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
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
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
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

BeagleBoard-xM Booting Process

  • 1. © 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. BeagleBoard Booting Process
  • 2. 2© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. What to Expect? PC Booting Process Beagle Booting Process Booting through SD Card Partitioning & Creating Root Filesystem W's of Bootloaders UBoot Booting through Serial
  • 3. 3© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. PC Booting Process System Startup Stage 2 Bootloader Stage 1 Bootloader Kernel Init Power-Up / Reset Operation
  • 4. 4© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. General Booting of BeagleBoard Image under “CC BY-SA 3.0 US” from http://omappedia.org/wiki/Bootloader_Project
  • 5. 5© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. DM3730 Processor Boot Modes Memory Booting NAND, NOR, MMC Peripheral Booting USB, UART The Order / Sequence is determined by The set of GPIO configuration pins called SYSBOOT pins (5 pins) Default Booting Sequence USB -> UART3 -> MMC1 -> NAND (for processor) NAND-> USB-> UART3 -> MMC (for BeagleBoard)
  • 6. 6© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Beagle Booting Process (SD Card) ROM code loads x-loader (MLO) Performs External DRAM configuration X-loader loads u-boot Default location is /media/mmcblkp01/u-boot.bin U-boot executes default environment/commands Default location is /mmcblkp01/uEnv.txt Commands load the Kernel Default location is /media/mmcblkop2/boot/uImage Kernel reads root file system
  • 7. 7© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Recovering the Board Copy the user.txt and u-boot.bin tftp -g <serverip> -r u-boot_destroy.bin -l u- boot.bin tftp -g <serverip> -r user.txt -l user.txt Change the ip address in user.txt Delete the kernel - /boot/uImage Delete the Root Filesystem. Reboot the sytem.
  • 8. 8© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. SD Card Partitioning Fdisk /dev/mmcblk0 Create a window partition of 116MB Make it bootable Create two primary Linux partitions of sizes 3GB and 1GB aprox.
  • 9. 9© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Creating & Filling the Filesystem Create the Filesystem of type Fat 32 on first partition mkfs.vfat -F 32 /dev/mmcblk0p1 -n boot Create the Filesystem of type ext2 on Second and third partitions mke2fs -L FirstRootFs /dev/mmcblk0p2 mke2fs -L SecondRootFs /dev/mmcblk0p3 Fill the filesystem with contents tftp -g 192.168.20.181 -r Narcisus.tgz tar -zxvf Narcisus.tgz Copy u-boot_destroy.bin, user.txt and uEnv.txt in vfat partition tftp -g 192.168.20.181 -r u-boot_destroy.bin -l u-boot.bin tftp -g 192.168.20.181 -r user.txt tftp -g 192.168.20.181 -r uEnvAng.txt -l uEnv.txt
  • 10. 10© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. What is a Bootloader? Also, referred to as boot monitor, is a small piece of software that executes soon after powering up a system Simply, a loader (program), which boots up (starts) the system A Customized Program started by Controller's Internal Code in Embedded Systems, Or External Pre-programmed Code (like BIOS) in Desktops
  • 11. 11© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Tasks of a Bootloader Initialization Tasks Memory Setup & Initialization System Peripheral Initialization for the kernel Actual Task Load the RAM-based File System, like initrd, initramfs, ... Load the Kernel with proper arguments Jump to the start of the Kernel Additional Tasks Multiple Kernel Boots
  • 12. 12© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Design of Bootloaders As Bootloader is started by a fixed code It needs to be placed at a hard-coded location Hard-coded locations are not big enough for the complete code (/ logic / tasks) of the bootloader Hence, it is typically split into 2 portions Stage 1 – Small enough to load Stage 2 from our desired location Stage 2 – The actual bootloader we want to have
  • 13. 13© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Bootloader Comparisons On Desktops Initialization Tasks are done by BIOS Bootloader is to just Boot the Kernel On Embedded Systems All needs to be done by the Bootloader But in an optimized way Hence, the 2 bootloaders are Quite different from each other Later being more board dependent & constrained
  • 14. 14© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Stage 2 Bootloader Flavours Prevalent Desktop Bootloaders LILO GRUB SYSLINUX loadlin Coreboot (Earlier called LinuxBIOS) Popular Embedded System Bootloaders BootLoader Object (BLOB) Redboot U-Boot
  • 15. 15© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Check Name the Stage 1 & Stage 2 bootloaders Desktops Embedded Systems
  • 16. 16© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. U-Boot
  • 17. 17© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. W's of U-Boot Universal Bootloader (U-Boot) An Open Source Bootloader With minimal changes, can be ported for any board GRUB/LILO Designed with x-86 in mind Huge in Size Needs to be changed drastically for porting on other architecture
  • 18. 18© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. U-Boot Source Tree arch – Architecture dependent Code board – Board dependent Code common – Environment & Command Line Code doc – Documentation drivers – Device specific Drivers fs – File System support Code include – Headers lib – Compression, Encryption related Code net – Minimal Network Stack tools – U-Boot Utilities (mkimage is here)
  • 19. 19© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. U-boot Hands-on Stopping at the U-Boot Help - “?” Commands Booting: bootp, bootm, boot, ... NOR Flash: erase, cp, protect, … NAND Flash: nand Miscellaneous: reset, ... ... Environment Variables printenv setenv saveenv
  • 20. 20© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Booting through the Serial Boot ROM can load any binary x-loader image into the internal SRAM of 64K For Serial Boot, A simple ID is written out of the serial port If host responds within that short window of time The ROM reads from serial port Transfers the data to the internal SRAM Control is passed to the start of the SRAM.
  • 21. 21© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Steps For Serial Booting Remove the SD Card Load the X-loader ./pserial -p /dev/ttyS0 -f x-load.bin Load the U-boot ./ukermit -p /dev/ttyS0 -f u-boot.bin Prepare the board for the using Ethernet usb start setenv serverip 192.168.20.181 setenv ipaddr <ipaddr> Load & Import the Environmental Variables tftpboot EnvSerial.txt run importbootenv Run the command – run uenvcmd
  • 22. 22© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. U-Boot Compiling Preparing the Makefile Setup CROSS_COMPILE for cross compilation Or, invoke make with these options Configuring for a particular board make <board>_config Compiling for the configured board make (Output would be u-boot.bin) Cleaning up make clean
  • 23. 23© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Adding the Command in uboot Create the file cmd_<file>.c Fill the Macro 'U_BOOT_CMD()' name : the name of the command maxargs: the maximum number of arguments this function takes command : function pointer (*cmd)(struct cmd_tbl_s *, int, int, char *[]) usage : Short Description help : Long description Add the entry into common/Makefile COBJS-$(CONFIG_CMD_<NAME>) += cmd_<file>.o Include the macro CONFIG_CMD_<NAME> in board.h file
  • 24. 24© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. What all have learnt? PC Booting Process Beagle Booting Process Booting through SD Card Booting through Serial Partitioning & Creating Root Filesystem W's of Bootloaders UBoot
  • 25. 25© 2012-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Any Queries?