efi_populate() { # DEST must be the root of the image so that EFIDIR is not # nested under a top level directory. DEST=$1 install -d ${DEST}${EFIDIR} GRUB_IMAGE="grub-efi-bootia32.efi" DEST_IMAGE="bootia32.efi" if [ "${TARGET_ARCH}" = "x86_64" ]; then GRUB_IMAGE="grub-efi-bootx64.efi" DEST_IMAGE="bootx64.efi" fi #Install EFI binaries install -m 0644 ${IMAGE_ROOTFS}/boot/efi${EFIDIR}/*.* ${DEST}${EFIDIR} #Install kernel and initramfs sig install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}.p7b ${DEST}/vmlinuz.p7b install -m 0644 ${INITRD_LIVE}.p7b ${DEST}/initrd.p7b EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_IMAGE" >${DEST}/startup.nsh install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg #Install UEFI keys install -d ${DEST}/uefi_sb_keys install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.crt ${DEST}/uefi_sb_keys/ install -m 0644 ${DEPLOY_DIR_IMAGE}/user-keys/uefi_sb_keys/*.esl ${DEST}/uefi_sb_keys/ }