# mm -j32
# # (Make any necessary Android.mk changes and test the new toybox.)
# repo upload .
+# git push aosp HEAD:refs/for/master # Push to gerrit for review.
# git push aosp HEAD:master # Push directly, avoiding gerrit.
#
# # Now commit any necessary Android.mk changes like normal:
# To add a toy:
#
-# make menuconfig
-# # (Select the toy you want to add.)
+# Edit .config to enable the toy you want to add.
# make clean && make # Regenerate the generated files.
# # Edit LOCAL_SRC_FILES below to add the toy.
# # If you just want to use it as "toybox x" rather than "x", you can stop now.
lib/help.c \
lib/interestingtimes.c \
lib/lib.c \
+ lib/linestack.c \
lib/llist.c \
lib/net.c \
lib/portability.c \
toys/android/getenforce.c \
toys/android/getprop.c \
toys/android/load_policy.c \
+ toys/android/log.c \
toys/android/restorecon.c \
toys/android/runcon.c \
+ toys/android/sendevent.c \
toys/android/setenforce.c \
toys/android/setprop.c \
+ toys/android/start.c \
toys/lsb/dmesg.c \
toys/lsb/hostname.c \
toys/lsb/killall.c \
toys/lsb/seq.c \
toys/lsb/sync.c \
toys/lsb/umount.c \
+ toys/net/ifconfig.c \
+ toys/net/netcat.c \
+ toys/net/netstat.c \
+ toys/net/rfkill.c \
+ toys/net/tunctl.c \
toys/other/acpi.c \
toys/other/base64.c \
toys/other/blkid.c \
toys/other/fsfreeze.c \
toys/other/help.c \
toys/other/hwclock.c \
- toys/other/ifconfig.c \
toys/other/inotifyd.c \
toys/other/insmod.c \
toys/other/ionice.c \
toys/other/modinfo.c \
toys/other/mountpoint.c \
toys/other/nbd_client.c \
- toys/other/netcat.c \
toys/other/partprobe.c \
toys/other/pivot_root.c \
toys/other/pmap.c \
toys/other/readlink.c \
toys/other/realpath.c \
toys/other/rev.c \
- toys/other/rfkill.c \
toys/other/rmmod.c \
+ toys/other/setfattr.c \
toys/other/setsid.c \
toys/other/stat.c \
toys/other/swapoff.c \
toys/other/swapon.c \
- toys/other/switch_root.c \
toys/other/sysctl.c \
toys/other/tac.c \
toys/other/taskset.c \
toys/other/which.c \
toys/other/xxd.c \
toys/other/yes.c \
+ toys/pending/chrt.c \
toys/pending/dd.c \
toys/pending/expr.c \
+ toys/pending/getfattr.c \
toys/pending/lsof.c \
toys/pending/more.c \
- toys/pending/netstat.c \
- toys/pending/pgrep.c \
- toys/pending/route.c \
toys/pending/tar.c \
- toys/pending/top.c \
toys/pending/tr.c \
toys/pending/traceroute.c \
toys/posix/basename.c \
toys/posix/env.c \
toys/posix/expand.c \
toys/posix/false.c \
+ toys/posix/file.c \
toys/posix/find.c \
toys/posix/grep.c \
toys/posix/head.c \
toys/posix/touch.c \
toys/posix/true.c \
toys/posix/tty.c \
+ toys/posix/ulimit.c \
toys/posix/uname.c \
toys/posix/uniq.c \
toys/posix/wc.c \
-ffunction-sections -fdata-sections \
-fno-asynchronous-unwind-tables \
-toybox_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android
+toybox_upstream_version := $(shell awk 'match($$0, /TOYBOX_VERSION.*"(.*)"/, ary) {print ary[1]}' $(LOCAL_PATH)/main.c)
+toybox_sha := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)
+
+toybox_version := $(toybox_upstream_version)-$(toybox_sha)-android
LOCAL_CFLAGS += -DTOYBOX_VERSION='"$(toybox_version)"'
LOCAL_CLANG := true
-LOCAL_SHARED_LIBRARIES := libcutils libselinux
+LOCAL_SHARED_LIBRARIES := libcutils libselinux libcrypto
# This doesn't actually prevent us from dragging in libc++ at runtime
# because libnetd_client.so is C++.
# dupes: dd
# useless?: freeramdisk fsfreeze install makedevs mkfifo nbd-client
-# partprobe pivot_root pwdx rev rfkill switch_root vconfig
+# partprobe pivot_root pwdx rev rfkill vconfig
# prefer BSD netcat instead?: nc netcat
# prefer efs2progs instead?: blkid chattr lsattr
chmod \
chown \
chroot \
+ chrt \
cksum \
clear \
comm \
expr \
fallocate \
false \
+ file \
find \
flock \
free \
ionice \
iorenice \
kill \
+ killall \
load_policy \
ln \
+ log \
logname \
losetup \
ls \
pmap \
printenv \
printf \
+ ps \
pwd \
readlink \
realpath \
rm \
rmdir \
rmmod \
- route \
runcon \
sed \
+ sendevent \
seq \
setenforce \
setprop \
setsid \
sha1sum \
+ sha224sum \
+ sha256sum \
+ sha384sum \
+ sha512sum \
sleep \
sort \
split \
+ start \
stat \
+ stop \
strings \
swapoff \
swapon \
tee \
time \
timeout \
+ top \
touch \
tr \
true \
truncate \
tty \
+ ulimit \
umount \
uname \
uniq \