diff options
Diffstat (limited to 'scripts/lib/wic/plugins/source/bootimg-efi.py')
| -rw-r--r-- | scripts/lib/wic/plugins/source/bootimg-efi.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index b48cc835d6..fa63c6abda 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py | |||
| @@ -41,16 +41,16 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 41 | name = 'bootimg-efi' | 41 | name = 'bootimg-efi' |
| 42 | 42 | ||
| 43 | @classmethod | 43 | @classmethod |
| 44 | def do_configure_grubefi(cls, hdddir, cr, cr_workdir): | 44 | def do_configure_grubefi(cls, hdddir, creator, cr_workdir): |
| 45 | """ | 45 | """ |
| 46 | Create loader-specific (grub-efi) config | 46 | Create loader-specific (grub-efi) config |
| 47 | """ | 47 | """ |
| 48 | options = cr.ks.handler.bootloader.appendLine | 48 | options = creator.ks.handler.bootloader.appendLine |
| 49 | 49 | ||
| 50 | grubefi_conf = "" | 50 | grubefi_conf = "" |
| 51 | grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n" | 51 | grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n" |
| 52 | grubefi_conf += "default=boot\n" | 52 | grubefi_conf += "default=boot\n" |
| 53 | timeout = kickstart.get_timeout(cr.ks) | 53 | timeout = kickstart.get_timeout(creator.ks) |
| 54 | if not timeout: | 54 | if not timeout: |
| 55 | timeout = 0 | 55 | timeout = 0 |
| 56 | grubefi_conf += "timeout=%s\n" % timeout | 56 | grubefi_conf += "timeout=%s\n" % timeout |
| @@ -59,7 +59,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 59 | kernel = "/bzImage" | 59 | kernel = "/bzImage" |
| 60 | 60 | ||
| 61 | grubefi_conf += "linux %s root=%s rootwait %s\n" \ | 61 | grubefi_conf += "linux %s root=%s rootwait %s\n" \ |
| 62 | % (kernel, cr.rootdev, options) | 62 | % (kernel, creator.rootdev, options) |
| 63 | grubefi_conf += "}\n" | 63 | grubefi_conf += "}\n" |
| 64 | 64 | ||
| 65 | msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \ | 65 | msger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg" \ |
| @@ -69,7 +69,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 69 | cfg.close() | 69 | cfg.close() |
| 70 | 70 | ||
| 71 | @classmethod | 71 | @classmethod |
| 72 | def do_configure_gummiboot(cls, hdddir, cr, cr_workdir): | 72 | def do_configure_gummiboot(cls, hdddir, creator, cr_workdir): |
| 73 | """ | 73 | """ |
| 74 | Create loader-specific (gummiboot) config | 74 | Create loader-specific (gummiboot) config |
| 75 | """ | 75 | """ |
| @@ -79,9 +79,9 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 79 | install_cmd = "install -d %s/loader/entries" % hdddir | 79 | install_cmd = "install -d %s/loader/entries" % hdddir |
| 80 | exec_cmd(install_cmd) | 80 | exec_cmd(install_cmd) |
| 81 | 81 | ||
| 82 | options = cr.ks.handler.bootloader.appendLine | 82 | options = creator.ks.handler.bootloader.appendLine |
| 83 | 83 | ||
| 84 | timeout = kickstart.get_timeout(cr.ks) | 84 | timeout = kickstart.get_timeout(creator.ks) |
| 85 | if not timeout: | 85 | if not timeout: |
| 86 | timeout = 0 | 86 | timeout = 0 |
| 87 | 87 | ||
| @@ -100,7 +100,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 100 | boot_conf = "" | 100 | boot_conf = "" |
| 101 | boot_conf += "title boot\n" | 101 | boot_conf += "title boot\n" |
| 102 | boot_conf += "linux %s\n" % kernel | 102 | boot_conf += "linux %s\n" % kernel |
| 103 | boot_conf += "options LABEL=Boot root=%s %s\n" % (cr.rootdev, options) | 103 | boot_conf += "options LABEL=Boot root=%s %s\n" % (creator.rootdev, options) |
| 104 | 104 | ||
| 105 | msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \ | 105 | msger.debug("Writing gummiboot config %s/hdd/boot/loader/entries/boot.conf" \ |
| 106 | % cr_workdir) | 106 | % cr_workdir) |
| @@ -110,7 +110,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 110 | 110 | ||
| 111 | 111 | ||
| 112 | @classmethod | 112 | @classmethod |
| 113 | def do_configure_partition(cls, part, source_params, cr, cr_workdir, | 113 | def do_configure_partition(cls, part, source_params, creator, cr_workdir, |
| 114 | oe_builddir, bootimg_dir, kernel_dir, | 114 | oe_builddir, bootimg_dir, kernel_dir, |
| 115 | native_sysroot): | 115 | native_sysroot): |
| 116 | """ | 116 | """ |
| @@ -125,9 +125,9 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 125 | 125 | ||
| 126 | try: | 126 | try: |
| 127 | if source_params['loader'] == 'grub-efi': | 127 | if source_params['loader'] == 'grub-efi': |
| 128 | cls.do_configure_grubefi(hdddir, cr, cr_workdir) | 128 | cls.do_configure_grubefi(hdddir, creator, cr_workdir) |
| 129 | elif source_params['loader'] == 'gummiboot': | 129 | elif source_params['loader'] == 'gummiboot': |
| 130 | cls.do_configure_gummiboot(hdddir, cr, cr_workdir) | 130 | cls.do_configure_gummiboot(hdddir, creator, cr_workdir) |
| 131 | else: | 131 | else: |
| 132 | msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader']) | 132 | msger.error("unrecognized bootimg-efi loader: %s" % source_params['loader']) |
| 133 | except KeyError: | 133 | except KeyError: |
| @@ -135,7 +135,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 135 | 135 | ||
| 136 | 136 | ||
| 137 | @classmethod | 137 | @classmethod |
| 138 | def do_prepare_partition(cls, part, source_params, cr, cr_workdir, | 138 | def do_prepare_partition(cls, part, source_params, creator, cr_workdir, |
| 139 | oe_builddir, bootimg_dir, kernel_dir, | 139 | oe_builddir, bootimg_dir, kernel_dir, |
| 140 | rootfs_dir, native_sysroot): | 140 | rootfs_dir, native_sysroot): |
| 141 | """ | 141 | """ |
| @@ -148,7 +148,7 @@ class BootimgEFIPlugin(SourcePlugin): | |||
| 148 | if not bootimg_dir: | 148 | if not bootimg_dir: |
| 149 | msger.error("Couldn't find HDDDIR, exiting\n") | 149 | msger.error("Couldn't find HDDDIR, exiting\n") |
| 150 | # just so the result notes display it | 150 | # just so the result notes display it |
| 151 | cr.set_bootimg_dir(bootimg_dir) | 151 | creator.set_bootimg_dir(bootimg_dir) |
| 152 | 152 | ||
| 153 | staging_kernel_dir = kernel_dir | 153 | staging_kernel_dir = kernel_dir |
| 154 | 154 | ||
