BeagleBoard 101
Slides available at:
http://beagleboard.org/beagleboard101
This is your introduction to the BeagleBoard where you will learn:
- What is a BeagleBoard?
- How do you get software running on a BeagleBoard?
- How do you engage the BeagleBoard community?
- How can you perform native development with the provided
Angstrom Distribution Cloud9 IDE demo image?
- How do you discover other available community and commercial
software that might be of interest?
What is the BeagleBoard?
The BeagleBoard 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 Cortex-A8 (superscalar)
- Graphics (and possibly DSP) accelerated
- Linux and open source community
- Environment for innovators
BeagleBoard-xM Details
BeagleBone Details
Some BeagleBoard examples
- Video encoding and playback
- Perform 3D rendering
- Stream and process data from peripherals
 
Getting up and running
- Setup an SD card with the factory image and backup your own
- Try multiple pre-built SD card images from
Angstrom,
Ubuntu,
Linaro and
Rowboat (Android)
- Can also start with Windows Compact Embedded 7, QNX, RISC OS, Puppy Bits, Symbian, Debian, Gentoo, Fedora, ...
- Check out the registered projects
- Encourage project owners to supply SD card images
Classroom setup
Equipment is meant to stay in the classroom
Matrix GUI
- Just a web browser
- Renders HTML code on the board
- Based on QtWebKit
- Modified to launch apps
- Power/Clocks -> 1GHz
- Click on Exit to get to desktop
Gnome Desktop
- Just one desktop option
- Angstrom Distribution provides several others
- Menu bar at top gives list of installed apps
- Processor speed displayed in the Panel
- Applications -> Accessories -> Terminal
- Restart Matrix GUI with 'matrix_gui /usr/share/matrix/html/menu_main_1.html'
- Shutdown with 'poweroff'
Lab - Edit Matrix GUI menu
root@beagleboard:~# cd ~/labs/matrix
root@beagleboard:~/labs/matrix# ls -l
root@beagleboard:~/labs/matrix# gedit menu_main_1.html
Search for "p1" and replace the title with your name.
root@beagleboard:~/labs/matrix# cat run_matrix_gui
root@beagleboard:~/labs/matrix# ./run_matrix_gui
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
- 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?
Typical BeagleBoard-xM boot process
The five phases
- ROM loads x-load (MLO)
- Performs external DRAM configuration
- x-load loads u-boot
- Default location is /media/mmcblk0p1/u-boot.bin
- u-boot executes default environment/commands
- Default location is /media/mmcblk0p1/uEnv.txt
- USERBUTTON will cause search for /media/mmcblk0p1/user.txt
- By default, 'uenvcmd' is executed
- Commands load kernel
- Default location is /media/mmcblk0p2/boot/uImage
- Kernel reads root file system
The default u-boot boot command
281 #define CONFIG_BOOTCOMMAND \
282 "if mmc rescan ${mmcdev}; then " \
283 "if userbutton; then " \
284 "setenv bootenv user.txt;" \
285 "fi;" \
286 "echo SD/MMC found on device ${mmcdev};" \
287 "if run loadbootenv; then " \
288 "echo Loaded environment from ${bootenv};" \
289 "run importbootenv;" \
290 "fi;" \
291 "if test -n $uenvcmd; then " \
292 "echo Running uenvcmd ...;" \
293 "run uenvcmd;" \
294 "fi;" \
295 "if run loaduimage; then " \
296 "run mmcboot;" \
297 "fi;" \
298 "fi;" \
299 "run nandboot;" \
Baseline software
- X-loader
- U-boot
- Linux Kernel
- OE-core based BSP
- This userspace was created with OE-classic instead
- The bootloaders and kernel where build using this OE-core BSP
- I didn't rebuild the DSP or SGX components for this kernel
- This may move at some point to a TI or beaglboard.org server
Highlighted community projects
Linaro
- 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
- 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
- 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
Qt
- Qt C++ framework is just one of the options for creating graphical
applications, but it is fast, flexible, crossplatform and well-supported
by an open source community
- Created by Trolltech
- Acquired by Nokia
- Passed to the community
Qt modules
Qt demos
- qtdemo
- Descriptions not compiled in here
- Lots of different GUI tools
- Many other programming tools, like networking, IPC, 3D, database, etc.
Qt Creator
- Integrated development environment
- Runs on Windows, Mac, or Linux
- Designer for your GUI
- C++ editor and debugger
- Build your GUI on your PC, then move it over
to the BeagleBoard to add functionality
- Angstrom Linux distribution has the compiler and
libraries ready to build Qt apps natively on your BeagleBoard
- Qt Designer installed on your BeagleBoard. Try it "designer".
Qt Hello World example
#include <QApplication>
#include <QPushButton>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPushButton hello("Hello world!");
hello.resize(100, 30);
hello.show();
return app.exec();
}
Lab - Qt Hello World
root@beagleboard:~# cd ~/labs/qt/hello
root@beagleboard:~/labs/qt/hello# . /usr/share/qt4/environment-setup
root@beagleboard:~/labs/qt/hello# ls
root@beagleboard:~/labs/qt/hello# cat hello.cpp
root@beagleboard:~/labs/qt/hello# qmake2 -project
root@beagleboard:~/labs/qt/hello# qmake2
qt_config.prf:7: include(file) requires one argument.
root@beagleboard:~/labs/qt/hello# make clean
root@beagleboard:~/labs/qt/hello# make
root@beagleboard:~/labs/qt/hello# ls
root@beagleboard:~/labs/qt/hello# ./hello
Thanks!
- The BeagleBoard-xM works like a desktop computer, but is small, low-power and has
the right embedded interfaces to put it just about anywhere
- There are many options for building up user interfaces and you can get started quickly
- Working with the community can open up new opportunities and improve results
- There's a lot to explore!