16kb: Config rw filesystem based on TARGET_RW_FILE_SYSTEM_TYPE
The TARGET_RW_FILE_SYSTEM_TYPE will contain the rw filesystem to use. The rw filesystem for the devices can be f2fs or ext4. If TARGET_RW_FILE_SYSTEM_TYPE is not defined, the default fs will be f2fs. Bug: 356425337 Test: $ source build/envsetup.sh $ lunch [zumapro]-trunk_staging-userdebug $ m $ ./vendor/google/tools/flashall -w Flag: EXEMPT bugfix Change-Id: Ib087a06a98525ca449253dffce9df470a05432d3
This commit is contained in:
parent
a17b16ccbd
commit
82e7a82825
7 changed files with 349 additions and 109 deletions
110
conf/Android.bp
110
conf/Android.bp
|
@ -14,16 +14,6 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
// By default this device uses hardware-wrapped keys for storage encryption,
|
||||
// which is intended to offer increased security over the traditional method
|
||||
// (software keys). However, hardware-wrapped keys aren't compatible with
|
||||
// FIPS-140 certification of the encryption hardware, and hence we have to
|
||||
// disable the use of them in FIPS mode. This requires having two fstab files:
|
||||
// one for the default mode, and one for FIPS mode selectable via
|
||||
// androidboot.fstab_suffix on the kernel command line. These fstabs should be
|
||||
// identical with the exception of the encryption settings, so to keep them in
|
||||
// sync the rules below generate them from a template file.
|
||||
|
||||
package {
|
||||
// See: http://go/android-license-faq
|
||||
// A large-scale-change added 'default_applicable_licenses' to import
|
||||
|
@ -33,102 +23,8 @@ 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)",
|
||||
filegroup {
|
||||
name: "fstab.zumapro.common",
|
||||
srcs: ["fstab.zumapro.common"],
|
||||
}
|
||||
|
||||
genrule {
|
||||
name: "gen_fstab.zumapro-hw-encrypt",
|
||||
srcs: ["fstab.zumapro.in"],
|
||||
out: ["fstab.zumapro"],
|
||||
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.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"],
|
||||
out: ["fstab.zumapro"],
|
||||
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.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"],
|
||||
out: ["fstab.zumapro"],
|
||||
cmd: "sed -e s/@fileencryption@//" +
|
||||
" -e s/@inlinecrypt@// " +
|
||||
" -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"],
|
||||
out: ["fstab.zumapro-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)",
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "fstab.zuma",
|
||||
src: ":gen_fstab.zuma-hw-encrypt",
|
||||
vendor: true,
|
||||
vendor_ramdisk_available: true,
|
||||
}
|
||||
|
||||
prebuilt_etc {
|
||||
name: "fstab.zumapro",
|
||||
src: ":gen_fstab.zumapro-hw-encrypt",
|
||||
vendor: true,
|
||||
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",
|
||||
vendor: true,
|
||||
vendor_ramdisk_available: true,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue