Ethan Yonker | 6bb26b5 | 2016-01-10 22:26:51 -0600 | [diff] [blame] | 1 | TWRP_TOOLBOX_PATH := $(call my-dir) |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 2 | LOCAL_PATH := system/core/toolbox |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 3 | include $(CLEAR_VARS) |
| 4 | |
Ethan Yonker | f117962 | 2016-08-25 15:32:21 -0500 | [diff] [blame] | 5 | OUR_TOOLS := |
| 6 | |
| 7 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0) |
| 8 | OUR_TOOLS := \ |
| 9 | start \ |
| 10 | stop |
| 11 | endif |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 12 | |
| 13 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) |
| 14 | OUR_TOOLS += \ |
| 15 | getprop \ |
| 16 | setprop |
| 17 | endif |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 18 | |
Matt Mower | 81742fb | 2014-09-01 14:40:52 -0500 | [diff] [blame] | 19 | # If busybox does not have SELinux support, provide these tools with toolbox. |
| 20 | # Note that RECOVERY_BUSYBOX_TOOLS will be empty if TW_USE_TOOLBOX == true. |
Matt Mower | 8741364 | 2017-01-17 21:14:46 -0600 | [diff] [blame] | 21 | TOOLS_FOR_SELINUX := \ |
| 22 | ls |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 23 | |
Matt Mower | 8741364 | 2017-01-17 21:14:46 -0600 | [diff] [blame] | 24 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) |
| 25 | TOOLS_FOR_SELINUX += \ |
| 26 | load_policy \ |
| 27 | getenforce \ |
| 28 | chcon \ |
| 29 | restorecon \ |
| 30 | runcon \ |
| 31 | getsebool \ |
| 32 | setsebool |
| 33 | endif |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 34 | |
Matt Mower | 8741364 | 2017-01-17 21:14:46 -0600 | [diff] [blame] | 35 | OUR_TOOLS += $(filter-out $(RECOVERY_BUSYBOX_TOOLS), $(TOOLS_FOR_SELINUX)) |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 36 | |
Matt Mower | 8741364 | 2017-01-17 21:14:46 -0600 | [diff] [blame] | 37 | # toolbox setenforce is used during init, so it needs to be included here |
| 38 | # symlink is omitted at the very end if busybox already provides this |
| 39 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 23; echo $$?),0) |
| 40 | OUR_TOOLS += setenforce |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 41 | endif |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 42 | |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 43 | ifeq ($(TW_USE_TOOLBOX), true) |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 44 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0) |
| 45 | # These are the only toolbox tools in M. The rest are now in toybox. |
bigbiff bigbiff | 6af36a4 | 2019-04-23 20:05:28 -0400 | [diff] [blame] | 46 | BSD_TOOLS := |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 47 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 48 | OUR_TOOLS := \ |
Ivan Kutepov | ff9d097 | 2018-03-21 23:05:39 +0300 | [diff] [blame] | 49 | newfs_msdos |
| 50 | |
| 51 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 26; echo $$?),0) |
| 52 | OUR_TOOLS += \ |
| 53 | iftop \ |
| 54 | ioctl \ |
| 55 | nandread \ |
| 56 | prlimit \ |
| 57 | sendevent \ |
| 58 | start \ |
| 59 | stop |
| 60 | endif |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 61 | |
bigbiff bigbiff | 6af36a4 | 2019-04-23 20:05:28 -0400 | [diff] [blame] | 62 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 24; echo $$?),0) |
D. Andrei Măceș | 9ce12ec | 2016-12-22 17:14:21 -0500 | [diff] [blame] | 63 | BSD_TOOLS += \ |
| 64 | dd \ |
bigbiff bigbiff | 6af36a4 | 2019-04-23 20:05:28 -0400 | [diff] [blame] | 65 | du \ |
D. Andrei Măceș | 9ce12ec | 2016-12-22 17:14:21 -0500 | [diff] [blame] | 66 | |
Hashcode | 5733215 | 2016-12-20 01:30:49 +0100 | [diff] [blame] | 67 | OUR_TOOLS += \ |
| 68 | df \ |
| 69 | ionice \ |
D. Andrei Măceș | 9ce12ec | 2016-12-22 17:14:21 -0500 | [diff] [blame] | 70 | log \ |
Hashcode | 5733215 | 2016-12-20 01:30:49 +0100 | [diff] [blame] | 71 | ls \ |
| 72 | lsof \ |
| 73 | mount \ |
D. Andrei Măceș | 9ce12ec | 2016-12-22 17:14:21 -0500 | [diff] [blame] | 74 | ps \ |
Hashcode | 5733215 | 2016-12-20 01:30:49 +0100 | [diff] [blame] | 75 | renice \ |
D. Andrei Măceș | 9ce12ec | 2016-12-22 17:14:21 -0500 | [diff] [blame] | 76 | top \ |
Hashcode | 5733215 | 2016-12-20 01:30:49 +0100 | [diff] [blame] | 77 | uptime \ |
| 78 | watchprops |
| 79 | endif |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 80 | else |
| 81 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22)) |
| 82 | OUR_TOOLS += \ |
| 83 | mknod \ |
| 84 | nohup |
| 85 | BSD_TOOLS := \ |
| 86 | cat \ |
| 87 | chown \ |
| 88 | cp \ |
| 89 | dd \ |
| 90 | du \ |
| 91 | grep \ |
| 92 | kill \ |
| 93 | ln \ |
| 94 | mv \ |
| 95 | printenv \ |
| 96 | rm \ |
| 97 | rmdir \ |
| 98 | sleep \ |
| 99 | sync |
| 100 | else |
| 101 | OUR_TOOLS += \ |
| 102 | cat \ |
| 103 | chown \ |
| 104 | dd \ |
| 105 | du \ |
| 106 | kill \ |
| 107 | ln \ |
| 108 | mv \ |
| 109 | printenv \ |
| 110 | rm \ |
| 111 | rmdir \ |
| 112 | setconsole \ |
| 113 | sleep \ |
| 114 | sync |
| 115 | endif |
| 116 | |
| 117 | OUR_TOOLS += \ |
| 118 | chmod \ |
| 119 | clear \ |
| 120 | cmp \ |
| 121 | date \ |
| 122 | df \ |
| 123 | dmesg \ |
| 124 | getevent \ |
| 125 | hd \ |
| 126 | id \ |
| 127 | ifconfig \ |
| 128 | iftop \ |
| 129 | insmod \ |
| 130 | ioctl \ |
| 131 | ionice \ |
| 132 | log \ |
| 133 | lsmod \ |
| 134 | lsof \ |
| 135 | md5 \ |
| 136 | mkdir \ |
| 137 | mkswap \ |
| 138 | mount \ |
| 139 | nandread \ |
| 140 | netstat \ |
| 141 | newfs_msdos \ |
| 142 | notify \ |
| 143 | ps \ |
| 144 | readlink \ |
| 145 | renice \ |
| 146 | rmmod \ |
| 147 | route \ |
| 148 | schedtop \ |
| 149 | sendevent \ |
| 150 | smd \ |
| 151 | swapoff \ |
| 152 | swapon \ |
| 153 | top \ |
| 154 | touch \ |
| 155 | umount \ |
| 156 | uptime \ |
| 157 | vmstat \ |
| 158 | watchprops \ |
| 159 | wipe |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 160 | endif |
Ethan Yonker | 5c93369 | 2014-04-04 11:26:32 -0500 | [diff] [blame] | 161 | endif |
| 162 | |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 163 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 27; echo $$?),0) |
| 164 | # Special rules for 9.0 |
| 165 | OUR_TOOLS += getevent |
| 166 | LOCAL_C_INCLUDES += $(TWRP_TOOLBOX_PATH) |
| 167 | LOCAL_WHOLE_STATIC_LIBRARIES += libtoolbox_dd |
bigbiff bigbiff | 6af36a4 | 2019-04-23 20:05:28 -0400 | [diff] [blame] | 168 | |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 169 | ifneq ($(TW_USE_TOOLBOX), true) |
| 170 | OUR_TOOLS += newfs_msdos |
| 171 | endif |
| 172 | endif |
| 173 | |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 174 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22)) |
| 175 | ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) |
| 176 | OUR_TOOLS += r |
| 177 | endif |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 178 | endif |
| 179 | |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 180 | LOCAL_SRC_FILES := \ |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 181 | toolbox.c \ |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 182 | $(patsubst %,%.c,$(OUR_TOOLS)) |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 183 | |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 184 | ifneq ($(wildcard system/core/toolbox/dynarray.c),) |
| 185 | LOCAL_SRC_FILES += dynarray.c |
Ethan Yonker | dc3223a | 2014-12-22 14:31:37 -0600 | [diff] [blame] | 186 | endif |
| 187 | |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 188 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22)) |
| 189 | LOCAL_SRC_FILES += \ |
| 190 | pwcache.c \ |
| 191 | upstream-netbsd/lib/libc/gen/getbsize.c \ |
| 192 | upstream-netbsd/lib/libc/gen/humanize_number.c \ |
| 193 | upstream-netbsd/lib/libc/stdlib/strsuftoll.c \ |
| 194 | upstream-netbsd/lib/libc/string/swab.c \ |
| 195 | upstream-netbsd/lib/libutil/raise_default_signal.c |
| 196 | endif |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 197 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 198 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22 23)) |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 199 | LOCAL_CFLAGS += \ |
| 200 | -std=gnu99 \ |
| 201 | -Werror -Wno-unused-parameter \ |
| 202 | -I$(LOCAL_PATH)/upstream-netbsd/include \ |
| 203 | -include bsd-compatibility.h |
| 204 | endif |
| 205 | |
| 206 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22)) |
| 207 | LOCAL_C_INCLUDES += external/openssl/include |
| 208 | else |
| 209 | LOCAL_C_INCLUDES += bionic/libc/bionic |
| 210 | endif |
Dees Troy | bb4c0cb | 2013-11-02 20:25:14 +0000 | [diff] [blame] | 211 | |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 212 | LOCAL_SHARED_LIBRARIES += libcutils |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 213 | |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 214 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22)) |
| 215 | ifeq ($(TW_USE_TOOLBOX), true) |
| 216 | LOCAL_SHARED_LIBRARIES += libcrypto |
| 217 | endif |
| 218 | else |
| 219 | LOCAL_SHARED_LIBRARIES += \ |
| 220 | libc \ |
| 221 | liblog |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 222 | endif |
| 223 | |
Matt Mower | 8741364 | 2017-01-17 21:14:46 -0600 | [diff] [blame] | 224 | LOCAL_SHARED_LIBRARIES += libselinux |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 225 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 226 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22 23)) |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 227 | # libusbhost is only used by lsusb, and that isn't usually included in toolbox. |
| 228 | # The linker strips out all the unused library code in the normal case. |
| 229 | LOCAL_STATIC_LIBRARIES := libusbhost |
| 230 | LOCAL_WHOLE_STATIC_LIBRARIES := $(patsubst %,libtoolbox_%,$(BSD_TOOLS)) |
| 231 | endif |
Ethan Yonker | bcc502c | 2014-11-10 11:22:10 -0600 | [diff] [blame] | 232 | |
D. Andrei Măceș | 9ce12ec | 2016-12-22 17:14:21 -0500 | [diff] [blame] | 233 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 22; echo $$?),0) |
Ethan Yonker | 6bb26b5 | 2016-01-10 22:26:51 -0600 | [diff] [blame] | 234 | # Rule to make getprop and setprop in M trees where toybox normally |
| 235 | # provides these tools. Toybox does not allow for easy dynamic |
| 236 | # configuration, so we would have to include the entire toybox binary |
| 237 | # which takes up more space than is necessary so long as we are still |
| 238 | # including busybox. |
D. Andrei Măceș | 9ce12ec | 2016-12-22 17:14:21 -0500 | [diff] [blame] | 239 | ifneq ($(TW_USE_TOOLBOX), true) |
Ethan Yonker | 6bb26b5 | 2016-01-10 22:26:51 -0600 | [diff] [blame] | 240 | LOCAL_SRC_FILES += \ |
D. Andrei Măceș | 9ce12ec | 2016-12-22 17:14:21 -0500 | [diff] [blame] | 241 | ../../../$(TWRP_TOOLBOX_PATH)/setprop.c \ |
| 242 | ../../../$(TWRP_TOOLBOX_PATH)/ls.c |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 243 | OUR_TOOLS += setprop |
| 244 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 28; echo $$?),0) |
| 245 | # Special rules for <= 8.1 |
| 246 | LOCAL_SRC_FILES += \ |
| 247 | ../../../$(TWRP_TOOLBOX_PATH)/getprop.c |
| 248 | OUR_TOOLS += getprop |
| 249 | endif |
D. Andrei Măceș | 9ce12ec | 2016-12-22 17:14:21 -0500 | [diff] [blame] | 250 | endif |
Ethan Yonker | 6bb26b5 | 2016-01-10 22:26:51 -0600 | [diff] [blame] | 251 | endif |
Ethan Yonker | f117962 | 2016-08-25 15:32:21 -0500 | [diff] [blame] | 252 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 23; echo $$?),0) |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 253 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -lt 28; echo $$?),0) |
Ethan Yonker | f117962 | 2016-08-25 15:32:21 -0500 | [diff] [blame] | 254 | # Rule for making start and stop in N trees |
| 255 | LOCAL_SRC_FILES += \ |
| 256 | ../../../$(TWRP_TOOLBOX_PATH)/start.c \ |
| 257 | ../../../$(TWRP_TOOLBOX_PATH)/stop.c |
| 258 | OUR_TOOLS += start stop |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 259 | endif |
| 260 | endif |
| 261 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 27; echo $$?),0) |
| 262 | LOCAL_SRC_FILES += getprop.cpp |
| 263 | LOCAL_SHARED_LIBRARIES += libbase |
| 264 | LOCAL_STATIC_LIBRARIES += libpropertyinfoparser |
| 265 | LOCAL_CPPFLAGS += -std=c++17 |
| 266 | OUR_TOOLS += getprop |
Ethan Yonker | f117962 | 2016-08-25 15:32:21 -0500 | [diff] [blame] | 267 | endif |
Ethan Yonker | 6bb26b5 | 2016-01-10 22:26:51 -0600 | [diff] [blame] | 268 | |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 269 | LOCAL_MODULE := toolbox_recovery |
| 270 | LOCAL_MODULE_STEM := toolbox |
| 271 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 272 | LOCAL_MODULE_TAGS := optional |
Ethan Yonker | 58f2132 | 2018-08-24 11:17:36 -0500 | [diff] [blame] | 273 | LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-const-variable |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 274 | |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 275 | # Including this will define $(intermediates) below |
Dees Troy | 8d66f8b | 2013-10-08 14:04:55 +0000 | [diff] [blame] | 276 | include $(BUILD_EXECUTABLE) |
| 277 | |
| 278 | $(LOCAL_PATH)/toolbox.c: $(intermediates)/tools.h |
| 279 | |
Ethan Yonker | c798c9c | 2015-10-09 11:15:26 -0500 | [diff] [blame] | 280 | ifneq (,$(filter $(PLATFORM_SDK_VERSION), 21 22 23)) |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 281 | ALL_TOOLS := $(BSD_TOOLS) $(OUR_TOOLS) |
| 282 | else |
| 283 | ALL_TOOLS := $(OUR_TOOLS) |
| 284 | endif |
| 285 | |
Andrea Mennillo | 7d66ce5 | 2015-03-17 15:39:27 +0100 | [diff] [blame] | 286 | TOOLS_H := $(intermediates)/tools.h |
| 287 | $(TOOLS_H): PRIVATE_TOOLS := $(ALL_TOOLS) |
| 288 | $(TOOLS_H): PRIVATE_CUSTOM_TOOL = echo "/* file generated automatically */" > $@ ; for t in $(PRIVATE_TOOLS) ; do echo "TOOL($$t)" >> $@ ; done |
Andrea Mennillo | 7d66ce5 | 2015-03-17 15:39:27 +0100 | [diff] [blame] | 289 | $(TOOLS_H): |
| 290 | $(transform-generated-source) |
| 291 | |
lambdadroid | ead0f49 | 2019-05-12 11:48:04 +0200 | [diff] [blame^] | 292 | # toolbox setenforce is used during init in non-symlink form, so it was |
| 293 | # required to be included as part of the suite above. if busybox already |
| 294 | # provides setenforce, we can omit the toolbox symlink |
| 295 | TEMP_TOOLS := $(filter-out $(RECOVERY_BUSYBOX_TOOLS), $(ALL_TOOLS)) |
| 296 | ALL_TOOLS := $(TEMP_TOOLS) |
| 297 | |
| 298 | # Make /sbin/toolbox launchers for each tool |
| 299 | SYMLINKS := $(addprefix $(TARGET_RECOVERY_ROOT_OUT)/sbin/,$(ALL_TOOLS)) |
| 300 | $(SYMLINKS): TOOLBOX_BINARY := $(LOCAL_MODULE_STEM) |
| 301 | $(SYMLINKS): $(LOCAL_INSTALLED_MODULE) |
| 302 | @echo "Symlink: $@ -> $(TOOLBOX_BINARY)" |
| 303 | @mkdir -p $(dir $@) |
| 304 | @rm -rf $@ |
| 305 | $(hide) ln -sf $(TOOLBOX_BINARY) $@ |
| 306 | |
| 307 | include $(CLEAR_VARS) |
| 308 | LOCAL_MODULE := toolbox_symlinks |
| 309 | LOCAL_MODULE_TAGS := optional |
| 310 | LOCAL_ADDITIONAL_DEPENDENCIES := $(SYMLINKS) |
| 311 | include $(BUILD_PHONY_PACKAGE) |
| 312 | |
| 313 | ifneq (,$(filter $(PLATFORM_SDK_VERSION),16 17 18)) |
| 314 | # Only needed if the build system lacks support for LOCAL_ADDITIONAL_DEPENDENCIES |
| 315 | ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) |
| 316 | ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ |
| 317 | $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) |
| 318 | endif |
bigbiff bigbiff | 6af36a4 | 2019-04-23 20:05:28 -0400 | [diff] [blame] | 319 | |
| 320 | ifeq ($(TW_USE_TOOLBOX), true) |
| 321 | ifeq ($(shell test $(PLATFORM_SDK_VERSION) -gt 23; echo $$?),0) |
| 322 | include $(CLEAR_VARS) |
| 323 | LOCAL_MODULE := dd_twrp |
| 324 | LOCAL_MODULE_STEM := dd |
| 325 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
| 326 | LOCAL_MODULE_TAGS := optional |
| 327 | LOCAL_CFLAGS := -include bsd-compatibility.h -DNO_CONV -Wno-unused-parameter |
| 328 | LOCAL_C_INCLUDES := system/core/toolbox/upstream-netbsd/include/ system/core/toolbox/upstream-netbsd/bin/dd system/core/toolbox |
| 329 | |
| 330 | LOCAL_SHARED_LIBRARIES := \ |
| 331 | libcutils \ |
| 332 | |
| 333 | LOCAL_SRC_FILES += \ |
| 334 | upstream-netbsd/bin/dd/args.c \ |
| 335 | upstream-netbsd/bin/dd/conv.c \ |
| 336 | upstream-netbsd/bin/dd/dd.c \ |
| 337 | upstream-netbsd/bin/dd/dd_hostops.c \ |
| 338 | upstream-netbsd/bin/dd/misc.c \ |
| 339 | upstream-netbsd/bin/dd/position.c \ |
| 340 | upstream-netbsd/lib/libc/gen/getbsize.c \ |
| 341 | upstream-netbsd/lib/libc/gen/humanize_number.c \ |
| 342 | upstream-netbsd/lib/libc/stdlib/strsuftoll.c \ |
| 343 | upstream-netbsd/lib/libc/string/swab.c \ |
| 344 | upstream-netbsd/lib/libutil/raise_default_signal.c |
| 345 | |
| 346 | include $(BUILD_EXECUTABLE) |
| 347 | endif |
| 348 | endif |
| 349 | |
Ethan Yonker | 75bf041 | 2014-11-21 13:54:27 -0600 | [diff] [blame] | 350 | SYMLINKS := |
Matt Mower | 92084af | 2015-02-19 13:19:47 -0600 | [diff] [blame] | 351 | ALL_TOOLS := |
| 352 | BSD_TOOLS := |
| 353 | OUR_TOOLS := |
| 354 | TEMP_TOOLS := |
| 355 | TOOLS_FOR_SELINUX := |