Your SlideShare is downloading. ×
Booting Process of Beagle Board
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Booting Process of Beagle Board


Published on

Published in: Technology

1 Comment
  • Why is this slide, disabled to save?
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. BeagleBoard Booting Process © 2012-14 SysPlay Workshops <> All Rights Reserved.
  • 2. 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 © 2012-14 SysPlay Workshops <> 2 All Rights Reserved.
  • 3. PC Booting Process System Startup Stage 1 Bootloader Stage 2 Bootloader Kernel Init © 2012-14 SysPlay Workshops <> 3 All Rights Reserved. Power-Up / Reset Operation
  • 4. General Booting of BeagleBoard Image under “CC BY-SA 3.0 US” from © 2012-14 SysPlay Workshops <> 4 All Rights Reserved.
  • 5. 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) © 2012-14 SysPlay Workshops <> 5 All Rights Reserved.
  • 6. 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 © 2012-14 SysPlay Workshops <> 6 All Rights Reserved.
  • 7. Recovering the Board Copy the user.txt and u-boot.bin tftp -g <serverip> -r u-boot_destroy.bin -l u-boot. © 2012-14 SysPlay Workshops <> 7 All Rights Reserved. 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. 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. © 2012-14 SysPlay Workshops <> 8 All Rights Reserved.
  • 9. 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 -r Narcisus.tgz tar -zxvf Narcisus.tgz Copy u-boot_destroy.bin, user.txt and uEnv.txt in vfat partition tftp -g -r u-boot_destroy.bin -l u-boot.bin tftp -g -r user.txt tftp -g -r uEnvAng.txt -l uEnv.txt © 2012-14 SysPlay Workshops <> 9 All Rights Reserved.
  • 10. 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 © 2012-14 SysPlay Workshops <> 10 All Rights Reserved.
  • 11. 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 © 2012-14 SysPlay Workshops <> 11 All Rights Reserved.
  • 12. 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 © 2012-14 SysPlay Workshops <> 12 All Rights Reserved.
  • 13. 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 © 2012-14 SysPlay Workshops <> 13 All Rights Reserved.
  • 14. 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 © 2012-14 SysPlay Workshops <> 14 All Rights Reserved.
  • 15. Check Name the Stage 1 & Stage 2 bootloaders Desktops Embedded Systems © 2012-14 SysPlay Workshops <> 15 All Rights Reserved.
  • 16. U-Boot © 2012-14 SysPlay Workshops <> 16 All Rights Reserved.
  • 17. 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 © 2012-14 SysPlay Workshops <> 17 All Rights Reserved.
  • 18. 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) © 2012-14 SysPlay Workshops <> 18 All Rights Reserved.
  • 19. 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 © 2012-14 SysPlay Workshops <> 19 All Rights Reserved.
  • 20. 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. © 2012-14 SysPlay Workshops <> 20 All Rights Reserved.
  • 21. 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 setenv ipaddr <ipaddr> Load & Import the Environmental Variables tftpboot EnvSerial.txt run importbootenv Run the command – run uenvcmd © 2012-14 SysPlay Workshops <> 21 All Rights Reserved.
  • 22. 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 © 2012-14 SysPlay Workshops <> 22 All Rights Reserved.
  • 23. 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 © 2012-14 SysPlay Workshops <> 23 All Rights Reserved.
  • 24. 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 © 2012-14 SysPlay Workshops <> 24 All Rights Reserved.
  • 25. Any Queries? © 2012-14 SysPlay Workshops <> 25 All Rights Reserved.