rock64.scm 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
  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 rock64)
  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 services networking)
  26. #:use-module (gnu system)
  27. #:use-module (gnu system file-systems)
  28. #:use-module (gnu system image)
  29. #:use-module (srfi srfi-26)
  30. #:export (rock64-barebones-os
  31. rock64-image-type
  32. rock64-barebones-raw-image))
  33. (define rock64-barebones-os
  34. (operating-system
  35. (host-name "jiehkkevarri")
  36. (timezone "Europe/Oslo")
  37. (locale "en_US.utf8")
  38. (bootloader (bootloader-configuration
  39. (bootloader u-boot-rock64-rk3328-bootloader)
  40. (target "/dev/sda")))
  41. (initrd-modules '())
  42. (kernel linux-libre-arm64-generic)
  43. (file-systems (cons (file-system
  44. (device (file-system-label "my-root"))
  45. (mount-point "/")
  46. (type "ext4"))
  47. %base-file-systems))
  48. (services (append (list (service dhcp-client-service-type))
  49. %base-services))))
  50. (define rock64-image-type
  51. (image-type
  52. (name 'rock64-raw)
  53. (constructor (cut image-with-os (arm64-disk-image (expt 2 24)) <>))))
  54. (define rock64-barebones-raw-image
  55. (image
  56. (inherit
  57. (os->image rock64-barebones-os #:type rock64-image-type))
  58. (name 'rock64-barebones-raw-image)))
  59. rock64-barebones-raw-image