# Integration of mender to Odyssey-x86

**URL:** <https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170>\
**Category:** Board Integrations\
**Tags:** yocto, x86, mender-client\
**Created:** [October 9, 2021, 11:21am UTC](https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170 "2021-10-09T11:21:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baozhu](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/baozhu/32/1382_2.png) [@Baozhu](https://hub.mender.io/u/Baozhu)\
**Post date:** [October 9, 2021, 11:21am UTC](https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170/1 "2021-10-09T11:21:00Z")

</div>

Edge Computing devices are playing an increasingly important role in the field of IoT. Nowadays, a computer is not just a big rectangular black box under the desk, or a small portable device working on your knees. Computers are ubiquitous devices that span calculating, communicating, and data storage. Based on this definition, here we would like to introduce our new product – the ODYSSEY - X86.

# Board description

ODYSSEY is a series of SBC (Single Board Computer), allowing you to build Edge Computing applications with ease. The ODYSSEY - X86, based on latest Intel x86 chips, is a Quad-Core CPU that running up to 4.10GHz. It includes all the powerful features of a Mini PC such as including a 32GB LPDDR4 RAM(optional), 64GB eMMC Storage(optional), onboard Wi-Fi/BLE, Dual Gigabit Ethernet Ports or Dual 2.5-Gigabit Ethernet ports, Audio Input and Output, USB Ports, HDMI, SATA Connectors and PCIe, however, within a cost-effective price. With simple connections to Mouse, Keyboard and Monitor to ODYSSEY - X86, you will get a Mini Device right away. With eMMC versions, you even have the Windows 10 Enterprise pre-installed!

Compared with other x86 boards in the marketplace, every ODYSSEY-X86 board has an on-board microcontroller, you can control your machine in real-time. if you are not family with an embedded system, a microcontroller Arduino environment will help you get started quickly. we hope the board will help more people in more different scenes.

For the ODYSSEY - X86 v1 board, the board includes a standard RPI 40-pin Pi HAT. you can add your favorite Pi HAT to the board. We made a lot of ACPI tables to support those Pi HATs. Hope you like it.

For the ODYSSEY - X86 v2 board, we use the latest intel Mobile processor. We want it to consume less power and perform better.

Just simply connect to a mouse, a keyboard and a monitor with the ODYSSEY – X86, you will get a powerful Desktop Mini PC that can run Windows and Linux OS.

 ![](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/2/2edaa688512e481b7bf8e41f351688804c9a0642.jpeg)

Where to buy: [https://www.seeedstudio.com/ODYSSEY-c-1492.html](https://www.seeedstudio.com/ODYSSEY-c-1492.html)

ODYSSEY-X86 V1 Wiki: [Getting Started with ODYSSEY - X86J41x5 | Seeed Studio Wiki](https://wiki.seeedstudio.com/ODYSSEY-X86J4105/)

ODYSSEY-X86 V2 Wiki: [Getting Started with reServer X86 | Seeed Studio Wiki](https://wiki.seeedstudio.com/reServer-Getting-Started/)

# 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 |
| --- | --- | --- |
| dunfell (3.1 / 5.3.0) | :test_works: | :test_works: |
| **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.

## Configuring the build

### Setup Yocto environment

Set the Yocto Project branch you are building for:

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

```auto
mkdir mender-seeed && cd mender-seeed

```

Get all of necessary layers:

```auto
git clone -b dunfell git://git.yoctoproject.org/poky layers/poky
git clone git://git.yoctoproject.org/meta-intel layers/meta-intel 
git clone -b dunfell https://github.com/mendersoftware/meta-mender layers/meta-mender
git clone -b dunfell https://github.com/openembedded/meta-openembedded layers/meta-openembedded
git clone https://github.com/Seeed-Studio/meta-odyssey-x86 layers/meta-odyssey-x86

```

## Setup build environment

Initialize the build environment:

```auto
source layers/poky/oe-init-build-env 

```

Add yocto project layers:

```auto
bitbake-layers add-layer ../layers/meta-intel 
bitbake-layers add-layer ../layers/meta-odyssey-x86 
bitbake-layers add-layer ../layers/meta-openembedded/meta-oe 
bitbake-layers add-layer ../layers/meta-openembedded/meta-python 
bitbake-layers add-layer ../layers/meta-openembedded/meta-networking 
bitbake-layers add-layer ../layers/meta-mender/meta-mender-core 
bitbake-layers add-layer ../layers/meta-mender/meta-mender-demo 

```

Apply Mender configuration to build environment:

```auto
CONF_VERSION = "1"
MACHINE = "odyssey-x86-mender"
MENDER_ARTIFACT_NAME = "release-1"
INHERIT += "mender-full"
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
MENDER_STORAGE_DEVICE = "/dev/sda"
MENDER_STORAGE_TOTAL_SIZE_MB_DEFAULT = "4096"
MENDER_BOOT_PART_SIZE_MB = "64"
# MENDER_DATA_PART_SIZE_MB = "1024"
# By default MENDER_DATA_PART_SIZE_MB=128MB and it will try to resize 
# the partition on first boot to the full size of the remaining space
MENDER_IMAGE_BOOTLOADER_FILE = "wic-initrd"

IMAGE_FEATURES_append = " \
    ssh-server-openssh \
    "

```

in your local.conf.

### 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/administration/demo-installation
#
MENDER_DEMO_HOST_IP_ADDRESS = "<IP address of Mender demo server>"

```

Build for Mender Production/ Self-Hosted (on-prem):

```auto
# https://docs.mender.io/3.1/system-updates-yocto-project/build-for-production
#
# Uncomment below and update the URL to match your configured domain
# name and provide the path to the generated server.crt file.
#
# Note that a custom server.crt file is only necessary if you are using
# self-signed certificates.
#
# NOTE! It is recommend that you provide below information in your custom
# Yocto layer and this is only for demo purposes. See linked documentation
# for additional information.
MENDER_SERVER_URL = "<URL of Self-Hosted Mender Server>"
FILESEXTRAPATHS_prepend_pn-mender-client := "<DIRECTORY-CONTAINING-server.crt>:"
SRC_URI_append_pn-mender-client = " file://server.crt"

```

### Building the image

You can now proceed with building an image:

```auto
bitbake odyssey-image-base

```

Replace `odyssey-image-base` with your desired image target.

### Using the build output

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

- `build/tmp/deploy/images/odyssey-x86-mender/odyssey-image-base-odyssey-x86.uefiimg.bz2`

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).

### Flash instructions

There are two different methods of flashing the image and running on the ODYSSEY - X86 board.

**Method 1:** Flash to a USB Flash Drive connected to the ODYSSEY - X86 board and boot the system from the flash drive.

**Method 2:** Flash to an HDD/SSD connected to the ODYSSEY - X86 board and run from the HDD/SSD.

#### Method 1

- **Step 1.** [Download balenaEtcher](https://www.balena.io/etcher/) according to your operating system

- **Step 2.** Plug a USB Flash Drive to the PC

- **Step 3.** Click **Flash from file** and select `mender-seeed/build/tmp/deploy/images/odyssey-x86-mender/odyssey-image-base-odyssey-x86.uefiimg.bz2`file

![pir](https://files.seeedstudio.com/wiki/Mender/client/balena.png)

- **Step 4.** Click **Select target** and choose the connected USB drive

- **Step 5.** Finally click **Flash**

- **Step 6.** Connect Flash drive to ODYSSEY - X86 board and turn on the board

- **Step 7.** While turning on the board, keep pressing **DELETE key** to enter **BIOS setup**

- **Step 8.** Go to **Boot** section and set the **Boot Option #1** to **UEFI: USB, Partition 1**

![pir](https://files.seeedstudio.com/wiki/Mender/client/UEFI.png)

- **Step 9.** Go to **Save & Exit** and select **Save Changes and Reset**

Now the OS will be successfully booted from the USB Flash Drive

#### Method 2

- **Step 1.** Follow from **step 1 - step 9** in above **Method 1**

- **Step 2.** After booting successfully, turn off the board by executing:

```sh

poweroff

```

**Note:** We need to boot once after flashing because the **data** partition will grow to take up the remaining space on the flash drive, and we will use that space to store the image we need to flash to the HDD/SSD.

- **Step 3.** Remove the flash drive from the ODYSSEY - X86 and connect to the PC

- **Step 4.** Open a terminal window and copy the **uefiimg** from the Yocto compilation to the **data** partition of the flash drive

```sh

sudo cp mender-seeed/build/tmp/deploy/images/odyssey-x86-mender/odyssey-image-base-odyssey-x86.uefiimg /media/username/data

```

**Note:** Replace **username** with the username of your PC

- **Step 5.** Remove Flash drive from PC and connect to the ODYSSEY - X86 board. Also connect an external HDD/ SSD to the ODYSSEY board.

- **Step 6.** After the board is booted, type the following in the terminal window to list the disk partitions

```sh

fdisk -l

```

![pir](https://files.seeedstudio.com/wiki/Mender/client/partition.png)

We can see that the connected HDD as **/dev/sdb**

- **Step 7.** Flash the **.uefiimg** file that we copied before to the connected HDD/SSD using **dd** utility

```sh

dd if=/data/odyssey-image-base-odyssey-x86.uefiimg of=/dev/sdb

```

**Note:** Replace **/dev/sdb** with the name corresponding to the connected HDD/SSD

- **Step 8.** Once flashing is done, poweroff the ODYSSEY - X86

```sh

poweroff

```

- **Step 9.** Remove the USB Flash drive and turn on the ODYSSEY - X86

- **Step 10.** While turning on the board, keep pressing **F7** to enter BIOS setup

- **Step 11.** Go to **BOOT** section and set the **Boot Option #1** to **UEFI: USB, Partition 1**

![pir](https://files.seeedstudio.com/wiki/Mender/client/UEFI.png)

- **Step 12.** Go to **Save & Exit** and select **Save Changes and Reset**

Now the OS will be successfully booted from the HDD/SSD

* * *

_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:** ![JuanPabloMF](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/juanpablomf/32/1442_2.png) [@JuanPabloMF](https://hub.mender.io/u/JuanPabloMF)\
**Post date:** [December 3, 2021, 3:04pm UTC](https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170/2 "2021-12-03T15:04:15Z")

</div>

Very useful post!!

I managed to follow all the tutorial, but there is something I can’t figure out. My version of the odyssey has an EMMC storage included. I tried to dd as you would for a SSD and then boot from EMMC and this isn’t working (booting from usb works just fine).

Should I dd another different file from yocto to the EMMC? Or maybe should I change something (e.g: pins, config) so that Odyssey boots from EMMC?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [December 6, 2021, 5:30am UTC](https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170/3 "2021-12-06T05:30:31Z")

</div>

Hello @JuanPabloMF,

Did you choose the correct partition corresponding to the eMMC when you used “dd” command for flashing?

Can I see a screenshot for the output of “fdisk -l” command?

Best Regards,  
Lakshantha.

---

<div class="post-metadata">

**Author:** ![JuanPabloMF](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/juanpablomf/32/1442_2.png) [@JuanPabloMF](https://hub.mender.io/u/JuanPabloMF)\
**Post date:** [December 6, 2021, 3:02pm UTC](https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170/4 "2021-12-06T15:02:57Z")

</div>

Hi @lakshanthad,

I dd-ed the /dev/mmcblk0 disk:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/c/c1ba56a5e18ed2c18e97cb61c096b9d4d47e46de.png)

It gave me 4 partitions similar in space to this:

/dev/mmcblk0p1 16384 147455 131072 64M EFI System  
/dev/mmcblk0p2 147456 4128767 3981312 1.9G Linux filesystem  
/dev/mmcblk0p3 4128768 8110079 3981312 1.9G Linux filesystem  
/dev/mmcblk0p4 8110080 15728606 7618527 3.6G Linux filesystem

When I choose the following boot (I imagine that’s the boot coming from emmc?):

![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/5/5eaeacda27903ee85c7a02e49af7ba5f0d8d3c23.jpeg)

I get this error:

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/7/777e056fa4839c57e97cb16488b46c148243b212.jpeg)

The command I used for dd was the following:

```auto
dd if=/data/odyssey-image-base-odyssey-x86-mender.uefiimg of=/dev/mmcblk0

```

---

<div class="post-metadata">

**Author:** ![lakshanthad](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/lakshanthad/32/1403_2.png) [@lakshanthad](https://hub.mender.io/u/lakshanthad)\
**Post date:** [December 7, 2021, 8:23am UTC](https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170/5 "2021-12-07T08:23:07Z")

</div>

Hello @JuanPabloMF ,

Could you do the following:

1. Use the same image you used before when following **Method 1**

2. Before moving to **Method 2** , comment out this line and build the image again:

> <https://github.com/Seeed-Studio/meta-odyssey-x86/blob/main/conf/machine/odyssey-x86-mender.conf#L25>

Like this:

```auto
#MENDER_STORAGE_DEVICE = "/dev/sda"

```

1. In **method 2** , in **step 4** , copy this newly built image to the **data** partition of the flash drive and then later on **dd** onto the eMMC as mentioned in **step 7**

Please let me know the results.

---

<div class="post-metadata">

**Author:** ![JuanPabloMF](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/juanpablomf/32/1442_2.png) [@JuanPabloMF](https://hub.mender.io/u/JuanPabloMF)\
**Post date:** [January 18, 2022, 9:42pm UTC](https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170/6 "2022-01-18T21:42:59Z")

</div>

Hi @lakshanthad, same results with the modification you suggested.

---

<div class="post-metadata">

**Author:** ![bigbearishappy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bigbearishappy/32/1430_2.png) [@bigbearishappy](https://hub.mender.io/u/bigbearishappy)\
**Post date:** [February 21, 2022, 10:43am UTC](https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170/7 "2022-02-21T10:43:55Z")

</div>

As we can see from the boot log of mender.  
“ **waiting for root device /dev/sda2…** ”  
We need to change the project configuration to make it can boot on emmc.  
We will give you a reply after we find out the way to fix it.

---

<div class="post-metadata">

**Author:** ![bigbearishappy](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/bigbearishappy/32/1430_2.png) [@bigbearishappy](https://hub.mender.io/u/bigbearishappy)\
**Post date:** [February 22, 2022, 8:59am UTC](https://hub.mender.io/t/integration-of-mender-to-odyssey-x86/4170/8 "2022-02-22T08:59:20Z")

</div>

we need to do more change to the project if we want to make the mender work on the emmc.  
1 same with [lakshanthad](https://hub.mender.io/u/lakshanthad) said:  
delete the

```auto
MENDER_STORAGE_DEVICE = "/dev/sda"

```

in you build/conf/local.conf  
2 delete the

```auto
MENDER_STORAGE_DEVICE = "/dev/sda"

```

in mender-seeed/layers/meta-odyssey-x86/conf/machine/odyssey-x86-mender.conf  
3 replace the

```auto
include ${@mender_feature_is_enabled("mender-client-install","",d)}

```

with the old one in mender-seeed/layers/meta-odyssey-x86/recipes-kernel/linux/linux-intel\_%.bbappend

compile the new mender firmware and try again.  
Please let me know if you have any problem.
