pinebook-pro.scm 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
  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. (define-module (gnu system images pinebook-pro)
  19. #:use-module (gnu bootloader)
  20. #:use-module (gnu bootloader u-boot)
  21. #:use-module (gnu image)
  22. #:use-module (gnu packages linux)
  23. #:use-module (gnu services)
  24. #:use-module (gnu services base)
  25. #:use-module (gnu system)
  26. #:use-module (gnu system file-systems)
  27. #:use-module (gnu system image)
  28. #:use-module (srfi srfi-26)
  29. #:export (pinebook-pro-barebones-os
  30. pinebook-pro-image-type
  31. pinebook-pro-barebones-raw-image))
  32. (define pinebook-pro-barebones-os
  33. (operating-system
  34. (host-name "viso")
  35. (timezone "Europe/Paris")
  36. (locale "en_US.utf8")
  37. (bootloader (bootloader-configuration
  38. (bootloader u-boot-pinebook-pro-rk3399-bootloader)
  39. (target "/dev/vda")))
  40. (initrd-modules '())
  41. (kernel linux-libre-arm64-generic)
  42. (file-systems (cons (file-system
  43. (device (file-system-label "my-root"))
  44. (mount-point "/")
  45. (type "ext4"))
  46. %base-file-systems))
  47. (services (cons (service agetty-service-type
  48. (agetty-configuration
  49. (extra-options '("-L")) ; no carrier detect
  50. (baud-rate "115200")
  51. (term "vt100")
  52. (tty "ttyS2")))
  53. %base-services))))
  54. (define pinebook-pro-image-type
  55. (image-type
  56. (name 'pinebook-pro-raw)
  57. (constructor (cut image-with-os
  58. (arm64-disk-image (* 9 (expt 2 20))) ;9MiB
  59. <>))))
  60. (define pinebook-pro-barebones-raw-image
  61. (image
  62. (inherit
  63. (os->image pinebook-pro-barebones-os #:type pinebook-pro-image-type))
  64. (name 'pinebook-pro-barebones-raw-image)))
  65. ;; Return the default image.
  66. pinebook-pro-barebones-raw-image