unpack_bootimg: Export 'vendor_ramdisk' for vendor_boot v4 am: 33bf962400 am: 9d1f71ae36 am: d4ad80ee44 am: 211ebf8ad2

Original change: https://android-review.googlesource.com/c/platform/system/tools/mkbootimg/+/1952244

Change-Id: Iaf81f0681d968b119a2b7773a634872b0b882ed0
diff --git a/unpack_bootimg.py b/unpack_bootimg.py
index ae59429..2357e70 100755
--- a/unpack_bootimg.py
+++ b/unpack_bootimg.py
@@ -407,6 +407,9 @@
     ramdisk_offset_base = page_size * num_boot_header_pages
     image_info_list = []
 
+    image_info_list.append(
+        (ramdisk_offset_base, info.vendor_ramdisk_size, 'vendor_ramdisk'))
+
     if info.header_version > 3:
         info.vendor_ramdisk_table_size = unpack('I', args.boot_img.read(4))[0]
         vendor_ramdisk_table_entry_num = unpack('I', args.boot_img.read(4))[0]
@@ -449,9 +452,6 @@
             + num_vendor_ramdisk_table_pages)
         image_info_list.append((bootconfig_offset, info.vendor_bootconfig_size,
             'bootconfig'))
-    else:
-        image_info_list.append(
-            (ramdisk_offset_base, info.vendor_ramdisk_size, 'vendor_ramdisk'))
 
     dtb_offset = page_size * (num_boot_header_pages + num_boot_ramdisk_pages
                              ) # header + vendor_ramdisk