diff options
Diffstat (limited to 'scripts/lib')
-rw-r--r-- | scripts/lib/wic/plugins/source/bootimg_pcbios.py | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/scripts/lib/wic/plugins/source/bootimg_pcbios.py b/scripts/lib/wic/plugins/source/bootimg_pcbios.py index 21f41e00bb..6bde7a67d3 100644 --- a/scripts/lib/wic/plugins/source/bootimg_pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg_pcbios.py | |||
@@ -50,10 +50,18 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
50 | @classmethod | 50 | @classmethod |
51 | def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir, | 51 | def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir, |
52 | bootimg_dir, kernel_dir, native_sysroot): | 52 | bootimg_dir, kernel_dir, native_sysroot): |
53 | |||
54 | cls._do_install_syslinux(disk, disk_name, creator, workdir, oe_builddir, | ||
55 | bootimg_dir, kernel_dir, native_sysroot) | ||
56 | |||
57 | @classmethod | ||
58 | def _do_install_syslinux(cls, disk, disk_name, creator, workdir, oe_builddir, | ||
59 | bootimg_dir, kernel_dir, native_sysroot): | ||
53 | """ | 60 | """ |
54 | Called after all partitions have been prepared and assembled into a | 61 | Called after all partitions have been prepared and assembled into a |
55 | disk image. In this case, we install the MBR. | 62 | disk image. In this case, we install the MBR. |
56 | """ | 63 | """ |
64 | |||
57 | bootimg_dir = cls._get_bootimg_dir(bootimg_dir, 'syslinux') | 65 | bootimg_dir = cls._get_bootimg_dir(bootimg_dir, 'syslinux') |
58 | mbrfile = "%s/syslinux/" % bootimg_dir | 66 | mbrfile = "%s/syslinux/" % bootimg_dir |
59 | if creator.ptable_format == 'msdos': | 67 | if creator.ptable_format == 'msdos': |
@@ -80,9 +88,19 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
80 | def do_configure_partition(cls, part, source_params, creator, cr_workdir, | 88 | def do_configure_partition(cls, part, source_params, creator, cr_workdir, |
81 | oe_builddir, bootimg_dir, kernel_dir, | 89 | oe_builddir, bootimg_dir, kernel_dir, |
82 | native_sysroot): | 90 | native_sysroot): |
91 | |||
92 | cls._do_configure_syslinux(part, source_params, creator, cr_workdir, | ||
93 | oe_builddir, bootimg_dir, kernel_dir, | ||
94 | native_sysroot) | ||
95 | |||
96 | @classmethod | ||
97 | def _do_configure_syslinux(cls, part, source_params, creator, cr_workdir, | ||
98 | oe_builddir, bootimg_dir, kernel_dir, | ||
99 | native_sysroot): | ||
83 | """ | 100 | """ |
84 | Called before do_prepare_partition(), creates syslinux config | 101 | Called before do_prepare_partition(), creates syslinux config |
85 | """ | 102 | """ |
103 | |||
86 | hdddir = "%s/hdd/boot" % cr_workdir | 104 | hdddir = "%s/hdd/boot" % cr_workdir |
87 | 105 | ||
88 | install_cmd = "install -d %s" % hdddir | 106 | install_cmd = "install -d %s" % hdddir |
@@ -138,6 +156,15 @@ class BootimgPcbiosPlugin(SourcePlugin): | |||
138 | def do_prepare_partition(cls, part, source_params, creator, cr_workdir, | 156 | def do_prepare_partition(cls, part, source_params, creator, cr_workdir, |
139 | oe_builddir, bootimg_dir, kernel_dir, | 157 | oe_builddir, bootimg_dir, kernel_dir, |
140 | rootfs_dir, native_sysroot): | 158 | rootfs_dir, native_sysroot): |
159 | |||
160 | cls._do_prepare_syslinux(part, source_params, creator, cr_workdir, | ||
161 | oe_builddir, bootimg_dir, kernel_dir, | ||
162 | rootfs_dir, native_sysroot) | ||
163 | |||
164 | @classmethod | ||
165 | def _do_prepare_syslinux(cls, part, source_params, creator, cr_workdir, | ||
166 | oe_builddir, bootimg_dir, kernel_dir, | ||
167 | rootfs_dir, native_sysroot): | ||
141 | """ | 168 | """ |
142 | Called to do the actual content population for a partition i.e. it | 169 | Called to do the actual content population for a partition i.e. it |
143 | 'prepares' the partition to be incorporated into the image. | 170 | 'prepares' the partition to be incorporated into the image. |