All Projects → arsv → Minibase

arsv / Minibase

Licence: gpl-3.0
small static userspace tools for Linux

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Minibase

scoop-clojure
Install Clojure on Windows with Scoop
Stars: ✭ 73 (-51.33%)
Mutual labels:  sh
Easyee
开源 JavaEE 企业级快速开发平台。提供了 Spring Boot, Struts2, Hibernate, MyBatis, Shiro, EasyUI 等技术,包含完整的权限管理系统等。提供自动化代码生成器。 Open source JaveEE enterprise-class rapid development of the basic platform. Integration of Spring Boot, Struts2, Hibernate, MyBatis, Shiro, EasyUI and other technologies, including the integrity of the rights management. Provides an automated code generator.
Stars: ✭ 275 (+83.33%)
Mutual labels:  sh
M Cli
 Swiss Army Knife for macOS
Stars: ✭ 8,646 (+5664%)
Mutual labels:  sh
Hilbish
🌺 The flower shell. A comfy and nice little shell for Lua fans!
Stars: ✭ 191 (+27.33%)
Mutual labels:  sh
rewrite express
用最简单代码实现express框架
Stars: ✭ 12 (-92%)
Mutual labels:  sh
Modernish
Modernish is a library for writing robust, portable, readable, and powerful programs for POSIX-based shells and utilities.
Stars: ✭ 586 (+290.67%)
Mutual labels:  sh
shell-exec
Execute a command through the system shell
Stars: ✭ 20 (-86.67%)
Mutual labels:  sh
.dot Config
📚 Example dot configs for tmux, tmuxp, vim, vcspull, i3 and awesome
Stars: ✭ 102 (-32%)
Mutual labels:  sh
smoosh
The Symbolic, Mechanized, Observable, Operational SHell: an executable formalization of the POSIX shell standard.
Stars: ✭ 86 (-42.67%)
Mutual labels:  sh
Shc
Shell script compiler
Stars: ✭ 1,050 (+600%)
Mutual labels:  sh
bat
Battery management utility for Linux laptops.
Stars: ✭ 107 (-28.67%)
Mutual labels:  sh
octo-cli
A command line client covering 100% of GitHub's restful APIs.
Stars: ✭ 57 (-62%)
Mutual labels:  sh
Shbib
A BibTeX-centric bibliography manager written in POSIX shell
Stars: ✭ 26 (-82.67%)
Mutual labels:  sh
bin
another scripts repo
Stars: ✭ 18 (-88%)
Mutual labels:  sh
Colorechoforshell
Make 🐚(shell) 's 💬 (`echo`) to be 🌈 easily ✨ Support ✅ sh ➕ bash ➕ zsh ➕ ksh ➕ 🐟
Stars: ✭ 75 (-50%)
Mutual labels:  sh
BusinessCard
💳 My curl-able business card
Stars: ✭ 49 (-67.33%)
Mutual labels:  sh
Mrsh
A minimal POSIX shell
Stars: ✭ 381 (+154%)
Mutual labels:  sh
Domain Check 2
Domain Expiration Check Shell Script Forked and Maintained by nixCraft
Stars: ✭ 107 (-28.67%)
Mutual labels:  sh
Sh Exec
💻 Use `Template literals` write shell script made happy ❤️.
Stars: ✭ 95 (-36.67%)
Mutual labels:  sh
Goat
POSIX-compliant shell movement boosting hack for real ninjas (aka `cd x` and `cd ...`)
Stars: ✭ 27 (-82%)
Mutual labels:  sh

What is this project

This is a base system / early userspace for Linux.

The role of this project in a system is similar to that of busybox
in small custom distributions. Boot the system, load modules, mount
partitions, establish networking, provide basic services. It is aimed
primarily at personal devices running GUIs however.

The project builds into small statically-linked executables with no
external dependencies. There are no build-time library dependencies
either, not even libc. The tools can be built with any toolchain that
can build the kernel.

Supported targets: x86_64 arm aarch64 rv64 mips mips64 i386.
(anything else will not work even if toolchain is available)

This project should be mostly useful for people building their own
custom systems, distribution, or maybe even just looking for tools
to put into initrd.


