all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image.
@ 2017-11-13  7:22 Mathieu Othacehe
  2017-11-13  9:38 ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Othacehe @ 2017-11-13  7:22 UTC (permalink / raw)
  To: 29281

* gnu/system/vm.scm (system-disk-image): Use linux-libre instead of user
defined kernel that may not be emulable and/or function with base-initrd.
---
 gnu/system/vm.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index 44246083b..c55df3013 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -422,6 +422,7 @@ to USB sticks meant to be read-only."
               ;; Since this is meant to be used on real hardware, don't
               ;; install QEMU networking or anything like that.  Assume USB
               ;; mass storage devices (usb-storage.ko) are available.
+              (kernel linux-libre)
               (initrd (lambda (file-systems . rest)
                         (apply base-initrd file-systems
                                #:volatile-root? #t
-- 
2.15.0

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image.
  2017-11-13  7:22 [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image Mathieu Othacehe
@ 2017-11-13  9:38 ` Ludovic Courtès
  2017-11-13  9:49   ` Mathieu Othacehe
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2017-11-13  9:38 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 29281

Hi,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

> * gnu/system/vm.scm (system-disk-image): Use linux-libre instead of user
> defined kernel that may not be emulable and/or function with base-initrd.

I would rather not override ‘linux-libre’.  I find it quite useful to be
able to ‘guix system vm’ with a custom kernel; that’s one of the things
one might want to test in a VM before rebooting.

What was the use case and rationale for you?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image.
  2017-11-13  9:38 ` Ludovic Courtès
@ 2017-11-13  9:49   ` Mathieu Othacehe
  2017-11-13 10:23     ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Othacehe @ 2017-11-13  9:49 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 29281


Hi Ludo,

> What was the use case and rationale for you?

The problematic use case was to try to produce a GuixSD arm installer
for beaglebone black. The kernel linux-libre-arm-omap2plus I'm planning
to use can't be used in qemu.

Plus, I'd like to use a raw-initrd because linux-libre-arm-omap2plus is
quite a light kernel configuration. As system-disk-image asks for
base-initrd, the required modules won't be find during image
construction with omap kernel.

Do you have another idea on how to overcome this issue ?

Thanks for the quick review,

Mathieu

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image.
  2017-11-13  9:49   ` Mathieu Othacehe
@ 2017-11-13 10:23     ` Ludovic Courtès
  2017-11-13 10:47       ` Mathieu Othacehe
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2017-11-13 10:23 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 29281

Hello,

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

>> What was the use case and rationale for you?
>
> The problematic use case was to try to produce a GuixSD arm installer
> for beaglebone black. The kernel linux-libre-arm-omap2plus I'm planning
> to use can't be used in qemu.

Oh, why is that?  You mean qemu-system-arm running natively on the BBB,
right?

> Plus, I'd like to use a raw-initrd because linux-libre-arm-omap2plus is
> quite a light kernel configuration. As system-disk-image asks for
> base-initrd, the required modules won't be find during image
> construction with omap kernel.

Perhaps we should change ‘system-disk-image’ to use a more minimalistic
initrd since all it needs is those virtio* drivers?

Thanks for explaining!

Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image.
  2017-11-13 10:23     ` Ludovic Courtès
@ 2017-11-13 10:47       ` Mathieu Othacehe
  2017-11-13 10:54         ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Othacehe @ 2017-11-13 10:47 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 29281

[-- Attachment #1: Type: text/plain, Size: 1832 bytes --]

>
> Oh, why is that?  You mean qemu-system-arm running natively on the BBB,
> right?
>

Yes, when running qemu-system-arm you have only a limited set of available
machines (qemu-system-arm -M help).
BBB isn't one of them, but as there are only about 50 emulable machines, it
will be the case for many other boards :(

In a future patch, I'll adapt "load-in-linux-vm" to use "-M virt" for
qemu-system-arm because contrary to most boards,
it works well with linux-libre, allows up to 8 CPU, virtio (see
https://wiki.qemu.org/Documentation/Platforms/ARM) ...

However, I don't think qemu virt machine will boot with every specific arm
kernel a user might end up using
on his target.

Perhaps we should change ‘system-disk-image’ to use a more minimalistic
> initrd since all it needs is those virtio* drivers?
>

That would be an option for the initrd, but the kernel problem above
remains :)

Thanks !

2017-11-13 11:23 GMT+01:00 Ludovic Courtès <ludo@gnu.org>:

> Hello,
>
> Mathieu Othacehe <m.othacehe@gmail.com> skribis:
>
> >> What was the use case and rationale for you?
> >
> > The problematic use case was to try to produce a GuixSD arm installer
> > for beaglebone black. The kernel linux-libre-arm-omap2plus I'm planning
> > to use can't be used in qemu.
>
> Oh, why is that?  You mean qemu-system-arm running natively on the BBB,
> right?
>
> > Plus, I'd like to use a raw-initrd because linux-libre-arm-omap2plus is
> > quite a light kernel configuration. As system-disk-image asks for
> > base-initrd, the required modules won't be find during image
> > construction with omap kernel.
>
> Perhaps we should change ‘system-disk-image’ to use a more minimalistic
> initrd since all it needs is those virtio* drivers?
>
> Thanks for explaining!
>
> Ludo’.
>

[-- Attachment #2: Type: text/html, Size: 3129 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image.
  2017-11-13 10:47       ` Mathieu Othacehe
@ 2017-11-13 10:54         ` Ludovic Courtès
  2017-11-13 11:54           ` Mathieu Othacehe
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2017-11-13 10:54 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 29281

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

>>
>> Oh, why is that?  You mean qemu-system-arm running natively on the BBB,
>> right?
>>
>
> Yes, when running qemu-system-arm you have only a limited set of available
> machines (qemu-system-arm -M help).
> BBB isn't one of them, but as there are only about 50 emulable machines, it
> will be the case for many other boards :(

So the kernel you built doesn’t boot at all in “qemu-system-arm -M virt”?

> In a future patch, I'll adapt "load-in-linux-vm" to use "-M virt" for
> qemu-system-arm because contrary to most boards,
> it works well with linux-libre, allows up to 8 CPU, virtio (see
> https://wiki.qemu.org/Documentation/Platforms/ARM) ...

OK.

> However, I don't think qemu virt machine will boot with every specific arm
> kernel a user might end up using
> on his target.

I see.

> Perhaps we should change ‘system-disk-image’ to use a more minimalistic
>> initrd since all it needs is those virtio* drivers?
>>
>
> That would be an option for the initrd, but the kernel problem above
> remains :)

Right.

I can’t think of a good solution right now.  Perhaps we could simply
hard-code ARM-specific code?

  (operating-system
    (inherit os)
    (kernel (if targeting-arm?
                linux-libre-arm
                (operating-system-kernel os)))
    ;; …
    )

In practice ‘targeting-arm?’ could be checking (%current-system) and
(%current-target-system), which is not entirely correct but good enough,
or, better yet, use that ‘let-system’ construct I sent you recently to
determine the actual target system.

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image.
  2017-11-13 10:54         ` Ludovic Courtès
@ 2017-11-13 11:54           ` Mathieu Othacehe
  2017-11-13 13:47             ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Mathieu Othacehe @ 2017-11-13 11:54 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 29281


> So the kernel you built doesn’t boot at all in “qemu-system-arm -M virt”?

Nope it does not with this command :

--8<---------------cut here---------------start------------->8---
qemu-system-arm -M virt -kernel
/gnu/store/13jqdcykaarbxzwxnryqinljcjh3k75g-linux-libre-arm-omap2plus-4.13.4/zImage
-nographic 
--8<---------------cut here---------------end--------------->8---

> In practice ‘targeting-arm?’ could be checking (%current-system) and
> (%current-target-system), which is not entirely correct but good enough,
> or, better yet, use that ‘let-system’ construct I sent you recently to
> determine the actual target system.
>
> Thoughts?

Sure it seems like a good idea, until we find better ! I'll try to setup
let-system and propose an updated patch.

Thanks for your help :)

Mathieu

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image.
  2017-11-13 11:54           ` Mathieu Othacehe
@ 2017-11-13 13:47             ` Ludovic Courtès
  2017-11-13 14:21               ` Mathieu Othacehe
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2017-11-13 13:47 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 29281

Mathieu Othacehe <m.othacehe@gmail.com> skribis:

>> So the kernel you built doesn’t boot at all in “qemu-system-arm -M virt”?
>
> Nope it does not with this command :
>
> qemu-system-arm -M virt -kernel
> /gnu/store/13jqdcykaarbxzwxnryqinljcjh3k75g-linux-libre-arm-omap2plus-4.13.4/zImage
> -nographic 

Oh, ARM is weird.  :-)

>> In practice ‘targeting-arm?’ could be checking (%current-system) and
>> (%current-target-system), which is not entirely correct but good enough,
>> or, better yet, use that ‘let-system’ construct I sent you recently to
>> determine the actual target system.
>>
>> Thoughts?
>
> Sure it seems like a good idea, until we find better ! I'll try to setup
> let-system and propose an updated patch.

I can polish the ‘let-system’ bits, because maybe that wasn’t fully
baked.  I’ll send it to guix-patches ASAP so you can review.  Sounds
good?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image.
  2017-11-13 13:47             ` Ludovic Courtès
@ 2017-11-13 14:21               ` Mathieu Othacehe
  0 siblings, 0 replies; 9+ messages in thread
From: Mathieu Othacehe @ 2017-11-13 14:21 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 29281


> I can polish the ‘let-system’ bits, because maybe that wasn’t fully
> baked.  I’ll send it to guix-patches ASAP so you can review.  Sounds
> good?

Sounds perfect !

Mathieu

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-11-13 14:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-13  7:22 [bug#29281] [PATCH] system: vm: Use linux-libre for system-disk-image Mathieu Othacehe
2017-11-13  9:38 ` Ludovic Courtès
2017-11-13  9:49   ` Mathieu Othacehe
2017-11-13 10:23     ` Ludovic Courtès
2017-11-13 10:47       ` Mathieu Othacehe
2017-11-13 10:54         ` Ludovic Courtès
2017-11-13 11:54           ` Mathieu Othacehe
2017-11-13 13:47             ` Ludovic Courtès
2017-11-13 14:21               ` Mathieu Othacehe

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.