Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v8 1/9] bootimg_pcbios: move syslinux install into seperate functions
@ 2025-08-14  4:25 Vincent Davis Jr
  2025-08-14  4:25 ` [PATCH v8 2/9] bootimg_pcbios: move syslinux funcs to end of file Vincent Davis Jr
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Vincent Davis Jr @ 2025-08-14  4:25 UTC (permalink / raw)
  To: openembedded-core; +Cc: Vincent Davis Jr

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.

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
---
 .../lib/wic/plugins/source/bootimg_pcbios.py  | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)

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):
     @classmethod
     def do_install_disk(cls, disk, disk_name, creator, workdir, oe_builddir,
                         bootimg_dir, kernel_dir, native_sysroot):
+
+        cls._do_install_syslinux(disk, disk_name, creator, workdir, oe_builddir,
+                                 bootimg_dir, kernel_dir, native_sysroot)
+
+    @classmethod
+    def _do_install_syslinux(cls, disk, disk_name, creator, workdir, oe_builddir,
+                             bootimg_dir, kernel_dir, native_sysroot):
         """
         Called after all partitions have been prepared and assembled into a
         disk image.  In this case, we install the MBR.
         """
+
         bootimg_dir = cls._get_bootimg_dir(bootimg_dir, 'syslinux')
         mbrfile = "%s/syslinux/" % bootimg_dir
         if creator.ptable_format == 'msdos':
@@ -80,9 +88,19 @@ class BootimgPcbiosPlugin(SourcePlugin):
     def do_configure_partition(cls, part, source_params, creator, cr_workdir,
                                oe_builddir, bootimg_dir, kernel_dir,
                                native_sysroot):
+
+        cls._do_configure_syslinux(part, source_params, creator, cr_workdir,
+                                   oe_builddir, bootimg_dir, kernel_dir,
+                                   native_sysroot)
+
+    @classmethod
+    def _do_configure_syslinux(cls, part, source_params, creator, cr_workdir,
+                               oe_builddir, bootimg_dir, kernel_dir,
+                               native_sysroot):
         """
         Called before do_prepare_partition(), creates syslinux config
         """
+
         hdddir = "%s/hdd/boot" % cr_workdir
 
         install_cmd = "install -d %s" % hdddir
@@ -138,6 +156,15 @@ class BootimgPcbiosPlugin(SourcePlugin):
     def do_prepare_partition(cls, part, source_params, creator, cr_workdir,
                              oe_builddir, bootimg_dir, kernel_dir,
                              rootfs_dir, native_sysroot):
+
+        cls._do_prepare_syslinux(part, source_params, creator, cr_workdir,
+                                 oe_builddir, bootimg_dir, kernel_dir,
+                                 rootfs_dir, native_sysroot)
+
+    @classmethod
+    def _do_prepare_syslinux(cls, part, source_params, creator, cr_workdir,
+                             oe_builddir, bootimg_dir, kernel_dir,
+                             rootfs_dir, native_sysroot):
         """
         Called to do the actual content population for a partition i.e. it
         'prepares' the partition to be incorporated into the image.
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-08-14  4:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-14  4:25 [PATCH v8 1/9] bootimg_pcbios: move syslinux install into seperate functions Vincent Davis Jr
2025-08-14  4:25 ` [PATCH v8 2/9] bootimg_pcbios: move syslinux funcs to end of file Vincent Davis Jr
2025-08-14  4:25 ` [PATCH v8 3/9] bootimg_pcbios: seperate bootloader config creation Vincent Davis Jr
2025-08-14  4:25 ` [PATCH v8 4/9] bootimg_pcbios: cleanup _do_configure_syslinux function Vincent Davis Jr
2025-08-14  4:25 ` [PATCH v8 5/9] bootimg_pcbios: cleanup prepare and install syslinux funcs Vincent Davis Jr
2025-08-14  4:25 ` [PATCH v8 6/9] bootimg_pcbios: add funcs to configure booting with grub Vincent Davis Jr
2025-08-14  4:25 ` [PATCH v8 7/9] bootimg_pcbios: include grub as an optional bootloader Vincent Davis Jr
2025-08-14  4:25 ` [PATCH v8 8/9] bootimg_pcbios: add help and usage comments Vincent Davis Jr
2025-08-14  4:25 ` [PATCH v8 9/9] oe-selftest: add wic.Wic.test_grub_install_pcbios Vincent Davis Jr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox