Skip to content

Commit edb9808

Browse files
committed
Add installation instructions
Signed-off-by: Davide Cavalca <davide@cavalca.name>
1 parent ba11f78 commit edb9808

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@
22

33
binfmt-dispatcher is a simple dispatcher for [binfmt_misc](https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html) that dynamically picks the best interpreter to use at runtime.
44

5-
## Usage
5+
## Installation
6+
binfmt-dispatcher is packaged in Fedora as of Fedora Linux 40. It can be installed with:
7+
8+
```
9+
$ sudo dnf install binfmt-dispatcher
10+
```
11+
12+
which will automatically register it as a binfmt_misc handler via systemd and installer a basic configuration.
13+
14+
## Configuration
615
binfmt-dispatcher should be registered as a binfmt_misc handler. If using systemd, this is accomplished via [binfmt.d](https://www.freedesktop.org/software/systemd/man/latest/binfmt.d.html) (sample configs are provided for [x86](data/binfmt-dispatcher-x86.conf) and [x86-64](data/binfmt-dispatcher-x86-64.conf)). It is recommended to prefix the config with `zz-` or something akin to ensure it's parsed last, as systemd processes these in lexicographic order. After installing the config, remember to restart [systemd-binfmt.service](https://www.freedesktop.org/software/systemd/man/latest/systemd-binfmt.service.html) for it to take effect.
716

817
binfmt-dispatcher parses configuration from several sources:
@@ -13,4 +22,8 @@ binfmt-dispatcher parses configuration from several sources:
1322

1423
Configs are parsed in order and later settings win. A fully commented config is [provided](docs/binfmt-dispatcher.toml.example) and should be fairly self-explanatory.
1524

25+
## Usage
1626
When run as an interpreter, binfmt-dispatcher will parse the configs, pick the best interpreter to use based on it and the binary being run, and then run it. If enabled (via the `use_muvm` config setting), binfmt-dispatcher will use [muvm](https://github.com/AsahiLinux/muvm) to execute the interpreter in a microVM if the system page-size is not 4k.
27+
28+
## License
29+
This project is [MIT](https://spdx.org/licenses/MIT.html) licensed. See the [LICENSE](LICENSE) file for the full text of the license.

0 commit comments

Comments
 (0)