aboutsummaryrefslogtreecommitdiff
path: root/gnu/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/bootloader')
0 files changed, 0 insertions, 0 deletions
er pages, we cannot resort to grid layouts, because we want this page to occupy all the screen space available." (define (fill-listbox listbox items) (map (lambda (item) (let* ((text (listbox-item->text item)) (key (append-entry-to-listbox listbox text))) (cons key item))) items)) (let* ((logo-textbox (make-textbox -1 -1 (if (display-logo?) (logo-width) 0) (if (display-logo?) (logo-height) 0) 0)) (info-textbox (make-reflowed-textbox -1 -1 info-text (info-textbox-width))) (options-listbox (make-listbox -1 -1 (options-listbox-height) (logior FLAG-BORDER FLAG-RETURNEXIT))) (keys (fill-listbox options-listbox listbox-items)) (grid (vertically-stacked-grid GRID-ELEMENT-COMPONENT logo-textbox GRID-ELEMENT-COMPONENT info-textbox GRID-ELEMENT-COMPONENT options-listbox)) (form (make-form))) (define (choice->item str) ;; Return the item that corresponds to STR. (match (find (match-lambda ((key . item) (string=? str (listbox-item->text item)))) keys) ((key . item) item) (#f (abort-to-prompt 'installer-step 'abort)))) (set-textbox-text logo-textbox (read-all logo)) (add-form-to-grid grid form #t) (make-wrapped-grid-window grid title) (receive (exit-reason argument) (run-form-with-clients form `(menu (title ,title) (text ,info-text) (items ,(map listbox-item->text listbox-items)))) (dynamic-wind (const #t) (lambda () (match exit-reason ('exit-component (let* ((entry (current-listbox-entry options-listbox)) (item (assoc-ref keys entry))) (match item ((text . proc) (proc))))) ('exit-fd-ready (let* ((choice argument) (item (choice->item choice))) (match item ((text . proc) (proc))))))) (lambda () (destroy-form-and-pop form)))))) (define (check-hardware-support pci-database) "Warn about unsupported devices." (when (member "uvesafb" (modules-loaded)) (run-error-page (G_ "\ This may be a false alarm, but possibly your graphics hardware does not work well with only free software. Expect trouble. If after installation, the system does not boot, perhaps you will need to add nomodeset to the kernel arguments and need to configure the uvesafb kernel module.") (G_ "Pre-install warning"))) (let ((devices (pci-devices))) (match (filter unsupported-pci-device? devices) (() ;no unsupported device #t) (unsupported (run-error-page (format #f (G_ "\ Devices not supported by free software were found on your computer: ~{ - ~a~%~} Unfortunately, it means those devices will not be usable. To address it, we recommend choosing hardware that respects your freedom as a \ user--hardware for which free drivers and firmware exist. See \"Hardware \ Considerations\" in the manual for more information.") (map (pci-device-description pci-database) unsupported)) (G_ "Hardware support warning") #:width 76))))) (define* (run-welcome-page logo #:key pci-database) "Run a welcome page with the given textual LOGO displayed at the center of the page. Ask the user to choose between manual installation, graphical installation and reboot." (when (file-exists? %core-dump) (match (choice-window (G_ "Previous installation failed") (G_ "Continue") (G_ "Report the failure") (G_ "It seems that the previous installation exited unexpectedly \ and generated a core dump. Do you want to continue or to report the failure \ first?")) (1 #t) (2 (raise (condition (&user-abort-error)))))) (run-menu-page (G_ "GNU Guix install") (G_ "Welcome to GNU Guix system installer! You will be guided through a graphical installation program. If you are familiar with GNU/Linux and you want tight control over \ the installation process, you can instead choose manual installation. \ Documentation is accessible at any time by pressing Ctrl-Alt-F2.") logo #:listbox-items `((,(G_ "Graphical install using a terminal based interface") . ,(lambda () (check-hardware-support pci-database))) (,(G_ "Install using the shell based process") . ,(lambda () (check-hardware-support pci-database) ;; Switch to TTY3, where a root shell is available for shell based ;; install. The other root TTY's would have been ok too. (system* "chvt" "3") (run-welcome-page logo #:pci-database pci-database))) (,(G_ "Reboot") . ,(lambda () (newt-finish) (reboot)))) #:listbox-item->text car))