├── .gitignore ├── Makefile ├── README.md ├── android_ndk_config-w-patches ├── android_ndk_defconfigPlus ├── android_ndk_stericson-like ├── incomplete └── 0001-add-LFS-support-EXPERIMENTAL.patch └── patches ├── 003-mount-umount-fsck-df.patch ├── 009-watchdog.patch ├── 010-ubiX.patch ├── 011-ether_ntoa-udhcpd.patch ├── 012-arping.patch ├── 012-mempcpy.patch ├── 015-zcip.patch ├── 016-swapon-swapoff.patch ├── 016-swaponoff-syscalls.patch ├── 017-a-shmget-msgget-semget-syscalls.patch ├── 017-b-msgctl-shmctl-syscalls.patch ├── 017-c-semctl-syscall.patch ├── 017-ipcs-ipcrm.patch ├── 018-semop-shmdt-syscalls.patch ├── 018-syslogd-logread.patch ├── 019-fsck.minix-mkfs.minix.patch ├── 020-microcom.patch ├── 022-ipv6.patch ├── 023-ether-wake.patch ├── 024-hush.patch ├── 025-readahead.patch ├── 026-modinfo-modprobe-without-utsrel.patch ├── 027-depmod-parameter.patch ├── 050-dietlibc_resolver-nslookup.patch └── 051-ash-history.patch /.gitignore: -------------------------------------------------------------------------------- 1 | busybox-git.* 2 | *.swp 3 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for android-busybox-ndk 2 | # fetches upstream busybox from git, applies patches, builds it 3 | 4 | # Point to your android-ndk installation 5 | ANDROID_NDK="/opt/android-ndk" 6 | 7 | # Pick your target ARCH (arm,mips,x86) 8 | ARCH=arm 9 | 10 | # Config to use 11 | CONFIG_FILE="./android_ndk_stericson-like" 12 | #CONFIG_FILE="android_ndk_config-w-patches" # contains more 13 | 14 | 15 | # Following options should not be changed unless you know better 16 | BB_DIR="busybox-git.$(ARCH)" 17 | SYSROOT="$(ANDROID_NDK)/platforms/android-9/arch-$(ARCH)" 18 | 19 | # 20 | # ARM SETUP 21 | # 22 | ifeq ($(ARCH),arm) 23 | GCC_PREFIX="$(ANDROID_NDK)/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-" 24 | EXTRA_CFLAGS="-DANDROID -D__ANDROID__ -DSK_RELEASE -nostdlib -march=armv7-a -msoft-float -mfloat-abi=softfp -mfpu=neon -mthumb -mthumb-interwork -fpic -fno-short-enums -fgcse-after-reload -frename-registers" 25 | EXTRA_LDFLAGS="-Xlinker -z -Xlinker muldefs -nostdlib -Bdynamic -Xlinker -dynamic-linker -Xlinker /system/bin/linker -Xlinker -z -Xlinker nocopyreloc -Xlinker --no-undefined ${SYSROOT}/usr/lib/crtbegin_dynamic.o ${SYSROOT}/usr/lib/crtend_android.o" 26 | endif 27 | 28 | # 29 | # MIPS SETUP 30 | # NOTE: MIPS_SIM_NABI32 is a 64bit ABI; Android uses MIPS_SIM_ABI32 31 | # 32 | ifeq ($(ARCH),mips) 33 | GCC_PREFIX="$(ANDROID_NDK)/toolchains/mipsel-linux-android-4.4.3/prebuilt/linux-x86/bin/mipsel-linux-android-" 34 | EXTRA_CFLAGS="-DANDROID -D__ANDROID__ -DSK_RELEASE -fpic -fno-short-enums -fgcse-after-reload -frename-registers -U_MIPS_SIM -D_MIPS_SIM=_MIPS_SIM_ABI32" 35 | EXTRA_LDFLAGS="-Xlinker -z -Xlinker muldefs -nostdlib -Bdynamic -Xlinker -dynamic-linker -Xlinker /system/bin/linker -Xlinker -z -Xlinker nocopyreloc -Xlinker --no-undefined ${SYSROOT}/usr/lib/crtbegin_dynamic.o ${SYSROOT}/usr/lib/crtend_android.o" 36 | endif 37 | 38 | # 39 | # X86 SETUP 40 | # 41 | ifeq ($(ARCH),x86) 42 | GCC_PREFIX="$(ANDROID_NDK)/toolchains/x86-4.4.3/prebuilt/linux-x86/bin/i686-android-linux-" 43 | EXTRA_CFLAGS="-DANDROID -D__ANDROID__ -DSK_RELEASE -nostdlib -fpic -fno-short-enums -fgcse-after-reload -frename-registers -Dhtons=__swap16 -Dhtonl=__swap32 -Dntohs=__swap16 -Dntohl=__swap32 -D_XOPEN_SOURCE -D_POSIX_C_SOURCE" 44 | EXTRA_LDFLAGS="-Xlinker -z -Xlinker muldefs -nostdlib -Bdynamic -Xlinker -dynamic-linker -Xlinker /system/bin/linker -Xlinker -z -Xlinker nocopyreloc -Xlinker --no-undefined ${SYSROOT}/usr/lib/crtbegin_dynamic.o ${SYSROOT}/usr/lib/crtend_android.o" 45 | endif 46 | 47 | 48 | all: busybox-git config patches build 49 | 50 | busybox-git: 51 | if test -d $(BB_DIR); then \ 52 | echo "'$(BB_DIR)' already exists"; \ 53 | else \ 54 | echo "Fetching fresh busybox source"; \ 55 | git clone git://git.busybox.net/busybox $(BB_DIR); \ 56 | echo "Last tested revision: 1_21_0"; \ 57 | fi 58 | 59 | config: 60 | if test ! -f $(CONFIG_FILE); then \ 61 | echo "Error: config file '$(CONFIG_FILE)' does not exist!" \ 62 | exit 1; \ 63 | fi 64 | 65 | patches: 66 | if test -f $(BB_DIR)/android-busybox-ndk-patched; then \ 67 | echo "Busybox already patched"; \ 68 | else \ 69 | echo "Applying patches"; \ 70 | for i in patches/*.patch; do \ 71 | patch -d $(BB_DIR) --forward -p1 < $$i; \ 72 | done; \ 73 | touch "$(BB_DIR)/android-busybox-ndk-patched"; \ 74 | fi 75 | @echo "EXPORT CONFIG_FILE=$(CONFIG_FILE)" 76 | @echo "EXPORT GCC_PREFIX=$(GCC_PREFIX)" 77 | @echo "EXPORT SYSROOT=$(SYSROOT)" 78 | @echo "EXPORT EXTRA_CFLAGS=$(EXTRA_CFLAGS)" 79 | @echo "EXPORT EXTRA_LDFLAGS=$(EXTRA_LDFLAGS)" 80 | cat $(CONFIG_FILE) | \ 81 | sed "s%\(CONFIG_CROSS_COMPILER_PREFIX=\).*%\1\"$(GCC_PREFIX)\"%" | \ 82 | sed "s%\(CONFIG_SYSROOT=\).*%\1\"$(SYSROOT)\"%" | \ 83 | sed "s%\(CONFIG_EXTRA_CFLAGS=\).*%\1\"$(EXTRA_CFLAGS)\"%" | \ 84 | sed "s%\(CONFIG_EXTRA_LDFLAGS=\).*%\1\"$(EXTRA_LDFLAGS)\"%" \ 85 | > $(BB_DIR)/.config 86 | build-check: 87 | if test ! -d $(ANDROID_NDK); then \ 88 | echo "Error: edit 'Makefile' and point 'ANDROID_NDK=' to your android ndk installation\n(currently: $(ANDROID_NDK))"; exit 1; \ 89 | fi 90 | if test ! -d $(SYSROOT); then \ 91 | echo "Error: can not find 'android-9' platform in '$(SYSROOT)', did you install it?"; exit 1; \ 92 | fi 93 | if test ! -f $(GCC_PREFIX)gcc; then \ 94 | echo "Error: can not find crosscompiler with prefix $(GCC_PREFIX), did you install it?"; exit 1; \ 95 | fi 96 | 97 | build: build-check 98 | make -C $(BB_DIR) 99 | echo "Busybox binary at '$(BB_DIR)/busybox'" 100 | 101 | 102 | clean: 103 | make -C $(BB_DIR) clean 104 | # undo patches 105 | cd $(BB_DIR) && git checkout . && git clean -f -d 106 | 107 | dist-clean: distclean 108 | distclean: 109 | rm -Rf $(BB_DIR) 110 | 111 | .PHONY: busybox-git patches 112 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | The aim is to gather information and patches on how to build busybox using the compiler shipped with the android NDK. 2 | 3 | Patches and relevant pointers more than welcome, fork me or mail me: tias-@-ulyssis.org 4 | 5 | Building busybox with the standard android NDK 6 | ============================================== 7 | 8 | I recently discovered that a number [[1](http://lists.busybox.net/pipermail/busybox/2012-March/077486.html),[2](http://lists.busybox.net/pipermail/busybox/2012-March/077505.html)] of upstream changes make it possible to build the latest git version of busybox, __without requiring any patches__: 9 | 10 | # get busybox sources 11 | git clone git://busybox.net/busybox.git 12 | # use default upstream config 13 | cp configs/android_ndk_defconfig .config 14 | 15 | # add arm-linux-androideabi-* to your PATH 16 | export PATH="$PATH:/path/to/your/android-ndk/android-ndk-r7b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/" 17 | # if android-ndk is not installed in /opt/android-ndk, edit SYSROOT= in .config 18 | xdg-open .config 19 | 20 | # build it! 21 | make 22 | 23 | This creates a busybox with the following applets: 24 | > [, [[, ar, arp, awk, base64, basename, beep, blkid, blockdev, bootchartd, bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod, chown, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cttyhack, cut, dc, dd, deallocvt, depmod, devmem, diff, dirname, dmesg, dnsd, dos2unix, dpkg, dpkg-deb, du, dumpkmap, echo, ed, egrep, env, envdir, envuidgid, expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs, flash\_lock, flash\_unlock, flashcp, flock, fold, free, freeramdisk, fsync, ftpd, ftpget, ftpput, fuser, getopt, grep, gunzip, gzip, halt, hd, hdparm, head, hexdump, httpd, hwclock, ifconfig, ifdown, ifup, init, inotifyd, insmod, install, iostat, ip, ipaddr, ipcalc, iplink, iproute, iprule, iptunnel, klogd, less, linuxrc, ln, loadkmap, losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lspci, lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, mkdir, mkfifo, mknod, mkswap, mktemp, modinfo, modprobe, more, mpstat, mv, nbd-client, nc, netstat, nice, nmeter, nohup, od, openvt, patch, pidof, ping, pipe\_progress, pmap, popmaildir, poweroff, powertop, printenv, printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdev, readlink, readprofile, realpath, reboot, reformime, renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, rtcwake, run-parts, runsv, runsvdir, rx, script, scriptreplay, sed, sendmail, seq, setconsole, setkeycodes, setlogcons, setserial, setsid, setuidgid, sha1sum, sha256sum, sha512sum, showkey, sleep, smemcap, softlimit, sort, split, start-stop-daemon, strings, stty, sum, sv, svlogd, switch\_root, sync, sysctl, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd, time, timeout, top, touch, tr, traceroute, true, ttysize, tunctl, tune2fs, udhcpc, udpsvd, uname, uncompress, unexpand, uniq, unix2dos, unlzma, unlzop, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, volname, watch, wc, wget, which, whoami, whois, xargs, xz, xzcat, yes, zcat 25 | 26 | Using file *android\_ndk\_defconfigPlus* you additionally get following applets that are by default enabled for 'make defconfig': 27 | > acpid, ash, groups, id, mkdosfs, mkfs.vfat, nandump, nandwrite, sh, slattach, tty 28 | 29 | By **applying the included patches** to the busybox code-base (and config *android\_ndk\_config-w-patches*), you additionally get: 30 | > adjtimex, arping, bbconfig, brctl, date, df, ether-wake, fsck, fsck.minix, hostname, hush, inetd, ionice, ipcrm, ipcs, kbd\_mode, kill, killall, killall5, logread, microcom, mke2fs, mkfs.ext2, mkfs.minix, mkfs.reiser, mount, mountpoint, nameif, nslookup (with own resolver), pgrep, ping6, pivot_root, pkill, rdate, stat, swapon, swapoff, syslogd, traceroute6, ubi*, udhcpd, umount, watchdog, zcip 31 | 32 | (when cherry-picking certain patches you have to include all patches with a lower number as well, there are dependencies between them except for 050 and 051). 33 | 34 | 35 | The **remaining config options** of 'make defconfig' do not build properly. See below for the list of config options and corresponding error. 36 | 37 | The config *android\_ndk\_stericson-like* is a config similar to the one shipped by android-busybox (by stericson). You can download a [binary](https://github.com/downloads/tias/android-busybox-ndk/busybox-ndk-cc1bb603e) built with this config (md5sum ab9f5cd5032af9fa7c20c2e9d0ec047d). 38 | 39 | Config options that do not build, code error 40 | -------------------------------------------- 41 | These errors indicate bugs (usually in the restricted android libc library, called bionic), and can often be fixed by adding patches to the busybox code. 42 | 43 | * All of *Login/Password Management Utilities* -- error: 'struct passwd' has no member named 'pw\_gecos' 44 | * disables CONFIG\_ADD\_SHELL, CONFIG\_REMOVE\_SHELL, CONFIG\_ADDUSER, CONFIG\_ADDGROUP, CONFIG\_DELUSER, CONFIG\_DELGROUP, CONFIG\_GETTY, CONFIG\_LOGIN, CONFIG\_PASSWD, CONFIG\_CRYPTPW, CONFIG\_CHPASSWD, CONFIG\_SU, CONFIG\_SULOGIN, CONFIG\_VLOCK 45 | * CONFIG\_ARPING -- **has patch** -- networking/arping.c:96: error: invalid use of undefined type 'struct arphdr' 46 | * CONFIG\_BRCTL -- **has patch** -- networking/brctl.c:70: error: conflicting types for 'strtotimeval' 47 | * CONFIG\_ETHER\_WAKE -- **has patch** -- networking/ether-wake.c:275: error: 'ETH_ALEN' undeclared (first use in this function) 48 | * CONFIG\_FEATURE\_IPV6 -- **has patch** -- networking/ifconfig.c:82: error: redefinition of 'struct in6\_ifreq' 49 | * disables CONFIG\_PING6, CONFIG\_FEATURE\_IFUPDOWN\_IPV6, CONFIG\_TRACEROUTE6 50 | * CONFIG\_FEATURE\_UTMP, CONFIG\_FEATURE\_WTMP -- init/halt.c:86: error: 'RUN_LVL' undeclared (first use in this function) 51 | * disables CONFIG\_WHO, CONFIG\_USERS, CONFIG\_LAST, CONFIG\_RUNLEVEL, CONFIG\_WALL 52 | * CONFIG\_FSCK\_MINIX, CONFIG\_MKFS\_MINIX -- **has patch** -- util-linux/fsck\_minix.c:111: error: 'INODE\_SIZE1' undeclared here (not in a function) 53 | * CONFIG\_INETD -- **has patch** -- /opt/android-ndk/platforms/android-9/arch-arm/usr/include/linux/un.h:18: error: expected specifier-qualifier-list before 'sa\_family\_t' and networking/inetd.c:562: error: 'struct sockaddr\_un' has no member named 'sun\_path' 54 | * CONFIG\_IONICE -- **has patch** -- miscutils/ionice.c:23: error: 'SYS\_ioprio\_set' undeclared (first use in this function) 55 | * CONFIG\_LFS -- **[on purpose?](http://lists.busybox.net/pipermail/busybox-cvs/2011-November/033019.html)** -- include/libbb.h:256: error: size of array 'BUG\_off\_t\_size\_is\_misdetected' is negative 56 | * CONFIG\_LOGGER -- sysklogd/logger.c:36: error: expected ';', ',' or ')' before '*' token 57 | * CONFIG\_NSLOOKUP -- **has patch (with own resolver)** -- networking/nslookup.c:126: error: dereferencing pointer to incomplete type 58 | * CONFIG\_SWAPONOFF -- **has patch** -- util-linux/swaponoff.c:96: error: 'MNTOPT\_NOAUTO' undeclared (first use in this function) 59 | * CONFIG\_ZCIP -- **has patch** -- networking/zcip.c:51: error: field 'arp' has incomplete type 60 | 61 | Config options that do not build, missing library 62 | ------------------------------------------------- 63 | These errors indicate that the library is missing from androids libc implementation 64 | 65 | * sys/sem.h **has patch** 66 | * CONFIG\_IPCS -- util-linux/ipcs.c:32:21: error: sys/sem.h: No such file or directory 67 | * CONFIG\_LOGREAD -- sysklogd/logread.c:20:21: error: sys/sem.h: No such file or directory 68 | * CONFIG\_SYSLOGD -- sysklogd/syslogd.c:68:21: error: sys/sem.h: No such file or directory 69 | 70 | * sys/kd.h 71 | * CONFIG\_CONSPY -- miscutils/conspy.c:45:20: error: sys/kd.h: No such file or directory 72 | * CONFIG\_LOADFONT, CONFIG\_SETFONT -- console-tools/loadfont.c:33:20: error: sys/kd.h: No such file or directory 73 | 74 | * others 75 | * CONFIG\_EJECT -- miscutils/eject.c:30:21: error: scsi/sg.h: No such file or directory 76 | * CONFIG\_FEATURE\_HAVE\_RPC, CONFIG\_FEATURE\_INETD\_RPC -- networking/inetd.c:176:22: error: rpc/rpc.h: No such file or directory 77 | * CONFIG\_FEATURE\_IFCONFIG\_SLIP -- networking/ifconfig.c:59:26: error: net/if\_slip.h: No such file or directory 78 | * CONFIG\_FEATURE\_SHADOWPASSWDS, CONFIG\_USE\_BB\_SHADOW -- include/libbb.h:61:22: error: shadow.h: No such file or directory 79 | * CONFIG\_HUSH -- **has patch** -- shell/hush.c:89:18: error: glob.h: No such file or directory 80 | * CONFIG\_IFENSLAVE -- networking/ifenslave.c:132:30: error: linux/if\_bonding.h: No such file or directory 81 | * CONFIG\_IFPLUGD -- networking/ifplugd.c:38:23: error: linux/mii.h: No such file or directory 82 | * CONFIG\_IPCRM -- **has patch** -- util-linux/ipcrm.c:25:21: error: sys/shm.h: No such file or directory 83 | * CONFIG\_MT -- miscutils/mt.c:19:22: error: sys/mtio.h: No such file or directory 84 | * CONFIG\_NTPD -- networking/ntpd.c:49:23: error: sys/timex.h: No such file or directory 85 | * CONFIG\_SETARCH -- util-linux/setarch.c:23:29: error: sys/personality.h: No such file or directory 86 | * CONFIG\_WATCHDOG -- **has patch** -- miscutils/watchdog.c:24:28: error: linux/watchdog.h: No such file or directory 87 | * CONFIG\_UBI* -- **has patch** -- miscutils/ubi\_tools.c:67:26: error: mtd/ubi-user.h: No such file or directory 88 | * disables CONFIG\_UBIATTACH, CONFIG\_UBIDETACH, CONFIG\_UBIMKVOL, CONFIG\_UBIRMVOL, CONFIG\_UBIRSVOL, CONFIG\_UBIUPDATEVOL 89 | 90 | Config options that give a linking error 91 | ---------------------------------------- 92 | Androids libc implementation claims to implement the methods in the error, but surprisingly does not. 93 | 94 | * mntent -- **has patch** 95 | * CONFIG\_DF -- undefined reference to 'setmntent', 'endmntent' 96 | * CONFIG\_FSCK -- undefined reference to 'setmntent', 'getmntent\_r', 'endmntent' 97 | * CONFIG\_MKFS\_EXT2 -- undefined reference to 'setmntent', 'endmntent' 98 | * CONFIG\_MOUNTPOINT -- undefined reference to 'setmntent', 'endmntent' 99 | * CONFIG\_MOUNT -- undefined reference to 'setmntent', 'getmntent\_r' 100 | * CONFIG\_UMOUNT -- undefined reference to 'setmntent', 'getmntent\_r', 'endmntent' 101 | 102 | * getsid -- **has patch** 103 | * CONFIG\_KILL -- undefined reference to 'getsid' 104 | * CONFIG\_KILLALL -- undefined reference to 'getsid' 105 | * CONFIG\_KILLALL5 -- undefined reference to 'getsid' 106 | * CONFIG\_PGREP -- undefined reference to 'getsid' 107 | * CONFIG\_PKILL -- undefined reference to 'getsid' 108 | 109 | * stime -- **has patch** 110 | * CONFIG\_DATE -- undefined reference to 'stime' 111 | * CONFIG\_RDATE -- undefined reference to 'stime' 112 | 113 | * others 114 | * CONFIG\_ADJTIMEX -- **has patch** -- undefined reference to 'adjtimex' 115 | * CONFIG\_FEATURE\_HTTPD\_AUTH\_MD5 -- undefined reference to 'crypt' 116 | * CONFIG\_HOSTID -- undefined reference to 'gethostid' 117 | * CONFIG\_HOSTNAME -- **has patch** -- undefined reference to 'sethostname' 118 | * CONFIG\_LOGNAME -- undefined reference to 'getlogin\_r' 119 | * CONFIG\_MICROCOM -- **has patch** -- undefined reference to 'cfsetspeed' 120 | * CONFIG\_NAMEIF -- **has patch** -- undefined reference to 'ether\_aton\_r' 121 | * CONFIG\_PIVOT\_ROOT -- **has patch** -- undefined reference to 'pivot\_root' 122 | * CONFIG\_STAT -- **has patch** -- undefined reference to 'S\_TYPEISMQ', 'S\_TYPEISSEM', 'S\_TYPEISSHM' 123 | * CONFIG\_UDHCPD -- **has patch** -- undefined reference to 'ether\_aton\_r' 124 | -------------------------------------------------------------------------------- /android_ndk_config-w-patches: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated make config: don't edit 3 | # Busybox version: 1.21.0 4 | # Wed Jan 23 21:30:34 2013 5 | # 6 | CONFIG_HAVE_DOT_CONFIG=y 7 | 8 | # 9 | # Busybox Settings 10 | # 11 | 12 | # 13 | # General Configuration 14 | # 15 | CONFIG_DESKTOP=y 16 | # CONFIG_EXTRA_COMPAT is not set 17 | CONFIG_INCLUDE_SUSv2=y 18 | # CONFIG_USE_PORTABLE_CODE is not set 19 | CONFIG_PLATFORM_LINUX=y 20 | CONFIG_FEATURE_BUFFERS_USE_MALLOC=y 21 | # CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set 22 | # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set 23 | CONFIG_SHOW_USAGE=y 24 | CONFIG_FEATURE_VERBOSE_USAGE=y 25 | CONFIG_FEATURE_COMPRESS_USAGE=y 26 | CONFIG_FEATURE_INSTALLER=y 27 | CONFIG_INSTALL_NO_USR=y 28 | # CONFIG_LOCALE_SUPPORT is not set 29 | CONFIG_UNICODE_SUPPORT=y 30 | # CONFIG_UNICODE_USING_LOCALE is not set 31 | # CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set 32 | CONFIG_SUBST_WCHAR=63 33 | CONFIG_LAST_SUPPORTED_WCHAR=767 34 | # CONFIG_UNICODE_COMBINING_WCHARS is not set 35 | # CONFIG_UNICODE_WIDE_WCHARS is not set 36 | # CONFIG_UNICODE_BIDI_SUPPORT is not set 37 | # CONFIG_UNICODE_NEUTRAL_TABLE is not set 38 | # CONFIG_UNICODE_PRESERVE_BROKEN is not set 39 | CONFIG_LONG_OPTS=y 40 | CONFIG_FEATURE_DEVPTS=y 41 | # CONFIG_FEATURE_CLEAN_UP is not set 42 | # CONFIG_FEATURE_UTMP is not set 43 | # CONFIG_FEATURE_WTMP is not set 44 | CONFIG_FEATURE_PIDFILE=y 45 | CONFIG_PID_FILE_PATH="/var/run" 46 | CONFIG_FEATURE_SUID=y 47 | CONFIG_FEATURE_SUID_CONFIG=y 48 | CONFIG_FEATURE_SUID_CONFIG_QUIET=y 49 | # CONFIG_SELINUX is not set 50 | # CONFIG_FEATURE_PREFER_APPLETS is not set 51 | CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" 52 | CONFIG_FEATURE_SYSLOG=y 53 | # CONFIG_FEATURE_HAVE_RPC is not set 54 | 55 | # 56 | # Build Options 57 | # 58 | # CONFIG_STATIC is not set 59 | # CONFIG_PIE is not set 60 | # CONFIG_NOMMU is not set 61 | # CONFIG_BUILD_LIBBUSYBOX is not set 62 | # CONFIG_FEATURE_INDIVIDUAL is not set 63 | # CONFIG_FEATURE_SHARED_BUSYBOX is not set 64 | # CONFIG_LFS is not set 65 | CONFIG_CROSS_COMPILER_PREFIX="arm-linux-androideabi-" 66 | CONFIG_SYSROOT="/opt/android-ndk/platforms/android-9/arch-arm" 67 | CONFIG_EXTRA_CFLAGS="-DANDROID -D__ANDROID__ -DSK_RELEASE -nostdlib -march=armv7-a -msoft-float -mfloat-abi=softfp -mfpu=neon -mthumb -mthumb-interwork -fpic -fno-short-enums -fgcse-after-reload -frename-registers" 68 | CONFIG_EXTRA_LDFLAGS="-Xlinker -z -Xlinker muldefs -nostdlib -Bdynamic -Xlinker -dynamic-linker -Xlinker /system/bin/linker -Xlinker -z -Xlinker nocopyreloc -Xlinker --no-undefined ${SYSROOT}/usr/lib/crtbegin_dynamic.o ${SYSROOT}/usr/lib/crtend_android.o" 69 | CONFIG_EXTRA_LDLIBS="dl m c gcc" 70 | 71 | # 72 | # Debugging Options 73 | # 74 | # CONFIG_DEBUG is not set 75 | # CONFIG_DEBUG_PESSIMIZE is not set 76 | # CONFIG_WERROR is not set 77 | CONFIG_NO_DEBUG_LIB=y 78 | # CONFIG_DMALLOC is not set 79 | # CONFIG_EFENCE is not set 80 | 81 | # 82 | # Installation Options ("make install" behavior) 83 | # 84 | CONFIG_INSTALL_APPLET_SYMLINKS=y 85 | # CONFIG_INSTALL_APPLET_HARDLINKS is not set 86 | # CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set 87 | # CONFIG_INSTALL_APPLET_DONT is not set 88 | # CONFIG_INSTALL_SH_APPLET_SYMLINK is not set 89 | # CONFIG_INSTALL_SH_APPLET_HARDLINK is not set 90 | # CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set 91 | CONFIG_PREFIX="./_install" 92 | 93 | # 94 | # Busybox Library Tuning 95 | # 96 | CONFIG_FEATURE_SYSTEMD=y 97 | CONFIG_FEATURE_RTMINMAX=y 98 | CONFIG_PASSWORD_MINLEN=6 99 | CONFIG_MD5_SMALL=1 100 | CONFIG_SHA3_SMALL=1 101 | CONFIG_FEATURE_FAST_TOP=y 102 | # CONFIG_FEATURE_ETC_NETWORKS is not set 103 | CONFIG_FEATURE_USE_TERMIOS=y 104 | CONFIG_FEATURE_EDITING=y 105 | CONFIG_FEATURE_EDITING_MAX_LEN=1024 106 | # CONFIG_FEATURE_EDITING_VI is not set 107 | CONFIG_FEATURE_EDITING_HISTORY=255 108 | CONFIG_FEATURE_EDITING_SAVEHISTORY=y 109 | # CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set 110 | CONFIG_FEATURE_REVERSE_SEARCH=y 111 | CONFIG_FEATURE_TAB_COMPLETION=y 112 | # CONFIG_FEATURE_USERNAME_COMPLETION is not set 113 | CONFIG_FEATURE_EDITING_FANCY_PROMPT=y 114 | # CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set 115 | CONFIG_FEATURE_NON_POSIX_CP=y 116 | CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y 117 | CONFIG_FEATURE_COPYBUF_KB=4 118 | # CONFIG_FEATURE_SKIP_ROOTFS is not set 119 | # CONFIG_MONOTONIC_SYSCALL is not set 120 | CONFIG_IOCTL_HEX2STR_ERROR=y 121 | CONFIG_FEATURE_HWIB=y 122 | 123 | # 124 | # Applets 125 | # 126 | 127 | # 128 | # Archival Utilities 129 | # 130 | CONFIG_FEATURE_SEAMLESS_XZ=y 131 | CONFIG_FEATURE_SEAMLESS_LZMA=y 132 | CONFIG_FEATURE_SEAMLESS_BZ2=y 133 | CONFIG_FEATURE_SEAMLESS_GZ=y 134 | CONFIG_FEATURE_SEAMLESS_Z=y 135 | CONFIG_AR=y 136 | CONFIG_FEATURE_AR_LONG_FILENAMES=y 137 | CONFIG_FEATURE_AR_CREATE=y 138 | CONFIG_BUNZIP2=y 139 | CONFIG_BZIP2=y 140 | CONFIG_CPIO=y 141 | CONFIG_FEATURE_CPIO_O=y 142 | CONFIG_FEATURE_CPIO_P=y 143 | CONFIG_DPKG=y 144 | CONFIG_DPKG_DEB=y 145 | # CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set 146 | CONFIG_GUNZIP=y 147 | CONFIG_GZIP=y 148 | CONFIG_FEATURE_GZIP_LONG_OPTIONS=y 149 | CONFIG_GZIP_FAST=0 150 | CONFIG_LZOP=y 151 | CONFIG_LZOP_COMPR_HIGH=y 152 | CONFIG_RPM2CPIO=y 153 | CONFIG_RPM=y 154 | CONFIG_TAR=y 155 | CONFIG_FEATURE_TAR_CREATE=y 156 | CONFIG_FEATURE_TAR_AUTODETECT=y 157 | CONFIG_FEATURE_TAR_FROM=y 158 | CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y 159 | CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y 160 | CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y 161 | CONFIG_FEATURE_TAR_LONG_OPTIONS=y 162 | CONFIG_FEATURE_TAR_TO_COMMAND=y 163 | CONFIG_FEATURE_TAR_UNAME_GNAME=y 164 | CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y 165 | # CONFIG_FEATURE_TAR_SELINUX is not set 166 | CONFIG_UNCOMPRESS=y 167 | CONFIG_UNLZMA=y 168 | CONFIG_FEATURE_LZMA_FAST=y 169 | CONFIG_LZMA=y 170 | CONFIG_UNXZ=y 171 | CONFIG_XZ=y 172 | CONFIG_UNZIP=y 173 | 174 | # 175 | # Coreutils 176 | # 177 | CONFIG_BASENAME=y 178 | CONFIG_CAT=y 179 | CONFIG_DATE=y 180 | CONFIG_FEATURE_DATE_ISOFMT=y 181 | # CONFIG_FEATURE_DATE_NANO is not set 182 | CONFIG_FEATURE_DATE_COMPAT=y 183 | # CONFIG_HOSTID is not set 184 | CONFIG_ID=y 185 | CONFIG_GROUPS=y 186 | CONFIG_TEST=y 187 | CONFIG_FEATURE_TEST_64=y 188 | CONFIG_TOUCH=y 189 | CONFIG_FEATURE_TOUCH_SUSV3=y 190 | CONFIG_TR=y 191 | CONFIG_FEATURE_TR_CLASSES=y 192 | CONFIG_FEATURE_TR_EQUIV=y 193 | CONFIG_BASE64=y 194 | # CONFIG_WHO is not set 195 | # CONFIG_USERS is not set 196 | CONFIG_CAL=y 197 | CONFIG_CATV=y 198 | CONFIG_CHGRP=y 199 | CONFIG_CHMOD=y 200 | CONFIG_CHOWN=y 201 | CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y 202 | CONFIG_CHROOT=y 203 | CONFIG_CKSUM=y 204 | CONFIG_COMM=y 205 | CONFIG_CP=y 206 | CONFIG_FEATURE_CP_LONG_OPTIONS=y 207 | CONFIG_CUT=y 208 | CONFIG_DD=y 209 | CONFIG_FEATURE_DD_SIGNAL_HANDLING=y 210 | CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y 211 | CONFIG_FEATURE_DD_IBS_OBS=y 212 | CONFIG_DF=y 213 | CONFIG_FEATURE_DF_FANCY=y 214 | CONFIG_DIRNAME=y 215 | CONFIG_DOS2UNIX=y 216 | CONFIG_UNIX2DOS=y 217 | CONFIG_DU=y 218 | CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y 219 | CONFIG_ECHO=y 220 | CONFIG_FEATURE_FANCY_ECHO=y 221 | CONFIG_ENV=y 222 | CONFIG_FEATURE_ENV_LONG_OPTIONS=y 223 | CONFIG_EXPAND=y 224 | CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y 225 | CONFIG_EXPR=y 226 | CONFIG_EXPR_MATH_SUPPORT_64=y 227 | CONFIG_FALSE=y 228 | CONFIG_FOLD=y 229 | CONFIG_FSYNC=y 230 | CONFIG_HEAD=y 231 | CONFIG_FEATURE_FANCY_HEAD=y 232 | CONFIG_INSTALL=y 233 | CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y 234 | CONFIG_LN=y 235 | # CONFIG_LOGNAME is not set 236 | CONFIG_LS=y 237 | CONFIG_FEATURE_LS_FILETYPES=y 238 | CONFIG_FEATURE_LS_FOLLOWLINKS=y 239 | CONFIG_FEATURE_LS_RECURSIVE=y 240 | CONFIG_FEATURE_LS_SORTFILES=y 241 | CONFIG_FEATURE_LS_TIMESTAMPS=y 242 | CONFIG_FEATURE_LS_USERNAME=y 243 | CONFIG_FEATURE_LS_COLOR=y 244 | CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y 245 | CONFIG_MD5SUM=y 246 | CONFIG_MKDIR=y 247 | CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y 248 | CONFIG_MKFIFO=y 249 | CONFIG_MKNOD=y 250 | CONFIG_MV=y 251 | CONFIG_FEATURE_MV_LONG_OPTIONS=y 252 | CONFIG_NICE=y 253 | CONFIG_NOHUP=y 254 | CONFIG_OD=y 255 | CONFIG_PRINTENV=y 256 | CONFIG_PRINTF=y 257 | CONFIG_PWD=y 258 | CONFIG_READLINK=y 259 | CONFIG_FEATURE_READLINK_FOLLOW=y 260 | CONFIG_REALPATH=y 261 | CONFIG_RM=y 262 | CONFIG_RMDIR=y 263 | CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y 264 | CONFIG_SEQ=y 265 | CONFIG_SHA1SUM=y 266 | CONFIG_SHA256SUM=y 267 | CONFIG_SHA512SUM=y 268 | CONFIG_SHA3SUM=y 269 | CONFIG_SLEEP=y 270 | CONFIG_FEATURE_FANCY_SLEEP=y 271 | CONFIG_FEATURE_FLOAT_SLEEP=y 272 | CONFIG_SORT=y 273 | CONFIG_FEATURE_SORT_BIG=y 274 | CONFIG_SPLIT=y 275 | CONFIG_FEATURE_SPLIT_FANCY=y 276 | CONFIG_STAT=y 277 | CONFIG_FEATURE_STAT_FORMAT=y 278 | CONFIG_STTY=y 279 | CONFIG_SUM=y 280 | CONFIG_SYNC=y 281 | CONFIG_TAC=y 282 | CONFIG_TAIL=y 283 | CONFIG_FEATURE_FANCY_TAIL=y 284 | CONFIG_TEE=y 285 | CONFIG_FEATURE_TEE_USE_BLOCK_IO=y 286 | CONFIG_TRUE=y 287 | CONFIG_TTY=y 288 | CONFIG_UNAME=y 289 | CONFIG_UNEXPAND=y 290 | CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y 291 | CONFIG_UNIQ=y 292 | CONFIG_USLEEP=y 293 | CONFIG_UUDECODE=y 294 | CONFIG_UUENCODE=y 295 | CONFIG_WC=y 296 | CONFIG_FEATURE_WC_LARGE=y 297 | CONFIG_WHOAMI=y 298 | CONFIG_YES=y 299 | 300 | # 301 | # Common options for cp and mv 302 | # 303 | CONFIG_FEATURE_PRESERVE_HARDLINKS=y 304 | 305 | # 306 | # Common options for ls, more and telnet 307 | # 308 | CONFIG_FEATURE_AUTOWIDTH=y 309 | 310 | # 311 | # Common options for df, du, ls 312 | # 313 | CONFIG_FEATURE_HUMAN_READABLE=y 314 | 315 | # 316 | # Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum 317 | # 318 | CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y 319 | 320 | # 321 | # Console Utilities 322 | # 323 | CONFIG_CHVT=y 324 | CONFIG_FGCONSOLE=y 325 | CONFIG_CLEAR=y 326 | CONFIG_DEALLOCVT=y 327 | CONFIG_DUMPKMAP=y 328 | CONFIG_KBD_MODE=y 329 | # CONFIG_LOADFONT is not set 330 | CONFIG_LOADKMAP=y 331 | CONFIG_OPENVT=y 332 | CONFIG_RESET=y 333 | CONFIG_RESIZE=y 334 | CONFIG_FEATURE_RESIZE_PRINT=y 335 | CONFIG_SETCONSOLE=y 336 | CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y 337 | # CONFIG_SETFONT is not set 338 | # CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set 339 | CONFIG_DEFAULT_SETFONT_DIR="" 340 | CONFIG_SETKEYCODES=y 341 | CONFIG_SETLOGCONS=y 342 | CONFIG_SHOWKEY=y 343 | # CONFIG_FEATURE_LOADFONT_PSF2 is not set 344 | # CONFIG_FEATURE_LOADFONT_RAW is not set 345 | 346 | # 347 | # Debian Utilities 348 | # 349 | CONFIG_MKTEMP=y 350 | CONFIG_PIPE_PROGRESS=y 351 | CONFIG_RUN_PARTS=y 352 | CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y 353 | CONFIG_FEATURE_RUN_PARTS_FANCY=y 354 | CONFIG_START_STOP_DAEMON=y 355 | CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y 356 | CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y 357 | CONFIG_WHICH=y 358 | 359 | # 360 | # Editors 361 | # 362 | CONFIG_PATCH=y 363 | CONFIG_VI=y 364 | CONFIG_FEATURE_VI_MAX_LEN=4096 365 | CONFIG_FEATURE_VI_8BIT=y 366 | CONFIG_FEATURE_VI_COLON=y 367 | CONFIG_FEATURE_VI_YANKMARK=y 368 | CONFIG_FEATURE_VI_SEARCH=y 369 | # CONFIG_FEATURE_VI_REGEX_SEARCH is not set 370 | # CONFIG_FEATURE_VI_USE_SIGNALS is not set [Broken for X86, siglongjmp missing from NDK r8b] 371 | CONFIG_FEATURE_VI_DOT_CMD=y 372 | CONFIG_FEATURE_VI_READONLY=y 373 | CONFIG_FEATURE_VI_SETOPTS=y 374 | CONFIG_FEATURE_VI_SET=y 375 | CONFIG_FEATURE_VI_WIN_RESIZE=y 376 | CONFIG_FEATURE_VI_ASK_TERMINAL=y 377 | CONFIG_AWK=y 378 | CONFIG_FEATURE_AWK_LIBM=y 379 | CONFIG_CMP=y 380 | CONFIG_DIFF=y 381 | CONFIG_FEATURE_DIFF_LONG_OPTIONS=y 382 | CONFIG_FEATURE_DIFF_DIR=y 383 | CONFIG_ED=y 384 | CONFIG_SED=y 385 | CONFIG_FEATURE_ALLOW_EXEC=y 386 | 387 | # 388 | # Finding Utilities 389 | # 390 | CONFIG_FIND=y 391 | CONFIG_FEATURE_FIND_PRINT0=y 392 | CONFIG_FEATURE_FIND_MTIME=y 393 | CONFIG_FEATURE_FIND_MMIN=y 394 | CONFIG_FEATURE_FIND_PERM=y 395 | CONFIG_FEATURE_FIND_TYPE=y 396 | CONFIG_FEATURE_FIND_XDEV=y 397 | CONFIG_FEATURE_FIND_MAXDEPTH=y 398 | CONFIG_FEATURE_FIND_NEWER=y 399 | CONFIG_FEATURE_FIND_INUM=y 400 | CONFIG_FEATURE_FIND_EXEC=y 401 | CONFIG_FEATURE_FIND_USER=y 402 | CONFIG_FEATURE_FIND_GROUP=y 403 | CONFIG_FEATURE_FIND_NOT=y 404 | CONFIG_FEATURE_FIND_DEPTH=y 405 | CONFIG_FEATURE_FIND_PAREN=y 406 | CONFIG_FEATURE_FIND_SIZE=y 407 | CONFIG_FEATURE_FIND_PRUNE=y 408 | CONFIG_FEATURE_FIND_DELETE=y 409 | CONFIG_FEATURE_FIND_PATH=y 410 | CONFIG_FEATURE_FIND_REGEX=y 411 | # CONFIG_FEATURE_FIND_CONTEXT is not set 412 | CONFIG_FEATURE_FIND_LINKS=y 413 | CONFIG_GREP=y 414 | CONFIG_FEATURE_GREP_EGREP_ALIAS=y 415 | CONFIG_FEATURE_GREP_FGREP_ALIAS=y 416 | CONFIG_FEATURE_GREP_CONTEXT=y 417 | CONFIG_XARGS=y 418 | CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y 419 | CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y 420 | CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y 421 | CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y 422 | 423 | # 424 | # Init Utilities 425 | # 426 | CONFIG_BOOTCHARTD=y 427 | CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y 428 | CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y 429 | CONFIG_HALT=y 430 | # CONFIG_FEATURE_CALL_TELINIT is not set 431 | CONFIG_TELINIT_PATH="" 432 | CONFIG_INIT=y 433 | CONFIG_FEATURE_USE_INITTAB=y 434 | # CONFIG_FEATURE_KILL_REMOVED is not set 435 | CONFIG_FEATURE_KILL_DELAY=0 436 | CONFIG_FEATURE_INIT_SCTTY=y 437 | CONFIG_FEATURE_INIT_SYSLOG=y 438 | CONFIG_FEATURE_EXTRA_QUIET=y 439 | CONFIG_FEATURE_INIT_COREDUMPS=y 440 | CONFIG_FEATURE_INITRD=y 441 | CONFIG_INIT_TERMINAL_TYPE="linux" 442 | CONFIG_MESG=y 443 | CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y 444 | 445 | # 446 | # Login/Password Management Utilities 447 | # 448 | # CONFIG_ADD_SHELL is not set 449 | # CONFIG_REMOVE_SHELL is not set 450 | # CONFIG_FEATURE_SHADOWPASSWDS is not set 451 | # CONFIG_USE_BB_PWD_GRP is not set 452 | # CONFIG_USE_BB_SHADOW is not set 453 | # CONFIG_USE_BB_CRYPT is not set 454 | # CONFIG_USE_BB_CRYPT_SHA is not set 455 | # CONFIG_ADDUSER is not set 456 | # CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set 457 | # CONFIG_FEATURE_CHECK_NAMES is not set 458 | CONFIG_FIRST_SYSTEM_ID=0 459 | CONFIG_LAST_SYSTEM_ID=0 460 | # CONFIG_ADDGROUP is not set 461 | # CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set 462 | # CONFIG_FEATURE_ADDUSER_TO_GROUP is not set 463 | # CONFIG_DELUSER is not set 464 | # CONFIG_DELGROUP is not set 465 | # CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set 466 | # CONFIG_GETTY is not set 467 | # CONFIG_LOGIN is not set 468 | # CONFIG_LOGIN_SESSION_AS_CHILD is not set 469 | # CONFIG_PAM is not set 470 | # CONFIG_LOGIN_SCRIPTS is not set 471 | # CONFIG_FEATURE_NOLOGIN is not set 472 | # CONFIG_FEATURE_SECURETTY is not set 473 | # CONFIG_PASSWD is not set 474 | # CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set 475 | # CONFIG_CRYPTPW is not set 476 | # CONFIG_CHPASSWD is not set 477 | CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="" 478 | # CONFIG_SU is not set 479 | # CONFIG_FEATURE_SU_SYSLOG is not set 480 | # CONFIG_FEATURE_SU_CHECKS_SHELLS is not set 481 | # CONFIG_SULOGIN is not set 482 | # CONFIG_VLOCK is not set 483 | 484 | # 485 | # Linux Ext2 FS Progs 486 | # 487 | CONFIG_CHATTR=y 488 | CONFIG_FSCK=y 489 | CONFIG_LSATTR=y 490 | CONFIG_TUNE2FS=y 491 | 492 | # 493 | # Linux Module Utilities 494 | # 495 | CONFIG_MODINFO=y 496 | CONFIG_MODPROBE_SMALL=y 497 | CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y 498 | CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y 499 | # CONFIG_INSMOD is not set 500 | # CONFIG_RMMOD is not set 501 | # CONFIG_LSMOD is not set 502 | # CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set 503 | # CONFIG_MODPROBE is not set 504 | # CONFIG_FEATURE_MODPROBE_BLACKLIST is not set 505 | # CONFIG_DEPMOD is not set 506 | 507 | # 508 | # Options common to multiple modutils 509 | # 510 | # CONFIG_FEATURE_2_4_MODULES is not set 511 | # CONFIG_FEATURE_INSMOD_TRY_MMAP is not set 512 | # CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set 513 | # CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set 514 | # CONFIG_FEATURE_INSMOD_LOADINKMEM is not set 515 | # CONFIG_FEATURE_INSMOD_LOAD_MAP is not set 516 | # CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set 517 | # CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set 518 | # CONFIG_FEATURE_MODUTILS_ALIAS is not set 519 | # CONFIG_FEATURE_MODUTILS_SYMBOLS is not set 520 | CONFIG_DEFAULT_MODULES_DIR="/system/lib/modules" 521 | CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" 522 | 523 | # 524 | # Linux System Utilities 525 | # 526 | CONFIG_BLOCKDEV=y 527 | CONFIG_MDEV=y 528 | CONFIG_FEATURE_MDEV_CONF=y 529 | CONFIG_FEATURE_MDEV_RENAME=y 530 | CONFIG_FEATURE_MDEV_RENAME_REGEXP=y 531 | CONFIG_FEATURE_MDEV_EXEC=y 532 | CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y 533 | CONFIG_REV=y 534 | CONFIG_ACPID=y 535 | CONFIG_FEATURE_ACPID_COMPAT=y 536 | CONFIG_BLKID=y 537 | CONFIG_FEATURE_BLKID_TYPE=y 538 | CONFIG_DMESG=y 539 | CONFIG_FEATURE_DMESG_PRETTY=y 540 | CONFIG_FBSET=y 541 | CONFIG_FEATURE_FBSET_FANCY=y 542 | CONFIG_FEATURE_FBSET_READMODE=y 543 | CONFIG_FDFLUSH=y 544 | CONFIG_FDFORMAT=y 545 | CONFIG_FDISK=y 546 | CONFIG_FDISK_SUPPORT_LARGE_DISKS=y 547 | CONFIG_FEATURE_FDISK_WRITABLE=y 548 | CONFIG_FEATURE_AIX_LABEL=y 549 | CONFIG_FEATURE_SGI_LABEL=y 550 | CONFIG_FEATURE_SUN_LABEL=y 551 | CONFIG_FEATURE_OSF_LABEL=y 552 | CONFIG_FEATURE_GPT_LABEL=y 553 | CONFIG_FEATURE_FDISK_ADVANCED=y 554 | CONFIG_FINDFS=y 555 | CONFIG_FLOCK=y 556 | CONFIG_FREERAMDISK=y 557 | CONFIG_FSCK_MINIX=y 558 | CONFIG_MKFS_EXT2=y 559 | CONFIG_MKFS_MINIX=y 560 | CONFIG_FEATURE_MINIX2=y 561 | CONFIG_MKFS_REISER=y 562 | CONFIG_MKFS_VFAT=y 563 | CONFIG_GETOPT=y 564 | CONFIG_FEATURE_GETOPT_LONG=y 565 | CONFIG_HEXDUMP=y 566 | CONFIG_FEATURE_HEXDUMP_REVERSE=y 567 | CONFIG_HD=y 568 | CONFIG_HWCLOCK=y 569 | CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y 570 | # CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set 571 | CONFIG_IPCRM=y 572 | CONFIG_IPCS=y 573 | CONFIG_LOSETUP=y 574 | CONFIG_LSPCI=y 575 | CONFIG_LSUSB=y 576 | CONFIG_MKSWAP=y 577 | CONFIG_FEATURE_MKSWAP_UUID=y 578 | CONFIG_MORE=y 579 | CONFIG_MOUNT=y 580 | CONFIG_FEATURE_MOUNT_FAKE=y 581 | CONFIG_FEATURE_MOUNT_VERBOSE=y 582 | CONFIG_FEATURE_MOUNT_HELPERS=y 583 | CONFIG_FEATURE_MOUNT_LABEL=y 584 | # CONFIG_FEATURE_MOUNT_NFS is not set 585 | # CONFIG_FEATURE_MOUNT_CIFS is not set 586 | CONFIG_FEATURE_MOUNT_FLAGS=y 587 | CONFIG_FEATURE_MOUNT_FSTAB=y 588 | CONFIG_PIVOT_ROOT=y 589 | CONFIG_RDATE=y 590 | CONFIG_RDEV=y 591 | CONFIG_READPROFILE=y 592 | CONFIG_RTCWAKE=y 593 | CONFIG_SCRIPT=y 594 | CONFIG_SCRIPTREPLAY=y 595 | # CONFIG_SETARCH is not set 596 | CONFIG_SWAPONOFF=y 597 | # CONFIG_FEATURE_SWAPON_PRI is not set 598 | CONFIG_SWITCH_ROOT=y 599 | CONFIG_UMOUNT=y 600 | CONFIG_FEATURE_UMOUNT_ALL=y 601 | 602 | # 603 | # Common options for mount/umount 604 | # 605 | CONFIG_FEATURE_MOUNT_LOOP=y 606 | CONFIG_FEATURE_MOUNT_LOOP_CREATE=y 607 | # CONFIG_FEATURE_MTAB_SUPPORT is not set 608 | CONFIG_VOLUMEID=y 609 | 610 | # 611 | # Filesystem/Volume identification 612 | # 613 | CONFIG_FEATURE_VOLUMEID_EXT=y 614 | CONFIG_FEATURE_VOLUMEID_BTRFS=y 615 | CONFIG_FEATURE_VOLUMEID_REISERFS=y 616 | CONFIG_FEATURE_VOLUMEID_FAT=y 617 | CONFIG_FEATURE_VOLUMEID_EXFAT=y 618 | CONFIG_FEATURE_VOLUMEID_HFS=y 619 | CONFIG_FEATURE_VOLUMEID_JFS=y 620 | CONFIG_FEATURE_VOLUMEID_XFS=y 621 | CONFIG_FEATURE_VOLUMEID_NILFS=y 622 | CONFIG_FEATURE_VOLUMEID_NTFS=y 623 | CONFIG_FEATURE_VOLUMEID_ISO9660=y 624 | CONFIG_FEATURE_VOLUMEID_UDF=y 625 | CONFIG_FEATURE_VOLUMEID_LUKS=y 626 | CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y 627 | CONFIG_FEATURE_VOLUMEID_CRAMFS=y 628 | CONFIG_FEATURE_VOLUMEID_ROMFS=y 629 | CONFIG_FEATURE_VOLUMEID_SQUASHFS=y 630 | CONFIG_FEATURE_VOLUMEID_SYSV=y 631 | CONFIG_FEATURE_VOLUMEID_OCFS2=y 632 | CONFIG_FEATURE_VOLUMEID_LINUXRAID=y 633 | 634 | # 635 | # Miscellaneous Utilities 636 | # 637 | # CONFIG_CONSPY is not set 638 | CONFIG_LESS=y 639 | CONFIG_FEATURE_LESS_MAXLINES=9999999 640 | CONFIG_FEATURE_LESS_BRACKETS=y 641 | CONFIG_FEATURE_LESS_FLAGS=y 642 | CONFIG_FEATURE_LESS_MARKS=y 643 | CONFIG_FEATURE_LESS_REGEXP=y 644 | CONFIG_FEATURE_LESS_WINCH=y 645 | CONFIG_FEATURE_LESS_ASK_TERMINAL=y 646 | CONFIG_FEATURE_LESS_DASHCMD=y 647 | CONFIG_FEATURE_LESS_LINENUMS=y 648 | CONFIG_NANDWRITE=y 649 | CONFIG_NANDDUMP=y 650 | CONFIG_SETSERIAL=y 651 | CONFIG_UBIATTACH=y 652 | CONFIG_UBIDETACH=y 653 | CONFIG_UBIMKVOL=y 654 | CONFIG_UBIRMVOL=y 655 | CONFIG_UBIRSVOL=y 656 | CONFIG_UBIUPDATEVOL=y 657 | CONFIG_ADJTIMEX=y 658 | CONFIG_BBCONFIG=y 659 | CONFIG_FEATURE_COMPRESS_BBCONFIG=y 660 | CONFIG_BEEP=y 661 | CONFIG_FEATURE_BEEP_FREQ=4000 662 | CONFIG_FEATURE_BEEP_LENGTH_MS=30 663 | CONFIG_CHAT=y 664 | CONFIG_FEATURE_CHAT_NOFAIL=y 665 | # CONFIG_FEATURE_CHAT_TTY_HIFI is not set 666 | CONFIG_FEATURE_CHAT_IMPLICIT_CR=y 667 | CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y 668 | CONFIG_FEATURE_CHAT_SEND_ESCAPES=y 669 | CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y 670 | CONFIG_FEATURE_CHAT_CLR_ABORT=y 671 | CONFIG_CHRT=y 672 | CONFIG_CROND=y 673 | CONFIG_FEATURE_CROND_D=y 674 | CONFIG_FEATURE_CROND_CALL_SENDMAIL=y 675 | CONFIG_FEATURE_CROND_DIR="/var/spool/cron" 676 | CONFIG_CRONTAB=y 677 | CONFIG_DC=y 678 | CONFIG_FEATURE_DC_LIBM=y 679 | # CONFIG_DEVFSD is not set 680 | # CONFIG_DEVFSD_MODLOAD is not set 681 | # CONFIG_DEVFSD_FG_NP is not set 682 | # CONFIG_DEVFSD_VERBOSE is not set 683 | # CONFIG_FEATURE_DEVFS is not set 684 | CONFIG_DEVMEM=y 685 | # CONFIG_EJECT is not set 686 | # CONFIG_FEATURE_EJECT_SCSI is not set 687 | CONFIG_FBSPLASH=y 688 | CONFIG_FLASHCP=y 689 | CONFIG_FLASH_LOCK=y 690 | CONFIG_FLASH_UNLOCK=y 691 | # CONFIG_FLASH_ERASEALL is not set 692 | CONFIG_IONICE=y 693 | CONFIG_INOTIFYD=y 694 | # CONFIG_LAST is not set 695 | # CONFIG_FEATURE_LAST_SMALL is not set 696 | # CONFIG_FEATURE_LAST_FANCY is not set 697 | CONFIG_HDPARM=y 698 | CONFIG_FEATURE_HDPARM_GET_IDENTITY=y 699 | CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y 700 | CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y 701 | CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y 702 | CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y 703 | CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y 704 | CONFIG_MAKEDEVS=y 705 | # CONFIG_FEATURE_MAKEDEVS_LEAF is not set 706 | CONFIG_FEATURE_MAKEDEVS_TABLE=y 707 | CONFIG_MAN=y 708 | CONFIG_MICROCOM=y 709 | CONFIG_MOUNTPOINT=y 710 | # CONFIG_MT is not set 711 | CONFIG_RAIDAUTORUN=y 712 | # CONFIG_READAHEAD is not set 713 | # CONFIG_RFKILL is not set 714 | # CONFIG_RUNLEVEL is not set 715 | CONFIG_RX=y 716 | CONFIG_SETSID=y 717 | CONFIG_STRINGS=y 718 | # CONFIG_TASKSET is not set 719 | # CONFIG_FEATURE_TASKSET_FANCY is not set 720 | CONFIG_TIME=y 721 | CONFIG_TIMEOUT=y 722 | CONFIG_TTYSIZE=y 723 | CONFIG_VOLNAME=y 724 | # CONFIG_WALL is not set 725 | CONFIG_WATCHDOG=y 726 | 727 | # 728 | # Networking Utilities 729 | # 730 | CONFIG_NAMEIF=y 731 | CONFIG_FEATURE_NAMEIF_EXTENDED=y 732 | CONFIG_NBDCLIENT=y 733 | CONFIG_NC=y 734 | CONFIG_NC_SERVER=y 735 | CONFIG_NC_EXTRA=y 736 | # CONFIG_NC_110_COMPAT is not set 737 | CONFIG_PING=y 738 | CONFIG_PING6=y 739 | CONFIG_FEATURE_FANCY_PING=y 740 | CONFIG_WHOIS=y 741 | CONFIG_FEATURE_IPV6=y 742 | # CONFIG_FEATURE_UNIX_LOCAL is not set 743 | CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y 744 | CONFIG_VERBOSE_RESOLUTION_ERRORS=y 745 | CONFIG_ARP=y 746 | CONFIG_ARPING=y 747 | CONFIG_BRCTL=y 748 | CONFIG_FEATURE_BRCTL_FANCY=y 749 | CONFIG_FEATURE_BRCTL_SHOW=y 750 | CONFIG_DNSD=y 751 | CONFIG_ETHER_WAKE=y 752 | CONFIG_FAKEIDENTD=y 753 | CONFIG_FTPD=y 754 | CONFIG_FEATURE_FTP_WRITE=y 755 | CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y 756 | CONFIG_FTPGET=y 757 | CONFIG_FTPPUT=y 758 | CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y 759 | CONFIG_HOSTNAME=y 760 | CONFIG_HTTPD=y 761 | CONFIG_FEATURE_HTTPD_RANGES=y 762 | CONFIG_FEATURE_HTTPD_USE_SENDFILE=y 763 | CONFIG_FEATURE_HTTPD_SETUID=y 764 | CONFIG_FEATURE_HTTPD_BASIC_AUTH=y 765 | # CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set 766 | CONFIG_FEATURE_HTTPD_CGI=y 767 | CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y 768 | CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y 769 | CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y 770 | CONFIG_FEATURE_HTTPD_ERROR_PAGES=y 771 | CONFIG_FEATURE_HTTPD_PROXY=y 772 | CONFIG_FEATURE_HTTPD_GZIP=y 773 | CONFIG_IFCONFIG=y 774 | CONFIG_FEATURE_IFCONFIG_STATUS=y 775 | # CONFIG_FEATURE_IFCONFIG_SLIP is not set 776 | CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y 777 | CONFIG_FEATURE_IFCONFIG_HW=y 778 | CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y 779 | # CONFIG_IFENSLAVE is not set 780 | # CONFIG_IFPLUGD is not set 781 | CONFIG_IFUPDOWN=y 782 | CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" 783 | CONFIG_FEATURE_IFUPDOWN_IP=y 784 | CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y 785 | # CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set 786 | CONFIG_FEATURE_IFUPDOWN_IPV4=y 787 | CONFIG_FEATURE_IFUPDOWN_IPV6=y 788 | CONFIG_FEATURE_IFUPDOWN_MAPPING=y 789 | CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y 790 | CONFIG_INETD=y 791 | CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y 792 | CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y 793 | CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y 794 | CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y 795 | CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y 796 | # CONFIG_FEATURE_INETD_RPC is not set 797 | CONFIG_IP=y 798 | CONFIG_FEATURE_IP_ADDRESS=y 799 | CONFIG_FEATURE_IP_LINK=y 800 | CONFIG_FEATURE_IP_ROUTE=y 801 | CONFIG_FEATURE_IP_TUNNEL=y 802 | CONFIG_FEATURE_IP_RULE=y 803 | CONFIG_FEATURE_IP_SHORT_FORMS=y 804 | CONFIG_FEATURE_IP_RARE_PROTOCOLS=y 805 | CONFIG_IPADDR=y 806 | CONFIG_IPLINK=y 807 | CONFIG_IPROUTE=y 808 | CONFIG_IPTUNNEL=y 809 | CONFIG_IPRULE=y 810 | CONFIG_IPCALC=y 811 | CONFIG_FEATURE_IPCALC_FANCY=y 812 | CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y 813 | CONFIG_NETSTAT=y 814 | CONFIG_FEATURE_NETSTAT_WIDE=y 815 | CONFIG_FEATURE_NETSTAT_PRG=y 816 | CONFIG_NSLOOKUP=y 817 | # CONFIG_NTPD is not set 818 | # CONFIG_FEATURE_NTPD_SERVER is not set 819 | CONFIG_PSCAN=y 820 | CONFIG_ROUTE=y 821 | CONFIG_SLATTACH=y 822 | CONFIG_TCPSVD=y 823 | CONFIG_TELNET=y 824 | CONFIG_FEATURE_TELNET_TTYPE=y 825 | CONFIG_FEATURE_TELNET_AUTOLOGIN=y 826 | CONFIG_TELNETD=y 827 | CONFIG_FEATURE_TELNETD_STANDALONE=y 828 | CONFIG_FEATURE_TELNETD_INETD_WAIT=y 829 | CONFIG_TFTP=y 830 | CONFIG_TFTPD=y 831 | 832 | # 833 | # Common options for tftp/tftpd 834 | # 835 | CONFIG_FEATURE_TFTP_GET=y 836 | CONFIG_FEATURE_TFTP_PUT=y 837 | CONFIG_FEATURE_TFTP_BLOCKSIZE=y 838 | CONFIG_FEATURE_TFTP_PROGRESS_BAR=y 839 | # CONFIG_TFTP_DEBUG is not set 840 | CONFIG_TRACEROUTE=y 841 | CONFIG_TRACEROUTE6=y 842 | CONFIG_FEATURE_TRACEROUTE_VERBOSE=y 843 | # CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set 844 | # CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set 845 | CONFIG_TUNCTL=y 846 | CONFIG_FEATURE_TUNCTL_UG=y 847 | # CONFIG_UDHCPC6 is not set 848 | CONFIG_UDHCPD=y 849 | CONFIG_DHCPRELAY=y 850 | CONFIG_DUMPLEASES=y 851 | CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y 852 | # CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set 853 | CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases" 854 | CONFIG_UDHCPC=y 855 | CONFIG_FEATURE_UDHCPC_ARPING=y 856 | CONFIG_FEATURE_UDHCP_PORT=y 857 | CONFIG_UDHCP_DEBUG=9 858 | CONFIG_FEATURE_UDHCP_RFC3397=y 859 | CONFIG_FEATURE_UDHCP_8021Q=y 860 | CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" 861 | CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 862 | CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" 863 | CONFIG_UDPSVD=y 864 | CONFIG_VCONFIG=y 865 | CONFIG_WGET=y 866 | CONFIG_FEATURE_WGET_STATUSBAR=y 867 | CONFIG_FEATURE_WGET_AUTHENTICATION=y 868 | CONFIG_FEATURE_WGET_LONG_OPTIONS=y 869 | CONFIG_FEATURE_WGET_TIMEOUT=y 870 | CONFIG_ZCIP=y 871 | 872 | # 873 | # Print Utilities 874 | # 875 | CONFIG_LPD=y 876 | CONFIG_LPR=y 877 | CONFIG_LPQ=y 878 | 879 | # 880 | # Mail Utilities 881 | # 882 | CONFIG_MAKEMIME=y 883 | CONFIG_FEATURE_MIME_CHARSET="us-ascii" 884 | CONFIG_POPMAILDIR=y 885 | CONFIG_FEATURE_POPMAILDIR_DELIVERY=y 886 | CONFIG_REFORMIME=y 887 | CONFIG_FEATURE_REFORMIME_COMPAT=y 888 | CONFIG_SENDMAIL=y 889 | 890 | # 891 | # Process Utilities 892 | # 893 | CONFIG_IOSTAT=y 894 | CONFIG_LSOF=y 895 | CONFIG_MPSTAT=y 896 | CONFIG_NMETER=y 897 | CONFIG_PMAP=y 898 | CONFIG_POWERTOP=y 899 | CONFIG_PSTREE=y 900 | CONFIG_PWDX=y 901 | CONFIG_SMEMCAP=y 902 | CONFIG_UPTIME=y 903 | # CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set 904 | CONFIG_FREE=y 905 | CONFIG_FUSER=y 906 | CONFIG_KILL=y 907 | CONFIG_KILLALL=y 908 | CONFIG_KILLALL5=y 909 | CONFIG_PGREP=y 910 | CONFIG_PIDOF=y 911 | CONFIG_FEATURE_PIDOF_SINGLE=y 912 | CONFIG_FEATURE_PIDOF_OMIT=y 913 | CONFIG_PKILL=y 914 | CONFIG_PS=y 915 | # CONFIG_FEATURE_PS_WIDE is not set 916 | # CONFIG_FEATURE_PS_LONG is not set 917 | CONFIG_FEATURE_PS_TIME=y 918 | CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y 919 | # CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set 920 | CONFIG_RENICE=y 921 | CONFIG_BB_SYSCTL=y 922 | CONFIG_TOP=y 923 | CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y 924 | CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y 925 | CONFIG_FEATURE_TOP_SMP_CPU=y 926 | CONFIG_FEATURE_TOP_DECIMALS=y 927 | CONFIG_FEATURE_TOP_SMP_PROCESS=y 928 | CONFIG_FEATURE_TOPMEM=y 929 | CONFIG_FEATURE_SHOW_THREADS=y 930 | CONFIG_WATCH=y 931 | 932 | # 933 | # Runit Utilities 934 | # 935 | CONFIG_RUNSV=y 936 | CONFIG_RUNSVDIR=y 937 | # CONFIG_FEATURE_RUNSVDIR_LOG is not set 938 | CONFIG_SV=y 939 | CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service" 940 | CONFIG_SVLOGD=y 941 | CONFIG_CHPST=y 942 | CONFIG_SETUIDGID=y 943 | CONFIG_ENVUIDGID=y 944 | CONFIG_ENVDIR=y 945 | CONFIG_SOFTLIMIT=y 946 | # CONFIG_CHCON is not set 947 | # CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set 948 | # CONFIG_GETENFORCE is not set 949 | # CONFIG_GETSEBOOL is not set 950 | # CONFIG_LOAD_POLICY is not set 951 | # CONFIG_MATCHPATHCON is not set 952 | # CONFIG_RESTORECON is not set 953 | # CONFIG_RUNCON is not set 954 | # CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set 955 | # CONFIG_SELINUXENABLED is not set 956 | # CONFIG_SETENFORCE is not set 957 | # CONFIG_SETFILES is not set 958 | # CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set 959 | # CONFIG_SETSEBOOL is not set 960 | # CONFIG_SESTATUS is not set 961 | 962 | # 963 | # Shells 964 | # 965 | CONFIG_ASH=y 966 | CONFIG_ASH_BASH_COMPAT=y 967 | # CONFIG_ASH_IDLE_TIMEOUT is not set 968 | CONFIG_ASH_JOB_CONTROL=y 969 | CONFIG_ASH_ALIAS=y 970 | CONFIG_ASH_GETOPTS=y 971 | CONFIG_ASH_BUILTIN_ECHO=y 972 | CONFIG_ASH_BUILTIN_PRINTF=y 973 | CONFIG_ASH_BUILTIN_TEST=y 974 | CONFIG_ASH_CMDCMD=y 975 | # CONFIG_ASH_MAIL is not set 976 | CONFIG_ASH_OPTIMIZE_FOR_SIZE=y 977 | CONFIG_ASH_RANDOM_SUPPORT=y 978 | CONFIG_ASH_EXPAND_PRMT=y 979 | CONFIG_CTTYHACK=y 980 | CONFIG_HUSH=y 981 | CONFIG_HUSH_BASH_COMPAT=y 982 | CONFIG_HUSH_BRACE_EXPANSION=y 983 | CONFIG_HUSH_HELP=y 984 | CONFIG_HUSH_INTERACTIVE=y 985 | CONFIG_HUSH_SAVEHISTORY=y 986 | CONFIG_HUSH_JOB=y 987 | CONFIG_HUSH_TICK=y 988 | CONFIG_HUSH_IF=y 989 | CONFIG_HUSH_LOOPS=y 990 | CONFIG_HUSH_CASE=y 991 | CONFIG_HUSH_FUNCTIONS=y 992 | CONFIG_HUSH_LOCAL=y 993 | CONFIG_HUSH_RANDOM_SUPPORT=y 994 | CONFIG_HUSH_EXPORT_N=y 995 | CONFIG_HUSH_MODE_X=y 996 | # CONFIG_MSH is not set 997 | CONFIG_FEATURE_SH_IS_ASH=y 998 | # CONFIG_FEATURE_SH_IS_HUSH is not set 999 | # CONFIG_FEATURE_SH_IS_NONE is not set 1000 | # CONFIG_FEATURE_BASH_IS_ASH is not set 1001 | # CONFIG_FEATURE_BASH_IS_HUSH is not set 1002 | CONFIG_FEATURE_BASH_IS_NONE=y 1003 | CONFIG_SH_MATH_SUPPORT=y 1004 | CONFIG_SH_MATH_SUPPORT_64=y 1005 | CONFIG_FEATURE_SH_EXTRA_QUIET=y 1006 | # CONFIG_FEATURE_SH_STANDALONE is not set 1007 | # CONFIG_FEATURE_SH_NOFORK is not set 1008 | CONFIG_FEATURE_SH_HISTFILESIZE=y 1009 | 1010 | # 1011 | # System Logging Utilities 1012 | # 1013 | CONFIG_SYSLOGD=y 1014 | CONFIG_FEATURE_ROTATE_LOGFILE=y 1015 | CONFIG_FEATURE_REMOTE_LOG=y 1016 | CONFIG_FEATURE_SYSLOGD_DUP=y 1017 | CONFIG_FEATURE_SYSLOGD_CFG=y 1018 | CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 1019 | CONFIG_FEATURE_IPC_SYSLOG=y 1020 | CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16 1021 | CONFIG_LOGREAD=y 1022 | CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y 1023 | CONFIG_FEATURE_KMSG_SYSLOG=y 1024 | CONFIG_KLOGD=y 1025 | CONFIG_FEATURE_KLOGD_KLOGCTL=y 1026 | # CONFIG_LOGGER is not set 1027 | -------------------------------------------------------------------------------- /android_ndk_defconfigPlus: -------------------------------------------------------------------------------- 1 | # 2 | # Automatically generated make config: don't edit 3 | # Busybox version: 1.21.0 4 | # Wed Jan 23 21:30:34 2013 5 | # 6 | CONFIG_HAVE_DOT_CONFIG=y 7 | 8 | # 9 | # Busybox Settings 10 | # 11 | 12 | # 13 | # General Configuration 14 | # 15 | CONFIG_DESKTOP=y 16 | # CONFIG_EXTRA_COMPAT is not set 17 | CONFIG_INCLUDE_SUSv2=y 18 | # CONFIG_USE_PORTABLE_CODE is not set 19 | CONFIG_PLATFORM_LINUX=y 20 | CONFIG_FEATURE_BUFFERS_USE_MALLOC=y 21 | # CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set 22 | # CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set 23 | CONFIG_SHOW_USAGE=y 24 | CONFIG_FEATURE_VERBOSE_USAGE=y 25 | CONFIG_FEATURE_COMPRESS_USAGE=y 26 | CONFIG_FEATURE_INSTALLER=y 27 | CONFIG_INSTALL_NO_USR=y 28 | # CONFIG_LOCALE_SUPPORT is not set 29 | CONFIG_UNICODE_SUPPORT=y 30 | # CONFIG_UNICODE_USING_LOCALE is not set 31 | # CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set 32 | CONFIG_SUBST_WCHAR=63 33 | CONFIG_LAST_SUPPORTED_WCHAR=767 34 | # CONFIG_UNICODE_COMBINING_WCHARS is not set 35 | # CONFIG_UNICODE_WIDE_WCHARS is not set 36 | # CONFIG_UNICODE_BIDI_SUPPORT is not set 37 | # CONFIG_UNICODE_NEUTRAL_TABLE is not set 38 | # CONFIG_UNICODE_PRESERVE_BROKEN is not set 39 | CONFIG_LONG_OPTS=y 40 | CONFIG_FEATURE_DEVPTS=y 41 | # CONFIG_FEATURE_CLEAN_UP is not set 42 | # CONFIG_FEATURE_UTMP is not set 43 | # CONFIG_FEATURE_WTMP is not set 44 | CONFIG_FEATURE_PIDFILE=y 45 | CONFIG_PID_FILE_PATH="/var/run" 46 | CONFIG_FEATURE_SUID=y 47 | CONFIG_FEATURE_SUID_CONFIG=y 48 | CONFIG_FEATURE_SUID_CONFIG_QUIET=y 49 | # CONFIG_SELINUX is not set 50 | # CONFIG_FEATURE_PREFER_APPLETS is not set 51 | CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" 52 | CONFIG_FEATURE_SYSLOG=y 53 | # CONFIG_FEATURE_HAVE_RPC is not set 54 | 55 | # 56 | # Build Options 57 | # 58 | # CONFIG_STATIC is not set 59 | # CONFIG_PIE is not set 60 | # CONFIG_NOMMU is not set 61 | # CONFIG_BUILD_LIBBUSYBOX is not set 62 | # CONFIG_FEATURE_INDIVIDUAL is not set 63 | # CONFIG_FEATURE_SHARED_BUSYBOX is not set 64 | # CONFIG_LFS is not set 65 | CONFIG_CROSS_COMPILER_PREFIX="arm-linux-androideabi-" 66 | CONFIG_SYSROOT="/opt/android-ndk/platforms/android-9/arch-arm" 67 | CONFIG_EXTRA_CFLAGS="-DANDROID -D__ANDROID__ -DSK_RELEASE -nostdlib -march=armv7-a -msoft-float -mfloat-abi=softfp -mfpu=neon -mthumb -mthumb-interwork -fpic -fno-short-enums -fgcse-after-reload -frename-registers" 68 | CONFIG_EXTRA_LDFLAGS="-Xlinker -z -Xlinker muldefs -nostdlib -Bdynamic -Xlinker -dynamic-linker -Xlinker /system/bin/linker -Xlinker -z -Xlinker nocopyreloc -Xlinker --no-undefined ${SYSROOT}/usr/lib/crtbegin_dynamic.o ${SYSROOT}/usr/lib/crtend_android.o" 69 | CONFIG_EXTRA_LDLIBS="dl m c gcc" 70 | 71 | # 72 | # Debugging Options 73 | # 74 | # CONFIG_DEBUG is not set 75 | # CONFIG_DEBUG_PESSIMIZE is not set 76 | # CONFIG_WERROR is not set 77 | CONFIG_NO_DEBUG_LIB=y 78 | # CONFIG_DMALLOC is not set 79 | # CONFIG_EFENCE is not set 80 | 81 | # 82 | # Installation Options ("make install" behavior) 83 | # 84 | CONFIG_INSTALL_APPLET_SYMLINKS=y 85 | # CONFIG_INSTALL_APPLET_HARDLINKS is not set 86 | # CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set 87 | # CONFIG_INSTALL_APPLET_DONT is not set 88 | # CONFIG_INSTALL_SH_APPLET_SYMLINK is not set 89 | # CONFIG_INSTALL_SH_APPLET_HARDLINK is not set 90 | # CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set 91 | CONFIG_PREFIX="./_install" 92 | 93 | # 94 | # Busybox Library Tuning 95 | # 96 | CONFIG_FEATURE_SYSTEMD=y 97 | CONFIG_FEATURE_RTMINMAX=y 98 | CONFIG_PASSWORD_MINLEN=6 99 | CONFIG_MD5_SMALL=1 100 | CONFIG_SHA3_SMALL=1 101 | CONFIG_FEATURE_FAST_TOP=y 102 | # CONFIG_FEATURE_ETC_NETWORKS is not set 103 | CONFIG_FEATURE_USE_TERMIOS=y 104 | CONFIG_FEATURE_EDITING=y 105 | CONFIG_FEATURE_EDITING_MAX_LEN=1024 106 | # CONFIG_FEATURE_EDITING_VI is not set 107 | CONFIG_FEATURE_EDITING_HISTORY=255 108 | CONFIG_FEATURE_EDITING_SAVEHISTORY=y 109 | # CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set 110 | CONFIG_FEATURE_REVERSE_SEARCH=y 111 | CONFIG_FEATURE_TAB_COMPLETION=y 112 | # CONFIG_FEATURE_USERNAME_COMPLETION is not set 113 | CONFIG_FEATURE_EDITING_FANCY_PROMPT=y 114 | # CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set 115 | CONFIG_FEATURE_NON_POSIX_CP=y 116 | CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y 117 | CONFIG_FEATURE_COPYBUF_KB=4 118 | # CONFIG_FEATURE_SKIP_ROOTFS is not set 119 | # CONFIG_MONOTONIC_SYSCALL is not set 120 | CONFIG_IOCTL_HEX2STR_ERROR=y 121 | CONFIG_FEATURE_HWIB=y 122 | 123 | # 124 | # Applets 125 | # 126 | 127 | # 128 | # Archival Utilities 129 | # 130 | CONFIG_FEATURE_SEAMLESS_XZ=y 131 | CONFIG_FEATURE_SEAMLESS_LZMA=y 132 | CONFIG_FEATURE_SEAMLESS_BZ2=y 133 | CONFIG_FEATURE_SEAMLESS_GZ=y 134 | CONFIG_FEATURE_SEAMLESS_Z=y 135 | CONFIG_AR=y 136 | CONFIG_FEATURE_AR_LONG_FILENAMES=y 137 | CONFIG_FEATURE_AR_CREATE=y 138 | CONFIG_BUNZIP2=y 139 | CONFIG_BZIP2=y 140 | CONFIG_CPIO=y 141 | CONFIG_FEATURE_CPIO_O=y 142 | CONFIG_FEATURE_CPIO_P=y 143 | CONFIG_DPKG=y 144 | CONFIG_DPKG_DEB=y 145 | # CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set 146 | CONFIG_GUNZIP=y 147 | CONFIG_GZIP=y 148 | CONFIG_FEATURE_GZIP_LONG_OPTIONS=y 149 | CONFIG_GZIP_FAST=0 150 | CONFIG_LZOP=y 151 | CONFIG_LZOP_COMPR_HIGH=y 152 | CONFIG_RPM2CPIO=y 153 | CONFIG_RPM=y 154 | CONFIG_TAR=y 155 | CONFIG_FEATURE_TAR_CREATE=y 156 | CONFIG_FEATURE_TAR_AUTODETECT=y 157 | CONFIG_FEATURE_TAR_FROM=y 158 | CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y 159 | CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY=y 160 | CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y 161 | CONFIG_FEATURE_TAR_LONG_OPTIONS=y 162 | CONFIG_FEATURE_TAR_TO_COMMAND=y 163 | CONFIG_FEATURE_TAR_UNAME_GNAME=y 164 | CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y 165 | # CONFIG_FEATURE_TAR_SELINUX is not set 166 | CONFIG_UNCOMPRESS=y 167 | CONFIG_UNLZMA=y 168 | CONFIG_FEATURE_LZMA_FAST=y 169 | CONFIG_LZMA=y 170 | CONFIG_UNXZ=y 171 | CONFIG_XZ=y 172 | CONFIG_UNZIP=y 173 | 174 | # 175 | # Coreutils 176 | # 177 | CONFIG_BASENAME=y 178 | CONFIG_CAT=y 179 | # CONFIG_DATE is not set 180 | # CONFIG_FEATURE_DATE_ISOFMT is not set 181 | # CONFIG_FEATURE_DATE_NANO is not set 182 | # CONFIG_FEATURE_DATE_COMPAT is not set 183 | # CONFIG_HOSTID is not set 184 | CONFIG_ID=y 185 | CONFIG_GROUPS=y 186 | CONFIG_TEST=y 187 | CONFIG_FEATURE_TEST_64=y 188 | CONFIG_TOUCH=y 189 | CONFIG_FEATURE_TOUCH_SUSV3=y 190 | CONFIG_TR=y 191 | CONFIG_FEATURE_TR_CLASSES=y 192 | CONFIG_FEATURE_TR_EQUIV=y 193 | CONFIG_BASE64=y 194 | # CONFIG_WHO is not set 195 | # CONFIG_USERS is not set 196 | CONFIG_CAL=y 197 | CONFIG_CATV=y 198 | CONFIG_CHGRP=y 199 | CONFIG_CHMOD=y 200 | CONFIG_CHOWN=y 201 | CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y 202 | CONFIG_CHROOT=y 203 | CONFIG_CKSUM=y 204 | CONFIG_COMM=y 205 | CONFIG_CP=y 206 | CONFIG_FEATURE_CP_LONG_OPTIONS=y 207 | CONFIG_CUT=y 208 | CONFIG_DD=y 209 | CONFIG_FEATURE_DD_SIGNAL_HANDLING=y 210 | CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y 211 | CONFIG_FEATURE_DD_IBS_OBS=y 212 | # CONFIG_DF is not set 213 | # CONFIG_FEATURE_DF_FANCY is not set 214 | CONFIG_DIRNAME=y 215 | CONFIG_DOS2UNIX=y 216 | CONFIG_UNIX2DOS=y 217 | CONFIG_DU=y 218 | CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y 219 | CONFIG_ECHO=y 220 | CONFIG_FEATURE_FANCY_ECHO=y 221 | CONFIG_ENV=y 222 | CONFIG_FEATURE_ENV_LONG_OPTIONS=y 223 | CONFIG_EXPAND=y 224 | CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y 225 | CONFIG_EXPR=y 226 | CONFIG_EXPR_MATH_SUPPORT_64=y 227 | CONFIG_FALSE=y 228 | CONFIG_FOLD=y 229 | CONFIG_FSYNC=y 230 | CONFIG_HEAD=y 231 | CONFIG_FEATURE_FANCY_HEAD=y 232 | CONFIG_INSTALL=y 233 | CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y 234 | CONFIG_LN=y 235 | # CONFIG_LOGNAME is not set 236 | CONFIG_LS=y 237 | CONFIG_FEATURE_LS_FILETYPES=y 238 | CONFIG_FEATURE_LS_FOLLOWLINKS=y 239 | CONFIG_FEATURE_LS_RECURSIVE=y 240 | CONFIG_FEATURE_LS_SORTFILES=y 241 | CONFIG_FEATURE_LS_TIMESTAMPS=y 242 | CONFIG_FEATURE_LS_USERNAME=y 243 | CONFIG_FEATURE_LS_COLOR=y 244 | CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y 245 | CONFIG_MD5SUM=y 246 | CONFIG_MKDIR=y 247 | CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y 248 | CONFIG_MKFIFO=y 249 | CONFIG_MKNOD=y 250 | CONFIG_MV=y 251 | CONFIG_FEATURE_MV_LONG_OPTIONS=y 252 | CONFIG_NICE=y 253 | CONFIG_NOHUP=y 254 | CONFIG_OD=y 255 | CONFIG_PRINTENV=y 256 | CONFIG_PRINTF=y 257 | CONFIG_PWD=y 258 | CONFIG_READLINK=y 259 | CONFIG_FEATURE_READLINK_FOLLOW=y 260 | CONFIG_REALPATH=y 261 | CONFIG_RM=y 262 | CONFIG_RMDIR=y 263 | CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y 264 | CONFIG_SEQ=y 265 | CONFIG_SHA1SUM=y 266 | CONFIG_SHA256SUM=y 267 | CONFIG_SHA512SUM=y 268 | CONFIG_SHA3SUM=y 269 | CONFIG_SLEEP=y 270 | CONFIG_FEATURE_FANCY_SLEEP=y 271 | CONFIG_FEATURE_FLOAT_SLEEP=y 272 | CONFIG_SORT=y 273 | CONFIG_FEATURE_SORT_BIG=y 274 | CONFIG_SPLIT=y 275 | CONFIG_FEATURE_SPLIT_FANCY=y 276 | # CONFIG_STAT is not set 277 | # CONFIG_FEATURE_STAT_FORMAT is not set 278 | CONFIG_STTY=y 279 | CONFIG_SUM=y 280 | CONFIG_SYNC=y 281 | CONFIG_TAC=y 282 | CONFIG_TAIL=y 283 | CONFIG_FEATURE_FANCY_TAIL=y 284 | CONFIG_TEE=y 285 | CONFIG_FEATURE_TEE_USE_BLOCK_IO=y 286 | CONFIG_TRUE=y 287 | CONFIG_TTY=y 288 | CONFIG_UNAME=y 289 | CONFIG_UNEXPAND=y 290 | CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y 291 | CONFIG_UNIQ=y 292 | CONFIG_USLEEP=y 293 | CONFIG_UUDECODE=y 294 | CONFIG_UUENCODE=y 295 | CONFIG_WC=y 296 | CONFIG_FEATURE_WC_LARGE=y 297 | CONFIG_WHOAMI=y 298 | CONFIG_YES=y 299 | 300 | # 301 | # Common options for cp and mv 302 | # 303 | CONFIG_FEATURE_PRESERVE_HARDLINKS=y 304 | 305 | # 306 | # Common options for ls, more and telnet 307 | # 308 | CONFIG_FEATURE_AUTOWIDTH=y 309 | 310 | # 311 | # Common options for df, du, ls 312 | # 313 | CONFIG_FEATURE_HUMAN_READABLE=y 314 | 315 | # 316 | # Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum 317 | # 318 | CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y 319 | 320 | # 321 | # Console Utilities 322 | # 323 | CONFIG_CHVT=y 324 | CONFIG_FGCONSOLE=y 325 | CONFIG_CLEAR=y 326 | CONFIG_DEALLOCVT=y 327 | CONFIG_DUMPKMAP=y 328 | # CONFIG_KBD_MODE is not set 329 | # CONFIG_LOADFONT is not set 330 | CONFIG_LOADKMAP=y 331 | CONFIG_OPENVT=y 332 | CONFIG_RESET=y 333 | CONFIG_RESIZE=y 334 | CONFIG_FEATURE_RESIZE_PRINT=y 335 | CONFIG_SETCONSOLE=y 336 | CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y 337 | # CONFIG_SETFONT is not set 338 | # CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set 339 | CONFIG_DEFAULT_SETFONT_DIR="" 340 | CONFIG_SETKEYCODES=y 341 | CONFIG_SETLOGCONS=y 342 | CONFIG_SHOWKEY=y 343 | # CONFIG_FEATURE_LOADFONT_PSF2 is not set 344 | # CONFIG_FEATURE_LOADFONT_RAW is not set 345 | 346 | # 347 | # Debian Utilities 348 | # 349 | CONFIG_MKTEMP=y 350 | CONFIG_PIPE_PROGRESS=y 351 | CONFIG_RUN_PARTS=y 352 | CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y 353 | CONFIG_FEATURE_RUN_PARTS_FANCY=y 354 | CONFIG_START_STOP_DAEMON=y 355 | CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y 356 | CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y 357 | CONFIG_WHICH=y 358 | 359 | # 360 | # Editors 361 | # 362 | CONFIG_PATCH=y 363 | CONFIG_VI=y 364 | CONFIG_FEATURE_VI_MAX_LEN=4096 365 | CONFIG_FEATURE_VI_8BIT=y 366 | CONFIG_FEATURE_VI_COLON=y 367 | CONFIG_FEATURE_VI_YANKMARK=y 368 | CONFIG_FEATURE_VI_SEARCH=y 369 | # CONFIG_FEATURE_VI_REGEX_SEARCH is not set 370 | # CONFIG_FEATURE_VI_USE_SIGNALS is not set [Broken for X86, siglongjmp missing from NDK r8b] 371 | CONFIG_FEATURE_VI_DOT_CMD=y 372 | CONFIG_FEATURE_VI_READONLY=y 373 | CONFIG_FEATURE_VI_SETOPTS=y 374 | CONFIG_FEATURE_VI_SET=y 375 | CONFIG_FEATURE_VI_WIN_RESIZE=y 376 | CONFIG_FEATURE_VI_ASK_TERMINAL=y 377 | CONFIG_AWK=y 378 | CONFIG_FEATURE_AWK_LIBM=y 379 | CONFIG_CMP=y 380 | CONFIG_DIFF=y 381 | CONFIG_FEATURE_DIFF_LONG_OPTIONS=y 382 | CONFIG_FEATURE_DIFF_DIR=y 383 | CONFIG_ED=y 384 | CONFIG_SED=y 385 | CONFIG_FEATURE_ALLOW_EXEC=y 386 | 387 | # 388 | # Finding Utilities 389 | # 390 | CONFIG_FIND=y 391 | CONFIG_FEATURE_FIND_PRINT0=y 392 | CONFIG_FEATURE_FIND_MTIME=y 393 | CONFIG_FEATURE_FIND_MMIN=y 394 | CONFIG_FEATURE_FIND_PERM=y 395 | CONFIG_FEATURE_FIND_TYPE=y 396 | CONFIG_FEATURE_FIND_XDEV=y 397 | CONFIG_FEATURE_FIND_MAXDEPTH=y 398 | CONFIG_FEATURE_FIND_NEWER=y 399 | CONFIG_FEATURE_FIND_INUM=y 400 | CONFIG_FEATURE_FIND_EXEC=y 401 | CONFIG_FEATURE_FIND_USER=y 402 | CONFIG_FEATURE_FIND_GROUP=y 403 | CONFIG_FEATURE_FIND_NOT=y 404 | CONFIG_FEATURE_FIND_DEPTH=y 405 | CONFIG_FEATURE_FIND_PAREN=y 406 | CONFIG_FEATURE_FIND_SIZE=y 407 | CONFIG_FEATURE_FIND_PRUNE=y 408 | CONFIG_FEATURE_FIND_DELETE=y 409 | CONFIG_FEATURE_FIND_PATH=y 410 | CONFIG_FEATURE_FIND_REGEX=y 411 | # CONFIG_FEATURE_FIND_CONTEXT is not set 412 | CONFIG_FEATURE_FIND_LINKS=y 413 | CONFIG_GREP=y 414 | CONFIG_FEATURE_GREP_EGREP_ALIAS=y 415 | CONFIG_FEATURE_GREP_FGREP_ALIAS=y 416 | CONFIG_FEATURE_GREP_CONTEXT=y 417 | CONFIG_XARGS=y 418 | CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y 419 | CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y 420 | CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y 421 | CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y 422 | 423 | # 424 | # Init Utilities 425 | # 426 | CONFIG_BOOTCHARTD=y 427 | CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER=y 428 | CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE=y 429 | CONFIG_HALT=y 430 | # CONFIG_FEATURE_CALL_TELINIT is not set 431 | CONFIG_TELINIT_PATH="" 432 | CONFIG_INIT=y 433 | CONFIG_FEATURE_USE_INITTAB=y 434 | # CONFIG_FEATURE_KILL_REMOVED is not set 435 | CONFIG_FEATURE_KILL_DELAY=0 436 | CONFIG_FEATURE_INIT_SCTTY=y 437 | CONFIG_FEATURE_INIT_SYSLOG=y 438 | CONFIG_FEATURE_EXTRA_QUIET=y 439 | CONFIG_FEATURE_INIT_COREDUMPS=y 440 | CONFIG_FEATURE_INITRD=y 441 | CONFIG_INIT_TERMINAL_TYPE="linux" 442 | CONFIG_MESG=y 443 | CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y 444 | 445 | # 446 | # Login/Password Management Utilities 447 | # 448 | # CONFIG_ADD_SHELL is not set 449 | # CONFIG_REMOVE_SHELL is not set 450 | # CONFIG_FEATURE_SHADOWPASSWDS is not set 451 | # CONFIG_USE_BB_PWD_GRP is not set 452 | # CONFIG_USE_BB_SHADOW is not set 453 | # CONFIG_USE_BB_CRYPT is not set 454 | # CONFIG_USE_BB_CRYPT_SHA is not set 455 | # CONFIG_ADDUSER is not set 456 | # CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set 457 | # CONFIG_FEATURE_CHECK_NAMES is not set 458 | CONFIG_FIRST_SYSTEM_ID=0 459 | CONFIG_LAST_SYSTEM_ID=0 460 | # CONFIG_ADDGROUP is not set 461 | # CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set 462 | # CONFIG_FEATURE_ADDUSER_TO_GROUP is not set 463 | # CONFIG_DELUSER is not set 464 | # CONFIG_DELGROUP is not set 465 | # CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set 466 | # CONFIG_GETTY is not set 467 | # CONFIG_LOGIN is not set 468 | # CONFIG_LOGIN_SESSION_AS_CHILD is not set 469 | # CONFIG_PAM is not set 470 | # CONFIG_LOGIN_SCRIPTS is not set 471 | # CONFIG_FEATURE_NOLOGIN is not set 472 | # CONFIG_FEATURE_SECURETTY is not set 473 | # CONFIG_PASSWD is not set 474 | # CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set 475 | # CONFIG_CRYPTPW is not set 476 | # CONFIG_CHPASSWD is not set 477 | CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="" 478 | # CONFIG_SU is not set 479 | # CONFIG_FEATURE_SU_SYSLOG is not set 480 | # CONFIG_FEATURE_SU_CHECKS_SHELLS is not set 481 | # CONFIG_SULOGIN is not set 482 | # CONFIG_VLOCK is not set 483 | 484 | # 485 | # Linux Ext2 FS Progs 486 | # 487 | CONFIG_CHATTR=y 488 | # CONFIG_FSCK is not set 489 | CONFIG_LSATTR=y 490 | CONFIG_TUNE2FS=y 491 | 492 | # 493 | # Linux Module Utilities 494 | # 495 | CONFIG_MODINFO=y 496 | CONFIG_MODPROBE_SMALL=y 497 | CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE=y 498 | CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED=y 499 | # CONFIG_INSMOD is not set 500 | # CONFIG_RMMOD is not set 501 | # CONFIG_LSMOD is not set 502 | # CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set 503 | # CONFIG_MODPROBE is not set 504 | # CONFIG_FEATURE_MODPROBE_BLACKLIST is not set 505 | # CONFIG_DEPMOD is not set 506 | 507 | # 508 | # Options common to multiple modutils 509 | # 510 | # CONFIG_FEATURE_2_4_MODULES is not set 511 | # CONFIG_FEATURE_INSMOD_TRY_MMAP is not set 512 | # CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set 513 | # CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set 514 | # CONFIG_FEATURE_INSMOD_LOADINKMEM is not set 515 | # CONFIG_FEATURE_INSMOD_LOAD_MAP is not set 516 | # CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set 517 | # CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set 518 | # CONFIG_FEATURE_MODUTILS_ALIAS is not set 519 | # CONFIG_FEATURE_MODUTILS_SYMBOLS is not set 520 | CONFIG_DEFAULT_MODULES_DIR="/system/lib/modules" 521 | CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" 522 | 523 | # 524 | # Linux System Utilities 525 | # 526 | CONFIG_BLOCKDEV=y 527 | CONFIG_MDEV=y 528 | CONFIG_FEATURE_MDEV_CONF=y 529 | CONFIG_FEATURE_MDEV_RENAME=y 530 | CONFIG_FEATURE_MDEV_RENAME_REGEXP=y 531 | CONFIG_FEATURE_MDEV_EXEC=y 532 | CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y 533 | CONFIG_REV=y 534 | CONFIG_ACPID=y 535 | CONFIG_FEATURE_ACPID_COMPAT=y 536 | CONFIG_BLKID=y 537 | CONFIG_FEATURE_BLKID_TYPE=y 538 | CONFIG_DMESG=y 539 | CONFIG_FEATURE_DMESG_PRETTY=y 540 | CONFIG_FBSET=y 541 | CONFIG_FEATURE_FBSET_FANCY=y 542 | CONFIG_FEATURE_FBSET_READMODE=y 543 | CONFIG_FDFLUSH=y 544 | CONFIG_FDFORMAT=y 545 | CONFIG_FDISK=y 546 | CONFIG_FDISK_SUPPORT_LARGE_DISKS=y 547 | CONFIG_FEATURE_FDISK_WRITABLE=y 548 | # CONFIG_FEATURE_AIX_LABEL is not set 549 | # CONFIG_FEATURE_SGI_LABEL is not set 550 | # CONFIG_FEATURE_SUN_LABEL is not set 551 | # CONFIG_FEATURE_OSF_LABEL is not set 552 | # CONFIG_FEATURE_GPT_LABEL is not set 553 | CONFIG_FEATURE_FDISK_ADVANCED=y 554 | CONFIG_FINDFS=y 555 | CONFIG_FLOCK=y 556 | CONFIG_FREERAMDISK=y 557 | # CONFIG_FSCK_MINIX is not set 558 | # CONFIG_MKFS_EXT2 is not set 559 | # CONFIG_MKFS_MINIX is not set 560 | # CONFIG_FEATURE_MINIX2 is not set 561 | # CONFIG_MKFS_REISER is not set 562 | CONFIG_MKFS_VFAT=y 563 | CONFIG_GETOPT=y 564 | CONFIG_FEATURE_GETOPT_LONG=y 565 | CONFIG_HEXDUMP=y 566 | CONFIG_FEATURE_HEXDUMP_REVERSE=y 567 | CONFIG_HD=y 568 | CONFIG_HWCLOCK=y 569 | CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y 570 | # CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set 571 | # CONFIG_IPCRM is not set 572 | # CONFIG_IPCS is not set 573 | CONFIG_LOSETUP=y 574 | CONFIG_LSPCI=y 575 | CONFIG_LSUSB=y 576 | CONFIG_MKSWAP=y 577 | CONFIG_FEATURE_MKSWAP_UUID=y 578 | CONFIG_MORE=y 579 | # CONFIG_MOUNT is not set 580 | # CONFIG_FEATURE_MOUNT_FAKE is not set 581 | # CONFIG_FEATURE_MOUNT_VERBOSE is not set 582 | # CONFIG_FEATURE_MOUNT_HELPERS is not set 583 | # CONFIG_FEATURE_MOUNT_LABEL is not set 584 | # CONFIG_FEATURE_MOUNT_NFS is not set 585 | # CONFIG_FEATURE_MOUNT_CIFS is not set 586 | # CONFIG_FEATURE_MOUNT_FLAGS is not set 587 | # CONFIG_FEATURE_MOUNT_FSTAB is not set 588 | # CONFIG_PIVOT_ROOT is not set 589 | # CONFIG_RDATE is not set 590 | CONFIG_RDEV=y 591 | CONFIG_READPROFILE=y 592 | CONFIG_RTCWAKE=y 593 | CONFIG_SCRIPT=y 594 | CONFIG_SCRIPTREPLAY=y 595 | # CONFIG_SETARCH is not set 596 | # CONFIG_SWAPONOFF is not set 597 | # CONFIG_FEATURE_SWAPON_PRI is not set 598 | CONFIG_SWITCH_ROOT=y 599 | # CONFIG_UMOUNT is not set 600 | # CONFIG_FEATURE_UMOUNT_ALL is not set 601 | # CONFIG_FEATURE_MOUNT_LOOP is not set 602 | # CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set 603 | # CONFIG_FEATURE_MTAB_SUPPORT is not set 604 | CONFIG_VOLUMEID=y 605 | 606 | # 607 | # Filesystem/Volume identification 608 | # 609 | CONFIG_FEATURE_VOLUMEID_EXT=y 610 | CONFIG_FEATURE_VOLUMEID_BTRFS=y 611 | CONFIG_FEATURE_VOLUMEID_REISERFS=y 612 | CONFIG_FEATURE_VOLUMEID_FAT=y 613 | CONFIG_FEATURE_VOLUMEID_EXFAT=y 614 | CONFIG_FEATURE_VOLUMEID_HFS=y 615 | CONFIG_FEATURE_VOLUMEID_JFS=y 616 | CONFIG_FEATURE_VOLUMEID_XFS=y 617 | CONFIG_FEATURE_VOLUMEID_NILFS=y 618 | CONFIG_FEATURE_VOLUMEID_NTFS=y 619 | CONFIG_FEATURE_VOLUMEID_ISO9660=y 620 | CONFIG_FEATURE_VOLUMEID_UDF=y 621 | CONFIG_FEATURE_VOLUMEID_LUKS=y 622 | CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y 623 | CONFIG_FEATURE_VOLUMEID_CRAMFS=y 624 | CONFIG_FEATURE_VOLUMEID_ROMFS=y 625 | CONFIG_FEATURE_VOLUMEID_SQUASHFS=y 626 | CONFIG_FEATURE_VOLUMEID_SYSV=y 627 | CONFIG_FEATURE_VOLUMEID_OCFS2=y 628 | CONFIG_FEATURE_VOLUMEID_LINUXRAID=y 629 | 630 | # 631 | # Miscellaneous Utilities 632 | # 633 | # CONFIG_CONSPY is not set 634 | CONFIG_LESS=y 635 | CONFIG_FEATURE_LESS_MAXLINES=9999999 636 | CONFIG_FEATURE_LESS_BRACKETS=y 637 | CONFIG_FEATURE_LESS_FLAGS=y 638 | CONFIG_FEATURE_LESS_MARKS=y 639 | CONFIG_FEATURE_LESS_REGEXP=y 640 | CONFIG_FEATURE_LESS_WINCH=y 641 | CONFIG_FEATURE_LESS_ASK_TERMINAL=y 642 | CONFIG_FEATURE_LESS_DASHCMD=y 643 | CONFIG_FEATURE_LESS_LINENUMS=y 644 | CONFIG_NANDWRITE=y 645 | CONFIG_NANDDUMP=y 646 | CONFIG_SETSERIAL=y 647 | # CONFIG_UBIATTACH is not set 648 | # CONFIG_UBIDETACH is not set 649 | # CONFIG_UBIMKVOL is not set 650 | # CONFIG_UBIRMVOL is not set 651 | # CONFIG_UBIRSVOL is not set 652 | # CONFIG_UBIUPDATEVOL is not set 653 | # CONFIG_ADJTIMEX is not set 654 | # CONFIG_BBCONFIG is not set 655 | # CONFIG_FEATURE_COMPRESS_BBCONFIG is not set 656 | CONFIG_BEEP=y 657 | CONFIG_FEATURE_BEEP_FREQ=4000 658 | CONFIG_FEATURE_BEEP_LENGTH_MS=30 659 | CONFIG_CHAT=y 660 | CONFIG_FEATURE_CHAT_NOFAIL=y 661 | # CONFIG_FEATURE_CHAT_TTY_HIFI is not set 662 | CONFIG_FEATURE_CHAT_IMPLICIT_CR=y 663 | CONFIG_FEATURE_CHAT_SWALLOW_OPTS=y 664 | CONFIG_FEATURE_CHAT_SEND_ESCAPES=y 665 | CONFIG_FEATURE_CHAT_VAR_ABORT_LEN=y 666 | CONFIG_FEATURE_CHAT_CLR_ABORT=y 667 | CONFIG_CHRT=y 668 | CONFIG_CROND=y 669 | CONFIG_FEATURE_CROND_D=y 670 | CONFIG_FEATURE_CROND_CALL_SENDMAIL=y 671 | CONFIG_FEATURE_CROND_DIR="/var/spool/cron" 672 | CONFIG_CRONTAB=y 673 | CONFIG_DC=y 674 | CONFIG_FEATURE_DC_LIBM=y 675 | # CONFIG_DEVFSD is not set 676 | # CONFIG_DEVFSD_MODLOAD is not set 677 | # CONFIG_DEVFSD_FG_NP is not set 678 | # CONFIG_DEVFSD_VERBOSE is not set 679 | # CONFIG_FEATURE_DEVFS is not set 680 | CONFIG_DEVMEM=y 681 | # CONFIG_EJECT is not set 682 | # CONFIG_FEATURE_EJECT_SCSI is not set 683 | CONFIG_FBSPLASH=y 684 | CONFIG_FLASHCP=y 685 | CONFIG_FLASH_LOCK=y 686 | CONFIG_FLASH_UNLOCK=y 687 | # CONFIG_FLASH_ERASEALL is not set 688 | # CONFIG_IONICE is not set 689 | CONFIG_INOTIFYD=y 690 | # CONFIG_LAST is not set 691 | # CONFIG_FEATURE_LAST_SMALL is not set 692 | # CONFIG_FEATURE_LAST_FANCY is not set 693 | CONFIG_HDPARM=y 694 | CONFIG_FEATURE_HDPARM_GET_IDENTITY=y 695 | CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF=y 696 | CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF=y 697 | CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET=y 698 | CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF=y 699 | CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y 700 | CONFIG_MAKEDEVS=y 701 | # CONFIG_FEATURE_MAKEDEVS_LEAF is not set 702 | CONFIG_FEATURE_MAKEDEVS_TABLE=y 703 | CONFIG_MAN=y 704 | # CONFIG_MICROCOM is not set 705 | # CONFIG_MOUNTPOINT is not set 706 | # CONFIG_MT is not set 707 | CONFIG_RAIDAUTORUN=y 708 | # CONFIG_READAHEAD is not set 709 | # CONFIG_RFKILL is not set 710 | # CONFIG_RUNLEVEL is not set 711 | CONFIG_RX=y 712 | CONFIG_SETSID=y 713 | CONFIG_STRINGS=y 714 | # CONFIG_TASKSET is not set 715 | # CONFIG_FEATURE_TASKSET_FANCY is not set 716 | CONFIG_TIME=y 717 | CONFIG_TIMEOUT=y 718 | CONFIG_TTYSIZE=y 719 | CONFIG_VOLNAME=y 720 | # CONFIG_WALL is not set 721 | # CONFIG_WATCHDOG is not set 722 | 723 | # 724 | # Networking Utilities 725 | # 726 | # CONFIG_NAMEIF is not set 727 | # CONFIG_FEATURE_NAMEIF_EXTENDED is not set 728 | CONFIG_NBDCLIENT=y 729 | CONFIG_NC=y 730 | CONFIG_NC_SERVER=y 731 | CONFIG_NC_EXTRA=y 732 | # CONFIG_NC_110_COMPAT is not set 733 | CONFIG_PING=y 734 | # CONFIG_PING6 is not set 735 | CONFIG_FEATURE_FANCY_PING=y 736 | CONFIG_WHOIS=y 737 | # CONFIG_FEATURE_IPV6 is not set 738 | # CONFIG_FEATURE_UNIX_LOCAL is not set 739 | # CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set 740 | # CONFIG_VERBOSE_RESOLUTION_ERRORS is not set 741 | CONFIG_ARP=y 742 | # CONFIG_ARPING is not set 743 | # CONFIG_BRCTL is not set 744 | # CONFIG_FEATURE_BRCTL_FANCY is not set 745 | # CONFIG_FEATURE_BRCTL_SHOW is not set 746 | CONFIG_DNSD=y 747 | # CONFIG_ETHER_WAKE is not set 748 | CONFIG_FAKEIDENTD=y 749 | CONFIG_FTPD=y 750 | CONFIG_FEATURE_FTP_WRITE=y 751 | CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST=y 752 | CONFIG_FTPGET=y 753 | CONFIG_FTPPUT=y 754 | CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y 755 | # CONFIG_HOSTNAME is not set 756 | CONFIG_HTTPD=y 757 | CONFIG_FEATURE_HTTPD_RANGES=y 758 | CONFIG_FEATURE_HTTPD_USE_SENDFILE=y 759 | CONFIG_FEATURE_HTTPD_SETUID=y 760 | CONFIG_FEATURE_HTTPD_BASIC_AUTH=y 761 | # CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set 762 | CONFIG_FEATURE_HTTPD_CGI=y 763 | CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y 764 | CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y 765 | CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y 766 | CONFIG_FEATURE_HTTPD_ERROR_PAGES=y 767 | CONFIG_FEATURE_HTTPD_PROXY=y 768 | CONFIG_FEATURE_HTTPD_GZIP=y 769 | CONFIG_IFCONFIG=y 770 | CONFIG_FEATURE_IFCONFIG_STATUS=y 771 | # CONFIG_FEATURE_IFCONFIG_SLIP is not set 772 | CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y 773 | CONFIG_FEATURE_IFCONFIG_HW=y 774 | CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y 775 | # CONFIG_IFENSLAVE is not set 776 | # CONFIG_IFPLUGD is not set 777 | CONFIG_IFUPDOWN=y 778 | CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" 779 | CONFIG_FEATURE_IFUPDOWN_IP=y 780 | CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y 781 | # CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set 782 | CONFIG_FEATURE_IFUPDOWN_IPV4=y 783 | # CONFIG_FEATURE_IFUPDOWN_IPV6 is not set 784 | CONFIG_FEATURE_IFUPDOWN_MAPPING=y 785 | CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y 786 | # CONFIG_INETD is not set 787 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set 788 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set 789 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set 790 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set 791 | # CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set 792 | # CONFIG_FEATURE_INETD_RPC is not set 793 | CONFIG_IP=y 794 | CONFIG_FEATURE_IP_ADDRESS=y 795 | CONFIG_FEATURE_IP_LINK=y 796 | CONFIG_FEATURE_IP_ROUTE=y 797 | CONFIG_FEATURE_IP_TUNNEL=y 798 | CONFIG_FEATURE_IP_RULE=y 799 | CONFIG_FEATURE_IP_SHORT_FORMS=y 800 | # CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set 801 | CONFIG_IPADDR=y 802 | CONFIG_IPLINK=y 803 | CONFIG_IPROUTE=y 804 | CONFIG_IPTUNNEL=y 805 | CONFIG_IPRULE=y 806 | CONFIG_IPCALC=y 807 | CONFIG_FEATURE_IPCALC_FANCY=y 808 | CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y 809 | CONFIG_NETSTAT=y 810 | CONFIG_FEATURE_NETSTAT_WIDE=y 811 | CONFIG_FEATURE_NETSTAT_PRG=y 812 | # CONFIG_NSLOOKUP is not set 813 | # CONFIG_NTPD is not set 814 | # CONFIG_FEATURE_NTPD_SERVER is not set 815 | CONFIG_PSCAN=y 816 | CONFIG_ROUTE=y 817 | CONFIG_SLATTACH=y 818 | CONFIG_TCPSVD=y 819 | CONFIG_TELNET=y 820 | CONFIG_FEATURE_TELNET_TTYPE=y 821 | CONFIG_FEATURE_TELNET_AUTOLOGIN=y 822 | CONFIG_TELNETD=y 823 | CONFIG_FEATURE_TELNETD_STANDALONE=y 824 | CONFIG_FEATURE_TELNETD_INETD_WAIT=y 825 | CONFIG_TFTP=y 826 | CONFIG_TFTPD=y 827 | 828 | # 829 | # Common options for tftp/tftpd 830 | # 831 | CONFIG_FEATURE_TFTP_GET=y 832 | CONFIG_FEATURE_TFTP_PUT=y 833 | CONFIG_FEATURE_TFTP_BLOCKSIZE=y 834 | CONFIG_FEATURE_TFTP_PROGRESS_BAR=y 835 | # CONFIG_TFTP_DEBUG is not set 836 | CONFIG_TRACEROUTE=y 837 | # CONFIG_TRACEROUTE6 is not set 838 | CONFIG_FEATURE_TRACEROUTE_VERBOSE=y 839 | # CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set 840 | # CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set 841 | CONFIG_TUNCTL=y 842 | CONFIG_FEATURE_TUNCTL_UG=y 843 | # CONFIG_UDHCPC6 is not set 844 | # CONFIG_UDHCPD is not set 845 | # CONFIG_DHCPRELAY is not set 846 | # CONFIG_DUMPLEASES is not set 847 | # CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set 848 | # CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set 849 | CONFIG_DHCPD_LEASES_FILE="" 850 | CONFIG_UDHCPC=y 851 | CONFIG_FEATURE_UDHCPC_ARPING=y 852 | CONFIG_FEATURE_UDHCP_PORT=y 853 | CONFIG_UDHCP_DEBUG=9 854 | CONFIG_FEATURE_UDHCP_RFC3397=y 855 | CONFIG_FEATURE_UDHCP_8021Q=y 856 | CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" 857 | CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 858 | CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" 859 | CONFIG_UDPSVD=y 860 | CONFIG_VCONFIG=y 861 | CONFIG_WGET=y 862 | CONFIG_FEATURE_WGET_STATUSBAR=y 863 | CONFIG_FEATURE_WGET_AUTHENTICATION=y 864 | CONFIG_FEATURE_WGET_LONG_OPTIONS=y 865 | CONFIG_FEATURE_WGET_TIMEOUT=y 866 | # CONFIG_ZCIP is not set 867 | 868 | # 869 | # Print Utilities 870 | # 871 | CONFIG_LPD=y 872 | CONFIG_LPR=y 873 | CONFIG_LPQ=y 874 | 875 | # 876 | # Mail Utilities 877 | # 878 | CONFIG_MAKEMIME=y 879 | CONFIG_FEATURE_MIME_CHARSET="us-ascii" 880 | CONFIG_POPMAILDIR=y 881 | CONFIG_FEATURE_POPMAILDIR_DELIVERY=y 882 | CONFIG_REFORMIME=y 883 | CONFIG_FEATURE_REFORMIME_COMPAT=y 884 | CONFIG_SENDMAIL=y 885 | 886 | # 887 | # Process Utilities 888 | # 889 | CONFIG_IOSTAT=y 890 | CONFIG_LSOF=y 891 | CONFIG_MPSTAT=y 892 | CONFIG_NMETER=y 893 | CONFIG_PMAP=y 894 | CONFIG_POWERTOP=y 895 | CONFIG_PSTREE=y 896 | CONFIG_PWDX=y 897 | CONFIG_SMEMCAP=y 898 | CONFIG_UPTIME=y 899 | # CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set 900 | CONFIG_FREE=y 901 | CONFIG_FUSER=y 902 | # CONFIG_KILL is not set 903 | # CONFIG_KILLALL is not set 904 | # CONFIG_KILLALL5 is not set 905 | # CONFIG_PGREP is not set 906 | CONFIG_PIDOF=y 907 | CONFIG_FEATURE_PIDOF_SINGLE=y 908 | CONFIG_FEATURE_PIDOF_OMIT=y 909 | # CONFIG_PKILL is not set 910 | CONFIG_PS=y 911 | # CONFIG_FEATURE_PS_WIDE is not set 912 | # CONFIG_FEATURE_PS_LONG is not set 913 | CONFIG_FEATURE_PS_TIME=y 914 | CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y 915 | # CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set 916 | CONFIG_RENICE=y 917 | CONFIG_BB_SYSCTL=y 918 | CONFIG_TOP=y 919 | CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y 920 | CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y 921 | CONFIG_FEATURE_TOP_SMP_CPU=y 922 | CONFIG_FEATURE_TOP_DECIMALS=y 923 | CONFIG_FEATURE_TOP_SMP_PROCESS=y 924 | CONFIG_FEATURE_TOPMEM=y 925 | CONFIG_FEATURE_SHOW_THREADS=y 926 | CONFIG_WATCH=y 927 | 928 | # 929 | # Runit Utilities 930 | # 931 | CONFIG_RUNSV=y 932 | CONFIG_RUNSVDIR=y 933 | # CONFIG_FEATURE_RUNSVDIR_LOG is not set 934 | CONFIG_SV=y 935 | CONFIG_SV_DEFAULT_SERVICE_DIR="/var/service" 936 | CONFIG_SVLOGD=y 937 | CONFIG_CHPST=y 938 | CONFIG_SETUIDGID=y 939 | CONFIG_ENVUIDGID=y 940 | CONFIG_ENVDIR=y 941 | CONFIG_SOFTLIMIT=y 942 | # CONFIG_CHCON is not set 943 | # CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set 944 | # CONFIG_GETENFORCE is not set 945 | # CONFIG_GETSEBOOL is not set 946 | # CONFIG_LOAD_POLICY is not set 947 | # CONFIG_MATCHPATHCON is not set 948 | # CONFIG_RESTORECON is not set 949 | # CONFIG_RUNCON is not set 950 | # CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set 951 | # CONFIG_SELINUXENABLED is not set 952 | # CONFIG_SETENFORCE is not set 953 | # CONFIG_SETFILES is not set 954 | # CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set 955 | # CONFIG_SETSEBOOL is not set 956 | # CONFIG_SESTATUS is not set 957 | 958 | # 959 | # Shells 960 | # 961 | CONFIG_ASH=y 962 | CONFIG_ASH_BASH_COMPAT=y 963 | # CONFIG_ASH_IDLE_TIMEOUT is not set 964 | CONFIG_ASH_JOB_CONTROL=y 965 | CONFIG_ASH_ALIAS=y 966 | CONFIG_ASH_GETOPTS=y 967 | CONFIG_ASH_BUILTIN_ECHO=y 968 | CONFIG_ASH_BUILTIN_PRINTF=y 969 | CONFIG_ASH_BUILTIN_TEST=y 970 | CONFIG_ASH_CMDCMD=y 971 | # CONFIG_ASH_MAIL is not set 972 | CONFIG_ASH_OPTIMIZE_FOR_SIZE=y 973 | CONFIG_ASH_RANDOM_SUPPORT=y 974 | CONFIG_ASH_EXPAND_PRMT=y 975 | CONFIG_CTTYHACK=y 976 | # CONFIG_HUSH is not set 977 | # CONFIG_HUSH_BASH_COMPAT is not set 978 | # CONFIG_HUSH_BRACE_EXPANSION is not set 979 | # CONFIG_HUSH_HELP is not set 980 | # CONFIG_HUSH_INTERACTIVE is not set 981 | # CONFIG_HUSH_SAVEHISTORY is not set 982 | # CONFIG_HUSH_JOB is not set 983 | # CONFIG_HUSH_TICK is not set 984 | # CONFIG_HUSH_IF is not set 985 | # CONFIG_HUSH_LOOPS is not set 986 | # CONFIG_HUSH_CASE is not set 987 | # CONFIG_HUSH_FUNCTIONS is not set 988 | # CONFIG_HUSH_LOCAL is not set 989 | # CONFIG_HUSH_RANDOM_SUPPORT is not set 990 | # CONFIG_HUSH_EXPORT_N is not set 991 | # CONFIG_HUSH_MODE_X is not set 992 | # CONFIG_MSH is not set 993 | CONFIG_FEATURE_SH_IS_ASH=y 994 | # CONFIG_FEATURE_SH_IS_HUSH is not set 995 | # CONFIG_FEATURE_SH_IS_NONE is not set 996 | # CONFIG_FEATURE_BASH_IS_ASH is not set 997 | # CONFIG_FEATURE_BASH_IS_HUSH is not set 998 | CONFIG_FEATURE_BASH_IS_NONE=y 999 | CONFIG_SH_MATH_SUPPORT=y 1000 | CONFIG_SH_MATH_SUPPORT_64=y 1001 | CONFIG_FEATURE_SH_EXTRA_QUIET=y 1002 | # CONFIG_FEATURE_SH_STANDALONE is not set 1003 | # CONFIG_FEATURE_SH_NOFORK is not set 1004 | CONFIG_FEATURE_SH_HISTFILESIZE=y 1005 | 1006 | # 1007 | # System Logging Utilities 1008 | # 1009 | # CONFIG_SYSLOGD is not set 1010 | # CONFIG_FEATURE_ROTATE_LOGFILE is not set 1011 | # CONFIG_FEATURE_REMOTE_LOG is not set 1012 | # CONFIG_FEATURE_SYSLOGD_DUP is not set 1013 | # CONFIG_FEATURE_SYSLOGD_CFG is not set 1014 | CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0 1015 | # CONFIG_FEATURE_IPC_SYSLOG is not set 1016 | CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 1017 | # CONFIG_LOGREAD is not set 1018 | # CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set 1019 | # CONFIG_FEATURE_KMSG_SYSLOG is not set 1020 | CONFIG_KLOGD=y 1021 | CONFIG_FEATURE_KLOGD_KLOGCTL=y 1022 | # CONFIG_LOGGER is not set 1023 | -------------------------------------------------------------------------------- /incomplete/0001-add-LFS-support-EXPERIMENTAL.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Tue, 20 Mar 2012 22:57:40 +0000 3 | Subject: [PATCH] add LFS support EXPERIMENTAL 4 | 5 | the original patch (see below) was written for busybox-1.18.5 6 | I've ported the patch to 1.20.0git, 7 | **HOWEVER** 8 | I can not give guarantees that this patch covers all cases. In fact, 9 | this stuff is beyond me. 10 | 11 | Use at your own risk. Do report if you can verify that this patch is 12 | sufficient and guaranteed to work. 13 | 14 | from 'off_t-is-long-stat.st_size-is-long-long' by Dan Drown 15 | """ 16 | android/bionic is special, off_t and stat.st_size do not match 17 | off_t is defined as "long" 18 | stat.st_size is defined as "long long" (loff_t) 19 | """ 20 | http://dan.drown.org/android/src/busybox/ 21 | --- 22 | archival/libarchive/get_header_tar.c | 4 +- 23 | archival/tar.c | 4 +- 24 | coreutils/od_bloaty.c | 36 +++++++++++++++++----------------- 25 | editors/cmp.c | 2 +- 26 | include/bb_archive.h | 2 +- 27 | include/libbb.h | 6 ----- 28 | libbb/loop.c | 2 +- 29 | libbb/xfuncs_printf.c | 2 +- 30 | 8 files changed, 26 insertions(+), 32 deletions(-) 31 | 32 | diff --git a/archival/libarchive/get_header_tar.c b/archival/libarchive/get_header_tar.c 33 | index 80a7091..4e3efb0 100644 34 | --- a/archival/libarchive/get_header_tar.c 35 | +++ b/archival/libarchive/get_header_tar.c 36 | @@ -413,9 +413,9 @@ char FAST_FUNC get_header_tar(archive_handle_t *archive_handle) 37 | } 38 | skip_ext_hdr: 39 | { 40 | - off_t sz; 41 | + loff_t sz; 42 | bb_error_msg("warning: skipping header '%c'", tar.typeflag); 43 | - sz = (file_header->size + 511) & ~(off_t)511; 44 | + sz = (file_header->size + 511) & ~(loff_t)511; 45 | archive_handle->offset += sz; 46 | sz >>= 9; /* sz /= 512 but w/o contortions for signed div */ 47 | while (sz--) 48 | diff --git a/archival/tar.c b/archival/tar.c 49 | index cf972c2..34476c3 100644 50 | --- a/archival/tar.c 51 | +++ b/archival/tar.c 52 | @@ -161,9 +161,9 @@ static HardLinkInfo *findHardLinkInfo(HardLinkInfo *hlInfo, struct stat *statbuf 53 | /* Put an octal string into the specified buffer. 54 | * The number is zero padded and possibly null terminated. 55 | * Stores low-order bits only if whole value does not fit. */ 56 | -static void putOctal(char *cp, int len, off_t value) 57 | +static void putOctal(char *cp, int len, loff_t value) 58 | { 59 | - char tempBuffer[sizeof(off_t)*3 + 1]; 60 | + char tempBuffer[sizeof(loff_t)*3 + 1]; 61 | char *tempString = tempBuffer; 62 | int width; 63 | 64 | diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c 65 | index 347f879..68470c8 100644 66 | --- a/coreutils/od_bloaty.c 67 | +++ b/coreutils/od_bloaty.c 68 | @@ -184,11 +184,11 @@ static struct tspec *spec; 69 | 70 | /* Function that accepts an address and an optional following char, 71 | and prints the address and char to stdout. */ 72 | -static void (*format_address)(off_t, char); 73 | +static void (*format_address)(loff_t, char); 74 | /* The difference between the old-style pseudo starting address and 75 | the number of bytes to skip. */ 76 | #if ENABLE_LONG_OPTS 77 | -static off_t pseudo_offset; 78 | +static loff_t pseudo_offset; 79 | #else 80 | enum { pseudo_offset = 0 }; 81 | #endif 82 | @@ -760,7 +760,7 @@ decode_format_string(const char *s) 83 | advance IN_STREAM. */ 84 | 85 | static void 86 | -skip(off_t n_skip) 87 | +skip(loff_t n_skip) 88 | { 89 | if (n_skip == 0) 90 | return; 91 | @@ -822,10 +822,10 @@ skip(off_t n_skip) 92 | } 93 | 94 | 95 | -typedef void FN_format_address(off_t address, char c); 96 | +typedef void FN_format_address(loff_t address, char c); 97 | 98 | static void 99 | -format_address_none(off_t address UNUSED_PARAM, char c UNUSED_PARAM) 100 | +format_address_none(loff_t address UNUSED_PARAM, char c UNUSED_PARAM) 101 | { 102 | } 103 | 104 | @@ -836,7 +836,7 @@ static char address_fmt[] ALIGN1 = "%0n"OFF_FMT"xc"; 105 | #define address_pad_len_char address_fmt[2] 106 | 107 | static void 108 | -format_address_std(off_t address, char c) 109 | +format_address_std(loff_t address, char c) 110 | { 111 | /* Corresponds to 'c' */ 112 | address_fmt[sizeof(address_fmt)-2] = c; 113 | @@ -846,7 +846,7 @@ format_address_std(off_t address, char c) 114 | #if ENABLE_LONG_OPTS 115 | /* only used with --traditional */ 116 | static void 117 | -format_address_paren(off_t address, char c) 118 | +format_address_paren(loff_t address, char c) 119 | { 120 | putchar('('); 121 | format_address_std(address, ')'); 122 | @@ -854,7 +854,7 @@ format_address_paren(off_t address, char c) 123 | } 124 | 125 | static void 126 | -format_address_label(off_t address, char c) 127 | +format_address_label(loff_t address, char c) 128 | { 129 | format_address_std(address, ' '); 130 | format_address_paren(address + pseudo_offset, c); 131 | @@ -885,7 +885,7 @@ dump_hexl_mode_trailer(size_t n_bytes, const char *block) 132 | only when it has not been padded to length BYTES_PER_BLOCK. */ 133 | 134 | static void 135 | -write_block(off_t current_offset, size_t n_bytes, 136 | +write_block(loff_t current_offset, size_t n_bytes, 137 | const char *prev_block, const char *curr_block) 138 | { 139 | static char first = 1; 140 | @@ -976,7 +976,7 @@ get_lcm(void) 141 | read. */ 142 | 143 | static void 144 | -dump(off_t current_offset, off_t end_offset) 145 | +dump(loff_t current_offset, loff_t end_offset) 146 | { 147 | char *block[2]; 148 | int idx; 149 | @@ -993,7 +993,7 @@ dump(off_t current_offset, off_t end_offset) 150 | n_bytes_read = 0; 151 | break; 152 | } 153 | - n_needed = MIN(end_offset - current_offset, (off_t) bytes_per_block); 154 | + n_needed = MIN(end_offset - current_offset, (loff_t) bytes_per_block); 155 | read_block(n_needed, block[idx], &n_bytes_read); 156 | if (n_bytes_read < bytes_per_block) 157 | break; 158 | @@ -1059,7 +1059,7 @@ dump(off_t current_offset, off_t end_offset) 159 | traditional version of od. */ 160 | 161 | static void 162 | -dump_strings(off_t address, off_t end_offset) 163 | +dump_strings(loff_t address, loff_t end_offset) 164 | { 165 | unsigned bufsize = MAX(100, string_min); 166 | unsigned char *buf = xmalloc(bufsize); 167 | @@ -1131,7 +1131,7 @@ dump_strings(off_t address, off_t end_offset) 168 | leading '+' return nonzero and set *OFFSET to the offset it denotes. */ 169 | 170 | static int 171 | -parse_old_offset(const char *s, off_t *offset) 172 | +parse_old_offset(const char *s, loff_t *offset) 173 | { 174 | static const struct suffix_mult Bb[] = { 175 | { "B", 1024 }, 176 | @@ -1192,11 +1192,11 @@ int od_main(int argc UNUSED_PARAM, char **argv) 177 | unsigned opt; 178 | int l_c_m; 179 | /* The number of input bytes to skip before formatting and writing. */ 180 | - off_t n_bytes_to_skip = 0; 181 | + loff_t n_bytes_to_skip = 0; 182 | /* The offset of the first byte after the last byte to be formatted. */ 183 | - off_t end_offset = 0; 184 | + loff_t end_offset = 0; 185 | /* The maximum number of bytes that will be formatted. */ 186 | - off_t max_bytes_to_format = 0; 187 | + loff_t max_bytes_to_format = 0; 188 | 189 | spec = NULL; 190 | format_address = format_address_std; 191 | @@ -1267,8 +1267,8 @@ int od_main(int argc UNUSED_PARAM, char **argv) 192 | #if ENABLE_LONG_OPTS 193 | if (opt & OPT_traditional) { 194 | if (argv[0]) { 195 | - off_t pseudo_start = -1; 196 | - off_t o1, o2; 197 | + loff_t pseudo_start = -1; 198 | + loff_t o1, o2; 199 | 200 | if (!argv[1]) { /* one arg */ 201 | if (parse_old_offset(argv[0], &o1)) { 202 | diff --git a/editors/cmp.c b/editors/cmp.c 203 | index fbe6b97..a566e70 100644 204 | --- a/editors/cmp.c 205 | +++ b/editors/cmp.c 206 | @@ -34,7 +34,7 @@ int cmp_main(int argc UNUSED_PARAM, char **argv) 207 | { 208 | FILE *fp1, *fp2, *outfile = stdout; 209 | const char *filename1, *filename2 = "-"; 210 | - off_t skip1 = 0, skip2 = 0, char_pos = 0; 211 | + loff_t skip1 = 0, skip2 = 0, char_pos = 0; 212 | int line_pos = 1; /* Hopefully won't overflow... */ 213 | const char *fmt; 214 | int c1, c2; 215 | diff --git a/include/bb_archive.h b/include/bb_archive.h 216 | index 2043d85..d633dd3 100644 217 | --- a/include/bb_archive.h 218 | +++ b/include/bb_archive.h 219 | @@ -35,7 +35,7 @@ typedef struct file_header_t { 220 | char *tar__uname; 221 | char *tar__gname; 222 | #endif 223 | - off_t size; 224 | + loff_t size; 225 | uid_t uid; 226 | gid_t gid; 227 | mode_t mode; 228 | diff --git a/include/libbb.h b/include/libbb.h 229 | index 2cc1466..464acf2 100644 230 | --- a/include/libbb.h 231 | +++ b/include/libbb.h 232 | @@ -249,12 +249,6 @@ typedef unsigned long uoff_t; 233 | #endif 234 | /* scary. better ideas? (but do *test* them first!) */ 235 | #define OFF_T_MAX ((off_t)~((off_t)1 << (sizeof(off_t)*8-1))) 236 | -/* Users report bionic to use 32-bit off_t even if LARGEFILE support is requested. 237 | - * We misdetected that. Don't let it build: 238 | - */ 239 | -struct BUG_off_t_size_is_misdetected { 240 | - char BUG_off_t_size_is_misdetected[sizeof(off_t) == sizeof(uoff_t) ? 1 : -1]; 241 | -}; 242 | 243 | /* Some useful definitions */ 244 | #undef FALSE 245 | diff --git a/libbb/loop.c b/libbb/loop.c 246 | index b3a5208..7c37e29 100644 247 | --- a/libbb/loop.c 248 | +++ b/libbb/loop.c 249 | @@ -56,7 +56,7 @@ char* FAST_FUNC query_loop(const char *device) 250 | fd = open(device, O_RDONLY); 251 | if (fd >= 0) { 252 | if (ioctl(fd, BB_LOOP_GET_STATUS, &loopinfo) == 0) { 253 | - dev = xasprintf("%"OFF_FMT"u %s", (off_t) loopinfo.lo_offset, 254 | + dev = xasprintf("%"OFF_FMT"u %s", (loff_t) loopinfo.lo_offset, 255 | (char *)loopinfo.lo_file_name); 256 | } 257 | close(fd); 258 | diff --git a/libbb/xfuncs_printf.c b/libbb/xfuncs_printf.c 259 | index d8a42ba..5bb1b55 100644 260 | --- a/libbb/xfuncs_printf.c 261 | +++ b/libbb/xfuncs_printf.c 262 | @@ -234,7 +234,7 @@ off_t FAST_FUNC xlseek(int fd, off_t offset, int whence) 263 | off_t off = lseek(fd, offset, whence); 264 | if (off == (off_t)-1) { 265 | if (whence == SEEK_SET) 266 | - bb_perror_msg_and_die("lseek(%"OFF_FMT"u)", offset); 267 | + bb_perror_msg_and_die("lseek(%lu)", offset); 268 | bb_perror_msg_and_die("lseek"); 269 | } 270 | return off; 271 | -- 272 | 1.7.0.4 273 | 274 | -------------------------------------------------------------------------------- /patches/003-mount-umount-fsck-df.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Sun, 18 Mar 2012 14:12:41 +0000 3 | Subject: [PATCH] android: fix 'mount', 'umount', 'fsck', 'df' 4 | 5 | patch modified from 'Bionic Patch V1.0 (Vitaly Greck)' 6 | https://code.google.com/p/busybox-android/downloads/detail?name=patch 7 | --- 8 | libbb/Kbuild.src | 3 + 9 | libbb/mntent_r.c | 288 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 10 | 2 files changed, 291 insertions(+) 11 | create mode 100644 libbb/mntent_r.c 12 | 13 | diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src 14 | index 61eec26..d456c3d 100644 15 | --- a/libbb/Kbuild.src 16 | +++ b/libbb/Kbuild.src 17 | @@ -115,6 +115,9 @@ lib-y += xgethostbyname.o 18 | lib-y += xreadlink.o 19 | lib-y += xrealloc_vector.o 20 | 21 | +# for android-busybox-ndk 22 | +lib-y += mntent_r.o 23 | + 24 | lib-$(CONFIG_PLATFORM_LINUX) += match_fstype.o 25 | 26 | lib-$(CONFIG_FEATURE_UTMP) += utmp.o 27 | diff --git a/libbb/mntent_r.c b/libbb/mntent_r.c 28 | new file mode 100644 29 | index 0000000..1077487 30 | --- /dev/null 31 | +++ b/libbb/mntent_r.c 32 | @@ -0,0 +1,288 @@ 33 | +/* Utilities for reading/writing fstab, mtab, etc. 34 | + Copyright (C) 1995-2000, 2001, 2002, 2003, 2006, 2010, 2011 35 | + Free Software Foundation, Inc. 36 | + This file is part of the GNU C Library. 37 | + 38 | + The GNU C Library is free software; you can redistribute it and/or 39 | + modify it under the terms of the GNU Lesser General Public 40 | + License as published by the Free Software Foundation; either 41 | + version 2.1 of the License, or (at your option) any later version. 42 | + 43 | + The GNU C Library is distributed in the hope that it will be useful, 44 | + but WITHOUT ANY WARRANTY; without even the implied warranty of 45 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 46 | + Lesser General Public License for more details. 47 | + 48 | + You should have received a copy of the GNU Lesser General Public 49 | + License along with the GNU C Library; if not, see 50 | + . */ 51 | + 52 | +// file extracted from patch 'Bionic Patch V1.0 (Vitaly Greck)': 53 | +// https://busybox-android.googlecode.com/files/patch 54 | +// 55 | +// looks like its based on misc/mntent_r.c from glibc, 56 | +// contains all fixes in current master (2012-03-19), 57 | +// but is not source identical (mostly stuff removed) 58 | +// using the upstream one fails to build 59 | + 60 | + 61 | +#include 62 | +#include 63 | +#include 64 | +#include 65 | +#include 66 | + 67 | + 68 | +/* Prepare to begin reading and/or writing mount table entries from the 69 | + beginning of FILE. MODE is as for `fopen'. */ 70 | +FILE *setmntent (const char *file, const char *mode) 71 | +{ 72 | + /* Extend the mode parameter with "c" to disable cancellation in the 73 | + I/O functions and "e" to set FD_CLOEXEC. */ 74 | + size_t modelen = strlen (mode); 75 | + char newmode[modelen + 3]; 76 | + memcpy (newmode, mode, modelen); 77 | + memcpy (newmode + modelen, "ce", 3); 78 | + FILE *result = fopen (file, newmode); 79 | + 80 | + return result; 81 | +} 82 | + 83 | + 84 | +/* Close a stream opened with `setmntent'. */ 85 | +int endmntent (FILE *stream) 86 | +{ 87 | + if (stream) /* SunOS 4.x allows for NULL stream */ 88 | + fclose (stream); 89 | + return 1; /* SunOS 4.x says to always return 1 */ 90 | +} 91 | + 92 | + 93 | +/* Since the values in a line are separated by spaces, a name cannot 94 | + contain a space. Therefore some programs encode spaces in names 95 | + by the strings "\040". We undo the encoding when reading an entry. 96 | + The decoding happens in place. */ 97 | +static char * 98 | +decode_name (char *buf) 99 | +{ 100 | + char *rp = buf; 101 | + char *wp = buf; 102 | + 103 | + do 104 | + if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '4' && rp[3] == '0') 105 | + { 106 | + /* \040 is a SPACE. */ 107 | + *wp++ = ' '; 108 | + rp += 3; 109 | + } 110 | + else if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '1' && rp[3] == '1') 111 | + { 112 | + /* \011 is a TAB. */ 113 | + *wp++ = '\t'; 114 | + rp += 3; 115 | + } 116 | + else if (rp[0] == '\\' && rp[1] == '0' && rp[2] == '1' && rp[3] == '2') 117 | + { 118 | + /* \012 is a NEWLINE. */ 119 | + *wp++ = '\n'; 120 | + rp += 3; 121 | + } 122 | + else if (rp[0] == '\\' && rp[1] == '\\') 123 | + { 124 | + /* We have to escape \\ to be able to represent all characters. */ 125 | + *wp++ = '\\'; 126 | + rp += 1; 127 | + } 128 | + else if (rp[0] == '\\' && rp[1] == '1' && rp[2] == '3' && rp[3] == '4') 129 | + { 130 | + /* \134 is also \\. */ 131 | + *wp++ = '\\'; 132 | + rp += 3; 133 | + } 134 | + else 135 | + *wp++ = *rp; 136 | + while (*rp++ != '\0'); 137 | + 138 | + return buf; 139 | +} 140 | + 141 | + 142 | +/* Read one mount table entry from STREAM. Returns a pointer to storage 143 | + reused on the next call, or null for EOF or error (use feof/ferror to 144 | + check). */ 145 | +struct mntent *getmntent_r (FILE *stream, struct mntent *mp, char *buffer, int bufsiz) 146 | +{ 147 | + char *cp; 148 | + char *head; 149 | + 150 | + do 151 | + { 152 | + char *end_ptr; 153 | + 154 | + if (fgets (buffer, bufsiz, stream) == NULL) 155 | + { 156 | + return NULL; 157 | + } 158 | + 159 | + end_ptr = strchr (buffer, '\n'); 160 | + if (end_ptr != NULL) /* chop newline */ 161 | + *end_ptr = '\0'; 162 | + else 163 | + { 164 | + /* Not the whole line was read. Do it now but forget it. */ 165 | + char tmp[1024]; 166 | + while (fgets (tmp, sizeof tmp, stream) != NULL) 167 | + if (strchr (tmp, '\n') != NULL) 168 | + break; 169 | + } 170 | + 171 | + head = buffer + strspn (buffer, " \t"); 172 | + /* skip empty lines and comment lines: */ 173 | + } 174 | + while (head[0] == '\0' || head[0] == '#'); 175 | + 176 | + cp = strsep (&head, " \t"); 177 | + mp->mnt_fsname = cp != NULL ? decode_name (cp) : (char *) ""; 178 | + if (head) 179 | + head += strspn (head, " \t"); 180 | + cp = strsep (&head, " \t"); 181 | + mp->mnt_dir = cp != NULL ? decode_name (cp) : (char *) ""; 182 | + if (head) 183 | + head += strspn (head, " \t"); 184 | + cp = strsep (&head, " \t"); 185 | + mp->mnt_type = cp != NULL ? decode_name (cp) : (char *) ""; 186 | + if (head) 187 | + head += strspn (head, " \t"); 188 | + cp = strsep (&head, " \t"); 189 | + mp->mnt_opts = cp != NULL ? decode_name (cp) : (char *) ""; 190 | + switch (head ? sscanf (head, " %d %d ", &mp->mnt_freq, &mp->mnt_passno) : 0) 191 | + { 192 | + case 0: 193 | + mp->mnt_freq = 0; 194 | + case 1: 195 | + mp->mnt_passno = 0; 196 | + case 2: 197 | + break; 198 | + } 199 | + 200 | + return mp; 201 | +} 202 | + 203 | +struct mntent *getmntent (FILE *stream) 204 | +{ 205 | + static struct mntent m; 206 | + static char *getmntent_buffer; 207 | + 208 | + #define BUFFER_SIZE 4096 209 | + if (getmntent_buffer == NULL) { 210 | + getmntent_buffer = (char *) malloc (BUFFER_SIZE); 211 | + } 212 | + 213 | + return getmntent_r (stream, &m, getmntent_buffer, BUFFER_SIZE); 214 | + #undef BUFFER_SIZE 215 | +} 216 | + 217 | + 218 | +/* We have to use an encoding for names if they contain spaces or tabs. 219 | + To be able to represent all characters we also have to escape the 220 | + backslash itself. This "function" must be a macro since we use 221 | + `alloca'. */ 222 | +#define encode_name(name) \ 223 | + do { \ 224 | + const char *rp = name; \ 225 | + \ 226 | + while (*rp != '\0') \ 227 | + if (*rp == ' ' || *rp == '\t' || *rp == '\n' || *rp == '\\') \ 228 | + break; \ 229 | + else \ 230 | + ++rp; \ 231 | + \ 232 | + if (*rp != '\0') \ 233 | + { \ 234 | + /* In the worst case the length of the string can increase to \ 235 | + four times the current length. */ \ 236 | + char *wp; \ 237 | + \ 238 | + rp = name; \ 239 | + name = wp = (char *) alloca (strlen (name) * 4 + 1); \ 240 | + \ 241 | + do \ 242 | + if (*rp == ' ') \ 243 | + { \ 244 | + *wp++ = '\\'; \ 245 | + *wp++ = '0'; \ 246 | + *wp++ = '4'; \ 247 | + *wp++ = '0'; \ 248 | + } \ 249 | + else if (*rp == '\t') \ 250 | + { \ 251 | + *wp++ = '\\'; \ 252 | + *wp++ = '0'; \ 253 | + *wp++ = '1'; \ 254 | + *wp++ = '1'; \ 255 | + } \ 256 | + else if (*rp == '\n') \ 257 | + { \ 258 | + *wp++ = '\\'; \ 259 | + *wp++ = '0'; \ 260 | + *wp++ = '1'; \ 261 | + *wp++ = '2'; \ 262 | + } \ 263 | + else if (*rp == '\\') \ 264 | + { \ 265 | + *wp++ = '\\'; \ 266 | + *wp++ = '\\'; \ 267 | + } \ 268 | + else \ 269 | + *wp++ = *rp; \ 270 | + while (*rp++ != '\0'); \ 271 | + } \ 272 | + } while (0) 273 | + 274 | + 275 | +/* Write the mount table entry described by MNT to STREAM. 276 | + Return zero on success, nonzero on failure. */ 277 | +int addmntent (FILE *stream, const struct mntent *mnt) 278 | +{ 279 | + struct mntent mntcopy = *mnt; 280 | + if (fseek (stream, 0, SEEK_END)) 281 | + return 1; 282 | + 283 | + /* Encode spaces and tabs in the names. */ 284 | + encode_name (mntcopy.mnt_fsname); 285 | + encode_name (mntcopy.mnt_dir); 286 | + encode_name (mntcopy.mnt_type); 287 | + encode_name (mntcopy.mnt_opts); 288 | + 289 | + return (fprintf (stream, "%s %s %s %s %d %d\n", 290 | + mntcopy.mnt_fsname, 291 | + mntcopy.mnt_dir, 292 | + mntcopy.mnt_type, 293 | + mntcopy.mnt_opts, 294 | + mntcopy.mnt_freq, 295 | + mntcopy.mnt_passno) < 0 296 | + || fflush (stream) != 0); 297 | +} 298 | + 299 | + 300 | +/* Search MNT->mnt_opts for an option matching OPT. 301 | + Returns the address of the substring, or null if none found. */ 302 | +char *hasmntopt (const struct mntent *mnt, const char *opt) 303 | +{ 304 | + const size_t optlen = strlen (opt); 305 | + char *rest = mnt->mnt_opts, *p; 306 | + 307 | + while ((p = strstr (rest, opt)) != NULL) 308 | + { 309 | + if ((p == rest || p[-1] == ',') 310 | + && (p[optlen] == '\0' || p[optlen] == '=' || p[optlen] == ',')) 311 | + return p; 312 | + 313 | + rest = strchr (p, ','); 314 | + if (rest == NULL) 315 | + break; 316 | + ++rest; 317 | + } 318 | + 319 | + return NULL; 320 | +} 321 | -- 322 | 1.7.10.4 323 | 324 | -------------------------------------------------------------------------------- /patches/009-watchdog.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Mon, 19 Mar 2012 17:27:19 +0000 3 | Subject: [PATCH] add include/linux/watchdog.h from linux kernel 4 | 5 | patch from 'missing-headers' by Dan Drown 6 | http://dan.drown.org/android/src/busybox/ 7 | --- 8 | include/linux/watchdog.h | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 9 | 1 files changed, 55 insertions(+), 0 deletions(-) 10 | create mode 100644 include/linux/watchdog.h 11 | 12 | diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h 13 | new file mode 100644 14 | index 0000000..5bc0c62 15 | --- /dev/null 16 | +++ b/include/linux/watchdog.h 17 | @@ -0,0 +1,55 @@ 18 | +/* 19 | + * Generic watchdog defines. Derived from.. 20 | + * 21 | + * Berkshire PC Watchdog Defines 22 | + * by Ken Hollis 23 | + * 24 | + */ 25 | + 26 | +#ifndef _LINUX_WATCHDOG_H 27 | +#define _LINUX_WATCHDOG_H 28 | + 29 | +#include 30 | +#include 31 | + 32 | +#define WATCHDOG_IOCTL_BASE 'W' 33 | + 34 | +struct watchdog_info { 35 | + __u32 options; /* Options the card/driver supports */ 36 | + __u32 firmware_version; /* Firmware version of the card */ 37 | + __u8 identity[32]; /* Identity of the board */ 38 | +}; 39 | + 40 | +#define WDIOC_GETSUPPORT _IOR(WATCHDOG_IOCTL_BASE, 0, struct watchdog_info) 41 | +#define WDIOC_GETSTATUS _IOR(WATCHDOG_IOCTL_BASE, 1, int) 42 | +#define WDIOC_GETBOOTSTATUS _IOR(WATCHDOG_IOCTL_BASE, 2, int) 43 | +#define WDIOC_GETTEMP _IOR(WATCHDOG_IOCTL_BASE, 3, int) 44 | +#define WDIOC_SETOPTIONS _IOR(WATCHDOG_IOCTL_BASE, 4, int) 45 | +#define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) 46 | +#define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) 47 | +#define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) 48 | +#define WDIOC_SETPRETIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 8, int) 49 | +#define WDIOC_GETPRETIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 9, int) 50 | +#define WDIOC_GETTIMELEFT _IOR(WATCHDOG_IOCTL_BASE, 10, int) 51 | + 52 | +#define WDIOF_UNKNOWN -1 /* Unknown flag error */ 53 | +#define WDIOS_UNKNOWN -1 /* Unknown status error */ 54 | + 55 | +#define WDIOF_OVERHEAT 0x0001 /* Reset due to CPU overheat */ 56 | +#define WDIOF_FANFAULT 0x0002 /* Fan failed */ 57 | +#define WDIOF_EXTERN1 0x0004 /* External relay 1 */ 58 | +#define WDIOF_EXTERN2 0x0008 /* External relay 2 */ 59 | +#define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */ 60 | +#define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */ 61 | +#define WDIOF_POWEROVER 0x0040 /* Power over voltage */ 62 | +#define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ 63 | +#define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ 64 | +#define WDIOF_PRETIMEOUT 0x0200 /* Pretimeout (in seconds), get/set */ 65 | +#define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */ 66 | + 67 | +#define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */ 68 | +#define WDIOS_ENABLECARD 0x0002 /* Turn on the watchdog timer */ 69 | +#define WDIOS_TEMPPANIC 0x0004 /* Kernel panic on temperature trip */ 70 | + 71 | + 72 | +#endif /* ifndef _LINUX_WATCHDOG_H */ 73 | -- 74 | 1.7.0.4 75 | 76 | -------------------------------------------------------------------------------- /patches/010-ubiX.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Mon, 19 Mar 2012 17:32:55 +0000 3 | Subject: [PATCH] add include/mtd/ubi-user.h from linux kernel 4 | 5 | patch from 'missing-headers' by Dan Drown 6 | http://dan.drown.org/android/src/busybox/ 7 | --- 8 | include/mtd/ubi-user.h | 412 ++++++++++++++++++++++++++++++++++++++++++++++++ 9 | 1 files changed, 412 insertions(+), 0 deletions(-) 10 | create mode 100644 include/mtd/ubi-user.h 11 | 12 | diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h 13 | new file mode 100644 14 | index 0000000..466a832 15 | --- /dev/null 16 | +++ b/include/mtd/ubi-user.h 17 | @@ -0,0 +1,412 @@ 18 | +/* 19 | + * Copyright (c) International Business Machines Corp., 2006 20 | + * 21 | + * This program is free software; you can redistribute it and/or modify 22 | + * it under the terms of the GNU General Public License as published by 23 | + * the Free Software Foundation; either version 2 of the License, or 24 | + * (at your option) any later version. 25 | + * 26 | + * This program is distributed in the hope that it will be useful, 27 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 29 | + * the GNU General Public License for more details. 30 | + * 31 | + * You should have received a copy of the GNU General Public License 32 | + * along with this program; if not, write to the Free Software 33 | + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 34 | + * 35 | + * Author: Artem Bityutskiy (Битюцкий Артём) 36 | + */ 37 | + 38 | +#ifndef __UBI_USER_H__ 39 | +#define __UBI_USER_H__ 40 | + 41 | +#include 42 | + 43 | +/* 44 | + * UBI device creation (the same as MTD device attachment) 45 | + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 | + * 47 | + * MTD devices may be attached using %UBI_IOCATT ioctl command of the UBI 48 | + * control device. The caller has to properly fill and pass 49 | + * &struct ubi_attach_req object - UBI will attach the MTD device specified in 50 | + * the request and return the newly created UBI device number as the ioctl 51 | + * return value. 52 | + * 53 | + * UBI device deletion (the same as MTD device detachment) 54 | + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 55 | + * 56 | + * An UBI device maybe deleted with %UBI_IOCDET ioctl command of the UBI 57 | + * control device. 58 | + * 59 | + * UBI volume creation 60 | + * ~~~~~~~~~~~~~~~~~~~ 61 | + * 62 | + * UBI volumes are created via the %UBI_IOCMKVOL ioctl command of UBI character 63 | + * device. A &struct ubi_mkvol_req object has to be properly filled and a 64 | + * pointer to it has to be passed to the ioctl. 65 | + * 66 | + * UBI volume deletion 67 | + * ~~~~~~~~~~~~~~~~~~~ 68 | + * 69 | + * To delete a volume, the %UBI_IOCRMVOL ioctl command of the UBI character 70 | + * device should be used. A pointer to the 32-bit volume ID hast to be passed 71 | + * to the ioctl. 72 | + * 73 | + * UBI volume re-size 74 | + * ~~~~~~~~~~~~~~~~~~ 75 | + * 76 | + * To re-size a volume, the %UBI_IOCRSVOL ioctl command of the UBI character 77 | + * device should be used. A &struct ubi_rsvol_req object has to be properly 78 | + * filled and a pointer to it has to be passed to the ioctl. 79 | + * 80 | + * UBI volumes re-name 81 | + * ~~~~~~~~~~~~~~~~~~~ 82 | + * 83 | + * To re-name several volumes atomically at one go, the %UBI_IOCRNVOL command 84 | + * of the UBI character device should be used. A &struct ubi_rnvol_req object 85 | + * has to be properly filled and a pointer to it has to be passed to the ioctl. 86 | + * 87 | + * UBI volume update 88 | + * ~~~~~~~~~~~~~~~~~ 89 | + * 90 | + * Volume update should be done via the %UBI_IOCVOLUP ioctl command of the 91 | + * corresponding UBI volume character device. A pointer to a 64-bit update 92 | + * size should be passed to the ioctl. After this, UBI expects user to write 93 | + * this number of bytes to the volume character device. The update is finished 94 | + * when the claimed number of bytes is passed. So, the volume update sequence 95 | + * is something like: 96 | + * 97 | + * fd = open("/dev/my_volume"); 98 | + * ioctl(fd, UBI_IOCVOLUP, &image_size); 99 | + * write(fd, buf, image_size); 100 | + * close(fd); 101 | + * 102 | + * Logical eraseblock erase 103 | + * ~~~~~~~~~~~~~~~~~~~~~~~~ 104 | + * 105 | + * To erase a logical eraseblock, the %UBI_IOCEBER ioctl command of the 106 | + * corresponding UBI volume character device should be used. This command 107 | + * unmaps the requested logical eraseblock, makes sure the corresponding 108 | + * physical eraseblock is successfully erased, and returns. 109 | + * 110 | + * Atomic logical eraseblock change 111 | + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 112 | + * 113 | + * Atomic logical eraseblock change operation is called using the %UBI_IOCEBCH 114 | + * ioctl command of the corresponding UBI volume character device. A pointer to 115 | + * a &struct ubi_leb_change_req object has to be passed to the ioctl. Then the 116 | + * user is expected to write the requested amount of bytes (similarly to what 117 | + * should be done in case of the "volume update" ioctl). 118 | + * 119 | + * Logical eraseblock map 120 | + * ~~~~~~~~~~~~~~~~~~~~~ 121 | + * 122 | + * To map a logical eraseblock to a physical eraseblock, the %UBI_IOCEBMAP 123 | + * ioctl command should be used. A pointer to a &struct ubi_map_req object is 124 | + * expected to be passed. The ioctl maps the requested logical eraseblock to 125 | + * a physical eraseblock and returns. Only non-mapped logical eraseblocks can 126 | + * be mapped. If the logical eraseblock specified in the request is already 127 | + * mapped to a physical eraseblock, the ioctl fails and returns error. 128 | + * 129 | + * Logical eraseblock unmap 130 | + * ~~~~~~~~~~~~~~~~~~~~~~~~ 131 | + * 132 | + * To unmap a logical eraseblock to a physical eraseblock, the %UBI_IOCEBUNMAP 133 | + * ioctl command should be used. The ioctl unmaps the logical eraseblocks, 134 | + * schedules corresponding physical eraseblock for erasure, and returns. Unlike 135 | + * the "LEB erase" command, it does not wait for the physical eraseblock being 136 | + * erased. Note, the side effect of this is that if an unclean reboot happens 137 | + * after the unmap ioctl returns, you may find the LEB mapped again to the same 138 | + * physical eraseblock after the UBI is run again. 139 | + * 140 | + * Check if logical eraseblock is mapped 141 | + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 142 | + * 143 | + * To check if a logical eraseblock is mapped to a physical eraseblock, the 144 | + * %UBI_IOCEBISMAP ioctl command should be used. It returns %0 if the LEB is 145 | + * not mapped, and %1 if it is mapped. 146 | + * 147 | + * Set an UBI volume property 148 | + * ~~~~~~~~~~~~~~~~~~~~~~~~~ 149 | + * 150 | + * To set an UBI volume property the %UBI_IOCSETPROP ioctl command should be 151 | + * used. A pointer to a &struct ubi_set_prop_req object is expected to be 152 | + * passed. The object describes which property should be set, and to which value 153 | + * it should be set. 154 | + */ 155 | + 156 | +/* 157 | + * When a new UBI volume or UBI device is created, users may either specify the 158 | + * volume/device number they want to create or to let UBI automatically assign 159 | + * the number using these constants. 160 | + */ 161 | +#define UBI_VOL_NUM_AUTO (-1) 162 | +#define UBI_DEV_NUM_AUTO (-1) 163 | + 164 | +/* Maximum volume name length */ 165 | +#define UBI_MAX_VOLUME_NAME 127 166 | + 167 | +/* ioctl commands of UBI character devices */ 168 | + 169 | +#define UBI_IOC_MAGIC 'o' 170 | + 171 | +/* Create an UBI volume */ 172 | +#define UBI_IOCMKVOL _IOW(UBI_IOC_MAGIC, 0, struct ubi_mkvol_req) 173 | +/* Remove an UBI volume */ 174 | +#define UBI_IOCRMVOL _IOW(UBI_IOC_MAGIC, 1, __s32) 175 | +/* Re-size an UBI volume */ 176 | +#define UBI_IOCRSVOL _IOW(UBI_IOC_MAGIC, 2, struct ubi_rsvol_req) 177 | +/* Re-name volumes */ 178 | +#define UBI_IOCRNVOL _IOW(UBI_IOC_MAGIC, 3, struct ubi_rnvol_req) 179 | + 180 | +/* ioctl commands of the UBI control character device */ 181 | + 182 | +#define UBI_CTRL_IOC_MAGIC 'o' 183 | + 184 | +/* Attach an MTD device */ 185 | +#define UBI_IOCATT _IOW(UBI_CTRL_IOC_MAGIC, 64, struct ubi_attach_req) 186 | +/* Detach an MTD device */ 187 | +#define UBI_IOCDET _IOW(UBI_CTRL_IOC_MAGIC, 65, __s32) 188 | + 189 | +/* ioctl commands of UBI volume character devices */ 190 | + 191 | +#define UBI_VOL_IOC_MAGIC 'O' 192 | + 193 | +/* Start UBI volume update */ 194 | +#define UBI_IOCVOLUP _IOW(UBI_VOL_IOC_MAGIC, 0, __s64) 195 | +/* LEB erasure command, used for debugging, disabled by default */ 196 | +#define UBI_IOCEBER _IOW(UBI_VOL_IOC_MAGIC, 1, __s32) 197 | +/* Atomic LEB change command */ 198 | +#define UBI_IOCEBCH _IOW(UBI_VOL_IOC_MAGIC, 2, __s32) 199 | +/* Map LEB command */ 200 | +#define UBI_IOCEBMAP _IOW(UBI_VOL_IOC_MAGIC, 3, struct ubi_map_req) 201 | +/* Unmap LEB command */ 202 | +#define UBI_IOCEBUNMAP _IOW(UBI_VOL_IOC_MAGIC, 4, __s32) 203 | +/* Check if LEB is mapped command */ 204 | +#define UBI_IOCEBISMAP _IOR(UBI_VOL_IOC_MAGIC, 5, __s32) 205 | +/* Set an UBI volume property */ 206 | +#define UBI_IOCSETPROP _IOW(UBI_VOL_IOC_MAGIC, 6, struct ubi_set_prop_req) 207 | + 208 | +/* Maximum MTD device name length supported by UBI */ 209 | +#define MAX_UBI_MTD_NAME_LEN 127 210 | + 211 | +/* Maximum amount of UBI volumes that can be re-named at one go */ 212 | +#define UBI_MAX_RNVOL 32 213 | + 214 | +/* 215 | + * UBI data type hint constants. 216 | + * 217 | + * UBI_LONGTERM: long-term data 218 | + * UBI_SHORTTERM: short-term data 219 | + * UBI_UNKNOWN: data persistence is unknown 220 | + * 221 | + * These constants are used when data is written to UBI volumes in order to 222 | + * help the UBI wear-leveling unit to find more appropriate physical 223 | + * eraseblocks. 224 | + */ 225 | +enum { 226 | + UBI_LONGTERM = 1, 227 | + UBI_SHORTTERM = 2, 228 | + UBI_UNKNOWN = 3, 229 | +}; 230 | + 231 | +/* 232 | + * UBI volume type constants. 233 | + * 234 | + * @UBI_DYNAMIC_VOLUME: dynamic volume 235 | + * @UBI_STATIC_VOLUME: static volume 236 | + */ 237 | +enum { 238 | + UBI_DYNAMIC_VOLUME = 3, 239 | + UBI_STATIC_VOLUME = 4, 240 | +}; 241 | + 242 | +/* 243 | + * UBI set property ioctl constants 244 | + * 245 | + * @UBI_PROP_DIRECT_WRITE: allow / disallow user to directly write and 246 | + * erase individual eraseblocks on dynamic volumes 247 | + */ 248 | +enum { 249 | + UBI_PROP_DIRECT_WRITE = 1, 250 | +}; 251 | + 252 | +/** 253 | + * struct ubi_attach_req - attach MTD device request. 254 | + * @ubi_num: UBI device number to create 255 | + * @mtd_num: MTD device number to attach 256 | + * @vid_hdr_offset: VID header offset (use defaults if %0) 257 | + * @padding: reserved for future, not used, has to be zeroed 258 | + * 259 | + * This data structure is used to specify MTD device UBI has to attach and the 260 | + * parameters it has to use. The number which should be assigned to the new UBI 261 | + * device is passed in @ubi_num. UBI may automatically assign the number if 262 | + * @UBI_DEV_NUM_AUTO is passed. In this case, the device number is returned in 263 | + * @ubi_num. 264 | + * 265 | + * Most applications should pass %0 in @vid_hdr_offset to make UBI use default 266 | + * offset of the VID header within physical eraseblocks. The default offset is 267 | + * the next min. I/O unit after the EC header. For example, it will be offset 268 | + * 512 in case of a 512 bytes page NAND flash with no sub-page support. Or 269 | + * it will be 512 in case of a 2KiB page NAND flash with 4 512-byte sub-pages. 270 | + * 271 | + * But in rare cases, if this optimizes things, the VID header may be placed to 272 | + * a different offset. For example, the boot-loader might do things faster if 273 | + * the VID header sits at the end of the first 2KiB NAND page with 4 sub-pages. 274 | + * As the boot-loader would not normally need to read EC headers (unless it 275 | + * needs UBI in RW mode), it might be faster to calculate ECC. This is weird 276 | + * example, but it real-life example. So, in this example, @vid_hdr_offer would 277 | + * be 2KiB-64 bytes = 1984. Note, that this position is not even 512-bytes 278 | + * aligned, which is OK, as UBI is clever enough to realize this is 4th 279 | + * sub-page of the first page and add needed padding. 280 | + */ 281 | +struct ubi_attach_req { 282 | + __s32 ubi_num; 283 | + __s32 mtd_num; 284 | + __s32 vid_hdr_offset; 285 | + __s8 padding[12]; 286 | +}; 287 | + 288 | +/** 289 | + * struct ubi_mkvol_req - volume description data structure used in 290 | + * volume creation requests. 291 | + * @vol_id: volume number 292 | + * @alignment: volume alignment 293 | + * @bytes: volume size in bytes 294 | + * @vol_type: volume type (%UBI_DYNAMIC_VOLUME or %UBI_STATIC_VOLUME) 295 | + * @padding1: reserved for future, not used, has to be zeroed 296 | + * @name_len: volume name length 297 | + * @padding2: reserved for future, not used, has to be zeroed 298 | + * @name: volume name 299 | + * 300 | + * This structure is used by user-space programs when creating new volumes. The 301 | + * @used_bytes field is only necessary when creating static volumes. 302 | + * 303 | + * The @alignment field specifies the required alignment of the volume logical 304 | + * eraseblock. This means, that the size of logical eraseblocks will be aligned 305 | + * to this number, i.e., 306 | + * (UBI device logical eraseblock size) mod (@alignment) = 0. 307 | + * 308 | + * To put it differently, the logical eraseblock of this volume may be slightly 309 | + * shortened in order to make it properly aligned. The alignment has to be 310 | + * multiple of the flash minimal input/output unit, or %1 to utilize the entire 311 | + * available space of logical eraseblocks. 312 | + * 313 | + * The @alignment field may be useful, for example, when one wants to maintain 314 | + * a block device on top of an UBI volume. In this case, it is desirable to fit 315 | + * an integer number of blocks in logical eraseblocks of this UBI volume. With 316 | + * alignment it is possible to update this volume using plane UBI volume image 317 | + * BLOBs, without caring about how to properly align them. 318 | + */ 319 | +struct ubi_mkvol_req { 320 | + __s32 vol_id; 321 | + __s32 alignment; 322 | + __s64 bytes; 323 | + __s8 vol_type; 324 | + __s8 padding1; 325 | + __s16 name_len; 326 | + __s8 padding2[4]; 327 | + char name[UBI_MAX_VOLUME_NAME + 1]; 328 | +} __attribute__ ((packed)); 329 | + 330 | +/** 331 | + * struct ubi_rsvol_req - a data structure used in volume re-size requests. 332 | + * @vol_id: ID of the volume to re-size 333 | + * @bytes: new size of the volume in bytes 334 | + * 335 | + * Re-sizing is possible for both dynamic and static volumes. But while dynamic 336 | + * volumes may be re-sized arbitrarily, static volumes cannot be made to be 337 | + * smaller than the number of bytes they bear. To arbitrarily shrink a static 338 | + * volume, it must be wiped out first (by means of volume update operation with 339 | + * zero number of bytes). 340 | + */ 341 | +struct ubi_rsvol_req { 342 | + __s64 bytes; 343 | + __s32 vol_id; 344 | +} __attribute__ ((packed)); 345 | + 346 | +/** 347 | + * struct ubi_rnvol_req - volumes re-name request. 348 | + * @count: count of volumes to re-name 349 | + * @padding1: reserved for future, not used, has to be zeroed 350 | + * @vol_id: ID of the volume to re-name 351 | + * @name_len: name length 352 | + * @padding2: reserved for future, not used, has to be zeroed 353 | + * @name: new volume name 354 | + * 355 | + * UBI allows to re-name up to %32 volumes at one go. The count of volumes to 356 | + * re-name is specified in the @count field. The ID of the volumes to re-name 357 | + * and the new names are specified in the @vol_id and @name fields. 358 | + * 359 | + * The UBI volume re-name operation is atomic, which means that should power cut 360 | + * happen, the volumes will have either old name or new name. So the possible 361 | + * use-cases of this command is atomic upgrade. Indeed, to upgrade, say, volumes 362 | + * A and B one may create temporary volumes %A1 and %B1 with the new contents, 363 | + * then atomically re-name A1->A and B1->B, in which case old %A and %B will 364 | + * be removed. 365 | + * 366 | + * If it is not desirable to remove old A and B, the re-name request has to 367 | + * contain 4 entries: A1->A, A->A1, B1->B, B->B1, in which case old A1 and B1 368 | + * become A and B, and old A and B will become A1 and B1. 369 | + * 370 | + * It is also OK to request: A1->A, A1->X, B1->B, B->Y, in which case old A1 371 | + * and B1 become A and B, and old A and B become X and Y. 372 | + * 373 | + * In other words, in case of re-naming into an existing volume name, the 374 | + * existing volume is removed, unless it is re-named as well at the same 375 | + * re-name request. 376 | + */ 377 | +struct ubi_rnvol_req { 378 | + __s32 count; 379 | + __s8 padding1[12]; 380 | + struct { 381 | + __s32 vol_id; 382 | + __s16 name_len; 383 | + __s8 padding2[2]; 384 | + char name[UBI_MAX_VOLUME_NAME + 1]; 385 | + } ents[UBI_MAX_RNVOL]; 386 | +} __attribute__ ((packed)); 387 | + 388 | +/** 389 | + * struct ubi_leb_change_req - a data structure used in atomic LEB change 390 | + * requests. 391 | + * @lnum: logical eraseblock number to change 392 | + * @bytes: how many bytes will be written to the logical eraseblock 393 | + * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) 394 | + * @padding: reserved for future, not used, has to be zeroed 395 | + */ 396 | +struct ubi_leb_change_req { 397 | + __s32 lnum; 398 | + __s32 bytes; 399 | + __s8 dtype; 400 | + __s8 padding[7]; 401 | +} __attribute__ ((packed)); 402 | + 403 | +/** 404 | + * struct ubi_map_req - a data structure used in map LEB requests. 405 | + * @lnum: logical eraseblock number to unmap 406 | + * @dtype: data type (%UBI_LONGTERM, %UBI_SHORTTERM, %UBI_UNKNOWN) 407 | + * @padding: reserved for future, not used, has to be zeroed 408 | + */ 409 | +struct ubi_map_req { 410 | + __s32 lnum; 411 | + __s8 dtype; 412 | + __s8 padding[3]; 413 | +} __attribute__ ((packed)); 414 | + 415 | + 416 | +/** 417 | + * struct ubi_set_prop_req - a data structure used to set an ubi volume 418 | + * property. 419 | + * @property: property to set (%UBI_PROP_DIRECT_WRITE) 420 | + * @padding: reserved for future, not used, has to be zeroed 421 | + * @value: value to set 422 | + */ 423 | +struct ubi_set_prop_req { 424 | + __u8 property; 425 | + __u8 padding[7]; 426 | + __u64 value; 427 | +} __attribute__ ((packed)); 428 | + 429 | +#endif /* __UBI_USER_H__ */ 430 | -- 431 | 1.7.0.4 432 | 433 | -------------------------------------------------------------------------------- /patches/011-ether_ntoa-udhcpd.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Mon, 19 Mar 2012 17:58:53 +0000 3 | Subject: [PATCH] fix udhcpd and nameif, add ether_ntoa_r and ether_aton_r from glibc 4 | 5 | this patch also fixes part of arping and ether-wake, but not 6 | sufficiently yet 7 | 8 | patch from 'ether_XtoY-from-glibc' by Dan Drown 9 | http://dan.drown.org/android/src/busybox/ 10 | --- 11 | networking/Kbuild.src | 3 ++ 12 | networking/arping.c | 7 +++- 13 | networking/ether-wake.c | 5 ++- 14 | networking/ether_aton_r.c | 63 +++++++++++++++++++++++++++++++++++++++++++ 15 | networking/ether_ntoa_r.c | 33 ++++++++++++++++++++++ 16 | networking/ether_port.h | 29 +++++++++++++++++++ 17 | networking/udhcp/Kbuild.src | 1 + 18 | networking/udhcp/files.c | 3 ++ 19 | 8 files changed, 140 insertions(+), 4 deletions(-) 20 | create mode 100644 networking/ether_aton_r.c 21 | create mode 100644 networking/ether_ntoa_r.c 22 | create mode 100644 networking/ether_port.h 23 | 24 | diff --git a/networking/Kbuild.src b/networking/Kbuild.src 25 | index 944f27b..365ae6c 100644 26 | --- a/networking/Kbuild.src 27 | +++ b/networking/Kbuild.src 28 | @@ -9,9 +9,11 @@ lib-y:= 29 | INSERT 30 | lib-$(CONFIG_ARP) += arp.o interface.o 31 | lib-$(CONFIG_ARPING) += arping.o 32 | +lib-$(CONFIG_ARPING) += ether_ntoa_r.o 33 | lib-$(CONFIG_BRCTL) += brctl.o 34 | lib-$(CONFIG_DNSD) += dnsd.o 35 | lib-$(CONFIG_ETHER_WAKE) += ether-wake.o 36 | +lib-$(CONFIG_ETHER_WAKE) += ether_aton_r.o ether_ntoa_r.o 37 | lib-$(CONFIG_FAKEIDENTD) += isrv_identd.o isrv.o 38 | lib-$(CONFIG_FTPD) += ftpd.o 39 | lib-$(CONFIG_FTPGET) += ftpgetput.o 40 | @@ -26,6 +28,7 @@ lib-$(CONFIG_INETD) += inetd.o 41 | lib-$(CONFIG_IP) += ip.o 42 | lib-$(CONFIG_IPCALC) += ipcalc.o 43 | lib-$(CONFIG_NAMEIF) += nameif.o 44 | +lib-$(CONFIG_NAMEIF) += ether_aton_r.o 45 | lib-$(CONFIG_NC) += nc.o 46 | lib-$(CONFIG_NETSTAT) += netstat.o 47 | lib-$(CONFIG_NSLOOKUP) += nslookup.o 48 | diff --git a/networking/arping.c b/networking/arping.c 49 | index a4421ed..376d970 100644 50 | --- a/networking/arping.c 51 | +++ b/networking/arping.c 52 | @@ -228,21 +228,24 @@ static bool recv_pack(unsigned char *buf, int len, struct sockaddr_ll *FROM) 53 | } 54 | if (!(option_mask32 & QUIET)) { 55 | int s_printed = 0; 56 | + char ether_buf[20]; 57 | 58 | printf("%scast re%s from %s [%s]", 59 | FROM->sll_pkttype == PACKET_HOST ? "Uni" : "Broad", 60 | ah->ar_op == htons(ARPOP_REPLY) ? "ply" : "quest", 61 | inet_ntoa(src_ip), 62 | - ether_ntoa((struct ether_addr *) p)); 63 | + ether_ntoa_r((struct ether_addr *) p, ether_buf)); 64 | if (dst_ip.s_addr != src.s_addr) { 65 | printf("for %s ", inet_ntoa(dst_ip)); 66 | s_printed = 1; 67 | } 68 | if (memcmp(p + ah->ar_hln + 4, me.sll_addr, ah->ar_hln)) { 69 | + char ether_buf[20]; 70 | + 71 | if (!s_printed) 72 | printf("for "); 73 | printf("[%s]", 74 | - ether_ntoa((struct ether_addr *) p + ah->ar_hln + 4)); 75 | + ether_ntoa_r((struct ether_addr *) p + ah->ar_hln + 4, ether_buf)); 76 | } 77 | 78 | if (last) { 79 | diff --git a/networking/ether-wake.c b/networking/ether-wake.c 80 | index 6a88279..c72da32 100644 81 | --- a/networking/ether-wake.c 82 | +++ b/networking/ether-wake.c 83 | @@ -117,16 +117,17 @@ void bb_debug_dump_packet(unsigned char *outpack, int pktsize) 84 | static void get_dest_addr(const char *hostid, struct ether_addr *eaddr) 85 | { 86 | struct ether_addr *eap; 87 | + char ether_buf[20]; 88 | 89 | eap = ether_aton_r(hostid, eaddr); 90 | if (eap) { 91 | - bb_debug_msg("The target station address is %s\n\n", ether_ntoa(eap)); 92 | + bb_debug_msg("The target station address is %s\n\n", ether_ntoa_r(eap, ether_buf)); 93 | #if !defined(__UCLIBC_MAJOR__) \ 94 | || __UCLIBC_MAJOR__ > 0 \ 95 | || __UCLIBC_MINOR__ > 9 \ 96 | || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ >= 30) 97 | } else if (ether_hostton(hostid, eaddr) == 0) { 98 | - bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa(eaddr)); 99 | + bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa_r(eaddr, ether_buf)); 100 | #endif 101 | } else { 102 | bb_show_usage(); 103 | diff --git a/networking/ether_aton_r.c b/networking/ether_aton_r.c 104 | new file mode 100644 105 | index 0000000..0215f16 106 | --- /dev/null 107 | +++ b/networking/ether_aton_r.c 108 | @@ -0,0 +1,63 @@ 109 | +/* Copyright (C) 1996,97,98,99,2002 Free Software Foundation, Inc. 110 | + This file is part of the GNU C Library. 111 | + Contributed by Ulrich Drepper , 1996. 112 | + 113 | + The GNU C Library is free software; you can redistribute it and/or 114 | + modify it under the terms of the GNU Lesser General Public 115 | + License as published by the Free Software Foundation; either 116 | + version 2.1 of the License, or (at your option) any later version. 117 | + 118 | + The GNU C Library is distributed in the hope that it will be useful, 119 | + but WITHOUT ANY WARRANTY; without even the implied warranty of 120 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 121 | + Lesser General Public License for more details. 122 | + 123 | + You should have received a copy of the GNU Lesser General Public 124 | + License along with the GNU C Library; if not, write to the Free 125 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 126 | + 02111-1307 USA. */ 127 | + 128 | +#include 129 | +#include 130 | +#include 131 | +#include 132 | + 133 | + 134 | +struct ether_addr * 135 | +ether_aton_r (const char *asc, struct ether_addr *addr) 136 | +{ 137 | + size_t cnt; 138 | + 139 | + for (cnt = 0; cnt < 6; ++cnt) 140 | + { 141 | + unsigned int number; 142 | + char ch; 143 | + 144 | + ch = tolower (*asc++); 145 | + if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f')) 146 | + return NULL; 147 | + number = isdigit (ch) ? (ch - '0') : (ch - 'a' + 10); 148 | + 149 | + ch = tolower (*asc); 150 | + if ((cnt < 5 && ch != ':') || (cnt == 5 && ch != '\0' && !isspace (ch))) 151 | + { 152 | + ++asc; 153 | + if ((ch < '0' || ch > '9') && (ch < 'a' || ch > 'f')) 154 | + return NULL; 155 | + number <<= 4; 156 | + number += isdigit (ch) ? (ch - '0') : (ch - 'a' + 10); 157 | + 158 | + ch = *asc; 159 | + if (cnt < 5 && ch != ':') 160 | + return NULL; 161 | + } 162 | + 163 | + /* Store result. */ 164 | + addr->ether_addr_octet[cnt] = (unsigned char) number; 165 | + 166 | + /* Skip ':'. */ 167 | + ++asc; 168 | + } 169 | + 170 | + return addr; 171 | +} 172 | diff --git a/networking/ether_ntoa_r.c b/networking/ether_ntoa_r.c 173 | new file mode 100644 174 | index 0000000..cd50614 175 | --- /dev/null 176 | +++ b/networking/ether_ntoa_r.c 177 | @@ -0,0 +1,33 @@ 178 | +/* Copyright (C) 1996,97,2002 Free Software Foundation, Inc. 179 | + This file is part of the GNU C Library. 180 | + Contributed by Ulrich Drepper , 1996. 181 | + 182 | + The GNU C Library is free software; you can redistribute it and/or 183 | + modify it under the terms of the GNU Lesser General Public 184 | + License as published by the Free Software Foundation; either 185 | + version 2.1 of the License, or (at your option) any later version. 186 | + 187 | + The GNU C Library is distributed in the hope that it will be useful, 188 | + but WITHOUT ANY WARRANTY; without even the implied warranty of 189 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 190 | + Lesser General Public License for more details. 191 | + 192 | + You should have received a copy of the GNU Lesser General Public 193 | + License along with the GNU C Library; if not, write to the Free 194 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 195 | + 02111-1307 USA. */ 196 | + 197 | +#include 198 | +#include 199 | +#include 200 | + 201 | + 202 | +char * 203 | +ether_ntoa_r (const struct ether_addr *addr, char *buf) 204 | +{ 205 | + sprintf (buf, "%x:%x:%x:%x:%x:%x", 206 | + addr->ether_addr_octet[0], addr->ether_addr_octet[1], 207 | + addr->ether_addr_octet[2], addr->ether_addr_octet[3], 208 | + addr->ether_addr_octet[4], addr->ether_addr_octet[5]); 209 | + return buf; 210 | +} 211 | diff --git a/networking/ether_port.h b/networking/ether_port.h 212 | new file mode 100644 213 | index 0000000..5e0146b 214 | --- /dev/null 215 | +++ b/networking/ether_port.h 216 | @@ -0,0 +1,29 @@ 217 | +/* Copyright (C) 1996,97,98,99,2002 Free Software Foundation, Inc. 218 | + This file is part of the GNU C Library. 219 | + Contributed by Ulrich Drepper , 1996. 220 | + 221 | + The GNU C Library is free software; you can redistribute it and/or 222 | + modify it under the terms of the GNU Lesser General Public 223 | + License as published by the Free Software Foundation; either 224 | + version 2.1 of the License, or (at your option) any later version. 225 | + 226 | + The GNU C Library is distributed in the hope that it will be useful, 227 | + but WITHOUT ANY WARRANTY; without even the implied warranty of 228 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 229 | + Lesser General Public License for more details. 230 | + 231 | + You should have received a copy of the GNU Lesser General Public 232 | + License along with the GNU C Library; if not, write to the Free 233 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 234 | + 02111-1307 USA. */ 235 | + 236 | +#ifndef ETHER_PORT_H 237 | +#define ETHER_PORT_H 1 238 | + 239 | +#include 240 | +#include 241 | + 242 | +struct ether_addr * ether_aton_r (const char *asc, struct ether_addr *addr); 243 | +char * ether_ntoa_r (const struct ether_addr *addr, char *buf); 244 | + 245 | +#endif /* ETHER_PORT_H */ 246 | diff --git a/networking/udhcp/Kbuild.src b/networking/udhcp/Kbuild.src 247 | index b8767ba..f6853a4 100644 248 | --- a/networking/udhcp/Kbuild.src 249 | +++ b/networking/udhcp/Kbuild.src 250 | @@ -14,6 +14,7 @@ lib-$(CONFIG_UDHCPD) += common.o packet.o signalpipe.o socket.o 251 | 252 | lib-$(CONFIG_UDHCPC) += dhcpc.o 253 | lib-$(CONFIG_UDHCPD) += dhcpd.o arpping.o files.o leases.o static_leases.o 254 | +lib-$(CONFIG_UDHCPD) += ../ether_aton_r.o ../ether_ntoa_r.o 255 | lib-$(CONFIG_DUMPLEASES) += dumpleases.o 256 | lib-$(CONFIG_DHCPRELAY) += dhcprelay.o 257 | 258 | diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c 259 | index 6840f3c..9eb6688 100644 260 | --- a/networking/udhcp/files.c 261 | +++ b/networking/udhcp/files.c 262 | @@ -6,8 +6,11 @@ 263 | * 264 | * Licensed under GPLv2, see file LICENSE in this source tree. 265 | */ 266 | +#include 267 | #include 268 | 269 | +#include "../ether_port.h" 270 | + 271 | #include "common.h" 272 | #include "dhcpd.h" 273 | 274 | -- 275 | 1.7.0.4 276 | 277 | -------------------------------------------------------------------------------- /patches/012-arping.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Mon, 19 Mar 2012 18:03:19 +0000 3 | Subject: [PATCH] fix arping: include if_arp.h (for arphdr) and add mempcpy.c 4 | 5 | fixing arping also requires adding ether_ntoa_r, see 'fix udhcpd' patch 6 | 7 | patch from 'struct-arphdr' and 'mempcpy-function' by Dan Drown 8 | http://dan.drown.org/android/src/busybox/ 9 | --- 10 | networking/arping.c | 1 + 11 | 1 file changed, 1 insertion(+) 12 | 13 | diff --git a/networking/arping.c b/networking/arping.c 14 | index 37dfec1..c34e002 100644 15 | --- a/networking/arping.c 16 | +++ b/networking/arping.c 17 | @@ -26,6 +26,7 @@ 18 | #include 19 | #include 20 | #include 21 | +#include /* for arphdr */ 22 | 23 | #include "libbb.h" 24 | 25 | -- 26 | 1.7.10.4 27 | 28 | -------------------------------------------------------------------------------- /patches/012-mempcpy.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Thu, 2 Aug 2012 22:37:46 +0200 3 | Subject: [PATCH] Add mempcpy (android/bionic doesn't have it) 4 | 5 | Signed-off-by: Tias Guns 6 | --- 7 | include/platform.h | 7 +++++++ 8 | libbb/platform.c | 9 +++++++++ 9 | networking/arping.c | 7 ------- 10 | 3 files changed, 16 insertions(+), 7 deletions(-) 11 | 12 | diff --git a/include/platform.h b/include/platform.h 13 | index ba534b2..3e101ba 100644 14 | --- a/include/platform.h 15 | +++ b/include/platform.h 16 | @@ -368,6 +368,7 @@ typedef unsigned smalluint; 17 | #define HAVE_MNTENT_H 1 18 | #define HAVE_NET_ETHERNET_H 1 19 | #define HAVE_SYS_STATFS_H 1 20 | +#define HAVE_MEMPCPY 1 21 | 22 | #if defined(__UCLIBC_MAJOR__) 23 | # if __UCLIBC_MAJOR__ == 0 \ 24 | @@ -447,6 +448,7 @@ typedef unsigned smalluint; 25 | # undef HAVE_STRVERSCMP 26 | # undef HAVE_UNLOCKED_LINE_OPS 27 | # undef HAVE_NET_ETHERNET_H 28 | +# undef HAVE_MEMPCPY 29 | #endif 30 | 31 | /* 32 | @@ -506,4 +508,9 @@ extern int vasprintf(char **string_ptr, const char *format, va_list p) FAST_FUNC 33 | extern ssize_t getline(char **lineptr, size_t *n, FILE *stream) FAST_FUNC; 34 | #endif 35 | 36 | +#ifndef HAVE_MEMPCPY 37 | +# include /* size_t */ 38 | +extern void *mempcpy(void *dest, const void *src, size_t n); 39 | +#endif 40 | + 41 | #endif 42 | diff --git a/libbb/platform.c b/libbb/platform.c 43 | index 2bf34f5..9e0d14e 100644 44 | --- a/libbb/platform.c 45 | +++ b/libbb/platform.c 46 | @@ -174,3 +174,12 @@ ssize_t FAST_FUNC getline(char **lineptr, size_t *n, FILE *stream) 47 | return len; 48 | } 49 | #endif 50 | + 51 | +#ifndef HAVE_MEMPCPY 52 | +void *mempcpy(void *dest, const void *src, size_t n) 53 | +{ 54 | + memcpy(dest, src, n); 55 | + dest += n; 56 | + return dest; 57 | +} 58 | +#endif 59 | \ No newline at end of file 60 | diff --git a/networking/arping.c b/networking/arping.c 61 | index 376d970..37dfec1 100644 62 | --- a/networking/arping.c 63 | +++ b/networking/arping.c 64 | @@ -79,13 +79,6 @@ struct globals { 65 | count = -1; \ 66 | } while (0) 67 | 68 | -// If GNUisms are not available... 69 | -//static void *mempcpy(void *_dst, const void *_src, int n) 70 | -//{ 71 | -// memcpy(_dst, _src, n); 72 | -// return (char*)_dst + n; 73 | -//} 74 | - 75 | static int send_pack(struct in_addr *src_addr, 76 | struct in_addr *dst_addr, struct sockaddr_ll *ME, 77 | struct sockaddr_ll *HE) 78 | -- 79 | 1.7.10.4 80 | 81 | -------------------------------------------------------------------------------- /patches/015-zcip.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Mon, 19 Mar 2012 18:34:51 +0000 3 | Subject: [PATCH] fix zcip: struct ether_arp missing, use FreeBSD's 4 | 5 | patch from 'struct-etherarp' by Dan Drown 6 | http://dan.drown.org/android/src/busybox/ 7 | --- 8 | networking/struct-etherarp.h | 75 ++++++++++++++++++++++++++++++++++++++++++ 9 | networking/zcip.c | 1 + 10 | 2 files changed, 76 insertions(+), 0 deletions(-) 11 | create mode 100644 networking/struct-etherarp.h 12 | 13 | diff --git a/networking/struct-etherarp.h b/networking/struct-etherarp.h 14 | new file mode 100644 15 | index 0000000..02a9c5b 16 | --- /dev/null 17 | +++ b/networking/struct-etherarp.h 18 | @@ -0,0 +1,75 @@ 19 | +/* 20 | + * Copyright (c) 1982, 1986, 1993 21 | + * The Regents of the University of California. All rights reserved. 22 | + * 23 | + * Redistribution and use in source and binary forms, with or without 24 | + * modification, are permitted provided that the following conditions 25 | + * are met: 26 | + * 1. Redistributions of source code must retain the above copyright 27 | + * notice, this list of conditions and the following disclaimer. 28 | + * 2. Redistributions in binary form must reproduce the above copyright 29 | + * notice, this list of conditions and the following disclaimer in the 30 | + * documentation and/or other materials provided with the distribution. 31 | + * 4. Neither the name of the University nor the names of its contributors 32 | + * may be used to endorse or promote products derived from this software 33 | + * without specific prior written permission. 34 | + * 35 | + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 36 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 37 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 38 | + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 39 | + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 40 | + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 41 | + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 42 | + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 43 | + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 44 | + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 45 | + * SUCH DAMAGE. 46 | + * 47 | + * @(#)if_ether.h 8.3 (Berkeley) 5/2/95 48 | + * $FreeBSD$ 49 | + */ 50 | +#ifndef STRUCT_ETHERARP_H 51 | +#define STRUCT_ETHERARP_H 1 52 | + 53 | +#include 54 | + 55 | +/* 56 | + * Macro to map an IP multicast address to an Ethernet multicast address. 57 | + * The high-order 25 bits of the Ethernet address are statically assigned, 58 | + * and the low-order 23 bits are taken from the low end of the IP address. 59 | + */ 60 | +#define ETHER_MAP_IP_MULTICAST(ipaddr, enaddr) \ 61 | + /* struct in_addr *ipaddr; */ \ 62 | + /* u_char enaddr[ETH_ALEN]; */ \ 63 | +{ \ 64 | + (enaddr)[0] = 0x01; \ 65 | + (enaddr)[1] = 0x00; \ 66 | + (enaddr)[2] = 0x5e; \ 67 | + (enaddr)[3] = ((u_int8_t *)ipaddr)[1] & 0x7f; \ 68 | + (enaddr)[4] = ((u_int8_t *)ipaddr)[2]; \ 69 | + (enaddr)[5] = ((u_int8_t *)ipaddr)[3]; \ 70 | +} 71 | + 72 | +/* 73 | + * Ethernet Address Resolution Protocol. 74 | + * 75 | + * See RFC 826 for protocol description. Structure below is adapted 76 | + * to resolving internet addresses. Field names used correspond to 77 | + * RFC 826. 78 | + */ 79 | +struct ether_arp { 80 | + struct arphdr ea_hdr; /* fixed-size header */ 81 | + u_int8_t arp_sha[ETH_ALEN]; /* sender hardware address */ 82 | + u_int8_t arp_spa[4]; /* sender protocol address */ 83 | + u_int8_t arp_tha[ETH_ALEN]; /* target hardware address */ 84 | + u_int8_t arp_tpa[4]; /* target protocol address */ 85 | +}; 86 | +#define arp_hrd ea_hdr.ar_hrd 87 | +#define arp_pro ea_hdr.ar_pro 88 | +#define arp_hln ea_hdr.ar_hln 89 | +#define arp_pln ea_hdr.ar_pln 90 | +#define arp_op ea_hdr.ar_op 91 | + 92 | + 93 | +#endif /* STRUCT_ETHERARP_H */ 94 | diff --git a/networking/zcip.c b/networking/zcip.c 95 | index 7314ff8..52fcf57 100644 96 | --- a/networking/zcip.c 97 | +++ b/networking/zcip.c 98 | @@ -40,6 +40,7 @@ 99 | #include 100 | #include 101 | #include 102 | +#include "struct-etherarp.h" 103 | 104 | #include 105 | 106 | -- 107 | 1.7.0.4 108 | 109 | -------------------------------------------------------------------------------- /patches/016-swapon-swapoff.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Mon, 19 Mar 2012 23:35:34 +0000 3 | Subject: [PATCH] fix swapon, swapoff: comment out MNTOPT_NOAUTO 4 | 5 | patch from 'swap-on-off' by Dan Drown 6 | "syscalls for swapon/swapoff and defines" 7 | http://dan.drown.org/android/src/busybox/ 8 | --- 9 | util-linux/swaponoff.c | 2 ++ 10 | 1 file changed, 2 insertions(+) 11 | 12 | diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c 13 | index 54867ec..03f7786 100644 14 | --- a/util-linux/swaponoff.c 15 | +++ b/util-linux/swaponoff.c 16 | @@ -93,7 +93,9 @@ static int do_em_all(void) 17 | /* swapon -a should ignore entries with noauto, 18 | * but swapoff -a should process them */ 19 | if (applet_name[5] != 'n' 20 | +#ifdef MNTOPT_NOAUTO 21 | || hasmntopt(m, MNTOPT_NOAUTO) == NULL 22 | +#endif 23 | ) { 24 | err += swap_enable_disable(m->mnt_fsname); 25 | } 26 | -- 27 | 1.7.10.4 28 | 29 | -------------------------------------------------------------------------------- /patches/016-swaponoff-syscalls.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Thu, 2 Aug 2012 22:47:31 +0200 3 | Subject: [PATCH 1/2] add swapoff/swapon syscalls for android 4 | 5 | Signed-off-by: Tias Guns 6 | --- 7 | libbb/missing_syscalls.c | 10 ++++++++++ 8 | 1 file changed, 10 insertions(+) 9 | 10 | diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c 11 | index dd430e3..235f4b8 100644 12 | --- a/libbb/missing_syscalls.c 13 | +++ b/libbb/missing_syscalls.c 14 | @@ -39,4 +39,14 @@ int pivot_root(const char *new_root, const char *put_old) 15 | { 16 | return syscall(__NR_pivot_root, new_root, put_old); 17 | } 18 | + 19 | +int swapoff(const char *path) 20 | +{ 21 | + return syscall(__NR_swapoff, path); 22 | +} 23 | + 24 | +int swapon(const char *path, int swapflags) 25 | +{ 26 | + return syscall(__NR_swapon, path, swapflags); 27 | +} 28 | #endif 29 | -- 30 | 1.7.10.4 31 | 32 | -------------------------------------------------------------------------------- /patches/017-a-shmget-msgget-semget-syscalls.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Sun, 5 Aug 2012 15:02:35 +0200 3 | Subject: [PATCH] android syscalls: shmget/msgget/semget 4 | 5 | patch from 'no-sys-shm,msg,sem' by Dan Drown 6 | http://dan.drown.org/android/src/busybox/ 7 | 8 | Signed-off-by: Tias Guns 9 | --- 10 | libbb/missing_syscalls.c | 15 +++++++++++++++ 11 | 1 file changed, 15 insertions(+) 12 | 13 | diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c 14 | index 235f4b8..a75a332 100644 15 | --- a/libbb/missing_syscalls.c 16 | +++ b/libbb/missing_syscalls.c 17 | @@ -49,4 +49,19 @@ int swapon(const char *path, int swapflags) 18 | { 19 | return syscall(__NR_swapon, path, swapflags); 20 | } 21 | + 22 | +int shmget(key_t key, size_t size, int shmflg) 23 | +{ 24 | + return syscall(__NR_shmget, key, size, shmflg); 25 | +} 26 | + 27 | +int msgget(key_t key, int msgflg) 28 | +{ 29 | + return syscall(__NR_msgget, key, msgflg); 30 | +} 31 | + 32 | +int semget(key_t key, int nsems, int semflg) 33 | +{ 34 | + return syscall(__NR_semget, key, nsems, semflg); 35 | +} 36 | #endif 37 | -- 38 | 1.7.10.4 39 | 40 | -------------------------------------------------------------------------------- /patches/017-b-msgctl-shmctl-syscalls.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Sun, 5 Aug 2012 15:07:40 +0200 3 | Subject: [PATCH] android syscalls: msgctl shmctl 4 | 5 | Signed-off-by: Tias Guns 6 | --- 7 | libbb/missing_syscalls.c | 13 +++++++++++++ 8 | 1 file changed, 13 insertions(+) 9 | 10 | diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c 11 | index a75a332..ac75829 100644 12 | --- a/libbb/missing_syscalls.c 13 | +++ b/libbb/missing_syscalls.c 14 | @@ -64,4 +64,17 @@ int semget(key_t key, int nsems, int semflg) 15 | { 16 | return syscall(__NR_semget, key, nsems, semflg); 17 | } 18 | + 19 | +struct msqid_ds; /* #include */ 20 | +int msgctl(int msqid, int cmd, struct msqid_ds *buf) 21 | +{ 22 | + return syscall(__NR_msgctl, msqid, cmd, buf); 23 | +} 24 | + 25 | +struct shmid_ds; /* #include */ 26 | +// NOTE: IPC_INFO takes a struct shminfo64 27 | +int shmctl(int shmid, int cmd, struct shmid_ds *buf) 28 | +{ 29 | + return syscall(__NR_shmctl, shmid, cmd, buf); 30 | +} 31 | #endif 32 | -- 33 | 1.7.10.4 34 | 35 | -------------------------------------------------------------------------------- /patches/017-c-semctl-syscall.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Sun, 5 Aug 2012 15:25:34 +0200 3 | Subject: [PATCH] android syscall (non-trivial): semctl 4 | 5 | needed by ipcs and ipcrm, also needed (but not sufficient) for syslogd and logread 6 | 7 | semctl from glibc 8 | patch from 'no-sys-shm,msg,sem' by Dan Drown 9 | http://dan.drown.org/android/src/busybox/ 10 | 11 | Signed-off-by: Tias Guns 12 | --- 13 | libbb/semctl.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 14 | 1 file changed, 58 insertions(+) 15 | create mode 100644 libbb/semctl.c 16 | 17 | diff --git a/libbb/semctl.c b/libbb/semctl.c 18 | new file mode 100644 19 | index 0000000..68f846a 20 | --- /dev/null 21 | +++ b/libbb/semctl.c 22 | @@ -0,0 +1,58 @@ 23 | +/* Copyright (C) 1995,1997,1998,2000,2003,2004,2006 24 | + Free Software Foundation, Inc. 25 | + This file is part of the GNU C Library. 26 | + Contributed by Ulrich Drepper , August 1995. 27 | + 28 | + The GNU C Library is free software; you can redistribute it and/or 29 | + modify it under the terms of the GNU Lesser General Public 30 | + License as published by the Free Software Foundation; either 31 | + version 2.1 of the License, or (at your option) any later version. 32 | + 33 | + The GNU C Library is distributed in the hope that it will be useful, 34 | + but WITHOUT ANY WARRANTY; without even the implied warranty of 35 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 36 | + Lesser General Public License for more details. 37 | + 38 | + You should have received a copy of the GNU Lesser General Public 39 | + License along with the GNU C Library; if not, write to the Free 40 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 41 | + 02111-1307 USA. */ 42 | +/* originally from glibc-2.14/sysdeps/unix/sysv/linux/semctl.c, modified */ 43 | + 44 | +// syscall used by syslogd, ipcrm, ipcs 45 | +//kbuild:lib-y += semctl.o 46 | + 47 | +#include /* For __NR_xxx definitions */ 48 | +#include 49 | +#include 50 | +#include "libbb.h" 51 | + 52 | +/* code from GLIBC */ 53 | +int semctl(int semid, int semnum, int cmd, ...) { 54 | + union semun arg; 55 | + va_list ap; 56 | + 57 | + va_start (ap, cmd); 58 | + 59 | + /* Get the argument only if required. */ 60 | + arg.buf = NULL; 61 | + switch (cmd) 62 | + { 63 | + case SETVAL: /* arg.val */ 64 | + case GETALL: /* arg.array */ 65 | + case SETALL: 66 | + case IPC_STAT: /* arg.buf */ 67 | + case IPC_SET: 68 | + case SEM_STAT: 69 | + case IPC_INFO: /* arg.__buf */ 70 | + case SEM_INFO: 71 | + va_start (ap, cmd); 72 | + arg = va_arg (ap, union semun); 73 | + va_end (ap); 74 | + break; 75 | + } 76 | + 77 | + va_end (ap); 78 | + 79 | + return syscall(__NR_semctl, semid, semnum, cmd, arg); 80 | +} 81 | -- 82 | 1.7.10.4 83 | 84 | -------------------------------------------------------------------------------- /patches/017-ipcs-ipcrm.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Tue, 20 Mar 2012 21:26:07 +0000 3 | Subject: [PATCH] fix ipcs, ipcrm no sys/sem-shm-msg, use linux/sem.h etc 4 | 5 | patch from 'no-sys-shm,msg,sem' by Dan Drown 6 | http://dan.drown.org/android/src/busybox/ 7 | 8 | Signed-off-by: Tias Guns 9 | --- 10 | util-linux/ipcrm.c | 9 +++++---- 11 | util-linux/ipcs.c | 9 +++++---- 12 | 2 files changed, 10 insertions(+), 8 deletions(-) 13 | 14 | diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c 15 | index 274050c..b65e8ef 100644 16 | --- a/util-linux/ipcrm.c 17 | +++ b/util-linux/ipcrm.c 18 | @@ -22,11 +22,12 @@ 19 | /* X/OPEN tells us to use for semctl() */ 20 | /* X/OPEN tells us to use for msgctl() */ 21 | #include 22 | -#include 23 | -#include 24 | -#include 25 | +#include 26 | +#include 27 | +#include 28 | 29 | -#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) 30 | +#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || \ 31 | + defined(__ANDROID__) 32 | /* union semun is defined by including */ 33 | #else 34 | /* according to X/OPEN we have to define it ourselves */ 35 | diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c 36 | index ee7df5e..fafe4e3 100644 37 | --- a/util-linux/ipcs.c 38 | +++ b/util-linux/ipcs.c 39 | @@ -29,9 +29,9 @@ 40 | /* X/OPEN tells us to use for shmctl() */ 41 | #include 42 | #include 43 | -#include 44 | -#include 45 | -#include 46 | +#include 47 | +#include 48 | +#include 49 | 50 | #include "libbb.h" 51 | 52 | @@ -77,7 +77,8 @@ struct shm_info { 53 | /* The last arg of semctl is a union semun, but where is it defined? 54 | X/OPEN tells us to define it ourselves, but until recently 55 | Linux include files would also define it. */ 56 | -#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) 57 | +#if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) || \ 58 | + defined(__ANDROID__) 59 | /* union semun is defined by including */ 60 | #else 61 | /* according to X/OPEN we have to define it ourselves */ 62 | -- 63 | 1.7.10.4 64 | 65 | -------------------------------------------------------------------------------- /patches/018-semop-shmdt-syscalls.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Sun, 5 Aug 2012 15:39:30 +0200 3 | Subject: [PATCH] android syscalls: shmdt shmat sembuf 4 | 5 | Signed-off-by: Tias Guns 6 | --- 7 | libbb/missing_syscalls.c | 16 ++++++++++++++++ 8 | 1 file changed, 16 insertions(+) 9 | 10 | diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c 11 | index ac75829..474accb 100644 12 | --- a/libbb/missing_syscalls.c 13 | +++ b/libbb/missing_syscalls.c 14 | @@ -55,6 +55,16 @@ int shmget(key_t key, size_t size, int shmflg) 15 | return syscall(__NR_shmget, key, size, shmflg); 16 | } 17 | 18 | +int shmdt(const void *shmaddr) 19 | +{ 20 | + return syscall(__NR_shmdt, shmaddr); 21 | +} 22 | + 23 | +void *shmat(int shmid, const void *shmaddr, int shmflg) 24 | +{ 25 | + return (void *)syscall(__NR_shmat, shmid, shmaddr, shmflg); 26 | +} 27 | + 28 | int msgget(key_t key, int msgflg) 29 | { 30 | return syscall(__NR_msgget, key, msgflg); 31 | @@ -77,4 +87,10 @@ int shmctl(int shmid, int cmd, struct shmid_ds *buf) 32 | { 33 | return syscall(__NR_shmctl, shmid, cmd, buf); 34 | } 35 | + 36 | +struct sembuf; /* #include */ 37 | +int semop(int semid, struct sembuf *sops, unsigned nsops) 38 | +{ 39 | + return syscall(__NR_semop, semid, sops, nsops); 40 | +} 41 | #endif 42 | -- 43 | 1.7.10.4 44 | 45 | -------------------------------------------------------------------------------- /patches/018-syslogd-logread.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Tue, 20 Mar 2012 21:30:10 +0000 3 | Subject: [PATCH] fix syslogd, logread: add syslog.h, semop shmdt-at 4 | 5 | patch from 'no-sys-shm,msg,sem' and 'sys-syslog' by Dan Drown 6 | "sys/syslog.h header for syslogd" 7 | http://dan.drown.org/android/src/busybox/ 8 | --- 9 | include/sys/syslog.h | 138 +++++++++++++++++++++++++++++++++++++++++ 10 | sysklogd/logread.c | 4 +- 11 | sysklogd/syslogd.c | 4 +- 12 | sysklogd/syslogd_and_logger.c | 1 + 13 | 4 files changed, 143 insertions(+), 4 deletions(-) 14 | create mode 100644 include/sys/syslog.h 15 | 16 | diff --git a/include/sys/syslog.h b/include/sys/syslog.h 17 | new file mode 100644 18 | index 0000000..3c749a0 19 | --- /dev/null 20 | +++ b/include/sys/syslog.h 21 | @@ -0,0 +1,138 @@ 22 | +/* 23 | + * Copyright (c) 1982, 1986, 1988, 1993 24 | + * The Regents of the University of California. All rights reserved. 25 | + * 26 | + * Redistribution and use in source and binary forms, with or without 27 | + * modification, are permitted provided that the following conditions 28 | + * are met: 29 | + * 1. Redistributions of source code must retain the above copyright 30 | + * notice, this list of conditions and the following disclaimer. 31 | + * 2. Redistributions in binary form must reproduce the above copyright 32 | + * notice, this list of conditions and the following disclaimer in the 33 | + * documentation and/or other materials provided with the distribution. 34 | + * 4. Neither the name of the University nor the names of its contributors 35 | + * may be used to endorse or promote products derived from this software 36 | + * without specific prior written permission. 37 | + * 38 | + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 39 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 40 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 41 | + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 42 | + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 43 | + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 44 | + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 45 | + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 46 | + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 47 | + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 48 | + * SUCH DAMAGE. 49 | + * 50 | + * @(#)syslog.h 8.1 (Berkeley) 6/2/93 51 | + * 52 | + * 2011/7/5 - DD - modified to fit android Bionic environment 53 | + */ 54 | + 55 | +#ifndef _SYS_SYSLOG_H 56 | +#define _SYS_SYSLOG_H 1 57 | + 58 | +#include 59 | +#define __need___va_list 60 | +#include 61 | + 62 | +/* 63 | + * priorities/facilities are encoded into a single 32-bit quantity, where the 64 | + * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility 65 | + * (0-big number). Both the priorities and the facilities map roughly 66 | + * one-to-one to strings in the syslogd(8) source code. This mapping is 67 | + * included in this file. 68 | + * 69 | + * priorities (these are ordered) 70 | + */ 71 | +#define LOG_EMERG 0 /* system is unusable */ 72 | +#define LOG_ALERT 1 /* action must be taken immediately */ 73 | +#define LOG_CRIT 2 /* critical conditions */ 74 | +#define LOG_ERR 3 /* error conditions */ 75 | +#define LOG_WARNING 4 /* warning conditions */ 76 | +#define LOG_NOTICE 5 /* normal but significant condition */ 77 | +#define LOG_INFO 6 /* informational */ 78 | +#define LOG_DEBUG 7 /* debug-level messages */ 79 | + 80 | +#define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri)) 81 | + 82 | +#ifdef SYSLOG_NAMES 83 | +#define INTERNAL_NOPRI 0x10 /* the "no priority" priority */ 84 | + /* mark "facility" */ 85 | +#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES, 0) 86 | +typedef struct _code { 87 | + char *c_name; 88 | + int c_val; 89 | +} CODE; 90 | + 91 | +CODE prioritynames[] = 92 | + { 93 | + { "alert", LOG_ALERT }, 94 | + { "crit", LOG_CRIT }, 95 | + { "debug", LOG_DEBUG }, 96 | + { "emerg", LOG_EMERG }, 97 | + { "err", LOG_ERR }, 98 | + { "error", LOG_ERR }, /* DEPRECATED */ 99 | + { "info", LOG_INFO }, 100 | + { "none", INTERNAL_NOPRI }, /* INTERNAL */ 101 | + { "notice", LOG_NOTICE }, 102 | + { "panic", LOG_EMERG }, /* DEPRECATED */ 103 | + { "warn", LOG_WARNING }, /* DEPRECATED */ 104 | + { "warning", LOG_WARNING }, 105 | + { NULL, -1 } 106 | + }; 107 | +#endif 108 | + 109 | +#define LOG_NFACILITIES 24 /* current number of facilities */ 110 | + 111 | +#ifdef SYSLOG_NAMES 112 | +CODE facilitynames[] = 113 | + { 114 | + { "auth", LOG_AUTH }, 115 | + { "authpriv", LOG_AUTHPRIV }, 116 | + { "cron", LOG_CRON }, 117 | + { "daemon", LOG_DAEMON }, 118 | + { "ftp", LOG_FTP }, 119 | + { "kern", LOG_KERN }, 120 | + { "lpr", LOG_LPR }, 121 | + { "mail", LOG_MAIL }, 122 | + { "mark", INTERNAL_MARK }, /* INTERNAL */ 123 | + { "news", LOG_NEWS }, 124 | + { "security", LOG_AUTH }, /* DEPRECATED */ 125 | + { "syslog", LOG_SYSLOG }, 126 | + { "user", LOG_USER }, 127 | + { "uucp", LOG_UUCP }, 128 | + { "local0", LOG_LOCAL0 }, 129 | + { "local1", LOG_LOCAL1 }, 130 | + { "local2", LOG_LOCAL2 }, 131 | + { "local3", LOG_LOCAL3 }, 132 | + { "local4", LOG_LOCAL4 }, 133 | + { "local5", LOG_LOCAL5 }, 134 | + { "local6", LOG_LOCAL6 }, 135 | + { "local7", LOG_LOCAL7 }, 136 | + { NULL, -1 } 137 | + }; 138 | +#endif 139 | + 140 | +/* 141 | + * arguments to setlogmask. 142 | + */ 143 | +#define LOG_MASK(pri) (1 << (pri)) /* mask for one priority */ 144 | +#define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1) /* all priorities through pri */ 145 | + 146 | +/* 147 | + * Option flags for openlog. 148 | + * 149 | + * LOG_ODELAY no longer does anything. 150 | + * LOG_NDELAY is the inverse of what it used to be. 151 | + */ 152 | +#define LOG_PID 0x01 /* log the pid with each message */ 153 | +#define LOG_CONS 0x02 /* log on the console if errors in sending */ 154 | +#define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */ 155 | +#define LOG_NDELAY 0x08 /* don't delay open */ 156 | +#define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */ 157 | +#define LOG_PERROR 0x20 /* log to stderr as well */ 158 | + 159 | +#endif /* sys/syslog.h */ 160 | diff --git a/sysklogd/logread.c b/sysklogd/logread.c 161 | index 9939569..e978a5d 100644 162 | --- a/sysklogd/logread.c 163 | +++ b/sysklogd/logread.c 164 | @@ -17,8 +17,8 @@ 165 | 166 | #include "libbb.h" 167 | #include 168 | -#include 169 | -#include 170 | +#include 171 | +#include 172 | 173 | #define DEBUG 0 174 | 175 | diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c 176 | index fc380d9..1365bb8 100644 177 | --- a/sysklogd/syslogd.c 178 | +++ b/sysklogd/syslogd.c 179 | @@ -65,8 +65,8 @@ 180 | 181 | #if ENABLE_FEATURE_IPC_SYSLOG 182 | #include 183 | -#include 184 | -#include 185 | +#include 186 | +#include 187 | #endif 188 | 189 | 190 | diff --git a/sysklogd/syslogd_and_logger.c b/sysklogd/syslogd_and_logger.c 191 | index 0964f23..81c8909 100644 192 | --- a/sysklogd/syslogd_and_logger.c 193 | +++ b/sysklogd/syslogd_and_logger.c 194 | @@ -11,6 +11,7 @@ 195 | #define SYSLOG_NAMES 196 | #define SYSLOG_NAMES_CONST 197 | #include 198 | +#include 199 | 200 | #if 0 201 | /* For the record: with SYSLOG_NAMES defines 202 | -- 203 | 1.7.10.4 204 | 205 | -------------------------------------------------------------------------------- /patches/019-fsck.minix-mkfs.minix.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Tue, 20 Mar 2012 22:05:07 +0000 3 | Subject: [PATCH] fix fsck.minix, mkfs.minix: undef HAVE_SETBIT, 4 | MINIX2_SUPER_MAGIC, MINIX2_SUPER_MAGIC 5 | 6 | from 'no-setbit' by Dan Drown 7 | "there is no setbit/clrbit in bionic" 8 | from 'undefine-minix2-magic-to-use-in-enum' by Dan Drown 9 | "MINIX2_SUPER_MAGIC / MINIX2_SUPER_MAGIC2 defined in sys/vfs.h, undefine 10 | it to use it in the enum" 11 | http://dan.drown.org/android/src/busybox/ 12 | 13 | Signed-off-by: Tias Guns 14 | --- 15 | include/platform.h | 1 + 16 | util-linux/minix.h | 2 ++ 17 | 2 files changed, 3 insertions(+) 18 | 19 | diff --git a/include/platform.h b/include/platform.h 20 | index 3e101ba..30bcff6 100644 21 | --- a/include/platform.h 22 | +++ b/include/platform.h 23 | @@ -449,6 +449,7 @@ typedef unsigned smalluint; 24 | # undef HAVE_UNLOCKED_LINE_OPS 25 | # undef HAVE_NET_ETHERNET_H 26 | # undef HAVE_MEMPCPY 27 | +# undef HAVE_SETBIT 28 | #endif 29 | 30 | /* 31 | diff --git a/util-linux/minix.h b/util-linux/minix.h 32 | index e0fbcf7..060fab0 100644 33 | --- a/util-linux/minix.h 34 | +++ b/util-linux/minix.h 35 | @@ -54,6 +54,8 @@ struct minix_dir_entry { 36 | /* Believe it or not, but mount.h has this one #defined */ 37 | #undef BLOCK_SIZE 38 | 39 | +#undef MINIX2_SUPER_MAGIC 40 | +#undef MINIX2_SUPER_MAGIC2 41 | enum { 42 | BLOCK_SIZE = 1024, 43 | BITS_PER_BLOCK = BLOCK_SIZE << 3, 44 | -- 45 | 1.7.10.4 46 | 47 | -------------------------------------------------------------------------------- /patches/020-microcom.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Tue, 20 Mar 2012 23:45:32 +0000 3 | Subject: [PATCH] fix microcom, add cfsetspeed syscall from glibc 4 | 5 | based on 'misc-syscalls' by Dan Drown 6 | http://dan.drown.org/android/src/busybox/ 7 | 8 | Signed-off-by: Tias Guns 9 | --- 10 | libbb/cfsetspeed.c | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 11 | 1 file changed, 165 insertions(+) 12 | create mode 100644 libbb/cfsetspeed.c 13 | 14 | diff --git a/libbb/cfsetspeed.c b/libbb/cfsetspeed.c 15 | new file mode 100644 16 | index 0000000..ccf321a 17 | --- /dev/null 18 | +++ b/libbb/cfsetspeed.c 19 | @@ -0,0 +1,165 @@ 20 | +/* Copyright (C) 1992,93,96,97,98,2001 Free Software Foundation, Inc. 21 | + This file is part of the GNU C Library. 22 | + 23 | + The GNU C Library is free software; you can redistribute it and/or 24 | + modify it under the terms of the GNU Lesser General Public 25 | + License as published by the Free Software Foundation; either 26 | + version 2.1 of the License, or (at your option) any later version. 27 | + 28 | + The GNU C Library is distributed in the hope that it will be useful, 29 | + but WITHOUT ANY WARRANTY; without even the implied warranty of 30 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 31 | + Lesser General Public License for more details. 32 | + 33 | + You should have received a copy of the GNU Lesser General Public 34 | + License along with the GNU C Library; if not, write to the Free 35 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 36 | + 02111-1307 USA. */ 37 | + 38 | +//kbuild:lib-$(CONFIG_MICROCOM) += cfsetspeed.o 39 | +//kbuild:lib-$(CONFIG_GETTY) += cfsetspeed.o 40 | + 41 | +#include 42 | +#include 43 | +#include 44 | + 45 | +struct speed_struct 46 | +{ 47 | + speed_t value; 48 | + speed_t internal; 49 | +}; 50 | + 51 | +static const struct speed_struct speeds[] = 52 | + { 53 | +#ifdef B0 54 | + { 0, B0 }, 55 | +#endif 56 | +#ifdef B50 57 | + { 50, B50 }, 58 | +#endif 59 | +#ifdef B75 60 | + { 75, B75 }, 61 | +#endif 62 | +#ifdef B110 63 | + { 110, B110 }, 64 | +#endif 65 | +#ifdef B134 66 | + { 134, B134 }, 67 | +#endif 68 | +#ifdef B150 69 | + { 150, B150 }, 70 | +#endif 71 | +#ifdef B200 72 | + { 200, B200 }, 73 | +#endif 74 | +#ifdef B300 75 | + { 300, B300 }, 76 | +#endif 77 | +#ifdef B600 78 | + { 600, B600 }, 79 | +#endif 80 | +#ifdef B1200 81 | + { 1200, B1200 }, 82 | +#endif 83 | +#ifdef B1200 84 | + { 1200, B1200 }, 85 | +#endif 86 | +#ifdef B1800 87 | + { 1800, B1800 }, 88 | +#endif 89 | +#ifdef B2400 90 | + { 2400, B2400 }, 91 | +#endif 92 | +#ifdef B4800 93 | + { 4800, B4800 }, 94 | +#endif 95 | +#ifdef B9600 96 | + { 9600, B9600 }, 97 | +#endif 98 | +#ifdef B19200 99 | + { 19200, B19200 }, 100 | +#endif 101 | +#ifdef B38400 102 | + { 38400, B38400 }, 103 | +#endif 104 | +#ifdef B57600 105 | + { 57600, B57600 }, 106 | +#endif 107 | +#ifdef B76800 108 | + { 76800, B76800 }, 109 | +#endif 110 | +#ifdef B115200 111 | + { 115200, B115200 }, 112 | +#endif 113 | +#ifdef B153600 114 | + { 153600, B153600 }, 115 | +#endif 116 | +#ifdef B230400 117 | + { 230400, B230400 }, 118 | +#endif 119 | +#ifdef B307200 120 | + { 307200, B307200 }, 121 | +#endif 122 | +#ifdef B460800 123 | + { 460800, B460800 }, 124 | +#endif 125 | +#ifdef B500000 126 | + { 500000, B500000 }, 127 | +#endif 128 | +#ifdef B576000 129 | + { 576000, B576000 }, 130 | +#endif 131 | +#ifdef B921600 132 | + { 921600, B921600 }, 133 | +#endif 134 | +#ifdef B1000000 135 | + { 1000000, B1000000 }, 136 | +#endif 137 | +#ifdef B1152000 138 | + { 1152000, B1152000 }, 139 | +#endif 140 | +#ifdef B1500000 141 | + { 1500000, B1500000 }, 142 | +#endif 143 | +#ifdef B2000000 144 | + { 2000000, B2000000 }, 145 | +#endif 146 | +#ifdef B2500000 147 | + { 2500000, B2500000 }, 148 | +#endif 149 | +#ifdef B3000000 150 | + { 3000000, B3000000 }, 151 | +#endif 152 | +#ifdef B3500000 153 | + { 3500000, B3500000 }, 154 | +#endif 155 | +#ifdef B4000000 156 | + { 4000000, B4000000 }, 157 | +#endif 158 | + }; 159 | + 160 | + 161 | +/* Set both the input and output baud rates stored in *TERMIOS_P to SPEED. */ 162 | +int 163 | +cfsetspeed (struct termios *termios_p, speed_t speed) 164 | +{ 165 | + size_t cnt; 166 | + 167 | + for (cnt = 0; cnt < sizeof (speeds) / sizeof (speeds[0]); ++cnt) 168 | + if (speed == speeds[cnt].internal) 169 | + { 170 | + cfsetispeed (termios_p, speed); 171 | + cfsetospeed (termios_p, speed); 172 | + return 0; 173 | + } 174 | + else if (speed == speeds[cnt].value) 175 | + { 176 | + cfsetispeed (termios_p, speeds[cnt].internal); 177 | + cfsetospeed (termios_p, speeds[cnt].internal); 178 | + return 0; 179 | + } 180 | + 181 | + __set_errno (EINVAL); 182 | + 183 | + return -1; 184 | +} 185 | -- 186 | 1.7.10.4 187 | 188 | -------------------------------------------------------------------------------- /patches/022-ipv6.patch: -------------------------------------------------------------------------------- 1 | From c04d001c962e756d152abc1dbd58edfdbfee45a1 Mon Sep 17 00:00:00 2001 2 | From: Tias Guns 3 | Date: Mon, 19 Mar 2012 18:24:29 +0000 4 | Subject: [PATCH] fix ipv6, add ipv6_route.h 5 | 6 | from 'in6_rtmsg' by Dan Drown 7 | "in6_rtmsg defined in linux/ipv6_route.h" 8 | http://dan.drown.org/android/src/busybox/ 9 | --- 10 | include/linux/ipv6_route.h | 58 ++++++++++++++++++++++++++++++++++++++++++++ 11 | networking/ifconfig.c | 2 + 12 | networking/route.c | 2 + 13 | 3 files changed, 62 insertions(+), 0 deletions(-) 14 | create mode 100644 include/linux/ipv6_route.h 15 | 16 | diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h 17 | new file mode 100644 18 | index 0000000..144875d 19 | --- /dev/null 20 | +++ b/include/linux/ipv6_route.h 21 | @@ -0,0 +1,58 @@ 22 | +/* 23 | + * Linux INET6 implementation 24 | + * 25 | + * Authors: 26 | + * Pedro Roque 27 | + * 28 | + * This program is free software; you can redistribute it and/or 29 | + * modify it under the terms of the GNU General Public License 30 | + * as published by the Free Software Foundation; either version 31 | + * 2 of the License, or (at your option) any later version. 32 | + */ 33 | + 34 | +#ifndef _LINUX_IPV6_ROUTE_H 35 | +#define _LINUX_IPV6_ROUTE_H 36 | + 37 | +#include 38 | + 39 | +#define RTF_DEFAULT 0x00010000 /* default - learned via ND */ 40 | +#define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) 41 | + fallback, no routers on link */ 42 | +#define RTF_ADDRCONF 0x00040000 /* addrconf route - RA */ 43 | +#define RTF_PREFIX_RT 0x00080000 /* A prefix only route - RA */ 44 | +#define RTF_ANYCAST 0x00100000 /* Anycast */ 45 | + 46 | +#define RTF_NONEXTHOP 0x00200000 /* route with no nexthop */ 47 | +#define RTF_EXPIRES 0x00400000 48 | + 49 | +#define RTF_ROUTEINFO 0x00800000 /* route information - RA */ 50 | + 51 | +#define RTF_CACHE 0x01000000 /* cache entry */ 52 | +#define RTF_FLOW 0x02000000 /* flow significant route */ 53 | +#define RTF_POLICY 0x04000000 /* policy route */ 54 | + 55 | +#define RTF_PREF(pref) ((pref) << 27) 56 | +#define RTF_PREF_MASK 0x18000000 57 | + 58 | +#define RTF_LOCAL 0x80000000 59 | + 60 | + 61 | +struct in6_rtmsg { 62 | + struct in6_addr rtmsg_dst; 63 | + struct in6_addr rtmsg_src; 64 | + struct in6_addr rtmsg_gateway; 65 | + __u32 rtmsg_type; 66 | + __u16 rtmsg_dst_len; 67 | + __u16 rtmsg_src_len; 68 | + __u32 rtmsg_metric; 69 | + unsigned long rtmsg_info; 70 | + __u32 rtmsg_flags; 71 | + int rtmsg_ifindex; 72 | +}; 73 | + 74 | +#define RTMSG_NEWDEVICE 0x11 75 | +#define RTMSG_DELDEVICE 0x12 76 | +#define RTMSG_NEWROUTE 0x21 77 | +#define RTMSG_DELROUTE 0x22 78 | + 79 | +#endif 80 | diff --git a/networking/ifconfig.c b/networking/ifconfig.c 81 | index b6604f5..12e8198 100644 82 | --- a/networking/ifconfig.c 83 | +++ b/networking/ifconfig.c 84 | @@ -79,12 +79,14 @@ 85 | #endif 86 | 87 | #if ENABLE_FEATURE_IPV6 88 | +#ifndef __BIONIC__ 89 | struct in6_ifreq { 90 | struct in6_addr ifr6_addr; 91 | uint32_t ifr6_prefixlen; 92 | int ifr6_ifindex; 93 | }; 94 | #endif 95 | +#endif 96 | 97 | /* 98 | * Here are the bit masks for the "flags" member of struct options below. 99 | diff --git a/networking/route.c b/networking/route.c 100 | index b7b5a02..a060eb2 100644 101 | --- a/networking/route.c 102 | +++ b/networking/route.c 103 | @@ -35,6 +35,8 @@ 104 | 105 | #include 106 | #include 107 | +#include 108 | +#include 109 | 110 | #include "libbb.h" 111 | #include "inet_common.h" 112 | -- 113 | 1.7.0.4 114 | 115 | -------------------------------------------------------------------------------- /patches/023-ether-wake.patch: -------------------------------------------------------------------------------- 1 | From 48e5b4ce6850d685cadd5af757a629359b1b4128 Mon Sep 17 00:00:00 2001 2 | From: Tias Guns 3 | Date: Tue, 20 Mar 2012 22:22:20 +0000 4 | Subject: [PATCH] fix ether-wake, avoid ether_hostton and include if_ether 5 | 6 | based on 'no-ether_hostton' by Dan Drown 7 | "there is no /etc/ethers or ether_hostton on bionic" 8 | http://dan.drown.org/android/src/busybox/ 9 | --- 10 | networking/ether-wake.c | 5 +++-- 11 | 1 files changed, 3 insertions(+), 2 deletions(-) 12 | 13 | diff --git a/networking/ether-wake.c b/networking/ether-wake.c 14 | index c72da32..fa405b9 100644 15 | --- a/networking/ether-wake.c 16 | +++ b/networking/ether-wake.c 17 | @@ -77,6 +77,7 @@ 18 | #include "libbb.h" 19 | #include 20 | #include 21 | +#include 22 | #include 23 | 24 | /* Note: PF_INET, SOCK_DGRAM, IPPROTO_UDP would allow SIOCGIFHWADDR to 25 | @@ -122,10 +123,10 @@ static void get_dest_addr(const char *hostid, struct ether_addr *eaddr) 26 | eap = ether_aton_r(hostid, eaddr); 27 | if (eap) { 28 | bb_debug_msg("The target station address is %s\n\n", ether_ntoa_r(eap, ether_buf)); 29 | -#if !defined(__UCLIBC_MAJOR__) \ 30 | +#if !defined(__BIONIC__) && (!defined(__UCLIBC_MAJOR__) \ 31 | || __UCLIBC_MAJOR__ > 0 \ 32 | || __UCLIBC_MINOR__ > 9 \ 33 | - || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ >= 30) 34 | + || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ >= 30)) 35 | } else if (ether_hostton(hostid, eaddr) == 0) { 36 | bb_debug_msg("Station address for hostname %s is %s\n\n", hostid, ether_ntoa_r(eaddr, ether_buf)); 37 | #endif 38 | -- 39 | 1.7.0.4 40 | 41 | -------------------------------------------------------------------------------- /patches/024-hush.patch: -------------------------------------------------------------------------------- 1 | From b7b2bd89a6bf231506c97d2c5a901652420646f1 Mon Sep 17 00:00:00 2001 2 | From: Tias Guns 3 | Date: Tue, 20 Mar 2012 20:06:23 +0000 4 | Subject: [PATCH] fix hush, add glob and sigisemptyset 5 | 6 | added sigisemptyset.c 7 | 8 | rest of patch from 'glob' by Dan Drown 9 | http://dan.drown.org/android/src/busybox/ 10 | --- 11 | shell/glob.c | 786 +++++++++++++++++++++++++++++++++++++++++++++++++ 12 | shell/glob.h | 113 +++++++ 13 | shell/hush.c | 3 +- 14 | shell/sigisemptyset.c | 8 + 15 | 4 files changed, 909 insertions(+), 1 deletion(-) 16 | create mode 100644 shell/glob.c 17 | create mode 100644 shell/glob.h 18 | create mode 100644 shell/sigisemptyset.c 19 | 20 | diff --git a/shell/glob.c b/shell/glob.c 21 | new file mode 100644 22 | index 0000000..556d720 23 | --- /dev/null 24 | +++ b/shell/glob.c 25 | @@ -0,0 +1,786 @@ 26 | +/* 27 | + * Modified for the Android NDK by Gabor Cselle, http://www.gaborcselle.com/ 28 | + * Tested with Android NDK version 5b: http://developer.android.com/sdk/ndk/index.html 29 | + * Last modified: March 3 2011 30 | + * 31 | + * Copyright (c) 1989, 1993 32 | + * The Regents of the University of California. All rights reserved. 33 | + * 34 | + * This code is derived from software contributed to Berkeley by 35 | + * Guido van Rossum. 36 | + * 37 | + * Redistribution and use in source and binary forms, with or without 38 | + * modification, are permitted provided that the following conditions 39 | + * are met: 40 | + * 1. Redistributions of source code must retain the above copyright 41 | + * notice, this list of conditions and the following disclaimer. 42 | + * 2. Redistributions in binary form must reproduce the above copyright 43 | + * notice, this list of conditions and the following disclaimer in the 44 | + * documentation and/or other materials provided with the distribution. 45 | + * 4. Neither the name of the University nor the names of its contributors 46 | + * may be used to endorse or promote products derived from this software 47 | + * without specific prior written permission. 48 | + * 49 | + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 50 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 51 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 52 | + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 53 | + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 54 | + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 55 | + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 56 | + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 57 | + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 58 | + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 59 | + * SUCH DAMAGE. 60 | + */ 61 | + 62 | +#if defined(LIBC_SCCS) && !defined(lint) 63 | +static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; 64 | +#endif /* LIBC_SCCS and not lint */ 65 | +#include 66 | + 67 | + 68 | +/* 69 | + * glob(3) -- a superset of the one defined in POSIX 1003.2. 70 | + * 71 | + * The [!...] convention to negate a range is supported (SysV, Posix, ksh). 72 | + * 73 | + * Optional extra services, controlled by flags not defined by POSIX: 74 | + * 75 | + * GLOB_QUOTE: 76 | + * Escaping convention: \ inhibits any special meaning the following 77 | + * character might have (except \ at end of string is retained). 78 | + * GLOB_MAGCHAR: 79 | + * Set in gl_flags if pattern contained a globbing character. 80 | + * GLOB_NOMAGIC: 81 | + * Same as GLOB_NOCHECK, but it will only append pattern if it did 82 | + * not contain any magic characters. [Used in csh style globbing] 83 | + * GLOB_ALTDIRFUNC: 84 | + * Use alternately specified directory access functions. 85 | + * GLOB_TILDE: 86 | + * expand ~user/foo to the /home/dir/of/user/foo 87 | + * GLOB_BRACE: 88 | + * expand {1,2}{a,b} to 1a 1b 2a 2b 89 | + * gl_matchc: 90 | + * Number of matches in the current invocation of glob. 91 | + */ 92 | + 93 | +/* 94 | + * Some notes on multibyte character support: 95 | + * 1. Patterns with illegal byte sequences match nothing - even if 96 | + * GLOB_NOCHECK is specified. 97 | + * 2. Illegal byte sequences in filenames are handled by treating them as 98 | + * single-byte characters with a value of the first byte of the sequence 99 | + * cast to wchar_t. 100 | + * 3. State-dependent encodings are not currently supported. 101 | + */ 102 | + 103 | +#include 104 | +#include 105 | + 106 | +#include 107 | +#include 108 | +#include 109 | +#include "glob.h" 110 | +#include 111 | +#include 112 | +#include 113 | +#include 114 | +#include 115 | +#include 116 | +#include 117 | + 118 | +//#include "collate.h" - NOTE(gabor): I took this out because it's not available for Android 119 | +// and collate is only used once for string comparisons. As a side-effect, you might not 120 | +// be able to match non-ASCII filenames. 121 | + 122 | +#define DOLLAR '$' 123 | +#define DOT '.' 124 | +#define EOS '\0' 125 | +#define LBRACKET '[' 126 | +#define NOT '!' 127 | +#define QUESTION '?' 128 | +#define QUOTE '\\' 129 | +#define RANGE '-' 130 | +#define RBRACKET ']' 131 | +#define SEP '/' 132 | +#define STAR '*' 133 | +#define TILDE '~' 134 | +#define UNDERSCORE '_' 135 | +#define LBRACE '{' 136 | +#define RBRACE '}' 137 | +#define SLASH '/' 138 | +#define COMMA ',' 139 | + 140 | +#define M_PROTECT 0x40 141 | +#define M_MASK 0xff 142 | + 143 | + 144 | +#define M_ALL '*' 145 | +#define M_END ']' 146 | +#define M_NOT '!' 147 | +#define M_ONE '?' 148 | +#define M_RNG '-' 149 | +#define M_SET '[' 150 | + 151 | + 152 | +static int g_stat(char *, struct stat *, glob_t *); 153 | +static int g_lstat(char *, struct stat *, glob_t *); 154 | +static DIR *g_opendir(char *, glob_t *); 155 | +static int compare(const void *, const void *); 156 | +static int glob0(const char *, glob_t *, size_t *); 157 | +static int glob1(char *, glob_t *, size_t *); 158 | +static int glob2(char *, char *, char *, char *, glob_t *, size_t *); 159 | +static int glob3(char *, char *, char *, char *, char *, glob_t *, size_t *); 160 | +static int globextend(const char *, glob_t *, size_t *); 161 | +static const char * 162 | + globtilde(const char *, char *, size_t, glob_t *); 163 | +static int globexp1(const char *, glob_t *, size_t *); 164 | +static int globexp2(const char *, const char *, glob_t *, int *, size_t *); 165 | +static int match(char *, char *, char *); 166 | + 167 | +int ismeta(char c) { 168 | + return c == M_ALL || c == M_END || c == M_NOT || c == M_ONE || c == M_RNG || c == M_SET; 169 | +} 170 | + 171 | +int 172 | +glob(const char *pattern, int flags, int (*errfunc)(const char *, int), glob_t *pglob) 173 | +{ 174 | + const char *patnext; 175 | + size_t limit; 176 | + char *bufnext, *bufend, patbuf[MAXPATHLEN], prot; 177 | + 178 | + patnext = pattern; 179 | + if (!(flags & GLOB_APPEND)) { 180 | + pglob->gl_pathc = 0; 181 | + pglob->gl_pathv = NULL; 182 | + if (!(flags & GLOB_DOOFFS)) 183 | + pglob->gl_offs = 0; 184 | + } 185 | + if (flags & GLOB_LIMIT) { 186 | + limit = pglob->gl_matchc; 187 | + if (limit == 0) 188 | + limit = 131072; 189 | + } else 190 | + limit = 0; 191 | + pglob->gl_flags = flags & ~GLOB_MAGCHAR; 192 | + pglob->gl_errfunc = errfunc; 193 | + pglob->gl_matchc = 0; 194 | + 195 | + bufnext = patbuf; 196 | + bufend = bufnext + MAXPATHLEN - 1; 197 | + if (flags & GLOB_NOESCAPE) { 198 | + strncpy(bufnext, patnext, sizeof(patbuf)); 199 | + } else { 200 | + /* Protect the quoted characters. */ 201 | + while (bufend >= bufnext && *patnext != EOS) { 202 | + if (*patnext == QUOTE) { 203 | + if (*++patnext == EOS) { 204 | + *bufnext++ = QUOTE | M_PROTECT; 205 | + continue; 206 | + } 207 | + prot = M_PROTECT; 208 | + } else 209 | + prot = 0; 210 | + *bufnext++ = *patnext; 211 | + patnext++; 212 | + } 213 | + } 214 | + *bufnext = EOS; 215 | + 216 | + if (flags & GLOB_BRACE) 217 | + return globexp1(patbuf, pglob, &limit); 218 | + else 219 | + return glob0(patbuf, pglob, &limit); 220 | +} 221 | + 222 | +/* 223 | + * Expand recursively a glob {} pattern. When there is no more expansion 224 | + * invoke the standard globbing routine to glob the rest of the magic 225 | + * characters 226 | + */ 227 | +static int 228 | +globexp1(const char *pattern, glob_t *pglob, size_t *limit) 229 | +{ 230 | + const char* ptr = pattern; 231 | + int rv; 232 | + 233 | + /* Protect a single {}, for find(1), like csh */ 234 | + if (pattern[0] == LBRACE && pattern[1] == RBRACE && pattern[2] == EOS) 235 | + return glob0(pattern, pglob, limit); 236 | + 237 | + while ((ptr = strchr(ptr, LBRACE)) != NULL) 238 | + if (!globexp2(ptr, pattern, pglob, &rv, limit)) 239 | + return rv; 240 | + 241 | + return glob0(pattern, pglob, limit); 242 | +} 243 | + 244 | + 245 | +/* 246 | + * Recursive brace globbing helper. Tries to expand a single brace. 247 | + * If it succeeds then it invokes globexp1 with the new pattern. 248 | + * If it fails then it tries to glob the rest of the pattern and returns. 249 | + */ 250 | +static int 251 | +globexp2(const char *ptr, const char *pattern, glob_t *pglob, int *rv, size_t *limit) 252 | +{ 253 | + int i; 254 | + char *lm, *ls; 255 | + const char *pe, *pm, *pm1, *pl; 256 | + char patbuf[MAXPATHLEN]; 257 | + 258 | + /* copy part up to the brace */ 259 | + for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm++) 260 | + continue; 261 | + *lm = EOS; 262 | + ls = lm; 263 | + 264 | + /* Find the balanced brace */ 265 | + for (i = 0, pe = ++ptr; *pe; pe++) 266 | + if (*pe == LBRACKET) { 267 | + /* Ignore everything between [] */ 268 | + for (pm = pe++; *pe != RBRACKET && *pe != EOS; pe++) 269 | + continue; 270 | + if (*pe == EOS) { 271 | + /* 272 | + * We could not find a matching RBRACKET. 273 | + * Ignore and just look for RBRACE 274 | + */ 275 | + pe = pm; 276 | + } 277 | + } 278 | + else if (*pe == LBRACE) 279 | + i++; 280 | + else if (*pe == RBRACE) { 281 | + if (i == 0) 282 | + break; 283 | + i--; 284 | + } 285 | + 286 | + /* Non matching braces; just glob the pattern */ 287 | + if (i != 0 || *pe == EOS) { 288 | + *rv = glob0(patbuf, pglob, limit); 289 | + return 0; 290 | + } 291 | + 292 | + for (i = 0, pl = pm = ptr; pm <= pe; pm++) 293 | + switch (*pm) { 294 | + case LBRACKET: 295 | + /* Ignore everything between [] */ 296 | + for (pm1 = pm++; *pm != RBRACKET && *pm != EOS; pm++) 297 | + continue; 298 | + if (*pm == EOS) { 299 | + /* 300 | + * We could not find a matching RBRACKET. 301 | + * Ignore and just look for RBRACE 302 | + */ 303 | + pm = pm1; 304 | + } 305 | + break; 306 | + 307 | + case LBRACE: 308 | + i++; 309 | + break; 310 | + 311 | + case RBRACE: 312 | + if (i) { 313 | + i--; 314 | + break; 315 | + } 316 | + /* FALLTHROUGH */ 317 | + case COMMA: 318 | + if (i && *pm == COMMA) 319 | + break; 320 | + else { 321 | + /* Append the current string */ 322 | + for (lm = ls; (pl < pm); *lm++ = *pl++) 323 | + continue; 324 | + /* 325 | + * Append the rest of the pattern after the 326 | + * closing brace 327 | + */ 328 | + for (pl = pe + 1; (*lm++ = *pl++) != EOS;) 329 | + continue; 330 | + 331 | + /* Expand the current pattern */ 332 | + *rv = globexp1(patbuf, pglob, limit); 333 | + 334 | + /* move after the comma, to the next string */ 335 | + pl = pm + 1; 336 | + } 337 | + break; 338 | + 339 | + default: 340 | + break; 341 | + } 342 | + *rv = 0; 343 | + return 0; 344 | +} 345 | + 346 | + 347 | + 348 | +/* 349 | + * expand tilde from the passwd file. 350 | + */ 351 | +static const char * 352 | +globtilde(const char *pattern, char *patbuf, size_t patbuf_len, glob_t *pglob) 353 | +{ 354 | + struct passwd *pwd; 355 | + char *h; 356 | + const char *p; 357 | + char *b, *eb; 358 | + 359 | + if (*pattern != TILDE || !(pglob->gl_flags & GLOB_TILDE)) 360 | + return pattern; 361 | + 362 | + /* 363 | + * Copy up to the end of the string or / 364 | + */ 365 | + eb = &patbuf[patbuf_len - 1]; 366 | + for (p = pattern + 1, h = (char *) patbuf; 367 | + h < (char *)eb && *p && *p != SLASH; *h++ = *p++) 368 | + continue; 369 | + 370 | + *h = EOS; 371 | + 372 | + if (((char *) patbuf)[0] == EOS) { 373 | + /* 374 | + * handle a plain ~ or ~/ by expanding $HOME first (iff 375 | + * we're not running setuid or setgid) and then trying 376 | + * the password file 377 | + */ 378 | +#ifndef __GLIBC__ 379 | + if (issetugid() != 0 || 380 | + (h = getenv("HOME")) == NULL) { 381 | + if (((h = getlogin()) != NULL && 382 | + (pwd = getpwnam(h)) != NULL) || 383 | + (pwd = getpwuid(getuid())) != NULL) 384 | + h = pwd->pw_dir; 385 | + else 386 | + return pattern; 387 | + } 388 | +#endif 389 | + } 390 | + else { 391 | + /* 392 | + * Expand a ~user 393 | + */ 394 | + if ((pwd = getpwnam((char*) patbuf)) == NULL) 395 | + return pattern; 396 | + else 397 | + h = pwd->pw_dir; 398 | + } 399 | + 400 | + /* Copy the home directory */ 401 | + for (b = patbuf; b < eb && *h; *b++ = *h++) 402 | + continue; 403 | + 404 | + /* Append the rest of the pattern */ 405 | + while (b < eb && (*b++ = *p++) != EOS) 406 | + continue; 407 | + *b = EOS; 408 | + 409 | + return patbuf; 410 | +} 411 | + 412 | + 413 | +/* 414 | + * The main glob() routine: compiles the pattern (optionally processing 415 | + * quotes), calls glob1() to do the real pattern matching, and finally 416 | + * sorts the list (unless unsorted operation is requested). Returns 0 417 | + * if things went well, nonzero if errors occurred. 418 | + */ 419 | +static int 420 | +glob0(const char *pattern, glob_t *pglob, size_t *limit) 421 | +{ 422 | + const char *qpatnext; 423 | + int err; 424 | + size_t oldpathc; 425 | + char *bufnext, c, patbuf[MAXPATHLEN]; 426 | + 427 | + qpatnext = globtilde(pattern, patbuf, MAXPATHLEN, pglob); 428 | + oldpathc = pglob->gl_pathc; 429 | + bufnext = patbuf; 430 | + 431 | + /* We don't need to check for buffer overflow any more. */ 432 | + while ((c = *qpatnext++) != EOS) { 433 | + switch (c) { 434 | + case LBRACKET: 435 | + c = *qpatnext; 436 | + if (c == NOT) 437 | + ++qpatnext; 438 | + if (*qpatnext == EOS || 439 | + strchr(qpatnext+1, RBRACKET) == NULL) { 440 | + *bufnext++ = LBRACKET; 441 | + if (c == NOT) 442 | + --qpatnext; 443 | + break; 444 | + } 445 | + *bufnext++ = M_SET; 446 | + if (c == NOT) 447 | + *bufnext++ = M_NOT; 448 | + c = *qpatnext++; 449 | + do { 450 | + *bufnext++ = c; 451 | + if (*qpatnext == RANGE && 452 | + (c = qpatnext[1]) != RBRACKET) { 453 | + *bufnext++ = M_RNG; 454 | + *bufnext++ = c; 455 | + qpatnext += 2; 456 | + } 457 | + } while ((c = *qpatnext++) != RBRACKET); 458 | + pglob->gl_flags |= GLOB_MAGCHAR; 459 | + *bufnext++ = M_END; 460 | + break; 461 | + case QUESTION: 462 | + pglob->gl_flags |= GLOB_MAGCHAR; 463 | + *bufnext++ = M_ONE; 464 | + break; 465 | + case STAR: 466 | + pglob->gl_flags |= GLOB_MAGCHAR; 467 | + /* collapse adjacent stars to one, 468 | + * to avoid exponential behavior 469 | + */ 470 | + if (bufnext == patbuf || bufnext[-1] != M_ALL) 471 | + *bufnext++ = M_ALL; 472 | + break; 473 | + default: 474 | + *bufnext++ = c; 475 | + break; 476 | + } 477 | + } 478 | + *bufnext = EOS; 479 | + 480 | + if ((err = glob1(patbuf, pglob, limit)) != 0) 481 | + return(err); 482 | + 483 | + /* 484 | + * If there was no match we are going to append the pattern 485 | + * if GLOB_NOCHECK was specified or if GLOB_NOMAGIC was specified 486 | + * and the pattern did not contain any magic characters 487 | + * GLOB_NOMAGIC is there just for compatibility with csh. 488 | + */ 489 | + if (pglob->gl_pathc == oldpathc) { 490 | + if (((pglob->gl_flags & GLOB_NOCHECK) || 491 | + ((pglob->gl_flags & GLOB_NOMAGIC) && 492 | + !(pglob->gl_flags & GLOB_MAGCHAR)))) 493 | + return(globextend(pattern, pglob, limit)); 494 | + else 495 | + return(GLOB_NOMATCH); 496 | + } 497 | + if (!(pglob->gl_flags & GLOB_NOSORT)) 498 | + qsort(pglob->gl_pathv + pglob->gl_offs + oldpathc, 499 | + pglob->gl_pathc - oldpathc, sizeof(char *), compare); 500 | + return(0); 501 | +} 502 | + 503 | +static int 504 | +compare(const void *p, const void *q) 505 | +{ 506 | + return(strcmp(*(char **)p, *(char **)q)); 507 | +} 508 | + 509 | +static int 510 | +glob1(char *pattern, glob_t *pglob, size_t *limit) 511 | +{ 512 | + char pathbuf[MAXPATHLEN]; 513 | + 514 | + /* A null pathname is invalid -- POSIX 1003.1 sect. 2.4. */ 515 | + if (*pattern == EOS) 516 | + return(0); 517 | + return(glob2(pathbuf, pathbuf, pathbuf + MAXPATHLEN - 1, 518 | + pattern, pglob, limit)); 519 | +} 520 | + 521 | +/* 522 | + * The functions glob2 and glob3 are mutually recursive; there is one level 523 | + * of recursion for each segment in the pattern that contains one or more 524 | + * meta characters. 525 | + */ 526 | +static int 527 | +glob2(char *pathbuf, char *pathend, char *pathend_last, char *pattern, 528 | + glob_t *pglob, size_t *limit) 529 | +{ 530 | + struct stat sb; 531 | + char *p, *q; 532 | + int anymeta; 533 | + 534 | + /* 535 | + * Loop over pattern segments until end of pattern or until 536 | + * segment with meta character found. 537 | + */ 538 | + for (anymeta = 0;;) { 539 | + if (*pattern == EOS) { /* End of pattern? */ 540 | + *pathend = EOS; 541 | + if (g_lstat(pathbuf, &sb, pglob)) 542 | + return(0); 543 | + 544 | + if (((pglob->gl_flags & GLOB_MARK) && 545 | + pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) 546 | + || (S_ISLNK(sb.st_mode) && 547 | + (g_stat(pathbuf, &sb, pglob) == 0) && 548 | + S_ISDIR(sb.st_mode)))) { 549 | + if (pathend + 1 > pathend_last) 550 | + return (GLOB_ABORTED); 551 | + *pathend++ = SEP; 552 | + *pathend = EOS; 553 | + } 554 | + ++pglob->gl_matchc; 555 | + return(globextend(pathbuf, pglob, limit)); 556 | + } 557 | + 558 | + /* Find end of next segment, copy tentatively to pathend. */ 559 | + q = pathend; 560 | + p = pattern; 561 | + while (*p != EOS && *p != SEP) { 562 | + if (ismeta(*p)) 563 | + anymeta = 1; 564 | + if (q + 1 > pathend_last) 565 | + return (GLOB_ABORTED); 566 | + *q++ = *p++; 567 | + } 568 | + 569 | + if (!anymeta) { /* No expansion, do next segment. */ 570 | + pathend = q; 571 | + pattern = p; 572 | + while (*pattern == SEP) { 573 | + if (pathend + 1 > pathend_last) 574 | + return (GLOB_ABORTED); 575 | + *pathend++ = *pattern++; 576 | + } 577 | + } else /* Need expansion, recurse. */ 578 | + return(glob3(pathbuf, pathend, pathend_last, pattern, p, 579 | + pglob, limit)); 580 | + } 581 | + /* NOTREACHED */ 582 | +} 583 | + 584 | +static int 585 | +glob3(char *pathbuf, char *pathend, char *pathend_last, 586 | + char *pattern, char *restpattern, 587 | + glob_t *pglob, size_t *limit) 588 | +{ 589 | + struct dirent *dp; 590 | + DIR *dirp; 591 | + int err; 592 | + char buf[MAXPATHLEN]; 593 | + 594 | + /* 595 | + * The readdirfunc declaration can't be prototyped, because it is 596 | + * assigned, below, to two functions which are prototyped in glob.h 597 | + * and dirent.h as taking pointers to differently typed opaque 598 | + * structures. 599 | + */ 600 | + struct dirent *(*readdirfunc)(); 601 | + 602 | + if (pathend > pathend_last) 603 | + return (GLOB_ABORTED); 604 | + *pathend = EOS; 605 | + errno = 0; 606 | + 607 | + if ((dirp = g_opendir(pathbuf, pglob)) == NULL) { 608 | + /* TODO: don't call for ENOENT or ENOTDIR? */ 609 | + if (pglob->gl_errfunc) { 610 | + if (pglob->gl_errfunc(buf, errno) || 611 | + pglob->gl_flags & GLOB_ERR) 612 | + return (GLOB_ABORTED); 613 | + } 614 | + return(0); 615 | + } 616 | + 617 | + err = 0; 618 | + 619 | + /* Search directory for matching names. */ 620 | + if (pglob->gl_flags & GLOB_ALTDIRFUNC) 621 | + readdirfunc = pglob->gl_readdir; 622 | + else 623 | + readdirfunc = readdir; 624 | + while ((dp = (*readdirfunc)(dirp))) { 625 | + char *sc; 626 | + char *dc; 627 | + 628 | + /* Initial DOT must be matched literally. */ 629 | + if (dp->d_name[0] == DOT && *pattern != DOT) 630 | + continue; 631 | + dc = pathend; 632 | + sc = dp->d_name; 633 | + while (dc < pathend_last) { 634 | + if ((*dc++ = *sc) == EOS) 635 | + break; 636 | + sc++; 637 | + } 638 | + if (!match(pathend, pattern, restpattern)) { 639 | + *pathend = EOS; 640 | + continue; 641 | + } 642 | + err = glob2(pathbuf, --dc, pathend_last, restpattern, 643 | + pglob, limit); 644 | + if (err) 645 | + break; 646 | + } 647 | + 648 | + if (pglob->gl_flags & GLOB_ALTDIRFUNC) 649 | + (*pglob->gl_closedir)(dirp); 650 | + else 651 | + closedir(dirp); 652 | + return(err); 653 | +} 654 | + 655 | + 656 | +/* 657 | + * Extend the gl_pathv member of a glob_t structure to accomodate a new item, 658 | + * add the new item, and update gl_pathc. 659 | + * 660 | + * This assumes the BSD realloc, which only copies the block when its size 661 | + * crosses a power-of-two boundary; for v7 realloc, this would cause quadratic 662 | + * behavior. 663 | + * 664 | + * Return 0 if new item added, error code if memory couldn't be allocated. 665 | + * 666 | + * Invariant of the glob_t structure: 667 | + * Either gl_pathc is zero and gl_pathv is NULL; or gl_pathc > 0 and 668 | + * gl_pathv points to (gl_offs + gl_pathc + 1) items. 669 | + */ 670 | +static int 671 | +globextend(const char *path, glob_t *pglob, size_t *limit) 672 | +{ 673 | + char **pathv; 674 | + size_t i, newsize, len; 675 | + char *copy; 676 | + const char *p; 677 | + 678 | + if (*limit && pglob->gl_pathc > *limit) { 679 | + errno = 0; 680 | + return (GLOB_NOSPACE); 681 | + } 682 | + 683 | + newsize = sizeof(*pathv) * (2 + pglob->gl_pathc + pglob->gl_offs); 684 | + pathv = pglob->gl_pathv ? 685 | + realloc((char *)pglob->gl_pathv, newsize) : 686 | + malloc(newsize); 687 | + if (pathv == NULL) { 688 | + if (pglob->gl_pathv) { 689 | + free(pglob->gl_pathv); 690 | + pglob->gl_pathv = NULL; 691 | + } 692 | + return(GLOB_NOSPACE); 693 | + } 694 | + 695 | + if (pglob->gl_pathv == NULL && pglob->gl_offs > 0) { 696 | + /* first time around -- clear initial gl_offs items */ 697 | + pathv += pglob->gl_offs; 698 | + for (i = pglob->gl_offs + 1; --i > 0; ) 699 | + *--pathv = NULL; 700 | + } 701 | + pglob->gl_pathv = pathv; 702 | + 703 | + for (p = path; *p++;) 704 | + continue; 705 | + len = (size_t)(p - path); /* XXX overallocation */ 706 | + if ((copy = malloc(len)) != NULL) { 707 | + strncpy(copy, path, len); 708 | + pathv[pglob->gl_offs + pglob->gl_pathc++] = copy; 709 | + } 710 | + pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; 711 | + return(copy == NULL ? GLOB_NOSPACE : 0); 712 | +} 713 | + 714 | +/* 715 | + * pattern matching function for filenames. Each occurrence of the * 716 | + * pattern causes a recursion level. 717 | + */ 718 | +static int 719 | +match(char *name, char *pat, char *patend) 720 | +{ 721 | + int ok, negate_range; 722 | + char c, k; 723 | + 724 | + while (pat < patend) { 725 | + c = *pat++; 726 | + switch (c & M_MASK) { 727 | + case M_ALL: 728 | + if (pat == patend) 729 | + return(1); 730 | + do 731 | + if (match(name, pat, patend)) 732 | + return(1); 733 | + while (*name++ != EOS); 734 | + return(0); 735 | + case M_ONE: 736 | + if (*name++ == EOS) 737 | + return(0); 738 | + break; 739 | + case M_SET: 740 | + ok = 0; 741 | + if ((k = *name++) == EOS) 742 | + return(0); 743 | + if ((negate_range = ((*pat & M_MASK) == M_NOT)) != EOS) 744 | + ++pat; 745 | + while (((c = *pat++) & M_MASK) != M_END) 746 | + if ((*pat & M_MASK) == M_RNG) { 747 | + // NOTE(gabor): This used to be as below, but I took out the collate.h 748 | + // if (__collate_load_error ? 749 | + // CHAR(c) <= CHAR(k) && CHAR(k) <= CHAR(pat[1]) : 750 | + // __collate_range_cmp(CHAR(c), CHAR(k)) <= 0 751 | + // && __collate_range_cmp(CHAR(k), CHAR(pat[1])) <= 0 752 | + // ) 753 | + 754 | + if (c <= k && k <= pat[1]) 755 | + ok = 1; 756 | + pat += 2; 757 | + } else if (c == k) 758 | + ok = 1; 759 | + if (ok == negate_range) 760 | + return(0); 761 | + break; 762 | + default: 763 | + if (*name++ != c) 764 | + return(0); 765 | + break; 766 | + } 767 | + } 768 | + return(*name == EOS); 769 | +} 770 | + 771 | +/* Free allocated data belonging to a glob_t structure. */ 772 | +void 773 | +globfree(glob_t *pglob) 774 | +{ 775 | + size_t i; 776 | + char **pp; 777 | + 778 | + if (pglob->gl_pathv != NULL) { 779 | + pp = pglob->gl_pathv + pglob->gl_offs; 780 | + for (i = pglob->gl_pathc; i--; ++pp) 781 | + if (*pp) 782 | + free(*pp); 783 | + free(pglob->gl_pathv); 784 | + pglob->gl_pathv = NULL; 785 | + } 786 | +} 787 | + 788 | +static int 789 | +g_stat(char *fn, struct stat *sb, glob_t *pglob) 790 | +{ 791 | + if (pglob->gl_flags & GLOB_ALTDIRFUNC) 792 | + return((*pglob->gl_stat)(fn, sb)); 793 | + return(stat(fn, sb)); 794 | +} 795 | + 796 | +static DIR * 797 | +g_opendir(char *str, glob_t *pglob) 798 | +{ 799 | + if (pglob->gl_flags & GLOB_ALTDIRFUNC) 800 | + return((*pglob->gl_opendir)(str)); 801 | + 802 | + return(opendir(str)); 803 | +} 804 | + 805 | +static int 806 | +g_lstat(char *fn, struct stat *sb, glob_t *pglob) 807 | +{ 808 | + if (pglob->gl_flags & GLOB_ALTDIRFUNC) 809 | + return((*pglob->gl_lstat)(fn, sb)); 810 | + return(lstat(fn, sb)); 811 | +} 812 | diff --git a/shell/glob.h b/shell/glob.h 813 | new file mode 100644 814 | index 0000000..e8e6578 815 | --- /dev/null 816 | +++ b/shell/glob.h 817 | @@ -0,0 +1,113 @@ 818 | +/* 819 | + * Modified for the Android NDK by Gabor Cselle, http://www.gaborcselle.com/ 820 | + * Tested with Android NDK version 5b: http://developer.android.com/sdk/ndk/index.html 821 | + * Last modified: March 3 2011 822 | + * 823 | + * Copyright (c) 1989, 1993 824 | + * The Regents of the University of California. All rights reserved. 825 | + * 826 | + * This code is derived from software contributed to Berkeley by 827 | + * Guido van Rossum. 828 | + * 829 | + * Redistribution and use in source and binary forms, with or without 830 | + * modification, are permitted provided that the following conditions 831 | + * are met: 832 | + * 1. Redistributions of source code must retain the above copyright 833 | + * notice, this list of conditions and the following disclaimer. 834 | + * 2. Redistributions in binary form must reproduce the above copyright 835 | + * notice, this list of conditions and the following disclaimer in the 836 | + * documentation and/or other materials provided with the distribution. 837 | + * 3. All advertising materials mentioning features or use of this software 838 | + * must display the following acknowledgement: 839 | + * This product includes software developed by the University of 840 | + * California, Berkeley and its contributors. 841 | + * 4. Neither the name of the University nor the names of its contributors 842 | + * may be used to endorse or promote products derived from this software 843 | + * without specific prior written permission. 844 | + * 845 | + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 846 | + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 847 | + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 848 | + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 849 | + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 850 | + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 851 | + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 852 | + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 853 | + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 854 | + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 855 | + * SUCH DAMAGE. 856 | + * 857 | + * @(#)glob.h 8.1 (Berkeley) 6/2/93 858 | + * $FreeBSD$ 859 | + */ 860 | + 861 | +#ifndef _GLOB_H_ 862 | +#define _GLOB_H_ 863 | + 864 | +#include 865 | +//#include 866 | + 867 | +#ifndef _SIZE_T_DECLARED 868 | +typedef __size_t size_t; 869 | +#define _SIZE_T_DECLARED 870 | +#endif 871 | + 872 | +struct stat; 873 | +typedef struct { 874 | + size_t gl_pathc; /* Count of total paths so far. */ 875 | + size_t gl_matchc; /* Count of paths matching pattern. */ 876 | + size_t gl_offs; /* Reserved at beginning of gl_pathv. */ 877 | + int gl_flags; /* Copy of flags parameter to glob. */ 878 | + char **gl_pathv; /* List of paths matching pattern. */ 879 | + /* Copy of errfunc parameter to glob. */ 880 | + int (*gl_errfunc)(const char *, int); 881 | + 882 | + /* 883 | + * Alternate filesystem access methods for glob; replacement 884 | + * versions of closedir(3), readdir(3), opendir(3), stat(2) 885 | + * and lstat(2). 886 | + */ 887 | + void (*gl_closedir)(void *); 888 | + struct dirent *(*gl_readdir)(void *); 889 | + void *(*gl_opendir)(const char *); 890 | + int (*gl_lstat)(const char *, struct stat *); 891 | + int (*gl_stat)(const char *, struct stat *); 892 | +} glob_t; 893 | + 894 | +#if __POSIX_VISIBLE >= 199209 895 | +/* Believed to have been introduced in 1003.2-1992 */ 896 | +#define GLOB_APPEND 0x0001 /* Append to output from previous call. */ 897 | +#define GLOB_DOOFFS 0x0002 /* Use gl_offs. */ 898 | +#define GLOB_ERR 0x0004 /* Return on error. */ 899 | +#define GLOB_MARK 0x0008 /* Append / to matching directories. */ 900 | +#define GLOB_NOCHECK 0x0010 /* Return pattern itself if nothing matches. */ 901 | +#define GLOB_NOSORT 0x0020 /* Don't sort. */ 902 | +#define GLOB_NOESCAPE 0x2000 /* Disable backslash escaping. */ 903 | + 904 | +/* Error values returned by glob(3) */ 905 | +#define GLOB_NOSPACE (-1) /* Malloc call failed. */ 906 | +#define GLOB_ABORTED (-2) /* Unignored error. */ 907 | +#define GLOB_NOMATCH (-3) /* No match and GLOB_NOCHECK was not set. */ 908 | +#define GLOB_NOSYS (-4) /* Obsolete: source comptability only. */ 909 | +#endif /* __POSIX_VISIBLE >= 199209 */ 910 | + 911 | +#if __BSD_VISIBLE 912 | +#define GLOB_ALTDIRFUNC 0x0040 /* Use alternately specified directory funcs. */ 913 | +#define GLOB_BRACE 0x0080 /* Expand braces ala csh. */ 914 | +#define GLOB_MAGCHAR 0x0100 /* Pattern had globbing characters. */ 915 | +#define GLOB_NOMAGIC 0x0200 /* GLOB_NOCHECK without magic chars (csh). */ 916 | +#define GLOB_QUOTE 0x0400 /* Quote special chars with \. */ 917 | +#define GLOB_TILDE 0x0800 /* Expand tilde names from the passwd file. */ 918 | +#define GLOB_LIMIT 0x1000 /* limit number of returned paths */ 919 | + 920 | +/* source compatibility, these are the old names */ 921 | +#define GLOB_MAXPATH GLOB_LIMIT 922 | +#define GLOB_ABEND GLOB_ABORTED 923 | +#endif /* __BSD_VISIBLE */ 924 | + 925 | +__BEGIN_DECLS 926 | +int glob(const char *, int, int (*)(const char *, int), glob_t *); 927 | +void globfree(glob_t *); 928 | +__END_DECLS 929 | + 930 | +#endif /* !_GLOB_H_ */ 931 | diff --git a/shell/hush.c b/shell/hush.c 932 | index e2dc1e2..7f8e0be 100644 933 | --- a/shell/hush.c 934 | +++ b/shell/hush.c 935 | @@ -86,7 +86,7 @@ 936 | ) 937 | # include /* for malloc_trim */ 938 | #endif 939 | -#include 940 | +#include "glob.h" 941 | /* #include */ 942 | #if ENABLE_HUSH_CASE 943 | # include 944 | @@ -248,6 +248,7 @@ 945 | //applet:IF_FEATURE_BASH_IS_HUSH(APPLET_ODDNAME(bash, hush, BB_DIR_BIN, BB_SUID_DROP, bash)) 946 | 947 | //kbuild:lib-$(CONFIG_HUSH) += hush.o match.o shell_common.o 948 | +//kbuild:lib-$(CONFIG_HUSH) += glob.o sigisemptyset.o 949 | //kbuild:lib-$(CONFIG_HUSH_RANDOM_SUPPORT) += random.o 950 | 951 | /* -i (interactive) and -s (read stdin) are also accepted, 952 | diff --git a/shell/sigisemptyset.c b/shell/sigisemptyset.c 953 | new file mode 100644 954 | index 0000000..8297313 955 | --- /dev/null 956 | +++ b/shell/sigisemptyset.c 957 | @@ -0,0 +1,8 @@ 958 | +// in androids asm/signal.h, sigset_t is a simple unsigned long 959 | + 960 | +#include 961 | + 962 | +int sigisemptyset(const sigset_t *set) 963 | +{ 964 | + return set; 965 | +} 966 | -- 967 | 1.7.10.4 968 | 969 | -------------------------------------------------------------------------------- /patches/025-readahead.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Sun, 5 Aug 2012 16:00:19 +0200 3 | Subject: [PATCH] fix readahead, add syscall 4 | 5 | fix readahead, add simple syscall 6 | Can only be tested with LFS support (not patched yet) 7 | 8 | from 'misc-syscalls' by Dan Drown 9 | http://dan.drown.org/android/src/busybox/ 10 | --- 11 | libbb/missing_syscalls.c | 5 +++++ 12 | 1 file changed, 5 insertions(+) 13 | 14 | diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c 15 | index 474accb..913f00e 100644 16 | --- a/libbb/missing_syscalls.c 17 | +++ b/libbb/missing_syscalls.c 18 | @@ -75,6 +75,11 @@ int semget(key_t key, int nsems, int semflg) 19 | return syscall(__NR_semget, key, nsems, semflg); 20 | } 21 | 22 | +ssize_t readahead(int fd, off64_t offset, size_t count) 23 | +{ 24 | + return syscall(__NR_readahead, fd, offset, count); 25 | +} 26 | + 27 | struct msqid_ds; /* #include */ 28 | int msgctl(int msqid, int cmd, struct msqid_ds *buf) 29 | { 30 | -- 31 | 1.7.10.4 32 | 33 | -------------------------------------------------------------------------------- /patches/026-modinfo-modprobe-without-utsrel.patch: -------------------------------------------------------------------------------- 1 | From: Tanguy Pruvot 2 | Date: Mon, 13 Feb 2012 20:13:11 +0100 3 | Subject: [PATCH] modinfo/modprobe: use ifdef block for android without-utsrel modules path 4 | 5 | and fixes the modules.dep requirement, it is now optional... 6 | 7 | Change-Id: Ifccb530fa23b021fd12e2395f5d0c66600b25c04 8 | from https://github.com/tpruvot/android_external_busybox 9 | 10 | and commit 2df42d3971f1e260e67c3fa4831cb9195fb276c4 11 | from https://github.com/tpruvot/android_external_busybox 12 | --- 13 | modutils/modinfo.c | 40 ++++++++++++++++++++++++++++++++++------ 14 | modutils/modprobe.c | 18 +++++++++++++++++- 15 | 2 files changed, 51 insertions(+), 7 deletions(-) 16 | 17 | diff --git a/modutils/modinfo.c b/modutils/modinfo.c 18 | index 7c978d1..10b2e0a 100644 19 | --- a/modutils/modinfo.c 20 | +++ b/modutils/modinfo.c 21 | @@ -22,6 +22,9 @@ 22 | #include "libbb.h" 23 | #include "modutils.h" 24 | 25 | +#if defined(ANDROID) || defined(__ANDROID__) 26 | +#define DONT_USE_UTS_REL_FOLDER 27 | +#endif 28 | 29 | enum { 30 | OPT_TAGS = (1 << 12) - 1, /* shortcut count */ 31 | @@ -63,7 +66,7 @@ static void modinfo(const char *path, const char *version, 32 | }; 33 | size_t len; 34 | int j, length; 35 | - char *ptr, *the_module; 36 | + char *ptr, *fullpath, *the_module; 37 | const char *field = env->field; 38 | int tags = env->tags; 39 | 40 | @@ -77,11 +80,21 @@ static void modinfo(const char *path, const char *version, 41 | if (path[0] == '/') 42 | return; 43 | /* Newer depmod puts relative paths in modules.dep */ 44 | - path = xasprintf("%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, version, path); 45 | - the_module = xmalloc_open_zipped_read_close(path, &len); 46 | - free((char*)path); 47 | - if (!the_module) 48 | + fullpath = xasprintf("%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, version, path); 49 | + the_module = xmalloc_open_zipped_read_close(fullpath, &len); 50 | +#ifdef DONT_USE_UTS_REL_FOLDER 51 | + if (!the_module) { 52 | + free((char*)fullpath); 53 | + fullpath = xasprintf("%s/%s", CONFIG_DEFAULT_MODULES_DIR, path); 54 | + the_module = xmalloc_open_zipped_read_close(fullpath, &len); 55 | + } 56 | +#endif 57 | + free((char*)fullpath); 58 | + if (!the_module) { 59 | + // outputs system error msg 60 | + bb_perror_msg(""); 61 | return; 62 | + } 63 | } 64 | 65 | if (field) 66 | @@ -145,9 +158,23 @@ int modinfo_main(int argc UNUSED_PARAM, char **argv) 67 | uname(&uts); 68 | parser = config_open2( 69 | xasprintf("%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, uts.release, CONFIG_DEFAULT_DEPMOD_FILE), 70 | - xfopen_for_read 71 | + fopen_for_read 72 | ); 73 | 74 | +#ifdef DONT_USE_UTS_REL_FOLDER 75 | + if (!parser) { 76 | + parser = config_open2( 77 | + xasprintf("%s/%s", CONFIG_DEFAULT_MODULES_DIR, CONFIG_DEFAULT_DEPMOD_FILE), 78 | + fopen_for_read 79 | + ); 80 | + } 81 | + 82 | + if (!parser) { 83 | + strcpy(uts.release,""); 84 | + goto no_modules_dep; 85 | + } 86 | +#endif 87 | + 88 | while (config_read(parser, tokens, 2, 1, "# \t", PARSE_NORMAL)) { 89 | colon = last_char_is(tokens[0], ':'); 90 | if (colon == NULL) 91 | @@ -164,6 +191,7 @@ int modinfo_main(int argc UNUSED_PARAM, char **argv) 92 | if (ENABLE_FEATURE_CLEAN_UP) 93 | config_close(parser); 94 | 95 | +no_modules_dep: 96 | for (i = 0; argv[i]; i++) { 97 | if (argv[i][0]) { 98 | modinfo(argv[i], uts.release, &env); 99 | diff --git a/modutils/modprobe.c b/modutils/modprobe.c 100 | index fb6c659..9143dcd 100644 101 | --- a/modutils/modprobe.c 102 | +++ b/modutils/modprobe.c 103 | @@ -147,6 +147,10 @@ static const char modprobe_longopts[] ALIGN1 = 104 | #define MODULE_FLAG_FOUND_IN_MODDEP 0x0004 105 | #define MODULE_FLAG_BLACKLISTED 0x0008 106 | 107 | +#if defined(ANDROID) || defined(__ANDROID__) 108 | +#define DONT_USE_UTS_REL_FOLDER 109 | +#endif 110 | + 111 | struct module_entry { /* I'll call it ME. */ 112 | unsigned flags; 113 | char *modname; /* stripped of /path/, .ext and s/-/_/g */ 114 | @@ -446,10 +450,17 @@ static int do_modprobe(struct module_entry *m) 115 | options = gather_options_str(options, G.cmdline_mopts); 116 | 117 | if (option_mask32 & OPT_SHOW_DEPS) { 118 | +#ifndef DONT_USE_UTS_REL_FOLDER 119 | printf(options ? "insmod %s/%s/%s %s\n" 120 | : "insmod %s/%s/%s\n", 121 | CONFIG_DEFAULT_MODULES_DIR, G.uts.release, fn, 122 | options); 123 | +#else 124 | + printf(options ? "insmod %s/%s %s\n" 125 | + : "insmod %s/%s\n", 126 | + CONFIG_DEFAULT_MODULES_DIR, fn, 127 | + options); 128 | +#endif 129 | free(options); 130 | continue; 131 | } 132 | @@ -531,6 +542,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) 133 | int rc; 134 | unsigned opt; 135 | struct module_entry *me; 136 | + struct stat info; 137 | 138 | INIT_G(); 139 | 140 | @@ -541,8 +553,12 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) 141 | 142 | /* Goto modules location */ 143 | xchdir(CONFIG_DEFAULT_MODULES_DIR); 144 | +#ifndef DONT_USE_UTS_REL_FOLDER 145 | uname(&G.uts); 146 | - xchdir(G.uts.release); 147 | + if (stat(G.uts.release, &info) == 0) { 148 | + xchdir(G.uts.release); 149 | + } 150 | +#endif 151 | 152 | if (opt & OPT_LIST_ONLY) { 153 | int i; 154 | -- 155 | 1.7.10.4 156 | 157 | -------------------------------------------------------------------------------- /patches/027-depmod-parameter.patch: -------------------------------------------------------------------------------- 1 | From 9abab27407923ee7a62817538ce80e3806f58793 Mon Sep 17 00:00:00 2001 2 | From: Tanguy Pruvot 3 | Date: Sat, 17 Mar 2012 06:01:37 +0100 4 | Subject: [PATCH] depmod: fix syntax with modules in parameter 5 | 6 | Change-Id: I21b8664db01cf0132db82f8d6caa1a0e77e71004 7 | from https://github.com/tpruvot/android_external_busybox 8 | --- 9 | modutils/depmod.c | 5 ++++- 10 | 1 files changed, 4 insertions(+), 1 deletions(-) 11 | 12 | diff --git a/modutils/depmod.c b/modutils/depmod.c 13 | index 7752361..a1419d6 100644 14 | --- a/modutils/depmod.c 15 | +++ b/modutils/depmod.c 16 | @@ -50,7 +50,10 @@ static int FAST_FUNC parse_module(const char *fname, struct stat *sb UNUSED_PARA 17 | *first = info; 18 | 19 | info->dnext = info->dprev = info; 20 | - info->name = xstrdup(fname + 2); /* skip "./" */ 21 | + if (strncmp(fname, "./", 2) == 0) 22 | + info->name = xstrdup(fname + 2); 23 | + else 24 | + info->name = xstrdup(fname); 25 | info->modname = xstrdup(filename2modname(fname, modname)); 26 | for (ptr = image; ptr < image + len - 10; ptr++) { 27 | if (strncmp(ptr, "depends=", 8) == 0) { 28 | -- 29 | 1.7.0.4 30 | 31 | -------------------------------------------------------------------------------- /patches/051-ash-history.patch: -------------------------------------------------------------------------------- 1 | From: Tias Guns 2 | Date: Sun, 5 Aug 2012 16:13:55 +0200 3 | Subject: [PATCH] ash history 4 | 5 | allows ash history to work on Android 6 | 7 | Patch modified from 'busybox-android.patch' by Alexandre Courbot 8 | https://github.com/Gnurou/busybox-android 9 | --- 10 | include/libbb.h | 4 ++-- 11 | init/init.c | 2 +- 12 | shell/ash.c | 8 +++++++- 13 | 3 files changed, 10 insertions(+), 4 deletions(-) 14 | 15 | diff --git a/include/libbb.h b/include/libbb.h 16 | index e520060..f91d635 100644 17 | --- a/include/libbb.h 18 | +++ b/include/libbb.h 19 | @@ -1764,12 +1764,12 @@ extern struct globals *const ptr_to_globals; 20 | * use bb_default_login_shell and following defines. 21 | * If you change LIBBB_DEFAULT_LOGIN_SHELL, 22 | * don't forget to change increment constant. */ 23 | -#define LIBBB_DEFAULT_LOGIN_SHELL "-/bin/sh" 24 | +#define LIBBB_DEFAULT_LOGIN_SHELL "-/sbin/sh" 25 | extern const char bb_default_login_shell[] ALIGN1; 26 | /* "/bin/sh" */ 27 | #define DEFAULT_SHELL (bb_default_login_shell+1) 28 | /* "sh" */ 29 | -#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+6) 30 | +#define DEFAULT_SHELL_SHORT_NAME (bb_default_login_shell+7) 31 | 32 | /* The following devices are the same on all systems. */ 33 | #define CURRENT_TTY "/dev/tty" 34 | diff --git a/init/init.c b/init/init.c 35 | index b84bdcc..b805a79 100644 36 | --- a/init/init.c 37 | +++ b/init/init.c 38 | @@ -1047,7 +1047,7 @@ int init_main(int argc UNUSED_PARAM, char **argv) 39 | /* Make sure environs is set to something sane */ 40 | putenv((char *) "HOME=/"); 41 | putenv((char *) bb_PATH_root_path); 42 | - putenv((char *) "SHELL=/bin/sh"); 43 | + putenv((char *) "SHELL=/sbin/sh"); 44 | putenv((char *) "USER=root"); /* needed? why? */ 45 | 46 | if (argv[1]) 47 | diff --git a/shell/ash.c b/shell/ash.c 48 | index 31fbc55..f9dad6a 100644 49 | --- a/shell/ash.c 50 | +++ b/shell/ash.c 51 | @@ -13213,20 +13213,26 @@ int ash_main(int argc UNUSED_PARAM, char **argv) 52 | if (iflag) { 53 | const char *hp = lookupvar("HISTFILE"); 54 | if (!hp) { 55 | +#ifdef __ANDROID__ 56 | + setvar("HISTFILE", "/mnt/sdcard/ash_history", 0); 57 | +#else 58 | hp = lookupvar("HOME"); 59 | if (hp) { 60 | char *defhp = concat_path_file(hp, ".ash_history"); 61 | setvar("HISTFILE", defhp, 0); 62 | free(defhp); 63 | } 64 | +#endif 65 | } 66 | } 67 | #endif 68 | if (argv[0] && argv[0][0] == '-') 69 | isloginsh = 1; 70 | + else 71 | + isloginsh = 1; 72 | if (isloginsh) { 73 | state = 1; 74 | - read_profile("/etc/profile"); 75 | + read_profile("/system/etc/profile"); 76 | state1: 77 | state = 2; 78 | read_profile(".profile"); 79 | -- 80 | 1.7.10.4 81 | 82 | --------------------------------------------------------------------------------