diff options
| author | Adrian Dudau <adrian.dudau@enea.com> | 2019-05-07 21:39:22 +0200 |
|---|---|---|
| committer | Adrian Dudau <adrian.dudau@enea.com> | 2019-05-13 10:53:07 +0200 |
| commit | a09771b493ca8d017965abcc0d03ef12a9443a9c (patch) | |
| tree | 69bfbecd5b3f9397d0ae485b2b37f19870513896 /classes | |
| parent | 8c9c1fb3bbfc4d4de3a7079659b6efb340f28389 (diff) | |
| download | meta-el-nfv-access-a09771b493ca8d017965abcc0d03ef12a9443a9c.tar.gz | |
Override efi-populate function from grub-efi class
This override is needed to install kernel and initramfs signature
files onto the hddimg.
Change-Id: Id1434b930312cc601ca2c1782c8b5b5699ce3fd6
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'classes')
| -rw-r--r-- | classes/override_grub-efi.inc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/classes/override_grub-efi.inc b/classes/override_grub-efi.inc index 4c2ae64..fb1958d 100644 --- a/classes/override_grub-efi.inc +++ b/classes/override_grub-efi.inc | |||
| @@ -87,3 +87,31 @@ python build_efi_cfg() { | |||
| 87 | 87 | ||
| 88 | cfgfile.close() | 88 | cfgfile.close() |
| 89 | } | 89 | } |
| 90 | |||
| 91 | efi_populate() { | ||
| 92 | # DEST must be the root of the image so that EFIDIR is not | ||
| 93 | # nested under a top level directory. | ||
| 94 | DEST=$1 | ||
| 95 | |||
| 96 | install -d ${DEST}${EFIDIR} | ||
| 97 | |||
| 98 | GRUB_IMAGE="grub-efi-bootia32.efi" | ||
| 99 | DEST_IMAGE="bootia32.efi" | ||
| 100 | if [ "${TARGET_ARCH}" = "x86_64" ]; then | ||
| 101 | GRUB_IMAGE="grub-efi-bootx64.efi" | ||
| 102 | DEST_IMAGE="bootx64.efi" | ||
| 103 | fi | ||
| 104 | |||
| 105 | #Install EFI binaries | ||
| 106 | install -m 0644 ${IMAGE_ROOTFS}/boot/efi${EFIDIR}/*.* ${DEST}${EFIDIR} | ||
| 107 | |||
| 108 | #Install kernel and initramfs sig | ||
| 109 | install -m 0644 ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}.p7b ${DEST}/vmlinuz.p7b | ||
| 110 | install -m 0644 ${INITRD_LIVE}.p7b ${DEST}/initrd.p7b | ||
| 111 | |||
| 112 | EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') | ||
| 113 | printf 'fs0:%s\%s\n' "$EFIPATH" "$DEST_IMAGE" >${DEST}/startup.nsh | ||
| 114 | |||
| 115 | install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg | ||
| 116 | |||
| 117 | } | ||
