summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorHilton Chain <hako@ultrarare.space>2025-05-14 21:35:31 +0800
committerHilton Chain <hako@ultrarare.space>2025-05-24 08:57:11 +0800
commitce267b3765ef1a6177971aa0042deaeec750ea97 (patch)
tree89aeb540e88c85faa6e3d81fa5d5d72a2f2d8f2a /gnu/system.scm
parent976354370340b29fdfac2d4129b27fd12fa30b49 (diff)
system: Set "rootfstype" for tmpfs root file system.
This commit adds configuration for tmpfs root file system. Since there's no file system information in boot parameters, not all tmpfs cases are handled. * gnu/system.scm (bootable-kernel-arguments): Check root file system for tmpfs and set "rootfstype". Change-Id: Ib14f6a9e4040535b3412ca9efa7e9b65c1dc8b39
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm21
1 files changed, 15 insertions, 6 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 2beca4b6d0..a4e70f164a 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -208,12 +208,21 @@ VERSION is the target version of the boot-parameters record."
(let ((root (file-system-device->string root-device
#:uuid-type 'dce)))
(append
- (if (string=? root "none")
- '() ; Ignore the case where the root is "none" (typically tmpfs).
- ;; Note: Always use the DCE format because that's what
- ;; (gnu build linux-boot) expects for the 'root'
- ;; kernel command-line option.
- (list (string-append (if version>0? "root=" "--root=") root)))
+ (cond
+ ((string=? root "tmpfs")
+ ;; Required when using tmpfs as root file system.
+ ;; TODO: Include file system information in boot parameters, so that we
+ ;; can detect tmpfs by file system type instead of device name here.
+ '("rootfstype=tmpfs"))
+ ((string=? root "none")
+ ;; Ignore unhandled cases where the root is "none". This requires the
+ ;; user to set correct arguments.
+ '())
+ (else
+ ;; Note: Always use the DCE format because that's what
+ ;; (gnu build linux-boot) expects for the 'root'
+ ;; kernel command-line option.
+ (list (string-append (if version>0? "root=" "--root=") root))))
(list #~(string-append (if #$version>0? "gnu.system=" "--system=") #$system)
#~(string-append (if #$version>0? "gnu.load=" "--load=")
#$system "/boot")))))