Toybox

Toybox
Original author(s) Robert Landley
Developer(s) Robert Landley and others
Initial release 2006 (2006)
Stable release
0.7.4 / June 19, 2017 (2017-06-19)
Repository https://github.com/gfto/toybox.git, https://github.com/landley/toybox.git
Written in C
Operating system Unix-like
Size 797 KB (archived)
Type Independent SUSp XCU implementation
License 0BSD license[1] (permissive license / Public domain equivalent license)
Website www.landley.net/toybox

Toybox is a Free and open source software implementation of some Linux command line utilities. These include ls, cp, mv, and about 150 others. The Toybox project was started in 2006,[2] and became a BSD-licensed BusyBox alternative.[3][4] Toybox is included with Android 6.0 "Marshmallow"[5] and all later Android versions, and is also available for installation on certain other operating systems.

Functionality and aim

Toybox aims to provide a BSD licensed replacement for the GPL licensed Busybox.[6] Toybox's major technical design goals are simplicity, smallness, speed and standard compliance.[7] Toybox is POSIX-2008 and LSB 4.1 compatible,[2] and doesn't focus on having every option found in GNU counterparts.

Toybox is licensed using the permissive BSD license, where BusyBox uses the copyleft GNU General Public License, which lead to different usage domains. Busybox is mostly used in the copyleft FOSS domain, while Toybox is used mostly with permissive licensed projects and by commercial companies, e.g. Google's Android[8] which is an explicit target of toybox[9]. Feature-wise Toybox has not reached parity with Busybox, Toybox offers currently only a subset of the Busybox functionality.

History

In early 2006 Toybox was started by Rob Landley[2][4] after he ended his BusyBox maintainership due to a dispute with Bruce Perens, the original creator of BusyBox.[10] In 2008 the project went dormant.[3] At the end of 2011, Tim Bird, a Sony employee suggested to create an alternative to BusyBox which would not be under the GNU General Public License.[6] Rob Landley followed the request and suggested instead to base this library on the dormant Toybox. He re-licensed ToyBox from the GNU General Public License to the 2-clause BSD License,[11][12] and took up the Toybox development again. In March 2013 the project was relicensed to an even more permissive 0-clause BSD license, a Public domain equivalent license variant.[13]

At the end of 2014 Toybox was integrated into the Android 6.x (Android Marshmallow) development branches.[5][8][14]

Controversy

In January 2012 the proposal of creating a BSD license alternative to the GPL licensed BusyBox project drew harsh criticism from Matthew Garrett for taking away the only relevant tool for copyright enforcement of the Software Freedom Conservancy group.[15] Rob Landley, who had started the BusyBox-based lawsuits, responded this was intentional, explaining that the lawsuits had not benefited the project but that they had led to corporate avoidance, expressing a desire to stop the lawsuits "in whatever way I see fit".[16][17][18]

Project progress

The official Toybox documentation lists an overview of the available, partially available and the missing commands. According to the roadmap to version 1.0, approx. 50% of the projects implementation goals are achieved.[19][20][21]

List of Toybox Commands

  • ascii — report character aliases
  • basename — return non-directory portion of a pathname
  • cal — prints a calendar of the given month or year
  • cat — Copy file content to stdout
  • chgrp — Change group
  • chmod — Change file modes
  • chown — Change owner
  • chroot — Changes the apparent root directory
  • cksum — Write file checksums and sizes
  • clear
  • cmp — Compare two files
  • comm — Select or reject lines common to two files
  • count — Count the number of elements of an array
  • cp — Copy
  • cpio — Copy files to and from archives
  • cut — Cut out selected fields of each line of a file
  • date — Display system date/time
  • df — Report free disk space
  • dirname — Return the directory portion of a pathname
  • dmesg — Display message or driver message
  • echo
  • eject
  • env
  • expand — Convert tabs to spaces
  • factor
  • fallocate
  • false — Return false value
  • fgrep — Search a file with a fixed pattern
  • find — Command-line utility that searches through one or more directory trees
  • ftpget — Use File Transfer Protocol (FTP) to get a file from an FTP server
  • ftpput — Use File Transfer Protocol (FTP) to put a file from an FTP server
  • egrep
  • grep — Search for PATTERN in each FILE or standard input
  • groups — Display a group
  • gzip — File compression
  • head — Copy the first part of files
  • help — Command help lists all commands
  • hostname — Show or set the system's host name
  • id — Prints the user or group identifier
  • install
  • ifconfig — System administration utility for network interface configuration.
  • ln — Create a link named LINK_NAME or DIRECTORY to the specified TARGET.
  • kill — Send signals to running processes in order to request the termination of the process
  • killall — kill processes by name
  • link — call link function
  • login
  • logname — Return the user's login name
  • losetup
  • lspci — Prints detailed information about all PCI buses and devices
  • md5sum — Generate or check MD5 message digests
  • ls — List of files or folders
  • mkdir — Create a folder
  • mkfifo — Make FIFO special files
  • mknod — Make special files
  • microcom — A minimalistic terminal program
  • mount — Mount a file system
  • mountpoint
  • mv — move file
  • nbd-client
  • nc — Arbitrary TCP and UDP connections and listens
  • netcat
  • nice — Invoke a utility with an altered nice value
  • nl — line numbering filter
  • nohup — Invoke a utility immune to hangups
  • od — dump files in various formats
  • oneit
  • partprobe
  • passwd — Change user password
  • paste — Merge corresponding or subsequent lines of files
  • patch — Apply changes to files
  • pidof — Find the process ID of a running program
  • pmap — Report memory map of a process
  • pwd — Print working directory name
  • pwdx — Report current working directory of a process
  • readahead
  • readlink
  • realpath
  • renice — set nice values of running processes
  • rev — reverse lines of a file or files
  • rfkill
  • rm — Remove directory entries
  • rmdir — Remove directories
  • seq — Generate a sequence of numbers
  • setsid — Run a program in a new session
  • sha1sum — Compute and check SHA1 message digest
  • sleep — Suspend execution for an interval
  • sort — Sort, merge, or sequence check text files
  • split — Split files into pieces
  • stat — Display file or file system status
  • strings — Print the strings of printable characters in files.
  • su — Change user ID
  • swapon
  • swapoff
  • switch root
  • sync — Flush file system buffers
  • tac — Concatenate and print files in reverse
  • tail — Copy the last part of a file
  • taskset — Retrieve or set a process's CPU affinity
  • tee — Duplicate standard input
  • time — time a simple command
  • timeout — Run a command with a time limit
  • touch — change file access and modification times
  • true — Return true value
  • truncate — shrink or extend the size of a file to the specified size
  • tty — Return user's terminal name
  • umount
  • uname
  • uniq — report or filter out repeated lines in a file
  • unix2dosUNIX to DOS text file format converter
  • unlink
  • unshare
  • usleep — sleep some number of microseconds
  • uuencoding — Encode a binary file
  • uudecode — Decode a binary file
  • vconfig
  • w — Show who is logged on and what they are doing.
  • wc — Word, line, and byte or character count
  • which — Shows the full path of (shell) commands
  • who — Display who is on the system
  • whoami — Print effective userid
  • xargs — Construct argument lists and invoke utility
  • yes — to print a string repetitively

