NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

DM81XX Quick Boot Measurements

From Texas Instruments Wiki
Jump to: navigation, search
TIBanner.png
DM81XX Quick Boot Measurements
Linux PSP
IMPORTANT

DM816x refers to DM816x/AM389x devices unless specified.
DM814x refers to DM814x/AM387x devices unless specified.
DM81xx refers to both DM816x, DM814x and DM813x.


Quick-boot Measurements[edit]

Platform Boot Device u-boot boot time (sec) reading uImage (2.14MB)(sec) kernel + file system (sec) total time (sec)
DM8148 SD Card 0.625 2.675 3.5 (13.4 MB) 6.8
DM8168 SD Card 0.719 2.719 2.654 (13.4 MB) 6.092

TI8148 The total boot-time was ~6.8 secs

The break-up of the boot-time was: Booting the compressed kernel (calculated from the time U-Boot displays "## Booting...") : 3.5 secs Reading the 2.14MB uImage from SD card : 2.675 secs Misc time in U-Boot : 0.625 secs


TI8168 The total boot-time was ~6.092 secs

The break-up of the boot-time was: Booting the compressed kernel (calculated from the time U-Boot displays "## Booting...") : 2.654 secs Reading the 2.14MB uImage from SD card : 2.72 secs Misc time in U-Boot : 0.719 secs

NoteNote: The current quick-boot config only includes the u-boot patches. We can further reduce the boot time by applying the kernel patches and removing the unwanted driver modules.

Building U-Boot[edit]

ROM boot loader for SD Boot limits the (FAT32/VFAT) file size of the loader binary to max of 128K. Due to this reason we adopt a 2 stage boot strategy when booting out of SD card. In the first stage a very minimal version of U-Boot (just enough to support SD in u-boot - u-boot.min.sd/MLO) is booted by the RBL from the SD media. The second stage then boots the actual u-boot binary (u-boot.bin from SD card) that has extended support for other peripherals like NAND/NOR/SPI/I2C etc.

U-Boot quick-boot 1st stage for SD[edit]

Quick-boot enable a faster booting using the SD card images . Quick boot removed the boot delay and suppress the console message from the u-boot. It uses a separate configuration file "include/configs/ti8168_config_quick_mmc.h" for building the quick-boot images.Please follow the steps to build 1st stage quick-boot images for mmc.

$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_config_quick_mmc_min
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti

This will generate a file u-boot.min.sd which needs to be renamed to MLO.

U-Boot quick-boot 2nd stage for SD[edit]

The 2nd stage quick-boot images for mmc is generated from the same quick-boot config file "include/configs/ti8168_config_quick_mmc.h". The u-boot image will load the kernel from the sd card.The env "quite" is passed by default from the u-boot . Normal messages about hardware detection at boot are suppressed ,only important and system critical kernel messages are printed to the console. It also avoid the boot delay by setting it to 0 .

$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm distclean
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm ti8168_evm_config_quick_mmc
$ make CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm u-boot.ti

This will generate binaries named u-boot.noxip.bin and u-boot.bin. Use u-boot.bin for boot from mmc.

Boot-time measurement Setup[edit]

For boot-time measurement the following setup was used

The kernel image used had the following features enabled (uImage from release package)

  • NAND driver
  • Block devices
  • SCSI devices
  • PCI/PCIe Subsystem (Root Complex mode)
  • SATA drivers
  • Network device support
  • I2C support
  • SPI support
  • GPIO support
  • WDT support
  • Sound card support
  • HID devices
  • USB support
  • MMC/SD/SDIO support
  • AVS driver
  • Loadable module support
  • Filesystem support for ext2, ext3, JFFS2 and NFS

Setting Up Boot Environment on SD Card[edit]

This section describes steps to be followed to create a standalone power-on bootable system on SD card.

Prerequisites Ensure that following is available:

  • A Linux host with fdisk, sfdisk, mkfs.ext3 and mkfs.vfat utilities is available
  • U-boot MLO, u-boot.bin (binaries build using quick-boot config)
  • uImage, nfs.tar.gz and mksd-ti814x.sh from release package to a directory on this Linux machine. For subsequent description, we will assume these files are copied to /home/ti814x.Please refer "Package Contents" section in DM814x_C6A814x_AM387x_PSP_User_Guide for location of these files.
  • Empty SD card (at least 256MB, preferably 4GB SDHC)
  • A SD memory card reader/programmer to copy files from Linux Host
  Note: The SD Boot has some specific restriction about the format of the 1st partition and copying the MLO image.
        So it is recommended that the supplied script mksd-ti814x.sh is used for creating partitions and copying files. 

Steps

  • Connect the SD memory card using Memory Card reader to the Linux Host
  • Note the name allotted for this device. We assume the device is named as "/dev/sdd"
  • Navigate to the /home/ti814x directory where all the mentioned files are copied
  • Ensure that the script mksd-ti814x.sh has executable permissions
  • This scripts expects arguments in the following format
./mksd-ti814x.sh <sd-device-name> <sd-1st-stage-bootloader> <sd-2nd-stage-bootloader> <kernel-uImage> <filesystem>
  • Note that the user will require root/sudo permissions
  • In our example, we run the following command
sudo ./mksd-ti814x.sh /dev/sdd MLO u-boot.bin uImage nfs.tar.gz
  • You will be asked about data getting overwritten, confirm it and the files along with filesystem will be copied to SD card
  • Note that this script will create two primary partitions:
    • 1st partition is formatted as FAT32 containing MLO, u-boot.bin, uImage files
    • 2nd partition is formatted as ext3 where the filesystem is extracted in root


Boot using SD card[edit]

Once the SD card has been setup as described in the previous section make sure the switch setting are set for SD boot mode and then plug in the SD card in the MMC/SD card slot on the EVM.Connect the EVM to you host pc through a serial connector.

