Re: 05/36: vm: Make the device node procedure a parameter.

2020-05-03 Thread Ludovic Courtès
Hi!

Jan Nieuwenhuizen  skribis:

> We may even want to move this (and "friends") into the qemu-image
> declaration itself; in a much later patch on wip-hurd-vm I have
>
>  (define* qemu-image #:key
> [...]
> - (file-system-type "ext4")
> - (file-system-options '())
> - (device-nodes 'linux)
> + (file-system-type (if (hurd-target?) "ext2" "ext4"))
> + (file-system-options
> +  (if (hurd-target?) '("-o" "hurd") '()))
> + (device-nodes (if (hurd-target?) 'hurd 'linux))
>
> Having linux-specific defaults in a generic function is kind of awkward;
> we would need to change all callers, or ...

Ah yes, we should do something like that.

Ludo’.



Re: 05/36: vm: Make the device node procedure a parameter.

2020-05-01 Thread Jan Nieuwenhuizen
Ludovic Courtès writes:

>> vm: Make the device node procedure a parameter.
>>#:bootcfg-drv grub.cfg
>>#:bootloader grub-bootloader
>>#:register-closures? #f
>> +  #:device-nodes 'hurd
>>#:extra-directives hurd-directives))
>
> On ‘core-updates’, there’s already #:device-nodes 'hurd, though not on
> the same line.
>
> I think we can drop this patch, no?

Oops, sure; dropped.

We may even want to move this (and "friends") into the qemu-image
declaration itself; in a much later patch on wip-hurd-vm I have

 (define* qemu-image #:key
[...]
- (file-system-type "ext4")
- (file-system-options '())
- (device-nodes 'linux)
+ (file-system-type (if (hurd-target?) "ext2" "ext4"))
+ (file-system-options
+  (if (hurd-target?) '("-o" "hurd") '()))
+ (device-nodes (if (hurd-target?) 'hurd 'linux))

Having linux-specific defaults in a generic function is kind of awkward;
we would need to change all callers, or ...

Well, that's for later to be sure!

Greetings,
janeke

-- 
Jan Nieuwenhuizen  | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com



Re: 05/36: vm: Make the device node procedure a parameter.

2020-04-30 Thread Ludovic Courtès
Hi,

guix-comm...@gnu.org skribis:

> commit ddb44df650592a29528ef3f4a913336230b1d3a1
> Author: Ludovic Courtès 
> AuthorDate: Tue Apr 7 10:21:48 2020 +0200
>
> vm: Make the device node procedure a parameter.
> 
> * gnu/build/vm.scm (root-partition-initializer): Add #:make-device-nodes
> parameter and use it.
> * gnu/system/vm.scm (qemu-image): Add #:device-node parameter.  Pass
>  #:make-device-nodes to 'root-partition-initializer'.
> * gnu/system/hurd.scm (cross-hurd-image): Pass #:device-nodes 'hurd to
> 'qemu-image'.
> ---
>  gnu/system/hurd.scm | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
> index 2583ff0..059bfaf 100644
> --- a/gnu/system/hurd.scm
> +++ b/gnu/system/hurd.scm
> @@ -209,6 +209,7 @@ fi\n"))
>#:bootcfg-drv grub.cfg
>#:bootloader grub-bootloader
>#:register-closures? #f
> +  #:device-nodes 'hurd
>#:extra-directives hurd-directives))

On ‘core-updates’, there’s already #:device-nodes 'hurd, though not on
the same line.

I think we can drop this patch, no?

Ludo’.