BeagleBoard Fast Boot

Hui Chen Keji Ren
Dec 10th, 2009

EE382N-4 Project

Outline • Motivation • Objectives • Hardware of BeagleBoard • Techniques in optimizing boot time • Boot time result • Conclusions • Future work • Live demo EE382N-4 Project .

Motivation: Why Faster Boot Time? Boot time definition: Time from turning on power to a shell welcome prompt (or a GUI). • Impact the first perception an end user has of the product • Critical to obtain a positive end user experience • Save power EE382N-4 Project .

Linux Kernel 3. EE382N-4 Project . user-space applications • Achieve a 5-second fast boot time in BeagleBoard.Objectives • Optimize software in BeagleBoard for speed 1. bootloader 2. Original boot time second was about 15 seconds.

USB 2.BeagleBoard Hardware • OMAP 3530 Processor 600 MHz ARM Cortex-A8 with NEON A8 • 256MB on-chip RAM • 256MB NAND Flash • Peripheral I/Os DVI-D. S-Video. SD/MMC+. RS232 Serial • Power USB or 5V DC EE382N-4 Project .0 Video. Stereo In/Out.

Serial Cable Setup We made a customized Null Modem cable to connect BeagleBoard to PC's serial port. EE382N-4 Project .

Boot Sequence EE382N-4 Project .

Strategies • Load from NAND Flash X-loader/u-boot loading speed in SVC32 cpu mode: NAND = 1MB. integration check and data movement We modified u-boot to 1. MMC = 500KB/s boot NAND’s block size is 128 KB per reading. Embed configuration environments into u u-boot (instead of reading from NAND) 2. • Remove unnecessary initialization. We modified x x-loader to only load 2 blocks (instead of 7 blocks originally). Remove Kernel relocation in u-boot (skip the 64 boot 64-byte header of Linux image) EE382N-4 Project . Turn off Kernel CRC check 3.

) • Reduce user response time 1. Turn off serial output by passing 'quiet' parameter to Kernel • Reduce code size (x-loader. EE382N-4 Project . space • Remove unnecessary functionalities in Kernel and avoid modules We compiled a 1. kernel and We used '-Os -mthumb'' flag to compile all code (x user-space applications). Code size wins hands down. network. Set bootdelay to zero in u-boot (so user can't interrupt u boot u-boot) 2. u-boot.6.2MB 2.Strategies (cont. ext3/JFFS2 and a driver for our Pegasus USB Ethernet adapter.29 Kernel with USB.

remove unused tty and rc scripts. EE382N-4 Project . 2. Minimize init script: disable syslogd and klogd.Strategies (cont. Build Linux rootfs from scratch. we reduced total size of rootfs to about 780KB without losing desired features. Instead we use Ext2.) • User-space optimization 1. We didn't choose JFFS2 on NAND due to the buggy Linux driver. By carefully tuning uclibc and busybox. • Choose faster file system Ext3 needs journal daemon whose loading time varies (can be over one second).

565348] < 0...000027> DRAM: 256 MB Boot time was measured by using ptx_ts script from host [ 0...329953> Uncompressing Linux. [ 2. OK [ 1. don booting the done.003899> Board revision C prompt is 2....000005] < 0.232178] < 0.0..92 seconds without network.000029> OK [ 1.232136] < 0...005786> Loading Kernel Image .263485] < 0. [ 1..000005> Texas Instruments X-Loader 1.263444] < 0.027917> Please press Enter to activate this console.000041> Hit any key to stop autoboot: 0 [ 0.000019> Err: serial Total boot time from power on to terminal welcome [ 0.003893> [ 1...279992> 1191936 bytes read: OK [ 1..551374] < 1....06-rc2-dirty (Dec 08 2009 .....003808] < 0...565392] < 0...000044> Starting kernel .000042> [ 0.000055> OMAP3 Beagle board + LPDDR/NAND [ 0.251298] < 0......bin from nand [ 0...267380] < 0.000018> [ 1.2 (Dec 8 2009 .011339> NAND: 256 MiB Linux PC: [ 0..23:36:42) Loader [ 0.....Boot Time Result [ 0....239932] < 0... kernel..561426] < 0.224471> [ 0.004002> NAND read: device 0 offset 0x280000...003803> Loading u-boot.565410] < 0.. EE382N-4 Project ...007699> OMAP3530-GP ES3... CPU-OPP2 L3-165MHz 165MHz [ 0..004266> ## Booting kernel from Legacy Image at 80007fc0 .. size 0x123000 [ 1.259526] < 0..000053> Out: serial [ 0....228279] < 0....555640] < 0....003787> U-Boot 2009.895363] < 0.....008175> In: serial $ picocom --b 115200 -d 8 /dev/ttyS0 | ptx_ts 'Texas' [ 0.000070> [ 0.228349] < 0.23:47:30) dirty [ 0.. [ 1...923280] < 1..259545] < 0.003895> [ 0...239959] < 0..4..271382] < 0..239877] < 0.259473] < 0.561455] < 0.. [ 0........

28 0.22 1.07 2.92 EE382N-4 Project .27 0.Boot time composition Delay (second) Loading u-boot from NAND Loading Kernel from NAND Execution (x-loader + u-boot) Uncompressing Kernel Execution (Kernel) Mounting Memory Card User-space applications Total 0.29 0.73 0.06 0.

Compiler optimization techniques (we believe we found a defect in Code Sourcery's latest ARM gcc compiler/library) EE382N-4 Project .com/p/swiftbeagle/ • We obtained a good understanding on 1. all modified source code and binaries: http://code. We established a website with wiki pages. 3. Patching Kernel source 4.google. development of S-Boot is still in debugging phase and Kernel stalls after uncompressing itself. BeagleBoard hardware 2. We wrote our own bootloader called S-Boot. What are required in writing a bootloader (such as disabling MMU/dcache. Building a Linux rootfs from scratch 5. detecting machine ID and passing ATAGS to Kernel). However.Conclusions • • We achieved shorter boot time than we expected expected.

28 0. faster NAND driver. uncompressed Kernel and faster FS(JFFS2 on MTD).07 0.Future Work: What Would Be Different? 0.29 0.27 0.22 1. Delay (second) Loading u-boot from NAND Loading Kernel from NAND Execution (x-loader + u-boot) Uncompressing Kernel Execution (Kernel) Mounting Memory Card User-space applications Total 0.42 Optimization to use XIP/driver XIP/driver uncompressed Kernel faster FS/driver EE382N-4 Project .73 0.5 second boot can be realized by utilizing XIP(Execution in Place).06 0.

Demo Time EE382N-4 Project .

Sign up to vote on this title
UsefulNot useful