Google Coral Dev Board

The official Mender documentation explains how Mender works. This is a board-specific complement to the official documentation.

Board description

A development board to quickly prototype on-device ML products. Scale from prototype to production with a removable system-on-module (SoM).

URL: https://coral.ai/products/dev-board/

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
zeus (3.0) :test_works: :test_works:
warrior (2.7) :test_works: :test_works:

NOTE! This integration has only be tested using the SD card as boot medium and would require additional changes to support booting from e.g eMMC.

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.
  • Google repo tool installed and in your PATH.

Configuring the build

Setup Yocto environment

Set the Yocto Project branch you are building for:

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

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

mkdir mender-coral && cd mender-coral

Initialize repo manifest:

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

Fetch layers in manifest:

repo sync

Setup build environment

Initialize the build environment:

. setup-environment coral

NOTE! You need to accept the Freescale EULA at ‘…/sources/meta-freescale/EULA’. Please read it and to accept it run:

echo "ACCEPT_FSL_EULA = \"1\"" >> conf/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/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:

bitbake core-image-base

Replace core-image-base with your desired image target.

Using the build output

After a successful build, the images and build artifacts are placed in tmp/deploy/images/coral-dev/.

  • tmp/deploy/images/coral-dev/core-image-base-coral-dev.sdimg
  • tmp/deploy/images/coral-dev/core-image-base-coral-dev.mender

The disk image with .sdimg 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 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 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.

References

Known issues

NOTE! This integration has only be tested using the SD card as boot medium and would require additional changes to support booting from e.g eMMC.


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!

2 Likes

16 posts were split to a new topic: Boot from eMMC on Coral dev board

Is yocto dunfell support planned for this device?

Is yocto dunfell support planned for this device?

Yes, but need to do this one first Add dunfell support ¡ Issue #40 ¡ mirzak/meta-coral ¡ GitHub

I have followed the instructions on this page, but the created yocto image doesn’t boot.

Serial console shows:

U-Boot SPL 2017.03.4-release-day+g8523a101cd (Mar 08 2021 - 17:58:12)
power_bd71837_init
pmic debug: name=BD71837
Board id: 0
start to config phy: p0=3200mts, p1=667mts with 1D2D training
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
config to do 3200 1d training.
Training PASS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
config to do 3200 2d training.
Training PASS
check ddr4_pmu_train_imem code
check ddr4_pmu_train_imem code pass
check ddr4_pmu_train_dmem code
check ddr4_pmu_train_dmem code pass
pstate=1: set dfi clk done done
Training PASS
Load 201711 PIE
Normal Boot
Trying to boot from MMC2
hdr read sector 300, count=1


U-Boot 2017.03.4-release-day+g8523a101cd (Mar 08 2021 - 17:58:12 +0000)

CPU:   Freescale i.MX8MQ rev2.1 1500 MHz (running at 1000 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 32C
Reset cause: POR
Model: Freescale i.MX8MQ Phanbell
DRAM:  3 GiB
"Synchronous Abort" handler, esr 0x96000210
ELR:     40231ba0
LR:      40231ba0
x0 : 00000000fdf91320 x1 : 00000000f9f06ed0
x2 : 0000000000000301 x3 : 0000000000000001
x4 : 00000000fffffffc x5 : 00000000f9f06d18
x6 : 0000000000000030 x7 : 00000000f9f07330
x8 : 00000000f9f072f8 x9 : 0000000000000008
x10: 00000000f9f06edc x11: 00000000ffffffff
x12: 0000000000006f50 x13: 00000000f9f072dc
x14: 00000000f9f073a8 x15: 00000000f9f073a8
x16: 0000000040231c14 x17: 0000000000000000
x18: 00000000f9f0fda8 x19: 00000000f9f06ed0
x20: 00000000fdf907d8 x21: 00000000bdd10000
x22: 0000000000000000 x23: 0000000000000000
x24: 0000000000000000 x25: 0000000000000000
x26: 0000000000000000 x27: 0000000000000000
x28: 0000000000000000 x29: 00000000f9f06e50

Resetting CPU ...

resetting ...

SD Card Partitions:

Disk /dev/sdb: 29.18 GiB, 31323062272 bytes, 61177856 sectors
Disk model: STORAGE DEVICE  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3e0c7687

Device     Boot  Start     End Sectors  Size Id Type
/dev/sdb1  *     49152   81919   32768   16M  c W95 FAT32 (LBA)
/dev/sdb2        81920  524287  442368  216M 83 Linux
/dev/sdb3       524288  966655  442368  216M 83 Linux
/dev/sdb4       966656 1228799  262144  128M 83 Linux

Could you please help me in figuring out what is going wrong?

regards
Arun

Yikes. That seems like a bad instruction set setting or something. I’ve never actually touched one of these boards so I can’t really help here.

I see the following warning:

WARNING: u-boot-coral-2017.03-r0 do_provide_mender_defines: Detected missing fix for '=' sign in fw_setenv script files. You may need to include this patch from the U-Boot project: https://gitlab.denx.de/u-boot/u-boot/-/commit/cd655514aa044c77fe3b895a51677ba47b26ba89

could this be related?

I suppose it’s possible but it seems unlikely.

The warrior branch of meta-coral boots up, where as the zeus branch doesn’t. With warrior branch, the “release-day” revision of u-boot is also working fine.

The changes from warrior to zeus has caused some problem with the image packaging. Could any one help me out in figuring this out?

Hi,
As far as I remember we had some problems with new version of fw_setenv and changed syntax (with and without = between key and value). Can you check if all u-boot variables are set correctly?

How can i check this during build time?

On the device, i don’t even get the u-boot prompt. It is crashing somewhere in the fastboot initialisation stages.

regards
Arun

You can run strings on the u-boot binary as the default environment is embedded in there. It will be difficult to parse though since there are likely to be many pages of output.

I am trying to run the zeus build on ubuntu 22.04, but it fails to compile m4-native.
The error is: ERROR: Task (/home/nola/mender-coral/build/../sources/poky/meta/recipes-devtools/m4/m4-native_1.4.18.bb:do_compile) failed with exit code '1'

Hi @synaption,

The zeus release is unfortunately quite outdated already, and build breakage should be expected. Can you try to forward-port to dunfell? This could be as simple as setting all layers to the new release and see what happens, maybe adjusting the `LAYERSERIES_COMPAT" directive.

Greetz,
Josef