[yocto] Preventing wic for running for an initramfs image

Alan Martinovic alan.martinovic at senic.com
Fri Aug 3 08:05:52 PDT 2018


Hi,
I'm setting up an initramfs image for an ARM board.
The minimal recipe I got to build the image is:

    # Simple initramfs image. Mostly used for live images.
    DESCRIPTION = "Small image capable of booting a device. The kernel
includes \
    the Minimal RAM-based Initial Root Filesystem (initramfs), which finds the \
    first 'init' program more efficiently."

    PACKAGE_INSTALL = "initramfs-live-boot
${VIRTUAL-RUNTIME_base-utils} udev base-passwd
${ROOTFS_BOOTSTRAP_INSTALL}"

    # Do not pollute the initrd image with rootfs features
    IMAGE_FEATURES = ""

    export IMAGE_BASENAME = "${MLPREFIX}core-image-minimal-initramfs"
    IMAGE_LINGUAS = ""

    LICENSE = "MIT"

    IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
    inherit core-image

    IMAGE_ROOTFS_SIZE = "8192"
    IMAGE_ROOTFS_EXTRA_SPACE = "0"
    BAD_RECOMMENDATIONS += "busybox-syslog"

This results in an image created in
tmp-glibc/work/.../core-image-minimal-initramfs/1.0-r0/deploy-core-image-minimal-initramfs-image-complete/core-image-minimal-initramfs-senic-hub.cpio.gz

However the bitbaking process seems to fail in the process of running wic:

    | INFO: Creating image(s)...
    |
    | WARNING: overhead-factor was specified, but size was not, so
bitbake variables will be used for the size. In this case both
IMAGE_OVERHEAD_FACTOR and --overhead-factor will be applied
    | ERROR: _exec_cmd: export
PATH=/home/alan/workspace/senic-os/build/tmp-glibc/work/senic_hub-senic-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/recipe-sysroot-
   native/sbin:/home/alan/workspace/senic-os/build/tmp-glibc/work/senic_hub-senic-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/recipe-sysroot-native/usr/sbin:/home/alan/workspace/senic-
   os/build/tmp-glibc/work/senic_hub-senic-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/recipe-sysroot-native/usr/bin:$PATH;mcopy
-i /home/alan/workspace/senic-os/build/tmp-
glibc/work/senic_hub-senic-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/deploy-core-image-minimal-initramfs-image-complete/core-image-minimal-initramfs-senic-hub-20180803145716-
   sdimg/tmp.wic.hq0myf6p/rootfs_boot.3.vfat -s
/home/alan/workspace/senic-os/build/tmp-glibc/work/senic_hub-senic-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/deploy-core-image-minimal-
   initramfs-image-complete/core-image-minimal-initramfs-senic-hub-20180803145716-sdimg/tmp.wic.hq0myf6p/boot.3/*
::/ returned '1' instead of 0
    | output: /home/alan/workspace/senic-os/build/tmp-glibc/work/senic_hub-senic-linux-gnueabi/core-image-minimal-initramfs/1.0-r0/deploy-core-image-minimal-initramfs-image-complete/core-image-
 minimal-initramfs-senic-hub-20180803145716-sdimg/tmp.wic.hq0myf6p/boot.3/*:
No such file or directory


I guess this is some obscure error that is probably to specific to ask
on a mailing list.
My question goes in the direction if I can stop running wic for an initramfs?

It's needed to combine partitions and create a single file images, but couldn't
initramfs be excluded from that process?
If the cpio is built shouldn't it be enough to pass that to the kernel
without the need
of running wic on top of it?


Be Well,
Alan


More information about the yocto mailing list