OSDN Git Service

Add symlink for chrt.
[android-x86/external-toybox.git] / Android.mk
index 9b1abef..b1815d4 100644 (file)
@@ -26,6 +26,7 @@ LOCAL_PATH := $(call my-dir)
 #  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:
@@ -37,8 +38,7 @@ LOCAL_PATH := $(call my-dir)
 # 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.
@@ -53,6 +53,7 @@ LOCAL_SRC_FILES := \
     lib/help.c \
     lib/interestingtimes.c \
     lib/lib.c \
+    lib/linestack.c \
     lib/llist.c \
     lib/net.c \
     lib/portability.c \
@@ -61,10 +62,13 @@ LOCAL_SRC_FILES := \
     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 \
@@ -76,6 +80,11 @@ LOCAL_SRC_FILES := \
     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 \
@@ -92,7 +101,6 @@ LOCAL_SRC_FILES := \
     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 \
@@ -105,7 +113,6 @@ LOCAL_SRC_FILES := \
     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 \
@@ -114,13 +121,12 @@ LOCAL_SRC_FILES := \
     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 \
@@ -133,15 +139,13 @@ LOCAL_SRC_FILES := \
     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 \
@@ -163,6 +167,7 @@ LOCAL_SRC_FILES := \
     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 \
@@ -195,6 +200,7 @@ LOCAL_SRC_FILES := \
     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 \
@@ -212,12 +218,15 @@ LOCAL_CFLAGS += \
     -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++.
@@ -227,7 +236,7 @@ LOCAL_MODULE := toybox
 
 # 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
 
@@ -244,6 +253,7 @@ ALL_TOOLS := \
     chmod \
     chown \
     chroot \
+    chrt \
     cksum \
     clear \
     comm \
@@ -263,6 +273,7 @@ ALL_TOOLS := \
     expr \
     fallocate \
     false \
+    file \
     find \
     flock \
     free \
@@ -282,6 +293,7 @@ ALL_TOOLS := \
     killall \
     load_policy \
     ln \
+    log \
     logname \
     losetup \
     ls \
@@ -311,6 +323,7 @@ ALL_TOOLS := \
     pmap \
     printenv \
     printf \
+    ps \
     pwd \
     readlink \
     realpath \
@@ -319,18 +332,24 @@ ALL_TOOLS := \
     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 \
@@ -343,11 +362,13 @@ ALL_TOOLS := \
     tee \
     time \
     timeout \
+    top \
     touch \
     tr \
     true \
     truncate \
     tty \
+    ulimit \
     umount \
     uname \
     uniq \