Create artifact for Variscite DART-6UL

Hello everyone,
I am using Variscite’s DART-6UL board and integrated the meta-mender layer into my device. Now I can see the information of my device on the Mender demo server.

Now I will try to create an artifact for my device and distribute it to my device. But I don’t know where to start. I’m confused on the documents. First I want to prepare an empty artifact and distribute it. Then I want to embed an application into artifact and distribute it to my device successfully. Where and how to start.
I would be glad if you help.
Thank you.

The Mender Artifact is generated as output of your Yocto build and is suffixed with .mender. This is used to perform image based updates. A bit information can be found here,

https://docs.mender.io/2.0/architecture/overview#robust-updates

If you want to deploy application updates you first must use the 2.x version of the Mender client (I can see that you are running 1.7.1).

You will need to add the following to e.g local.conf to enable 2.x Mender Client,

PREFERRED_VERSION_pn-mender = "2.%"
PREFERRED_VERSION_pn-mender-artifact = "3.%"
PREFERRED_VERSION_pn-mender-artifact-native = "3.%"

It is not default on any of the stable branches yet.

Once you have Mender 2.x client running on your device you are able to deploy applications updates using Mender Update Modules. You can find a list of reference modules here,

https://hub.mender.io/c/update-modules

Some additional information regarding Update Modules can be found here,

https://docs.mender.io/2.0/devices/update-modules

Thank you for speedy reply.
Fristly, I must upgrade my Mender-client to 2.0. Then I will review the update modules.
Now I have to add them to the build / conf / local.conf file:

MACHINE ??= ‘imx6ul-var-dart’
DISTRO ?= ‘fslc-x11’
PACKAGE_CLASSES ?= “package_rpm”
EXTRA_IMAGE_FEATURES ?= “debug-tweaks”
USER_CLASSES ?= “buildstats image-mklibs image-prelink”
PATCHRESOLVE = “noop”
BB_DISKMON_DIRS ??= "
STOPTASKS,{TMPDIR},1G,100K \ STOPTASKS,{DL_DIR},1G,100K
STOPTASKS,{SSTATE_DIR},1G,100K \ STOPTASKS,/tmp,100M,100K \ ABORT,{TMPDIR},100M,1K
ABORT,{DL_DIR},100M,1K \ ABORT,{SSTATE_DIR},100M,1K
ABORT,/tmp,10M,1K"
PACKAGECONFIG_append_pn-qemu-native = " sdl"
PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl"
CONF_VERSION = “1”

DL_DIR ?= “${BSPDIR}/downloads/”
ACCEPT_FSL_EULA = “1”

Appended fragment from meta-mender-community/templates

This really saves a lot of disk space!

INHERIT += “rm_work”

The name of the disk image and Artifact that will be built.

This is what the device will report that it is running, and different updates

must have different names because Mender will skip installation of an Artifact

if it is already installed.

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 = “”

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 = “”

Build for Mender demo server

https://docs.mender.io/getting-started/create-a-test-environment

Uncomment below and update IP address to match the machine running the

Mender demo server

MENDER_DEMO_HOST_IP_ADDRESS = “192.168.6.90”

Build for Mender production setup (on-prem)

https://docs.mender.io/artifacts/building-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! 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 = “https://docker.mender.io
#FILESEXTRAPATHS_prepend_pn-mender := “<DIRECTORY-CONTAINING-server.crt>:”
#SRC_URI_append_pn-mender = " file://server.crt"

Mender storage configuration

More details on these variables is available at

https://docs.mender.io/devices/yocto-project/partition-configuration#configuring-storage

Also, please be sure to check other config files as other

layers, config fragments, etc may attempt to set values

for specific platforms. Using "bitbake -e "

can help determine which files are setting these values

in a given configuration.

MENDER_STORAGE_TOTAL_SIZE_MB = “2048”

MENDER_BOOT_PART_SIZE_MB = “16”

MENDER_DATA_PART_SIZE_MB = “1024”

MENDER_STORAGE_DEVICE = “/dev/mmcblk0”

MENDER_BOOT_PART = “${MENDER_STORAGE_DEVICE_BASE}1”

MENDER_DATA_PART = “${MENDER_STORAGE_DEVICE_BASE}4”

MENDER_ROOTFS_PART_A = “${MENDER_STORAGE_DEVICE_BASE}2”

MENDER_ROOTFS_PART_B = “${MENDER_STORAGE_DEVICE_BASE}3”

Appended fragment from meta-mender-community/meta-mender-variscite/templates

DISTRO ?= ‘fslc-x11’

This will make sure that our SPL + u-boot.img is embedded in the sdimg at

a 1kb offset.

MENDER_IMAGE_BOOTLOADER_FILE = “u-boot-spl.img”
MENDER_IMAGE_BOOTLOADER_BOOTSECTOR_OFFSET = “2”

Remove the unneeded VFAT boot partition

IMAGE_BOOT_FILES = “”
MENDER_BOOT_PART_SIZE_MB = “0”

Standard partition alignment from upstream wks file

MENDER_PARTITION_ALIGNMENT = “4194304”

Cleanup image types generated

IMAGE_FSTYPES_remove = “tar.gz ext4 wic.gz wic.bmap multiubi mender.bmap”

disable uefi

MENDER_FEATURES_ENABLE_append = " mender-uboot "
MENDER_FEATURES_DISABLE_append = " mender-grub mender-image-uefi"

Appended fragment from meta-mender-community/meta-mender-variscite/templates

SDCard Settings

MENDER_STORAGE_DEVICE_var-som-mx6 = “/dev/mmcblk1”
MENDER_UBOOT_STORAGE_DEVICE_var-som-mx6 = “0”
MENDER_STORAGE_DEVICE_imx6ul-var-dart = “/dev/mmcblk0”
UBOOT_CONFIG_var-som-mx6 = “sd”
UBOOT_CONFIG_imx6ul-var-dart = “sd”
MENDER_FEATURES_ENABLE_append = " mender-image-sd "
MENDER_STORAGE_TOTAL_SIZE_MB_var-som-mx6 = “1024”
MENDER_STORAGE_TOTAL_SIZE_MB_imx6ul-var-dart = “1024”

At the end of this local.conf file, I will add the version information that you said (mender-client 2.0).

PREFERRED_VERSION_pn-mender = “2.0%”
PREFERRED_VERSION_pn-mender-artifact = “3.0%”
PREFERRED_VERSION_pn-mender-artifact-native = “3.0%”

Then, I get a Yocto image again and print the .sdimg extention file to my sd card. After I print our .sdimg file to our sd card, insert the my device to sd card and burn it. I can check it on the mender demo server, right?

I did as you said and upgraded the mender-client to version 2.0.0.

Now, what’s my lead? I want to create my own artifact (primarily an empty artifact) and distribute it. Where should I start ?

The primary links for this are https://docs.mender.io/2.0/devices/update-modules and https://docs.mender.io/2.0/artifacts. Essentially you use the mender-artifact command to create the package/file based updates (https://docs.mender.io/2.0/devices/update-modules#workstation-with-mender-artifact)