The MinnowBoard Chronicles Episode 32: a successful Yocto image install

In Episode 31: First attempts to debug the Linux kernel and prior episodes of the MinnowBoard Chronicles eBook, you can see how I struggled unsuccessfully to install a Yocto image I built onto the MinnowBoard. Well, this week, I got it to work! Here’s the trick.

I’ll reveal my secret right at the beginning: I happened to be browsing the MinnowBoard tutorials webpage, and I found a new tutorial there: Installing Yocto 2.4.1 Poky. So, intrigued, I decided to follow those instructions, on the off-chance that I might have better luck. They differed slightly from the instructions that I had followed in earlier Episodes within the Yocto Project Quick Start, but I really couldn’t see what the major changes were.

I followed the steps, and it worked like a charm! Here’s a screenshot of the login. Note that just entering the userid “root”, without any password, gets you right in:

Yocto good login

IMPORTANT NOTE #1: There’s a small error in the MinnowBoard tutorial instructions: although the image build resides in your working directory here:

tmp/deploy/images/intel-corei7-64/core-image-minimal-intel-corei7-64.wic

the instructions to copy the file to the USB stick is listed as:

$ sudo dd if=tmp/deploy/images/intel-corei7-64/core-image-base-intel-corei7-64.wic of=TARGET_DEVICE

You’re copying the core-image-minimal in this case, not the core-image-base. I’m sure this will be fixed in a future version of the tutorial, but for now, it tripped me up for a couple of minutes.

IMPORTANT NOTE #2: for those who might be somewhat unfamiliar with Linux, there’s a trick to finding out what the TARGET_DEVICE is. I use a USB stick, and the command:

$ sudo fdisk -l

Look for the disk that has the same size and configuration as your USB stick. In my case, the TARGET_DEVICE was /dev/sdb.

Typing in “help” into the booted image console gets you a listing of the basic built-in commands available:

alias

bg

break

cd

chdir

command

continue

echo

eval

exec

exit

export

false

fg

getopts

has

help

history

jobs

kill

let

local

printf

pwsd

read

readonly

return

set

shift

source

test

times

trap

true

type

ulimit

umask

unalias

unset

wait

I tried most of these, and also went through an old copy (1987) of the Unix System V Primer that I had lying around, trying the following commands, and found them to work:

passwd

date

who

time

cat

ps

vi

ls

Unfortunately, some of the commands and tools that I prefer (such as “nano” versus “vi” as an editor) are not in this minimal build.

One important note that I saw in the tutorial, that was not in the Yocto Project Quick Start, was the following:

NOTE: The Yocto Project is not a Linux distribution—it enables you to build your own distribution. For that reason, Intel BSPs (from the meta-intel layer) ship with a time-limited kernel for evaluation purposes—after 10 days, the kernel will reboot. This kernel is not intended to be used for production systems; you will need to build your own distribution with the Yocto Project tools. For more information, please see the Quick Start Guide as well as the rest of the Yocto Project documentation set.

I didn’t actually try this out, because we had a power outage between the time I launched the Yocto build the first time, and the 10-day period being elapsed. But, I did notice that sometime after the 10-day period from the date of the first installation, I could no longer log into the build. Just entering “root” gave me an error message, and I couldn’t log in under any circumstances:

Yocto image cannot log in

Subsequently, I took the core-image-minimal-intel-corei7-64.wic, burned it onto the USB stick again, and reloaded it onto the Minnowboard. This time, I could log in. So, I concluded that the 10 days must apply to the date of the image install, and not the date of the image build. That makes sense.

My next step is to try different example images, such as core-image-sato and core-image-sato-sdk, to see the differences, and then leap towards working with the Linux kernel source code.

Note that this is the first episode (#32) of the MinnowBoard Chronicles published subsequent to the release of my eBook, The MinnowBoard Chronicles. Please register for the eBook if you want to catch up, and stay tuned for more episodes and a new and revised version of the eBook in the future!

Alan Sguigna