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
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index da189f3..a5bcabc 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -1691,6 +1691,11 @@
   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):