2009-03-04 04:28:42 +01:00
|
|
|
# Copyright (C) 2008 The Android Open Source Project
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
|
|
LOCAL_PATH := $(call my-dir)
|
2015-04-15 21:53:39 +02:00
|
|
|
|
2019-02-11 22:09:59 +01:00
|
|
|
# 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
|
2016-03-05 03:12:29 +01:00
|
|
|
# for generating the android_filesystem_config.h file.
|
|
|
|
#
|
|
|
|
# More information can be found in the README
|
2015-04-01 23:41:29 +02:00
|
|
|
|
2019-02-13 23:02:30 +01:00
|
|
|
ifneq ($(wildcard $(TARGET_DEVICE_DIR)/android_filesystem_config.h),)
|
|
|
|
$(error Using $(TARGET_DEVICE_DIR)/android_filesystem_config.h is deprecated, please use TARGET_FS_CONFIG_GEN instead)
|
2019-02-14 01:17:39 +01:00
|
|
|
endif
|
|
|
|
|
2020-09-17 18:42:55 +02:00
|
|
|
system_android_filesystem_config := system/core/libcutils/include/private/android_filesystem_config.h
|
2019-02-13 23:02:30 +01:00
|
|
|
system_capability_header := bionic/libc/kernel/uapi/linux/capability.h
|
2018-06-14 21:19:19 +02:00
|
|
|
|
2021-07-13 04:42:18 +02:00
|
|
|
# Use snapshots if exist
|
|
|
|
vendor_android_filesystem_config := $(strip \
|
|
|
|
$(if $(filter-out current,$(BOARD_VNDK_VERSION)), \
|
|
|
|
$(SOONG_VENDOR_$(BOARD_VNDK_VERSION)_SNAPSHOT_DIR)/include/$(system_android_filesystem_config)))
|
|
|
|
ifeq (,$(wildcard $(vendor_android_filesystem_config)))
|
|
|
|
vendor_android_filesystem_config := $(system_android_filesystem_config)
|
|
|
|
endif
|
|
|
|
|
|
|
|
vendor_capability_header := $(strip \
|
|
|
|
$(if $(filter-out current,$(BOARD_VNDK_VERSION)), \
|
|
|
|
$(SOONG_VENDOR_$(BOARD_VNDK_VERSION)_SNAPSHOT_DIR)/include/$(system_capability_header)))
|
|
|
|
ifeq (,$(wildcard $(vendor_capability_header)))
|
|
|
|
vendor_capability_header := $(system_capability_header)
|
|
|
|
endif
|
|
|
|
|
2022-01-27 08:05:08 +01:00
|
|
|
# List of supported vendor, oem, odm, vendor_dlkm, odm_dlkm, and system_dlkm Partitions
|
2017-03-22 23:53:12 +01:00
|
|
|
fs_config_generate_extra_partition_list := $(strip \
|
|
|
|
$(if $(BOARD_USES_VENDORIMAGE)$(BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE),vendor) \
|
|
|
|
$(if $(BOARD_USES_OEMIMAGE)$(BOARD_OEMIMAGE_FILE_SYSTEM_TYPE),oem) \
|
2018-11-16 18:44:07 +01:00
|
|
|
$(if $(BOARD_USES_ODMIMAGE)$(BOARD_ODMIMAGE_FILE_SYSTEM_TYPE),odm) \
|
2020-05-07 23:58:20 +02:00
|
|
|
$(if $(BOARD_USES_VENDOR_DLKMIMAGE)$(BOARD_VENDOR_DLKMIMAGE_FILE_SYSTEM_TYPE),vendor_dlkm) \
|
2020-07-16 01:52:59 +02:00
|
|
|
$(if $(BOARD_USES_ODM_DLKMIMAGE)$(BOARD_ODM_DLKMIMAGE_FILE_SYSTEM_TYPE),odm_dlkm) \
|
2022-01-27 08:05:08 +01:00
|
|
|
$(if $(BOARD_USES_SYSTEM_DLKMIMAGE)$(BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE),system_dlkm) \
|
2018-11-16 18:44:07 +01:00
|
|
|
)
|
2015-04-01 23:41:29 +02:00
|
|
|
|
2016-03-05 03:12:29 +01:00
|
|
|
##################################
|
2018-06-26 15:03:38 +02:00
|
|
|
# Generate the <p>/etc/fs_config_dirs binary files for each partition.
|
|
|
|
# Add fs_config_dirs to PRODUCT_PACKAGES in the device make file to enable.
|
2015-04-01 23:41:29 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := fs_config_dirs
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2018-06-26 15:03:38 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := \
|
2020-10-19 09:58:06 +02:00
|
|
|
fs_config_dirs_system \
|
|
|
|
fs_config_dirs_system_ext \
|
|
|
|
fs_config_dirs_product \
|
|
|
|
fs_config_dirs_nonsystem
|
2018-06-26 15:03:38 +02:00
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the <p>/etc/fs_config_files binary files for each partition.
|
|
|
|
# Add fs_config_files to PRODUCT_PACKAGES in the device make file to enable.
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := fs_config_files
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2018-06-26 15:03:38 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := \
|
|
|
|
fs_config_files_system \
|
2020-10-19 09:58:06 +02:00
|
|
|
fs_config_files_system_ext \
|
|
|
|
fs_config_files_product \
|
|
|
|
fs_config_files_nonsystem
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the system_ext/etc/fs_config_dirs binary file for the target if the
|
|
|
|
# system_ext partition is generated. Add fs_config_dirs or fs_config_dirs_system_ext
|
|
|
|
# to PRODUCT_PACKAGES in the device make file to enable.
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := fs_config_dirs_system_ext
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := $(if $(BOARD_USES_SYSTEM_EXTIMAGE)$(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE),_fs_config_dirs_system_ext)
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the system_ext/etc/fs_config_files binary file for the target if the
|
|
|
|
# system_ext partition is generated. Add fs_config_files or fs_config_files_system_ext
|
|
|
|
# to PRODUCT_PACKAGES in the device make file to enable.
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := fs_config_files_system_ext
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := $(if $(BOARD_USES_SYSTEM_EXTIMAGE)$(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE),_fs_config_files_system_ext)
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the product/etc/fs_config_dirs binary file for the target if the
|
|
|
|
# product partition is generated. Add fs_config_dirs or fs_config_dirs_product
|
|
|
|
# to PRODUCT_PACKAGES in the device make file to enable.
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := fs_config_dirs_product
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := $(if $(BOARD_USES_PRODUCTIMAGE)$(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE),_fs_config_dirs_product)
|
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the product/etc/fs_config_files binary file for the target if the
|
|
|
|
# product partition is generated. Add fs_config_files or fs_config_files_product
|
|
|
|
# to PRODUCT_PACKAGES in the device make file to enable.
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := fs_config_files_product
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := $(if $(BOARD_USES_PRODUCTIMAGE)$(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE),_fs_config_files_product)
|
2018-06-26 15:03:38 +02:00
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the <p>/etc/fs_config_dirs binary files for all enabled partitions
|
2020-10-19 09:58:06 +02:00
|
|
|
# excluding /system, /system_ext and /product. Add fs_config_dirs_nonsystem to
|
|
|
|
# PRODUCT_PACKAGES in the device make file to enable.
|
2018-06-26 15:03:38 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := fs_config_dirs_nonsystem
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := $(foreach t,$(fs_config_generate_extra_partition_list),_fs_config_dirs_$(t))
|
2018-06-26 15:03:38 +02:00
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the <p>/etc/fs_config_files binary files for all enabled partitions
|
2020-10-19 09:58:06 +02:00
|
|
|
# excluding /system, /system_ext and /product. Add fs_config_files_nonsystem to
|
|
|
|
# PRODUCT_PACKAGES in the device make file to enable.
|
2018-06-26 15:03:38 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := fs_config_files_nonsystem
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_REQUIRED_MODULES := $(foreach t,$(fs_config_generate_extra_partition_list),_fs_config_files_$(t))
|
2018-06-26 15:03:38 +02:00
|
|
|
include $(BUILD_PHONY_PACKAGE)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the system/etc/fs_config_dirs binary file for the target
|
|
|
|
# Add fs_config_dirs or fs_config_dirs_system to PRODUCT_PACKAGES in
|
|
|
|
# the device make file to enable
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := fs_config_dirs_system
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2015-04-01 23:41:29 +02:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
2018-06-26 15:03:38 +02:00
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
|
2015-04-01 23:41:29 +02:00
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
|
2018-11-16 22:30:37 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_PARTITION_LIST := $(fs_config_generate_extra_partition_list)
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(system_android_filesystem_config) $(system_capability_header)
|
2015-04-01 23:41:29 +02:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition system \
|
2019-05-26 12:09:50 +02:00
|
|
|
--all-partitions "$(subst $(space),$(comma),$(PRIVATE_PARTITION_LIST))" \
|
2019-02-13 23:02:30 +01:00
|
|
|
--dirs \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2015-04-01 23:41:29 +02:00
|
|
|
|
2016-03-05 03:12:29 +01:00
|
|
|
##################################
|
2015-04-01 23:41:29 +02:00
|
|
|
# Generate the system/etc/fs_config_files binary file for the target
|
2018-06-26 15:03:38 +02:00
|
|
|
# Add fs_config_files or fs_config_files_system to PRODUCT_PACKAGES in
|
|
|
|
# the device make file to enable
|
2015-04-01 23:41:29 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2018-06-26 15:03:38 +02:00
|
|
|
LOCAL_MODULE := fs_config_files_system
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2015-04-01 23:41:29 +02:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
2018-06-26 15:03:38 +02:00
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
|
2015-04-01 23:41:29 +02:00
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
|
2018-11-16 22:30:37 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_PARTITION_LIST := $(fs_config_generate_extra_partition_list)
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(system_android_filesystem_config) $(system_capability_header)
|
2015-04-01 23:41:29 +02:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition system \
|
2019-05-26 12:09:50 +02:00
|
|
|
--all-partitions "$(subst $(space),$(comma),$(PRIVATE_PARTITION_LIST))" \
|
2019-02-13 23:02:30 +01:00
|
|
|
--files \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2017-03-22 23:53:12 +01:00
|
|
|
|
|
|
|
ifneq ($(filter vendor,$(fs_config_generate_extra_partition_list)),)
|
|
|
|
##################################
|
|
|
|
# Generate the vendor/etc/fs_config_dirs binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_dirs or fs_config_dirs_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
2017-03-22 23:53:12 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_dirs_vendor
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2017-03-22 23:53:12 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
2017-03-22 23:53:12 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition vendor \
|
|
|
|
--dirs \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2017-03-22 23:53:12 +01:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the vendor/etc/fs_config_files binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_files or fs_config_files_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
2017-03-22 23:53:12 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_files_vendor
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2017-03-22 23:53:12 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
2017-03-22 23:53:12 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition vendor \
|
|
|
|
--files \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2017-03-22 23:53:12 +01:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(filter oem,$(fs_config_generate_extra_partition_list)),)
|
|
|
|
##################################
|
|
|
|
# Generate the oem/etc/fs_config_dirs binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_dirs or fs_config_dirs_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
2017-03-22 23:53:12 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_dirs_oem
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2017-03-22 23:53:12 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_OEM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(system_android_filesystem_config) $(system_capability_header)
|
2017-03-22 23:53:12 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition oem \
|
|
|
|
--dirs \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2017-03-22 23:53:12 +01:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the oem/etc/fs_config_files binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_files or fs_config_files_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
2017-03-22 23:53:12 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_files_oem
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2017-03-22 23:53:12 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_OEM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(system_android_filesystem_config) $(system_capability_header)
|
2017-03-22 23:53:12 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition oem \
|
|
|
|
--files \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2017-03-22 23:53:12 +01:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(filter odm,$(fs_config_generate_extra_partition_list)),)
|
|
|
|
##################################
|
|
|
|
# Generate the odm/etc/fs_config_dirs binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_dirs or fs_config_dirs_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
2017-03-22 23:53:12 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_dirs_odm
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2017-03-22 23:53:12 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_ODM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
2017-03-22 23:53:12 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition odm \
|
|
|
|
--dirs \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2017-03-22 23:53:12 +01:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the odm/etc/fs_config_files binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_files or fs_config_files_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
2017-03-22 23:53:12 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_files_odm
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2017-03-22 23:53:12 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_ODM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
2017-03-22 23:53:12 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition odm \
|
|
|
|
--files \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2017-03-22 23:53:12 +01:00
|
|
|
|
|
|
|
endif
|
2015-04-01 23:41:29 +02:00
|
|
|
|
2020-05-07 23:58:20 +02:00
|
|
|
ifneq ($(filter vendor_dlkm,$(fs_config_generate_extra_partition_list)),)
|
|
|
|
##################################
|
|
|
|
# Generate the vendor_dlkm/etc/fs_config_dirs binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_dirs or fs_config_dirs_nonsystem to PRODUCT_PACKAGES in
|
2020-05-07 23:58:20 +02:00
|
|
|
# the device make file to enable
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_dirs_vendor_dlkm
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-05-07 23:58:20 +02:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_DLKM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
2020-05-07 23:58:20 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
2020-05-07 23:58:20 +02:00
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition vendor_dlkm \
|
|
|
|
--dirs \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the vendor_dlkm/etc/fs_config_files binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_files or fs_config_files_nonsystem to PRODUCT_PACKAGES in
|
2020-05-07 23:58:20 +02:00
|
|
|
# the device make file to enable
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_files_vendor_dlkm
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-05-07 23:58:20 +02:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_DLKM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
2020-05-07 23:58:20 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
2020-05-07 23:58:20 +02:00
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition vendor_dlkm \
|
|
|
|
--files \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2020-07-16 01:52:59 +02:00
|
|
|
ifneq ($(filter odm_dlkm,$(fs_config_generate_extra_partition_list)),)
|
|
|
|
##################################
|
|
|
|
# Generate the odm_dlkm/etc/fs_config_dirs binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_dirs or fs_config_dirs_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
2020-07-16 01:52:59 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_dirs_odm_dlkm
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-07-16 01:52:59 +02:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_ODM_DLKM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
2020-07-16 01:52:59 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
2020-07-16 01:52:59 +02:00
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition odm_dlkm \
|
|
|
|
--dirs \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the odm_dlkm/etc/fs_config_files binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_files or fs_config_files_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
2020-07-16 01:52:59 +02:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_files_odm_dlkm
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2020-07-16 01:52:59 +02:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_ODM_DLKM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
2020-07-16 01:52:59 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
2021-07-13 04:42:18 +02:00
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
2020-07-16 01:52:59 +02:00
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition odm_dlkm \
|
|
|
|
--files \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2022-01-27 08:05:08 +01:00
|
|
|
ifneq ($(filter system_dlkm,$(fs_config_generate_extra_partition_list)),)
|
|
|
|
##################################
|
|
|
|
# Generate the system_dlkm/etc/fs_config_dirs binary file for the target
|
|
|
|
# Add fs_config_dirs or fs_config_dirs_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := _fs_config_dirs_system_dlkm
|
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_DLKM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition system_dlkm \
|
|
|
|
--dirs \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the system_dlkm/etc/fs_config_files binary file for the target
|
|
|
|
# Add fs_config_files or fs_config_files_nonsystem to PRODUCT_PACKAGES
|
|
|
|
# in the device make file to enable
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := _fs_config_files_system_dlkm
|
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_DLKM)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(vendor_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(vendor_capability_header)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(vendor_android_filesystem_config) $(vendor_capability_header)
|
|
|
|
@mkdir -p $(dir $@)
|
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition system_dlkm \
|
|
|
|
--files \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
ifneq ($(BOARD_USES_PRODUCTIMAGE)$(BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE),)
|
2018-11-16 18:44:07 +01:00
|
|
|
##################################
|
|
|
|
# Generate the product/etc/fs_config_dirs binary file for the target
|
|
|
|
# Add fs_config_dirs or fs_config_dirs_product to PRODUCT_PACKAGES in
|
|
|
|
# the device make file to enable
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_dirs_product
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2018-11-16 18:44:07 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(system_android_filesystem_config) $(system_capability_header)
|
2018-11-16 18:44:07 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition product \
|
|
|
|
--dirs \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2018-11-16 18:44:07 +01:00
|
|
|
|
|
|
|
##################################
|
|
|
|
# Generate the product/etc/fs_config_files binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_files or fs_config_files_product to PRODUCT_PACKAGES in
|
2018-11-16 18:44:07 +01:00
|
|
|
# the device make file to enable
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_files_product
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2018-11-16 18:44:07 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
|
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_PRODUCT)/etc
|
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(system_android_filesystem_config) $(system_capability_header)
|
2018-11-16 18:44:07 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
|
|
|
--partition product \
|
|
|
|
--files \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2018-11-16 18:44:07 +01:00
|
|
|
endif
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
ifneq ($(BOARD_USES_SYSTEM_EXTIMAGE)$(BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE),)
|
2018-11-16 18:44:07 +01:00
|
|
|
##################################
|
2019-06-25 08:58:13 +02:00
|
|
|
# Generate the system_ext/etc/fs_config_dirs binary file for the target
|
|
|
|
# Add fs_config_dirs or fs_config_dirs_system_ext to PRODUCT_PACKAGES in
|
2018-11-16 18:44:07 +01:00
|
|
|
# the device make file to enable
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_dirs_system_ext
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2018-11-16 18:44:07 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_dirs
|
2019-06-25 08:58:13 +02:00
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT)/etc
|
2018-11-16 18:44:07 +01:00
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(system_android_filesystem_config) $(system_capability_header)
|
2018-11-16 18:44:07 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
2019-06-25 08:58:13 +02:00
|
|
|
--partition system_ext \
|
2019-02-13 23:02:30 +01:00
|
|
|
--dirs \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2018-11-16 18:44:07 +01:00
|
|
|
|
|
|
|
##################################
|
2019-06-25 08:58:13 +02:00
|
|
|
# Generate the system_ext/etc/fs_config_files binary file for the target
|
2020-10-19 09:58:06 +02:00
|
|
|
# Add fs_config_files or fs_config_files_system_ext to PRODUCT_PACKAGES in
|
2018-11-16 18:44:07 +01:00
|
|
|
# the device make file to enable
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2020-10-19 09:58:06 +02:00
|
|
|
LOCAL_MODULE := _fs_config_files_system_ext
|
2022-01-25 00:21:32 +01:00
|
|
|
LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
|
|
|
|
LOCAL_LICENSE_CONDITIONS := notice
|
|
|
|
LOCAL_NOTICE_FILE := build/soong/licenses/LICENSE
|
2018-11-16 18:44:07 +01:00
|
|
|
LOCAL_MODULE_CLASS := ETC
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM := fs_config_files
|
2019-06-25 08:58:13 +02:00
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_SYSTEM_EXT)/etc
|
2018-11-16 18:44:07 +01:00
|
|
|
include $(BUILD_SYSTEM)/base_rules.mk
|
2019-02-13 23:02:30 +01:00
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_FS_HDR := $(system_android_filesystem_config)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_ANDROID_CAP_HDR := $(system_capability_header)
|
|
|
|
$(LOCAL_BUILT_MODULE): PRIVATE_TARGET_FS_CONFIG_GEN := $(TARGET_FS_CONFIG_GEN)
|
|
|
|
$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/fs_config_generator.py $(TARGET_FS_CONFIG_GEN) $(system_android_filesystem_config) $(system_capability_header)
|
2018-11-16 18:44:07 +01:00
|
|
|
@mkdir -p $(dir $@)
|
2019-02-13 23:02:30 +01:00
|
|
|
$< fsconfig \
|
|
|
|
--aid-header $(PRIVATE_ANDROID_FS_HDR) \
|
|
|
|
--capability-header $(PRIVATE_ANDROID_CAP_HDR) \
|
2019-06-25 08:58:13 +02:00
|
|
|
--partition system_ext \
|
2019-02-13 23:02:30 +01:00
|
|
|
--files \
|
|
|
|
--out_file $@ \
|
|
|
|
$(or $(PRIVATE_TARGET_FS_CONFIG_GEN),/dev/null)
|
2018-11-16 18:44:07 +01:00
|
|
|
endif
|
|
|
|
|
Revert "Revert "Merge changes from topic 'fsconfig-2'""
This reverts commit fad4b4b715be25e874829345a14219716fc8c157.
Incorporating the following fixes:
1.
fsconfig: fix fs_config_* build for discovered headers
When android_file system_config.h is picked up from the device
directory, neither TARGET_FS_CONFIG_GEN or TARGET_ANDROID_FILESYSTEM_CONFIG_H
are specified. Thus, the build is not generating the required fs_config_files
and fs_config_dirs.
Test: Ensure that make fs_config_files works, and produces the same output as before
Build the system image and mount it as a loop back and dump the file system
capabilities with getcap. Verify that output to the supplied
android_file system_config.h
From the loopback of the system.img mount, from CWD system/bin:
$ getcap *
cnss-daemon = cap_net_bind_service+ep
hostapd = cap_net_admin,cap_net_raw+ep
imsdatadaemon = cap_net_bind_service+ep
ims_rtp_daemon = cap_net_bind_service+ep
logd = cap_setgid,cap_audit_control,cap_syslog+ep
mm-qcamera-daemon = cap_sys_nice+ep
pm-service = cap_net_bind_service+ep
run-as = cap_setgid,cap_setuid+ep
surfaceflinger = cap_sys_nice+ep
webview_zygote32 = cap_setgid,cap_setuid,cap_setpcap+ep
webview_zygote64 = cap_setgid,cap_setuid,cap_setpcap+ep
Compared to the android_filesystem_config.h:
{ 00700, AID_CAMERA, AID_SHELL, (1ULL << CAP_SYS_NICE), "system/bin/mm-qcamera-daemon" },
{ 00755, AID_SYSTEM, AID_SYSTEM, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/pm-service" },
{ 00755, AID_SYSTEM, AID_SYSTEM, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/imsdatadaemon" },
{ 00755, AID_SYSTEM, AID_RADIO, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/ims_rtp_daemon" },
{ 00755, AID_SYSTEM, AID_SYSTEM, (1ULL << CAP_NET_BIND_SERVICE), "system/bin/cnss-daemon"},
2.
fsconfig: fix error message for duplicate AID
Fixes:
raise ValueError('Duplicate aid value "%u" for %s' % value,
TypeError: %u format: a number is required, not str
and
raise ValueError('Duplicate aid value "%s" for %s' % value,
TypeError: not enough arguments for format string
3.
fsconfig: add test for duplicate ranges
Add a test for duplicate range detection.
4.
fsconfig: skip AID_APP, AID_USER and all ranges
Do not output AID_APP, AID_USER and ranges. A range
is defined as ending with AID_ and ending in _START or
_END.
5.
fsconfig: test for skip AID_APP, AID_USER and all ranges
Test against AIDs that caused the bionic tests to fail.
Change-Id: I95569a9ccc83bd3231f8a6f395532cc2de316bd2
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2016-12-14 00:37:07 +01:00
|
|
|
system_android_filesystem_config :=
|
2019-02-13 23:02:30 +01:00
|
|
|
system_capability_header :=
|
2017-05-15 20:02:53 +02:00
|
|
|
fs_config_generate_extra_partition_list :=
|