Remove TARGET_ANDROID_FILESYSTEM_CONFIG_H

TARGET_FS_CONFIG_GEN has existed as the preferred mechanism for two
releases, so we finally deprecate TARGET_ANDROID_FILESYSTEM_CONFIG_H.

Test: build
Change-Id: I299a4d1d1d893ac16d6e6ce2ec4659bfcdc19095
This commit is contained in:
Tom Cherry 2019-02-11 13:09:59 -08:00
parent 76d8591417
commit e0f3ed5cd0
3 changed files with 6 additions and 62 deletions

View file

@ -91,6 +91,7 @@ $(KATI_obsolete_var \
GLOBAL_CFLAGS_NO_OVERRIDE GLOBAL_CPPFLAGS_NO_OVERRIDE \
,GCC support has been removed. Use Clang instead)
$(KATI_obsolete_var DIST_DIR dist_goal,Use dist-for-goals instead. See $(CHANGES_URL)#dist)
$(KATI_obsolete_var TARGET_ANDROID_FILESYSTEM_CONFIG_H,Use TARGET_FS_CONFIG_GEN instead)
$(KATI_deprecated_var USER,Use BUILD_USERNAME instead. See $(CHANGES_URL)#USER)
# This is marked as obsolete in envsetup.mk after reading the BoardConfig.mk

View file

@ -14,55 +14,14 @@
LOCAL_PATH := $(call my-dir)
# One can override the default android_filesystem_config.h file in one of two ways:
#
# 1. The old way:
# To Build the custom target binary for the host to generate the fs_config
# override files. The executable is hard coded to include the
# $(TARGET_ANDROID_FILESYSTEM_CONFIG_H) file if it exists.
# Expectations:
# device/<vendor>/<device>/android_filesystem_config.h
# fills in struct fs_path_config android_device_dirs[] and
# struct fs_path_config android_device_files[]
# device/<vendor>/<device>/device.mk
# PRODUCT_PACKAGES += fs_config_dirs fs_config_files
# If not specified, check if default one to be found
#
# 2. The new way:
# set TARGET_FS_CONFIG_GEN to contain a list of intermediate format files
# One can override the default android_filesystem_config.h file by using TARGET_FS_CONFIG_GEN.
# Set TARGET_FS_CONFIG_GEN to contain a list of intermediate format files
# for generating the android_filesystem_config.h file.
#
# More information can be found in the README
ANDROID_FS_CONFIG_H := android_filesystem_config.h
ifneq ($(TARGET_ANDROID_FILESYSTEM_CONFIG_H),)
ifneq ($(TARGET_FS_CONFIG_GEN),)
$(error Cannot set TARGET_ANDROID_FILESYSTEM_CONFIG_H and TARGET_FS_CONFIG_GEN simultaneously)
endif
# One and only one file can be specified.
ifneq ($(words $(TARGET_ANDROID_FILESYSTEM_CONFIG_H)),1)
$(error Multiple fs_config files specified, \
see "$(TARGET_ANDROID_FILESYSTEM_CONFIG_H)".)
endif
ifeq ($(filter %/$(ANDROID_FS_CONFIG_H),$(TARGET_ANDROID_FILESYSTEM_CONFIG_H)),)
$(error TARGET_ANDROID_FILESYSTEM_CONFIG_H file name must be $(ANDROID_FS_CONFIG_H), \
see "$(notdir $(TARGET_ANDROID_FILESYSTEM_CONFIG_H))".)
endif
my_fs_config_h := $(TARGET_ANDROID_FILESYSTEM_CONFIG_H)
else ifneq ($(wildcard $(TARGET_DEVICE_DIR)/$(ANDROID_FS_CONFIG_H)),)
ifneq ($(TARGET_FS_CONFIG_GEN),)
$(error Cannot provide $(TARGET_DEVICE_DIR)/$(ANDROID_FS_CONFIG_H) and set TARGET_FS_CONFIG_GEN simultaneously)
endif
my_fs_config_h := $(TARGET_DEVICE_DIR)/$(ANDROID_FS_CONFIG_H)
else
my_fs_config_h := $(LOCAL_PATH)/default/$(ANDROID_FS_CONFIG_H)
endif
system_android_filesystem_config := system/core/include/private/android_filesystem_config.h
##################################

View file

@ -5,25 +5,9 @@
Generating the android_filesystem_config.h:
To generate the android_filesystem_config.h file, one can choose from
one of two methods. The first method, is to declare
TARGET_ANDROID_FILESYSTEM_CONFIG_H in the device BoardConfig.mk file. This
variable can only have one item in it, and it is used directly as the
android_filesystem_config.h header when building
fs_config_generate_$(TARGET_DEVICE) which is used to generate fs_config_files
and fs_config_dirs target executable.
The limitation with this, is that it can only be set once, thus if the device
has a make hierarchy, then each device needs its own file, and cannot share
from a common source or that common source needs to include everything from
both devices.
The other way is to set TARGET_FS_CONFIG_GEN, which can be a list of
intermediate fs configuration files. It is a build error on any one
these conditions:
* Specify TARGET_FS_CONFIG_GEN and TARGET_ANDROID_FILESYSTEM_CONFIG_H
* Specify TARGET_FS_CONFIG_GEN and provide
$(TARGET_DEVICE_DIR)/android_filesystem_config.h
To generate the android_filesystem_config.h file, one can set
TARGET_FS_CONFIG_GEN, which can be a list of intermediate fs configuration
files.
The parsing of the config file follows the Python ConfigParser specification,
with the sections and fields as defined below. There are two types of sections,