summary refs log tree commit diff
path: root/gnu/system
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/file-systems.scm5
-rw-r--r--gnu/system/grub.scm57
-rw-r--r--gnu/system/linux-initrd.scm6
-rw-r--r--gnu/system/linux.scm3
4 files changed, 44 insertions, 27 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 8155b273e3..0a4b385fe3 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -99,9 +99,8 @@
                     (default #t))
   (create-mount-point? file-system-create-mount-point? ; Boolean
                        (default #f))
-  (dependencies     file-system-dependencies      ; list of strings (mount
-                                                  ; points depended on)
-                    (default '())))
+  (dependencies     file-system-dependencies      ; list of <file-system>
+                    (default '())))               ; or <mapped-device>
 
 (define-inlinable (file-system-needed-for-boot? fs)
   "Return true if FS has the 'needed-for-boot?' flag set, or if it's the root
diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm
index e49b6dbe54..4c21851cb6 100644
--- a/gnu/system/grub.scm
+++ b/gnu/system/grub.scm
@@ -30,6 +30,7 @@
   #:autoload   (gnu packages imagemagick) (imagemagick)
   #:autoload   (gnu packages compression) (gzip)
   #:use-module (ice-9 match)
+  #:use-module (ice-9 regex)
   #:use-module (srfi srfi-1)
   #:export (grub-image
             grub-image?
@@ -152,10 +153,26 @@ WIDTH/HEIGHT, or #f if none was found."
         (with-monad %store-monad
           (return #f)))))
 
-(define (eye-candy config port)
+(define (eye-candy config system port)
   "Return in %STORE-MONAD a gexp that writes to PORT (a port-valued gexp) the
 'grub.cfg' part concerned with graphics mode, background images, colors, and
 all that."
+  (define setup-gfxterm-body
+    ;; Intel systems need to be switched into graphics mode, whereas most
+    ;; other modern architectures have no other mode and therefore don't need
+    ;; to be switched.
+    (if (string-match "^(x86_64|i[3-6]86)-" system)
+        "
+  # Leave 'gfxmode' to 'auto'.
+  insmod vbe
+  insmod vga
+  insmod video_bochs
+  insmod video_cirrus
+  insmod gfxterm
+  terminal_output gfxterm
+"
+        ""))
+
   (define (theme-colors type)
     (let* ((theme  (grub-configuration-theme config))
            (colors (type theme)))
@@ -163,22 +180,15 @@ all that."
                      (symbol->string (assoc-ref colors 'bg)))))
 
   (mlet* %store-monad ((image (grub-background-image config)))
-    (return (and image #~(format #$port "
-function load_video {
-  insmod vbe
-  insmod vga
-  insmod video_bochs
-  insmod video_cirrus
-}
+    (return (and image
+                 #~(format #$port "
+function setup_gfxterm {~a}
 
 # Set 'root' to the partition that contains /gnu/store.
 search --file --set ~a/share/grub/unicode.pf2
 
 if loadfont ~a/share/grub/unicode.pf2; then
-  set gfxmode=640x480
-  load_video
-  insmod gfxterm
-  terminal_output gfxterm
+  setup_gfxterm
 fi
 
 insmod png
@@ -189,10 +199,11 @@ else
   set menu_color_normal=cyan/blue
   set menu_color_highlight=white/blue
 fi~%"
-                        #$grub #$grub
-                        #$image
-                        #$(theme-colors grub-theme-color-normal)
-                        #$(theme-colors grub-theme-color-highlight))))))
+                           #$setup-gfxterm-body
+                           #$grub #$grub
+                           #$image
+                           #$(theme-colors grub-theme-color-normal)
+                           #$(theme-colors grub-theme-color-highlight))))))
 
 
 ;;;
@@ -206,6 +217,11 @@ fi~%"
   "Return the GRUB configuration file corresponding to CONFIG, a
 <grub-configuration> object.  OLD-ENTRIES is taken to be a list of menu
 entries corresponding to old generations of the system."
+  (define linux-image-name
+    (if (string-prefix? "mips" system)
+        "vmlinuz"
+        "bzImage"))
+
   (define all-entries
     (append entries (grub-configuration-menu-entries config)))
 
@@ -214,16 +230,17 @@ entries corresponding to old generations of the system."
      (($ <menu-entry> label linux arguments initrd)
       #~(format port "menuentry ~s {
   # Set 'root' to the partition that contains the kernel.
-  search --file --set ~a/bzImage~%
+  search --file --set ~a/~a~%
 
-  linux ~a/bzImage ~a
+  linux ~a/~a ~a
   initrd ~a
 }~%"
                 #$label
-                #$linux #$linux (string-join (list #$@arguments))
+                #$linux #$linux-image-name
+                #$linux #$linux-image-name (string-join (list #$@arguments))
                 #$initrd))))
 
-  (mlet %store-monad ((sugar (eye-candy config #~port)))
+  (mlet %store-monad ((sugar (eye-candy config system #~port)))
     (define builder
       #~(call-with-output-file #$output
           (lambda (port)
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 519373fe34..6130e020c8 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -178,11 +178,13 @@ loaded at boot time in the order in which they appear."
   (define linux-modules
     ;; Modules added to the initrd and loaded from the initrd.
     `("ahci"                                  ;for SATA controllers
-      "pata_acpi" "pata_atiixp"               ;for ATA controllers
-      "isci"                              ;for SAS controllers like Intel C602
       "usb-storage" "uas"                     ;for the installation image etc.
       "usbkbd" "usbhid"                       ;USB keyboards, for debugging
       "dm-crypt" "xts"                        ;for encrypted root partitions
+      ,@(if (string-match "^(x86_64|i[3-6]86)-" (%current-system))
+            '("pata_acpi" "pata_atiixp"    ;for ATA controllers
+              "isci")                      ;for SAS controllers like Intel C602
+            '())
       ,@(if (or virtio? qemu-networking?)
             virtio-modules
             '())
diff --git a/gnu/system/linux.scm b/gnu/system/linux.scm
index cd14bc97be..487d379e65 100644
--- a/gnu/system/linux.scm
+++ b/gnu/system/linux.scm
@@ -182,8 +182,7 @@ authenticate to run COMMAND."
           ;; These programs are setuid-root.
           (map (cut unix-pam-service <>
                     #:allow-empty-passwords? allow-empty-passwords?)
-               '("su" "passwd" "sudo"
-                 "xlock" "xscreensaver"))
+               '("su" "passwd" "sudo"))
 
           ;; These programs are not setuid-root, and we want root to be able
           ;; to run them without having to authenticate (notably because