# MinnowBoard Turbot

**URL:** <https://hub.mender.io/t/minnowboard-turbot/59>\
**Category:** Yocto Project\
**Tags:** yocto, intel, sumo, minnowboard, x86\
**Created:** [September 28, 2018, 8:57pm UTC](https://hub.mender.io/t/minnowboard-turbot/59 "2018-09-28T20:57:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eystein](https://avatars.discourse-cdn.com/v4/letter/e/e5b9ba/32.png) [@eystein](https://hub.mender.io/u/eystein)\
**Post date:** [September 28, 2018, 8:57pm UTC](https://hub.mender.io/t/minnowboard-turbot/59/1 "2018-09-28T20:57:47Z")

</div>

# Board description

The MinnowBoard Turbot is an open source hardware Single Board Computer based on a 64-bit Intel® Atom™ E38xx Series System on a Chip (SoC), with dual- and quad-core versions. It is a software-compatible descendant of the MinnowBoard MAX.

![turbot](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/656c2d82b4368c03a7c8268567929530bfe038ed.jpeg)

Web: [https://minnowboard.org/minnowboard-turbot/technical-specs](https://minnowboard.org/minnowboard-turbot/technical-specs)

# Test results

The Yocto Project releases in the table below have been tested by the Mender community. Please update it if you have tested this integration on other [Yocto Project releases](https://wiki.yoctoproject.org/wiki/Releases?target=_blank):

| Yocto Project | Build | Runtime |
| --- | --- | --- |
| thud (2.6) | :test_works: | :test_fails: [1](#footnote1) |
| sumo (2.5) | :test_works: | :test_works: |

1. Outputs boot error and drops to systemd maintenance mode. Once exiting maintenance mode the board boots correctly.

**Build** Means that the Yocto Project build using this Mender integration completes without errors and outputs images.  
**Runtime** Means that Mender has been verified to work on the board. For U-Boot-based boards, the [integration checklist](https://docs.mender.io/devices/integrating-with-u-boot/integration-checklist?target=_blank) has been verified.

# Getting started

## Prerequisites

- A supported Linux distribution and dependencies installed on your workstation/laptop as described in the [Yocto Mega Manual](https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#detailed-supported-distros)
  - NOTE. Instructions depend on which Yocto version you intend to use.

- Google repo tool [installed](https://hub.mender.io/t/google-repo/58/2) and in your `PATH` .

## Configuring the build

### Setup Yocto environment

Set the Yocto Project branch you are building for:

```auto
# set to your branch, make sure it is supported (see table above)
export BRANCH="sumo" 

```

Create a directory for your `mender-minnowboard` setup to live in and clone the  
meta information.

```auto
mkdir mender-minnowboard && cd mender-minnowboard

```

Initialize repo manifest:

```auto
repo init -u https://github.com/mendersoftware/meta-mender-community \
           -m meta-mender-intel/scripts/manifest-intel.xml \
           -b ${BRANCH}

```

Fetch layers in manifest:

```auto
repo sync

```

## Setup build environment

Initialize the build environment:

```auto
source setup-environment intel

```

### Configure Mender server URL (optional)

This section is not required for a successful build but images that are generated by default are only suitable for usage with the Mender client in [Standalone deployments](https://docs.mender.io/architecture/standalone-deployments?target=_blank), due to lack of server configuration.

You can edit the `conf/local.conf` file to provide your Mender server configuration, ensuring the generated images and Mender Artifacts are connecting to the Mender server that you are using. There should already be a commented section in the generated `conf/local.conf` file and you can simply uncomment the relevant configuration options and assign appropriate values to them.

Build for Hosted Mender:

```auto
# To get your tenant token:
# - log in to https://hosted.mender.io
# - click your email at the top right and then "My organization"
# - press the "COPY TO CLIPBOARD"
# - assign content of clipboard to MENDER_TENANT_TOKEN
#
MENDER_SERVER_URL = "https://hosted.mender.io"
MENDER_TENANT_TOKEN = "<copy token here>"

```

Build for Mender demo server:

```auto
# https://docs.mender.io/getting-started/create-a-test-environment
#
# Update IP address to match the machine running the Mender demo server
MENDER_DEMO_HOST_IP_ADDRESS = "192.168.0.100"

```

### Building the image

You can now proceed with building an image:

```auto
MACHINE=intel-corei7-64 bitbake core-image-full-cmdline

```

Replace `core-image-full-cmdline` with your desired image target.

### Using the build output

After a successful build, the images and build artifacts are:

- tmp/deploy/images/intel-corei7-64/core-image-full-cmdline-intel-corei7-64.uefiimg
- tmp/deploy/images/intel-corei7-64/core-image-full-cmdline-intel-corei7-64.mender

The disk image (with `.uefiimg` suffix) is used to provision the device storage for devices without Mender running already. Please proceed to [the official documentation on provisioning a new device](https://docs.mender.io/artifacts/provisioning-a-new-device?target=_blank) for steps to do this.

On the other hand, if you already have Mender running on your device and want to deploy a rootfs update using this build, you should use the [Mender Artifact](https://docs.mender.io/architecture/mender-artifacts?target=_blank) files, which have `.mender` suffix. You can either deploy this Artifact in managed mode with the Mender server (upload it under Releases in the server UI) or by using the Mender client only in [Standalone deployments](https://docs.mender.io/architecture/standalone-deployments?target=_blank).

### Booting from SD card

If you are writing the disk image to a SD card, you need to update the Minnowboard’s BIOS settings to boot from it. You need to have a keyboard and monitor attached when booting the first time in order to change the boot settings. This can be achieved with a serial cable or by plugging in a USB keyboard and monitor directly into the board.

Insert the SD card into the Minnowboard, and connect power. Press F2 immediately during boot to enter Setup.

In the BIOS menu, select Boot Maintenance Manager -\> Boot Options -\> Change Boot Order. Then go to the boot order listing and press Enter.

Use the down arrow to Select “Misc Device” and use + to move it to the top.

Then press F10 and Y to save selection and ESC three times followed by Continue to reboot the board with these new settings. All following boots should now boot from the SD card.

## Create Mender Artifacts to control LED blinking (optional)

Now that we have the device provisioned and connected to the Mender server, we can build some updates to deploy. The most common place to start is with the blinkenlights!

Note that to make testing easier, we will use the meta-mender-demo layer. If you did not include this layer above, you need to adjust the steps below.

The `meta-mender-demo` layer already comes with a script that is configured to run at boot, called `bootscript.sh`. By default it is a no-op script, so we will simply overwrite this script with our code to blink the MinnowBoard LED.

### Build an Artifact to blink the LED slowly

This section assumes that you have setup the Yocto environment and that you are located in the `build/` directory.

```bash
cat << "EOF" > ../sources/meta-mender/meta-mender-demo/recipes-mender/boot-script/files/boot-script.sh
#!/bin/sh

# Blink the D2 LED on a MinnowBoard Turbot board
# D2 LED is GPIO 360
LED2=360
# Tell the system we'll be using the GPIO for the D2 LED
if [! -d /sys/class/gpio/gpio$LED2]; then
        echo $LED2 > /sys/class/gpio/export
fi
# and we'll be using it for Output (out) and not Input (in)
echo out > /sys/class/gpio/gpio$LED2/direction
# alternate writing a 0 (ON) and 1 (OFF) every second, until interrupted
i=0
while true ; do
        echo $i > /sys/class/gpio/gpio$LED2/value
        sleep 2
        i=$(((i==0?1:0)))
done
EOF

```

Open `conf/local.conf` and change `MENDER_ARTIFACT_NAME` to `blinkslow`:

```bash
MENDER_ARTIFACT_NAME = "blinkslow"

```

Then build an Artifact that will blink the LED slowly:

```bash
bitbake core-image-full-cmdline

```

The build should finish within 5-10 minutes. After it finishes, copy the generated Artifact to save it for later and name it blinkslow:

```bash
cp tmp/deploy/images/intel-corei7-64/core-image-full-cmdline-intel-corei7-64.mender ~/core-image-full-cmdline-intel-corei7-64-blinkslow.mender

```

### Build an Artifact to blink the LED fast

To switch between blinking fast and slow using Mender, we build _another_ Artifact, one that blinks faster.

Open `../sources/meta-mender/meta-mender-demo/recipes-mender/boot-script/files/boot-script.sh` and change line 16 from `sleep 2` to `sleep 0.2`:

```bash
sleep 0.2

```

Then open `conf/local.conf` and change `MENDER_ARTIFACT_NAME` to `blinkfast`:

```bash
MENDER_ARTIFACT_NAME = "blinkfast"

```

Then build an Artifact that will blink the LED fast:

```bash
bitbake core-image-full-cmdline

```

The build should finish within 5-10 minutes. After it finishes, copy the generated Artifact to save it for later and name it blinkfast:

```bash
cp tmp/deploy/images/intel-corei7-64/core-image-full-cmdline-intel-corei7-64.mender ~/core-image-full-cmdline-intel-corei7-64-blinkfast.mender

```

### Deploy the blinkenlights updates

Upload the two Artifacts (blinkslow and blinkfast) to your Mender server.

Deploy them to the Minnowboard. This will typically take 5-6 minutes, depending on your network speed.

After deploying them you should see the LED2 light blink fast or slow, depending on which Artifact you deployed!

# References

- [Minnowboard Turbot Getting Started](https://minnowboard.org/tutorials/getting-started-with-minnowboard-turbot)

- [Minnowboard: Installing Yocto](https://minnowboard.org/tutorials/installing-yocto-poky)

- [Minnowboard: Blinking a LED](https://minnowboard.org/tutorials/blinking-the-d2-led)

- The official [Mender documentation](https://docs.mender.io/) explains how Mender works. This is simply a board-specific complement to the official documentation.

* * *

_If this post was useful to you, please press like, or leave a thank you note to the contributor who put valuable time into this and made it available to you. It will be much appreciated!_

---

<div class="post-metadata">

**Author:** ![c3ntry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/c3ntry/32/677_2.png) [@c3ntry](https://hub.mender.io/u/c3ntry)\
**Post date:** [August 26, 2019, 3:52pm UTC](https://hub.mender.io/t/minnowboard-turbot/59/2 "2019-08-26T15:52:58Z")

</div>

Any news on how to fix the boot error? I am trying to integrate Mender with a very similar Industrial PC and I am running into the same boot error…

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [August 26, 2019, 5:37pm UTC](https://hub.mender.io/t/minnowboard-turbot/59/3 "2019-08-26T17:37:37Z")

</div>

@c3ntry welcome to Mender hub. What’s you’r problem you’re referring to? Thanks.

---

<div class="post-metadata">

**Author:** ![c3ntry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/c3ntry/32/677_2.png) [@c3ntry](https://hub.mender.io/u/c3ntry)\
**Post date:** [August 27, 2019, 6:53am UTC](https://hub.mender.io/t/minnowboard-turbot/59/4 "2019-08-27T06:53:56Z")

</div>

> [@eystein](#):
>
> thud (2.6)

Sorry, I should have been more clear.  
The Post states that with Yocto thud (2.6) there is a Boot Error at Runtime: “Outputs boot error and drops to systemd maintenance mode. Once exiting maintenance mode the board boots correctly.” - I am running into the same error and was wondering if someone found a solution to this problem.

---

<div class="post-metadata">

**Author:** ![MarekBelisko](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/marekbelisko/32/33_2.png) [@MarekBelisko](https://hub.mender.io/u/MarekBelisko)\
**Post date:** [August 27, 2019, 7:28am UTC](https://hub.mender.io/t/minnowboard-turbot/59/5 "2019-08-27T07:28:21Z")

</div>

I have no minnowboard to test and help but did you try build stock image based on thud (without mender) and it works fine? Also possibility would be to debug why systemd goes to maintenance mode by using [serial connection](https://minnowboard.org/tutorials/best-practice-serial-connection) and check what is wrong.
