generate_gki_certificate: Support supplying --additional_avb_args multiple times

They are concatenated and forwarded to avbtool.

Bug: 211741246
Bug: 210367929
Test: atest --host mkbootimg_test
Change-Id: Iebcf0e826ae0f61a00e2ec522ceeb0e8a6ceb8e8
diff --git a/gki/generate_gki_certificate.py b/gki/generate_gki_certificate.py
index f3802a0..41a858a 100755
--- a/gki/generate_gki_certificate.py
+++ b/gki/generate_gki_certificate.py
@@ -66,10 +66,17 @@
     parser.add_argument('--avbtool', default='avbtool',
                         help='path to the avbtool executable')
     parser.add_argument('--salt', help='salt to use when computing image hash')
-    parser.add_argument('--additional_avb_args', default='',
+    parser.add_argument('--additional_avb_args', default=[], action='append',
                         help='additional arguments to be forwarded to avbtool')
 
-    return parser.parse_args()
+    args = parser.parse_args()
+
+    additional_avb_args = []
+    for a in args.additional_avb_args:
+        additional_avb_args.extend(a.split())
+    args.additional_avb_args = additional_avb_args
+
+    return args
 
 
 def main():
@@ -77,7 +84,7 @@
     generate_gki_certificate(
         image=args.image, avbtool=args.avbtool, name=args.name,
         algorithm=args.algorithm, key=args.key, salt=args.salt,
-        additional_avb_args=args.additional_avb_args.split(),
+        additional_avb_args=args.additional_avb_args,
         output=args.output,
     )