From: Jan Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: 20/36: system: hurd: Add the Shepherd.
Date: Fri, 01 May 2020 12:28:06 +0200 [thread overview]
Message-ID: <87v9lgq79l.fsf@gnu.org> (raw)
In-Reply-To: <875zdglifm.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Fri, 01 May 2020 00:25:49 +0200")
Ludovic Courtès writes:
Hi Ludo'!
>> commit bb17242a511014e1691d494b17152865db0580e0
>> Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
>> AuthorDate: Tue Apr 7 08:03:03 2020 +0200
>>
>> system: hurd: Add the Shepherd.
>> + (define shepherd.conf
>> + (with-parameters ((%current-target-system "i586-pc-gnu"))
>> + (shepherd-configuration-file (hurd-shepherd-services %hurd-os))))
>
> This looks like an intermediate before fully using the service/OS
> framework
TL;DR: Thanks a lot for your review and questions! I will be using this
to rewrite the Shepherd/services introduction in a proper way, until
it can be merged.
> , but I wonder how much it helps.
Yes, that's exactly it! This intermediate, is curerently the only way I
found that can produce a fully functional VM-image; i.e., one that
starts guix-daemon and openssh. So it helps by being an intermediate.
> The way I see it, now that you’ve defined services for Hurd-specific
> things like the console client, you could very much write:
>
> (operating-system
> ;; …
> (kernel gnumach)
> (hurd hurd) ;<- we probably need this new field
(oh...prolly better than the (if hurd-target?) I've been sprinkling and
implicit adding of gnumach. I'll have a go at this.
> (essential-services (hurd-essential-services this-operating-system))
> (services %base-hurd-services))
>
> (Eventually we can even arrange for ‘essential-services’ and ‘services’
> to pick the right default as a function of the chosen kernel.)
>
> and then do:
>
> guix system build --target=i586-pc-gnu the-config-above.scm
> Assuming system cross-compilation works as advertised :-), it should
> cross-compile the whole system.
Yeah...is seems that the marketing department may have sold us something
that has yet to be delivered. Either that, or I failed to read some
bits of the instruction manual ;-)
To get something to run, we need (near the top of wip-hurd-vm)
6302837257 HACK Don't fail on running host's localedef.
443e1b2176 gnu: hurd: Cross-build hack: Set target i586-pc-gnu if unset.
87b50146ee gnu: glibc/hurd-headers: Cross-build fix for the Hurd.
So, on a well-chosen version of wip-hurd-vm (for example: wip-hurd-vm24
on my gitlab), I can now finally run this
./pre-inst-env guix system build --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl
...but (most of) the OS is not cross-compiled; <profile>/bin/bash is the
build host's bash. Some things, like Grub, Gnumach, the Hurd are cross
compiled, so ...
> At that stage, you don’t need ‘cross-hurd-image’ any longer and you can
> instead run:
>
> guix system vm-image --target=i586-pc-gnu the-config-above.scm
>
> to achieve the same result.
... indeed, running:
./pre-inst-env guix system vm-image --target=i586-pc-gnu gnu/system/examples/bare-hurd.tmpl
creates a bootable VM-image that drops into a bash-minimal shell,
because <profile>/bin/bash cannot be executed.
> But! There’s one missing bit: a Hurdish grub.cfg. I think that can be
> hacked in (gnu bootloader grub), by inheriting from ‘grub-bootloader’
> and providing a custom ‘configuration-file-generator’ field and maybe
> ‘installer’ as well.
I think I have that covered here
d6ec2c2543 * system: hurd: Add hurd-grub-configuration-file.
a9a6b716d9 * system: hurd: Add hurd-grub-minimal-bootloader.
possibly depending on these
4fd4296325 * system: Add hurd-operating-system-directory-base-entries.
f4f872a440 * services: hurd: Move hurd-default-essential-services.
5f7c73d83a * services: Add hurd-file-systems-service-type.
d7cd2f122d * services: hurd: Move hurd-etc-sevcices.
> Thus, (gnu system hurd) would be left with nothing but the definitions
> of ‘%base-services/hurd’, ‘%base-packages/hurd’, and so on.
> ‘hurd-essential-services’ could maybe go to (gnu services hurd).
Yes!
> But I wonder if I’m missing something, WDYT?
You're right...and this is what I am trying to work towards. The reason
for me to introduce these intermediate steps is that they enable to run
intermediate tests.
Currently, "guix build -f gnu/system/hurd.scm" is the only way I have
that produces a functional VM. We are pretty close t creating such a
thing with "guix system ...", but to do so we need a cross build that
works and a shepherd config generated...and that all needs to come
together. So instead of attempting a giant leap, I'm trying to throw
some intermediate stepping stones in the pond :-)
We don't need to merge, or keep this history; but I don't see how to
walk this path without going round these extra curves; let alone getting
feedback or asking questions. So I can imagine that these commits keep
being rewritten/removed on wip-hurd-vm until everything works.
> Thanks for the exciting developments again! :-)
Thanks for your insights, we're getting there... I have some more
specific, related questions/puzzles in response to your other mail about
services.
Greetings,
janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
prev parent reply other threads:[~2020-05-01 10:28 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200427101927.7020.76060@vcs0.savannah.gnu.org>
[not found] ` <20200427101942.B725620A5E@vcs0.savannah.gnu.org>
2020-04-30 21:48 ` 02/36: gnu: guix: Use gnutls-3.6.13 when cross-compiling Ludovic Courtès
2020-05-01 7:22 ` Jan Nieuwenhuizen
[not found] ` <20200427101943.A4BDD20A5E@vcs0.savannah.gnu.org>
2020-04-30 21:50 ` 05/36: vm: Make the device node procedure a parameter Ludovic Courtès
2020-05-01 6:07 ` Jan Nieuwenhuizen
2020-05-03 20:34 ` Ludovic Courtès
[not found] ` <20200427101943.F251E20A5E@vcs0.savannah.gnu.org>
2020-04-30 21:51 ` 06/36: gnu: hurd: Fix references to /bin/w Ludovic Courtès
2020-05-01 6:07 ` Jan Nieuwenhuizen
[not found] ` <20200427101944.46D0C20A5E@vcs0.savannah.gnu.org>
2020-04-30 21:52 ` 07/36: gnu: hurd: Use default Qemu guest ip: 10.0.2.15 Ludovic Courtès
2020-05-01 6:07 ` Jan Nieuwenhuizen
[not found] ` <20200427101944.86DE020BC2@vcs0.savannah.gnu.org>
2020-04-30 21:53 ` 08/36: gnu: hurd: Add NFS support Ludovic Courtès
2020-05-01 6:14 ` Jan Nieuwenhuizen
[not found] ` <20200427101945.023D020BC4@vcs0.savannah.gnu.org>
2020-04-30 21:55 ` 09/36: gnu: Add libtirpc/hurd Ludovic Courtès
2020-05-01 6:15 ` Jan Nieuwenhuizen
2020-04-30 21:56 ` branch wip-hurd-vm created (now fdb35e3) Ludovic Courtès
2020-05-01 7:02 ` Jan Nieuwenhuizen
[not found] ` <20200427101946.414C420A5E@vcs0.savannah.gnu.org>
2020-04-30 22:03 ` 13/36: services: Add hurd-console-service-type Ludovic Courtès
2020-05-01 15:16 ` Jan Nieuwenhuizen
2020-05-01 20:03 ` Jan Nieuwenhuizen
2020-05-03 20:39 ` Ludovic Courtès
2020-05-03 20:55 ` Jan Nieuwenhuizen
[not found] ` <20200427101947.E79D320A5E@vcs0.savannah.gnu.org>
2020-04-30 22:07 ` 18/36: services: hurd: Add dummy loopback Ludovic Courtès
2020-05-01 15:15 ` Jan Nieuwenhuizen
2020-05-03 20:50 ` Ludovic Courtès
2020-05-03 22:15 ` Jan Nieuwenhuizen
2020-05-05 9:23 ` Ludovic Courtès
2020-05-05 9:38 ` Vincent Legoll
2020-05-06 14:06 ` Ludovic Courtès
2020-05-05 12:46 ` Jan Nieuwenhuizen
2020-05-06 14:09 ` Ludovic Courtès
[not found] ` <20200427101948.9B2B220A5E@vcs0.savannah.gnu.org>
2020-04-30 22:25 ` 20/36: system: hurd: Add the Shepherd Ludovic Courtès
2020-05-01 10:28 ` Jan Nieuwenhuizen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9lgq79l.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).