U Boot or Universal Bootloader
Upcoming SlideShare
Loading in...5
×
 

U Boot or Universal Bootloader

on

  • 20,807 views

U Boot or Universal Bootloader

U Boot or Universal Bootloader

Statistics

Views

Total Views
20,807
Views on SlideShare
20,767
Embed Views
40

Actions

Likes
3
Downloads
463
Comments
3

6 Embeds 40

http://www.slideshare.net 31
http://www.slashdocs.com 4
http://www.linkedin.com 2
http://webcache.googleusercontent.com 1
http://www.techgig.com 1
http://115.112.206.131 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

13 of 3 Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Slides 6, 7 are specific to ADI Black Fin Processor, possibly you will get specific details from ADI Website.
    Are you sure you want to
    Your message goes here
    Processing…
  • Good article. I liked it. But still there is a problem: slides number 6 and 7 are almost empty (only titles are in them)
    Thanks a lot once more.
    Are you sure you want to
    Your message goes here
    Processing…
  • Good article
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Slide NOTE: Help the field to keep the messages clean and clear to customers, and add speaker notes for their use. Include at least major bullet points to be used as discussion points with customers during a presentation.

U Boot or Universal Bootloader U Boot or Universal Bootloader Presentation Transcript

  • Das U-Boot
  • Boot Terminology
    • Loader
      • Program that moves bits from non volatile memory to memory and then transfers CPU control to the newly “loaded” bits (executable)
    • Bootloader / Bootstrap
      • Program that loads the “first program” (the kernel)
    • Boot PROM
      • Persistent code that is “already loaded” on power-up
    • Boot Manager
      • Program that lets you choose the “first program” to load
  • What’s a Loader?
    • A program that moves bits from flash or disk to memory and then transfers control to the newly loaded bits (executable).
    cpu loader flash bits memory bits
  • Loading through Das U-boot SDRAM Memory Root File-System Kernel ROM Kernel Image Bootloader uboot Root File System Reset Bootloader uboot CPU BMODE 00 ByPass PROM 0x20000000 0x1000 Optional compressed
  • Das U-Boot
    • The "Universal Bootloader" ( "Das U-Boot") is a monitor/MicroOS program.
    • Started in October of 1999 by Dan Malek, supported by Wolfgang Denk (Denx Engineering) as of July 2000
    • Free Software: full source code under GPL
      • Hosted on SourceForge: http://sourceforge.net/projects/u-boot ·
    • Production quality:
      • Used as default boot loader by several board vendors ·
    • Portable and easy to port and to debug
    • Many supported architectures: PPC, ARM, MIPS, x86, m68k, NIOS, Microblaze, and Blackfin
      • More than 216 boards supported by public source tree
  • Blackfin U-boot features
  • Where to get U-boot sources
  • User Interface (1)
    • U-Boot uses a simple command line interface (CLI), usually over a serial console port.
    • Two different command interpreters are available:
      • Simple CLI ·
      • Bourne compatible shell (HUSH shell from Busybox) ·
    • Configuration parameters and commands / command sequences (scripts !) can be stored in "environment variables" which can be saved to non-volatile storage (flash, EEPROM, NVRAM, etc.)
  • User Interface (2)
    • U-Boot supports many different ways to load and boot an image.
      • Serial Port: "loads" (S-Record), "loadb" (Kermit binary protocol)
      • Ethernet: "tftp", "bootp", "dhcp", "nfs“
      • Harddisk, CDROM: "ide read"
      • CompactFlash card etc.: "ide read"
      • USB Mass Storage Device: "usb read"
      • SCSI Disk and CDROM: "scsi read"
      • NAND flash with JFFS2 filesystem: "nboot"
      • Disk on Chip: "doc read"
      • PCI Bus: copy
    • Commands
    • Environment Variables Commands
      • Printenv
      • saveenv
      • Askenv
      • setenv
      • run
      • Bootd
    • Memory Commands
    • Flash Memory Commands
    • Execution Control Commands
    • Network Commands
      • Bootp
      • Cdp
      • dhcp
      • loadb
      • oads
      • Nfs
      • ping
      • rarpboot
      • tftpboot
    • Information Commands
      • bdinfo
      • coninfo
      • flinfo
      • iminfo
      • imls
      • help
  • Boot Image
    • Image:
      • Header + Payload
    • Header:
      • Creation Timestamp
      • Data Load Address
      • Entry Point Address
      • Data CRC Checksum
      • Operating System
      • CPU architecture
      • Image Type
      • Compression Type
      • Image Name
    • Actions:
      • test CPU architecture and OS
      • test checksum (optional)
      • if compressed, uncompress
      • copy to load address
      • prepare boot arguments
      • start at entry point
  • Image Types
    • Standalone Programs
    • OS Kernel Images
    • RAMDisk Images
    • Multi-File Images
    • Firmware Images
    • Script files
  • Configuring U-Boot
    • Configuration depends on the combination of board and CPU type; all such information is kept in a configuration file &quot;include/configs/<board_name>.h&quot;.
      • Example: For a STAMP board, all configuration settings are in &quot;include/configs/stamp.h&quot;.
    • For all supported boards there are ready-to-use default configurations available; just type &quot;make <board_name>_config&quot;.
      • Example: For the STAMP board type:
          • cd u-boot
          • make stamp_config
    • For configuration details, check the U-Boot README and the Wiki – docs.blackfin.uclinux.org
  • Building U-Boot (1/2)
    • Building U-Boot has been tested in x86 cross environments (running RedHat 6.x and 7.x Linux, SuSE 9.0 and 9.1 Linux on x86).
    • It is assumed that you have the GNU cross compiling tools available in your path and named with a prefix of “bfin-elf&quot;. If this is not the case, you must change the definition of CROSS_COMPILE in Makefile.
  • Building U-Boot (2/2)
    • U-Boot is intended to be simple to build. After installing the sources you must configure U-Boot for one specific board type. This is done by typing:
        • cd u-boot
        • make clean; make mrproper
        • make stamp_config
        • make all
    • You should get some working U-Boot images ready for download to / installation on your system:
      • &quot;u-boot.bin&quot; is a raw binary image
      • &quot;u-boot&quot; is an image in ELF binary format
      • &quot;u-boot.srec&quot; is in Motorola S-Record format
  • U-Boot Source Code
    • Official U-boot Source Code is at:
      • http://sourceforge.net/projects/u-boot
    • Unofficial Blackfin Branch is at:
      • http://blackfin.uclinux.org/projects/uboot533
    • U-Boot uses a 3 level version number containing a version, a sub-version, and a patchlevel &quot;U-Boot-2.34.5&quot; means:
      • version &quot;2&quot;,
      • sub-version &quot;34&quot;, and
      • patchlevel &quot;4&quot;.
    • The patchlevel is used to indicate certain stages of development between released versions, i. e. officially released versions of U-Boot will always have a patchlevel of &quot;0&quot;.
  • More U-Boot information
    • The U-Boot project is hosted at Sourceforge: http://sourceforge.net/projects/u-boot
    • There is a pretty active u-boot-users mailing list.
    • The Mailing list archive can be viewed at sourceforge.net http://lists.sourceforge.net/lists/listinfo/u-boot-users/
    • The DENX U-Boot and Linux Guide is a Wiki based documentation documenting U-Boot and its interaction with Linux. It can be viewed (and improved) at www.denx.de. The whole DULG web packed into a single HTML page or a PDF file is also available (PowerPC is the example)
    • The current README file can be viewed through viewcvs at sourceforge.net
  • Backup slides
  • Das U-Boot
    • Introduction
    • Porting Guide
    • Directory Structure
    • Material in this presentation is taken from the project README file, and from http://www.denx.de/twiki/bin/view/UBootdoc/Presentation and http:// www.denx.de/twiki/bin/view/DULG/Manual
  • Supported Platforms 11 ARM92xT   3 ARM720T   5 StrongARM ARM 38 4xx   11 7xx/74xx   3 85xx   26 826x   15 824x   71 8xx   6 5xxx   2 5xx PPC Number of Boards Processor Architecture 3 BF533/BF535 Blackfin 1   Microblaze 3   NIOS32 1 5Kc MIPS64 3 Au1x00   2 4Kc MIPS32 2 Coldfire m68k 2 SC520 x86 8 XScale   1 AT91RM9200   1 S3C44B0 ARM (cont) Number of Boards Processor Architecture
  • Das U-boot Design Principles
    • Easy to port to new architectures, new processors, and new boards
    • Easy to debug: serial console output as soon as possible ·
    • Features and commands configurable ·
    • As small as possible ·
    • As reliable as possible
  • Image Support
    • Although U-Boot can support any OS or standalone application, the main focus has always been on Linux during the design of U-Boot.
    • U-Boot includes many features that so far have been part of some special &quot;boot loader&quot; code within the Linux kernel. Also, any &quot;initrd&quot; images to be used are no longer part of one big Linux image; instead, kernel and &quot;initrd&quot; are separate images.
  • U-Boot Basic Command Set (1/4)
    • Information Commands
      • bdinfo - print Board Info structure ¨
      • coninfo - print console devices and informations
      • flinfo - print FLASH memory information
      • iminfo - print header information for application image
      • imls - list all images found in flash
      • help - print online help
    • Memory Commands
      • base - print or set address offset
      • crc32 - checksum calculation
      • cmp - memory compare
      • cp - memory copy
      • md - memory display
      • mm - memory modify (auto-incrementing)
      • mtest - simple RAM test
      • mw - memory write (fill)
      • nm - memory modify (constant address)
      • loop - infinite loop on address range
    • Flash Memory Commands
      • cp - memory copy (program flash)
      • flinfo - print FLASH memory information
      • erase - erase FLASH memory
      • protect - enable or disable FLASH write protection
    • Execution Control Commands
      • autoscr - run script from memory
      • bootm - boot application image from memory
      • bootelf - Boot from an ELF image in memory
      • bootvx - Boot vxWorks from an ELF image
      • go - start application at address 'addr'
  • U-Boot Basic Command Set (2/4)
    • Network Commands
      • bootp - boot image via network using BOOTP/TFTP protocol
      • cdp - Perform Cisco Discovery Protocol network configuration
      • dhcp - invoke DHCP client to obtain IP/boot params
      • loadb - load binary file over serial line (kermit mode)
      • loads - load S-Record file over serial line
      • nfs - boot image via network using NFS protocol
      • ping - send ICMP ECHO_REQUEST to network host
      • rarpboot- boot image via network using RARP/TFTP protocol
      • tftpboot- boot image via network using TFTP protocol
    • Environment Variables Commands
      • printenv- print environment variables
      • saveenv - save environment variables to persistent storage
      • askenv - get environment variables from stdin
      • setenv - set environment variables
      • run - run commands in an environment variable
      • bootd - boot default, i.e., run 'bootcmd'
  • U-Boot Basic Command Set (3/4)
    • Filesystem Support (FAT, cramfs, JFFS2, Reiser)
      • chpart - change active partition
      • fsinfo - print information about filesystems
      • fsload - load binary file from a filesystem image
      • ls - list files in a directory (default /)
      • fatinfo - print information about filesystem
      • fatls - list files in a directory (default /)
      • fatload - load binary file from a dos filesystem
      • nand - NAND flash sub-system
      • reiserls- list files in a directory (default /)
      • reiserload- load binary file from a Reiser filesystem
    • Special Commands
      • i2c - I2C sub-system
      • doc - Disk-On-Chip sub-system
      • dtt - Digital Thermometer and Themostat
      • eeprom - EEPROM sub-system
      • fpga - FPGA sub-system
      • ide - IDE sub-system
      • kgdb - enter gdb remote debug mode
      • diskboot- boot from IDE device
      • icache - enable or disable instruction cache
      • dcache - enable or disable data cache
      • diag - perform board diagnostics ( POST code)
      • log - manipulate logbuffer
      • pci - list and access PCI Configuraton Space
      • regdump - register dump commands
      • usb - USB sub-system
      • sspi - SPI utility commands
  • U-Boot Basic Command Set (4/4)
    • Miscellaneous Commands
      • bmp - manipulate BMP image data ¨
      • date - get/set/reset date & time ¨
      • echo - echo args to console ¨
      • exit - exit script ¨
      • kbd - read keyboard status ¨
      • in - read data from an IO port ¨
      • out - write datum to IO port ¨
      • reset - Perform RESET of the CPU ¨
      • sleep - delay execution for some time ¨
      • test - minimal test like /bin/sh ¨
      • version - print monitor version ¨
      • wd - check and set watchdog ¨
      • ? - alias for 'help' ¨