Skip to content
Alex Samorukov edited this page Jan 6, 2021 · 18 revisions

Welcome to the busybox wiki!

This is a temporary home for the BusyBox FreeBSD

Goal

BusyBox combines tiny versions of many common UNIX utilities into a single small executable. It provides replacements for most of the utilities you usually find in GNU fileutils, shellutils, etc. Goal is to have it up and running on the FreeBSD. This could be very helpful on embedded space or for other purposes.

Current state

BusyBox is available in the FreeBSD ports tree. So far following applets are enabled and tested:

[ [[ addgroup ar arch ash awk base64 basename bc bunzip2 bzcat bzip2 cal cat chat chgrp chmod chown chpst chroot cksum clear cmp comm cp cpio crond crontab cttyhack cut date dc dd delgroup diff dirname dnsd dnsdomainname dos2unix dpkg dpkg-deb du echo ed egrep env envdir envuidgid expand expr factor fakeidentd fallocate false fatattr fgrep find flock fold fsync ftpd ftpget ftpput getopt grep groups gunzip gzip halt hd head hexdump hexedit hostid hostname httpd hush id inetd install iostat ipcalc kill killall killall5 klogd less link ln logger logname logread lpq lpr ls lzcat lzma lzop makemime man md5sum microcom mim mkdir mkfifo mknod mktemp more mpstat mv nc nice nl nmeter nohup nologin nslookup ntpd nuke od paste patch pgrep pidof ping ping6 pipe_progress pkill pmap popmaildir poweroff printenv printf ps pscan pwd pwdx readlink readprofile realpath reboot reformime renice reset resize resume rev rm rmdir rpm rpm2cpio run-parts runsv runsvdir script scriptreplay sed sendmail seq setsid setuidgid sh sha1sum sha256sum sha3sum sha512sum shred shuf sleep smemcap softlimit sort split ssl_client stat strings stty su sulogin sum sv svc svlogd svok sync syslogd tac tail tar tcpsvd tee telnet telnetd test tftp tftpd timeout top touch tr traceroute traceroute6 true truncate ts tty ttysize uname uncompress unexpand uniq unix2dos unlink unlzma unxz unzip users usleep uudecode uuencode vi volname w wall watch wc wget which who whoami whois xargs xxd xz xzcat yes zcat

All FreeBSD specific patches are shared with upstream.

Known issues

  • FS /compat/linux/proc must be mounted to make ps and some other tools working
  • CONFIG_UDPSVD is not working, as udpio.c depends on IP_PKTINFO which is n/a on FreeBSD. Code needs to be adopted to use IP_RECVDSTADDR on BSD.
  • CONFIG_ARPING - BSD code to deal with raw socket is very different, not sure that porting this tool worth it. OSS arping using libnet as abstraction layer to solve it.
  • CONFIG_DF - Error on build, libbb/find_mount_point.c:10:10: fatal error: 'mntent.h' file not found
  • CONFIG_NPROC - ld: error: undefined symbol: sched_getaffinity
  • CONFIG_FEATURE_STAT_FILESYSTEM - error: incomplete definition of type 'struct statfs'
  • CONFIG_FEATURE_SYNC_FANCY - ld: error: undefined symbol: syncfs
  • CONFIG_UPTIME, CONFIG_FREE - depends on sysinfo(), see https://code.google.com/archive/p/sysinfo-bsd/source/default/source for the sample wrapper
  • CONFIG_BEEP - depends on KIOCSOUND ioctl, SPKRTONE is a BSD option
  • CONFIG_DMESG - depends on sys/klog.h
  • Netcat UDP listen mode is broken, nc -l -p 4434 -u gives nc: can't connect to remote host: Address family not supported by protocol family. Most likely reason is same as with CONFIG_UDPSVD
Clone this wiki locally