Beagle Board 101 Gerald Coley and Jason Kridner October 26, 2008 Embedded Systems Conference - Boston.

Download Report

Transcript Beagle Board 101 Gerald Coley and Jason Kridner October 26, 2008 Embedded Systems Conference - Boston.

Beagle Board 101
Gerald Coley and Jason Kridner
October 26, 2008
Embedded Systems Conference - Boston
Agenda



Overview of the Beagle Board
 Board features and community
 Booting the Beagle Board
 OMAP3530 applications processor overview
Building community and collaborating
 What, why, who, and how of open source
 Collaboration tools
 Community participation with Git
 Community participation with Open Embedded
 Managed, native, and web-based UI code development
Conclusion
 Running demo images
 Resources for more information and support
What’s in a name…
B ring your own peripherals
E ntry-level cost ($149)
A rm Cortex-A8 (600MHz, superscaler)
G raphics and DSP / Video accelerated
L inux and open source community
E nvironment for software innovators
Targeting community development
$149
> 900 participants
and growing
Active &
technical
community
Open access to
hardware
documentation
Opportunity
to tinker and
learn
Personally
affordable
Wikis, blogs,
promotion of
community
activity
Freedom to
innovate
Addressing
open source
community
needs
Instant access to
>10 million lines
of code
Free
software
Fast, low power, flexible expansion
OMAP3530 Processor
 600MHz Cortex-A8
 NEON+VFPv3
 16KB/16KB L1$
 256KB L2$
 430MHz C64x+ DSP
 32K/32K L1$
 48K L1D
 32K L2
 PowerVR SGX GPU
 64K on-chip RAM
POP Memory
 128MB LPDDR RAM
 256MB NAND flash
3”
Peripheral I/O
 DVI-D video out
 SD/MMC+
 S-Video out
 USB 2.0 HS OTG
 I2C, I2S, SPI,
MMC/SD
 JTAG
 Stereo in/out
 Alternate power
 RS-232 serial
USB Powered
 2W maximum consumption
 OMAP is small % of that
 Many adapter options
 Car, wall, battery, solar, …
And more…
Other Features
 4 LEDs
 USR0
 USR1
 PMU_STAT
 PWR
 2 buttons
 USER
 RESET
 4 boot sources
 SD/MMC
 NAND flash
 USB
 Serial
On-going collaboration at BeagleBoard.org
 Live chat via IRC for 24/7 community support
 Links to software projects to download
3”
Peripheral I/O
 DVI-D video out
 SD/MMC+
 S-Video out
 USB HS OTG
 I2C, I2S, SPI,
MMC/SD
 JTAG
 Stereo in/out
 Alternate power
 RS-232 serial
Desktop development
DVI-D
Power
Stereo out
SD
Stereo in
USB
Note: Beagle Board can be powered from
the alternate jack (as shown) or via USB
Development on-the-go
Power + IP
over USB
Serial
Port
Expand the Beagle Board
USRP
Stereo out
USB
Power
SD
2GB
Photo by Philip Balister
9
Benefits of low power

No fan for silent operation
 Enables use as a media hub

Use a USB cable to power the board
 Avoid carrying an additional power supply

Barrel connector power option
 Free USB OTG port for use as a host
 May use a USB-to-barrel-connector adapter
Benefits of USB 2.0 HS OTG

Acts as a ‘device’ when connected to a PC
 Provides power to board
 Able to emulate a network connection

Acts as a ‘host’ when connected to a hub
 Connect to almost endless number of USB peripherals
 Requires a mini-A to standard-A adapter cable
• See http://BeagleBoard.org/hardware for sources
Benefits of boot options

Boot from NAND, MMC/SD, serial, or USB
 Boot options all from OMAP3530 ROM

User button
 Selects alternate boot source at boot
• Default: NANDUSBserialMMC/SD
• Button pressed: USBserialMMC/SDNAND
 Avoids “bricking”
 Reusable in applications

Reset button
 Function may be altered with software
Verifying the hardware

Code images, procedure, and sources are
provided to verify the board functionality
 Links to the diagnostics found at


http://BeagleBoard.org/support
Includes bootloader, Linux kernel, and minimal file
system for testing
These sources act as examples for software
developers
Typically useful peripherals
 Available from Digi-Key

5V power supply (T450-P5P-ND)
• Frees USB port for use as a host

Null-modem serial cable (AE9879-ND)
• Useful for bootloader and boot console I/O

HDMI-to-DVI-D cable (AE10260-ND)
• Enables connection to digital monitors

USB hub (DA-70227-ND)
• Useful for adding USB peripherals
 Other

Serial adapter from IDC10 to DB9
• Needed for serial console
 Hardware specifications and recommended peripherals

http://BeagleBoard.org/hardware
 RSS feed of newly verified peripherals

http://feeds.feedburner.com/BeagleBoardPeripherals
Community is ready!
Camera streaming application
Audio processing
Linux home fileserver
Fanless multimedia/internet terminal
VLC VideoLAN
Low-cost kiosk terminal
Development platform for mobile VoIP phone CMUcam-style applications
Wearable computer
Bluez and GUI using direct frame buffering
Low cost linux pc/gaming device
Smart home
Linux thin client
I'm interested to buy 2 to 10 rev-B boards
LCD picture frame
Port xnu
(10 preferred ;) congratulations for your
Autonomous robot
Port OpenWrt
project and its spirit !
Port Google-Android
Networked digital signage
Processing images and pattern recognition
Home monitoring
No idea yet
Small linux home fileserver
I'm not interested in waiting for the platform
Mobile DTV tuner and receiver to mature any longer. Let me know how to get Port OpenMoko
Clutter & Qt development
Port OKL4
hold of a beagleboard now.
Powerful nas with media server and transcoding capabilities
Autonomous vehicles
Home security cameras and powered-curtains
After discussing with my dev guys,
I confirm I would like to order
I'd like my students to design and build
Bachelor thesis
20 beagleboards
Media centre hardware and software to do for Linux what
SDR platform
TimeCapsule does for MacOS
Speech recognition applications
Vehicle telematics Project for masters degree
Linux/Firefox web add-on for the TV in the house
How do they get started?
How to get started, step #1
Order via

Four primary user activities on site
 Buy a board
 Learn how to use existing projects
 Learn how to join or start a project
 Learn about the latest project news

Plans for site
 Multi-lingual
 Wiki-like editing-through-web
 Keep website source open & leverage OpenID
 Facilitates open source community



Aggregates blogs and other important information for users
Provide community chat for collaboration and answer
exchange
“Of, by, and for” community members

Focus project developments “upstream”
 Promotes community member activities
 OMAP3530 collaboration portal

• Establish long-term presence
• Solved broadest set of problems
Aggregate relevant project news “downstream”
• Inform OMAP3530 users of the broader open source world
• Avoid deluge of irrelevant information
Community projects
http://beagleboard.org/project

Ångström Linux Distribution

FFmpeg






Beagle SDR (low-power software defined radio)
Windows Embedded for BeagleBoard
Handheld.org’s Mojo Ubuntu port to ARM
Android for Beagle
Kernel and boot-loader development
And growing…
 Firefox 3.0, Epiphany-WebKit, etc.
 AbiWord, GIMP, etc.
 720P-24 MPEG4 decode on ARM+NEON only
19
Chat, mail, forums, blogs, and wikis!
 All exist because they all solve different problems
 Chat allows you to know someone’s listening
#beagle on irc.freenode.net

Great for beginning “stupid” questions and rapid coordination
 Mail allows you to reach almost anyone
http://groups.google.com/group/beagleboard


