summaryrefslogtreecommitdiff
path: root/gnu/system
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/system')
-rw-r--r--gnu/system/images/rock-4c-plus.scm81
1 files changed, 81 insertions, 0 deletions
diff --git a/gnu/system/images/rock-4c-plus.scm b/gnu/system/images/rock-4c-plus.scm
new file mode 100644
index 00000000000..d669e3a163b
--- /dev/null
+++ b/gnu/system/images/rock-4c-plus.scm
@@ -0,0 +1,81 @@
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
3;;; Copyright © 2025 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.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 rock-4c-plus)
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 (guix platforms arm)
26 #:use-module (gnu services)
27 #:use-module (gnu services base)
28 #:use-module (gnu services networking)
29 #:use-module (gnu system)
30 #:use-module (gnu system file-systems)
31 #:use-module (gnu system image)
32 #:use-module (srfi srfi-26)
33 #:export (rock-4c-plus-barebones-os
34 rock-4c-plus-image-type
35 rock-4c-plus-barebones-raw-image))
36
37(define rock-4c-plus-barebones-os
38 (operating-system
39 (host-name "huesca")
40 (timezone "Europe/Madrid")
41 (locale "en_US.utf8")
42 (bootloader (bootloader-configuration
43 (bootloader u-boot-rock-4c-plus-rk3399-bootloader)
44 (targets '("/dev/sda"))))
45 (initrd-modules '())
46 (kernel linux-libre-arm64-generic)
47 (file-systems (cons (file-system
48 (device (file-system-label "my-root"))
49 (mount-point "/")
50 (type "ext4"))
51 %base-file-systems))
52 (services (append (list
53 (service
54 agetty-service-type
55 (agetty-configuration
56 (extra-options '("-L")) ;no carrier detect
57 ;; Upstream u-boot uses 1500000 as well, so the
58 ;; u-boot-rock-4c-plus-rk3399 inherit it too.
59 (baud-rate "1500000")
60 (term "vt100")
61 (tty "ttyS2")))
62 (service dhcpcd-service-type))
63 %base-services))))
64
65(define rock-4c-plus-image-type
66 (image-type
67 (name 'rock-4c-plus-raw)
68 (constructor (lambda (os)
69 (image
70 (inherit (raw-with-offset-disk-image (expt 2 24)))
71 (operating-system os)
72 (platform aarch64-linux))))))
73
74(define rock-4c-plus-barebones-raw-image
75 (image
76 (inherit
77 (os+platform->image rock-4c-plus-barebones-os aarch64-linux
78 #:type rock-4c-plus-image-type))
79 (name 'rock-4c-plus-barebones-raw-image)))
80
81rock-4c-plus-barebones-raw-image