Move ramdisk to the new init_boot partition
The updated u-bootloader demands it. Bug: N/A Test: atest MicrodroidHostTestCases Change-Id: I7024f20eb9d7c637437236f844a0c0f45db41bf1
This commit is contained in:
parent
1096ef8646
commit
01597316cf
|
@ -5,6 +5,7 @@ package {
|
||||||
microdroid_filesystem_images = [
|
microdroid_filesystem_images = [
|
||||||
"microdroid_super",
|
"microdroid_super",
|
||||||
"microdroid_boot-5.10",
|
"microdroid_boot-5.10",
|
||||||
|
"microdroid_init_boot",
|
||||||
"microdroid_vendor_boot-5.10",
|
"microdroid_vendor_boot-5.10",
|
||||||
"microdroid_vbmeta",
|
"microdroid_vbmeta",
|
||||||
"microdroid_vbmeta_bootconfig",
|
"microdroid_vbmeta_bootconfig",
|
||||||
|
|
|
@ -282,6 +282,8 @@ def SignVirtApex(args):
|
||||||
boot_img = os.path.join(input_dir, 'etc', 'fs', 'microdroid_boot-5.10.img')
|
boot_img = os.path.join(input_dir, 'etc', 'fs', 'microdroid_boot-5.10.img')
|
||||||
vendor_boot_img = os.path.join(
|
vendor_boot_img = os.path.join(
|
||||||
input_dir, 'etc', 'fs', 'microdroid_vendor_boot-5.10.img')
|
input_dir, 'etc', 'fs', 'microdroid_vendor_boot-5.10.img')
|
||||||
|
init_boot_img = os.path.join(
|
||||||
|
input_dir, 'etc', 'fs', 'microdroid_init_boot.img')
|
||||||
super_img = os.path.join(input_dir, 'etc', 'fs', 'microdroid_super.img')
|
super_img = os.path.join(input_dir, 'etc', 'fs', 'microdroid_super.img')
|
||||||
vbmeta_img = os.path.join(input_dir, 'etc', 'fs', 'microdroid_vbmeta.img')
|
vbmeta_img = os.path.join(input_dir, 'etc', 'fs', 'microdroid_vbmeta.img')
|
||||||
vbmeta_bootconfig_img = os.path.join(
|
vbmeta_bootconfig_img = os.path.join(
|
||||||
|
@ -297,10 +299,11 @@ def SignVirtApex(args):
|
||||||
# while it's okay to use different keys for other image files.
|
# while it's okay to use different keys for other image files.
|
||||||
ReplaceBootloaderPubkey(args, key, bootloader, bootloader_pubkey)
|
ReplaceBootloaderPubkey(args, key, bootloader, bootloader_pubkey)
|
||||||
|
|
||||||
# re-sign bootloader, boot.img, vendor_boot.img
|
# re-sign bootloader, boot.img, vendor_boot.img, and init_boot.img
|
||||||
AddHashFooter(args, key, bootloader)
|
AddHashFooter(args, key, bootloader)
|
||||||
AddHashFooter(args, key, boot_img)
|
AddHashFooter(args, key, boot_img)
|
||||||
AddHashFooter(args, key, vendor_boot_img)
|
AddHashFooter(args, key, vendor_boot_img)
|
||||||
|
AddHashFooter(args, key, init_boot_img)
|
||||||
|
|
||||||
# re-sign super.img
|
# re-sign super.img
|
||||||
with TempDirectory() as work_dir:
|
with TempDirectory() as work_dir:
|
||||||
|
@ -320,12 +323,12 @@ def SignVirtApex(args):
|
||||||
# re-pack super.img
|
# re-pack super.img
|
||||||
MakeSuperImage(args, partitions, super_img)
|
MakeSuperImage(args, partitions, super_img)
|
||||||
|
|
||||||
# re-generate vbmeta from re-signed {boot, vendor_boot, system_a, vendor_a}.img
|
# re-generate vbmeta from re-signed {boot, vendor_boot, init_boot, system_a, vendor_a}.img
|
||||||
# Ideally, making VBmeta should be done out of TempDirectory block. But doing it here
|
# Ideally, making VBmeta should be done out of TempDirectory block. But doing it here
|
||||||
# to avoid unpacking re-signed super.img for system/vendor images which are available
|
# to avoid unpacking re-signed super.img for system/vendor images which are available
|
||||||
# in this block.
|
# in this block.
|
||||||
MakeVbmetaImage(args, key, vbmeta_img, images=[
|
MakeVbmetaImage(args, key, vbmeta_img, images=[
|
||||||
boot_img, vendor_boot_img, system_a_img, vendor_a_img])
|
boot_img, vendor_boot_img, init_boot_img, system_a_img, vendor_a_img])
|
||||||
|
|
||||||
# Re-sign bootconfigs with the same key
|
# Re-sign bootconfigs with the same key
|
||||||
bootconfig_sign_key = key
|
bootconfig_sign_key = key
|
||||||
|
|
|
@ -221,7 +221,6 @@ microdroid_boot_cmdline = [
|
||||||
|
|
||||||
bootimg {
|
bootimg {
|
||||||
name: "microdroid_boot-5.10",
|
name: "microdroid_boot-5.10",
|
||||||
ramdisk_module: "microdroid_ramdisk-5.10",
|
|
||||||
// We don't have kernel for arm and x86. But Soong demands one when it builds for
|
// We don't have kernel for arm and x86. But Soong demands one when it builds for
|
||||||
// arm or x86 target. Satisfy that by providing an empty file as the kernel.
|
// arm or x86 target. Satisfy that by providing an empty file as the kernel.
|
||||||
kernel_prebuilt: "empty_kernel",
|
kernel_prebuilt: "empty_kernel",
|
||||||
|
@ -251,6 +250,16 @@ bootimg {
|
||||||
avb_private_key: ":microdroid_sign_key",
|
avb_private_key: ":microdroid_sign_key",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bootimg {
|
||||||
|
name: "microdroid_init_boot",
|
||||||
|
ramdisk_module: "microdroid_ramdisk-5.10",
|
||||||
|
kernel_prebuilt: "empty_kernel",
|
||||||
|
header_version: "4",
|
||||||
|
partition_name: "init_boot",
|
||||||
|
use_avb: true,
|
||||||
|
avb_private_key: ":microdroid_sign_key",
|
||||||
|
}
|
||||||
|
|
||||||
android_filesystem {
|
android_filesystem {
|
||||||
name: "microdroid_ramdisk-5.10",
|
name: "microdroid_ramdisk-5.10",
|
||||||
deps: [
|
deps: [
|
||||||
|
@ -551,6 +560,7 @@ vbmeta {
|
||||||
"microdroid_vendor_boot-5.10",
|
"microdroid_vendor_boot-5.10",
|
||||||
"microdroid",
|
"microdroid",
|
||||||
"microdroid_boot-5.10",
|
"microdroid_boot-5.10",
|
||||||
|
"microdroid_init_boot",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
"label": "boot_a",
|
"label": "boot_a",
|
||||||
"path": "/apex/com.android.virt/etc/fs/microdroid_boot-5.10.img"
|
"path": "/apex/com.android.virt/etc/fs/microdroid_boot-5.10.img"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "init_boot_a",
|
||||||
|
"path": "/apex/com.android.virt/etc/fs/microdroid_init_boot.img"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "vendor_boot_a",
|
"label": "vendor_boot_a",
|
||||||
"path": "/apex/com.android.virt/etc/fs/microdroid_vendor_boot-5.10.img"
|
"path": "/apex/com.android.virt/etc/fs/microdroid_vendor_boot-5.10.img"
|
||||||
|
|
Loading…
Reference in New Issue