# git merge toybox/master
# 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.
-# git push aosp HEAD:refs/for/master # Push to gerrit.
#
# # Now commit any necessary Android.mk changes like normal:
# repo start post-sync .
lib/help.c \
lib/interestingtimes.c \
lib/lib.c \
+ lib/linestack.c \
lib/llist.c \
lib/net.c \
lib/portability.c \
toys/other/clear.c \
toys/other/dos2unix.c \
toys/other/fallocate.c \
+ toys/other/flock.c \
toys/other/free.c \
toys/other/freeramdisk.c \
toys/other/fsfreeze.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/pending/expr.c \
toys/pending/lsof.c \
toys/pending/more.c \
- toys/pending/pgrep.c \
toys/pending/netstat.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/paste.c \
toys/posix/patch.c \
toys/posix/printf.c \
+ toys/posix/ps.c \
toys/posix/pwd.c \
toys/posix/renice.c \
toys/posix/rm.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_MODULE := toybox
-# dupes: dd df du
+# dupes: dd
# useless?: freeramdisk fsfreeze install makedevs mkfifo nbd-client
-# partprobe pivot_root pwdx rev rfkill switch_root tty vconfig
+# partprobe pivot_root pwdx rev rfkill vconfig
# prefer BSD netcat instead?: nc netcat
# prefer efs2progs instead?: blkid chattr lsattr
cpio \
cut \
date \
+ df \
dirname \
dmesg \
dos2unix \
+ du \
echo \
env \
expand \
fallocate \
false \
find \
+ flock \
free \
getenforce \
getprop \
true \
truncate \
tty \
+ ulimit \
umount \
uname \
uniq \