[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Xen hypervisor
From: |
Jan Nieuwenhuizen |
Subject: |
Re: Xen hypervisor |
Date: |
Thu, 26 Nov 2020 13:51:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Danny Milosavljevic writes:
> Hi Janneke,
>
> with our (gnu bootloader grub) already supporting multiboot, it would be easy
> for us to add official support for the Xen hypervisor & Linux.
>
> I've already packaged xen and it's ready to be used.
>
> In order to boot Xen, the grub config should read something like this:
Nice; this could help a lot with hurd work, notably 64bit/x86_64 and SMP
work, IIUC.
> Note especially that "multiboot" is "/xen-4.1-amd64.gz", and that "module"
> statements are used for the linux kernel and for the initrd.
OK.
> The work you have been doing for the Hurd already fetches both the "multiboot"
> and the "module" parameters from the boot-parameters via
> boot-parameters->menu-entry.
>
> But I can't find how I can set the multiboot-modules in my operating-system
> definition.
Yes,..currently, you only can if you're "hurd":
gnu/system.scm has:
--8<---------------cut here---------------start------------->8---
(define (boot-parameters->menu-entry conf)
(let* ((kernel (boot-parameters-kernel conf))
(multiboot-modules (boot-parameters-multiboot-modules conf))
(multiboot? (pair? multiboot-modules)))
--8<---------------cut here---------------end--------------->8---
and
--8<---------------cut here---------------start------------->8---
(define (operating-system-multiboot-modules os)
(if (operating-system-hurd os) (hurd-multiboot-modules os) '()))
--8<---------------cut here---------------end--------------->8---
> Like,
>
> (operating-system
> (kernel (file-append xen "/boot/xen.gz"))
> (multiboot-modules (list linux-libre initrd)))
Yes, we need some an indirection. There already is
--8<---------------cut here---------------start------------->8---
(define (hurd-multiboot-modules os)
(let* ((hurd (operating-system-hurd os))
(root-file-system-command
(list (file-append hurd "/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}'"
"--store-type=typed"
"--x-xattr-translator-records"
"'${root}'" "'$(task-create)'" "'$(task-resume)'"))
...
--8<---------------cut here---------------end--------------->8---
> Also, how do I get guix's usual initrd into that multiboot-modules list ?
Yes, that's another thing that would need to change, if you look at
gnu/bootloader/grub.scm has:
--8<---------------cut here---------------start------------->8---
(define* (grub-configuration-file config entries
...
(if linux
(let ((arguments (menu-entry-linux-arguments entry))
...
(let ((kernel (menu-entry-multiboot-kernel entry))
...
--8<---------------cut here---------------end--------------->8---
we don't do multiboot when we're doing linux.
> Do you think it would make sense to adapt boot-parameters->menu-entry
> slightly so one could specify both a multiboot kernel and a linux kernel
> at the same time? Or would that be too magical?
Hmm, I'd have to see the patch ;-) We need a parameterisation, not sure
if splitting case LINUX in two is preferrable over a third flavor.
HTH!
Greetings,
Janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | AvatarĀ® http://AvatarAcademy.com
- Xen hypervisor, Danny Milosavljevic, 2020/11/26
- Re: Xen hypervisor,
Jan Nieuwenhuizen <=