From 1168aa1b0c904d1957f376a5ef61072b72e3d982 Mon Sep 17 00:00:00 2001
From: Rob Landley
The most interesting publicly available standards are A) POSIX-2008 (also -known as SUSv4), B) the Linux Standard Base version 4.1, and C) the official -Linux man pages. -But each of those include commands we've decided not implement, exclude -commands or features we have, and don't always entirely match reality.
+The most interesting publicly available command line standards are:
+The most thorough real world test (other than a large interactive -userbase) is using toybox as the command line in a build system such as -Aboriginal -Linux, having it rebuild itself from source code, and using the result +userbase) is using toybox as the command line in a +build system container +where it can rebuild itself from source code, then using the result to build Linux From Scratch. The current "minimal native development system" goal is to use mkroot plus musl-cross-make to hermetically build AOSP.
-We've also checked what commands were provided by similar projects -(klibc, sash, sbase, embutils, nash, beastiebox...), looked at various +
Over the years we've also checked what commands were provided by similar +projects (klibc, sash, sbase, embutils, nash, beastiebox...), looked at various vendor configurations of busybox, and collected end user requests.
Finally, we'd like to provide a good replacement for the Bash shell, which was the first program Linux ever ran (leading up to the 0.0.1 release in 1991) and remains the standard shell of Linux (no matter what Ubuntu says). This doesn't necessarily mean including every last Bash 5.x feature, but -does involve {various,features} <(beyond) posix.
+does involve {various,features} <(beyond) posix. -See the status page for the categorized command list -and progress towards implementing it.
+See the status page for the current categorized +command list and progress towards implementing it.
The best standards describe reality rather than attempting to impose a new one. I.E. "A good standard should document, not legislate." Standards which document existing reality tend to be approved by -more than one standards body, such as ANSI and ISO both approving C99. That's why IEEE 1003.1-2008, -the Single Unix Specification version 4, and the Open Group Base Specification -edition 7 are all the same standard from three sources, which most people just +more than one standards body, such as ANSI and ISO both approving C99. That's why IEEE 1003.1-2024, +the Single Unix Specification version 5, and the Open Group Base Specification +Issue 8 are all the same standard from three sources, which most people just call "posix" (short for "portable operating system that works like unix"). -It's available online in full, and may be downloaded as a tarball. -Previous versions (SUSv3 and +It's available online +in full +https://pubs.opengroup.org/onlinepubs/9699919799>online in full
, and may +be downloaded +as a tarball. Previous versions +(SUSv4, +SUSv3 and SUSv2) are also available.The original Posix was a collection of different standards (POSIX.1 from 1988, POSIX.1b from 1993, and POSIX.1c from 1995). The unified -SUSv2 came out in 1997 and SUSv3 came out in 2001. -Posix -2008 was then reissued in 2013 and 2018, the first was minor wordsmithing -with no behavioral changes, the second was to renew a ten year timeout -to still be considered a "current standard" by some government regulations, -but isn't officially a new standard. It's still posix-2008/SUSv4/Issue 7. -The endless committee process to produce -"Issue 8" has been ongoing for over 15 years now, with conference -calls on mondays and thursdays, mostly to discuss recent bug tracker -entries then publish the minutes of the meeting on the mailing list. -Prominent committee members have died during this time.
+SUSv2 came out in 1997 and SUSv3 came out in 2001. SUSv4 came out in 2008 +and remained the current version for 16 years (although it was +re-released in 2013, 2016, and 2018 with basically typo fixes, but was +still SUSv4 and Issue 7), until the current SUSv5 (Issue 8) finally came out +in 2024.Unfortunately, Posix describes an incomplete subset of reality, because -it was designed to. It started with proprietary unix vendors collaborating to -describe the functionality their fragmented APIs could agree on, which was then -incorporated into US federal procurement standards +it was designed to. Those first few pre-SUSv2 Posix standards that remain +unavailable on the Open Group's wesite were produced during a period known as +"the unix wars" when +AT&T's prioprietary control over the original UNIX(tm) intellectual property +sucked the old UNIX(tm) ecosystem dry until Linux and FreeBSD swept away +the irrelevant debris. That's why the standards process started with proprietary +unix vendors collaborating to describe what little functionality their +fragmented APIs could agree on, which was then incorporated into +US federal procurement standards as a compliance requirement for things like navy contracts, giving large corporations like IBM and Microsoft millions of dollars of incentive @@ -105,9 +113,10 @@ to punch holes in the standard big enough to drive Windows NT and OS/360 through. When open source projects like Linux started developing on the internet -(enabled by the 1993 relaxation of the National Science Foundation's +(enabled by the 1993 relaxation of the National Science Foundation's "Acceptable Use Policy" allowing everyone to connect to the internet, -previously restricted to approved government/military/university organizations), +previously restricted to approved government/military/university organizations +until the budget funding its backbone links passed from DARPA to NSF), Posix ignored the upstarts and Linux eventually returned the favor, @@ -286,12 +295,16 @@ have developed a certain amount of they document is to find an earlier version to read first. (This is an example of the greybeard community problem, where all current documentation was written by people who don't remember NOT already knowing -this stuff and the resources they originally learned from are long gone.)
+this stuff and the resources they originally learned from are long gone, +and excellent +historical +documents +have no obvious modern alternative.)That said, RFC documents can be useful (especially for networking protocols) -and the four URL templates the recommended starting files +and the four URL templates provided by the recommended starting files for new commands (hello.c and skeleton.c in the toys/example directory) -provide point to example posix, lsb, man, and rfc pages online.
+point to example posix, lsb, man, and rfc pages online.Toybox source includes +a scripts/mcm-buildall.sh wrapper script around musl-cross-make, which +builds cross and native versions of gcc+musl toolchains for a dozen +different architectures, and a mkroot/testroot.sh that boots +all the mkroot/mkroot CROSS=allnonstop LINUX=~/linux systems under +qemu and performs basic automated smoketesting that they run, have a current +clock, and their network and block device support works. The "make airlock" +target is implemented by scripts/install.sh which sets the +$PENDING and $TOOLCHAIN variables to lists of commands to symlink out of the +host.
+Building Linux From Scratch is not the same as building the Android Open Source Project, but after toybox 1.0 we plan to try @@ -383,7 +407,7 @@ this goal.
Android has a policy against GPL in userspace, so even though BusyBox -predates Android by many years, they couldn't use it. Instead they grabbed +predates Android by many years, they didn't use it. Instead they grabbed an old version of ash (later replaced by mksh) and implemented their own command line utility set @@ -467,15 +491,12 @@ getevent gzip modprobe newfs_msdos sh -
Update: -external/toybox/Android.bp has symlinks for the following toys out -of "pending". (The toybox modprobe is also built for the device, but -it isn't actually used and is only there for sanity checking against -the libmodprobe-based implementation.) These should be a priority for -cleanup:
+Update: Android's external/toybox/Android.bp +builds the following commands out of "pending", which +should be a priority for cleanup:
-diff expr getopt tr brctl getfattr lsof modprobe more stty traceroute vi +diff expr tr brctl getfattr lsof modprobe more stty traceroute vi
Android wishlist:
@@ -1258,6 +1279,7 @@ rsync linux32 hd strace gpiodetect gpiofind gpioget gpioinfo gpioset httpd uclampset nbd-server +memeater -- 2.39.5