rock64.scm 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 platforms arm)
  24. #:use-module (gnu services)
  25. #:use-module (gnu services base)
  26. #:use-module (gnu services networking)
  27. #:use-module (gnu system)
  28. #:use-module (gnu system file-systems)
  29. #:use-module (gnu system image)
  30. #:use-module (srfi srfi-26)
  31. #:export (rock64-barebones-os
  32. rock64-image-type
  33. rock64-barebones-raw-image))
  34. (define rock64-barebones-os
  35. (operating-system
  36. (host-name "jiehkkevarri")
  37. (timezone "Europe/Oslo")
  38. (locale "en_US.utf8")
  39. (bootloader (bootloader-configuration
  40. (bootloader u-boot-rock64-rk3328-bootloader)
  41. (targets '("/dev/sda"))))
  42. (initrd-modules '())
  43. (kernel linux-libre-arm64-generic)
  44. (file-systems (cons (file-system
  45. (device (file-system-label "my-root"))
  46. (mount-point "/")
  47. (type "ext4"))
  48. %base-file-systems))
  49. (services (append (list (service dhcp-client-service-type))
  50. %base-services))))
  51. (define rock64-image-type
  52. (image-type
  53. (name 'rock64-raw)
  54. (constructor (cut image-with-os
  55. (raw-with-offset-disk-image (expt 2 24))
  56. <>))))
  57. (define rock64-barebones-raw-image
  58. (image
  59. (inherit
  60. (os+platform->image rock64-barebones-os aarch64-linux
  61. #:type rock64-image-type))
  62. (name 'rock64-barebones-raw-image)))
  63. rock64-barebones-raw-image