Doug Zongker | ddd6a28 | 2009-06-09 12:22:33 -0700 | [diff] [blame] | 1 | ifneq ($(TARGET_SIMULATOR),true) |
| 2 | ifeq ($(TARGET_ARCH),arm) |
| 3 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 4 | LOCAL_PATH := $(call my-dir) |
| 5 | include $(CLEAR_VARS) |
| 6 | |
| 7 | commands_recovery_local_path := $(LOCAL_PATH) |
Koushik K. Dutta | 6060e5c | 2010-02-11 22:27:06 -0800 | [diff] [blame] | 8 | # LOCAL_CPP_EXTENSION := .c |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 9 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 10 | LOCAL_SRC_FILES := \ |
Oscar Montemayor | 0523156 | 2009-11-30 08:40:57 -0800 | [diff] [blame] | 11 | recovery.c \ |
| 12 | bootloader.c \ |
Oscar Montemayor | 0523156 | 2009-11-30 08:40:57 -0800 | [diff] [blame] | 13 | install.c \ |
| 14 | roots.c \ |
| 15 | ui.c \ |
| 16 | verifier.c \ |
Koushik Dutta | df1e406 | 2010-12-18 17:42:31 -0800 | [diff] [blame] | 17 | encryptedfs_provisioning.c \ |
Koushik Dutta | 19447c0 | 2010-11-10 10:40:44 -0800 | [diff] [blame] | 18 | mounts.c \ |
codeworkx | 9c4c8e2 | 2011-04-25 11:16:41 -0700 | [diff] [blame] | 19 | extendedcommands.c \ |
| 20 | nandroid.c \ |
Koushik Dutta | 2457adc | 2011-06-14 10:57:01 -0700 | [diff] [blame] | 21 | ../../system/core/toolbox/reboot.c \ |
Koushik Dutta | bec0995 | 2010-12-19 20:37:57 -0800 | [diff] [blame] | 22 | edifyscripting.c \ |
Koushik Dutta | 852bb42 | 2010-07-24 11:18:00 -0700 | [diff] [blame] | 23 | setprop.c |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 24 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 25 | LOCAL_MODULE := recovery |
| 26 | |
| 27 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 28 | |
Ricardo Cerqueira | 45df699 | 2011-07-21 16:31:57 +0100 | [diff] [blame^] | 29 | ifdef I_AM_KOUSH |
| 30 | RECOVERY_NAME := ClockworkMod Recovery |
| 31 | else |
| 32 | RECOVERY_NAME := CWM-based Recovery |
| 33 | endif |
| 34 | |
| 35 | RECOVERY_VERSION := $(RECOVERY_NAME) v4.0.1.4 |
| 36 | |
Koushik Dutta | 5aaa823 | 2010-07-20 16:23:18 -0700 | [diff] [blame] | 37 | LOCAL_CFLAGS += -DRECOVERY_VERSION="$(RECOVERY_VERSION)" |
Koushik Dutta | 4e10b13 | 2010-09-13 15:14:07 -0700 | [diff] [blame] | 38 | RECOVERY_API_VERSION := 2 |
Doug Zongker | fb2e3af | 2009-06-17 17:29:40 -0700 | [diff] [blame] | 39 | LOCAL_CFLAGS += -DRECOVERY_API_VERSION=$(RECOVERY_API_VERSION) |
| 40 | |
Ricardo Cerqueira | 0b06fc0 | 2011-07-07 01:09:52 +0100 | [diff] [blame] | 41 | BOARD_RECOVERY_DEFINES := BOARD_HAS_NO_SELECT_BUTTON BOARD_HAS_SMALL_RECOVERY BOARD_LDPI_RECOVERY BOARD_UMS_LUNFILE BOARD_RECOVERY_ALWAYS_WIPES |
Koushik Dutta | f4e3a67 | 2010-06-09 12:19:41 -0700 | [diff] [blame] | 42 | |
Koushik Dutta | 19447c0 | 2010-11-10 10:40:44 -0800 | [diff] [blame] | 43 | $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ |
| 44 | $(if $($(board_define)), \ |
| 45 | $(eval LOCAL_CFLAGS += -D$(board_define)=\"$($(board_define))\") \ |
| 46 | ) \ |
| 47 | ) |
Koushik Dutta | e17a78d | 2010-08-29 12:35:10 -0700 | [diff] [blame] | 48 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 49 | # This binary is in the recovery ramdisk, which is otherwise a copy of root. |
| 50 | # It gets copied there in config/Makefile. LOCAL_MODULE_TAGS suppresses |
| 51 | # a (redundant) copy of the binary in /system/bin for user builds. |
| 52 | # TODO: Build the ramdisk image in a more principled way. |
| 53 | |
| 54 | LOCAL_MODULE_TAGS := eng |
| 55 | |
Doug Zongker | ddd6a28 | 2009-06-09 12:22:33 -0700 | [diff] [blame] | 56 | LOCAL_STATIC_LIBRARIES := |
Koushik Dutta | adf906d | 2010-09-26 15:58:35 -0700 | [diff] [blame] | 57 | ifeq ($(BOARD_CUSTOM_RECOVERY_KEYMAPPING),) |
Doug Zongker | ddd6a28 | 2009-06-09 12:22:33 -0700 | [diff] [blame] | 58 | LOCAL_SRC_FILES += default_recovery_ui.c |
| 59 | else |
Koushik Dutta | adf906d | 2010-09-26 15:58:35 -0700 | [diff] [blame] | 60 | LOCAL_SRC_FILES += $(BOARD_CUSTOM_RECOVERY_KEYMAPPING) |
Doug Zongker | ddd6a28 | 2009-06-09 12:22:33 -0700 | [diff] [blame] | 61 | endif |
Koushik Dutta | 19447c0 | 2010-11-10 10:40:44 -0800 | [diff] [blame] | 62 | |
Koushik Dutta | aee5f85 | 2011-06-27 11:02:44 -0700 | [diff] [blame] | 63 | LOCAL_STATIC_LIBRARIES += librebootrecovery |
Doug Zongker | d4208f9 | 2010-09-20 12:16:13 -0700 | [diff] [blame] | 64 | LOCAL_STATIC_LIBRARIES += libext4_utils libz |
Koushik Dutta | df1e406 | 2010-12-18 17:42:31 -0800 | [diff] [blame] | 65 | LOCAL_STATIC_LIBRARIES += libminzip libunz libmincrypt |
| 66 | |
Koushik Dutta | bec0995 | 2010-12-19 20:37:57 -0800 | [diff] [blame] | 67 | LOCAL_STATIC_LIBRARIES += libedify libbusybox libclearsilverregex libmkyaffs2image libunyaffs liberase_image libdump_image libflash_image |
codeworkx | 9c4c8e2 | 2011-04-25 11:16:41 -0700 | [diff] [blame] | 68 | |
Koushik Dutta | 5082299 | 2011-06-08 19:03:27 -0700 | [diff] [blame] | 69 | LOCAL_STATIC_LIBRARIES += libcrecovery libflashutils libmtdutils libmmcutils libbmlutils |
codeworkx | 9c4c8e2 | 2011-04-25 11:16:41 -0700 | [diff] [blame] | 70 | |
| 71 | ifeq ($(BOARD_USES_BML_OVER_MTD),true) |
| 72 | LOCAL_STATIC_LIBRARIES += libbml_over_mtd |
| 73 | endif |
Koushik Dutta | 19447c0 | 2010-11-10 10:40:44 -0800 | [diff] [blame] | 74 | |
Doug Zongker | 19faefa | 2009-03-27 17:06:24 -0700 | [diff] [blame] | 75 | LOCAL_STATIC_LIBRARIES += libminui libpixelflinger_static libpng libcutils |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 76 | LOCAL_STATIC_LIBRARIES += libstdc++ libc |
| 77 | |
Doug Zongker | d4208f9 | 2010-09-20 12:16:13 -0700 | [diff] [blame] | 78 | LOCAL_C_INCLUDES += system/extras/ext4_utils |
| 79 | |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 80 | include $(BUILD_EXECUTABLE) |
| 81 | |
Koushik Dutta | d8e21c3 | 2011-01-04 10:46:23 -0800 | [diff] [blame] | 82 | RECOVERY_LINKS := edify busybox flash_image dump_image mkyaffs2image unyaffs erase_image nandroid reboot volume |
Koushik Dutta | 5aaa823 | 2010-07-20 16:23:18 -0700 | [diff] [blame] | 83 | |
Koushik K. Dutta | 6f406aa | 2010-03-16 23:46:13 -0700 | [diff] [blame] | 84 | # nc is provided by external/netcat |
Koushik Dutta | df1e406 | 2010-12-18 17:42:31 -0800 | [diff] [blame] | 85 | RECOVERY_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(RECOVERY_LINKS)) |
| 86 | $(RECOVERY_SYMLINKS): RECOVERY_BINARY := $(LOCAL_MODULE) |
| 87 | $(RECOVERY_SYMLINKS): $(LOCAL_INSTALLED_MODULE) |
Koushik K. Dutta | 6f406aa | 2010-03-16 23:46:13 -0700 | [diff] [blame] | 88 | @echo "Symlink: $@ -> $(RECOVERY_BINARY)" |
| 89 | @mkdir -p $(dir $@) |
| 90 | @rm -rf $@ |
| 91 | $(hide) ln -sf $(RECOVERY_BINARY) $@ |
| 92 | |
Koushik Dutta | df1e406 | 2010-12-18 17:42:31 -0800 | [diff] [blame] | 93 | ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_SYMLINKS) |
Koushik K. Dutta | 6f406aa | 2010-03-16 23:46:13 -0700 | [diff] [blame] | 94 | |
| 95 | # Now let's do recovery symlinks |
Koushik K. Dutta | 24cecb1 | 2010-03-29 15:20:07 -0700 | [diff] [blame] | 96 | BUSYBOX_LINKS := $(shell cat external/busybox/busybox-minimal.links) |
Koushik Dutta | 0e961cd | 2011-06-13 19:51:00 -0700 | [diff] [blame] | 97 | ifndef BOARD_HAS_SMALL_RECOVERY |
Koushik Dutta | b4261d9 | 2011-06-27 17:54:16 -0700 | [diff] [blame] | 98 | exclude := tune2fs |
| 99 | ifeq ($(BOARD_HAS_LARGE_FILESYSTEM),true) |
| 100 | exclude += mke2fs |
| 101 | endif |
Koushik Dutta | 0e961cd | 2011-06-13 19:51:00 -0700 | [diff] [blame] | 102 | endif |
Koushik Dutta | df1e406 | 2010-12-18 17:42:31 -0800 | [diff] [blame] | 103 | RECOVERY_BUSYBOX_SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(filter-out $(exclude),$(notdir $(BUSYBOX_LINKS)))) |
| 104 | $(RECOVERY_BUSYBOX_SYMLINKS): BUSYBOX_BINARY := busybox |
| 105 | $(RECOVERY_BUSYBOX_SYMLINKS): $(LOCAL_INSTALLED_MODULE) |
Koushik K. Dutta | 6f406aa | 2010-03-16 23:46:13 -0700 | [diff] [blame] | 106 | @echo "Symlink: $@ -> $(BUSYBOX_BINARY)" |
| 107 | @mkdir -p $(dir $@) |
| 108 | @rm -rf $@ |
| 109 | $(hide) ln -sf $(BUSYBOX_BINARY) $@ |
| 110 | |
Koushik Dutta | df1e406 | 2010-12-18 17:42:31 -0800 | [diff] [blame] | 111 | ALL_DEFAULT_INSTALLED_MODULES += $(RECOVERY_BUSYBOX_SYMLINKS) |
Koushik K. Dutta | 6f406aa | 2010-03-16 23:46:13 -0700 | [diff] [blame] | 112 | |
Koushik K. Dutta | 68b0190 | 2010-04-01 12:20:39 -0700 | [diff] [blame] | 113 | include $(CLEAR_VARS) |
| 114 | LOCAL_MODULE := nandroid-md5.sh |
| 115 | LOCAL_MODULE_TAGS := eng |
| 116 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 117 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 118 | LOCAL_SRC_FILES := nandroid-md5.sh |
| 119 | include $(BUILD_PREBUILT) |
| 120 | |
Koushik Dutta | fd1579b | 2010-05-01 12:46:55 -0700 | [diff] [blame] | 121 | include $(CLEAR_VARS) |
Koushik Dutta | cdb6335 | 2010-06-09 15:49:44 -0700 | [diff] [blame] | 122 | LOCAL_MODULE := killrecovery.sh |
| 123 | LOCAL_MODULE_TAGS := eng |
| 124 | LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES |
| 125 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 126 | LOCAL_SRC_FILES := killrecovery.sh |
| 127 | include $(BUILD_PREBUILT) |
Doug Zongker | 73ae31c | 2009-12-09 17:01:45 -0800 | [diff] [blame] | 128 | |
| 129 | include $(CLEAR_VARS) |
| 130 | |
| 131 | LOCAL_SRC_FILES := verifier_test.c verifier.c |
| 132 | |
| 133 | LOCAL_MODULE := verifier_test |
| 134 | |
| 135 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 136 | |
| 137 | LOCAL_MODULE_TAGS := tests |
| 138 | |
| 139 | LOCAL_STATIC_LIBRARIES := libmincrypt libcutils libstdc++ libc |
| 140 | |
| 141 | include $(BUILD_EXECUTABLE) |
| 142 | |
Koushik Dutta | 67700e7 | 2011-07-11 12:26:45 -0700 | [diff] [blame] | 143 | include $(commands_recovery_local_path)/dedupe/Android.mk |
Doug Zongker | 73ae31c | 2009-12-09 17:01:45 -0800 | [diff] [blame] | 144 | |
Koushik Dutta | b5a36a0 | 2010-09-13 14:33:15 -0700 | [diff] [blame] | 145 | include $(commands_recovery_local_path)/bmlutils/Android.mk |
Koushik Dutta | 19447c0 | 2010-11-10 10:40:44 -0800 | [diff] [blame] | 146 | include $(commands_recovery_local_path)/flashutils/Android.mk |
Koushik Dutta | 5082299 | 2011-06-08 19:03:27 -0700 | [diff] [blame] | 147 | include $(commands_recovery_local_path)/libcrecovery/Android.mk |
Doug Zongker | ddd6a28 | 2009-06-09 12:22:33 -0700 | [diff] [blame] | 148 | include $(commands_recovery_local_path)/minui/Android.mk |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 149 | include $(commands_recovery_local_path)/minzip/Android.mk |
| 150 | include $(commands_recovery_local_path)/mtdutils/Android.mk |
Shashank Mittal | 815ca5d | 2010-07-27 11:09:19 -0700 | [diff] [blame] | 151 | include $(commands_recovery_local_path)/mmcutils/Android.mk |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 152 | include $(commands_recovery_local_path)/tools/Android.mk |
Doug Zongker | 9931f7f | 2009-06-10 14:11:53 -0700 | [diff] [blame] | 153 | include $(commands_recovery_local_path)/edify/Android.mk |
| 154 | include $(commands_recovery_local_path)/updater/Android.mk |
Doug Zongker | 512536a | 2010-02-17 16:11:44 -0800 | [diff] [blame] | 155 | include $(commands_recovery_local_path)/applypatch/Android.mk |
Koushik Dutta | ceddcd5 | 2010-08-23 16:13:14 -0700 | [diff] [blame] | 156 | include $(commands_recovery_local_path)/utilities/Android.mk |
The Android Open Source Project | c24a8e6 | 2009-03-03 19:28:42 -0800 | [diff] [blame] | 157 | commands_recovery_local_path := |
Doug Zongker | c3885fa | 2009-06-11 17:05:58 -0700 | [diff] [blame] | 158 | |
| 159 | endif # TARGET_ARCH == arm |
Oscar Montemayor | 0523156 | 2009-11-30 08:40:57 -0800 | [diff] [blame] | 160 | endif # !TARGET_SIMULATOR |
Doug Zongker | c3885fa | 2009-06-11 17:05:58 -0700 | [diff] [blame] | 161 | |