Support vendor bootconfig creation

Gather all BOARD_BOOTCONFIG parameters.
Create vendor-bootconfig.img with parameters seperated by newlines. Pass
that file to mkbootimg as --vendor_bootconfig to add it to the
vendor_boot.img.

Test: Add BOARD_BOOTCONFIG parameters in cuttlefish .mk file
      Check vendor-bootconfig.img for expected output
      Verify expected vendor_boot.img format with:
      unpack_bootimg --boot_image vendor_boot.img
Test: Update Cuttlefish bootloader to handle the new vendor_boot.img and
      check /proc/bootconfig for the expexted parameters.
Bug: 173815685
Change-Id: Iaa9b71b4bc64375777a5353396e83bb2beb25c47
This commit is contained in:
Devin Moore
2021-01-13 10:45:04 -08:00
parent 157e6a06e4
commit 50509015bf
3 changed files with 20 additions and 1 deletions

View File

@@ -1691,6 +1691,11 @@ def _BuildVendorBootImage(sourcedir, info_dict=None):
cmd.extend(["--vendor_ramdisk", ramdisk_img.name])
cmd.extend(["--vendor_boot", img.name])
fn = os.path.join(sourcedir, "vendor_bootconfig")
if os.access(fn, os.F_OK):
cmd.append("--vendor_bootconfig")
cmd.append(fn)
ramdisk_fragment_imgs = []
fn = os.path.join(sourcedir, "vendor_ramdisk_fragments")
if os.access(fn, os.F_OK):