Identify markers for Mesurement [edit]

As discussed above, the overall boot process involves boot-loader(s), Linux kernel and the filesystem. We must identify the markers in the boot log that can be used as delimiters for each stage of the boot process. This helps in determining the time spent in each stage.

  • u-boot
    The banner containing the U-Boot version indicates the start of u-boot.
    U-Boot 2010.06-00203 (Aug 30 2011 - 13:50:39)
  • Linux kernel
    First line after this indicates the start of Linux kernel:
    Uncompressing Linux... done, booting the kernel.
  • File System
    [root@evm /]#

Developers with intimate knowledge of the source code can point that some of the strings are printed much after the start (e.g. U-boot banner) or much before (e.g. filesystem marker) the actual event. While this is definitely true, these markers serve the purpose well.

Boot Log[edit]

TeraTerm v4.69, terminal emulator program was used to capture the logs

[Tue Aug 30 13:53:24.970 2011] U-Boot 2010.06-00203-ge4833dc-dirty (Aug 30 2011 - 13:50:39)
[Tue Aug 30 13:53:24.986 2011] 
[Tue Aug 30 13:53:24.986 2011] I2C:   ready
[Tue Aug 30 13:53:24.986 2011] DRAM:  2 GiB
[Tue Aug 30 13:53:24.986 2011] NAND:  HW ECC Hamming Code selected
[Tue Aug 30 13:53:25.001 2011] 256 MiB
[Tue Aug 30 13:53:25.001 2011] Using default environment
[Tue Aug 30 13:53:25.001 2011] 
[Tue Aug 30 13:53:25.080 2011] MMC:   OMAP SD/MMC: 0
[Tue Aug 30 13:53:25.080 2011] Net:   <ethaddr> not set. Reading from E-fuse
[Tue Aug 30 13:53:25.095 2011] Detected MACID:90:d7:eb:c3:f6:33
[Tue Aug 30 13:53:25.095 2011] cpsw
[Tue Aug 30 13:53:25.111 2011] Hit any key to stop autoboot:  0 
[Tue Aug 30 13:53:25.205 2011] reading uImage
[Tue Aug 30 13:53:27.986 2011] 
[Tue Aug 30 13:53:27.986 2011] 2449108 bytes read
[Tue Aug 30 13:53:27.986 2011] ## Booting kernel from Legacy Image at 81000000 ...
[Tue Aug 30 13:53:27.986 2011]    Image Name:   Linux-2.6.37+
[Tue Aug 30 13:53:28.001 2011]    Image Type:   ARM Linux Kernel Image (uncompressed)
[Tue Aug 30 13:53:28.001 2011]    Data Size:    2449044 Bytes = 2.3 MiB
[Tue Aug 30 13:53:28.001 2011]    Load Address: 80008000
[Tue Aug 30 13:53:28.017 2011]    Entry Point:  80008000
[Tue Aug 30 13:53:28.017 2011]    Loading Kernel Image ... OK
[Tue Aug 30 13:53:29.423 2011] OK
[Tue Aug 30 13:53:29.423 2011] 
[Tue Aug 30 13:53:29.423 2011] Starting kernel ...
[Tue Aug 30 13:53:29.423 2011] 
[Tue Aug 30 13:53:29.423 2011] Uncompressing Linux... done, booting the kernel.
[Tue Aug 30 13:53:30.189 2011] Trying to install type control for IRQ375
[Tue Aug 30 13:53:30.189 2011] Trying to set irq flags for IRQ375
[Tue Aug 30 13:53:30.205 2011] pm_dbg_init: only OMAP3 supported
[Tue Aug 30 13:53:30.392 2011] omap_voltage_late_init: Voltage driver support not added
[Tue Aug 30 13:53:30.908 2011] 
[Tue Aug 30 13:53:30.939 2011]     Booting Linux (2.6.37+)
[Tue Aug 30 13:53:30.939 2011] 
[Tue Aug 30 13:53:30.939 2011]  Mounting filesystems       :  [SUCCESS]
[Tue Aug 30 13:53:30.939 2011]  Mounting /dev/shm          :  [SUCCESS]
[Tue Aug 30 13:53:30.939 2011]  Mounting /dev/pts          :  [SUCCESS]
[Tue Aug 30 13:53:30.939 2011]  Enabling hot-plug          :  [SUCCESS]
[Tue Aug 30 13:53:31.220 2011]  [SUCCESS]
[Tue Aug 30 13:53:31.251 2011]  Starting syslogd           :  [SUCCESS]
[Tue Aug 30 13:53:31.251 2011]  Starting telnetd           :  [SUCCESS]
[Tue Aug 30 13:53:31.283 2011] 
[Tue Aug 30 13:53:31.283 2011] System ready.
[Tue Aug 30 13:53:31.283 2011] Jan  1 00:00:01 evm syslog.info syslogd started: BusyBox v1.17.2
[Tue Aug 30 13:53:31.283 2011] Jan  1 00:00:01 evm daemon.info init: starting pid 73, tty : '-/bin/sh'
[Tue Aug 30 13:53:31.283 2011] 
[Tue Aug 30 13:53:31.283 2011]     Setting up the shell... Done!
[Tue Aug 30 13:53:31.283 2011] [root@evm /]#

..

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DM81XX Quick Boot Measurements here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DM81XX Quick Boot Measurements here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article DM81XX Quick Boot Measurements here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article DM81XX Quick Boot Measurements here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article DM81XX Quick Boot Measurements here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DM81XX Quick Boot Measurements here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DM81XX Quick Boot Measurements here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article DM81XX Quick Boot Measurements here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article DM81XX Quick Boot Measurements here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity