diff options
Diffstat (limited to 'meta/classes/bootimg.bbclass')
| -rw-r--r-- | meta/classes/bootimg.bbclass | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/meta/classes/bootimg.bbclass b/meta/classes/bootimg.bbclass index 0554ffa00a..ce95801bff 100644 --- a/meta/classes/bootimg.bbclass +++ b/meta/classes/bootimg.bbclass | |||
| @@ -35,7 +35,12 @@ ISODIR = "${S}/cd" | |||
| 35 | BOOTIMG_VOLUME_ID ?= "boot" | 35 | BOOTIMG_VOLUME_ID ?= "boot" |
| 36 | BOOTIMG_EXTRA_SPACE ?= "512" | 36 | BOOTIMG_EXTRA_SPACE ?= "512" |
| 37 | 37 | ||
| 38 | EFI = ${@base_contains("MACHINE_FEATURES", "efi", "1", "0", d)} | ||
| 39 | EFI_CLASS = ${@base_contains("MACHINE_FEATURES", "efi", "grub-efi", "dummy", d)} | ||
| 40 | |||
| 38 | inherit syslinux | 41 | inherit syslinux |
| 42 | inherit ${EFI_CLASS} | ||
| 43 | |||
| 39 | 44 | ||
| 40 | build_iso() { | 45 | build_iso() { |
| 41 | # Only create an ISO if we have an INITRD and NOISO was not set | 46 | # Only create an ISO if we have an INITRD and NOISO was not set |
| @@ -47,6 +52,9 @@ build_iso() { | |||
| 47 | install -d ${ISODIR} | 52 | install -d ${ISODIR} |
| 48 | 53 | ||
| 49 | syslinux_iso_populate | 54 | syslinux_iso_populate |
| 55 | if [ "${EFI}" = "1" ]; then | ||
| 56 | grubefi_iso_populate | ||
| 57 | fi | ||
| 50 | 58 | ||
| 51 | mkisofs -V ${BOOTIMG_VOLUME_ID} \ | 59 | mkisofs -V ${BOOTIMG_VOLUME_ID} \ |
| 52 | -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \ | 60 | -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.iso \ |
| @@ -63,6 +71,9 @@ build_hddimg() { | |||
| 63 | if [ "${NOHDD}" != "1" ] ; then | 71 | if [ "${NOHDD}" != "1" ] ; then |
| 64 | install -d ${HDDDIR} | 72 | install -d ${HDDDIR} |
| 65 | syslinux_hddimg_populate | 73 | syslinux_hddimg_populate |
| 74 | if [ "${EFI}" = "1" ]; then | ||
| 75 | grubefi_hddimg_populate | ||
| 76 | fi | ||
| 66 | 77 | ||
| 67 | # Determine the block count for the final image | 78 | # Determine the block count for the final image |
| 68 | BLOCKS=`du -bks ${HDDDIR} | cut -f 1` | 79 | BLOCKS=`du -bks ${HDDDIR} | cut -f 1` |
| @@ -83,6 +94,8 @@ build_hddimg() { | |||
| 83 | 94 | ||
| 84 | python do_bootimg() { | 95 | python do_bootimg() { |
| 85 | bb.build.exec_func('build_syslinux_cfg', d) | 96 | bb.build.exec_func('build_syslinux_cfg', d) |
| 97 | if d.getVar("EFI", True) == "1": | ||
| 98 | bb.build.exec_func('build_grub_cfg', d) | ||
| 86 | bb.build.exec_func('build_hddimg', d) | 99 | bb.build.exec_func('build_hddimg', d) |
| 87 | bb.build.exec_func('build_iso', d) | 100 | bb.build.exec_func('build_iso', d) |
| 88 | } | 101 | } |
