Integration of mender to Odyssey-x86

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.

Where to buy: ODYSSEY - Single Board Computer - Development Platform

ODYSSEY-X86 V1 Wiki: Getting Started - Seeed Wiki

ODYSSEY-X86 V2 Wiki: Getting Started with reServer - Seeed Wiki

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:

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 has been verified.

Getting started

Prerequisites

  • A supported Linux distribution and dependencies installed on your workstation/laptop as described in the Yocto Mega Manual
    • 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.

mkdir mender-seeed && cd mender-seeed

Get all of necessary layers:

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:

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

Add yocto project layers:

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:

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, 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:

# 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:

# 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):

# 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:

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

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

pir

  • 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

  • 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:


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


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


fdisk -l

pir

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

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

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

  • 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!

3 Likes

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!

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.

Hi @lakshanthad,

I dd-ed the /dev/mmcblk0 disk:

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

I get this error:

The command I used for dd was the following:

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

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:

Like this:

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

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

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.

we need to do more change to the project if we want to make the mender work on the emmc.
1 same with lakshanthad said:
delete the

MENDER_STORAGE_DEVICE = "/dev/sda"

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

MENDER_STORAGE_DEVICE = "/dev/sda"

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

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.