;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Mathieu Othacehe ;;; ;;; 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 . (define-module (nongnu system images pinephone-pro) #:use-module (gnu bootloader) #:use-module (gnu bootloader u-boot) #:use-module (gnu image) #:use-module (nongnu packages linux) #:use-module (nongnu packages bootloaders) #:use-module (guix platforms arm) #:use-module (gnu services) #:use-module (gnu services base) #:use-module (gnu services networking) #:use-module (gnu services ssh) #:use-module (gnu system) #:use-module (gnu system file-systems) #:use-module (gnu system image) #:use-module (srfi srfi-26) #:export (quartz64-a-raw-image quartz64-image-type quartz64-barebones-raw-image)) (define pinephone-pro-barebone-os (operating-system (host-name "viso") (timezone "Europe/Paris") (locale "en_US.utf8") (bootloader (bootloader-configuration (bootloader u-boot-pinephone-pro-rk3399-bootloader) (targets '("/dev/vda")))) (initrd-modules '()) (kernel linux-pinephone-pro) (file-systems (append (list (file-system (device (file-system-label "root")) (mount-point "/") (type "ext4"))) %base-file-systems)) (swap-devices (list (swap-space (target "/run/swapfile")))) (services (append (list (service agetty-service-type (agetty-configuration (extra-options '("-L")) ; no carrier detect (baud-rate "1500000") (term "vt100") (tty "ttyS2"))) (service dhcp-client-service-type) (service ntp-service-type) (service openssh-service-type)) %base-services)))) (define pinephone-pro-image-type (image-type (name 'pinephone-pro-raw) (constructor (lambda (os) (image (inherit (raw-with-offset-disk-image (* 32 (expt 2 20)))) ; 32MiB (operating-system os) (platform aarch64-linux)))))) (define pinephone-pro-barebones-raw-image (image (inherit (os+platform->image pinephone-pro-barebone-os aarch64-linux #:type pinephone-pro-image-type)) (name 'quartz-barebones-raw-image))) ;; Return the default image. pinephone-pro-barebones-raw-image