From 63d759fd29a925afce52baf7d05ae2564ed464b7 Mon Sep 17 00:00:00 2001 From: Robin Peng Date: Thu, 27 Apr 2023 11:37:44 +0000 Subject: [PATCH] add fstab for zuma platform Bug: 274823764 Change-Id: I121a1434a5e4eb764f07003a40a58926d6525932 --- conf/Android.bp | 50 +++++++++++++++++++++++++++++++++++++++++++++++++ device.mk | 4 ++++ 2 files changed, 54 insertions(+) diff --git a/conf/Android.bp b/conf/Android.bp index d9dd48b..c133d0a 100644 --- a/conf/Android.bp +++ b/conf/Android.bp @@ -33,6 +33,15 @@ package { default_applicable_licenses: ["device_google_zumapro_license"], } +genrule { + name: "gen_fstab.zuma-hw-encrypt", + srcs: ["fstab.zumapro.in"], + out: ["fstab.zuma"], + cmd: "sed -e s/@fileencryption@/fileencryption=:aes-256-hctr2:inlinecrypt_optimized+wrappedkey_v0/" + + " -e s/@inlinecrypt@/inlinecrypt/ " + + " -e s/@metadata_encryption@/metadata_encryption=:wrappedkey_v0/ $(in) > $(out)", +} + genrule { name: "gen_fstab.zumapro-hw-encrypt", srcs: ["fstab.zumapro.in"], @@ -42,6 +51,15 @@ genrule { " -e s/@metadata_encryption@/metadata_encryption=:wrappedkey_v0/ $(in) > $(out)", } +genrule { + name: "gen_fstab.zuma-sw-encrypt", + srcs: ["fstab.zumapro.in"], + out: ["fstab.zuma"], + cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts:aes-256-hctr2/" + + " -e s/@inlinecrypt@// " + + " -e s/@metadata_encryption@/metadata_encryption=/ $(in) > $(out)", +} + genrule { name: "gen_fstab.zumapro-sw-encrypt", srcs: ["fstab.zumapro.in"], @@ -51,6 +69,15 @@ genrule { " -e s/@metadata_encryption@/metadata_encryption=/ $(in) > $(out)", } +genrule { + name: "gen_fstab.zuma-no-encrypt", + srcs: ["fstab.zumapro.in"], + out: ["fstab.zuma"], + cmd: "sed -e s/@fileencryption@//" + + " -e s/@inlinecrypt@// " + + " -e s/@metadata_encryption@// $(in) > $(out)", +} + genrule { name: "gen_fstab.zumapro-no-encrypt", srcs: ["fstab.zumapro.in"], @@ -60,6 +87,15 @@ genrule { " -e s/@metadata_encryption@// $(in) > $(out)", } +genrule { + name: "gen_fstab.zuma-fips", + srcs: ["fstab.zumapro.in"], + out: ["fstab.zuma-fips"], + cmd: "sed -e s/@fileencryption@/fileencryption=aes-256-xts/" + + " -e s/@inlinecrypt@/inlinecrypt/ " + + " -e s/@metadata_encryption@/metadata_encryption=aes-256-xts/ $(in) > $(out)", +} + genrule { name: "gen_fstab.zumapro-fips", srcs: ["fstab.zumapro.in"], @@ -69,6 +105,13 @@ genrule { " -e s/@metadata_encryption@/metadata_encryption=aes-256-xts/ $(in) > $(out)", } +prebuilt_etc { + name: "fstab.zuma", + src: ":gen_fstab.zuma-no-encrypt", + vendor: true, + vendor_ramdisk_available: true, +} + prebuilt_etc { name: "fstab.zumapro", src: ":gen_fstab.zumapro-no-encrypt", @@ -76,6 +119,13 @@ prebuilt_etc { vendor_ramdisk_available: true, } +prebuilt_etc { + name: "fstab.zuma-fips", + src: ":gen_fstab.zuma-fips", + vendor: true, + vendor_ramdisk_available: true, +} + prebuilt_etc { name: "fstab.zumapro-fips", src: ":gen_fstab.zumapro-fips", diff --git a/device.mk b/device.mk index cba2294..22d7f9c 100644 --- a/device.mk +++ b/device.mk @@ -332,9 +332,13 @@ PRODUCT_COPY_FILES += \ # Fstab files PRODUCT_PACKAGES += \ + fstab.zuma \ fstab.zumapro \ + fstab.zuma.vendor_ramdisk \ fstab.zumapro.vendor_ramdisk \ + fstab.zuma-fips \ fstab.zumapro-fips \ + fstab.zuma-fips.vendor_ramdisk \ fstab.zumapro-fips.vendor_ramdisk PRODUCT_COPY_FILES += \