mirror of
https://github.com/systemd/systemd.git
synced 2025-01-03 05:18:09 +03:00
mkosi: Build a directory image by default
Both building and booting a directory image is much faster than building or booting a disk image so let's default to a directory image. In CI, we stick to a disk image to make sure that keeps working as well. The only extra dependency this introduces is virtiofsd which is packaged in all distributions except Debian stable. For users hacking on systemd on Debian stable, a disk image can be built by writing the following to mkosi.local.conf: ``` [Output] Format=disk ```
This commit is contained in:
parent
be89a76a46
commit
52842bb2c5
4
.github/workflows/mkosi.yml
vendored
4
.github/workflows/mkosi.yml
vendored
@ -85,6 +85,10 @@ jobs:
|
|||||||
Distribution=${{ matrix.distro }}
|
Distribution=${{ matrix.distro }}
|
||||||
Release=${{ matrix.release }}
|
Release=${{ matrix.release }}
|
||||||
|
|
||||||
|
[Output]
|
||||||
|
# Build a disk image in CI as this logic is much more prone to breakage.
|
||||||
|
Format=disk
|
||||||
|
|
||||||
[Content]
|
[Content]
|
||||||
Environment=CI_BUILD=1
|
Environment=CI_BUILD=1
|
||||||
SLOW_TESTS=true
|
SLOW_TESTS=true
|
||||||
|
@ -56,6 +56,23 @@ $ mkosi qemu
|
|||||||
Every time you rerun the `mkosi` command a fresh image is built, incorporating
|
Every time you rerun the `mkosi` command a fresh image is built, incorporating
|
||||||
all current changes you made to the project tree.
|
all current changes you made to the project tree.
|
||||||
|
|
||||||
|
By default a directory image is built. This requires `virtiofsd` to be installed
|
||||||
|
on the host. To build a disk image instead which does not require `virtiofsd`,
|
||||||
|
add the following to `mkosi.local.conf`:
|
||||||
|
|
||||||
|
```conf
|
||||||
|
[Output]
|
||||||
|
Format=disk
|
||||||
|
```
|
||||||
|
|
||||||
|
To boot in UEFI mode instead of using QEMU's direct kernel boot, add the following
|
||||||
|
to `mkosi.local.conf`:
|
||||||
|
|
||||||
|
```conf
|
||||||
|
[Host]
|
||||||
|
QemuFirmware=uefi
|
||||||
|
```
|
||||||
|
|
||||||
Putting this all together, here's a series of commands for preparing a patch
|
Putting this all together, here's a series of commands for preparing a patch
|
||||||
for systemd:
|
for systemd:
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ Environment=ASAN_OPTIONS=verify_asan_link_order=false
|
|||||||
@Incremental=yes
|
@Incremental=yes
|
||||||
@QemuMem=2G
|
@QemuMem=2G
|
||||||
@RuntimeSize=8G
|
@RuntimeSize=8G
|
||||||
|
ToolsTreePackages=virtiofsd
|
||||||
KernelCommandLineExtra=systemd.crash_shell
|
KernelCommandLineExtra=systemd.crash_shell
|
||||||
systemd.log_level=debug
|
systemd.log_level=debug
|
||||||
systemd.log_ratelimit_kmsg=0
|
systemd.log_ratelimit_kmsg=0
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
[Config]
|
[Config]
|
||||||
Dependencies=base
|
Dependencies=base
|
||||||
|
|
||||||
|
[Output]
|
||||||
|
@Format=directory
|
||||||
|
|
||||||
[Content]
|
[Content]
|
||||||
Autologin=yes
|
Autologin=yes
|
||||||
BaseTrees=../../mkosi.output/base
|
BaseTrees=../../mkosi.output/base
|
||||||
|
Loading…
Reference in New Issue
Block a user