Project status
~~~~~~~~~~~~~~
The project is ONGOING but not yet complete or even stable.
Components currently included in the package:

  * batch command runner / script interpreter (msh)
  * early-stage boot utils (switchroot, modprobe, mount)
  * block device locating tools (devinit, findblk)
  * block device encryption tools (passblk, dektool, deitool)
  - no fsck for any file system yet
  * system shutdown tool (reboot)

  * top-level process supervisor (svchub)

  * udev event monitor (udevmod)
  * syslog and related tools (sysklogd)

  * VT/DRI/input multiplexer (vtmux) and related tools

  * network interface monitor (ifmon)
  * Wi-Fi client and connection manager (wsupp) [WPA2-PSK only]
  * DHCP client (dhconf)
  * time synchronization (SNTP) service (timed)
  * manual/static interface setup tools (ip4cfg, ip4info) [incomplete]

  * simple interactive shell (cmd).
  * small linux-specific tools (systime, sync, dmesg etc).

  * application supervisors (apphub, ptyhub)

  - no package manager yet.
  - no audio tools of any kind.

With everything in place, the system should boot on kernel and minibase alone
to the point where it can run X or Wayland GUI, establish internet connection
and start downloading packages.


Quick start
~~~~~~~~~~~
Bootable images for QEMU (buildroot, minibase, Xorg, Weston) along
with the build scripts are maintained in a dedicated repository:

    https://github.com/arsv/minibase-br/

Get the latest sys-plain or sys-crypt from Releases, check included
instructions. Inspect the build scripts, rootfs and initrd contents
to understand how the system boots.

The images there tend to lag behind the master branch here.
However, those images should still give a pretty good idea of how
the whole thing is supposed to work.


How to build and run the tools

For a proper build, run

./configure
make
make install     # default DESTDIR is ./out

To try the tools without setting up a VM, configure and build the project in development mode:

./configure devel
make

Most tools can be run right from their source directories.

Run make clean when switching between devel and regular build to force the objects to be rebuilt with the new compiler flags.

To build only the tools from a particular directory:

make -C src/wifi
make -C src/wifi install

This should be run after configure.

Just how small exactly?

The largest individual executable so far is `wsupp`, the WPA supplicant.
Statically linked for x86_64, it's about 25 KiB in size. Realistically
it also needs `dhconf` (12 KiB) to work, and the client tool `wifi` (16 KiB).

`msh` is about 16 KiB. `cmd` (interactive shell) is about 18 KiB.
`svchub` (pid 1 for the majority of system's uptime) is under 10 KiB.
`vtmux` (logind equivalent) is about 12 KiB.

Why bother making it small? Because it's a side effect of making it readable
and debuggable. The idea is that anyone could pick a tool from minibase,
start reading it and gain complete understanding of how it works in a very
reasonable amount of time, say hours. And if necessary, audit or debug it
down to assembly level. A major point in achieving this is making sure
there are no unnecessary wrappers, useless abstractions or dead code,
which eventually translates into small executables.


Contributing
~~~~~~~~~~~~
This is not a community project. Do not send patches or pull requests.

If there's a bug to be fixed, or a tool that you think should be in minibase,
or a target to support, open an issue.

This will probably change around 1.0 release but not earlier.


Licensing
~~~~~~~~~
GNU Public License version 3, see COPYING.
Limited closed-box license may or may not get added in the future.

The code in lib/sys, lib/bits and lib/arch constitutes the public interface
of the Linux kernel. No claims are made for that code, and it should not be
copyrightable anyway. If unsure, grab corresponding fragments from either
the kernel sources (GPLv2) or the musl libc (MIT license).

The code in lib/crypto is mostly BSD-licensed. See README there.


Credits
~~~~~~~
Dietlibc and "Writing Small and Fast Software" by Felix von Leitner.
https://www.fefe.de/dietlibc/diet.pdf

The project was heavily influenced by busybox at early stages.
Certain decision from skarnet/s6 project also played significant role.
Syscall code (static inline functions with asm volatile blocks)
follows musl, because musl folks got it right.

The Rust coreutils project provided a great deal of inspiration,
specifically by showing how not to write coreutils.


See also
~~~~~~~~
https://busybox.net/
http://www.landley.net/toybox/
http://www.fefe.de/embutils/
http://skarnet.org/software/
http://suckless.org
http://jdebp.eu/Softwares/nosh/
http://b0llix.net/perp/
http://u-root.tk/
https://swtch.com/plan9port/

https://www.gnu.org/software/coreutils/coreutils.html
https://www.kernel.org/pub/linux/utils/util-linux/
https://github.com/uutils/coreutils

https://github.com/mit-pdos/xv6-public (userspace tools)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].