summaryrefslogtreecommitdiffstats
path: root/meta-intel-extras/classes/image_dd_efi.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta-intel-extras/classes/image_dd_efi.bbclass')
-rw-r--r--meta-intel-extras/classes/image_dd_efi.bbclass45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta-intel-extras/classes/image_dd_efi.bbclass b/meta-intel-extras/classes/image_dd_efi.bbclass
new file mode 100644
index 0000000..7bbff62
--- /dev/null
+++ b/meta-intel-extras/classes/image_dd_efi.bbclass
@@ -0,0 +1,45 @@
1##############################################################################
2##
3## Copyright (C) 2016 The Qt Company Ltd.
4## Contact: http://www.qt.io/licensing/
5##
6## This file is part of the Boot to Qt meta layer.
7##
8## $QT_BEGIN_LICENSE:COMM$
9##
10## Commercial License Usage
11## Licensees holding valid commercial Qt licenses may use this file in
12## accordance with the commercial license agreement provided with the
13## Software or, alternatively, in accordance with the terms contained in
14## a written agreement between you and The Qt Company. For licensing terms
15## and conditions see http://www.qt.io/terms-conditions. For further
16## information use the contact form at http://www.qt.io/contact-us.
17##
18## $QT_END_LICENSE$
19##
20##############################################################################
21
22DESCRIPTION = "Extends image_dd class to boot via GRUB-EFI and initramfs."
23LICENSE = "CLOSED"
24
25inherit image_dd
26
27EXTRA_IMAGECMD_ext3 += "-L rootfs"
28IMAGE_DEPENDS_ext3 += "initramfs-basic:do_rootfs"
29
30IMAGE_CMD_ext3_prepend() {
31
32 # https://www.kernel.org/doc/Documentation/x86/early-microcode.txt
33 microcode="${@bb.utils.contains('MACHINE_FEATURES', 'intel-ucode', '${DEPLOY_DIR_IMAGE}/microcode.cpio ', '', d)}"
34 cat ${microcode} ${DEPLOY_DIR_IMAGE}/${INITRAMFS_IMAGE}-${MACHINE}.cpio.gz > ${IMAGE_ROOTFS}/boot/initramfs
35 chmod 0644 ${IMAGE_ROOTFS}/boot/initramfs
36}
37
38do_populate_boot() {
39
40 mkdir -p ${WORKDIR}/EFI/BOOT/
41 # Path where EFI firmware searches for EFI executable
42 cp ${DEPLOY_DIR_IMAGE}/bootx64.efi ${WORKDIR}/EFI/BOOT/
43 mcopy -s -i ${WORKDIR}/boot.img ${WORKDIR}/EFI ::/EFI
44}
45