See also

References

  1. Toybox is released under the following "zero clause" BSD license by Rob Landley
  2. 1 2 3 Landley, Robert. "What is ToyBox?". Toybox project website. Retrieved 13 July 2012.
  3. 1 2 Dj Walker-Morgan. "Inside the ToyBox: An interview with Rob Landley". Retrieved 13 July 2012.
  4. 1 2 Varghese, Sam (2012-02-01). "BusyBox replacement project fuels animated verbal spat". IT Wire. Retrieved 2013-05-12.
  5. 1 2 Android gets a toybox on lwn.net by Jake Edge (January 14, 2015)
  6. 1 2 "Busybox replacement project". 2012-01-11. Retrieved 2014-03-04.
  7. Landley, Robert. "Design Docs". Toybox project website. Retrieved 2015-02-18. Toybox combines the most common Linux command line utilities together into a single BSD-licensed executable. It's simple, small, fast, and reasonably standards-compliant (POSIX-2008 and LSB 4.1).
  8. 1 2 toybox on android.googlesource.com (2014-12-28)
  9. celf-2015.txt by Rob Landley (2015)
  10. Landley, Robert (2006-09-30). "I'm going out now. I may be some time". busybox (Mailing list).
  11. Toybox relaunch on toybox.landley.narkive.com (2011-11-20)
  12. Switch to 2-clause BSD license (with caveat about scripts directory). 0.2.0 by landley on 15 Nov 2011
  13. Simplify license text, as mentioned on the mailing list. by Landley (14 Mar 2013)
  14. Issue 76861: Importing parts of Toybox into Android, including dos2unix, unix2dos, sort, uniq, and usleep
  15. "Garrett: The ongoing fight against GPL enforcement". LWN.net. 2012-01-31. Retrieved 2014-03-04. The real problem here is that the [Software Freedom Conservancy's] reliance on Busybox means that they're only able to target infringers who use that Busybox code. No significant kernel copyright holders have so far offered to allow the SFC to enforce their copyrights, with the result that enforcement action will grind to a halt as vendors move over to this Busybox replacement.
  16. "Garrett: The ongoing fight against GPL enforcement". LWN.net. 2012-01-31. Retrieved 2014-03-04. >As the ex-maintainer of busybox who STARTED those lawsuits in the first place and now HUGELY REGRETS ever having done so, I think I'm entitled to stop the lawsuits in whatever way I see fit. They never resulted in a single line of code added to the busybox repository. They HAVE resulted in more than one company exiting Linux development entirely and switching to non-Linux operating systems for their embedded products, and they're a big part of the reason behind Android's "No GPL in userspace" policy.
  17. Proffitt, Brian (2012-02-02). "GPL enforcement sparks community flames - Throwing the GPL baby out with the enforcement bath water?". ITworld. Retrieved 2015-03-04.
  18. Landley, Rob. "Embedded Linux Conference 2013 - Toybox: Writing a New Command Line" (video). The Linux Foundation. Retrieved 2016-06-24.
  19. Toybox Help
  20. "How are we doing on implementing stuff so far?". Retrieved 2015-03-17.
  21. Toybox Todo List
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.