Chapter 7. The Kernel

7.0 Introduction

The kernel is the heart of the Linux operating system. It’s the software that takes the low-level requests, such as reading or writing files, or reading and writing general-purpose input/output (GPIO) pins, and maps them to the hardware. When you install a new version of the OS (Recipe 1.3), you get a certain version of the kernel.

You usually won’t need to mess with the kernel, but sometimes you might want to try something new that requires a different kernel. This chapter shows how to switch kernels. The nice thing is you can have multiple kernels on your system at the same time and select from among them which to boot up.

Note

We assume here that you are logged on to your Bone as root and superuser privileges. You also need to be logged in to your Linux host computer as a nonsuperuser.

7.1 Updating the Kernel

Problem

You have an out-of-date kernel and want to want to make it current.

Solution

Use the following command to determine which kernel you are running:

bone# uname -a
Linux beaglebone 3.8.13-bone67 #1 SMP Wed Sep 24 21:30:03 UTC 2014 armv7l
 GNU/Linux

The 3.8.13-bone67 string is the kernel version.

To update to the current kernel, ensure that your Bone is on the Internet (Recipe 5.13 or Recipe 5.11) and then run the following commands:

bone# apt-cache pkgnames | grep linux-image | sort | less ... linux-image-3.15.8-armv7-x5 linux-image-3.15.8-bone5 linux-image-3.15.8-bone6 ... linux-image-3.16.0-rc7-bone1 ... linux-image-3.8.13-bone60 ...

Get BeagleBone Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.