diff options
-rw-r--r-- | Android.bp | 1 | ||||
-rw-r--r-- | CleanSpec.mk | 3 | ||||
-rw-r--r-- | bootctrl/Android.bp | 21 | ||||
-rw-r--r-- | device.mk | 12 | ||||
-rw-r--r-- | gpt-utils/Android.bp | 38 | ||||
-rw-r--r-- | gpt-utils/Android.mk | 46 | ||||
-rw-r--r-- | gpt-utils/gpt-utils.cpp | 2 |
7 files changed, 66 insertions, 57 deletions
@@ -2,5 +2,6 @@ soong_namespace { imports: [ "hardware/google/interfaces", "hardware/google/pixel", + "hardware/qcom/bootctrl", ], } diff --git a/CleanSpec.mk b/CleanSpec.mk index e8d17b1b..6d71bc6f 100644 --- a/CleanSpec.mk +++ b/CleanSpec.mk @@ -174,3 +174,6 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.po # Remove generic atrace HAL $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.atrace@1.0-service.rc) $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.atrace@1.0-service.xml) + +# Remove obsolete android.hardware.boot@1.0-impl-wrapper.recovery.so +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/recovery/root/system/lib64/hw/android.hardware.boot@1.0-impl-wrapper.recovery.so) diff --git a/bootctrl/Android.bp b/bootctrl/Android.bp new file mode 100644 index 00000000..9dcf7671 --- /dev/null +++ b/bootctrl/Android.bp @@ -0,0 +1,21 @@ +// +// Copyright (C) 2019 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. +// + +cc_library { + name: "bootctrl.sdm710", + defaults: ["bootctrl_hal_defaults"], + static_libs: ["libgptutils.bonito"], +} @@ -138,7 +138,8 @@ PRODUCT_PRODUCT_PROPERTIES += \ ro.sys.sdcardfs=1 PRODUCT_PACKAGES += \ - bootctrl.sdm710 + bootctrl.sdm710 \ + bootctrl.sdm710.recovery PRODUCT_PROPERTY_OVERRIDES += \ ro.cp_system_other_odex=1 @@ -159,14 +160,6 @@ AB_OTA_POSTINSTALL_CONFIG += \ FILESYSTEM_TYPE_vendor=ext4 \ POSTINSTALL_OPTIONAL_vendor=true -# Enable update engine sideloading by including the static version of the -# boot_control HAL and its dependencies. -PRODUCT_STATIC_BOOT_CONTROL_HAL := \ - bootctrl.sdm710 \ - libgptutils \ - libz \ - libcutils - PRODUCT_PACKAGES += \ update_engine_sideload \ sg_write_buffer \ @@ -475,6 +468,7 @@ PRODUCT_PACKAGES += \ # Boot control HAL PRODUCT_PACKAGES += \ android.hardware.boot@1.0-impl \ + android.hardware.boot@1.0-impl.recovery \ android.hardware.boot@1.0-service \ # Vibrator HAL diff --git a/gpt-utils/Android.bp b/gpt-utils/Android.bp new file mode 100644 index 00000000..271e945c --- /dev/null +++ b/gpt-utils/Android.bp @@ -0,0 +1,38 @@ +// +// Copyright (C) 2019 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. +// + +cc_library { + name: "libgptutils.bonito", + vendor: true, + recovery_available: true, + shared_libs: [ + "libcutils", + "liblog", + "libz", + ], + cflags: [ + "-Wall", + "-Werror", + ], + srcs: [ + "gpt-utils.cpp", + ], + owner: "qti", + header_libs: [ + "device_kernel_headers", + ], + export_include_dirs: ["."], +} diff --git a/gpt-utils/Android.mk b/gpt-utils/Android.mk deleted file mode 100644 index 6dd1a448..00000000 --- a/gpt-utils/Android.mk +++ /dev/null @@ -1,46 +0,0 @@ -# -# Copyright 2016 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) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := gpt-utils.cpp -ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) -LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include -LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr -endif -LOCAL_SHARED_LIBRARIES := liblog libz -LOCAL_MODULE := libgptutils -LOCAL_MODULE_OWNER := qti -include $(BUILD_STATIC_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_SRC_FILES := gpt-utils.cpp -ifeq ($(TARGET_COMPILE_WITH_MSM_KERNEL),true) -LOCAL_C_INCLUDES += $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr/include -LOCAL_ADDITIONAL_DEPENDENCIES := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr -endif -LOCAL_SHARED_LIBRARIES += liblog libcutils libz -LOCAL_EXPORT_HEADER_LIBRARY_HEADERS := libgptutils_headers -LOCAL_MODULE := libgptutils -LOCAL_MODULE_OWNER := qti -LOCAL_PROPRIETARY_MODULE := true -include $(BUILD_SHARED_LIBRARY) - -include $(CLEAR_VARS) -LOCAL_MODULE := libgptutils_headers -LOCAL_EXPORT_C_INCLUDE_DIRS:=$(LOCAL_PATH) -include $(BUILD_HEADER_LIBRARY) diff --git a/gpt-utils/gpt-utils.cpp b/gpt-utils/gpt-utils.cpp index ff6e535f..2a97f1b3 100644 --- a/gpt-utils/gpt-utils.cpp +++ b/gpt-utils/gpt-utils.cpp @@ -747,7 +747,6 @@ int prepare_partitions(enum boot_update_stage stage, const char *dev_path) enum gpt_state gpt_prim, gpt_second; enum boot_update_stage internal_stage; struct stat xbl_partition_stat; - struct stat ufs_dir_stat; if (!dev_path) { fprintf(stderr, "%s: Invalid dev_path\n", @@ -970,7 +969,6 @@ int add_lun_to_update_list(char *lun_path, struct update_data *dat) int prepare_boot_update(enum boot_update_stage stage) { - int r, fd; int is_ufs = gpt_utils_is_ufs_device(); struct stat ufs_dir_stat; struct update_data data; |