Hey, I was able to create a bootable mender image following this tutorial. But imaging a system like that doesn’t give enough confidence in the long term since, it is hard to reproduce.
So I was trying my hands on using Yocto to produce the images. I was able to stitch together a configuration which successfully prepared a uefiimg. But on introspecting the image, I found the grub config doesn’t have any entries and the rootfs doesn’t have any initramfs. Any ideas what I could be doing wrong.
Here is the grub.cfg.
local.conf
DISTRO ?= "poky"
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"
MENDER_ARTIFACT_NAME = "release-1"
INHERIT += "mender-full"
MACHINE = "intel-corei7-64"
IMAGE_INSTALL:append = " kernel-image"
INITRD_IMAGE_LIVE="core-image-minimal-initramfs"
MENDER_FEATURES_ENABLE:append = " mender-grub mender-image-uefi"
MENDER_FEATURES_DISABLE:append = " mender-uboot mender-image-sd"
DISTRO_FEATURES:append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
ARTIFACTIMG_FSTYPE = "ext4"
IMAGE_FSTYPES = "uefiimg"
EFI_PROVIDER = "grub-efi"
MENDER_STORAGE_DEVICE = "/dev/nvme0n1p"
MENDER_STORAGE_TOTAL_SIZE_MB="20000"
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"
bblayers.conf
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/home/hellozee/dev/yocto-stuff/src/poky/meta \
/home/hellozee/dev/yocto-stuff/src/poky/meta-poky \
/home/hellozee/dev/yocto-stuff/src/poky/meta-yocto-bsp \
/home/hellozee/dev/yocto-stuff/src/meta-openembedded/meta-oe \
/home/hellozee/dev/yocto-stuff/src/meta-openembedded/meta-python \
/home/hellozee/dev/yocto-stuff/src/meta-openembedded/meta-multimedia \
/home/hellozee/dev/yocto-stuff/src/meta-openembedded/meta-networking \
/home/hellozee/dev/yocto-stuff/src/meta-intel \
/home/hellozee/dev/yocto-stuff/src/meta-mender/meta-mender-core \
/home/hellozee/dev/yocto-stuff/src/meta-mender/meta-mender-demo \
"
Don’t have much experience with Yocto and Mender, so most of the config is copied and pasted from all over the internet.