SlideShare ist ein Scribd-Unternehmen logo
1 von 29
© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
BeagleBone Black Booting Process
2© 2015-17 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
U-Boot
Serial Booting
Adding the command in U-Boot
3© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
PC Booting Process
Power-Up / Reset Operation
BIOS
(POST)
Primary
Bootloader
(446 Bytes)
Primary
Bootloader
(446 Bytes)
0XAA55
Partition Table
(64 Bytes)
GRUB/LILO
(Kernel Loader)
Kernel
Initrd
Init
(User Space
App.)
System
Startup
Stage 1
Bootloader
Stage 2
Bootloader
KernelStage 2
Bootloader
User
Space
4© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
BBB Memory Organization
DDR
512MB
ROM
Internal
RAM
128KB
SOC
BeagleBone Black
0x80000000
0x40200000
0x402F0400 EMMC
4GB
Ext.
MMC
5© 2015-17 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
6© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
BBB Images
ROM
Code
X-loader
SOC
BeagleBone Black
ROM
Internal RAM
DDR
u-boot
bbb.dtb
uImage
Ramdisk/initrd
(Ramdisk Boot)
7© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
AM335x Processor Boot Modes
Memory Booting
NAND, NOR, MMC
Peripheral Booting
USB, UART, Ethernet
The Order / Sequence is determined by
The set of GPIO configuration pins called SYSBOOT
pins (5 pins)
8© 2015-17 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
9© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Board Bring Up
Spoil the board
Delete u-boot.img, uImage and user.txt
Get the u-boot.img and user.txt
Change the ipaddr in user.txt
Reboot the board
Press the user button until countdown
This will boot the board with ramdisk
Re-partition the card
Create 3 partitions and filesystem on them
Restore the required images
Get MLO, u-boot.img, uEnv.txt and am335x-boneblack.dtb
Get the RootFs.xz in second partition and untar the same
10© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Recovering the Board
Copy the user.txt and u-boot.img
tftp -g <serverip> -r u-boot_bringup.img -l u-boot.img
tftp -g <serverip> -r user.txt -l user.txt
Change the ip address in user.txt
Delete the kernel - /boot/zImage
Delete the Root Filesystem
Reboot the system
11© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
SD Card Partitioning
fdisk /dev/mmcblk0
Create a windows partition of 116MB
Make it bootable
Create two primary Linux partitions of sizes 3GB
and 1GB approx
12© 2015-17 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 RootFs.xz
tar -zxvf RootFs.xz
Copy u-boot_bringup.img, user.txt and uEnv.txt in vfat partition
tftp -g <server_ip> -r u-boot_bringup.img -l u-boot.img
tftp -g <server_ip> -r user.txt
tftp -g <server_ip> -r uEnv.txt
tftp -g <server_ip> -r am335x-boneblack.dtb
13© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Board Bring up Hands On
Delete all the contents of External SD card
Get the MLO, u-boot.img, user.txt
Press the boot switch to change the booting sequence
Kernel boots with ramdisk
Re-partition the card and create the filesystem(vfat on first
partition and Ext2 on other two)
Get the MLO, u-boot.img, am335x-boneblack.dtb, uEnv.txt
and user.txt in first partition
Get the Root Filesystem in second partition
14© 2015-17 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
15© 2015-17 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
16© 2015-17 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
17© 2015-17 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
18© 2015-17 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
19© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Check
Name the Stage 1 & Stage 2 bootloaders
Desktops
Embedded Systems
20© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
U-Boot
21© 2015-17 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
22© 2015-17 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)
23© 2015-17 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
24© 2015-17 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 109K
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.
25© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
BBB Serial Booting
ROM
Code
X-loader
SOC
ROM
Internal RAM
DDR
u-boot
bbb.dtb
uImage
Ramdisk/initrd
(Ramdisk Boot)
X-Loader
u-boot
26© 2015-17 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.img)
Cleaning up
make clean
27© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Adding the Command in U-Boot
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: func 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
28© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What all have learnt?
PC Booting Process
Beagle Booting Process
Booting through SD Card
Partitioning & Creating Root Filesystem
W's of Bootloaders
U-Boot
Serial Booting
Adding the command in U-Boot
29© 2015-17 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Any Queries?

Weitere ähnliche Inhalte

Was ist angesagt?

Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBshimosawa
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device driversHoucheng Lin
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)shimosawa
 
