poky/scripts
Vincent Davis Jr 7f522461d2 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>
2025-08-14 10:31:11 +01:00
..
contrib improve_kernel_cve_report: do not use custom version 2025-07-10 10:47:31 +01:00
cross-intercept native/cross: Add ar wrapper for determinism 2021-11-26 17:01:08 +00:00
esdk-tools scripts/esdk-tools: use a dedicated, static directory for esdk tools 2023-11-05 08:44:06 +00:00
lib bootimg_pcbios: add funcs to configure booting with grub 2025-08-14 10:31:11 +01:00
native-intercept native/cross: Add ar wrapper for determinism 2021-11-26 17:01:08 +00:00
nativesdk-intercept nativesdk-intercept: Fix bad intercept chgrp/chown logic 2023-09-08 22:59:47 +01:00
postinst-intercepts update_gtk_icon_cache: Fix for GTK4-only builds 2023-12-08 16:58:34 +00:00
pybootchartgui pybootchartgui: account for network stats when calculating extents 2025-07-28 14:51:50 +01:00
tiny scripts/tiny/ksize: Fix for more recent kernels 2020-05-09 18:57:21 +01:00
.oe-layers.json oe-setup-build: add a tool for discovering config templates and setting up builds 2024-02-19 11:47:53 +00:00
autobuilder-worker-prereq-tests scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
b4-wrapper-poky.py b4-wrapper-poky.py: output errors to stderr 2025-03-25 21:20:41 +00:00
bblock scripts/bblock: add a script to lock/unlock recipes 2023-10-09 15:58:47 +01:00
bitbake-prserv-tool migrate_localcount: Drop long obsolete code 2024-10-08 13:26:39 +01:00
buildall-qemu
buildhistory-collect-srcrevs buildhistory-collect-srcrevs: Adapt to the new variable override syntax 2021-08-26 22:09:44 +01:00
buildhistory-diff scripts/buildhistory-diff: drop use of distutils 2022-01-04 23:14:05 +00:00
buildstats-diff buildstats-diff: find last two buildstats files if none are specified 2025-05-19 17:35:43 +01:00
buildstats-summary buildstats-summary: look for buildstats if not specified 2024-10-25 15:25:32 +01:00
clean-hashserver-database scripts: Add clean-hashserver-database script 2025-03-18 11:25:36 +00:00
combo-layer scripts: python 3.12 regex 2024-02-13 13:51:41 +00:00
combo-layer-hook-default.sh scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
combo-layer.conf.example
cp-noerror scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
create-pull-request scripts/create-pull-request: update URLs to git repositories 2023-08-14 12:51:21 +01:00
crosstap scripts: Various typo/grammar/punctuation fixes 2022-03-02 18:43:24 +00:00
cve-json-to-text.py scripts/cve-json-to-text.py: fix missing -o option 2025-04-29 09:59:01 +01:00
devtool devtool: remove unused 'config' param from '_create_workspace' method 2025-01-20 13:38:59 +00:00
gen-lockedsig-cache scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
git scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
install-buildtools scripts/install-buildtools: Update to 5.2.2 2025-07-28 17:37:02 +01:00
lz4c scripts: wrap lz4c and convert to lz4 2024-12-17 11:41:53 +00:00
makefile-getvar scripts/makefile-getvar: add script to get values from Makefiles 2024-06-13 09:11:17 +01:00
multilib_header_wrapper.h multilib_header_wrapper: Drop using __MHWORDSIZE 2020-05-18 06:33:36 +01:00
oe-build-perf-report oe-build-perf-report: Use commit_time if available 2025-02-11 11:44:19 +00:00
oe-build-perf-test
oe-buildenv-internal oe-buildenv-internal: update required Python version 2023-08-21 16:15:35 +01:00
oe-check-sstate scripts: python 3.12 regex 2024-02-13 13:51:41 +00:00
oe-debuginfod oe-debuginfod: add option for data storage 2024-04-30 22:20:16 +01:00
oe-depends-dot oe-depends-dot: improve '-w' behavior 2023-09-02 18:23:05 +01:00
oe-find-native-sysroot scripts/oe-find-native-sysroot: use bitbake-getvar 2023-09-07 07:53:51 +01:00
oe-git-archive
oe-git-proxy
oe-gnome-terminal-phonehome scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
oe-pkgdata-browser scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
oe-pkgdata-browser.glade
oe-pkgdata-util scripts: python 3.12 regex 2024-02-13 13:51:41 +00:00
oe-publish-sdk scripts/oe-publish-sdk: Disable git gc to avoid build errors 2021-09-23 13:49:11 +01:00
oe-pylint scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
oe-run-native scripts: oe-run-native, fix *-native directories 2021-01-15 13:39:25 +00:00
oe-selftest oe-selftest: drop redundant imports 2025-03-11 11:20:34 +00:00
oe-setup-build oe-setup-build: raise exceptions on errors 2024-12-18 11:11:55 +00:00
oe-setup-builddir scripts/oe-setup-builddir: add support for configuration summaries 2024-02-19 11:47:53 +00:00
oe-setup-layers oe-setup-build: add a tool for discovering config templates and setting up builds 2024-02-19 11:47:53 +00:00
oe-setup-vscode oe-init-build-env: generate .vscode from template 2024-02-19 11:34:33 +00:00
oe-test testexport.bbclass oe-test: capture all tests and data from all layers 2025-07-10 10:47:30 +01:00
oe-time-dd-test.sh scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
oe-trim-schemas scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
oepydevshell-internal.py scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
opkg-query-helper.py scripts: python 3.12 regex 2024-02-13 13:51:41 +00:00
patchtest scripts/patchtest: split out result messages 2024-09-30 17:00:50 +01:00
patchtest-get-branch scripts: python 3.12 regex 2024-02-13 13:51:41 +00:00
patchtest-get-series patchtest: update SPDX identifiers 2023-10-17 22:53:30 +01:00
patchtest-send-results patchtest-send-results: add --debug option 2024-02-16 15:14:26 +00:00
patchtest-setup-sharedir patchtest: update SPDX identifiers 2023-10-17 22:53:30 +01:00
patchtest.README patchtest: Fix minor README typo 2025-03-13 11:00:35 +00:00
pull-sdpx-licenses.py scripts/pull-spdx-licenses.py: Add script 2024-07-02 22:29:13 +01:00
pythondeps scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
README
recipetool
relocate_sdk.py script/relocate_sdk.py: check dynamic loader arch before relocating interpreter 2025-02-11 11:44:19 +00:00
resulttool resulttool: Add support to create test report in JUnit XML format 2024-08-29 21:58:19 +01:00
rootfs_rpm-extract-postinst.awk
rpm2cpio.sh rpm2cpio.sh: update to the last 4.x version 2023-06-21 18:38:25 +01:00
runqemu runqemu: fix special characters bug 2025-08-07 12:11:16 +01:00
runqemu-addptable2image image_types/runqemu-addptable2image: Fix a minor typo 2022-05-15 08:57:15 +01:00
runqemu-export-rootfs qemu-helper: depend on unfs3 and pseudo directly 2022-11-29 10:29:58 +00:00
runqemu-extract-sdk qemu-helper: depend on unfs3 and pseudo directly 2022-11-29 10:29:58 +00:00
runqemu-gen-tapdevs runqemu-gen-tapdevs: remove only our taps 2023-06-24 12:21:48 +01:00
runqemu-ifdown runqemu-ifdown: catch up with ifup 2023-06-28 07:56:34 +01:00
runqemu-ifup runqemu: Fix automated call to runqemu-ifup 2023-06-28 07:56:34 +01:00
runqemu.README scripts/runqemu.README: fix typos and trailing whitespaces 2022-08-31 12:25:44 +01:00
send-error-report send-error-report: make output align with original design when debug disabled 2025-05-08 10:28:19 +01:00
send-pull-request
sstate-cache-management.py sstate-cache-management: add dry-run argument 2025-04-03 11:06:20 +01:00
sstate-diff-machines.sh scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
sstate-sysroot-cruft.sh scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
sysroot-relativelinks.py scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
task-time scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
test-reexec
test-remote-image scripts/test-remote-image: remove useless postconfig arguments 2025-06-19 21:54:44 +01:00
verify-bashisms scripts: Add copyright statements to files without one 2022-08-12 11:58:01 +01:00
wic scripts/wic: fix calling wic ls|cp|rm|write hung in bitbake task 2025-06-26 11:02:34 +01:00
yocto_testresults_query.py scripts/yocto_testresults_query: add option to change display limit 2023-10-23 10:49:19 +01:00
yocto-check-layer yocto-check-layer: Allow OE-Core to be tested 2022-12-09 13:18:41 +00:00
yocto-check-layer-wrapper

This directory contains Various useful scripts for working with OE builds