~abcdw/rde

1b08f117bd6c63c4f998b743dd8741d66b77767e — Andrew Tropin 10 months ago 54a2ae9
rde: system: Add initrd and -modules arguments to feature-kernel
2 files changed, 19 insertions(+), 2 deletions(-)

M rde/features.scm
M rde/features/system.scm
M rde/features.scm => rde/features.scm +8 -0
@@ 306,6 306,12 @@ to each system-services-getter function."
	 (kernel-modules   (get-value
			    'kernel-loadable-modules config
			    (operating-system-kernel-loadable-modules initial-os)))
	 (initrd           (get-value
			    'initrd config
			    (operating-system-initrd initial-os)))
	 (initrd-modules   (get-value
			    'initrd-modules config
			    (operating-system-initrd-modules initial-os)))
	 (firmware         (get-value
			    'firmware config
			    (operating-system-firmware initial-os))))


@@ 322,6 328,8 @@ to each system-services-getter function."
      (kernel kernel)
      (kernel-arguments kernel-arguments)
      (kernel-loadable-modules kernel-modules)
      (initrd initrd)
      (initrd-modules initrd-modules)
      (firmware firmware)
      (services services))))


M rde/features/system.scm => rde/features/system.scm +11 -2
@@ 7,6 7,7 @@
  #:use-module (gnu system)
  #:use-module (gnu system file-systems)
  #:use-module (gnu system mapped-devices)
  #:use-module (gnu system linux-initrd)
  #:use-module (srfi srfi-1)

  #:export (feature-bootloader


@@ 70,6 71,9 @@ behavior can be overriden with BASE-FILE-SYSTEM argument."
	  (kernel-loadable-modules '())
	  (kernel-arguments '())
	  (default-kernel-arguments %default-kernel-arguments)
          (initrd base-initrd)
          (initrd-modules '())
          (base-initrd-modules %base-initrd-modules)
	  (firmware '())
	  (base-firmware %base-firmware))
  "Provides kernel configuration."


@@ 79,10 83,15 @@ behavior can be overriden with BASE-FILE-SYSTEM argument."
  (ensure-pred list-of-string-or-gexps? default-kernel-arguments)
  (ensure-pred list-of-packages? firmware)
  (ensure-pred list-of-packages? base-firmware)
  (ensure-pred procedure? initrd)
  (ensure-pred list-of-strings? initrd-modules)
  (ensure-pred list-of-strings? base-initrd-modules)

  (let ((kernel-arguments (append kernel-arguments default-kernel-arguments))
	(firmware         (append firmware base-firmware)))
	(firmware         (append firmware base-firmware))
        (initrd-modules   (append initrd-modules base-initrd-modules)))
    (feature
     (name 'kernel)
     (values (make-feature-values
	      kernel kernel-loadable-modules kernel-arguments firmware)))))
	      kernel kernel-loadable-modules kernel-arguments
              initrd initrd-modules firmware)))))