diff options
author | Vincent Davis Jr <vince@underview.tech> | 2025-08-14 00:25:44 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-08-14 10:31:11 +0100 |
commit | 336a252dbb0b41043da4c03546d7023c3a65ab54 (patch) | |
tree | 2d9583ed998c20b1bf08c1b23a611547d3fb6c56 /scripts/lib | |
parent | 45911b595abb6bd2050c7a37ce86e119953c8d0b (diff) | |
download | poky-336a252dbb0b41043da4c03546d7023c3a65ab54.tar.gz |
bootimg_pcbios: move syslinux install into seperate functions
Current oe-core bootimg_pcbios wics plugin
only supports installing syslinux directly
into the resulting wic image.
This commit seperates syslinux installation from
class BootimgPcbiosPlugin(SourcePlugin) override
functions in preparation of supporting the installation
of other bootloaders to the resulting wics plugin
such as:
* grub
* extlinux
Being moved now to make it easier to include
future bootloaders.
(From OE-Core rev: 78addc3a7c2f036e8932305368acd6090937b62d)
Signed-off-by: Vincent Davis Jr <vince@underview.tech>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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. |