diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm index f8c9937f54..960339e8bf 100644 --- a/guix/build/syscalls.scm +++ b/guix/build/syscalls.scm @@ -793,20 +793,24 @@ (define kexec-load-file unsigned-long ;cmdline length '* ;cmdline unsigned-long))) ;flags - ;; TODO: Don't do this. (syscall-id (match (utsname:machine (uname)) ("i686" 320) ("x86_64" 320) ("armv7l" 401) - ("aarch64" 401) - ;; XXX: There's apparently no support for ppc64le and - ;; riscv64. + ("aarch64" 294) + ("ppc64le" 382) + ("riscv64" 294) (_ #f)))) (lambda* (kernel-fd initrd-fd command-line #:optional (flags 0)) "Load for eventual use of kexec(8) the Linux kernel from @var{kernel-fd}, its initial RAM disk from @var{initrd-fd}, with the given @var{command-line} (a string). Optionally, @var{flags} can be a bitwise or of the KEXEC_FILE_* constants." + (unless syscall-id + (throw 'system-error "kexec-load-file" "~A" + (list (strerror ENOSYS)) + (list ENOSYS))) + (let*-values (((command-line) (string->utf-8/nul-terminated command-line)) ((ret err)