diff options
| author | Mathieu Othacehe <othacehe@gnu.org> | 2022-01-13 11:06:31 +0100 |
|---|---|---|
| committer | Mathieu Othacehe <othacehe@gnu.org> | 2022-01-13 11:11:02 +0100 |
| commit | ea71ec1630e06503c14c6e7f4570b69de4e42123 (patch) | |
| tree | 7b8d132af4866841f36674f1776f2eeb4702b5a2 | |
| parent | 4addc484b94dfd4d6c83bd85ad76aeb586d2ee13 (diff) | |
bootloader: grub: Fix serial mode.
* gnu/bootloader/grub.scm (grub-setup-io): Fix serial mode display by
declaring the serial property before the terminal_input and terminal_output
properties.
| -rw-r--r-- | gnu/bootloader/grub.scm | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 42f71aa4db0..120cd55012b 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm | |||
| @@ -264,36 +264,38 @@ is a string that can be inserted in grub.cfg." | |||
| 264 | at_keyboard usb_keyboard)) | 264 | at_keyboard usb_keyboard)) |
| 265 | 265 | ||
| 266 | (io (string-append | 266 | (io (string-append |
| 267 | "terminal_output " | 267 | ;; UNIT and SPEED are arguments to the same GRUB command |
| 268 | (symbols->string | 268 | ;; ("serial"), so we process them together. |
| 269 | (map | 269 | (if (or unit speed) |
| 270 | (lambda (output) | 270 | (string-append |
| 271 | (if (memq output valid-outputs) output #f)) outputs)) "\n" | ||
| 272 | (if (null? inputs) | ||
| 273 | "" | ||
| 274 | (string-append | ||
| 275 | "terminal_input " | ||
| 276 | (symbols->string | ||
| 277 | (map | ||
| 278 | (lambda (input) | ||
| 279 | (if (memq input valid-inputs) input #f)) inputs)) "\n")) | ||
| 280 | ;; UNIT and SPEED are arguments to the same GRUB command | ||
| 281 | ;; ("serial"), so we process them together. | ||
| 282 | (if (or unit speed) | ||
| 283 | (string-append | ||
| 284 | "serial" | 271 | "serial" |
| 285 | (if unit | 272 | (if unit |
| 286 | ;; COM ports 1 through 4 | 273 | ;; COM ports 1 through 4 |
| 287 | (if (and (exact-integer? unit) (<= unit 3) (>= unit 0)) | 274 | (if (and (exact-integer? unit) (<= unit 3) (>= unit 0)) |
| 288 | (string-append " --unit=" (number->string unit)) | 275 | (string-append " --unit=" (number->string unit)) |
| 289 | #f) | 276 | #f) |
| 290 | "") | 277 | "") |
| 291 | (if speed | 278 | (if speed |
| 292 | (if (exact-integer? speed) | 279 | (if (exact-integer? speed) |
| 293 | (string-append " --speed=" (number->string speed)) | 280 | (string-append " --speed=" (number->string speed)) |
| 294 | #f) | 281 | #f) |
| 295 | "")) | 282 | "") |
| 296 | "")))) | 283 | "\n") |
| 284 | "") | ||
| 285 | (if (null? inputs) | ||
| 286 | "" | ||
| 287 | (string-append | ||
| 288 | "terminal_input " | ||
| 289 | (symbols->string | ||
| 290 | (map | ||
| 291 | (lambda (input) | ||
| 292 | (if (memq input valid-inputs) input #f)) inputs)) | ||
| 293 | "\n")) | ||
| 294 | "terminal_output " | ||
| 295 | (symbols->string | ||
| 296 | (map | ||
| 297 | (lambda (output) | ||
| 298 | (if (memq output valid-outputs) output #f)) outputs))))) | ||
| 297 | (format #f "~a" io))) | 299 | (format #f "~a" io))) |
| 298 | 300 | ||
| 299 | (define (grub-root-search device file) | 301 | (define (grub-root-search device file) |