Brings them into the conversation
Provides you with a personal log on your computer
 Forums helps get the threads organized
https://community.ti.com/forums/32.aspx
(minimal activity to avoid disrupting community critical mass)
 Blogs provide emphasis, filtering, and timeliness
http://beagleboard.org/news
 Wikis enable inputs to become documentation
http://eLinux.org/BeagleBoard and http://code.google.com/p/beagleboard/wiki
Booting the Beagle Board
Equipment at ESC-Boston

DVI-D

Power
For you to keep (see box)


• Configured using MontaVista Linux
For you to use in the labs


SD
USB
Beagle Board Rev. B5
SD Card


Hub:
• Powered USB 2.0 HS
Cables:
• USB to Beagle power
• Mini-A-plug to standard-A-socket
• HDMI to DVI-D
Montior
• DVI-D
USB peripherals
• keyboard and mouse
Desktop Computer Configuration
22
Out of the box…
 Beagle Board is meant to teach


No Linux kernel or file system is typically provided
• This allows for alternative file systems
• It encourages others to provide solutions
A boot-loader is provided for basic hardware tests
• Tries to avoid people thinking the board is dead


Boot-loader is not configured to boot from anywhere
Serial connection is typical



20 “boot config” SD cards to be passed around the room
Insert card, hold USER button, apply power, and release
They take about a minute to reconfigure the flash
 A little help to move the class along
• Follow instructions at the two queries (swap SD cards)
• Completed when at the “Angstrom” login prompt
23
Typical Beagle Board boot process
http://www.ti.com/litv/pdf/sprufd6a



ROM attempts to load boot image from 4 places
 Sequence of attempts depends if USER button pressed
•
•
Not-pressed: NANDUSBserialMMC/SD
Pressed: USBserialMMC/SDNAND
•
•
•
•
Boot partition must be marked bootable and be FAT
MLO must be the first file loaded into the directory tree
Deleted/renamed files in the root directory can disturb boot
Low-level format (Cylinders/Heads/Sectors) matters
•
•
A default environment is stored in u-boot for when the flash isn’t programmed
Hack in the u-boot on the “boot config” cards alters this to read environment from SD
•
Possible to modify to support USB keyboard/mouse and DVI-D monitor
 X-Loader is loaded by the ROM
X-loader (MLO) loads u-boot.bin directly
 Often simply from same media
 MMC/SD boot has formatting requirements
 One existing modification tries MMC/SD before flash
 By default, programmed into the first partition on the flash (mtd0)
 By default, loads u-boot stored in the second partition (mtd1)
U-boot loads kernel and passes bootargs
 Instructions typically stored in environment on flash (mtd2)
 Currently supports only a serial console

 Typically loads the kernel from flash (mtd3) or first partition (mmcblk0p1)
Kernel mounts root file system based on bootargs
24
The ESC boot modifications
http://jkridner.s3.amazonaws.com/esc/readme.txt
 U-boot hack
http://www.beagleboard.org/uploads/u-boot-omap3/ignorenv.txt



Started with Steve Sakoman’s u-boot-omap3 source
http://www.beagleboard.org/irclogs/index.php?date=2008-10-21
http://www.sakoman.net/cgi-bin/gitweb.cgi?p=u-boot-omap3.git;a=summary
In common/env_common.c, calls set_default_env();
• Overwrites values read from non-volatile environment
• Uses built-in values from include/configs/omap3_beagle.h
In omap3_beagle.h, altered default environment
• Enabled ‘autoscr’ command to execute scripts from memory
• Configured bootcmd to automatically run ‘autoscr’

– mmcinit;fatload mmc 0 801f0000 u-boot.img;autoscr 801f0000
Created multiple u-boot.img files with ‘mkubootcmd’
• Files must be processed by u-boot tool called ‘mkimage’
• ‘mkubootcmd’ is a shell script that calls ‘mkimage’
• u-boot.img on the SD configures for NAND flash bootload
25
ESC boot modifications continued

Modified ramdisk.gz
 Started with Angstrom pre-built console image
http://ewi546.ewi.utwente.nl/~koen/Angstrom-console-image-glibc-ipk-2008.1-test-20080827-beagleboard.rootfs.tar.bz2
 Converted to ramdisk image
•
•
•
•
•
•
dd if=/dev/zero of=ramdisk bs=1k count=32768
mkfs.ext2 ramdisk
mount -o loop ramdisk /mnt
pushd /mnt; tar -xvjf Angstrom….tar.bz2; popd
umount /mnt
gzip ramdisk
 Loaded multiple packages for manipulating the flash
 Executes /media/mmcblk0p1/boot.sh
• Added /etc/init.d/boot_sh
26
ESC boot modifications continued (2)

boot.sh
 Initializes flash (/media/mtdblock4)
•
•
•
•
flash_eraseall /dev/mtd4
mkdir /empty; pushd /empty; mkfs.jffs2 -o /dev/mtd4; popd
mkdir /media/mtdblock4
mount -t jffs2 /dev/mtdblock4 /media/mtdblock4
 Copy files off of the SD card onto the flash
