summary refs log tree commit diff
path: root/gnu/system
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-03-06 11:28:53 +0100
committerMathieu Othacehe <m.othacehe@gmail.com>2019-06-25 21:38:42 +0200
commitfdbf4447bc028e6cc658a383ec338a1d3db61a56 (patch)
tree9f86d0b3b1255a9f40c5a76f3e179743c8df51c1 /gnu/system
parentd8dbfbce60a6df9cf87ede8c0454f1b2214e80a7 (diff)
downloadguix-fdbf4447bc028e6cc658a383ec338a1d3db61a56.tar.gz
linux-initrd: Fix cross compilation.
* gnu/system/linux-initrd.scm (default-initrd-modules): Check system name
against %current-target-system first in case we are cross-compiling.
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/linux-initrd.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 656afd1ddb..c90b87c023 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -273,7 +273,10 @@ FILE-SYSTEMS."
   (append-map (compose file-system-type-modules file-system-type)
               file-systems))
 
-(define* (default-initrd-modules #:optional (system (%current-system)))
+(define* (default-initrd-modules
+           #:optional
+           (system (or (%current-target-system)
+                       (%current-system))))
   "Return the list of modules included in the initrd by default."
   (define virtio-modules
     ;; Modules for Linux para-virtualized devices, for use in QEMU guests.