blob: a33c1a8d7dfa44baed5e3ea37b1f84bf6dc65b3b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
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
}
|