diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-12-15 23:54:10 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-12-15 23:54:10 +0100 |
| commit | b1aef25453067004279c4267cf25e8d6d365890d (patch) | |
| tree | f454f9a9d75c695a0f96e590b4027e244e18af00 /gnu | |
| parent | 047ae5c3458d03bea4926e6cc1760bcfce1e2ab4 (diff) | |
install: Make sure uvesafb can be loaded.
Fixes <https://issues.guix.gnu.org/60010>.
Reported by pelzflorian (Florian Pelz) <pelzflorian@pelzflorian.de>.
Previously, the 'modprobe' executable would try and fail to load the
module from /lib/modules/*. Set 'LINUX_MODULE_DIRECTORY' to make sure
'modprobe' looks for the module in the right place.
* gnu/system/install.scm (uvesafb-shepherd-service)[modprobe]: New
variable.
In 'start' method, invoke it instead of KMOD/bin/modprobe.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/system/install.scm | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index f6f1923121c..3dd9e0e87b5 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -284,13 +284,24 @@ templates under @file{/etc/configuration}."))) | |||
| 284 | ;; appropriate options. The GUI installer needs it when the machine does not | 284 | ;; appropriate options. The GUI installer needs it when the machine does not |
| 285 | ;; support Kernel Mode Setting. Otherwise kmscon is missing /dev/fb0. | 285 | ;; support Kernel Mode Setting. Otherwise kmscon is missing /dev/fb0. |
| 286 | (define (uvesafb-shepherd-service _) | 286 | (define (uvesafb-shepherd-service _) |
| 287 | (define modprobe | ||
| 288 | (program-file "modprobe-wrapper" | ||
| 289 | #~(begin | ||
| 290 | ;; Use a wrapper because shepherd 0.9.3 won't let us | ||
| 291 | ;; pass environment variables to the child process: | ||
| 292 | ;; <https://issues.guix.gnu.org/60106>. | ||
| 293 | (setenv "LINUX_MODULE_DIRECTORY" | ||
| 294 | "/run/booted-system/kernel/lib/modules") | ||
| 295 | (apply execl #$(file-append kmod "/bin/modprobe") | ||
| 296 | "modprobe" (cdr (command-line)))))) | ||
| 297 | |||
| 287 | (list (shepherd-service | 298 | (list (shepherd-service |
| 288 | (documentation "Load the uvesafb kernel module if needed.") | 299 | (documentation "Load the uvesafb kernel module if needed.") |
| 289 | (provision '(maybe-uvesafb)) | 300 | (provision '(maybe-uvesafb)) |
| 290 | (requirement '(file-systems)) | 301 | (requirement '(file-systems)) |
| 291 | (start #~(lambda () | 302 | (start #~(lambda () |
| 292 | (or (file-exists? "/dev/fb0") | 303 | (or (file-exists? "/dev/fb0") |
| 293 | (invoke #+(file-append kmod "/bin/modprobe") | 304 | (invoke #+modprobe |
| 294 | "uvesafb" | 305 | "uvesafb" |
| 295 | (string-append "v86d=" #$v86d "/sbin/v86d") | 306 | (string-append "v86d=" #$v86d "/sbin/v86d") |
| 296 | "mode_option=1024x768")))) | 307 | "mode_option=1024x768")))) |
