diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-10-17 16:03:42 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-10-20 12:43:57 +0200 |
commit | ee7304df5d23aa43beac28d1ac60bd53f37f3854 (patch) | |
tree | 320db3ac20f90f970632aa3d27607b080b8e4c5a /docs/HACKING.md | |
parent | Merge pull request #29595 from YHNdnzj/systemctl-failed-system (diff) | |
download | systemd-ee7304df5d23aa43beac28d1ac60bd53f37f3854.tar.xz systemd-ee7304df5d23aa43beac28d1ac60bd53f37f3854.zip |
mkosi: Use RuntimeTrees= to mount sources
Instead of using ExtraTrees=, let's use the new RuntimeTrees= option
to mount the full repository into the VM/container. Let's also store
the sources under /usr/src/systemd and update the gdbinit file and
vscode HACKING guide section to match the new location.
Diffstat (limited to 'docs/HACKING.md')
-rw-r--r-- | docs/HACKING.md | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/docs/HACKING.md b/docs/HACKING.md index fb7caac93c..0178a43dba 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -234,16 +234,17 @@ QEMU. To allow VSCode's debugger to attach to systemd running in a mkosi image, we have to make sure it can access the virtual machine spawned by mkosi where systemd is running. mkosi makes this possible via a handy SSH option that makes the generated image accessible via SSH when booted. Thus you must build the image with -`mkosi --ssh`. The easiest way to set the option is to create a file 20-local.conf in mkosi.conf.d/ (in the -directory you ran mkosi in) and add the following contents: +`mkosi --ssh`. The easiest way to set the option is to create a file `mkosi.conf` in the root of the +repository and add the following contents: ``` [Host] Ssh=yes +RuntimeTrees=. ``` Also make sure that the SSH agent is running on your system and that you've added your SSH key to it with -`ssh-add`. +`ssh-add`. Also make sure that `virtiofsd` is installed. After rebuilding the image and booting it with `mkosi qemu`, you should now be able to connect to it by running `mkosi ssh` from the same directory in another terminal window. @@ -284,14 +285,10 @@ the directory, and add the following contents: }, "MIMode": "gdb", "sourceFileMap": { - "/work/build/../src": { + "/root/src/systemd": { "editorPath": "${workspaceFolder}", "useForBreakpoints": false }, - "/work/build/*": { - "editorPath": "${workspaceFolder}/mkosi.builddir", - "useForBreakpoints": false - } } } ] |