GNU bug report logs -
#41785
[PATCH] DRAFT services: Add 'hurd-in-vm service-type'.
Previous Next
Full log
Message #92 received at 41785 <at> debbugs.gnu.org (full text, mbox):
Mathieu Othacehe writes:
Hey Mathieu,
>> (define (hurd-vm-disk-image config)
>> "Return a disk-image for the Hurd according to CONFIG."
>> (with-parameters ((%current-target-system "i586-pc-gnu"))
>> (let ((os (hurd-vm-configuration-os config))
>> (disk-size (hurd-vm-configuration-disk-size config)))
>> (system-image
>> (image
>> (inherit hurd-disk-image)
>> (size disk-size)
>> (operating-system os))))))
>
> Nice! I'm not sure why we still need the "with-parameters" call because,
> it's done first thing in "system-image". I'd like to understand this
> before proceeding, do you have a branch where I could test it?
It's on my gitlab master...almost ready to push ;-)
Initially I did not have this "with-parameters", but then in
gnu/system.scm:
--8<---------------cut here---------------start------------->8---
(define (hurd-multiboot-modules os)
...
(libc (if target
(with-parameters ((%current-target-system #f))
;; TODO: cross-libc has extra patches for the Hurd;
;; remove in next rebuild cycle
(cross-libc target))
glibc))
--8<---------------cut here---------------end--------------->8---
we take the ELSE branch here -- and that does not work. AIUI, this is
really a temporary kludge until the next rebuild cycle we can move some
hurd-specific glibc patches from cross-libc to glibc-proper.
...but it's tricky to see how this all plays together, not entirely
clear to me anyway...
>> - ;; FIXME: %current-target-system may not be bound <https://bugs.gnu.org/29296>
>> - (let ((target (%current-target-system)))
>> + (let-system (system target)
>> (with-extensions (list shepherd)
>> (computed-file (string-append (basename (scheme-file-name file) ".scm")
>> ".go")
>>
>> produces a working hurd-vm service!
>
> Good catch!
:-)
Almost there...
Janneke
--
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
This bug report was last modified 4 years and 341 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.