{"id":13480661,"url":"https://github.com/landley/toybox","last_synced_at":"2025-05-13T23:05:15.502Z","repository":{"id":2407030,"uuid":"3374554","full_name":"landley/toybox","owner":"landley","description":"toybox","archived":false,"fork":false,"pushed_at":"2025-05-09T05:46:33.000Z","size":13372,"stargazers_count":2577,"open_issues_count":97,"forks_count":346,"subscribers_count":90,"default_branch":"master","last_synced_at":"2025-05-09T06:27:30.005Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://landley.net/toybox","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/landley.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-02-07T05:15:15.000Z","updated_at":"2025-05-09T06:20:23.000Z","dependencies_parsed_at":"2023-10-20T21:07:15.205Z","dependency_job_id":"4a2dc03f-a25a-4c3a-864a-5740990653ee","html_url":"https://github.com/landley/toybox","commit_stats":{"total_commits":5462,"total_committers":178,"mean_commits":"30.685393258426966","dds":0.264188941779568,"last_synced_commit":"47bc0009f567cffd91ea4977847ba1f128024c6d"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landley%2Ftoybox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landley%2Ftoybox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landley%2Ftoybox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/landley%2Ftoybox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/landley","download_url":"https://codeload.github.com/landley/toybox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253500216,"owners_count":21918118,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:00:43.315Z","updated_at":"2025-05-13T23:05:10.486Z","avatar_url":"https://github.com/landley.png","language":"C","funding_links":["https://patreon.com/landley"],"categories":["C","Linux System Tools","Linux生态圈Dev\u0026Ops工具与服务"],"sub_categories":["System Utilities"],"readme":"Toybox: all-in-one Linux command line.\n\n--- Getting started\n\nYou can download static binaries for various targets from:\n\n  http://landley.net/toybox/bin\n\nThe special name \".\" indicates the current directory (just like \"..\" means\nthe parent directory), and you can run a program that isn't in the $PATH by\nspecifying a path to it, so this should work:\n\n  wget http://landley.net/toybox/bin/toybox-x86_64\n  chmod +x toybox-x86_64\n  ./toybox-x86_64 echo hello world\n\n--- Building toybox\n\nType \"make help\" for build instructions.\n\nToybox uses the \"make menuconfig; make; make install\" idiom same as\nthe Linux kernel. Usually you want something like:\n\n  make defconfig\n  make\n  make install\n\nOr maybe:\n\n  LDFLAGS=\"--static\" CROSS_COMPILE=armv5l- make defconfig toybox\n  PREFIX=/path/to/root/filesystem/bin make install_flat\n\nThe file \"configure\" defines default values for many environment variables\nthat control the toybox build; if you export any of these variables into your\nenvironment, your value is used instead of the default in that file.\n\nThe CROSS_COMPILE argument above is optional, the default builds a version of\ntoybox to run on the current machine. Cross compiling requires an appropriately\nprefixed cross compiler toolchain, several example toolchains (built using\nthe file \"scripts/mcm-buildall.sh\" in the toybox source) are available at:\n\n  https://landley.net/toybox/downloads/binaries/toolchains/latest\n\nFor the \"CROSS_COMPILE=armv5l-\" example above, download\narmv5l-linux-musleabihf-cross.tar.xz, extract it, and add its \"bin\"\nsubdirectory to your $PATH. (And yes, the trailing - is significant,\nbecause the prefix includes a dash.)\n\nFor more about cross compiling, see:\n\n  https://landley.net/toybox/faq.html#cross\n  http://landley.net/writing/docs/cross-compiling.html\n  http://landley.net/aboriginal/architectures.html\n\nFor a more thorough description of the toybox build process, see:\n\n  http://landley.net/toybox/code.html#building\n\n--- Using toybox\n\nThe toybox build produces a multicall binary, a \"swiss-army-knife\" program\nthat acts differently depending on the name it was called by (cp, mv, cat...).\nInstalling toybox adds symlinks for each command name to the $PATH.\n\nThe special \"toybox\" command treats its first argument as the command to run.\nWith no arguments, it lists available commands. This allows you to use toybox\nwithout installing it, and is the only command that can have an arbitrary\nsuffix (hence \"toybox-armv5l\").\n\nThe \"help\" command provides information about each command (ala \"help cat\"),\nand \"help toybox\" provides general information about toybox.\n\n--- Configuring toybox\n\nIt works like the Linux kernel: allnoconfig, defconfig, and menuconfig edit\na \".config\" file that selects which features to include in the resulting\nbinary. You can save and re-use your .config file, but may want to\nrun \"make oldconfig\" to re-run the dependency resolver when migrating to\nnew versions.\n\nThe maximum sane configuration is \"make defconfig\": allyesconfig isn't\nrecommended as a starting point for toybox because it enables unfinished\ncommands, debug code, and optional dependencies your build environment may\nnot provide.\n\n--- Creating a Toybox-based Linux system\n\nToybox has a built-in simple system builder (scripts/mkroot.sh) with a\nMakefile target:\n\n  make root\n  sudo chroot root/host/fs /init\n\nType \"exit\" to get back out. If you install appropriate cross compilers and\npoint it at Linux source code, it can build simple three-package systems\nthat boot to a shell prompt under qemu:\n\n  make root CROSS_COMPILE=sh4-linux-musl- LINUX=~/linux\n  cd root/sh4\n  ./qemu-sh4.sh\n\nBy calling scripts/mkroot.sh directly you can add additional packages\nto the build, see scripts/root/dropbear as an example.\n\nThe FAQ explains this in a lot more detail:\n\n  https://landley.net/toybox/faq.html#system\n  https://landley.net/toybox/faq.html#mkroot\n\n--- Presentations\n\n1) \"Why Toybox?\" talk at the Embedded Linux Conference in 2013\n\n    outline: http://landley.net/talks/celf-2013.txt\n    video: http://youtu.be/SGmtP5Lg_t0\n\n    The https://landley.net/toybox/about.html page has nav links breaking that\n    talk down into sections.\n\n2) \"Why Public Domain?\" The rise and fall of copyleft, Ohio LinuxFest 2013\n\n    outline: http://landley.net/talks/ohio-2013.txt\n    audio: https://archive.org/download/OhioLinuxfest2013/24-Rob_Landley-The_Rise_and_Fall_of_Copyleft.mp3\n\n3) Why did I do Aboriginal Linux (which led me here)\n\n    260 slide presentation:\n      https://speakerdeck.com/landley/developing-for-non-x86-targets-using-qemu\n\n    How and why to make android self-hosting:\n      http://landley.net/aboriginal/about.html#selfhost\n\n    More backstory than strictly necessary:\n      https://landley.net/aboriginal/history.html\n\n4) What's new with toybox (ELC 2015 status update):\n\n    video: http://elinux.org/ELC_2015_Presentations\n    outline: http://landley.net/talks/celf-2015.txt\n\n5) Toybox vs BusyBox (2019 ELC talk):\n\n    outline: http://landley.net/talks/elc-2019.txt\n    video: https://www.youtube.com/watch?v=MkJkyMuBm3g\n\n--- Contributing\n\nThe three important URLs for communicating with the toybox project are:\n\n  web page: http://landley.net/toybox\n\n  mailing list: http://lists.landley.net/listinfo.cgi/toybox-landley.net\n\n  git repo: http://github.com/landley/toybox\n\nThe maintainer prefers patches be sent to the mailing list. If you use git,\nthe easy thing to do is:\n\n  git format-patch -1 $HASH\n\nThen send a file attachment. The list holds messages from non-subscribers\nfor moderation, but I usually get to them in a day or two.\n\nI download github pull requests as patches and apply them with \"git am\"\n(which avoids gratuitous merge commits). Sometimes I even remember to close\nthe pull request.\n\nIf I haven't responded to your patch after one week, feel free to remind\nme of it.\n\nAndroid's policy for toybox patches is that non-build patches should go\nupstream first (into vanilla toybox, with discussion on the toybox mailing\nlist) and then be pulled into android's toybox repo from there. (They\ngenerally resync on fridays). The exception is patches to their build scripts\n(Android.mk and the checked-in generated/* files) which go directly to AOSP.\n\n(As for the other meaning of \"contributing\", https://patreon.com/landley is\nalways welcome but I warn you up front I'm terrible about updating it.)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flandley%2Ftoybox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flandley%2Ftoybox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flandley%2Ftoybox/lists"}