Enable metadata in GSI

Add BOARD_USES_METADATA_PARTITION to GSI to enable metadata folder
under the root folder.

Bug: 80407843
Bug: 79781913
Test: Boot on a Pixel device with GSI applied the patch
Change-Id: I5544b76b54300aa5a87aa4fa3c0ec6feff13a554
diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk
index c76339f..2a1c45f 100644
--- a/target/board/generic/BoardConfig.mk
+++ b/target/board/generic/BoardConfig.mk
@@ -56,6 +56,9 @@
 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
 DEVICE_MATRIX_FILE   := device/generic/goldfish/compatibility_matrix.xml
 
+# Android generic system image always create metadata partition
+BOARD_USES_METADATA_PARTITION := true
+
 # Set this to create /cache mount point for non-A/B devices that mounts /cache.
 # The partition size doesn't matter, just to make build pass.
 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk
index 0a65d55..d4a8553 100644
--- a/target/board/generic_arm64/BoardConfig.mk
+++ b/target/board/generic_arm64/BoardConfig.mk
@@ -85,6 +85,9 @@
 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
 DEVICE_MATRIX_FILE   := device/generic/goldfish/compatibility_matrix.xml
 
+# Android generic system image always create metadata partition
+BOARD_USES_METADATA_PARTITION := true
+
 # Set this to create /cache mount point for non-A/B devices that mounts /cache.
 # The partition size doesn't matter, just to make build pass.
 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
diff --git a/target/board/generic_x86/BoardConfig.mk b/target/board/generic_x86/BoardConfig.mk
index 0721a71..5af7e5a 100644
--- a/target/board/generic_x86/BoardConfig.mk
+++ b/target/board/generic_x86/BoardConfig.mk
@@ -58,6 +58,9 @@
 TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true
 DEVICE_MATRIX_FILE   := device/generic/goldfish/compatibility_matrix.xml
 
+# Android generic system image always create metadata partition
+BOARD_USES_METADATA_PARTITION := true
+
 # Set this to create /cache mount point for non-A/B devices that mounts /cache.
 # The partition size doesn't matter, just to make build pass.
 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk
index e2f8f47..81e325e 100755
--- a/target/board/generic_x86_64/BoardConfig.mk
+++ b/target/board/generic_x86_64/BoardConfig.mk
@@ -56,6 +56,9 @@
 BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
 DEVICE_MATRIX_FILE   := device/generic/goldfish/compatibility_matrix.xml
 
+# Android generic system image always create metadata partition
+BOARD_USES_METADATA_PARTITION := true
+
 # Set this to create /cache mount point for non-A/B devices that mounts /cache.
 # The partition size doesn't matter, just to make build pass.
 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
diff --git a/target/board/treble_common.mk b/target/board/treble_common.mk
index bf07e28..c4e68fe 100644
--- a/target/board/treble_common.mk
+++ b/target/board/treble_common.mk
@@ -39,6 +39,9 @@
 # Generic AOSP image always requires separate vendor.img
 TARGET_COPY_OUT_VENDOR := vendor
 
+# Android generic system image always create metadata partition
+BOARD_USES_METADATA_PARTITION := true
+
 # Generic AOSP image does NOT support HWC1
 TARGET_USES_HWC2 := true
 # Set emulator framebuffer display device buffer count to 3