images: Add novena-image-type, novena-barebones-raw-image, novena-barebones-os.
[jackhill/guix/guix.git] / gnu / system / images / novena.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
3 ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
11 ;;;
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
16 ;;;
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
19
20 (define-module (gnu system images novena)
21 #:use-module (gnu bootloader)
22 #:use-module (gnu bootloader u-boot)
23 #:use-module (gnu image)
24 #:use-module (gnu packages linux)
25 #:use-module (gnu services)
26 #:use-module (gnu services base)
27 #:use-module (gnu system)
28 #:use-module (gnu system file-systems)
29 #:use-module (gnu system image)
30 #:use-module (srfi srfi-26)
31 #:export (novena-barebones-os
32 novena-image-type
33 novena-barebones-raw-image))
34
35 (define novena-barebones-os
36 (operating-system
37 (host-name "vignemale")
38 (timezone "Europe/Paris")
39 (locale "en_US.utf8")
40 (bootloader (bootloader-configuration
41 (bootloader u-boot-novena-bootloader)
42 (target "/dev/vda")))
43 (initrd-modules '("sdhci-esdhc-imx" "ahci_imx"))
44 ;(kernel linux-libre-arm-generic)
45 (file-systems (cons (file-system
46 (device (file-system-label "my-root"))
47 (mount-point "/")
48 (type "ext4"))
49 %base-file-systems))
50 (services (cons (service agetty-service-type
51 (agetty-configuration
52 (extra-options '("-L")) ; no carrier detect
53 (baud-rate "115200")
54 (term "vt100")
55 (tty "ttymxc1")))
56 %base-services))))
57
58 (define novena-image-type
59 (image-type
60 (name 'novena-raw)
61 (constructor (cut image-with-os arm32-disk-image <>))))
62
63 (define novena-barebones-raw-image
64 (image
65 (inherit
66 (os->image novena-barebones-os #:type novena-image-type))
67 (name 'novena-barebones-raw-image)))