Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning BeagleBone

You're reading from  Learning BeagleBone

Product type Book
Published in Dec 2014
Publisher
ISBN-13 9781783982905
Pages 206 pages
Edition 1st Edition
Languages
Author (1):
Hunyue Yau Hunyue Yau
Profile icon Hunyue Yau

Table of Contents (18) Chapters

Learning BeagleBone
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Introducing the Beagle Boards Software in the BeagleBone Building an LED Flasher Refining the LED Flasher Connecting the BeagleBone to Mobile Devices Recovering from the Mistakes Interfacing with the BeagleBone Advanced Software Topics Expansion Boards and Options The Boot Process Terms and Definitions
Index

Chapter 2. Software in the BeagleBone

Now that you have unboxed your BeagleBone and have the basic accessories to connect to another machine, we'll look at the software in the BeagleBone. First, we'll look at the available distributions for the BeagleBone and then go over how to get these distributions onto the BeagleBone. To install a distribution, you need an SD card reader as mentioned in the previous chapter. Finally, we'll look at how to get your own software in the BeagleBone.

Note

A Linux distribution (often known as distro) is a collection of software composed of the Linux kernel and support pieces that provides a user interface.

If you have a new BeagleBone board and the accessories have not arrived but you are just anxious to get started, you can skip this chapter and move on to the next. Come back to this chapter when you need to change the software, either to try something different or for recovery purposes.

In this chapter, we will cover the following topics:

  • System software in the...

System software in the BeagleBone


This book will focus solely on running a Linux-based software in the BeagleBone. It is possible to run almost any ARM-based software in the BeagleBone but this is outside the scope of the book.

Note

The examples of a few other distributions can be found at http://beagleboard.org/projects. This is not an exhaustive list.

The Linux-based system software comes in different flavors, commonly referred to as distribution. Linux by itself strictly refers to a core piece known as the kernel. A distribution takes the Linux kernel, configures things in a specific way, and then adds other system software pieces.

Note

Linux provides protection between different pieces of software to increase the overall system's robustness. This is done by having a supervisor or a privileged portion and an underprivileged portion. The privileged portion resides mostly in the kernel. The unprivileged portion is typically referred to as userland pieces. Userland pieces are, by default, isolated...

Distributions on the BeagleBone


The BeagleBone can run many different distributions similar to those available for desktops and laptops. However, the BeagleBone is shipped with two specific distributions, namely, Angström and Debian. Both the flavors are available in an easy-to-load format specifically for the BeagleBone.

The Angström Linux distribution

Angström has supported every Beagle board available since the beginning. The BeagleBone White is shipped with a microSD card that contains Angström. Early revisions of the BeagleBone Black were shipped pre-installed with the Angström. A quick overview of Angström (http://www.angstrom-distribution.org/) is as follows:

  • Angström is built with OpenEmbedded and provides a lot of configuration flexibility

  • Angström is more commonly used with embedded devices and is a little bit different from what people might be used to on the desktop/laptop

  • The entire image can be locally built to give you an image with all the specific sources used in the image

  • Building...

Installing a distribution in the BeagleBone


The process of installing a distribution in the BeagleBone differs between the White and Black versions. The BBW does not have a built-in flash memory, unlike the BBB. The process of installing a distribution on the BBW is a matter of writing the image onto the microSD card and booting from it. In contrast, the BBB has an onboard memory to which you can copy the files. However, the BBB also offers a microSD slot. This provides the BBB user with an option to test out a distribution using the microSD card while keeping the stock image intact, similar to how a BBW is set up.

Before beginning, make sure that the following items are available:

  • A blank microSD card at least 1 GB or bigger. The size needed depends on the image; internal flash on a BBB is 2 GB on older revisions and 4 GB on newer revisions. The card does not need to be blank but the contents will be erased in the process, so make sure that there is nothing on the card that you want to keep...

Nonsystem software in the BeagleBone


After the BeagleBone boots the kernel and allows you to log in, the system is ready to run the nonsystem software. This software runs in an unprivileged level, so bugs here are unlikely to crash the entire system. This software is typically what makes the BeagleBone specific to a task. Later on in this book, we will write this type of software as an exercise to familiarize ourselves with the BeagleBone. The line between the system software and nonsystem software can be unclear as most distribution includes a vast library of applications, either installed or easily installable with a few commands. The exact process depends on the distribution. For Angström users, this is done using the opkg command. For Debian users, this is done either by apt-get or dpkg just like on a desktop machine.

For a lot of BeagleBone users, the software library offered by distributions is commonly just a foundation to build upon. Depending on the intended task, additional software...

Summary


In this chapter, we looked at the two common system software distributions for the BeagleBone. We also went through the basics of downloading and running a distribution. For the BBB, this process allows a BBB in an unknown state to be restored to a factory condition. Finally, we looked at an overview of installation applications in the BeagleBone.

The upcoming chapters will be much more hands on as we apply the foundation built here and go through the process of building your first project on the BeagleBone. We will build a variation of the classic first project for embedded users, an LED flasher. While you might not have chosen to install a new distribution at this time, this process can be applied to recover from most software mistakes.

The LED flasher project will be broken into two parts. In Chapter 3, Building an LED Flasher, we will ease into controlling the LED and end with a basic flasher. This basic flasher will be the foundation for the advanced exercises.

lock icon The rest of the chapter is locked
You have been reading a chapter from
Learning BeagleBone
Published in: Dec 2014 Publisher: ISBN-13: 9781783982905
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}