projects/guix·blob python-team · refs

77 lines · 2.9 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2020 Mathieu Othacehe <[email protected]>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu system images pinebook-pro)
20 #:use-module (gnu bootloader)
21 #:use-module (gnu bootloader u-boot)
22 #:use-module (gnu image)
23 #:use-module (gnu packages linux)
24 #:use-module (guix platforms arm)
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 (pinebook-pro-barebones-os
32 pinebook-pro-image-type
33 pinebook-pro-barebones-raw-image))
34
35(define pinebook-pro-barebones-os
36 (operating-system
37 (host-name "viso")
38 (timezone "Europe/Paris")
39 (locale "en_US.utf8")
40 (bootloader (bootloader-configuration
41 (bootloader u-boot-pinebook-pro-rk3399-bootloader)
42 (targets '("/dev/vda"))))
43 (initrd-modules '())
44 (kernel linux-libre-arm64-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 "1500000")
54 (term "vt100")
55 (tty "ttyS2")))
56 %base-services))))
57
58(define pinebook-pro-image-type
59 (image-type
60 (name 'pinebook-pro-raw)
61 (constructor (lambda (os)
62 (image
63 (inherit
64 (raw-with-offset-disk-image (* 16 (expt 2 20)))) ;16MiB
65 (name 'pinebook-pro-disk-image)
66 (operating-system os)
67 (platform aarch64-linux))))))
68
69(define pinebook-pro-barebones-raw-image
70 (image
71 (inherit
72 (os+platform->image pinebook-pro-barebones-os aarch64-linux
73 #:type pinebook-pro-image-type))
74 (name 'pinebook-pro-barebones-raw-image)))
75
76;; Return the default image.
77pinebook-pro-barebones-raw-image