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/md5sum.c \
toys/other/blockdev.c \
toys/other/chcon.c \
toys/other/chroot.c \
+ toys/other/chrt.c \
toys/other/clear.c \
toys/other/dos2unix.c \
toys/other/fallocate.c \
toys/other/losetup.c \
toys/other/lsattr.c \
toys/other/lsmod.c \
+ toys/other/lspci.c \
toys/other/lsusb.c \
toys/other/makedevs.c \
toys/other/mkswap.c \
toys/other/which.c \
toys/other/xxd.c \
toys/other/yes.c \
- toys/pending/chrt.c \
toys/pending/dd.c \
toys/pending/diff.c \
- toys/pending/dmesg.c \
toys/pending/expr.c \
toys/pending/getfattr.c \
toys/pending/gzip.c \
-std=c99 \
-Os \
-Wno-char-subscripts \
+ -Wno-gnu-variable-sized-type-not-at-end \
+ -Wno-missing-field-initializers \
-Wno-sign-compare \
-Wno-string-plus-int \
-Wno-uninitialized \
-ffunction-sections -fdata-sections \
-fno-asynchronous-unwind-tables \
-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_upstream_version := $(shell sed 's/#define.*TOYBOX_VERSION.*"\(.*\)"/\1/p;d' $(LOCAL_PATH)/main.c)
-toybox_version := $(toybox_upstream_version)-$(toybox_sha)-android
+toybox_version := $(toybox_upstream_version)-android
toybox_libraries := liblog libselinux libcutils libcrypto libz
-common_CFLAGS += -DTOYBOX_VERSION='"$(toybox_version)"'
+common_CFLAGS += -DTOYBOX_VERSION=\"$(toybox_version)\"
# not usable on Android?: freeramdisk fsfreeze install makedevs nbd-client
# partprobe pivot_root pwdx rev rfkill vconfig
ls \
lsmod \
lsof \
+ lspci \
lsusb \
md5sum \
mkdir \
include $(BUILD_EXECUTABLE)
############################################
-# static version to be installed in /vendor
+# toybox for /vendor
############################################
-ifeq ($(PRODUCT_FULL_TREBLE),true)
include $(CLEAR_VARS)
LOCAL_MODULE := toybox_vendor
LOCAL_VENDOR_MODULE := true
LOCAL_SRC_FILES := $(common_SRC_FILES)
LOCAL_CFLAGS := $(common_CFLAGS)
-LOCAL_STATIC_LIBRARIES := $(toybox_libraries)
-# libc++_static is needed by static liblog
-LOCAL_CXX_STL := libc++_static
+LOCAL_STATIC_LIBRARIES := libcutils libcrypto libz
+LOCAL_SHARED_LIBRARIES := libselinux_vendor liblog
LOCAL_MODULE_TAGS := optional
-LOCAL_FORCE_STATIC_EXECUTABLE := true
LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf ${LOCAL_MODULE} $(TARGET_OUT_VENDOR_EXECUTABLES)/$(t);)
include $(BUILD_EXECUTABLE)
-endif
############################################
# static version to be installed in recovery
LOCAL_CXX_STL := libc++_static
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
LOCAL_FORCE_STATIC_EXECUTABLE := true
-# TODO: is there any reason to only have modprobe in recovery?
-RECOVERY_TOOLS := modprobe
-# Install the symlinks.
-LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(RECOVERY_TOOLS),ln -sf ${LOCAL_MODULE} $(LOCAL_MODULE_PATH)/$(t);)
+LOCAL_POST_INSTALL_CMD := $(hide) $(foreach t,$(ALL_TOOLS),ln -sf ${LOCAL_MODULE} $(LOCAL_MODULE_PATH)/$(t);)
include $(BUILD_EXECUTABLE)