pine64.scm 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
  3. ;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch>
  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. (define-module (gnu system images pine64)
  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 (gnu packages certs)
  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 (pine64-barebones-os
  34. pine64-image-type
  35. pine64-barebones-raw-image))
  36. (define pine64-barebones-os
  37. (operating-system
  38. (host-name "vignemale")
  39. (timezone "Europe/Paris")
  40. (locale "en_US.utf8")
  41. (bootloader (bootloader-configuration
  42. (bootloader u-boot-pine64-lts-bootloader)
  43. (targets '("/dev/vda"))))
  44. (initrd-modules '())
  45. (kernel linux-libre-arm64-generic)
  46. (file-systems (cons (file-system
  47. (device (file-system-label "my-root"))
  48. (mount-point "/")
  49. (type "ext4"))
  50. %base-file-systems))
  51. (services (cons*
  52. (service agetty-service-type
  53. (agetty-configuration
  54. (extra-options '("-L")) ; no carrier detect
  55. (baud-rate "115200")
  56. (term "vt100")
  57. (tty "ttyS0")))
  58. (service dhcp-client-service-type)
  59. (service ntp-service-type)
  60. %base-services))
  61. (packages (cons nss-certs %base-packages))))
  62. (define pine64-image-type
  63. (image-type
  64. (name 'pine64-raw)
  65. (constructor (lambda (os)
  66. (image
  67. (inherit (raw-with-offset-disk-image))
  68. (operating-system os)
  69. (platform aarch64-linux))))))
  70. (define pine64-barebones-raw-image
  71. (image
  72. (inherit
  73. (os+platform->image pine64-barebones-os aarch64-linux
  74. #:type pine64-image-type))
  75. (name 'pine64-barebones-raw-image)))
  76. ;; Return the default image.
  77. pine64-barebones-raw-image