summaryrefslogtreecommitdiffstats
path: root/scripts/lib/checklayer/case.py
diff options
context:
space:
mode:
authorVincent Davis Jr <vince@underview.tech>2025-08-14 00:25:49 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-14 10:31:11 +0100
commit7f522461d2ade980a1efcea290e4c879c92939aa (patch)
tree408cecb6cc3c8b00111bcf1008f275fb0fb6c574 /scripts/lib/checklayer/case.py
parent8b64e77f0025ecbe73931d31030f6dd55dffe9d6 (diff)
downloadpoky-7f522461d2ade980a1efcea290e4c879c92939aa.tar.gz
bootimg_pcbios: add funcs to configure booting with grub
Functions added, but not executed during wic image creation include: _get_staging_libdir * Finds target lib directory if for some reason STAGING_LIBDIR isn't set. _do_configure_grub * Will search for a grub configuration passed via bootloader --configfile. If not found build a default one which searches for partition that contains the given the kernel name via grub search module. _do_prepare_grub 1. Sets default values for GRUB_MKIMAGE_FORMAT_PC and GRUB_PREFIX_PATH if none specified. Both variables are required by grub-mkimage. * GRUB_MKIMAGE_FORMAT_PC is used to define target platform. * GRUB_PREFIX_PATH is used to define which directory grub config and modules are going to reside in. 2. Generates grub config to embed into core.img. This config is used to search for partition containing grub config. 3. Creates a custom core.img or grub stage 1.5 with an embedded grub config. 4. Copies all the target built grub modules into GRUB_PREFIX_PATH directory. 5. Creates boot partition _do_install_grub 1. dd target platform specific boot.img to the first 0-440 bytes of the resulting wic image. dd grub stage 1 to wic image. If this wics plugin is used with GPT as partition table format and grub selected as bootloader it's more than likely for grub hybrid booting because bootimg_efi plugin should and more than likely will be used in that case. So, boot.img may be dd regardless if partition table format is GPT or MBR. 2. dd custom core.img (grub stage 1.5) with embedded configuration to the resulting wic image starting at byte 512 up to sizeof(core.img). 3. Both boot.img and core.img are required for legacy bios boot. See grub Wiki for more details on boot.img and core.img. https://en.wikipedia.org/wiki/GNU_GRUB Commit also imports python modules required by the above implemented functions. (From OE-Core rev: 27c56962f47303cf49a4cf641e85239e4d7779b5) Signed-off-by: Vincent Davis Jr <vince@underview.tech> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/checklayer/case.py')
0 files changed, 0 insertions, 0 deletions