novena.scm 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
  3. ;;; Copyright © 2020 Danny Milosavljevic <dannym@scratchpost.org>
  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 novena)
  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 platforms arm)
  25. #:use-module (gnu services)
  26. #:use-module (gnu services base)
  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 (novena-barebones-os
  32. novena-image-type
  33. novena-barebones-raw-image))
  34. (define novena-barebones-os
  35. (operating-system
  36. (host-name "vignemale")
  37. (timezone "Europe/Paris")
  38. (locale "en_US.utf8")
  39. (bootloader (bootloader-configuration
  40. (bootloader u-boot-novena-bootloader)
  41. (targets '("/dev/vda"))))
  42. (initrd-modules '("sdhci-esdhc-imx" "ahci_imx" "i2c-dev"))
  43. ;(kernel linux-libre-arm-generic)
  44. (kernel-arguments '("console=ttymxc1,115200"))
  45. (file-systems (cons (file-system
  46. (device (file-system-label "my-root"))
  47. (mount-point "/")
  48. (type "ext4"))
  49. %base-file-systems))))
  50. (define novena-image-type
  51. (image-type
  52. (name 'novena-raw)
  53. (constructor (cut image-with-os (raw-with-offset-disk-image) <>))))
  54. (define novena-barebones-raw-image
  55. (image
  56. (inherit
  57. (os+platform->image novena-barebones-os armv7-linux
  58. #:type novena-image-type))
  59. (name 'novena-barebones-raw-image)))
  60. ;; Return the default image.
  61. novena-barebones-raw-image