Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2014 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | LOCAL_PATH := $(call my-dir) |
| 18 | |
| 19 | # |
Elliott Hughes | d3633b1 | 2017-08-03 14:52:32 -0700 | [diff] [blame] | 20 | # To sync with upstream: |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 21 | # |
| 22 | |
Elliott Hughes | d3633b1 | 2017-08-03 14:52:32 -0700 | [diff] [blame] | 23 | # # Update. |
Elliott Hughes | a67bfec | 2015-04-05 10:14:19 -0700 | [diff] [blame] | 24 | # git remote add toybox https://github.com/landley/toybox.git |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 25 | # git fetch toybox |
| 26 | # git merge toybox/master |
Elliott Hughes | d3633b1 | 2017-08-03 14:52:32 -0700 | [diff] [blame] | 27 | |
| 28 | # # Regenerate generated files. |
| 29 | # make |
| 30 | |
| 31 | # # Make any necessary Android.mk changes and rebuild. |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 32 | # mm -j32 |
Elliott Hughes | d3633b1 | 2017-08-03 14:52:32 -0700 | [diff] [blame] | 33 | |
| 34 | # # Run tests. |
| 35 | # ./run-tests-on-android.sh |
| 36 | # # Run a single test. |
| 37 | # ./run-tests-on-android.sh wc |
| 38 | |
| 39 | # # Upload changes. |
| 40 | # git commit -a --amend |
Elliott Hughes | a729fc8 | 2016-01-20 20:41:02 -0800 | [diff] [blame] | 41 | # git push aosp HEAD:refs/for/master # Push to gerrit for review. |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 42 | # git push aosp HEAD:master # Push directly, avoiding gerrit. |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 43 | |
| 44 | |
Elliott Hughes | 361d6ab | 2015-03-13 14:49:52 -0700 | [diff] [blame] | 45 | # |
| 46 | # To add a toy: |
| 47 | # |
| 48 | |
Elliott Hughes | f6453fe | 2016-06-13 18:52:28 -0700 | [diff] [blame] | 49 | # Edit .config to enable the toy you want to add. |
Elliott Hughes | 361d6ab | 2015-03-13 14:49:52 -0700 | [diff] [blame] | 50 | # make clean && make # Regenerate the generated files. |
| 51 | # # Edit LOCAL_SRC_FILES below to add the toy. |
| 52 | # # If you just want to use it as "toybox x" rather than "x", you can stop now. |
| 53 | # # If you want this toy to have a symbolic link in /system/bin, add the toy to ALL_TOOLS. |
| 54 | |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 55 | common_SRC_FILES := \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 56 | lib/args.c \ |
| 57 | lib/dirtree.c \ |
| 58 | lib/getmountlist.c \ |
| 59 | lib/help.c \ |
Elliott Hughes | 584c654 | 2015-05-15 16:26:09 -0700 | [diff] [blame] | 60 | lib/interestingtimes.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 61 | lib/lib.c \ |
Elliott Hughes | a729fc8 | 2016-01-20 20:41:02 -0800 | [diff] [blame] | 62 | lib/linestack.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 63 | lib/llist.c \ |
| 64 | lib/net.c \ |
| 65 | lib/portability.c \ |
| 66 | lib/xwrap.c \ |
| 67 | main.c \ |
Elliott Hughes | 0e6551a | 2015-03-28 12:49:31 -0700 | [diff] [blame] | 68 | toys/android/getenforce.c \ |
| 69 | toys/android/load_policy.c \ |
Elliott Hughes | 0803f53 | 2016-06-22 10:26:11 -0700 | [diff] [blame] | 70 | toys/android/log.c \ |
Elliott Hughes | e0953ac | 2015-04-07 14:51:26 -0700 | [diff] [blame] | 71 | toys/android/restorecon.c \ |
Elliott Hughes | cfbb8c1 | 2015-03-23 17:53:47 -0700 | [diff] [blame] | 72 | toys/android/runcon.c \ |
Elliott Hughes | a126e5f | 2016-07-15 10:14:33 -0700 | [diff] [blame] | 73 | toys/android/sendevent.c \ |
Elliott Hughes | 0e6551a | 2015-03-28 12:49:31 -0700 | [diff] [blame] | 74 | toys/android/setenforce.c \ |
Elliott Hughes | 4b39d13 | 2015-04-07 17:42:12 -0700 | [diff] [blame] | 75 | toys/android/setprop.c \ |
Elliott Hughes | 06b90e3 | 2016-06-28 14:20:54 -0700 | [diff] [blame] | 76 | toys/android/start.c \ |
Elliott Hughes | f353b24 | 2017-06-19 12:47:01 -0700 | [diff] [blame] | 77 | toys/lsb/dmesg.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 78 | toys/lsb/hostname.c \ |
| 79 | toys/lsb/killall.c \ |
| 80 | toys/lsb/md5sum.c \ |
| 81 | toys/lsb/mknod.c \ |
| 82 | toys/lsb/mktemp.c \ |
| 83 | toys/lsb/mount.c \ |
| 84 | toys/lsb/pidof.c \ |
| 85 | toys/lsb/seq.c \ |
| 86 | toys/lsb/sync.c \ |
| 87 | toys/lsb/umount.c \ |
Elliott Hughes | e7b74ae | 2016-07-07 17:02:37 -0700 | [diff] [blame] | 88 | toys/net/ifconfig.c \ |
Elliott Hughes | cae4495 | 2017-01-25 20:07:12 -0800 | [diff] [blame] | 89 | toys/net/microcom.c \ |
Elliott Hughes | e7b74ae | 2016-07-07 17:02:37 -0700 | [diff] [blame] | 90 | toys/net/netcat.c \ |
| 91 | toys/net/netstat.c \ |
| 92 | toys/net/rfkill.c \ |
Elliott Hughes | 5d83f7a | 2016-08-29 08:26:36 -0700 | [diff] [blame] | 93 | toys/net/tunctl.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 94 | toys/other/acpi.c \ |
Elliott Hughes | 1486223 | 2014-12-18 17:55:47 -0800 | [diff] [blame] | 95 | toys/other/base64.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 96 | toys/other/blkid.c \ |
| 97 | toys/other/blockdev.c \ |
Elliott Hughes | bf65a2e | 2015-02-09 12:14:46 -0800 | [diff] [blame] | 98 | toys/other/chcon.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 99 | toys/other/chroot.c \ |
Elliott Hughes | 3233e2f | 2017-05-25 14:16:21 -0700 | [diff] [blame] | 100 | toys/other/chrt.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 101 | toys/other/clear.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 102 | toys/other/dos2unix.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 103 | toys/other/fallocate.c \ |
Elliott Hughes | 0cad3b1 | 2015-10-06 14:31:35 -0700 | [diff] [blame] | 104 | toys/other/flock.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 105 | toys/other/free.c \ |
| 106 | toys/other/freeramdisk.c \ |
| 107 | toys/other/fsfreeze.c \ |
| 108 | toys/other/help.c \ |
Elliott Hughes | 718f34d | 2015-07-10 18:02:00 -0700 | [diff] [blame] | 109 | toys/other/hwclock.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 110 | toys/other/inotifyd.c \ |
| 111 | toys/other/insmod.c \ |
Elliott Hughes | e3764cc | 2015-07-06 18:09:49 -0700 | [diff] [blame] | 112 | toys/other/ionice.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 113 | toys/other/losetup.c \ |
| 114 | toys/other/lsattr.c \ |
| 115 | toys/other/lsmod.c \ |
Dmitry Shmidt | 1014fe7 | 2017-05-30 15:25:12 -0700 | [diff] [blame] | 116 | toys/other/lspci.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 117 | toys/other/lsusb.c \ |
| 118 | toys/other/makedevs.c \ |
| 119 | toys/other/mkswap.c \ |
| 120 | toys/other/modinfo.c \ |
| 121 | toys/other/mountpoint.c \ |
| 122 | toys/other/nbd_client.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 123 | toys/other/partprobe.c \ |
| 124 | toys/other/pivot_root.c \ |
| 125 | toys/other/pmap.c \ |
| 126 | toys/other/printenv.c \ |
| 127 | toys/other/pwdx.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 128 | toys/other/readlink.c \ |
| 129 | toys/other/realpath.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 130 | toys/other/rev.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 131 | toys/other/rmmod.c \ |
Elliott Hughes | af478b7 | 2018-01-22 12:56:47 -0800 | [diff] [blame] | 132 | toys/other/setfattr.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 133 | toys/other/setsid.c \ |
| 134 | toys/other/stat.c \ |
| 135 | toys/other/swapoff.c \ |
| 136 | toys/other/swapon.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 137 | toys/other/sysctl.c \ |
| 138 | toys/other/tac.c \ |
| 139 | toys/other/taskset.c \ |
| 140 | toys/other/timeout.c \ |
| 141 | toys/other/truncate.c \ |
Elliott Hughes | 6864061 | 2015-08-17 11:13:01 -0700 | [diff] [blame] | 142 | toys/other/uptime.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 143 | toys/other/usleep.c \ |
| 144 | toys/other/vconfig.c \ |
| 145 | toys/other/vmstat.c \ |
| 146 | toys/other/which.c \ |
Elliott Hughes | e3764cc | 2015-07-06 18:09:49 -0700 | [diff] [blame] | 147 | toys/other/xxd.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 148 | toys/other/yes.c \ |
Elliott Hughes | 3c3e83a | 2014-12-16 20:18:05 -0800 | [diff] [blame] | 149 | toys/pending/dd.c \ |
Elliott Hughes | 98aae74 | 2017-04-01 09:18:14 -0700 | [diff] [blame] | 150 | toys/pending/diff.c \ |
Elliott Hughes | 88db412 | 2015-02-18 17:32:09 -0800 | [diff] [blame] | 151 | toys/pending/expr.c \ |
Elliott Hughes | af478b7 | 2018-01-22 12:56:47 -0800 | [diff] [blame] | 152 | toys/pending/fmt.c \ |
Elliott Hughes | a1ce46b | 2016-08-02 09:08:31 -0700 | [diff] [blame] | 153 | toys/pending/getfattr.c \ |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 154 | toys/pending/gzip.c \ |
Elliott Hughes | ecd3df9 | 2015-09-11 10:50:35 -0700 | [diff] [blame] | 155 | toys/pending/lsof.c \ |
Sandeep Patil | 488b539 | 2016-12-06 21:21:58 -0800 | [diff] [blame] | 156 | toys/pending/modprobe.c \ |
Elliott Hughes | 53a43da | 2014-12-11 17:05:54 -0800 | [diff] [blame] | 157 | toys/pending/more.c \ |
Elliott Hughes | b4d75fd | 2017-12-04 10:10:29 -0800 | [diff] [blame] | 158 | toys/pending/stty.c \ |
Elliott Hughes | 88db412 | 2015-02-18 17:32:09 -0800 | [diff] [blame] | 159 | toys/pending/tar.c \ |
Elliott Hughes | 347e42b | 2015-01-13 18:45:44 -0800 | [diff] [blame] | 160 | toys/pending/tr.c \ |
Elliott Hughes | 3c3e83a | 2014-12-16 20:18:05 -0800 | [diff] [blame] | 161 | toys/pending/traceroute.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 162 | toys/posix/basename.c \ |
| 163 | toys/posix/cal.c \ |
| 164 | toys/posix/cat.c \ |
| 165 | toys/posix/chgrp.c \ |
| 166 | toys/posix/chmod.c \ |
| 167 | toys/posix/cksum.c \ |
| 168 | toys/posix/cmp.c \ |
| 169 | toys/posix/comm.c \ |
| 170 | toys/posix/cp.c \ |
Elliott Hughes | bfa8d06 | 2015-02-05 10:02:55 -0800 | [diff] [blame] | 171 | toys/posix/cpio.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 172 | toys/posix/cut.c \ |
| 173 | toys/posix/date.c \ |
| 174 | toys/posix/df.c \ |
| 175 | toys/posix/dirname.c \ |
| 176 | toys/posix/du.c \ |
| 177 | toys/posix/echo.c \ |
| 178 | toys/posix/env.c \ |
| 179 | toys/posix/expand.c \ |
| 180 | toys/posix/false.c \ |
Elliott Hughes | f3304b3 | 2016-07-08 10:19:23 -0700 | [diff] [blame] | 181 | toys/posix/file.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 182 | toys/posix/find.c \ |
| 183 | toys/posix/grep.c \ |
| 184 | toys/posix/head.c \ |
| 185 | toys/posix/id.c \ |
| 186 | toys/posix/kill.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 187 | toys/posix/ln.c \ |
| 188 | toys/posix/ls.c \ |
| 189 | toys/posix/mkdir.c \ |
| 190 | toys/posix/mkfifo.c \ |
| 191 | toys/posix/nice.c \ |
| 192 | toys/posix/nl.c \ |
| 193 | toys/posix/nohup.c \ |
| 194 | toys/posix/od.c \ |
| 195 | toys/posix/paste.c \ |
| 196 | toys/posix/patch.c \ |
Elliott Hughes | 0e6551a | 2015-03-28 12:49:31 -0700 | [diff] [blame] | 197 | toys/posix/printf.c \ |
Elliott Hughes | b131803 | 2015-10-30 13:24:56 -0700 | [diff] [blame] | 198 | toys/posix/ps.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 199 | toys/posix/pwd.c \ |
| 200 | toys/posix/renice.c \ |
| 201 | toys/posix/rm.c \ |
| 202 | toys/posix/rmdir.c \ |
Elliott Hughes | 347e42b | 2015-01-13 18:45:44 -0800 | [diff] [blame] | 203 | toys/posix/sed.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 204 | toys/posix/sleep.c \ |
| 205 | toys/posix/sort.c \ |
| 206 | toys/posix/split.c \ |
| 207 | toys/posix/strings.c \ |
| 208 | toys/posix/tail.c \ |
| 209 | toys/posix/tee.c \ |
| 210 | toys/posix/time.c \ |
| 211 | toys/posix/touch.c \ |
| 212 | toys/posix/true.c \ |
| 213 | toys/posix/tty.c \ |
Elliott Hughes | 5922435 | 2016-02-11 19:37:05 -0800 | [diff] [blame] | 214 | toys/posix/ulimit.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 215 | toys/posix/uname.c \ |
| 216 | toys/posix/uniq.c \ |
Elliott Hughes | eacb349 | 2016-10-04 09:27:25 -0700 | [diff] [blame] | 217 | toys/posix/uudecode.c \ |
| 218 | toys/posix/uuencode.c \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 219 | toys/posix/wc.c \ |
| 220 | toys/posix/xargs.c \ |
| 221 | |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 222 | common_CFLAGS := \ |
Elliott Hughes | f37062b | 2017-09-13 23:25:38 -0700 | [diff] [blame] | 223 | -std=gnu11 \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 224 | -Os \ |
Chih-Hung Hsieh | 0eb514a | 2017-10-11 14:24:08 -0700 | [diff] [blame] | 225 | -Wall -Werror \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 226 | -Wno-char-subscripts \ |
Elliott Hughes | 3233e2f | 2017-05-25 14:16:21 -0700 | [diff] [blame] | 227 | -Wno-gnu-variable-sized-type-not-at-end \ |
| 228 | -Wno-missing-field-initializers \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 229 | -Wno-sign-compare \ |
Elliott Hughes | 0e6551a | 2015-03-28 12:49:31 -0700 | [diff] [blame] | 230 | -Wno-string-plus-int \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 231 | -Wno-uninitialized \ |
| 232 | -Wno-unused-parameter \ |
Elliott Hughes | d353398 | 2015-01-15 15:04:19 -0800 | [diff] [blame] | 233 | -funsigned-char \ |
| 234 | -ffunction-sections -fdata-sections \ |
| 235 | -fno-asynchronous-unwind-tables \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 236 | |
Jeffrey Vander Stoep | cf90d7e | 2017-07-10 06:19:45 +0000 | [diff] [blame] | 237 | toybox_libraries := liblog libselinux libcutils libcrypto libz |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 238 | |
Elliott Hughes | cb633d4 | 2017-10-22 22:56:36 -0700 | [diff] [blame] | 239 | common_CFLAGS += -DTOYBOX_VENDOR=\"-android\" |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 240 | |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 241 | # not usable on Android?: freeramdisk fsfreeze install makedevs nbd-client |
| 242 | # partprobe pivot_root pwdx rev rfkill vconfig |
| 243 | # currently prefer BSD system/core/toolbox: dd |
| 244 | # currently prefer BSD external/netcat: nc netcat |
| 245 | # currently prefer external/efs2progs: blkid chattr lsattr |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 246 | |
| 247 | ALL_TOOLS := \ |
| 248 | acpi \ |
Elliott Hughes | 1846513 | 2015-08-18 09:57:45 -0700 | [diff] [blame] | 249 | base64 \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 250 | basename \ |
| 251 | blockdev \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 252 | cal \ |
Elliott Hughes | 1e0e5ea | 2015-01-14 10:40:22 -0800 | [diff] [blame] | 253 | cat \ |
Elliott Hughes | 7611563 | 2014-12-16 09:14:47 -0800 | [diff] [blame] | 254 | chcon \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 255 | chgrp \ |
Elliott Hughes | 5c7cca0 | 2014-12-11 12:12:59 -0800 | [diff] [blame] | 256 | chmod \ |
Elliott Hughes | 6ee70fc | 2015-01-15 13:41:34 -0800 | [diff] [blame] | 257 | chown \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 258 | chroot \ |
Elliott Hughes | 0f7f3a5 | 2016-08-29 09:07:38 -0700 | [diff] [blame] | 259 | chrt \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 260 | cksum \ |
Elliott Hughes | 03275a8 | 2014-11-22 22:56:47 -0800 | [diff] [blame] | 261 | clear \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 262 | comm \ |
Elliott Hughes | d353398 | 2015-01-15 15:04:19 -0800 | [diff] [blame] | 263 | cmp \ |
Elliott Hughes | 6b4d05c | 2014-12-16 16:15:47 -0800 | [diff] [blame] | 264 | cp \ |
Elliott Hughes | bfa8d06 | 2015-02-05 10:02:55 -0800 | [diff] [blame] | 265 | cpio \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 266 | cut \ |
Elliott Hughes | 9aaeff3 | 2015-01-14 12:26:10 -0800 | [diff] [blame] | 267 | date \ |
Elliott Hughes | 578e628 | 2015-10-23 11:10:39 -0700 | [diff] [blame] | 268 | df \ |
Elliott Hughes | 98aae74 | 2017-04-01 09:18:14 -0700 | [diff] [blame] | 269 | diff \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 270 | dirname \ |
Elliott Hughes | c99e20b | 2014-11-26 11:38:43 -0800 | [diff] [blame] | 271 | dmesg \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 272 | dos2unix \ |
Elliott Hughes | 4dc6296 | 2015-09-14 10:39:33 -0700 | [diff] [blame] | 273 | du \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 274 | echo \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 275 | env \ |
| 276 | expand \ |
Elliott Hughes | 88db412 | 2015-02-18 17:32:09 -0800 | [diff] [blame] | 277 | expr \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 278 | fallocate \ |
Elliott Hughes | 03275a8 | 2014-11-22 22:56:47 -0800 | [diff] [blame] | 279 | false \ |
Elliott Hughes | f3304b3 | 2016-07-08 10:19:23 -0700 | [diff] [blame] | 280 | file \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 281 | find \ |
Elliott Hughes | 0cad3b1 | 2015-10-06 14:31:35 -0700 | [diff] [blame] | 282 | flock \ |
Elliott Hughes | af478b7 | 2018-01-22 12:56:47 -0800 | [diff] [blame] | 283 | fmt \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 284 | free \ |
Elliott Hughes | 9250c95 | 2014-12-24 11:29:44 -0800 | [diff] [blame] | 285 | getenforce \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 286 | groups \ |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 287 | gunzip \ |
| 288 | gzip \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 289 | head \ |
| 290 | hostname \ |
Elliott Hughes | 9aaeff3 | 2015-01-14 12:26:10 -0800 | [diff] [blame] | 291 | hwclock \ |
Elliott Hughes | c8fa5ee | 2015-01-16 19:27:31 -0800 | [diff] [blame] | 292 | id \ |
Elliott Hughes | 4f060a3 | 2015-01-14 11:07:28 -0800 | [diff] [blame] | 293 | ifconfig \ |
Elliott Hughes | 123aecf | 2015-01-14 11:00:47 -0800 | [diff] [blame] | 294 | inotifyd \ |
Elliott Hughes | 6a646ef | 2014-11-24 11:41:35 -0800 | [diff] [blame] | 295 | insmod \ |
Elliott Hughes | a53c8ff | 2015-08-14 15:55:40 -0700 | [diff] [blame] | 296 | ionice \ |
| 297 | iorenice \ |
Elliott Hughes | 95211ea | 2014-12-04 20:09:44 -0800 | [diff] [blame] | 298 | kill \ |
Josh Gao | 53a1aa3 | 2015-12-22 11:34:57 -0800 | [diff] [blame] | 299 | killall \ |
Elliott Hughes | 0e6551a | 2015-03-28 12:49:31 -0700 | [diff] [blame] | 300 | load_policy \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 301 | ln \ |
Elliott Hughes | f74df03 | 2016-06-22 12:25:11 -0700 | [diff] [blame] | 302 | log \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 303 | logname \ |
| 304 | losetup \ |
Elliott Hughes | 2e72007 | 2015-08-31 12:43:59 -0700 | [diff] [blame] | 305 | ls \ |
Elliott Hughes | 6a646ef | 2014-11-24 11:41:35 -0800 | [diff] [blame] | 306 | lsmod \ |
Elliott Hughes | 7753843 | 2015-09-11 10:57:33 -0700 | [diff] [blame] | 307 | lsof \ |
Dmitry Shmidt | 1014fe7 | 2017-05-30 15:25:12 -0700 | [diff] [blame] | 308 | lspci \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 309 | lsusb \ |
| 310 | md5sum \ |
Elliott Hughes | d13bf6a | 2014-12-16 15:17:17 -0800 | [diff] [blame] | 311 | mkdir \ |
Elliott Hughes | 86537b3 | 2017-05-02 17:26:30 -0700 | [diff] [blame] | 312 | mkfifo \ |
Elliott Hughes | 0a0435c | 2014-12-11 18:34:09 -0800 | [diff] [blame] | 313 | mknod \ |
Elliott Hughes | 620bc1a | 2014-11-24 16:12:40 -0800 | [diff] [blame] | 314 | mkswap \ |
Elliott Hughes | 79984b4 | 2015-02-09 12:16:39 -0800 | [diff] [blame] | 315 | mktemp \ |
Elliott Hughes | 7a49753 | 2017-01-15 11:24:30 -0800 | [diff] [blame] | 316 | microcom \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 317 | modinfo \ |
Sandeep Patil | 488b539 | 2016-12-06 21:21:58 -0800 | [diff] [blame] | 318 | modprobe \ |
Elliott Hughes | 53a43da | 2014-12-11 17:05:54 -0800 | [diff] [blame] | 319 | more \ |
Elliott Hughes | 0e7e9a1 | 2015-06-08 14:52:58 -0700 | [diff] [blame] | 320 | mount \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 321 | mountpoint \ |
Elliott Hughes | dbcacc6 | 2014-12-16 19:18:43 -0800 | [diff] [blame] | 322 | mv \ |
Elliott Hughes | 5f9893b | 2014-12-23 09:12:18 -0800 | [diff] [blame] | 323 | netstat \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 324 | nice \ |
| 325 | nl \ |
Elliott Hughes | 9f98941 | 2014-11-25 17:00:40 -0800 | [diff] [blame] | 326 | nohup \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 327 | od \ |
| 328 | paste \ |
| 329 | patch \ |
Elliott Hughes | 5d2ad23 | 2015-03-19 22:52:46 -0700 | [diff] [blame] | 330 | pgrep \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 331 | pidof \ |
Elliott Hughes | 5d2ad23 | 2015-03-19 22:52:46 -0700 | [diff] [blame] | 332 | pkill \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 333 | pmap \ |
Elliott Hughes | 68e18cd | 2014-11-24 15:36:51 -0800 | [diff] [blame] | 334 | printenv \ |
Elliott Hughes | 0e6551a | 2015-03-28 12:49:31 -0700 | [diff] [blame] | 335 | printf \ |
Elliott Hughes | 782aced | 2016-05-04 15:18:27 -0700 | [diff] [blame] | 336 | ps \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 337 | pwd \ |
Elliott Hughes | 8f7bc7a | 2014-11-26 15:21:03 -0800 | [diff] [blame] | 338 | readlink \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 339 | realpath \ |
Elliott Hughes | a53c8ff | 2015-08-14 15:55:40 -0700 | [diff] [blame] | 340 | renice \ |
Elliott Hughes | e0953ac | 2015-04-07 14:51:26 -0700 | [diff] [blame] | 341 | restorecon \ |
Elliott Hughes | f5275f9 | 2014-12-16 16:22:32 -0800 | [diff] [blame] | 342 | rm \ |
Elliott Hughes | d4a6d66 | 2014-12-16 15:26:53 -0800 | [diff] [blame] | 343 | rmdir \ |
Elliott Hughes | 6a646ef | 2014-11-24 11:41:35 -0800 | [diff] [blame] | 344 | rmmod \ |
Elliott Hughes | cfbb8c1 | 2015-03-23 17:53:47 -0700 | [diff] [blame] | 345 | runcon \ |
Elliott Hughes | 347e42b | 2015-01-13 18:45:44 -0800 | [diff] [blame] | 346 | sed \ |
Elliott Hughes | 75681dc | 2016-07-15 14:19:07 -0700 | [diff] [blame] | 347 | sendevent \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 348 | seq \ |
Elliott Hughes | 9250c95 | 2014-12-24 11:29:44 -0800 | [diff] [blame] | 349 | setenforce \ |
Elliott Hughes | 176eae9 | 2015-04-07 20:36:38 -0700 | [diff] [blame] | 350 | setprop \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 351 | setsid \ |
| 352 | sha1sum \ |
Elliott Hughes | 63ca146 | 2016-07-15 16:31:22 -0700 | [diff] [blame] | 353 | sha224sum \ |
| 354 | sha256sum \ |
| 355 | sha384sum \ |
| 356 | sha512sum \ |
Elliott Hughes | 62cf8d6 | 2014-11-24 15:23:04 -0800 | [diff] [blame] | 357 | sleep \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 358 | sort \ |
| 359 | split \ |
Elliott Hughes | ba38a43 | 2016-06-29 11:45:39 -0700 | [diff] [blame] | 360 | start \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 361 | stat \ |
Elliott Hughes | ba38a43 | 2016-06-29 11:45:39 -0700 | [diff] [blame] | 362 | stop \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 363 | strings \ |
Elliott Hughes | b4d75fd | 2017-12-04 10:10:29 -0800 | [diff] [blame] | 364 | stty \ |
Elliott Hughes | 620bc1a | 2014-11-24 16:12:40 -0800 | [diff] [blame] | 365 | swapoff \ |
| 366 | swapon \ |
Elliott Hughes | 8536828 | 2014-11-24 14:53:36 -0800 | [diff] [blame] | 367 | sync \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 368 | sysctl \ |
| 369 | tac \ |
| 370 | tail \ |
Elliott Hughes | 88db412 | 2015-02-18 17:32:09 -0800 | [diff] [blame] | 371 | tar \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 372 | taskset \ |
| 373 | tee \ |
| 374 | time \ |
| 375 | timeout \ |
Elliott Hughes | f6453fe | 2016-06-13 18:52:28 -0700 | [diff] [blame] | 376 | top \ |
Elliott Hughes | 5eec03a | 2015-02-09 14:09:49 -0800 | [diff] [blame] | 377 | touch \ |
Elliott Hughes | 347e42b | 2015-01-13 18:45:44 -0800 | [diff] [blame] | 378 | tr \ |
Elliott Hughes | 03275a8 | 2014-11-22 22:56:47 -0800 | [diff] [blame] | 379 | true \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 380 | truncate \ |
Elliott Hughes | 6f52fbc | 2015-05-31 10:02:48 -0700 | [diff] [blame] | 381 | tty \ |
Elliott Hughes | 5922435 | 2016-02-11 19:37:05 -0800 | [diff] [blame] | 382 | ulimit \ |
Elliott Hughes | cc6fc17 | 2015-04-02 21:27:05 -0700 | [diff] [blame] | 383 | umount \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 384 | uname \ |
| 385 | uniq \ |
| 386 | unix2dos \ |
Elliott Hughes | 6864061 | 2015-08-17 11:13:01 -0700 | [diff] [blame] | 387 | uptime \ |
Elliott Hughes | 10bd49e | 2014-11-21 14:53:43 -0800 | [diff] [blame] | 388 | usleep \ |
Elliott Hughes | eacb349 | 2016-10-04 09:27:25 -0700 | [diff] [blame] | 389 | uudecode \ |
| 390 | uuencode \ |
Elliott Hughes | 2080060 | 2014-11-25 17:25:05 -0800 | [diff] [blame] | 391 | vmstat \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 392 | wc \ |
| 393 | which \ |
| 394 | whoami \ |
| 395 | xargs \ |
Elliott Hughes | dce8d62 | 2015-07-17 11:17:39 -0700 | [diff] [blame] | 396 | xxd \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 397 | yes \ |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 398 | zcat \ |
Elliott Hughes | d8d2d3c | 2014-11-20 10:39:27 -0800 | [diff] [blame] | 399 | |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 400 | ############################################ |
| 401 | # toybox for /system |
| 402 | ############################################ |
| 403 | |
| 404 | include $(CLEAR_VARS) |
| 405 | LOCAL_MODULE := toybox |
| 406 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 407 | LOCAL_CFLAGS := $(common_CFLAGS) |
| 408 | LOCAL_SHARED_LIBRARIES := $(toybox_libraries) |
| 409 | # This doesn't actually prevent us from dragging in libc++ at runtime |
| 410 | # because libnetd_client.so is C++. |
| 411 | LOCAL_CXX_STL := none |
Ying Wang | 331b22d | 2014-11-24 12:42:09 -0800 | [diff] [blame] | 412 | LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf toybox $(TARGET_OUT)/bin/$(t);) |
Ying Wang | 331b22d | 2014-11-24 12:42:09 -0800 | [diff] [blame] | 413 | include $(BUILD_EXECUTABLE) |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 414 | |
Sandeep Patil | 2b69f38 | 2017-04-12 14:53:55 -0700 | [diff] [blame] | 415 | ############################################ |
Yifan Hong | 2211432 | 2017-07-13 00:56:30 +0000 | [diff] [blame] | 416 | # toybox for /vendor |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 417 | ############################################ |
| 418 | |
Sandeep Patil | 2b69f38 | 2017-04-12 14:53:55 -0700 | [diff] [blame] | 419 | include $(CLEAR_VARS) |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 420 | LOCAL_MODULE := toybox_vendor |
| 421 | LOCAL_VENDOR_MODULE := true |
Sandeep Patil | 2b69f38 | 2017-04-12 14:53:55 -0700 | [diff] [blame] | 422 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
Sandeep Patil | 2b69f38 | 2017-04-12 14:53:55 -0700 | [diff] [blame] | 423 | LOCAL_CFLAGS := $(common_CFLAGS) |
Yifan Hong | 2211432 | 2017-07-13 00:56:30 +0000 | [diff] [blame] | 424 | LOCAL_STATIC_LIBRARIES := libcutils libcrypto libz |
Jiyong Park | 61be2f8 | 2017-10-13 09:18:10 +0900 | [diff] [blame] | 425 | LOCAL_SHARED_LIBRARIES := libselinux liblog |
Sandeep Patil | 2b69f38 | 2017-04-12 14:53:55 -0700 | [diff] [blame] | 426 | LOCAL_MODULE_TAGS := optional |
Sandeep Patil | 2b69f38 | 2017-04-12 14:53:55 -0700 | [diff] [blame] | 427 | LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf ${LOCAL_MODULE} $(TARGET_OUT_VENDOR_EXECUTABLES)/$(t);) |
Sandeep Patil | 2b69f38 | 2017-04-12 14:53:55 -0700 | [diff] [blame] | 428 | include $(BUILD_EXECUTABLE) |
Sandeep Patil | 2b69f38 | 2017-04-12 14:53:55 -0700 | [diff] [blame] | 429 | |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 430 | ############################################ |
| 431 | # static version to be installed in recovery |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 432 | ############################################ |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 433 | |
| 434 | include $(CLEAR_VARS) |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 435 | LOCAL_MODULE := toybox_static |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 436 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 437 | LOCAL_CFLAGS := $(common_CFLAGS) |
Elliott Hughes | 429b7a3 | 2017-05-03 22:53:47 -0700 | [diff] [blame] | 438 | LOCAL_STATIC_LIBRARIES := $(toybox_libraries) |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 439 | # libc++_static is needed by static liblog |
| 440 | LOCAL_CXX_STL := libc++_static |
Jaesoo Lee | 81adbb2 | 2017-03-22 16:16:51 +0900 | [diff] [blame] | 441 | LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 442 | LOCAL_FORCE_STATIC_EXECUTABLE := true |
Elliott Hughes | 1ca2399 | 2017-05-05 18:02:04 -0700 | [diff] [blame] | 443 | LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf ${LOCAL_MODULE} $(LOCAL_MODULE_PATH)/$(t);) |
Jaesoo Lee | 95a47fe | 2017-03-03 13:07:39 +0900 | [diff] [blame] | 444 | include $(BUILD_EXECUTABLE) |