--- /dev/null
+#
+# Automatically generated make config: don't edit
+# ToyBox version: KCONFIG_VERSION
+# Fri May 24 11:26:47 2019
+#
+CONFIG_TOYBOX_CONTAINER=y
+CONFIG_TOYBOX_FIFREEZE=y
+CONFIG_TOYBOX_ICONV=y
+CONFIG_TOYBOX_FALLOCATE=y
+CONFIG_TOYBOX_UTMPX=y
+CONFIG_TOYBOX_SHADOW=y
+# CONFIG_TOYBOX_ON_ANDROID is not set
+CONFIG_TOYBOX_FORK=y
+
+#
+# Samsung developed commands
+#
+CONFIG_NSLOOKUP=y
+CONFIG_PING=y
+
+#
+# Posix commands
+#
+CONFIG_BASENAME=y
+CONFIG_CAL=y
+CONFIG_CAT=y
+# CONFIG_CAT_V is not set
+CONFIG_CATV=y
+CONFIG_CHGRP=y
+CONFIG_CHOWN=y
+CONFIG_CHMOD=y
+CONFIG_CKSUM=y
+CONFIG_CMP=y
+CONFIG_COMM=y
+CONFIG_CP=y
+CONFIG_CP_MORE=y
+CONFIG_CP_PRESERVE=y
+CONFIG_MV=y
+CONFIG_MV_MORE=y
+CONFIG_INSTALL=y
+CONFIG_CPIO=y
+CONFIG_CUT=y
+CONFIG_DATE=y
+CONFIG_DF=y
+CONFIG_DIRNAME=y
+CONFIG_DU=y
+CONFIG_ECHO=y
+CONFIG_ENV=y
+CONFIG_EXPAND=y
+CONFIG_FALSE=y
+CONFIG_FIND=y
+CONFIG_GREP=y
+CONFIG_EGREP=y
+CONFIG_FGREP=y
+CONFIG_HEAD=y
+CONFIG_ID=y
+# CONFIG_ID_Z is not set
+CONFIG_GROUPS=y
+CONFIG_LOGNAME=y
+CONFIG_WHOAMI=y
+CONFIG_KILL=y
+CONFIG_KILLALL5=y
+CONFIG_LINK=y
+CONFIG_LN=y
+CONFIG_LS=y
+CONFIG_LS_COLOR=y
+CONFIG_MKDIR=y
+# CONFIG_MKDIR_Z is not set
+CONFIG_MKFIFO=y
+# CONFIG_MKFIFO_Z is not set
+CONFIG_NICE=y
+CONFIG_NL=y
+CONFIG_NOHUP=y
+CONFIG_OD=y
+CONFIG_PASTE=y
+CONFIG_PATCH=y
+CONFIG_PRINTF=y
+CONFIG_PWD=y
+CONFIG_RENICE=y
+CONFIG_RM=y
+CONFIG_RMDIR=y
+CONFIG_SED=y
+CONFIG_SLEEP=y
+CONFIG_SLEEP_FLOAT=y
+CONFIG_SORT=y
+CONFIG_SORT_BIG=y
+CONFIG_SORT_FLOAT=y
+CONFIG_SPLIT=y
+CONFIG_STRINGS=y
+CONFIG_TAIL=y
+CONFIG_TAIL_SEEK=y
+CONFIG_TEE=y
+CONFIG_TIME=y
+CONFIG_TOUCH=y
+CONFIG_TRUE=y
+CONFIG_TTY=y
+CONFIG_UNAME=y
+CONFIG_UNIQ=y
+CONFIG_UNLINK=y
+CONFIG_UUDECODE=y
+CONFIG_UUENCODE=y
+CONFIG_WC=y
+CONFIG_WHO=y
+CONFIG_XARGS=y
+# CONFIG_XARGS_PEDANTIC is not set
+
+#
+# pending (see toys/pending/README)
+#
+# CONFIG_ARP is not set
+# CONFIG_ARPING is not set
+CONFIG_BOOTCHARTD=y
+# CONFIG_BRCTL is not set
+CONFIG_COMPRESS=y
+CONFIG_GZIP=y
+CONFIG_GZIP_D=y
+CONFIG_DECOMPRESS=y
+CONFIG_ZCAT=y
+CONFIG_GUNZIP=y
+CONFIG_CROND=y
+CONFIG_CRONTAB=y
+CONFIG_DD=y
+CONFIG_DHCP=y
+CONFIG_DHCPD=y
+CONFIG_DEBUG_DHCP=y
+CONFIG_DIFF=y
+CONFIG_DUMPLEASES=y
+# CONFIG_EXPR is not set
+CONFIG_FDISK=y
+# CONFIG_FOLD is not set
+CONFIG_FSCK=y
+# CONFIG_FTPGET is not set
+CONFIG_GETTY=y
+# CONFIG_GROUPADD is not set
+# CONFIG_GROUPDEL is not set
+CONFIG_HOST=y
+CONFIG_ICONV=y
+CONFIG_INIT=y
+CONFIG_IP=y
+CONFIG_IPCRM=y
+CONFIG_IPCS=y
+# CONFIG_KLOGD is not set
+# CONFIG_KLOGD_SOURCE_RING_BUFFER is not set
+CONFIG_LAST=y
+# CONFIG_LOGGER is not set
+CONFIG_MDEV=y
+CONFIG_MDEV_CONF=y
+# CONFIG_MKE2FS is not set
+# CONFIG_MKE2FS_JOURNAL is not set
+# CONFIG_MKE2FS_GEN is not set
+# CONFIG_MKE2FS_LABEL is not set
+# CONFIG_MKE2FS_EXTENDED is not set
+CONFIG_MODPROBE=y
+CONFIG_MORE=y
+CONFIG_NETSTAT=y
+# CONFIG_OPENVT is not set
+# CONFIG_DEALLOCVT is not set
+CONFIG_PGREP=y
+CONFIG_PS=y
+CONFIG_ROUTE=y
+CONFIG_SH=y
+# CONFIG_EXIT is not set
+# CONFIG_CD is not set
+CONFIG_SULOGIN=y
+# CONFIG_SYSLOGD is not set
+CONFIG_TAR=y
+# CONFIG_TCPSVD is not set
+CONFIG_TELNET=y
+CONFIG_TELNETD=y
+# CONFIG_TEST is not set
+# CONFIG_TFTPD is not set
+CONFIG_TOP=y
+# CONFIG_TR is not set
+CONFIG_TRACEROUTE=y
+# CONFIG_USERADD is not set
+# CONFIG_USERDEL is not set
+CONFIG_WATCH=y
+# CONFIG_XZCAT is not set
+
+#
+# Other commands
+#
+CONFIG_ACPI=y
+CONFIG_BASE64=y
+CONFIG_BLKID=y
+CONFIG_FSTYPE=y
+CONFIG_BLOCKDEV=y
+CONFIG_BZCAT=y
+# CONFIG_CHCON is not set
+CONFIG_CHROOT=y
+CONFIG_CHVT=y
+CONFIG_CLEAR=y
+CONFIG_COUNT=y
+CONFIG_DOS2UNIX=y
+CONFIG_UNIX2DOS=y
+CONFIG_EJECT=y
+CONFIG_FACTOR=y
+CONFIG_FALLOCATE=y
+CONFIG_FREE=y
+CONFIG_FREERAMDISK=y
+CONFIG_FSFREEZE=y
+CONFIG_HELP=y
+CONFIG_HELP_EXTRAS=y
+CONFIG_HEXEDIT=y
+CONFIG_HWCLOCK=y
+CONFIG_IFCONFIG=y
+CONFIG_INOTIFYD=y
+CONFIG_INSMOD=y
+CONFIG_IONICE=y
+CONFIG_IORENICE=y
+CONFIG_LOGIN=y
+CONFIG_LOSETUP=y
+CONFIG_LSATTR=y
+CONFIG_CHATTR=y
+CONFIG_LSMOD=y
+CONFIG_LSPCI=y
+CONFIG_LSPCI_TEXT=y
+CONFIG_LSUSB=y
+CONFIG_MAKEDEVS=y
+CONFIG_MIX=y
+CONFIG_MKPASSWD=y
+CONFIG_MKSWAP=y
+CONFIG_MODINFO=y
+CONFIG_MOUNTPOINT=y
+CONFIG_NBD_CLIENT=y
+CONFIG_NETCAT=y
+CONFIG_NETCAT_LISTEN=y
+CONFIG_UNSHARE=y
+CONFIG_NSENTER=y
+CONFIG_ONEIT=y
+CONFIG_PARTPROBE=y
+CONFIG_PIVOT_ROOT=y
+CONFIG_PMAP=y
+CONFIG_PRINTENV=y
+CONFIG_PWDX=y
+CONFIG_READAHEAD=y
+CONFIG_READLINK=y
+CONFIG_REALPATH=y
+CONFIG_REBOOT=y
+CONFIG_RESET=y
+CONFIG_REV=y
+CONFIG_RFKILL=y
+CONFIG_RMMOD=y
+CONFIG_SETSID=y
+CONFIG_SHRED=y
+CONFIG_STAT=y
+CONFIG_SWAPOFF=y
+CONFIG_SWAPON=y
+CONFIG_SWITCH_ROOT=y
+CONFIG_SYSCTL=y
+CONFIG_TAC=y
+CONFIG_NPROC=y
+CONFIG_TASKSET=y
+CONFIG_TIMEOUT=y
+CONFIG_TRUNCATE=y
+CONFIG_UPTIME=y
+CONFIG_USLEEP=y
+CONFIG_VCONFIG=y
+CONFIG_VMSTAT=y
+CONFIG_W=y
+CONFIG_WHICH=y
+CONFIG_XXD=y
+CONFIG_YES=y
+
+#
+# Linux Standard Base commands
+#
+CONFIG_DMESG=y
+CONFIG_HOSTNAME=y
+CONFIG_KILLALL=y
+CONFIG_MD5SUM=y
+CONFIG_SHA1SUM=y
+CONFIG_MKNOD=y
+# CONFIG_MKNOD_Z is not set
+CONFIG_MKTEMP=y
+CONFIG_MOUNT=y
+CONFIG_PASSWD=y
+CONFIG_PIDOF=y
+CONFIG_SEQ=y
+CONFIG_SU=y
+CONFIG_SYNC=y
+CONFIG_UMOUNT=y
+
+#
+# Example commands
+#
+# CONFIG_HELLO is not set
+# CONFIG_SKELETON is not set
+# CONFIG_SKELETON_ALIAS is not set
+
+#
+# Android
+#
+# CONFIG_GETENFORCE is not set
+# CONFIG_GETPROP is not set
+# CONFIG_LOAD_POLICY is not set
+# CONFIG_RESTORECON is not set
+# CONFIG_RUNCON is not set
+# CONFIG_SETENFORCE is not set
+# CONFIG_SETPROP is not set
+
+#
+#
+#
+
+#
+# Toybox global settings
+#
+CONFIG_TOYBOX=y
+CONFIG_TOYBOX_SUID=y
+CONFIG_TOYBOX_LSM_NONE=y
+# CONFIG_TOYBOX_SELINUX is not set
+# CONFIG_TOYBOX_SMACK is not set
+CONFIG_TOYBOX_FLOAT=y
+CONFIG_TOYBOX_HELP=y
+CONFIG_TOYBOX_HELP_DASHDASH=y
+CONFIG_TOYBOX_I18N=y
+# CONFIG_TOYBOX_FREE is not set
+# CONFIG_TOYBOX_NORECURSE is not set
+# CONFIG_TOYBOX_DEBUG is not set
+CONFIG_TOYBOX_UID_SYS=100
+CONFIG_TOYBOX_UID_USR=500
Source3: sbin.links
Source4: usrbin.links
Source5: usrsbin.links
+Source11: config-full
Source1001: toybox.manifest
BuildRequires : smack-devel
useful for recovering from certain types of system failures,
particularly those involving broken shared libraries.
+%package full
+Group: Base/Utilities
+Summary: ToyBox that includes all applets including init.
+Conflicts: %{name}
+
+%description full
+Toybox-full is a single binary which includes most of the applets
+including 'init' command.
+
+%package symlinks-full
+Group: Base/Utilities
+Summary: ToyBox symlinks to provide all applets
+Requires: %{name}-full = %{version}-%{release}
+
+%description symlinks-full
+ToyBox symlinks for utilities corresponding to all packages.
+
%package symlinks-dhcp
Group: Base/Utilities
Summary: ToyBox symlinks to provide 'dhcp'
%build
cp %{SOURCE1001} .
-# create dynamic toybox - the executable is toybox
+
+# create a minimum dynamic toybox (ELF) that consists of 'nslookup', 'ping', and 'dhcpd'.
cp %{SOURCE1} .config
make -j 4 CC="gcc $RPM_OPT_FLAGS" CFLAGS="$CFLAGS -fPIE" LDOPTIMIZE="-Wl,--gc-sections -pie"
cp toybox toybox-dynamic
+# create a dynamic toybox-full (ELF) that include most of the applets including 'init'.
+cp %{SOURCE11} .config
+make -j 4 CC="gcc $RPM_OPT_FLAGS" CFLAGS="$CFLAGS -fPIE" LDOPTIMIZE="-Wl,--gc-sections -pie"
+cp toybox toybox-dynamic-full
+
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/bin
mkdir -p $RPM_BUILD_ROOT/sbin
-install -m 755 toybox-dynamic $RPM_BUILD_ROOT/bin/toybox
+install -m 755 toybox-dynamic $RPM_BUILD_ROOT/bin/toybox
+install -m 755 toybox-dynamic-full $RPM_BUILD_ROOT/bin/toybox-full
# debian/toybox.links
pushd %{buildroot}
for f in `cat %SOURCE5` ; do ln -s ../../bin/toybox $f ; done
popd
+%post full
+ln -s /bin/toybox-full /bin/toybox
+
%files
%manifest toybox.manifest
%license LICENSE.BSD
%defattr(-,root,root,-)
/bin/toybox
+%files full
+%manifest toybox.manifest
+%license LICENSE.BSD
+%defattr(-,root,root,-)
+/bin/toybox-full
+
+%files symlinks-full
+%manifest toybox.manifest
+%license LICENSE.BSD
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_sbindir}/*
+
%files symlinks-dhcp
%manifest toybox.manifest
%license LICENSE.BSD
%license LICENSE.BSD
%defattr(-,root,root,-)
%{_bindir}/nslookup
+
+
+%changelog
+* Mon May 27 2019 Geunsik Lim <geunsik.lim@samsung.com>
+- Added toybox-full that consists of most applets