Hello, In order to make the image live bootable into the USB Driver ( following this blog Self-installing Yocto Image from a USB drive – The Good Penguin ) for X86-64 i get some issues in the build, ( i followed the kickstart guide to specify the partition with EFI 8 OpenEmbedded Kickstart (.wks) Reference — The Yocto Project ® 5.0.11 documentation ) am using grub-efi and common.conf
In the image-mender.bb
image-mender.bb
WIC file for UEFI boot
WKS_FILE = “image-installer.wks.in”
WKS_SEARCH_PATH = “${LAYERDIR}/recipes-bsp/wic”
Initramfs
INITRD_IMAGE_LIVE=“core-image-minimal-initramfs”
EFI provider
EFI_PROVIDER = “grub-efi”
IMAGE_EFI_BOOT_FILES:append = "
${@bb.utils.contains(‘EFI_PROVIDER’, ‘grub-efi’, ‘grub-efi-bootx64.efi;EFI/BOOT/bootx64.efi’, ‘’, d)}
${@bb.utils.contains(‘EFI_PROVIDER’, ‘grub-efi’, ‘${IMAGE_ROOTFS}/boot/EFI/BOOT/grub.cfg;EFI/BOOT/grub.cfg’, ‘’, d)}
${@bb.utils.contains(‘EFI_PROVIDER’, ‘systemd-boot’, ‘systemd-bootx64.efi;EFI/BOOT/bootx64.efi’, ‘’, d)}
${@bb.utils.contains(‘EFI_PROVIDER’, ‘systemd-boot’, '${IMAGE_ROOTFS}/boot/loader/loader.conf;loader/loader.conf ', ‘’, d)}
${@bb.utils.contains(‘EFI_PROVIDER’, ‘systemd-boot’, ‘${IMAGE_ROOTFS}/boot/loader/entries/boot.conf;loader/entries/boot.conf’, ‘’, d)}
startup.nsh
"
do_image_wic[depends] += “${INITRD_IMAGE_LIVE}:do_image_complete”
do_rootfs[depends] += “virtual/kernel:do_deploy”
do_image_wic[depends] += “grub-efi:do_deploy”
do_image_wic[depends] += “grub-efi:do_populate_sysroot”
and i keep getting this error :
ERROR: Task do_image_wic in /home/yassine/yocto-amd/build/../layers/meta-morefine/recipes-core/images/morefine-ros2-image.bb depends upon non-existent task do_bootimg in /home/yassine/yocto-amd/build/../layers/meta-morefine/recipes-core/images/morefine-ros2-image.bb ERROR: Command execution failed: 1
Hi @yassine-cherni,
Thanks a lot for reaching out. The topic sounds quite like a duplicate from Cannot add Mender to yocto intel-skylake-64 default image with installer, so maybe you can join forces with @hackenstein?
Possibly I can also show an example multiconfig
build next week which you can use as a base.
Greetz,
Josef
1 Like
For now it compile and runs on qemu by adding :`
Boot files
IMAGE_BOOT_FILES:append = "
${KERNEL_IMAGETYPE}
grub-efi-bootx64.efi;EFI/BOOT/bootx64.efi
grub.cfg;EFI/BOOT/grub.cfg
"
Auto-boot GRUB
GRUB_TIMEOUT = “0”
Build dependencies
#do_image_wic[depends] += “${INITRD_IMAGE_LIVE}:do_image_complete”
do_rootfs[depends] += “virtual/kernel:do_deploy”
do_image_wic[depends] += “grub-efi:do_deploy”
do_image_wic[depends] += “grub-efi:do_populate_sysroot”
`
( Still dindn’t test it in the real harware but am thinking for the “initramfs” should i add it or the kernel will find the rootfs without it )
Hi @yassine-cherni,
Thanks for following up!
Just for clarification, what does “runs on qemu” mean? Does the resulting ISO boot and successfully install? Or what functionality is known to work, what is known to fail?
Greetz,
Josef
By “runs on QEMU,” I mean that with the current modifications to IMAGE_BOOT_FILES
and GRUB (grub-efi-bootx64.efi
+ grub.cfg
) the .wic
image boots in QEMU, GRUB appears, and the kernel starts. I haven’t yet tested the full USB → NVMe install flow on real hardware.
Regarding the initramfs: I have included INITRD_IMAGE_LIVE = "core-image-minimal-initramfs"
in the recipe, so the kernel boots with the installer initramfs, which contains init-install-efi.sh
and the tools needed to copy rootfs.img
to the target NVMe. My current question is mainly about confirming the installer workflow on real hardware whether this setup will correctly wipe the NVMe and install the Yocto OS.
At this stage, I’m mostly validating the USB boot and installer configuration before testing on the actual device.
Thanks!