4 ms·
But what IS it?
by mcswell 1y ago
But what IS it?
- tetris11 1y agoI think... it builds a busybox system based on desired commands (similar to a dockerfile, but using a REPL?). I have to admit that the README is next to useless.
- stonogo 1y agoHow would you improve the description in the readme file? The toybox build produces a multicall binary, a "swiss-army-knife" program that acts differently depending on the name it was called by (cp, mv, cat...). Installing toybox adds symlinks for each command name to the $PATH.
- hamdingers 1y agoThat's a good description but it's odd to put it after ~60 lines of instruction on downloading and building the program. Users may want to know what it is first.
- mrbluecoat 1y agoAddressing the obvious elephant in the room (busybox) is also buried: > I left busybox due to an argument over GPLv3.
- pbhjpbhj 1y agoThat's pretty good. I'd _consider_ flipping it around so the familiar part comes first? Perhaps, something like: «Toybox provides a set of utilities like cp, mv, cat, ..., which are each just links to a single binary (a "multicall binary"). In this way `toybox` is like a Swiss Army knife -- several tools combined into one. Installing toybox adds a symlink for each [of the x] command name[s] to the $PATH.» The last sentence might be better if it said how many symlinks are added? Aside, Busybox uses the term "Swiss Army Knife" in their description. Using the same term like that, which isn't an inherent term, might open you up to a 'passing off' claim. Multi-tool, or EDC, may work?
- skeledrew 1y agoThe app provides various subcommands, which can also be invoked based on its name. Symlinks are used to expose the subcommands as regular app names. My rewording/simplification of the description
- numpad0 1y agoI think small but key context that needs to be mentioned here is that, Busybox always produced the memorable "Busybox v1.2.3(.*) multi-call binary" header line wherever appropriate, and used "The Swiss Army Knife of Embedded Linux" as project tagline. That's likely why that text is written that way, so that it pattern matches inside users' brains.
- watusername 1y ago> I think... it builds a busybox system based on desired commands (similar to a dockerfile, but using a REPL?). I am now very curious how you arrived at this conclusion. Did you make use of any LLM? If so, which model and what prompt did you use?
- chasil 1y agoToybox is a clone of Busybox with a less restrictive license. Toybox is used on Android to implement a number of POSIX.2 utilities. https://en.wikipedia.org/wiki/BusyBox#Controversy_over_Toybox https://en.wikipedia.org/wiki/BusyBox#Controversy_over_Toybo...
- MuffinFlavored 1y agoIs it fair to say GNU coreutils "inspired" the need for Busybox?
- chasil 1y agoI'm actually surprised that there wasn't a fork of the last GPLv2 release. The benefit of starting over is that Landley was able to relicense Toybox as BSD, after he first released it as GPLv2. That would not have been possible with a fork. If this were commercial software, he would have been forced to "cleanroom" the new code.
- coffeebeanHH 1y agoIt's sort of a remastered Version of busybox. Please refer to Rob himself for explaining. There's a good intro on yt [1] and a "demo" in [2] edit: Well Sorry, [2] was about mkroot. I just skipped through the video. I thought it was related to toybox/busybox. Maybe somewhere in the talk. Has been a while since I last watched it. [1] https://www.youtube.com/watch?v=MkJkyMuBm3g https://www.youtube.com/watch?v=MkJkyMuBm3g [2] https://www.youtube.com/watch?v=Sk9TatW9ino https://www.youtube.com/watch?v=Sk9TatW9ino
- Nursie 1y agoA static binary that contains a huge variety of useful posix commands (ls/cp/mv/cat/md5sum/nohup/mount etc etc), all baked into one program, which exhibits different behaviour depending on how it is called - if you name the executable to one of these, or provide a hard or soft link with that name, it will behave as that program. This generally makes things easier on devices with strict storage space constraints by reducing the overhead of having separate executables and/or libraries for the code for all these. It may reduce load times in very constrained systems compared to dynamic linking too, as everything is bundled in the one image, and in some cases it can exhibit performance gains. It's generally (but not exclusively) of interest to embedded device manufacturers. Toybox is licensed very permissively, compared to busybox's use of GPL, so manufacturers like it. IIRC it is now used in android.
- pmarreck 1y agoThe Nixpkgs search page for it https://search.nixos.org/packages?channel=25.05&show=toybox&query=toybox https://search.nixos.org/packages?channel=25.05&show=toybox&... shows the list of its outputs (executables): [ acpi arch ascii base32 base64 basename blkdiscard blkid blockdev bunzip2 bzcat cal cat chattr chgrp chmod chown chroot chrt chvt cksum clear cmp comm count cp cpio crc32 cut date dd deallocvt devmem df dirname dmesg dnsdomainname dos2unix du echo egrep eject env expand factor fallocate false fgrep file find flock fmt fold free freeramdisk fsfreeze fstype fsync ftpget ftpput getconf getopt gpiodetect gpiofind gpioget gpioinfo gpioset grep groups gunzip halt head help hexedit host hostname httpd hwclock i2cdetect i2cdump i2cget i2cset i2ctransfer iconv id ifconfig inotifyd insmod install ionice iorenice iotop kill killall killall5 link linux32 ln logger login logname losetup ls lsattr lsmod lspci lsusb makedevs mcookie md5sum memeater microcom mix mkdir mkfifo mknod mkpasswd mkswap mktemp modinfo mount mountpoint mv nbd-client nbd-server nc netcat netstat nice nl nohup nproc nsenter od oneit openvt partprobe paste patch pgrep pidof ping ping6 pivot_root pkill pmap poweroff printenv printf prlimit ps pwd pwdx pwgen readahead readelf readlink realpath reboot renice reset rev rfkill rm rmdir rmmod rtcwake sed seq setfattr setsid sha1sum sha224sum sha256sum sha384sum sha3sum sha512sum shred shuf sleep sntp sort split stat strings su swapoff swapon switch_root sync sysctl tac tail tar taskset tee test time timeout top touch toybox true truncate ts tsort tty tunctl uclampset ulimit umount uname unicode uniq unix2dos unlink unshare uptime usleep uudecode uuencode uuidgen vconfig vmstat w watch watchdog wc wget which who whoami xargs xxd yes zcat That's... an impressive set of Unix functionality in a single binary... AFAIK, if this works like Busybox does, these are all actually just wrappers that call into Toybox with this command as a parameter. EDIT: Nope, it's literally just symlinks with names detected by toybox that dictate how it will behave, and this is apparently called a "multicall binary" And yes, the [ (open bracket) is a command in POSIX shell.