# BeagleBoard 101

Latest slides available at: http://beagleboard.org/beagleboard101

This is your introduction to BeagleBone and Bonescript where you will learn:

- What is BeagleBoard.org?
- What is BeagleBone?
- What is Bonescript?
- How do I engage the BeagleBoard.org community?

# What is BeagleBoard.org?

## http://beagleboard.org/static/flyer_latest.pdf

BeagleBoard.org is an open hardware project featuring two designs:

- BeagleBoard-xM: Open software desktop experience with extra MHz and extra memory
- BeagleBone: Hardware I/O focus with single cable development experience

BeagleBoard.org designs have a common philosophy:

- Bring your own peripherals [1]
- Entry level cost
- ARM with latest v7 and NEON instructions
- Graphics (and possibly DSP) accelerated
- Linux and open source community
- Environment for innovators

# What is BeagleBone?

## http://beagleboard.org/bone

- Processor
  - 720MHz super-scalar ARM Cortex-A8 (1,450 DMIPS)
  - 3D graphics

- Connectivity
  - USB client: power, debug and device
  - USB host, Ethernet
  - 2x46 pin headers
    - 2xI2C, 5xUART, SPI, CAN, GPIO
- Software
  - 4GB microSD card with Angstrom Distribution

# Starting point software

## http://beagleboard.org/project

Your BeagleBone is currently running the Angstrom Distribution. Below are links to upgrades for Angstrom and various other starting points you might choose for your project.

- BeagleBone
  - Texas Instruments releases: Android, Linux, StarterWare (no OS)
  - Linux: Angstrom, Ubuntu, Debian, ArchLinux, Gentoo, Sabayon, Buildroot, Erlang, Fedora
  - Other: QNX, FreeBSD
- BeagleBoard and BeagleBoard-xM
  - Texas Instruments releases: Android (see AM3715), Linux, DVSDK
  - Linux: Angstrom, Ubuntu, Debian, ArchLinux (xM), Gentoo, Fedora
  - Other: Windows Embedded, QNX (xM), RISC OS, Puppy Bits, Symbian

# Programming an SD card

## Your get-out-of-jail-free card

- Removable SD cards enables experimentation and ease of getting back to a known starting point
- First, make sure you have an appropriately sized microSD card and an adapter for your PC
- Linux and Mac OS X
  - Learn to use 'dd' and 'xzcat'
  - Know which /dev/sdX or /dev/diskX is your SD card through use of 'dmesg'
  - Example

        xzcat XXX.img.xz | sudo dd of=/dev/sdX bs=64M

- Windows
  - Use 7-zip to decompress the XXX.img.xz file
  - Use Ubuntu Win32DiskImager to write it to your microSD card

# Turn on an LED (on-board)

## The "hello world" of hardware

The links below are live and will impact the USR3 LED on your BeagleBone. The exact code used in the browser is below and will send messages to your board using Socket.IO.

Set pin high: run

    pinMode(bone.USR3, 'out');
    digitalWrite(bone.USR3, 1);

Set pin low: run

    digitalWrite(bone.USR3, 0);

# Services running on the BeagleBone

## Default web services ready for you to try

The interactivity presented on the previous slide is provided through a set of services running on your BeagleBone. You can experiment with some of these services below. The immediately following slides will provide you with some dynamic information about your BeagleBone.

- Cloud9 IDE
  - Write applications directly in the browser
- Gate One
  - Execute ssh (terminal) directly in the browser
- JavaScript terminal (bone101)
  - Interactively execute JavaScript in the browser
- Shell (bone101)
  - Issue commands to bash using JQuery Terminal

# Attached capes

## Any attached capes with ID EEPROMs would be listed here

# Expansion header state

| P9 |  |  |  | P8 |
| 1 | 2 |  |  |  | 1 | 2 |
| 45 | 46 |  |  |  | 45 | 46 |

# Blinking an LED (external)

## The "hello world" of hardware

- Connect resistor lead to P8_1 (GND)
- Connect other lead to short LED lead
- Connect long LED lead to P8_3
- Launch the Cloud9 IDE
- Run the 'blinkled.js' application

# Why work with community?

##

- Faster innovation
  - Off-cycle development
  - Engage innovators
  - Direct peer interaction
- Better solutions
  - Expert peer review
  - Community support
  - Early feedback

# Why push code to mainline?

##

- Stable snapshot development
  - Increases stability
  - Isolates from community
  - High update cost with reduced support and external contribution
- Community synchronized
  - Increased potential churn
  - Leverages the community
  - Requires defined method for maintaining value-add

# Engaging the community

## Ask questions the smart way

- Before you ask
  - Learn about the on-line resources and documentation
  - Try to find the answer yourself
  - Don't assume you are entitled to an answer
- Ask in the right way in the right place
  - Question should be easy to answer for someone who knows
  - Detail your objective, what you tried and the results
  - Use meaningful and specific subject headers
  - Using the on-line chat can help you formulate your question for the mailing list
- Listen to the answers, even if they seem unhelpful
- Share useful lessons you learn

# What do I work with the community on?

##

- There are hundreds of projects with BeagleBoard-specific interest
- It is really up to your heart's desire
- Linux is known for its community
- Many communities build upon Linux
- Let's start with the projects required to boot Linux

# Typical BeagleBone boot process

## The five phases

1. ROM loads u-boot SPL (MLO)
   - Default location is /media/mmcblk0p1/MLO
   - Performs external DRAM configuration
2. u-boot SPL (MLO) loads u-boot
   - Default location is /media/mmcblk0p1/u-boot.img
3. u-boot executes default environment/commands
   - Default location is /media/mmcblk0p1/uEnv.txt
   - By default, 'uenvcmd' variable is executed
4. Commands load kernel
   - Default location is /media/mmcblk0p1/uImage
5. Kernel reads root file system

# Baseline software

## http://beagleboard.org/linux

- U-boot
  - BeagleBoard-patched u-boots
- Linux Kernel
  - BeagleBoard-patched kernels
- OE-core based BSP

# Highlighted community projects

##

- Android Rowboat
- Linaro
- Yocto Project
- Angstrom
- Bonescript

# Linaro

## www.linaro.org

- Linaro is a non-profit formed in June 2010
  - "to make it easier for ARM partners to deploy the latest technology into optimized Linux based products"
- Started by ARM
  - with Texas Instruments, Freescale, IBM, Samsung and ST Ericsson
- Focused on improving core open source tools and components for ARM Cortex-A processors
  - Compiler, debugger, profiler, kernel and middleware
  - Validation of efforts done with Ubuntu and Android
- Includes "landing teams" for SoC vendors
- The BeagleBoard-xM is one of their release platforms

# Yocto

## www.yoctoproject.org

- Yocto is a Linux Foundation project started in April 2011
  - "and is an open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of the hardware architecture."
- The advisory board includes members from several key silicon vendors, embedded Linux suppliers and the OpenEmbedded community
  - including representation from Texas Instruments, Intel, Mentor Graphics, MontaVista, TimeSys and Dell
- Building on OpenEmbedded technology and providing board support package (BSP) development tools for embedded platforms
  - Committed to support ARM, PPC, MIPS, x86 and x86-64 ISAs
  - Aligned with the OpenEmbedded community through OE-core
- The BeagleBoard-xM is their ARM reference platform

# Thanks!

##

- There's more to come. Please join us in improving this project for the benefit of both yourself and others.