guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix system vm-image --target=i586-pc-gnu Hurd'le


From: Jan Nieuwenhuizen
Subject: Re: guix system vm-image --target=i586-pc-gnu Hurd'le
Date: Mon, 04 May 2020 18:32:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Mathieu Othacehe writes:

Hello Mathieu

>> (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).

Oh...it seems to be pretty convoluted way to type dead code.  Thanks!

>> 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).

Ah yes, this is a bug; thanks!

I have changed it to

(define* (hurd-grub-configuration-file config entries
                                       #:key
                                       (system (%current-system))
                                       (old-entries '()))
  ;; XXX Get from a hurd'ified config+entries
  (let ((mach gnumach)
        (hurd hurd)
        (libc glibc))
    (computed-file "grub.cfg"
                   #~(call-with-output-file #$output
                       (lambda (port)
                         (format port "
...
}\n"
                                 #$mach #$mach #$hurd
                                 #$libc #$hurd))))))

> In the future it would also be nice to have this stuff in (gnu
> bootloader grub), but we'll discuss that later on :)

Yes!  I found it still a bit too kludgy for that?

In particular, I haven't really dared to think what to do about the
linux-specific config <menu-entry>...make a hurd variant, or add
hurd'ish fields.

Greetings,
janneke

-- 
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]