Linux Initialization Process (1)
Linux Initialization Process (1)Linux Initialization Process (1)
Linux Initialization Process (1)shimosawa
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoCMacpaul Lin
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_BootingRashila Rr
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingTushar B Kute
 
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBLinux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBshimosawa
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom BoardPatrick Bellasi
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchlinuxlab_conf
 
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 Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New HardwareRuggedBoardGroup
 
Linux Porting
Linux PortingLinux Porting
Linux PortingChamp Yen
 
System Booting Process overview
System Booting Process overviewSystem Booting Process overview
System Booting Process overviewRajKumar Rampelli
 

Was ist angesagt? (20)

Linux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKBLinux Kernel Booting Process (1) - For NLKB
Linux Kernel Booting Process (1) - For NLKB
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
Linux Initialization Process (1)
Linux Initialization Process (1)Linux Initialization Process (1)
Linux Initialization Process (1)
 
Introduction to Modern U-Boot
Introduction to Modern U-BootIntroduction to Modern U-Boot
Introduction to Modern U-Boot
 
U boot porting guide for SoC
U boot porting guide for SoCU boot porting guide for SoC
U boot porting guide for SoC
 
Embedded_Linux_Booting
Embedded_Linux_BootingEmbedded_Linux_Booting
Embedded_Linux_Booting
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
 
Linux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKBLinux Kernel Booting Process (2) - For NLKB
Linux Kernel Booting Process (2) - For NLKB
 
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
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Linux Porting to a Custom Board
Linux Porting to a Custom BoardLinux Porting to a Custom Board
Linux Porting to a Custom Board
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratch
 
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)
 
U-Boot Porting on New Hardware
U-Boot Porting on New HardwareU-Boot Porting on New Hardware
U-Boot Porting on New Hardware
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Power Management from Linux Kernel to Android
Power Management from Linux Kernel to AndroidPower Management from Linux Kernel to Android
Power Management from Linux Kernel to Android
 
System Booting Process overview
System Booting Process overviewSystem Booting Process overview
System Booting Process overview
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 

Ähnlich wie BeagleBone Black Booting Process

Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogicAleem Shariff
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial艾鍗科技
 
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
 
建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card艾鍗科技
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI securityDenis Gundarev
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting ProcessMike Wang
 
Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Naohiro Tamura
 
my Windows 7 info
my Windows 7 infomy Windows 7 info
my Windows 7 infoisky guard
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)RuggedBoardGroup
 
Tkos secure boot_lecture_20190605
Tkos secure boot_lecture_20190605Tkos secure boot_lecture_20190605
Tkos secure boot_lecture_20190605benavrhm
 

Ähnlich wie BeagleBone Black Booting Process (20)

Bootloaders
BootloadersBootloaders
Bootloaders
 
BeagleBoard-xM Bootloaders
BeagleBoard-xM BootloadersBeagleBoard-xM Bootloaders
BeagleBoard-xM Bootloaders
 
Armboot process zeelogic
Armboot process zeelogicArmboot process zeelogic
Armboot process zeelogic
 
Raspberry Pi tutorial
Raspberry Pi tutorialRaspberry Pi tutorial
Raspberry Pi tutorial
 
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
 
建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card建構嵌入式Linux系統於SD Card
建構嵌入式Linux系統於SD Card
 
5. boot process
5. boot process5. boot process
5. boot process
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
Block Drivers
Block DriversBlock Drivers
Block Drivers
 
Hypervisor and VDI security
Hypervisor and VDI securityHypervisor and VDI security
Hypervisor and VDI security
 
Grub2 Booting Process
Grub2 Booting ProcessGrub2 Booting Process
Grub2 Booting Process
 
Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server
 
my Windows 7 info
my Windows 7 infomy Windows 7 info
my Windows 7 info
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
File000124
File000124File000124
File000124
 
Tkos secure boot_lecture_20190605
Tkos secure boot_lecture_20190605Tkos secure boot_lecture_20190605
Tkos secure boot_lecture_20190605
 
C C N A Day2
C C N A  Day2C C N A  Day2
C C N A Day2
 
Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 

Mehr von SysPlay eLearning Academy for You (16)

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
 
Introduction to BeagleBone Black
Introduction to BeagleBone BlackIntroduction to BeagleBone Black
Introduction to BeagleBone Black
 
Introduction to BeagleBoard-xM
Introduction to BeagleBoard-xMIntroduction to BeagleBoard-xM
Introduction to BeagleBoard-xM
 
Platform Drivers
Platform DriversPlatform Drivers
Platform Drivers
 
Serial Drivers
Serial DriversSerial Drivers
Serial Drivers
 
SPI Drivers
SPI DriversSPI Drivers
SPI Drivers
 
