diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/classes/grub-efi.bbclass')
-rw-r--r-- | import-layers/yocto-poky/meta/classes/grub-efi.bbclass | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/import-layers/yocto-poky/meta/classes/grub-efi.bbclass b/import-layers/yocto-poky/meta/classes/grub-efi.bbclass index 4ce3d2844..17417ba5d 100644 --- a/import-layers/yocto-poky/meta/classes/grub-efi.bbclass +++ b/import-layers/yocto-poky/meta/classes/grub-efi.bbclass @@ -45,6 +45,8 @@ efi_populate() { GRUB_IMAGE="bootx64.efi" fi install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR} + EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') + printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" >${DEST}/startup.nsh install -m 0644 ${GRUB_CFG} ${DEST}${EFIDIR}/grub.cfg } @@ -57,7 +59,7 @@ efi_iso_populate() { cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR} cp $iso_dir/vmlinuz ${EFIIMGDIR} EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g') - echo "fs0:${EFIPATH}\\${GRUB_IMAGE}" > ${EFIIMGDIR}/startup.nsh + printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" > ${EFIIMGDIR}/startup.nsh if [ -f "$iso_dir/initrd" ] ; then cp $iso_dir/initrd ${EFIIMGDIR} fi @@ -88,12 +90,12 @@ python build_efi_cfg() { cfile = d.getVar('GRUB_CFG', True) if not cfile: - raise bb.build.FuncFailed('Unable to read GRUB_CFG') + bb.fatal('Unable to read GRUB_CFG') try: - cfgfile = file(cfile, 'w') + cfgfile = open(cfile, 'w') except OSError: - raise bb.build.funcFailed('Unable to open %s' % (cfile)) + bb.fatal('Unable to open %s' % cfile) cfgfile.write('# Automatically created by OE\n') @@ -112,7 +114,7 @@ python build_efi_cfg() { root = d.getVar('GRUB_ROOT', True) if not root: - raise bb.build.FuncFailed('GRUB_ROOT not defined') + bb.fatal('GRUB_ROOT not defined') if gfxserial == "1": btypes = [ [ " graphics console", "" ], @@ -125,7 +127,7 @@ python build_efi_cfg() { overrides = localdata.getVar('OVERRIDES', True) if not overrides: - raise bb.build.FuncFailed('OVERRIDES not defined') + bb.fatal('OVERRIDES not defined') for btype in btypes: localdata.setVar('OVERRIDES', label + ':' + overrides) @@ -144,7 +146,8 @@ python build_efi_cfg() { if append: append = replace_rootfs_uuid(d, append) - cfgfile.write('%s' % (append)) + cfgfile.write(' %s' % (append)) + cfgfile.write(' %s' % btype[1]) cfgfile.write('\n') |