Ramdisk: Enable detaching bootconfig from initrd
This is the reverse of appending bootconfigs to initrd.
initrd_bootconfig detach-bootconfig takes initrd_with_bootconfig as
input & outputs the containing ramdisk & bootconfigs.
This is required because our signing infrastructure requires changing
vbmeta related configs (when images are resigned using a different key).
This can be achieved by detaching the configs, modifying them &
re-attaching them.
Bug: 245277660
Test: Attach & then detach bootconfigs to initrd & the diff the
artifacts.
Change-Id: Ia8803496549d887dae84cf7c4f545213591c6a78
diff --git a/microdroid/initrd/Android.bp b/microdroid/initrd/Android.bp
index 7a95ce6..ff6314b 100644
--- a/microdroid/initrd/Android.bp
+++ b/microdroid/initrd/Android.bp
@@ -68,7 +68,7 @@
":microdroid_bootconfig_debuggable_src",
] + bootconfigs_arm64,
out: ["microdroid_initrd_debuggable_arm64"],
- cmd: "$(location initrd_bootconfig) --output $(out) $(in)",
+ cmd: "$(location initrd_bootconfig) attach --output $(out) $(in)",
}
genrule {
@@ -79,7 +79,7 @@
":microdroid_bootconfig_debuggable_src",
] + bootconfigs_x86_64,
out: ["microdroid_initrd_debuggable_x86_64"],
- cmd: "$(location initrd_bootconfig) --output $(out) $(in)",
+ cmd: "$(location initrd_bootconfig) attach --output $(out) $(in)",
}
genrule {
@@ -90,7 +90,7 @@
":microdroid_bootconfig_normal_src",
] + bootconfigs_arm64,
out: ["microdroid_initrd_normal_arm64"],
- cmd: "$(location initrd_bootconfig) --output $(out) $(in)",
+ cmd: "$(location initrd_bootconfig) attach --output $(out) $(in)",
}
genrule {
@@ -101,7 +101,7 @@
":microdroid_bootconfig_normal_src",
] + bootconfigs_x86_64,
out: ["microdroid_initrd_normal_x86_64"],
- cmd: "$(location initrd_bootconfig) --output $(out) $(in)",
+ cmd: "$(location initrd_bootconfig) attach --output $(out) $(in)",
}
prebuilt_etc {