bug#55806: [PATCH] gnu: install: Add uvesafb service only on targets that support v86d.

2022-06-07 Thread pelzflorian (Florian Pelz)
On Tue, Jun 07, 2022 at 12:50:26PM +0200, pelzflorian (Florian Pelz) wrote:
> Ideally Guix System would run as seemlessly as the Ubuntu ARM cdimages
> work on Macs, but I can’t test and it is a different issue.

*on QEMU on Macs





bug#55806: [PATCH] gnu: install: Add uvesafb service only on targets that support v86d.

2022-06-07 Thread pelzflorian (Florian Pelz)
Pushed as 0aa43117907581779cf3f343c6175d98369b7e07.

Closing, even though I didn’t manage to boot it on QEMU.

Ideally Guix System would run as seemlessly as the Ubuntu ARM cdimages
work on Macs, but I can’t test and it is a different issue.

Regards,
Florian





bug#55806: [PATCH] gnu: install: Add uvesafb service only on targets that support v86d.

2022-06-06 Thread Josselin Poiret via Bug reports for GNU Guix
Hello Florian,
"pelzflorian (Florian Pelz)"  writes:

> On Mon, Jun 06, 2022 at 04:16:34PM +0200, Josselin Poiret via Bug reports for 
> GNU Guix wrote:
>> -  (service guix-service-type
>> -   (guix-configuration (authorize-key? #t)
>> -   (guix (current-guix
>
> I had to remove the (guix (current-guix)) but now `guix system image
> -t iso9660 gnu/system/install.scm` builds on a rock64 aarch64 machine,
> but it is still building and I could not yet test in qemu.  I have not
> tried the embedded-installation image.

Silly me, I really should move some of my WIP patches to other branches
to avoid these issues :(

Feel free to commit with the changes you mentioned, and thanks for the
tests (I only checked minimally with cross-compilation since I don't
have any aarch64 machines)!

Best,
-- 
Josselin Poiret





bug#55806: [PATCH] gnu: install: Add uvesafb service only on targets that support v86d.

2022-06-06 Thread pelzflorian (Florian Pelz)
Thank you so much Josselin.  I didn't know how to do this.
At the time building for ARM was no priority.

On Mon, Jun 06, 2022 at 04:16:34PM +0200, Josselin Poiret via Bug reports for 
GNU Guix wrote:
> -  (service guix-service-type
> -   (guix-configuration (authorize-key? #t)
> -   (guix (current-guix

I had to remove the (guix (current-guix)) but now `guix system image
-t iso9660 gnu/system/install.scm` builds on a rock64 aarch64 machine,
but it is still building and I could not yet test in qemu.  I have not
tried the embedded-installation image.

(I also had to disable tests on guile-fibers, but it is unrelated to
the bug and may be needed only on rock64, which has other unrelated
hangups when much RAM is used.)

I don't commit much except translations, but guess I should remove the
not working %host-type shenanigans in uvesafb-service-type, add your
copyright line and push.  I will do so when there are no other
comments.

Regards,
Florian





bug#55806: [PATCH] gnu: install: Add uvesafb service only on targets that support v86d.

2022-06-06 Thread Josselin Poiret via Bug reports for GNU Guix
* gnu/system/install.scm (%installation-services): Refactor into a
procedure, so that it can capture the system it's installing for.
Conditionally add uvesafb-service-type based on whether v86d is
supported by the target architecture.
(installation-os)[services]: Use the %installation-service procedure.
---
 gnu/system/install.scm | 245 +
 1 file changed, 128 insertions(+), 117 deletions(-)

diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index e46c1d34dd..5e4215864e 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -31,8 +31,10 @@ (define-module (gnu system install)
   #:use-module (guix store)
   #:use-module (guix monads)
   #:use-module (guix modules)
-  #:use-module ((guix packages) #:select (package-version))
+  #:use-module ((guix packages) #:select (package-version supported-package?))
+  #:use-module (guix platform)
   #:use-module ((guix store) #:select (%store-prefix))
+  #:use-module (guix utils)
   #:use-module (gnu installer)
   #:use-module (gnu system locale)
   #:use-module (gnu services avahi)
@@ -305,7 +307,10 @@ (define uvesafb-service-type
 "Load the @code{uvesafb} kernel module with the right options.")
(default-value #t)))
 
-(define %installation-services
+(define* (%installation-services #:key (system (or (and=>
+(%current-target-system)
+platform-target->system)
+   (%current-system
   ;; List of services of the installation system.
   (let ((motd (plain-file "motd" "
 \x1b[1;37mWelcome to the installation of GNU Guix!\x1b[0m
@@ -322,120 +327,126 @@ (define (normal-tty tty)
 (define bare-bones-os
   (load "examples/bare-bones.tmpl"))
 
-(list (service virtual-terminal-service-type)
-
-  (service kmscon-service-type
-   (kmscon-configuration
-(virtual-terminal "tty1")
-(login-program (installer-program
-
-  (login-service (login-configuration
-  (motd motd)))
-
-  ;; Documentation.  The manual is in UTF-8, but
-  ;; 'console-font-service' sets up Unicode support and loads a font
-  ;; with all the useful glyphs like em dash and quotation marks.
-  (service documentation-service-type "tty2")
-
-  ;; Documentation add-on.
-  %configuration-template-service
-
-  ;; A bunch of 'root' ttys.
-  (normal-tty "tty3")
-  (normal-tty "tty4")
-  (normal-tty "tty5")
-  (normal-tty "tty6")
-
-  ;; The usual services.
-  (syslog-service)
-
-  ;; Use the Avahi daemon to discover substitute servers on the local
-  ;; network.  It can be faster than fetching from remote servers.
-  (service avahi-service-type)
-
-  ;; The build daemon.  Register the default substitute server key(s)
-  ;; as trusted to allow the installation process to use substitutes by
-  ;; default.
-  (service guix-service-type
-   (guix-configuration (authorize-key? #t)
-   (guix (current-guix
-
-  ;; Start udev so that useful device nodes are available.
-  ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for
-  ;; regulations-compliant WiFi access.
-  (udev-service #:rules (list lvm2 crda))
-
-  ;; Add the 'cow-store' service, which users have to start manually
-  ;; since it takes the installation directory as an argument.
-  (cow-store-service)
-
-  ;; Install Unicode support and a suitable font.
-  (service console-font-service-type
-   (map (match-lambda
-  ("tty2"
-   ;; Use a font that contains characters such as
-   ;; curly quotes as found in the manual.
-   '("tty2" . "LatGrkCyr-8x16"))
-  (tty
-   ;; Use a font that doesn't have more than 256
-   ;; glyphs so that we can use colors with varying
-   ;; brightness levels (see note in setfont(8)).
-   `(,tty . "lat9u-16")))
-'("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
-
-  ;; To facilitate copy/paste.
-  (service gpm-service-type)
-
-  ;; Add an SSH server to facilitate remote installs.
-  (service openssh-service-type
-   (openssh-configuration
-(port-number 22)
-(permit-root-login #t)
-;; The root account is passwordless, so make sure
-;; a password is set before allowing logins.
-(allow-empty-passwords? #f)
-