Generate a separate fstab file for FIPS mode

Add a file "fstab.gs101-fips" alongside the existing "fstab.gs101" in
order to specify different encryption settings in FIPS mode.

"androidboot.fstab_suffix=gs101-fips" on the kernel command line will be
used to select the FIPS fstab when needed.

As the two fstabs should be otherwise identical, generate them from a
template file so that they will stay in sync.

Note that generating the fstabs requires that they be installed as build
system modules rather than via PRODUCT_COPY_FILES, which results in the
vendor_ramdisk copy of the fstabs being installed to system/etc rather
than /.  This shouldn't cause any problem, now that Android has been
updated to look for the fstab in this location too.

Bug: 191417025
Change-Id: I1d115e014df8ba2fb83046ac0b9b791597364846
5 files changed