summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-01-13 23:39:52 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-01-13 23:45:53 -0500
commit01f0707207741ce2a5d7509a175464799b08aea6 (patch)
tree08e8f4da56f26363c3b53e0442a21b286b55e0e5 /gnu/system
parent734bcf13139119daf8685f93b056c3422dbfa264 (diff)
parent6985a1acb3e9cc4cad8b6f63d77154842d25c929 (diff)
downloadguix-patches-01f0707207741ce2a5d7509a175464799b08aea6.tar
guix-patches-01f0707207741ce2a5d7509a175464799b08aea6.tar.gz
Merge branch 'staging' into 'core-updates'.
Conflicts: gnu/local.mk gnu/packages/cmake.scm gnu/packages/curl.scm gnu/packages/gl.scm gnu/packages/glib.scm gnu/packages/guile.scm gnu/packages/node.scm gnu/packages/openldap.scm gnu/packages/package-management.scm gnu/packages/python-xyz.scm gnu/packages/python.scm gnu/packages/tls.scm gnu/packages/vpn.scm gnu/packages/xorg.scm
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/image.scm4
-rw-r--r--gnu/system/images/novena.scm61
-rw-r--r--gnu/system/install.scm18
-rw-r--r--gnu/system/linux-initrd.scm16
4 files changed, 94 insertions, 5 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 4972d9067b..67930750d5 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -560,7 +560,9 @@ to OS. Also set the UUID and the size of the root partition."
"Return an operating-system based on the one specified in IMAGE, but
suitable for image creation. Assign an UUID to the root file-system, so that
it can be used for bootloading."
- (define volatile-root? (image-volatile-root? image))
+ (define volatile-root? (if (eq? (image-format image) 'iso9660)
+ #t
+ (image-volatile-root? image)))
(define (root-uuid os)
;; UUID of the root file system, computed in a deterministic fashion.
diff --git a/gnu/system/images/novena.scm b/gnu/system/images/novena.scm
new file mode 100644
index 0000000000..c4d25e850e
--- /dev/null
+++ b/gnu/system/images/novena.scm
@@ -0,0 +1,61 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu system images novena)
+ #:use-module (gnu bootloader)
+ #:use-module (gnu bootloader u-boot)
+ #:use-module (gnu image)
+ #:use-module (gnu packages linux)
+ #:use-module (gnu services)
+ #:use-module (gnu services base)
+ #:use-module (gnu system)
+ #:use-module (gnu system file-systems)
+ #:use-module (gnu system image)
+ #:use-module (srfi srfi-26)
+ #:export (novena-barebones-os
+ novena-image-type
+ novena-barebones-raw-image))
+
+(define novena-barebones-os
+ (operating-system
+ (host-name "vignemale")
+ (timezone "Europe/Paris")
+ (locale "en_US.utf8")
+ (bootloader (bootloader-configuration
+ (bootloader u-boot-novena-bootloader)
+ (target "/dev/vda")))
+ (initrd-modules '("sdhci-esdhc-imx" "ahci_imx" "i2c-dev"))
+ ;(kernel linux-libre-arm-generic)
+ (kernel-arguments '("console=ttymxc1,115200"))
+ (file-systems (cons (file-system
+ (device (file-system-label "my-root"))
+ (mount-point "/")
+ (type "ext4"))
+ %base-file-systems))))
+
+(define novena-image-type
+ (image-type
+ (name 'novena-raw)
+ (constructor (cut image-with-os arm32-disk-image <>))))
+
+(define novena-barebones-raw-image
+ (image
+ (inherit
+ (os->image novena-barebones-os #:type novena-image-type))
+ (name 'novena-barebones-raw-image)))
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 7701297411..e753463473 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
@@ -34,6 +34,7 @@
#:use-module ((guix store) #:select (%store-prefix))
#:use-module (gnu installer)
#:use-module (gnu system locale)
+ #:use-module (gnu services avahi)
#:use-module (gnu services dbus)
#:use-module (gnu services networking)
#:use-module (gnu services shepherd)
@@ -175,6 +176,13 @@ manual."
(shepherd-service-type
'cow-store
(lambda _
+ (define (import-module? module)
+ ;; Since we don't use deduplication support in 'populate-store', don't
+ ;; import (guix store deduplication) and its dependencies, which
+ ;; includes Guile-Gcrypt.
+ (and (guix-module-name? module)
+ (not (equal? module '(guix store deduplication)))))
+
(shepherd-service
(requirement '(root-file-system user-processes))
(provision '(cow-store))
@@ -189,7 +197,8 @@ the given target.")
,@%default-modules))
(start
(with-imported-modules (source-module-closure
- '((gnu build install)))
+ '((gnu build install))
+ #:select? import-module?)
#~(case-lambda
((target)
(mount-cow-store target #$%backing-directory)
@@ -335,6 +344,10 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
;; The usual services.
(syslog-service)
+ ;; Use the Avahi daemon to discover substitute servers on the local
+ ;; network. It can be faster than fetching from remote servers.
+ (service avahi-service-type)
+
;; The build daemon. Register the default substitute server key(s)
;; as trusted to allow the installation process to use substitutes by
;; default.
@@ -435,6 +448,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m
(host-name "gnu")
(timezone "Europe/Paris")
(locale "en_US.utf8")
+ (name-service-switch %mdns-host-lookup-nss)
(bootloader (bootloader-configuration
(bootloader grub-bootloader)
(target "/dev/sda")))
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 85e493fecb..c6ba9bb560 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2016 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2017, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -76,12 +76,20 @@ the derivations referenced by EXP are automatically copied to the initrd."
(define init
(program-file "init" exp #:guile guile))
+ (define (import-module? module)
+ ;; Since we don't use deduplication support in 'populate-store', don't
+ ;; import (guix store deduplication) and its dependencies, which includes
+ ;; Guile-Gcrypt. That way we can run tests with '--bootstrap'.
+ (and (guix-module-name? module)
+ (not (equal? module '(guix store deduplication)))))
+
(define builder
;; Do not use "guile-zlib" extension here, otherwise it would drag the
;; non-static "zlib" package to the initrd closure. It is not needed
;; anyway because the modules are stored uncompressed within the initrd.
(with-imported-modules (source-module-closure
- '((gnu build linux-initrd)))
+ '((gnu build linux-initrd))
+ #:select? import-module?)
#~(begin
(use-modules (gnu build linux-initrd))
@@ -260,6 +268,9 @@ FILE-SYSTEMS."
file-systems)
(list fatfsck/static)
'())
+ ,@(if (find (file-system-type-predicate "bcachefs") file-systems)
+ (list bcachefs-tools/static)
+ '())
,@(if (find (file-system-type-predicate "btrfs") file-systems)
(list btrfs-progs/static)
'())
@@ -295,6 +306,7 @@ FILE-SYSTEMS."
;; Given a file system type, return the list of modules it needs.
(lookup-procedure ("cifs" => '("md4" "ecb" "cifs"))
("9p" => '("9p" "9pnet_virtio"))
+ ("bcachefs" => '("bcachefs"))
("btrfs" => '("btrfs"))
("iso9660" => '("isofs"))
("jfs" => '("jfs"))