-
Isaac Manjarres authored
Currently, the same modules.load file is used for normal boot, recovery/fastbootd and charger modes during first-stage init. This means that during normal boot, the modules that are needed for recovery and charger modes are loaded during first-stage init, which is not required. Add support for specifying a list of modules that are required for booting into recovery or charger mode. This introduces two new attributes to the kernel_images() macro called: modules_recovery_list and modules_charger_list. Each attribute points to a list of modules that are needed to boot into each mode respectively. This list can be generated dynamically by concatenating the list of vendor_boot or vendor_kernel_boot modules required for first stage init, along with the list of modules needed to boot into each mode. Defining these attributes also produces a file named modules.load.[recovery/charger] in the initramfs, which init uses instead of modules.load when booting into recovery or charger mode respectively to load the first-stage init and recovery and charger modules. In case of normal boot, init will use the modules.load file, which will only contain the modules needed for first stage init, and the recovery and charger modules will be loaded from the vendor_dlkm partition during second-stage init. Bug: 266752750 Change-Id: I11503b11683ef64cf0933b8641959ea5acd63ab1 Signed-off-by:
Isaac J. Manjarres <isaacmanjarres@google.com> (cherry picked from commit b9ba4b67) [isaacmanjarres: Re-wrote some of the commit message/implemented it as part of kleaf. Also added tests for the new attributes.] (cherry picked from commit d08605f4) [isaacmanjarres: Resolved trivial merge conflicts when backporting from main.]
14a840e8
Loading