2023-11-06 18:42:01 +00:00
|
|
|
# osi-tools: Operating System Image Tools
|
|
|
|
|
2023-12-13 03:23:30 +00:00
|
|
|
<!--
|
|
|
|
Copyright (C) 2018 Luke Shumaker
|
2024-01-04 22:16:23 +00:00
|
|
|
Copyright (C) 2023-2024 Umorpha Systems
|
2023-12-13 03:23:30 +00:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
-->
|
|
|
|
|
2023-11-06 18:42:01 +00:00
|
|
|
## Usage
|
|
|
|
|
2024-01-04 22:16:23 +00:00
|
|
|
$ ./bin/osi-mk [FLAGS] SYS.img # to build an image
|
|
|
|
$ ./bin/osi-shell SYS.img # launch an interactive shell in an emulator
|
|
|
|
$ sudo ./bin/osi-mount --{root|user} SYS.img MNT COMMAND # run command with SYS.img mounted at MNT
|
|
|
|
$ sudo ./bin/osi-extract SYS.img IMAGE_SRC_DIR HOST_DST_DIR # to extract files from an image
|
2023-11-06 18:42:01 +00:00
|
|
|
|
|
|
|
## Dependencies
|
|
|
|
|
|
|
|
I believe the complete list of dependencies is (along with what I
|
|
|
|
believe is the newest feature that is depended on):
|
|
|
|
|
|
|
|
- arch-install-scripts
|
|
|
|
- btrfs-progs
|
|
|
|
- GNU Bash 4.4 (needs `@Q`)
|
|
|
|
- GNU coretutils 8.15 (needs `realpath`)
|
|
|
|
- GNU gettext
|
|
|
|
- QEMU (needs `qemu-system-x86_64`)
|
|
|
|
- sed
|
|
|
|
- sudo
|
|
|
|
- util-linux-ng 2.18 or newer (needs automatic loop devices in `mount`)
|
|
|
|
|
|
|
|
This can be install on a Parabola Parabola GNU/Linux-libre system with
|
|
|
|
the following command:
|
|
|
|
|
|
|
|
sudo pacman -S --needed arch-install-scripts btrfs-progs bash coreutils gettext qemu-system-x86 sed sudo util-linux
|
|
|
|
|
2024-01-05 02:13:25 +00:00
|
|
|
The tests require
|
|
|
|
|
|
|
|
- BATS
|
|
|
|
- bats-support
|
|
|
|
- bats-assert
|
|
|
|
- bats-file
|
|
|
|
|
2023-11-06 18:42:01 +00:00
|
|
|
## Developing
|
|
|
|
|
|
|
|
You can lint the code in this repository by running `make lint`, which
|
|
|
|
requires the `shellcheck` command.
|
2024-02-14 15:22:53 +00:00
|
|
|
|
|
|
|
The tests can run in parallel, obeying Make's `-j`/`--jobs` flag.
|
|
|
|
Some of the tests write several gigabytes to `$TMPDIR`; 3GB of space
|
|
|
|
on `$TMPDIR` is plenty when run serially, but is not enough when run
|
|
|
|
in parallel.
|