I2C Drivers
I2C DriversI2C Drivers
I2C Drivers
 
Linux System
Linux SystemLinux System
Linux System
 

Kürzlich hochgeladen

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 

Kürzlich hochgeladen (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

BeagleBone Black Booting Process

  • 1. © 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. BeagleBone Black Booting Process
  • 2. 2© 2015-17 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 U-Boot Serial Booting Adding the command in U-Boot
  • 3. 3© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. PC Booting Process Power-Up / Reset Operation BIOS (POST) Primary Bootloader (446 Bytes) Primary Bootloader (446 Bytes) 0XAA55 Partition Table (64 Bytes) GRUB/LILO (Kernel Loader) Kernel Initrd Init (User Space App.) System Startup Stage 1 Bootloader Stage 2 Bootloader KernelStage 2 Bootloader User Space
  • 4. 4© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. BBB Memory Organization DDR 512MB ROM Internal RAM 128KB SOC BeagleBone Black 0x80000000 0x40200000 0x402F0400 EMMC 4GB Ext. MMC
  • 5. 5© 2015-17 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
  • 6. 6© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. BBB Images ROM Code X-loader SOC BeagleBone Black ROM Internal RAM DDR u-boot bbb.dtb uImage Ramdisk/initrd (Ramdisk Boot)
  • 7. 7© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. AM335x Processor Boot Modes Memory Booting NAND, NOR, MMC Peripheral Booting USB, UART, Ethernet The Order / Sequence is determined by The set of GPIO configuration pins called SYSBOOT pins (5 pins)
  • 8. 8© 2015-17 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
  • 9. 9© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Board Bring Up Spoil the board Delete u-boot.img, uImage and user.txt Get the u-boot.img and user.txt Change the ipaddr in user.txt Reboot the board Press the user button until countdown This will boot the board with ramdisk Re-partition the card Create 3 partitions and filesystem on them Restore the required images Get MLO, u-boot.img, uEnv.txt and am335x-boneblack.dtb Get the RootFs.xz in second partition and untar the same
  • 10. 10© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Recovering the Board Copy the user.txt and u-boot.img tftp -g <serverip> -r u-boot_bringup.img -l u-boot.img tftp -g <serverip> -r user.txt -l user.txt Change the ip address in user.txt Delete the kernel - /boot/zImage Delete the Root Filesystem Reboot the system
  • 11. 11© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. SD Card Partitioning fdisk /dev/mmcblk0 Create a windows partition of 116MB Make it bootable Create two primary Linux partitions of sizes 3GB and 1GB approx
  • 12. 12© 2015-17 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 RootFs.xz tar -zxvf RootFs.xz Copy u-boot_bringup.img, user.txt and uEnv.txt in vfat partition tftp -g <server_ip> -r u-boot_bringup.img -l u-boot.img tftp -g <server_ip> -r user.txt tftp -g <server_ip> -r uEnv.txt tftp -g <server_ip> -r am335x-boneblack.dtb
  • 13. 13© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Board Bring up Hands On Delete all the contents of External SD card Get the MLO, u-boot.img, user.txt Press the boot switch to change the booting sequence Kernel boots with ramdisk Re-partition the card and create the filesystem(vfat on first partition and Ext2 on other two) Get the MLO, u-boot.img, am335x-boneblack.dtb, uEnv.txt and user.txt in first partition Get the Root Filesystem in second partition
  • 14. 14© 2015-17 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
  • 15. 15© 2015-17 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
  • 16. 16© 2015-17 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
  • 17. 17© 2015-17 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
  • 18. 18© 2015-17 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
  • 19. 19© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Check Name the Stage 1 & Stage 2 bootloaders Desktops Embedded Systems
  • 20. 20© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. U-Boot
  • 21. 21© 2015-17 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
  • 22. 22© 2015-17 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)
  • 23. 23© 2015-17 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
  • 24. 24© 2015-17 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 109K 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.
  • 25. 25© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. BBB Serial Booting ROM Code X-loader SOC ROM Internal RAM DDR u-boot bbb.dtb uImage Ramdisk/initrd (Ramdisk Boot) X-Loader u-boot
  • 26. 26© 2015-17 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.img) Cleaning up make clean
  • 27. 27© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Adding the Command in U-Boot 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: func 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
  • 28. 28© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. What all have learnt? PC Booting Process Beagle Booting Process Booting through SD Card Partitioning & Creating Root Filesystem W's of Bootloaders U-Boot Serial Booting Adding the command in U-Boot
  • 29. 29© 2015-17 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved. Any Queries?