|
| 1 | +# mkosi-workspace is located on /var/tmp/ by default (why?), which is usually |
| 2 | +# persistent and slow storage which wears out. On success, mkosi-workspace is |
| 3 | +# deleted at the end of the build so it really does not need to be located on |
| 4 | +# persistent storage. So, move it to /tmp which is usually tmpfs. Moving to |
| 5 | +# tmpfs makes mkosi SEVERAL TIMES faster! |
| 6 | +# |
| 7 | +# If needed, a new @MkosiWorkspaceDirectory@ variable and option would |
| 8 | +# mitigate both issues below. |
| 9 | +# |
| 10 | +# Warning 1: mkosi-workspace needs emough space to hold the system image: a few |
| 11 | +# gigabytes. If you run out of /tmp space, either make it bigger (mount -o |
| 12 | +# remount,size=newsize after buying a decent amount of RAM), or comment this |
| 13 | +# out. |
| 14 | +# |
| 15 | +# Warning 2: mkosi version v15 and v16 cannot use /tmp/ for this. (cpio |
| 16 | +# error). Point at another tmpfs with a different name, cherry-pick |
| 17 | +# mkosi fix 28ccb67a92e, or comment this out. |
| 18 | +# |
| 19 | +# Pro-tip: symlink kernel/qbuild/ to /tmp too. A few more gigabytes required. |
| 20 | +# (some old mkosi versions nest their WorkspaceDir inside qbuild/ by default) |
| 21 | + |
| 22 | +[Output] |
| 23 | +# WorkspaceDirectory= (and others) were moved to the brand new [Build] |
| 24 | +# section in mkosi v25 commit ef5a79993e2. Fortunately, no version |
| 25 | +# before or after that mkosi commit seems to mind the duplicate (mkosi |
| 26 | +# versions < v15 don't seem to care about sections at all). So just |
| 27 | +# duplicate and forget about it. |
| 28 | +WorkspaceDirectory=/tmp/ |
| 29 | + |
| 30 | +[Build] |
| 31 | +WorkspaceDirectory=/tmp/ |
0 commit comments