Hi,
I am working on creating a yocto distro using standard x86 hardware and an amd Ryzen processor.
Yocto Branch: scarthgap
local.conf:
MENDER_ARTIFACT_NAME = "gha_autobuild"
INHERIT += "mender-full"
MENDER_FEATURES_ENABLE:append = " mender-grub mender-image-uefi"
MENDER_FEATURES_DISABLE:append = " mender-uboot mender-image-sd"
MENDER_STORAGE_TOTAL_SIZE_MB_DEFAULT = "16384"
MENDER_STORAGE_DEVICE = "/dev/nvme0n1"
IMAGE_FSTYPES = "hddimg mender"
machine.conf: milan.conf « machine « conf « meta-amd-bsp - meta-amd - Layer containing AMD hardware support metadata
My aim is to use the hddimg to create an USB installer.
The build fails with a circular import:
ERROR: Task /workspaces/yocto-distros/build/../meta-distro/recipes-images/images/ap-image.bb:do_bootimg has circular dependency on /workspaces/yocto-distros/build/../meta-distro/recipes-images/images/ap-image.bb:do_image_uefiimg
The culprit:
https://git.yoctoproject.org/meta-amd/tree/meta-amd-bsp/conf/machine/common.conf?h=scarthgap#n14
The modified version of the common.conf:
IMAGE_FSTYPES = "wic wic.bmap iso"
WKS_FILES ?= "amd-usbimage.wks"
# Contents of IMAGE_BOOT_FILES are deployed into "amd-usbimage.wks" wic image
IMAGE_BOOT_FILES = " \
${EFIIMGDIR}${EFIDIR}/*;EFI/BOOT/ \
${EFIIMGDIR}/startup.nsh;startup.nsh \
${KERNEL_IMAGETYPE} \
${INITRD_IMAGE_LIVE}-${MACHINE}.cpio.gz;initrd \
${ROOTFS};rootfs.img \
"
# This makes sure that boot files are deployed before do_image_wic starts execution
# do_image_wic[depends] += "${IMAGE_BASENAME}:do_bootimg"
IMAGE_TYPEDEP_wic = "ext4"
INITRD_IMAGE_LIVE="core-image-minimal-initramfs"
LABELS_LIVE = "boot install"
EFI_PROVIDER = "grub-efi"
do_image_wic[depends] += "${INITRD_IMAGE_LIVE}:do_image_complete"
do_rootfs[depends] += "virtual/kernel:do_deploy"
IMAGE_BOOT_FILES:append = "\
${KERNEL_IMAGETYPE} \
${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.rootfs.ext4;rootfs.img \
${@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)} "
INIT_MANAGER = "systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
MACHINE_FEATURES_NATIVE:append = " efi"
MACHINE_FEATURES:append = " efi"
MACHINE_FEATURES:append = " pcbios util-linux-blkid"
IMAGE_INSTALL:append = " grub grub-efi"
# Double import of grub-bootconf
# IMAGE_INSTALL:append = " grub grub-efi grub-bootconf"
CORE_IMAGE_EXTRA_INSTALL:append = " kernel-modules"
But now the folder EFI/BOOT/
folder is not populated and I get this error:
| DEBUG: Executing python function extend_recipe_sysroot
| NOTE: Direct dependencies are ['/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-core/glibc/cross-localedef-native_2.39.bb:do_populate_sysroot', '/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-core/glibc/ldconfig-native_2.12.1.bb:do_populate_sysroot', '/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-devtools/qemu/qemuwrapper-cross_1.0.bb:do_populate_sysroot', '/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-kernel/kmod/depmodwrapper-cross_1.0.bb:do_populate_sysroot', 'virtual:native:/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb:do_populate_sysroot', 'virtual:native:/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-devtools/dosfstools/dosfstools_4.2.bb:do_populate_sysroot', 'virtual:native:/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-devtools/makedevs/makedevs_1.0.1.bb:do_populate_sysroot', 'virtual:native:/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-devtools/mtools/mtools_4.0.43.bb:do_populate_sysroot', 'virtual:native:/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-devtools/opkg-utils/opkg-utils_0.6.3.bb:do_populate_sysroot', 'virtual:native:/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-devtools/opkg/opkg_0.6.3.bb:do_populate_sysroot', 'virtual:native:/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-devtools/pseudo/pseudo_git.bb:do_populate_sysroot', 'virtual:native:/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-extended/pigz/pigz_2.8.bb:do_populate_sysroot', 'virtual:native:/workspaces/yocto-distros/build/../openembedded-core/meta/recipes-support/bmaptool/bmaptool_git.bb:do_populate_sysroot']
| NOTE: Installed into sysroot: []
| NOTE: Skipping as already exists in sysroot: ['gettext-minimal-native', 'cross-localedef-native', 'ldconfig-native', 'systemd-systemctl-native', 'cmake-native', 'libtool-native', 'qemu-native', 'qemuwrapper-cross', 'texinfo-dummy-native', 'depmodwrapper-cross', 'openssl-native', 'coreutils-native', 'expat-native', 'gettext-native', 'glib-2.0-native', 'libxml2-native', 'ncurses-native', 'update-rc.d-native', 'util-linux-libuuid-native', 'util-linux-native', 'zlib-native', 'dosfstools-native', 'libedit-native', 'make-native', 'makedevs-native', 'mtools-native', 'opkg-utils-native', 'opkg-native', 'perl-native', 'pseudo-native', 'python3-build-native', 'python3-flit-core-native', 'python3-installer-native', 'python3-packaging-native', 'python3-pyproject-hooks-native', 'python3-setuptools-native', 'python3-six-native', 'python3-wheel-native', 'python3-native', 'bzip2-native', 'libarchive-native', 'libnsl2-native', 'libsolv-native', 'libtirpc-native', 'pigz-native', 'shadow-native', 'unzip-native', 'xz-native', 'zstd-native', 'freetype-native', 'mkfontscale-native', 'font-util-native', 'libfontenc-native', 'xorgproto-native', 'util-macros-native', 'kmod-native', 'libpng-native', 'acl-native', 'attr-native', 'bmaptool-native', 'debianutils-native', 'gdbm-native', 'itstool-native', 'libbsd-native', 'libcap-ng-native', 'libffi-native', 'libmd-native', 'libpcre2-native', 'shared-mime-info-native', 'sqlite3-native']
| DEBUG: Python function extend_recipe_sysroot finished
| DEBUG: Executing python function set_image_size
| DEBUG: 1665144.000000 = 1280880 * 1.300000
| DEBUG: 8306688.000000 = max(1665144.000000, 8306688)[8306688.000000] + 0
| DEBUG: 8306688.000000 = int(8306688.000000)
| DEBUG: 8306688 = aligned(8306688)
| DEBUG: returning 8306688
| DEBUG: Python function set_image_size finished
| DEBUG: Executing shell function do_image_bootimg
| cp: cannot stat '/workspaces/yocto-distros/build/tmp-glibc/deploy/images/ap-milan//workspaces/yocto-distros/build/tmp-glibc/work/swan_ap_milan-oe-linux/ap-image/1.0/ap-image-1.0/efi_img/EFI/BOOT/*': No such file or directory
I actually only need the .mender
and the .hddimg
to create a bootable usb installer.
What would be the path forward ?
Thanks