I’m now trying to set up mender and make use of the features. I’m experiencing an error that seems to have occurred for other people.
To summarise, I created a set up in Yocto which is similar to the script Drew Moseley created here.
The main differences are:
- I’m using Dunfell instead of Rocko
- I have added an extra layer which is a copy of the stargazer recipe here to add recipes for systemd as a service and additional networking.
- I’ve modified local.conf as to be as shown below. The key points are the use of U-boot.
IMAGE_FEATURES_remove += “splash”
MENDER_STORAGE_DEVICE = “/dev/mmcblk0”
MENDER_ARTIFACT_NAME = “release-1”
INHERIT += “mender-full”
MACHINE = “raspberrypi3”
RPI_USE_U_BOOT = “1”
MENDER_STORAGE_TOTAL_SIZE_MB = “30000”
MENDER_BOOT_PART_SIZE_MB = “40”
MENDER_DATA_PART_SIZE_MB = “28000”
IMAGE_INSTALL_append = " kernel-image kernel-devicetree"
IMAGE_FSTYPES_remove += " rpi-sdimg"
IMAGE_BOOT_FILES_append = " boot.scr u-boot.bin;${SDIMG_KERNELIMAGE}"
INHERIT += “rpi-update-firmware”
DISABLE_RPI_BOOT_LOGO = “1”
DISABLE_SPLASH = “1”
MENDER_SERVER_URL = “https://hosted.mender.io”
MENDER_TENANT_TOKEN =
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = “systemd”
DISTRO_FEATURES_BACKFILL_CONSIDERED = “sysvinit”
VIRTUAL-RUNTIME_initscripts = “”
IMAGE_FSTYPES = “ext4”
When I run bitbake core-image-full-cmdline, the build configuration output is:
Build Configuration:
BB_VERSION = “1.46.0”
BUILD_SYS = “x86_64-linux”
NATIVELSBSTRING = “universal”
TARGET_SYS = “arm-poky-linux-gnueabi”
MACHINE = “raspberrypi3”
DISTRO = “poky”
DISTRO_VERSION = “3.1.4”
TUNE_FEATURES = “arm vfp cortexa7 neon vfpv4 thumb callconvention-hard”
TARGET_FPU = “hard”
meta
meta-poky
meta-yocto-bsp = “dunfell:e79ccaa277d8a67429e5b5693236e2c98e395f24”
meta-oe
meta-python
meta-multimedia
meta-networking = “dunfell:f2d02cb71eaff8eb285a1997b30be52486c160ae”
meta-raspberrypi = “dunfell:987993209716302eb8f314f69a2a3340555f94d8”
meta-mender-core
meta-mender-raspberrypi = “dunfell:cc1fdd90820bf8912007b399217bdc3278473165”
meta-stargazer = “:”
I flashed an SD card using the command
sudo dd if=core-image-full-cmdline-raspberrypi3.sdimg of=/dev/sdb bs=4M
I then booted the RPI3 and logged in. When I run the command
mender show-artifact
I get
ERRO[0000] Failed to read the current active partition: No match between boot and root partitions. : exit status 243.
If I type cat /etc/fw_env.config the output is:
/dev/mmcblk0 0x400000 0x4000
/dev/mmcblk0 0x800000 0x4000
From my understanding this looks correct. However, I suspect the problem because of a mismatch between U-Boot and the kernel. To investigate, I’ve gone into U-boot and typed printenv but I’m not sure which variables I should check.
I’m not completely wedded to using U-Boot. If there’s a simpler solution without it then I’d be happy to follow a recommendation either way.
My goal is to have an operational system where I can more recipes for a Qt touchscreen application and make use of mender updates.