Mirror of GNU Guix
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
4.1 KiB

Remove traces of "GuixSD". * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove mentions of "GuixSD". * gnu/bootloader/grub.scm (install-grub-efi): Likewise. * gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to "Guix_image". (initialize-hard-disk): Search for the "Guix_image" label. * gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD". * gnu/installer/newt/welcome.scm (run-welcome-page): Likewise. * gnu/packages/audio.scm (supercollider)[description]: Likewise. * gnu/packages/curl.scm (curl): Likewise. * gnu/packages/emacs.scm (emacs): Likewise. * gnu/packages/gnome.scm (network-manager): Likewise. * gnu/packages/julia.scm (julia): Likewise. * gnu/packages/linux.scm (alsa-plugins): Likewise. (powertop, wireless-regdb): Likewise. * gnu/packages/package-management.scm (guix): Likewise. * gnu/packages/polkit.scm (polkit): Likewise. * gnu/packages/tex.scm (texlive-bin): Likewise. * gnu/services/base.scm (file-systems->fstab): Likewise. * gnu/services/cups.scm (%cups-activation): Likewise. * gnu/services/mail.scm (%dovecot-activation): Likewise. * gnu/services/messaging.scm (prosody-configuration)[log]: Likewise. * gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise. * gnu/system/install.scm (installation-os)[file-systems]: Change root file system label to "Guix_image". * gnu/system/mapped-devices.scm (check-device-initrd-modules): Remove "GuixSD". * gnu/system/vm.scm (system-docker-image): Likewise. (system-disk-image)[root-label]: Change to "Guix_image". * gnu/tests/install.scm (run-install): Remove "GuixSD". * guix/modules.scm (guix-module-name?): Likewise. * nix/libstore/optimise-store.cc: Likewise.
3 years ago
Remove traces of "GuixSD". * gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove mentions of "GuixSD". * gnu/bootloader/grub.scm (install-grub-efi): Likewise. * gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to "Guix_image". (initialize-hard-disk): Search for the "Guix_image" label. * gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD". * gnu/installer/newt/welcome.scm (run-welcome-page): Likewise. * gnu/packages/audio.scm (supercollider)[description]: Likewise. * gnu/packages/curl.scm (curl): Likewise. * gnu/packages/emacs.scm (emacs): Likewise. * gnu/packages/gnome.scm (network-manager): Likewise. * gnu/packages/julia.scm (julia): Likewise. * gnu/packages/linux.scm (alsa-plugins): Likewise. (powertop, wireless-regdb): Likewise. * gnu/packages/package-management.scm (guix): Likewise. * gnu/packages/polkit.scm (polkit): Likewise. * gnu/packages/tex.scm (texlive-bin): Likewise. * gnu/services/base.scm (file-systems->fstab): Likewise. * gnu/services/cups.scm (%cups-activation): Likewise. * gnu/services/mail.scm (%dovecot-activation): Likewise. * gnu/services/messaging.scm (prosody-configuration)[log]: Likewise. * gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise. * gnu/system/install.scm (installation-os)[file-systems]: Change root file system label to "Guix_image". * gnu/system/mapped-devices.scm (check-device-initrd-modules): Remove "GuixSD". * gnu/system/vm.scm (system-docker-image): Likewise. (system-disk-image)[root-label]: Change to "Guix_image". * gnu/tests/install.scm (run-install): Remove "GuixSD". * guix/modules.scm (guix-module-name?): Likewise. * nix/libstore/optimise-store.cc: Likewise.
3 years ago
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2017 David Craven <david@craven.ch>
  3. ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
  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 bootloader extlinux)
  20. #:use-module (gnu bootloader)
  21. #:use-module (gnu packages bootloaders)
  22. #:use-module (guix gexp)
  23. #:use-module (guix utils)
  24. #:export (extlinux-bootloader
  25. extlinux-bootloader-gpt))
  26. (define* (extlinux-configuration-file config entries
  27. #:key
  28. (system (%current-system))
  29. (old-entries '()))
  30. "Return the U-Boot configuration file corresponding to CONFIG, a
  31. <u-boot-configuration> object, and where the store is available at STORE-FS, a
  32. <file-system> object. OLD-ENTRIES is taken to be a list of menu entries
  33. corresponding to old generations of the system."
  34. (define all-entries
  35. (append entries (bootloader-configuration-menu-entries config)))
  36. (define (menu-entry->gexp entry)
  37. (let ((label (menu-entry-label entry))
  38. (kernel (menu-entry-linux entry))
  39. (kernel-arguments (menu-entry-linux-arguments entry))
  40. (initrd (menu-entry-initrd entry)))
  41. #~(format port "LABEL ~a
  42. MENU LABEL ~a
  43. KERNEL ~a
  44. FDTDIR ~a/lib/dtbs
  45. INITRD ~a
  46. APPEND ~a
  47. ~%"
  48. #$label #$label
  49. #$kernel (dirname #$kernel) #$initrd
  50. (string-join (list #$@kernel-arguments)))))
  51. (define builder
  52. #~(call-with-output-file #$output
  53. (lambda (port)
  54. (let ((timeout #$(bootloader-configuration-timeout config)))
  55. (format port "# This file was generated from your Guix configuration. Any changes
  56. # will be lost upon reconfiguration.
  57. UI menu.c32
  58. MENU TITLE GNU Guix Boot Options
  59. PROMPT ~a
  60. TIMEOUT ~a~%"
  61. (if (> timeout 0) 1 0)
  62. ;; timeout is expressed in 1/10s of seconds.
  63. (* 10 timeout))
  64. #$@(map menu-entry->gexp all-entries)
  65. #$@(if (pair? old-entries)
  66. #~((format port "~%")
  67. #$@(map menu-entry->gexp old-entries)
  68. (format port "~%"))
  69. #~())))))
  70. (computed-file "extlinux.conf" builder
  71. #:options '(#:local-build? #t
  72. #:substitutable? #f)))
  73. ;;;
  74. ;;; Install procedures.
  75. ;;;
  76. (define (install-extlinux mbr)
  77. #~(lambda (bootloader device mount-point)
  78. (let ((extlinux (string-append bootloader "/sbin/extlinux"))
  79. (install-dir (string-append mount-point "/boot/extlinux"))
  80. (syslinux-dir (string-append bootloader "/share/syslinux")))
  81. (for-each (lambda (file)
  82. (install-file file install-dir))
  83. (find-files syslinux-dir "\\.c32$"))
  84. (invoke/quiet extlinux "--install" install-dir)
  85. (write-file-on-device (string-append syslinux-dir "/" #$mbr)
  86. 440 device 0))))
  87. (define install-extlinux-mbr
  88. (install-extlinux "mbr.bin"))
  89. (define install-extlinux-gpt
  90. (install-extlinux "gptmbr.bin"))
  91. ;;;
  92. ;;; Bootloader definitions.
  93. ;;;
  94. (define extlinux-bootloader
  95. (bootloader
  96. (name 'extlinux)
  97. (package syslinux)
  98. (installer install-extlinux-mbr)
  99. (configuration-file "/boot/extlinux/extlinux.conf")
  100. (configuration-file-generator extlinux-configuration-file)))
  101. (define extlinux-bootloader-gpt
  102. (bootloader
  103. (inherit extlinux-bootloader)
  104. (installer install-extlinux-gpt)))