• cp -v /media/mmcblk0p1/* /media/mtdblock4
• pushd /media/mtdblock4; tar -xvzf /media/mmcblk0p1/rootfs.tgz
 Modify provided SD card with MV Linux
• Fix a couple of links that were left off by accident
• Copy hacked u-boot.bin and commands to load from SD card
27
Typical boot information locations
Method
USER
Bootstrap U-Boot
Env Vars
Kernel
Root Files
1) SD
MTD0
MTD1
MTD2
MMC0P1: MMC0P2
uImage
2) NAND
MTD0
MTD1
MTD2
MTD3
3) Hacked Pressed
u-boot.bin
MMC0P1: MMC0P1:
MLO
u-boot.bin
MMC0P1:
u-boot.img
MMC0P1: MMC0P2
uImage
RAMDISK Pressed
from SD
MMC0P1: MMC0P1:
MLO
u-boot.bin
MMC0P1:
u-boot.img
MMC0P1: MMC0P1:
uImage
ramdisk.gz
MTD4
1)
bootargs: root=/dev/mmcblk0p2 rw rootwait rootdelay=1
bootcmd: mmcinit;fatload mmc 0 80200000 uImage;bootm 80200000
2) bootargs: root=/dev/mtdblock4 rw rootfstype=jffs2
bootcmd: nand read 80200000 280000 400000;bootm 80200000
3) bootargs: root=/dev/mmcblk0p2 rw rootwait rootdelay=1
bootcmd: mmcinit;fatload mmc 0 80200000 uImage;bootm 80200000
4) bootargs:root=/dev/ram0 rw ramdisk_size=32768
initrd=0x81600000,32M
bootcmd: mmcinit;fatload mmc 0 80200000 uImage;
fatload mmc 0 81600000 ramdisk.gz;bootm 80200000
Common) bootargs: console=ttyS2,115200n8 console=tty0 nohz=off
28
U-boot command summary
http://www.denx.de/wiki/DULG/Manual




Basic commands




help – provide the list of commands (varies by build)
printenv – lists the contents of the current environment
saveenv – writes the current environment to the flash
setenv <variable> ‘string’ – sets environment variable
MMC/SD



mmcinit – initializes the MMC/SD card
fatls mmc 0 – reads FAT directory on the first partition
fatload mmc 0 <RAM addr> <filename> – load a file
NAND





nand unlock – enables writing to the NAND
nand ecc <sw|hw> – configures ECC mode
nand erase <start> <length> – erases portion of NAND flash
nand read <RAM addr> <start> <length> – reads into RAM
nand write <RAM addr> <start> <length> – writes from RAM
Serial

loadb <RAM addr> – reads into RAM via kermit file send
29
What can the Beagle Board do?
Interface to the physical world…
The Real
Signal
Analog
Signal
World
Conditioning
Conversion
to Digital
Temperature
Pressure
Position
Power
Speed
Flow
Digital Signal
Processor
Management
Humidity
Sound
Light
Signal
Conditioning
Digital
Signal
Interface
Conversion
to Analog
Clocks & Timers
…and present within the virtual
Linux distributions
Kernel
Creativity
Tools
Browser
Office
Suite
Windowing
System


Linux isn’t complete without a distribution
OpenEmbedded, Ubuntu, Fedora, Android, Gentoo, and
ARMedslack are possibilities for the Beagle board
Baseline projects
Available today
 GPL ARM GNU compiler collection version 2007q3

Code Sourcery Linux/Windows compiler for ARMv7/Thumb2

TI non-commercial Linux compiler for C64x+

Configure RAM and boot from NAND flash or MMC/SD
(FAT32)
“MLO” image for use with ROM boot-loader
 Free C6000 compiler version 6.0.x
 GPL X-Loader version 1.41 (Loads U-Boot)

 GPL U-Boot version 1.3.3 (Loads Linux kernel)
 Interact over UART and program flash
 Boot from UART, NAND, or MMC/SD (FAT32)
 Test UART, DVI-D, S-Video, audio out, NAND, and
MMC/SD
 GPL Linux kernel version 2.6.22 for diagnostics

UART, DVI-D, S-Video, ALSA audio, NAND, and MMC/SD
Baseline projects
Planned by TI in future
 Free 2D/3D graphics libraries
(Beta available today for OMAP35x EVM)




OpenGL ES 1.1 and 2.0 (first to market) and OpenVG 1.0
Framebuffer and Kdrive (X11) support
GPL in the kernel space
Binaries object libraries
 Free DSP interface libraries

Link for loading, messaging, etc.
• GPL in the kernel space
• GPL-compatible in user space

Codec Engine for task location abstraction (RPC-like)
• GPL-compatible interface

DSP/BIOS RTOS and framework components for DSP
Possible projects predicted
 Development tools


Programming: gcc for ARM Cortex-A8 or TI C64x+, Eclipse
Utilities: DFU-util
 Kernel and drivers

SDIO/USB WiFi, power management, WebCam, analog I/O
 Linux distribution ports

Maemo, Gentoo, Debian, Android
 User mode applications
 Productivity: OpenOffice, Firefox
 Gaming: MAME, Quake3, 2nd Life
 Multimedia: Miro, gStreamer
 Education: Sugar (OLPC), Alice
More possible projects

Signal processing algorithms
 Machine recognition, Audio/video codecs
 Weather/security monitors

Signal processing tools
 Matlab integration, filter generation tools

UI innovations
 3D UI (Clutter, …)

Embedded web services
 Java, Helma, JXTA, Facebook/OpenSocial plug-ins

Server applications
 BeagleBoard.org
OMAP3530 applications processor
OMAP35x™ Processor Block Diagram
 Cores
 Cortex A-8 with NEON™ Coprocessor


C64x+ DSP-based and video accelerators
 600 MHz / 430 MHz @ 1.35V
 550 MHz / 400 MHz @ 1.27V
 500 MHz / 360 MHz @ 1.2V
2D/3D Graphics Engine (PowerVR SGX)
 Up to 10M polygons per second
Memory
OMAP35x Processor
C64x+™ DSP and
video
accelerators
(3525/3530 only)
ARM®
Cortex™A8
CPU
2D/3D
Graphics
(3515/3530 only)
 ARM:
 16 kB I-Cache; 16 kB D-Cache; 256kB L2
 TMS320C64x+ DSP and video accelerators
 L1 32kB Program Cache/32kB Data Cache +

48kB SRAM
 L2 64kB Program / Data Cache + 32 kB SRAM;
16 kB ROM
On Chip: 64kB SRAM; 112kB ROM
 Package
Highlights
 12x12 mm, 0.4mm pitch, Package On Package


Samples now; production 4Q’08
16x16 mm 0.65 mm pitch. Via Channel Array Tech.
Samples 2Q’08; production 4Q’08
Industrial temperature range supported
Display
Subsystem
LCD
Controller
Video 10 bit DAC
Enc 10 bit DAC
Camera I/F
Image
Pipe
Parallel I/F
L3/L4 Interconnect
Peripherals
System
Connectivity
USB 2.0 HS
USB
OTG
Host
Controller Controller x2
Serial Interfaces
McBSP
x5
McSPI
x4
I2 C
x3
UART
x2
UART
w/IRDA
HDQ /
1-wire
Timers
GP x12
WDT x2
Program/Data Storage
SDRC
GPMC
MMC/
SD/
SDIO
x3
ARM® Cortex™-A8








Up to 600 MHz
ARMv7 Architecture
 Thumb-2
 MMU Enhancements
In-Order, Dual-Issue, Superscalar Microprocessor Core
NEON Multimedia Architecture
 Over 2x Performance of ARMv6 SIMD
 Supports Both Integer and Floating Point SIMD
Jazelle RCT Execution Environment Architecture
Dynamic Branch Prediction

95% Accurate Branch Target Address Cache


Global History Buffer
8-Entry Return Stack
•
across industry benchmarks
Embedded Trace Macrocell (ETM) Support

Non-Invasive Debug
ARM Cortex-A8 Memory Architecture:
 16K-Byte Instruction Cache


•
4-WaySet-Associative
16K-Byte Data Cache
•
4-Way Set-Associative
256K-Byte L2 Cache
ARM Cores Comparison
ARM Core
ARM926
ARM1136
Cortex-A8
Architecture Version
V5
V6
V7
Pipeline type
In-order scalar
In-order scalar
In-order, dual-issue superscalar
Pipeline stages
5
8
13
ISA Efficiency (DMIPS/MHz)
1.07
1.18
2.05
MMU
Yes
Yes
Yes
TLB
8 entry unified
2 uTLB and LB
2x32 full assoc
Core to L1 interface
32 bit
64 bit
64 bit (256 Neon)
L1 $ Set associativity
4
4
4
Line length
32B
32B
64B
Branch prediction
No
128 entry BTB
512 entry BTB
General coprocessor I/F
Yes
Yes
No
External Interface
2 AHB 2.0
5 AHB 2.5 – 3 x 64 bit, 2 x 32 bit
1 AXI – 64/128
TrustZone Support
No
No
Yes
Non-Cacheable Fill Buffer
4 word
8 word
16 word
Java support
Jazelle DBX
Jazelle DBX
Jazelle RCT
Floating Point / Media
No (coprocessor available,
VFP9)
VFP11 attached, V6 Integer SIMD
Neon Integer and FP SIMD,
VFP Lite
C64x+™ DSP and Accelerators
“IVA” Subsystem

Up to 430 MHz (c64x+ DSP)

Dedicated Enhanced Data Memory Access engine (EDMA) to move data to/from
64x+
DSP
Video HWA
EDMA
memories and peripherals external to the sub-system

Video hardware accelerators

MMU to access external address space (such as memory/peripheral)

Advanced Very-Long-Instruction-Word TMS320C64x+™ DSP Core
 Eight Highly Independent Functional Units
• Six ALUs (32-/40-Bit), Each Supports Single 32-Bit, Dual 16-Bit, or Quad
8-Bit Arithmetic per Clock Cycle
• Two Multipliers Support Four 16 x 16-B Multiplies (32-Bit Results) per
Clock Cycle or Eight 8 x 8-Bit Multiplies (16-B Results) per Clock Cycle
 64 32-Bit General-Purpose Registers
 Instruction Packing Reduces Code Size
C64x+ L1/L2 Memory Architecture
 32K-Byte L1P Program RAM/Cache (Direct Mapped)
 80K-Byte L1D Data RAM/Cache (2-Way Set-Associative)
 64K-Byte L2 Unified Mapped RAM/Cache (4-Way Set-Associative)
 32K-Byte L2 Shared SRAM and 16K-Byte L2 ROM
C64x+ Instruction Set Features
 Byte-Addressable (8-/16-/32-/64-Bit Data)
 8-Bit Overflow Protection
32KB L1P Cache/RAM
32KB L1D Cache/RAM
48KB L1D RAM
64KB L2 Cache/RAM
32KB L2 RAM

MMU

PowerVR™ SGX Graphics Engine

Up to ~111 MHz


Tile Based Architecture with up to 10 MPoly/sec

Universal Scalable Shader Engine: Multi-threaded
Engine Incorporating Pixel and Vertex Shader
Functionality
Industry Standard API Support:
 OpenGLES 1.1 and 2.0
 OpenVG1.0
 Direct3D Mobile (TBD)


Fine Grained Task Switching, Load Balancing, and
Power Management
Programmable High Quality Image Anti-Aliasing
Graphics Capability Examples
Wave Physics
Environment Mapping &
Per-Pixel lighting
Reflection &
Refraction
Display Subsystem (DSS)

Parallel Digital Output
 Up to 24-Bit RGB
 HD Maximum Resolution
 Supports Up to 2 LCD Panels
 Support for Remote Frame Buffer
 Interface (RFBI) LCD Panels

2 10-Bit Digital-to-Analog Converters(DACs) Supporting:
 Composite NTSC/PAL Video
 Luma/Chroma Separate Video (S-Video)
 Rotation 90-, 180-, and 270-degrees
 Resize Images From 1/4x to 8x
 Color Space Converter
 8-bit Alpha Blending
Display Subsystem
LCD
Controller
Video
Enc
10 bit DAC
10 bit DAC
Display Subsystem Examples
Scaling
PiP
HW cursor
Overlay
Camera Interface Subsystem (ISP)









Generic parallel interface example
CCD and CMOS Imager Interface
Memory Data Input
RAW Data Interface
BT.601/BT.656 Digital YCbCr 4:2:2 (8-/16-Bit) Interface
A-Law Compression and Decompression
Preview Engine for Real-Time Image Processing
Glueless Interface to Common Video Decoders
Histogram Module/Auto-Exposure, Auto-White
Balance, and Auto-Focus Engine
Resize Engine
 Resize Images From 1/4x to 4x
 Separate Horizontal/Vertical Control
Not connected on
the Beagle Board
Timers



12 32-bit General Purpose Timers
2 32-bit Watchdog Timers
1 32-bit 32-kHz Sync Timer
SD / MMC, SDRC, and GPMC Interface


SDRC
GPMC
MMC/
SD/
SDIO
x3

SD / MMC / SDIO




Three instantiations
Compliant with CE-ATA and ATA for MMCA
1-bit or 4-bit transfer mode specifications for SD and SDIO cards
1-bit, 4-bit, or 8-bit transfer mode specifications for MMC cards
General Purpose Memory Controller (GPMC)






Controls all accesses to SRAM and Flash-type memory
8 Chip Selects - 128MB per CS -1GB Total space (8 * 128 MB)
16 bit wide bus
Multiplexed Addr/Data
2KB non-multiplexed
Support for:NAND/NOR Flash, One NAND Flash, SRAM, OneNAND, & PseudoSRAM devices
SDRAM Controller (SDRCM) Subsystem


support for low-power or Mobile single-data-rate (LPSDR or M-SDR) and lowpower double-data-rate SDRAM (LPDDR)
16 Mbits, 32 Mbits, 64 Mbits, 128 Mbits, 256 Mbits, 512 Mbits , 1 Gbit, and 2
Gbits device support
USB


USB 2.0 HS
OTG
Controller
USB
Host Controller
x2
USB 2.0 HS OTG Controller




USB 2.0 low-speed (1.5M bit/s), full-speed (12M bit/s), and high-speed (480M bit/s)
host
USB 2.0 full-speed (12M bit/s), and high-speed (480M bit/s) peripheral
OTG Support
PHY interface – ULPI (HS/FS)
USB Host Controller




Host only
All 3 ports operate in either HS or FS mode (determined by selected PHY connection)
HS Mode
• 480M bit/s
• Available Port – 1 & 2
• PHY interface ULPI
FS Mode
• 12M bit/s
• Available Port – 1, 2, and 3
• PHY interface Serial Asynchronous
HS-only EHCI host planned
for 1Q09 on Beagle Board,
USB 2.0 HS/FS/LS OTG available today
Serial Interfaces and HDQ/1-Wire


McBSP
x5
McSPI
x4
I2 C
x3
UART
x2
3 Master/Slave High-Speed Inter-Integrated Circuit Controllers
(I2C)
5 Multi Channel Buffered Serial Ports (McBSP)
 512 Byte Transmit/Receive Buffer (McBSP1/3/4/5)
 5K-Byte Transmit/Receive Buffer (McBSP2)
 SIDETONE Core Support (McBSP2 and 3 Only) For Filter, Gain, and
HDQ /
1-wire
UART
w/IRDA





Mix Operations
Direct Interface to I2S and PCM Device and TDM Buses
128 Channel Transmit/Receive Mode
4 Master/Slave Multi Channel Serial Port Interface (McSPI)
3 UARTs (One with Infrared Data Association [IrDA] and
Consumer Infrared [CIR] Modes)
1 HDQ / 1-Wire
Package (1/2)
12 x 12 mm 0.40 mm pitch 515 pin plastic BGA
OMAP35x POP Memory Description




POP = Package on Package Technology
Provides customers the advantage of saving PCB area, mDDR routing and the flexibility of choosing
their own top POP Package memory configuration
Combination of fine ball pitch and POP requires more attention to detail on manufacturing than has
normally been needed
TI has been supporting key memory suppliers, such as Micron and Samsung on the development of
POP memories
Memory Package
1.6 mm
OMAP35x
0.4mm pitch
12x12mm
1 Pass Assembly Method
2 Pass Assembly Method
Package (2/2)
16 x 16 mm 0.65 mm pitch 423 pin plastic BGA
Via Channel Array Solution
Package Stats:
• 0.65mm pitch, BUT
• 18 mil (0.45mm) vias
• 5 mil (0.125mm)
space/trace width
• 2 layer routing
Comparison with 0.8mm:
• Requires fewer PCB layers
• Cheaper PCB cost due to
reduced layers
• Bigger via size
• Same trace width
• Same space width
• Only assembly tolerances are
tighter
Final solution is the OMAP 35xx package. 423 pins routed out in only 2
signal layers with .8mm pitch PCB rules.
Via Channel Array Benefits Summary
Comparison
Micro Vias?
Min Trace
Min Space
Package size
Area
PCB Layers req.
Reduction from
.8mm
(Competition)
(OMAP 35xx)
0.8mm pitch
No
5 mils
5 mils
17mm x 17mm
(400 pins)
289mm2
6
--
0.65mm p. w/Via Channels
No
5 mils
5 mils
16mm x 16mm
(423 pins)
256mm2
4
11%
Power Management Introduction
Power management aims to improve battery life of equipment by minimizing power
consumption while guaranteeing expected system performance
Active power consumption occurs while some processing is on-going
 Dynamic power consumption (transistor switching) + Leakage consumption
Static (also Standby or Idle) power consumption occurs when limited or no processing is
on-going and the system is waiting for a wakeup event
 Very limited dynamic power consumption + Leakage consumption
 Managed by
 Dynamic Voltage & Frequency Scaling (DVFS)
 Adaptive Voltage Scaling (AVS)
 Dynamic Power Switching (DPS)
On OMAP35xx, power management is handled by the Power, Reset and Clock
Management (PRCM) module
Dynamic Voltage and Frequency




Higher voltage needed to meet higher performance (frequency)
No need to run at the highest frequency (and highest voltage
and power) all the time
Depending on performance required by the application scenario,
can lower clocks and lower voltage, thereby lowering power
consumption
Define and characterize Operating Performance Points (OPPs)
for the device.


OPP is a voltage and frequency pair, specifying the minimum voltage
at which all devices can meet that frequency requirement (i.e. if a
device is picked at random and supplied with the OPP voltage, it will
be capable of running at the OPP frequency no matter where it falls on
the process curve)
DVFS applicable to VDD1 and VDD2 in OMAP3
OMAP
35xx
OPP
5
4
3
2
1
ARM MHz
600
550
500
250
125
Vdd1
1.35
1.27
1.2
1
0.9
OPP
3
2
1
L3 MHz
166
100
41.5
Vdd2
1.15
1
0.9
Adaptive Voltage Scaling
•
•
•
•
Silicon manufacturing process yields a
distribution of performance capability
For a given frequency requirement:
•Devices on hot/strong/fast end of
distribution can meet this at a lower
voltage
•Devices on cold/weak/slow end of
distribution need higher voltage
Simple system will set the higher voltage
for operating all devices
Smarter system will adapt operating
voltage per device:
SmartReflex, TI’s Adaptive
Voltage Scaling (AVS)
implementation
Green line: Hot device
Blue line: Cold device
OMAP35x Power Domains
 16 different power domains
 1 always ON power domain
WKUP domain
Wake-up domain (ALWAYS active)
• WAKEUP
 9 power domains controllable
(switchable) by user or automatically
by PRCM
•
•
•
•
•
•
•
•
•
MPU
NEON
IVA2
GFX
CORE
DSS
CAM
PER
EMU
 6 power domains controllable only by
the PRCM
•
•
•
•
•
•
SR
EFUSE
MPU DPLL (DPLL1)
IVA2 DPLL (DPLL2)
CORE DPLL (DPLL3)
PERIPHERAL DPLL (DPLL4)
MPU domain
NEON domain
Micro Processor domain
Multimedia Coprocessor domain
IVA2 domain
GFX domain
Audio Video Processor domain
2D/3D graphics engine domain
CORE domain
DSS domain
Interconnect, memory controllers,
Peripherals and clock management domain
Display domain
PER domain
CAM domain
Low power use cases peripherals
domain
Camera controller domain
EMU domain
Emulation domain
SMART REFLEX™ domain
Micro Processor domain
EFUSE domain
eFuse Farm domain
DPLL1 domain
DPLL2 domain
MPU DPLL domain
IVA2 DPLL domain
DPLL3 domain
DPLL4 domain
CORE DPLL domain
Peripherals DPLL domain
Power Options for OMAP35x
DVFS & Class-3 SmartReflex Capable


PMIC (multi-output DCDC)




TPS65950
TPS65930
TPS65920
TPS65073
(samples available 2Q08, RTM 3Q08)
(samples available 3Q08, RTM 4Q08)
(samples available 3Q08, RTM 4Q08)
(samples available 3Q08, RTM 4Q08)
Single Output DCDC

TPS62350
(in production)
DVFS & Class-1 / Class-2 SmartReflex Capable

PMIC (multi-output DCDC)

TPS65023
(in production)
Feature Overview of Analog Solutions
TPS65950
Maximum System
Integration
TPS65930
Car-Kit
Audio Codec
& Drivers
CEA
MCPC
CEA
Dual Stereo Tx
Dual Stereo Rx
Dual Tx
Mono Rx
TPS65920
Maximum System
Flexibility
USB 2.0 HS
OTG PHY
Integration
Clocking Control,
Optional Security
RTC 32kHz
TPS65073
Keypad
Interface
Touchscreen
Interface
10-bit
ADC
3 inputs
2 inputs
Drivers
RGB and Vibra
RGB or Vibra
Integrated
Battery Charger
Controller
2 inputs
RGB or Vibra
4 inputs
wLED
AC & USB
w/ DPPM
TPS65023
TPS62350
Power
3 DCDC
10 LDO
3 DCDC
4 LDO
3 DCDC
4 LDO
3 DCDC
2 LDO
3 DCDC
2 LDO
1 DCDC
I2C
Interface
2 HS I2C
2 HS I2C
2 HS I2C
1 I2C
1 I2C
1 HS I2C
TPS659xx Power Block Diagram
MPU IVA
VDD1 DCDC
VDD2 DCDC
OMAP3530
CORE
VRTC
VIO DCDC
IOs Memory Display
Wake-Up domains
USB CP
VDAC
Video DAC
VPLL
PLL
USB PHY
VAUX
VMMC
VPP or
Camera IF
MMC1
TPS659xx
What, why, who, and how of open source
The fourth vector of value
Performance
Power
Dissipation
Price
The fourth vector of value
Performance
Participation
A-GPS
Bluetooth®
Power
Dissipation
Price
WLAN
What is “open source”?
Form of S/W Delivery
 Software source code
 Available to general public
 Relaxed intellectual
S/W Development Model
 Principles and practices
 Promote a collaborative

property restrictions
 Group of software
licenses
 May require source code
be made available to public

License accompanies the
software package
 Often in actual source code

development model
Utilize open source
software delivery method
Culture
 Collective decisions shared
during development
General benefits of open source

Faster Innovation
 Collaborate faster than standard product release cycles
 Engage and fuel passionate innovators/developers
 Peer-to-peer conversation and open idea exchange

Better Solutions
 Software quality through expert peer review
 New preferred peer support through community
 Faster feedback on product requirements and tools
Why do people participate?
Simplified view

Leverage community to solve own problems,
then share for possible benefits (scratch an itch)
 May develop solution on their own
 Benefits are generally improvements to the code
 Not much benefit required, if no expecting loss
 May utilize community to various degrees

Solve community problems for fame and glory
 Could just like getting a “pat on the back”
 Could get a job or contract
Many are professional developers
 Linux
 70% attributed companies

• See table at right
Firefox
 Google attributed for $56 million


of Mozilla’s $66 million 2006
revenue
Google is the default search
engine on Firefox search bar
Commercial software vendors
 Share development costs
 Influence technology direction
 Enable their proprietary solutions
 Develop core expertise
Commercial vs. community
 Beyond commercial benefits of open source

Success typically depends heavily on “community”
 Gartner recommendations for building community









Allow participants to self-select
Eliminate barriers to participation
Provide clear engagement rules for consensus
Provide fair and reciprocal ownership and access
Make visible historic and current work in progress
Make visible individual contribution history
Implement agreed standards
Decompose problem for parallel development
Seek continuous improvement and low-cost integration
Community is a conversation

Bill Gatliff (Embedded Systems Conference)
 How do we motivate embedded systems developers?
• [Software support for the platform] is on the mainline
• [The platform] just works
• What tools are available to me?

Matthew Walster (demo scene)
 How do we motivate a demo hacker?
• Make it really, really easy –or–
• Make it really hard

Tony Lindgren (linux-omap git maintainer)
 How do we speak to the Linux kernel developers?
• Code is the conversation
• More patches, less powerpoints
What motivates participants?
Categories courtesy of “LugRadio” – it is largely about control

Community Participant
 Likes attention and being part of something big

Tinkerer
 Desires to know how things work and to tweak them

Underdog Fan
 Likes to cheer on anyone who’ll take on the big guys

Cheap
 Want things for free, or as cheap as possible

Freedom Crusader
 Desires to prevent others from controlling their destiny
Linux
 Most widely utilized open source operating system

Clone of the UNIX operating system
 Licensed under GNU General Public License (GPL)
 Directly refers to the kernel (OS), but often used to describe a

complete set of applications (or distro) based on the Linux kernel
A Linux distribution (distro) is a project that manages a collection of
Linux-based software

Maintained by individuals, loose-knit teams, volunteer organizations, and
commercial entities.
 At $1.8 bln, Linux servers represent 11.9% of


all server revenue1 – not bad for “free” software
Linux 2.6.9 defect rate of 0.17 defects/klines
compared to the standard benchmark of
25 defects/klines for commercial software2
Source code: http://www.kernel.org/
Linux Distribution Timeline
[1] Source: IDC
[2] Source: Coverity
Some Linux statistics

https://www.linux-foundation.org/publications/linuxkerneldevelopment.php
Getting started with Linux




Starting references
 http://free-electrons/training
 http://kernelnewbies.org (/UpstreamMerge)
 The Linux Documentation Project (http://www.tldp.org/)
 Device Drivers Book
(http://www.xml.com/ldd/chapter/book/index.html)
http://kerneltrap.org

“The” kernel GitWeb
 http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git
Linux-omap kernel
 http://linux.omap.com
 http://source.mvista.com/git/ (Tony Lindgren)
Others that feed “the” kernel or linux-omap kernel
 http://www.linux-arm.org/git?p=linux-2.6.git
 http://www.arm.linux.org.uk/
 http://www.sakoman.net/cgi-bin/gitweb.cgi
Distributed version control
 GIT is different—eliminates often bad assumptions
 Instead of everyone pushing into Linus’ repository




Linus pulls patches from people he trusts
Everyone has all of Linus’ history (and their own) locally
Patches enter “system” as e-mail messages
When a merge is non-trivial, he simply asks others to rebase


Archives available to everyone
Accepted patches applied to ‘git’ repositories



http://linux.yyz.us/git-howto.html
http://git.or.cz/
http://www.kernel.org/pub/software/scm/git/docs/
 Mailing list
 Guides to GIT
Reproducing diagnostic tests
SD Card

An SD Card is an easy way to boot
 May eventually be replaced by a full USB boot solution



2GB SD card recommended
USB SD card reader/writer required
Utilize HP card format utility
 http://selfdestruct.net/misc/usbboot/SP27213.exe
Serial Cable

Serial console well-supported in u-boot and kernel
 May eventually be replaced by USB
 JTAG is an alternate or extension solution
 USB networking support in kernel, but consumes port

Null modem cable required for serial console
 Female-9-pin to female-9-pin with crossover


AT/Everex adapter cable required
Serial terminal software required
 Windows: TeraTerm, Hyperterm, …
 Linux: Minicom, …
Chat

Install an IRC client

Examine http://www.beagleboard.org/irclogs

Why ?
 Outside TI: http://beagleboard.org/chat
 TI: http://beagleboardtwiki.sc.ti.com/
 IRC is nice for beginners, because you can get


immediate interactive feedback vs. mailing lists
Don’t be shy
Everything you say is public, but that’s OK
• Avoid making assertions that you don’t know; ignorance is OK
• Learn from your mistakes; repeat what you learn
Build environment

Linux PC or virtual machine
 Code Sourcery C compiler
• 2007q3 arm-none-linux-gnueabi
http://www.codesourcery.com/gnu_toolchains/arm/releases/2007q3
 Git
• Version 1.5.4.3 desired/required
• Include ‘curl’ support

Windows laptop PC
Source

Clone Linux kernel and U-Boot from “upstream”
 Give a couple hours for the download
 git clone http://source.mvista.com/git/linux-omap-2.6.git
 git clone http://git.denx.de/u-boot.git

Download Beagle pre-built images and sources
 All released source, binaries, and tools
http://code.google.com/p/beagleboard/downloads/list
 Patch 1-4 for U-Boot v1.3.2
http://groups.google.com/group/beagleboard/browse_thread/thread/3473b44af1e6e326#
 Copy all to Linux host
Checkout/patch/build U-Boot











cd u-boot
git checkout -f v1.3.2
git checkout -b my_branch
git tag start
patch -p1 < ~/Desktop/patch1.diff.txt

Repeat for each of the 4 patch files
git add .
git commit -a
export PATH=$PATH:/opt/arm-2007q3/bin
make distclean
make CROSS_COMPILE=arm-none-linux-gnueabi- omap3530beagle_config
make CROSS_COMPILE=arm-none-linux-gnueabi-
 cd ..
Checkout/build Linux

cd linux-omap-2.6
 git checkout d6daf8d8cc5ccf90247def5551ee9c3e8555e848
 git tag start
 git checkout -b my_branch



make CROSS_COMPILE=arm-none-linux-gnueabi- distclean
make CROSS_COMPILE=arm-none-linux-gnueabi- omap3_beagle_defconfig
make CROSS_COMPILE=arm-none-linux-gnueabi- uImage

cd ..
Boot Beagle from SD card
 Format SD card as FAT using HP utility
 Copy provided MLO (x-load)
 Copy built v1.3.2-xxx u-boot.bin
 Copy built 2.6.xx-xxx uImage
 Copy provided rd-ext2.bin (ramdisk image)
 Connect serial cable and insert SD card
 Hold “User” button and apply power



Observe “…40T…” on serial port
Press a key to halt boot if required
Give commands at u-boot prompt (OMAP3 beagleboard.org #)




setenv bootargs ‘console=ttyS2,115200n8 root=/dev/ram0 rw
ramdisk_size=8192 rootfstype=ext2 initrd=0x81600000,8M’
setenv bootcmd ‘mmcinit;fatload mmc 0 80300000 uImage;fatload
81600000 rd-ext2.bin;bootm 80300000’
saveenv
run bootcmd
Create SD/MMC patch e-mail


git diff start
git format-patch -s -o start
Post patch to OMAP community

Read
http://www.muru.com/linux/omap/README_OMAP_PATCHES

Post your patch to mailing list
[email protected]
Collaboration tools
Chat, mail, forums, blogs, and wikis!


All exist because they all solve different problems
Chat allows you to know someone’s listening
 Great for beginning and “stupid” questions

Mail allows you to reach almost anyone
 Brings them into the conversation
 Provides you with a personal log



Forums helps get the threads organized
Blogs provide emphasis, filtering, and timeliness
Wikis enable inputs to become documentation
Chat on IRC

http://freenode.net
 #beagle: discussion regarding the Beagle Board
 #neuros: discussion
 #davinci: discussion regarding TI DaVinci products
 #ol: discussion regarding OMAP Linux (not active)

IRC clients
 http://pidgin.im
 http://www.mirc.com
 http://en.wikipedia.org/wiki/List_of_IRC_clients
 http://www.ircreviews.org/clients/
E-mail regarding OMAP Linux


http://BeagleBoard.org/discuss
http://vger.kernel.org/vger-lists.html#linux-omap
Forums

http://community.ti.com
Blogs (RSS feeds)

http://beagleboard.blogspot.com
Wikis



http://wiki.davincidsp.com
http://tiexpressdsp.com
http://elinux.org/BeagleBoard
Registering Beagle projects
http://code.google.com


Anyone can create a new
open source project
Features
 Site is “cleaner” than sf.net,






but sf.net is OK too
Source control is Subversion
Issue tracking is custom
Provides downloads and wiki
support
Use common sense and
get your manager’s
approval
Use the tag “beagleboard”
Let’s explore:
http://code.google.com/p/beagleboard
Git

What is Git?
 Git is a popular version control system designed to handle very




large projects with speed and efficiency; it is used mainly for
various open source projects, most notably the Linux kernel.
Git falls in the category of distributed source code management
tools, similar to e.g. GNU Arch or Monotone (or BitKeeper in the
proprietary world). Every Git working directory is a full-fledged
repository with full revision tracking capabilities, not dependent on
network access or a central server.
Git is an Open Source project covered by the GNU General Public
License v2. It was originally written by Linus Torvalds and is
currently maintained by Junio C Hamano.
Read more here:
 http://git.or.cz/
Learn from Linus here:
 http://www.youtube.com/watch?v=4XpnKHJAok8
Community Participation with Git
Features of Git
 Strong support for non-linear development.: Git supports rapid and convenient branching




and merging, and includes powerful tools for visualizing and navigating a non-linear
development history.
Distributed development. Like most other modern version control systems, Git gives each
developer a local copy of the entire development history, and changes are copied from one
such repository to another. These changes are imported as additional development branches,
and can be merged in the same way as a locally developed branch. Repositories can be
easily accessed via the efficient Git protocol (optionally wrapped in ssh) or simply using HTTP
- you can publish your repository anywhere without any special web server configuration
required.
Efficient handling of large projects. Git is very fast and scales well even when working with
large projects and long histories. It is commonly an order of magnitude faster than most other
revision control systems, and several orders of magnitude faster on some operations. It also
uses an extremely efficient packed format for long-term revision storage that currently tops
any other open source version control system.
Cryptographic authentication of history. The Git history is stored in such a way that the
name of a particular revision (a "commit" in Git terms) depends upon the complete
development history leading up to that commit. Once it is published, it is not possible to
change the old versions without it being noticed. Also, tags can be cryptographically signed.
Toolkit design. Following the Unix tradition, Git is a collection of many small tools written in
C, and a number of scripts that provide convenient wrappers. It is easy to chain the
components together to do other clever things.
Everyday Git
http://www.kernel.org/pub/software/scm/git/docs/everyday.html










git-show-branch(1) to see where you are.
git-log(1) to see what happened.
git-checkout(1) and git-branch(1) to switch branches.
git-add(1) to manage the index file.
git-diff(1) and git-status(1) to see what you are in the
middle of doing.
git-commit(1) to advance the current branch.
git-reset(1) and git-checkout(1) (with pathname
parameters) to undo changes.
git-merge(1) to merge between local branches.
git-rebase(1) to maintain topic branches.
git-tag(1) to mark known point.
How to build Git tool from source
Download GIT from:
http://git.or.cz/
How to build GIT ?
#> tar –xzvf git-1.5.5.1.tar.gz
#> cd <to extracted directory>
#> make
How to install GIT ?
#> make prefix=<my directory> install
Example: #> make prefix=/home/ubuntu/mygit/ install
GIT tools will be installed at /home/ubuntu/mygit/bin (export
this PATH to get the GIT commands)
Commands used to pull trees
Refer to Tony’s README on muru.com for detailed description on working with OMAP GIT
tree.
http://www.muru.com/linux/omap/README_OMAP_GIT
Few important commands:
To clone OMAP GIT Tree:
$ git clone http://www.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
Same GIT tree is also hosted/mirrored at mvista’s site here:
$ git clone http://source.mvista.com/gittrees/linux-omap-2.6.git
Note: Setup Proxy Server before cloning the tree:
Example: #> export http_proxy=http://my.proxy.here:port/
To re-sync your branch with mainline:
$ git-pull
What do you do with Git?
To add new changes:
•
•
•
Open file in any unix compatible editor.
Do the modifications
Save the file
Linus Main Line
TAG
To store the file in repository:
0
Linux OMAP
$ git status
$ git update-index arch/arm/plat-omap/myfile.c
$ git commit -s
To generate patches using GIT tool:
0
My-Clone
TAG
1
0
$ git format-patch -o <output_dir>
abcdef0123456789abcdef0123456789abcdef01
TAG
Other methods:
- Create another local branch and take a normal diff between the too.
- Use Quilt. (http://download.savannah.gnu.org/releases/quilt/)
1
Quilt
Help for managing patch sets
To create a new patch using Quilt:
Go into the Kernel directory:
#> cd linux-omap
Create a directory called patches that will hold all of our changes
#> mkdir patches
Create a new patch “patch1” using quilt
#> quilt new patch1
Add files that will be modified by this new patch.
#> quilt add <file name>
Edit the file, and save the change.
To refresh the patch:
#> quilt refresh –diff-stat
To pop (reverse) the patches on tree
#> quilt pop –a
To push all the patches on tree
#> quilt push
Quilt
Continued...
To add a existing patch to GIT tree using Quilt
• Copy patch to patches directory
• Update the series file
• Do a
#> quilt push –a
Community participation with Open
Embedded
What is Open Embedded (OE)?
http://www.openembedded.org

OE is like a top-level ‘Makefile’

BitBake is a python tool core to OE

 Sophisticated layer on top of ‘make’
 Tool for building distributions
 Maintains meta-data database for building open source
 Database is built of recipes for each package
 Inheritance for reuse (autotools, …)
 Satisfies dependencies and follows build steps
• Fetch, unpack, patch, configure, compile, stage, install, &
package
Opkg tool for package management
 Replacement for Debian ‘dpkg’
 Utilizes pre-built package feeds
What role does OE play?

Collaboration on entire distribution
 “Ångstrøm” is a distribution built with OE

Full control over almost every aspect
 Tool chain, package set, patches, kernel,...

Relatively complete starting point
 ‘armv7a’ compiled binaries in “Ångstrøm”

Possible to take a “demo” snapshot
 Play with higher-level development
What does Ångstrøm provide today?
http://beagleboard.org/project/angstrom

Browsers
 Gecko: Firefox 3, Fennec, …
 WebKit: Epiphany, …

Media
 FFmpeg, XMMS, GStreamer, MythTV, …

Development
 C, Java, Python, Perl, Mono, Ruby, Tk, …

Gaming, Networking, …
http://www.angstrom-distribution.org/repo/
Installing Ångstrøm onto NAND

SD card FAT formatted (default, optionally bootable)
 boot/kernel/ramdisk to get into OE console
•
Can store kernel (and ramdisk) in flash
 Copy of tar.bz2 of full file system image desired

Boot console image
 bootargs = console=ttyS2,115200n8 ramdisk_size=32768


Flash board





root=/dev/ram0 rw rootfstype=ext2 initrd=0x81600000,32M
bootcmd = mmcinit;fatload mmc 0 80300000 uImage;
fatload mmc 0 81600000 angstrom-console-rd.gz
opkg install mtd-utils; opkg install mkfs-jffs2
flash_eraseall /dev/mtd4; mkfs.jffs2 -o /dev/mtdblock4
mkdir /mnt/flash; mount -t jffs2 /dev/mtdblock4 /mnt/flash
tar xvjf Angstrom-XXX.rootfs.tar.bz2 -C /mnt/flash
Boot new file system
 bootargs = console=ttyS2,115200n8 console=tty0 root=/dev/mtdblock4

rw rootfstype=jffs2 nohz=off video=omapfb:vram:2M,vram:4M
bootcmd = nand read 80200000 280000 400000; bootm 80200000
http://beagleboard.org/demo/angstrom
What is Open Embedded made from?



BitBake build tool
 Specifically written for top level make problem space
 Uses inheritance to factor common support from recipes
 Simple language with shell sequences
 Language elements and functions can use Python for advanced
cases
Meta-data
 Package recipes and classes
 A number of distribution definitions
 A number of platform definitions
A version control repository of the meta-data
 Uses Monotone for SCM (moving to Git)
 Maintains dev and (recently) stable branches
OE reference: typical processing


Satisfy all dependencies
Build (default command)
 Fetch
get the source code
 Unpack
extract the source code
 Patch
apply patches (local or fetched)
 Configure
run any configuration steps
 Compile
do actual compilation
 Stage
install locally for use by other packages
 Install
install product files to temporary directory
 Package
take installed files and place into packages
helloworld, helloworld-dbg, helloworld-dev, helloworld-doc,
helloworld-local
Top Level Default OE flow



Build toolchain and libraries
Build needed components to packages
Build file-system image from packages

Will take Gigabytes of storage and hours to perform the
above on a clean install
Alternate OE flows





Use precompiled toolchain
Use pre-downloaded source archives
Build toolchain and package as an SDK
Build collection of packages only
Build file-system image from pre-built packages***
*** This may not be a current capability
What is OE not good for (today) ?

Active development of a given component
 There are ways to use OE in this fashion but it is not a
strength and you can lose code if you are not careful

GUI tools to guide and monitor
 All config is edit of text files
 Build log is very verbose and not visually structured
Limitations and alternatives
 Limitations
 Build environment not always well isolated
 Many build scripts do native build environment tests
 Alternatives



Matrix
• Sponsored by ARM: http://linux.onarm.com
• Utilizes Scratchbox and QEMU
– Reproduces target environment in cross-compile
– Relies on emulation on build host
Mamona
•
•
•
•
Targets Nokia Internet Tablets
Utilizes Open Embedded, Scratchbox, and QEMU
Generates Debian source/binary packages
Solves some “partial emulation” problems
Native development or managed code environments
Native, managed, and web-based UI
code development
Native development

Not limited to embedded/cross tools
 Reach out to broader developer community


Native tools easy to install
Immediately see impact of your changes
 Edit local source files with familiar editors
 You still need to manage your code!
• Version control with git, svn, cvs, …

Also possible to perform distributed builds
 Some packages may require larger memory
Managed code


Easier to create an emulation environment
But what about performance?
 JIT compilers may be sufficient
 Performance bottlenecks are often in just a few places
• Just optimize where the issue is, but build the rest fast!
• Important to make sure the rest is open for optimization

Certainly not for every market
 If you already know C/GTK+/Qt, use what you know!
 If you are new, this may be a way to get started
Web-based UI development




Familiar paradigm for consumers
Enables remote control and monitoring
Many HTML/JavaScript developers
Opens up use of other web services
 Mapping
 Order fulfillment
 Storage
 Social networking and media
http://www.programmableweb.com/scorecard
Web-based UI development (server)


Helma is one option for the server side
 Based on Java Servlet Container and Mozilla Rhino
 Provides sessions, user management,
 Write entire applications in XML/HTML and JavaScript
• No recompilation required, allowing for dynamic development
• Database options for object storage with automatic persistence
– Native XML database for flexibility
– Java database connection (JDBC) for scale
• Drop-in Java .jar files for access to huge libraries of functions
Accessing Linux shell and drivers
 rt=Packages.java.lang.Runtime.getRuntime(); rt.exec(“…”)
 new Packages.java.io.File(“…”)
Web-based UI development (client)


Epiphany-WebKit is one option for the client side
 Fast rendering, low memory, and good AJAX support
 WebKit is easy to embed into other applications
Demo
 beagle-web-control-demo used at ARM Developers’ Conference
http://www.beagleboard.org/gitweb/?p=beagle-web-control-demo.git;a=summary
• Toggles LED states from web browser
 Uses Angstrom demo setup
http://beagleboard.org/demo/angstrom
Demos and resources for more
information and support
Many OMAP™ hardware options
TI/Mistral OMAP35x EVM
Nokia Internet Tablets
LogicPD Zoom Medical and Mobile Developer Kits
Gumstix Overo
Cogent CSB740
Gumstix Overo
Beagle
Board
LogicPD OMAP35x Dev. Kit /
Medical EVM
3” x 3”
5.75” x 6.25”
Not to scale.
Approximate size
noted (in inches)
OMAP35x
EVM
4.25” x 7”
LogicPD OMAP34x Mobile
Development Kit
3.8” x 6.3” x .95”
OMAP34x
SDP
8.5” x 11”
Many tools options
http://focus.ti.com/dsp/docs/dspplatformscontenttp.tsp?sectionId=2&familyId=1525&tabId=2224
The many OS vendors for are OMAP35x not listed here
Tool / Top features
Debug
TI Code Low-level ARM and
Composer DSP
Studio
ARM RealView
Compile
Other
Low-level ARM (ARMv7)
and DSP (NEON roadmap)
Poweraware
debug
Low-level ARM
Application-level ARM
(ARMv7, NEON)
Lauterbach
Low-level and app
ARM and DSP
None
Extensive
trace
Green
Hills
Low-level and app
ARM and DSP
Low-level ARM
Trace
Linux application
debug
Linux kernel/app ARM
(ARMv7, NEON)
CodeSourcery
•Cortex-A8 uses ARMv7 instructions
Additional third party information: here
Many OS vendors for OMAP35x





MontaVista
TimeSys
RidgeRun
BSquare
Many, many more
126
TI OMAP35x software architecture
http://www.ti.com/omap35x
Applications
GUI
App Framework
2D/3D APIs
Multimedia
Framework
GFX Driver
Optional
DRM
Codec Engine and Link
Codec Engine
Linux Kernel / WinCE
& Power Management
GFX
ARM
audio
video
image
FC
BIOS
video image audio video image audio
C64x+ DSP and Video Acceleration
Accessing the TMS320C64x™+ DSP

DSP/BIOS™ Link source available
http://tiexpressdsp.com
 Provides code loading and data passing
 Kernel portions licensed as GPL

DSP/BIOS RTOS and components
http://tiexpressdsp.com
 Enables sharing of the DSP as a resource

Free TI DSP compiler
https://www-a.ti.com/downloads/sds_support/targetcontent/LinuxDspTools/index.html
 Non-commercial use

Full support in Code Composer Studio
http://www.ti.com/expressdsp
The Beagle Board community


Support for this board is provided through an
active community of hobbyists and developers
Being very open enables developers to share
 Keeps costs low
 Enables more people to participate




24/7 access to fellow developers
http://BeagleBoard.org/discuss
Go ahead, ask your questions before you buy…
Participate and enjoy!
Participating in the community

Joining the herd of cats
http://lwn.net/talks/elc2007

Building Community for your open source project
http://www.eclipsecon.org/2006/Sub.do?id=268

Video of Greg Kroah-Hartman on the Linux kernel
http://www.linuxelectrons.com/news/linux/16774/greg-kroah-hartman-linux-kernel

Sending kernel patches upstream
http://wiki.omap.com/index.php?title=Patch_upstream_sending
Summary



Open source is very diverse and OMAP35x
supports that diversity
Beagle Board enables new possibilities for open
collaboration
Enjoy programming again!
Thank you!



[email protected]
[email protected]
irc://[email protected]/#beagle