[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guix system vm-image --target=i586-pc-gnu Hurd'le
From: |
Mathieu Othacehe |
Subject: |
Re: guix system vm-image --target=i586-pc-gnu Hurd'le |
Date: |
Mon, 04 May 2020 17:29:05 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
Hello!
> (define* (hurd-grub-configuration-file config entries
> #:key
> (system (%current-target-system))
> (old-entries '()))
> (let ((hurd (if (equal? system (%current-system))
> hurd
> (with-parameters ((%current-target-system system))
> hurd)))
I'm not sure this is useful. When --target is set, you can use #$ to
refer to the cross-built package and #+ to refer to the native package
(built for host architecture).
> (mach (with-parameters ((%current-system "i686-linux"))
> gnumach))
> (libc (if (equal? system (%current-system))
> glibc
> (cross-libc system))))
> (computed-file "grub.cfg"
> #~(call-with-output-file #$output
> (lambda (port)
> (format port "
> set timeout=2
> search.file ~a/boot/gnumach
>
> menuentry \"GNU\" {
> multiboot ~a/boot/gnumach root=device:hd0s1
> module ~a/hurd/ext2fs.static ext2fs \\
> --multiboot-command-line='${kernel-command-line}' \\
> --host-priv-port='${host-port}' \\
> --device-master-port='${device-port}' \\
> --exec-server-task='${exec-task}' -T typed '${root}' \\
> '$(task-create)' '$(task-resume)'
> module ~a/lib/ld.so.1 exec ~a/hurd/exec '$(exec-task=task-create)'
> }\n"
> #+mach #+mach #+hurd
> #+libc #+hurd))))))
So here, I think you want to use #$hurd, which would refer to the
cross-compiled hurd package when cross-compiling and to the native hurd
when building from a hurd system (real, or emulated with --system).
In the future it would also be nice to have this stuff in (gnu
bootloader grub), but we'll discuss that later on :)
Thanks,
Mathieu