diff options
author | JP Abgrall <jpa@google.com> | 2014-10-22 20:01:22 -0700 |
---|---|---|
committer | JP Abgrall <jpa@google.com> | 2014-10-23 17:54:01 +0000 |
commit | 6ea5bd626c0b79515658685ee63bf8154475635b (patch) | |
tree | 33cbc144324f37fda5aa36ccb03c849a3cabf214 /core | |
parent | f84e045e42f0377c415b2b6fea432ea0f3967f4f (diff) | |
download | build-6ea5bd626c0b79515658685ee63bf8154475635b.zip build-6ea5bd626c0b79515658685ee63bf8154475635b.tar.gz build-6ea5bd626c0b79515658685ee63bf8154475635b.tar.bz2 |
core: Let the build specify mount options for recovery
Currently recovery install/patch will mount /system++ with only default
options.
The default options are not very suitable for dealing with crashes.
We now use
TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS
that can specify which mount options to use for a given fs-type.
# <fstype>=<fstype_opts>[|<fstype_opts>]...
# fstype_opts := <opt>[,<opt>]...
# opt := <name>[=<value>]
If only defaults are to be used, then the BoardConfig.mk can just have
an empty (must have ""):
TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS := ""
The default is
"ext4=match_batch_time=0,commit=1,data=journal,barrier=1,errors=panic,nodelalloc"
The release tools will pick them up with
https://googleplex-android-review.git.corp.google.com/#/c/573628
Bug: 18092222
Change-Id: Iaa59099b0edf5af8835d1862fada089cff58882c
Diffstat (limited to 'core')
-rw-r--r-- | core/Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/Makefile b/core/Makefile index 72ca56c..f411e06 100644 --- a/core/Makefile +++ b/core/Makefile @@ -674,6 +674,12 @@ endif endif endif +# These options tell the recovery updater/installer how to mount the partitions writebale. +# <fstype>=<fstype_opts>[|<fstype_opts>]... +# fstype_opts := <opt>[,<opt>]... +# opt := <name>[=<value>] +DEFAULT_TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS := ext4=match_batch_time=0,commit=1,data=journal,barrier=1,errors=panic,nodelalloc + ifneq (true,$(TARGET_USERIMAGES_SPARSE_EXT_DISABLED)) INTERNAL_USERIMAGES_SPARSE_EXT_FLAG := -s endif @@ -1396,6 +1402,12 @@ endif ifdef BOARD_RECOVERYIMAGE_PARTITION_SIZE $(hide) echo "recovery_size=$(BOARD_RECOVERYIMAGE_PARTITION_SIZE)" >> $(zip_root)/META/misc_info.txt endif +ifdef TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS + @# TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS can be empty to indicate that nothing but defaults should be used. + $(hide) echo "recovery_mount_options=$(TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS)" >> $(zip_root)/META/misc_info.txt +else + $(hide) echo "recovery_mount_options=$(DEFAULT_TARGET_RECOVERY_FSTYPE_MOUNT_OPTIONS)" >> $(zip_root)/META/misc_info.txt +endif $(hide) echo "tool_extensions=$(tool_extensions)" >> $(zip_root)/META/misc_info.txt $(hide) echo "default_system_dev_certificate=$(DEFAULT_SYSTEM_DEV_CERTIFICATE)" >> $(zip_root)/META/misc_info.txt ifdef PRODUCT_EXTRA_RECOVERY_KEYS |