Basically I want to emulate a typical setup with boot + 2x rootfs + data on qemuarm, so I can properly test that my configs etc are populated correctly on /data running on standard runqemu script from yocto.
I followed QEMU, the FAST! processor emulator but ran into problems, since I am running the build inside a VM in hyper-V, then the KVM part fails.
When adding:
MACHINE = “qemuarm”
INHERIT += “mender-full-bios rm_work”
then it only creates ext4, and no uefiimg.
When trying:
https://docs.mender.io/2.2/devices/yocto-project/raw-flash/example-qemu
INHERIT += “mender-full-ubi”
MACHINE = “vexpress-qemu-flash”
I get error to set “MENDER_IS_ON_MTDID”.
So I used:
MENDER_MTDIDS = “nand0=40000000.flash,nand1=60000000.flash”
MENDER_IS_ON_MTDID = “60000000.flash”
After that I got warnings:
WARNING: gkcontroller-emulated-1.0-r0 do_image_tar: Unknown MTDID type 40000000.flash,nand, setting UBI block overhead to 0
WARNING: gkcontroller-emulated-1.0-r0 do_image_tar: Unknown MTDID type 40000000.flash,nand, setting UBI overhead to 0
WARNING: gkcontroller-emulated-1.0-r0 do_image_tar: Could not find MENDER_IS_ON_MTDID (60000000.flash) in MENDER_MTDPARTS (). Returning UBI size of zero.
Then I get failure on do_image_ext4:
DEBUG: Executing python function prepare_excluded_directories
DEBUG: Python function prepare_excluded_directories finished
DEBUG: Executing python function set_image_size
WARNING: Unknown MTDID type 40000000.flash,nand, setting UBI block overhead to 0
WARNING: Unknown MTDID type 40000000.flash,nand, setting UBI overhead to 0
WARNING: Could not find MENDER_IS_ON_MTDID (60000000.flash) in MENDER_MTDPARTS (). Returning UBI size of zero.
WARNING: Could not find MENDER_IS_ON_MTDID (60000000.flash) in MENDER_MTDPARTS (). Returning UBI size of zero.
WARNING: Could not find MENDER_IS_ON_MTDID (60000000.flash) in MENDER_MTDPARTS (). Returning UBI size of zero.
DEBUG: 322636.000000 = 322636 * 1.000000
DEBUG: 322636.000000 = max(322636.000000, -90112)[322636.000000] + 1
DEBUG: 322636.000000 = int(322636.000000)
DEBUG: 322636 = aligned(322636)
DEBUG: returning 322636
DEBUG: Python function set_image_size finished
DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are [‘virtual:native:/build/…/poky/meta/recipes-extended/pigz/pigz_2.4.bb:do_populate_sysroot’, '/home/emil$
NOTE: Installed into sysroot: []
NOTE: Skipping as already exists in sysroot: [‘pigz-native’, ‘depmodwrapper-cross’, ‘update-rc.d-native’, ‘cross-localedef-native’, ‘pbzip2-native’, 'opkg-utils-nat$
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_image_ubifs
Error: too large LEB size 8388608, maximum is 2097152
WARNING: exit code 255 from a shell command.
ERROR: Function failed: do_image_ubifs (log file is located at /build/tmp-glibc/work/vexpress_qemu-oe-linux-gnueabi/gkcontroller-emula$
Then, going back to a straight qemuarm build, it does not produce the uefiimg as mentioned (no imagetypes variable specified, should I):
MACHINE = “qemuarm”
INHERIT += “mender-full-bios rm_work”
RM_WORK_EXCLUDE = “wic-tools”
PATCHRESOLVE = “noop”
MENDER_STORAGE_TOTAL_SIZE_MB = “2048”
MENDER_BOOT_PART_SIZE_MB = “40”
MENDER_DATA_PART_SIZE_MB = “512”
So no matter which machine / image combination I try I run into different problems. I really tried to follow the guides and try every combination of config partition variables etc, but I always run into some error.
Then I tried adding:
MENDER_FEATURES_ENABLE_append = " mender-image-uefi"
But then I got:
ERROR: Nothing PROVIDES ‘u-boot’
u-boot was skipped: Either UBOOT_MACHINE or UBOOT_CONFIG must be set in the qemuarm machine configuration.
ERROR: Required build target ‘gkcontroller-emulated’ has no buildable providers.
Missing or unbuildable dependency chain was: [‘my-distro-image’, ‘u-boot’]
So I guess that’s why you chose x86-64 as an example because it has:
UBOOT_MACHINE ?= “qemu-x86_64_defconfig”
KERNEL_IMAGETYPE = “bzImage”
Hope someone can help, thanks!