Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 1 | # Copyright (C) 2007 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 14 | |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 15 | LOCAL_PATH := $(call my-dir) |
| 16 | |
Tao Bao | 673bb6f | 2018-08-03 20:56:25 -0700 | [diff] [blame] | 17 | # Needed by build/make/core/Makefile. Must be consistent with the value in Android.bp. |
Tao Bao | 1d86605 | 2017-04-10 16:55:57 -0700 | [diff] [blame] | 18 | RECOVERY_API_VERSION := 3 |
| 19 | RECOVERY_FSTAB_VERSION := 2 |
| 20 | |
Hongguang Chen | 4d0df88 | 2020-04-21 20:58:04 -0700 | [diff] [blame] | 21 | # TARGET_RECOVERY_UI_LIB should be one of librecovery_ui_{default,wear,vr,ethernet} or a |
| 22 | # device-specific module that defines make_device() and the exact RecoveryUI class for the |
| 23 | # target. It defaults to librecovery_ui_default, which uses ScreenRecoveryUI. |
Tao Bao | f7e8012 | 2018-03-23 22:01:43 -0700 | [diff] [blame] | 24 | TARGET_RECOVERY_UI_LIB ?= librecovery_ui_default |
| 25 | |
Tao Bao | 42c45e2 | 2018-07-31 09:37:12 -0700 | [diff] [blame] | 26 | # librecovery_ui_ext (shared library) |
| 27 | # =================================== |
| 28 | include $(CLEAR_VARS) |
| 29 | |
| 30 | LOCAL_MODULE := librecovery_ui_ext |
| 31 | |
| 32 | # LOCAL_MODULE_PATH for shared libraries is unsupported in multiarch builds. |
| 33 | LOCAL_MULTILIB := first |
| 34 | |
| 35 | ifeq ($(TARGET_IS_64_BIT),true) |
| 36 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib64 |
| 37 | else |
| 38 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/system/lib |
| 39 | endif |
| 40 | |
| 41 | LOCAL_WHOLE_STATIC_LIBRARIES := \ |
| 42 | $(TARGET_RECOVERY_UI_LIB) |
| 43 | |
| 44 | LOCAL_SHARED_LIBRARIES := \ |
| 45 | libbase \ |
| 46 | liblog \ |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 47 | librecovery_ui.recovery |
Tao Bao | 42c45e2 | 2018-07-31 09:37:12 -0700 | [diff] [blame] | 48 | |
| 49 | include $(BUILD_SHARED_LIBRARY) |
| 50 | |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 51 | # recovery_deps: A phony target that's depended on by `recovery`, which |
| 52 | # builds additional modules conditionally based on Makefile variables. |
| 53 | # ====================================================================== |
Tao Bao | fd0ace8 | 2017-10-11 20:25:36 -0700 | [diff] [blame] | 54 | include $(CLEAR_VARS) |
| 55 | |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 56 | LOCAL_MODULE := recovery_deps |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 57 | |
| 58 | ifeq ($(TARGET_USERIMAGES_USE_F2FS),true) |
| 59 | ifeq ($(HOST_OS),linux) |
| 60 | LOCAL_REQUIRED_MODULES += \ |
Tao Bao | c674dfb | 2018-12-20 14:25:15 -0800 | [diff] [blame] | 61 | make_f2fs.recovery \ |
| 62 | sload_f2fs.recovery |
Tao Bao | 9e30997 | 2018-05-11 15:13:10 -0700 | [diff] [blame] | 63 | endif |
| 64 | endif |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 65 | |
Tianjie Xu | 2b1a464 | 2018-09-06 11:58:55 -0700 | [diff] [blame] | 66 | # On A/B devices recovery-persist reads the recovery related file from the persist storage and |
| 67 | # copies them into /data/misc/recovery. Then, for both A/B and non-A/B devices, recovery-persist |
| 68 | # parses the last_install file and reports the embedded update metrics. Also, the last_install file |
| 69 | # will be deteleted after the report. |
| 70 | LOCAL_REQUIRED_MODULES += recovery-persist |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 71 | ifeq ($(BOARD_CACHEIMAGE_PARTITION_SIZE),) |
Tianjie Xu | 2b1a464 | 2018-09-06 11:58:55 -0700 | [diff] [blame] | 72 | LOCAL_REQUIRED_MODULES += recovery-refresh |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 73 | endif |
| 74 | |
Tao Bao | 5fc72a1 | 2018-08-07 14:38:51 -0700 | [diff] [blame] | 75 | include $(BUILD_PHONY_PACKAGE) |
Mark Salyzyn | a4f701a | 2016-03-09 14:58:16 -0800 | [diff] [blame] | 76 | |
Yabin Cui | 2f272c0 | 2016-06-24 18:22:02 -0700 | [diff] [blame] | 77 | include \ |
Joe Onorato | 6396e70 | 2012-05-31 23:21:46 -0700 | [diff] [blame] | 78 | $(LOCAL_PATH)/updater/Android.mk \ |