diff options
author | Tobias Geerinckx-Rice <me@tobias.gr> | 2023-08-20 02:00:00 +0200 |
---|---|---|
committer | Tobias Geerinckx-Rice <me@tobias.gr> | 2024-09-01 02:00:00 +0200 |
commit | c04d489e772206b27e90681addfa2b578d4ebb89 (patch) | |
tree | d730b400fa1511228b377ac069de3b3fcae16877 | |
parent | a3bf62f4409ce492cf4205d385d1868dd7ceb8a4 (diff) |
x add make-squashfs-image
-rw-r--r-- | gnu/build/image.scm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/build/image.scm b/gnu/build/image.scm index 6ca0a428e0..349ac8dcf5 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -101,6 +101,22 @@ turn doesn't take any constant overhead into account, force a 1-MiB minimum." (estimate-partition-size root) size))))))) +(define* (make-squashfs-image partition target root + #:key + (owner-uid 0) + (owner-gid 0)) + "Handle the creation of Squashfs partition images. +See 'make-partition-image'." + (let ((fs (partition-file-system partition)) + (fs-options (partition-file-system-options partition))) + (apply invoke + `("fakeroot" "gensquashfs" "-D" ,root + "-j1" "-b" ,(number->string (ash 1 20)) + "-u" ,owner-uid "-g" ,owner-gid + "-c" "zstd" + ,@fs-options + ,target)))) + (define* (make-vfat-image partition target root fs-bits) "Handle the creation of VFAT partition images. See 'make-partition-image'." (let ((size (partition-size partition)) @@ -139,6 +155,8 @@ ROOT directory to populate the image." (cond ((string-prefix? "ext" type) (make-ext-image partition target root)) + ((string=? "squashfs" type) + (make-squashfs-image partition target root)) ((or (string=? type "vfat") (string=? type "fat16")) (make-vfat-image partition target root 16)) ((string=? type "fat32") |