{"id":18783998,"url":"https://github.com/u-root/sourcery","last_synced_at":"2025-10-08T00:03:38.523Z","repository":{"id":41704187,"uuid":"475634016","full_name":"u-root/sourcery","owner":"u-root","description":"A new take on source mode, in the age of modules","archived":false,"fork":false,"pushed_at":"2025-07-02T14:09:19.000Z","size":111,"stargazers_count":9,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-08T00:02:58.623Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/u-root.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2022-03-29T22:05:52.000Z","updated_at":"2025-07-02T18:26:00.000Z","dependencies_parsed_at":"2023-01-18T13:30:24.028Z","dependency_job_id":null,"html_url":"https://github.com/u-root/sourcery","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/u-root/sourcery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u-root%2Fsourcery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u-root%2Fsourcery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u-root%2Fsourcery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u-root%2Fsourcery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/u-root","download_url":"https://codeload.github.com/u-root/sourcery/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/u-root%2Fsourcery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278866931,"owners_count":26059671,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-07T20:41:35.137Z","updated_at":"2025-10-08T00:03:38.518Z","avatar_url":"https://github.com/u-root.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sourcery\n\nA new take on [u-root](https://u-root.org/) source mode, in the age of\n[Go modules](https://go.dev/blog/using-go-modules).\n\nSourcery has been [presented at openSUSE Conference 2022](\nhttps://media.ccc.de/v/3781-sourcery-a-multi-architecture-root-file-system-that-is-mostly-source).\n\nSourcery is a program that builds root file systems consisting mostly\nof Go source code: of the 90,000 files in a typical sourcery root,\nthere are only 12 or so programs. Other programs are compiled on\ndemand to a ramfs-backed file system. Compilation takes a fraction of\na second for most programs, and never more than 2 seconds. Once the\nprogram is compiled to a statically-linked, tmpfs-based binary,\ninvocation is instantaneous.\n\nBecause these images are mostly source, they can also be\nmulti-architecture. Binaries present on boot have a path formed from\nthe target os and architecture, e.g. /$OS_$ARCH/bin/init for\ninit. Dynamically compiled binaries are placed in the tmpfs-backed\n/bin, since these binaries vanish on boot, the path can be simpler.\n\nThe file system includes the full Go toolchain as well as all source\ncode. Constructing the root file system, including the git clone steps\nand Go toolchain build, takes under 4 minutes; each additional\narchitecture takes another 90 seconds (to ensure reproducible builds,\nthe Go toolchain builds itself 3 times).\n\nSourcery root file systems are designed for VFAT, a standard for\nfirmware for x86, ARM, and RISC-V. A typical USB stick for sourcery\nwould include a syslinux bootstrap for x86, required for those\nplatforms; a kernel Image file for ARM; and a kernel file for RISC-V:\nthe firmware for ARM and RISC-V is able to find boot kernels without\nusing an on-stick bootstrap.\n\nTry it yourself!\nTo try with a typical u-root install, including an emacs-like editor\nwritten in Go:\n\n```\ngit clone git@github.com:u-root/sourcery\ncd sourcery\ngo build # note: AT LEAST go 1.17\n./sourcery git@github.com:u-root/u-root git@github.com:nsf/godit\n```\n\nSourcery will print out a command you can use to try the file system out, including\nan strace command if you want to track what it does.\n```\nunshare -m chroot \"/tmp/sourcery3965857644\" /linux_amd64/bin/init.\n```\n\nSourcery may be found at \u003chttps://github.com/u-root/sourcery\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu-root%2Fsourcery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fu-root%2Fsourcery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fu-root%2Fsourcery/lists"}