guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/05: system: images: Define the platform in image-types.


From: guix-commits
Subject: 05/05: system: images: Define the platform in image-types.
Date: Wed, 7 Sep 2022 08:25:29 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit e917f1242c169f011dedd133515de5e87e267b93
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Wed Sep 7 10:49:05 2022 +0200

    system: images: Define the platform in image-types.
    
    Running the following command where my-pine.scm contains an operating-system
    declaration:
    
    guix system image --image-type=pine64-raw my-pine.scm
    
    returns:
    
    guix system: error: package linux-libre-arm64-generic@5.18.19 does not 
support
    x86_64-linux
    
    That's because there's no platform defined in the pine64-raw image-type, 
hence
    the guix system image tries to build the image for the host architecture.
    
    * gnu/system/images/novena.scm (novena-image-type): Use the armv7-linux 
platform.
    * gnu/system/images/pine64.scm (pine64-image-type): Use the aarch64-linux 
platform.
    * gnu/system/images/pinebook-pro.scm (pinebook-pro-image-type): Use the 
aarch64-linux platform.
    * gnu/system/images/rock64.scm (rock64-image-type): Use the aarch64-linux 
platform.
---
 gnu/system/images/novena.scm       | 6 +++++-
 gnu/system/images/pine64.scm       | 6 +++++-
 gnu/system/images/pinebook-pro.scm | 9 ++++++---
 gnu/system/images/rock64.scm       | 8 +++++---
 4 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/gnu/system/images/novena.scm b/gnu/system/images/novena.scm
index b9ff6dcfea..810e2bed5f 100644
--- a/gnu/system/images/novena.scm
+++ b/gnu/system/images/novena.scm
@@ -53,7 +53,11 @@
 (define novena-image-type
   (image-type
    (name 'novena-raw)
-   (constructor (cut image-with-os (raw-with-offset-disk-image) <>))))
+   (constructor (lambda (os)
+                  (image
+                   (inherit (raw-with-offset-disk-image))
+                   (operating-system os)
+                   (platform armv7-linux))))))
 
 (define novena-barebones-raw-image
   (image
diff --git a/gnu/system/images/pine64.scm b/gnu/system/images/pine64.scm
index 99c4ed6ceb..a2d471b802 100644
--- a/gnu/system/images/pine64.scm
+++ b/gnu/system/images/pine64.scm
@@ -58,7 +58,11 @@
 (define pine64-image-type
   (image-type
    (name 'pine64-raw)
-   (constructor (cut image-with-os (raw-with-offset-disk-image) <>))))
+   (constructor (lambda (os)
+                  (image
+                   (inherit (raw-with-offset-disk-image))
+                   (operating-system os)
+                   (platform aarch64-linux))))))
 
 (define pine64-barebones-raw-image
   (image
diff --git a/gnu/system/images/pinebook-pro.scm 
b/gnu/system/images/pinebook-pro.scm
index 7e8910427e..3a0f3abf1f 100644
--- a/gnu/system/images/pinebook-pro.scm
+++ b/gnu/system/images/pinebook-pro.scm
@@ -58,9 +58,12 @@
 (define pinebook-pro-image-type
   (image-type
    (name 'pinebook-pro-raw)
-   (constructor (cut image-with-os
-                     (raw-with-offset-disk-image (* 9 (expt 2 20))) ;9MiB
-                     <>))))
+   (constructor (lambda (os)
+                  (image
+                   (inherit
+                    (raw-with-offset-disk-image (* 9 (expt 2 20)))) ;9MiB
+                   (operating-system os)
+                   (platform aarch64-linux))))))
 
 (define pinebook-pro-barebones-raw-image
   (image
diff --git a/gnu/system/images/rock64.scm b/gnu/system/images/rock64.scm
index 68cb65f115..b3dcfc6193 100644
--- a/gnu/system/images/rock64.scm
+++ b/gnu/system/images/rock64.scm
@@ -54,9 +54,11 @@
 (define rock64-image-type
   (image-type
    (name 'rock64-raw)
-   (constructor (cut image-with-os
-                     (raw-with-offset-disk-image (expt 2 24))
-                     <>))))
+   (constructor (lambda (os)
+                  (image
+                   (inherit (raw-with-offset-disk-image (expt 2 24)))
+                   (operating-system os)
+                   (platform aarch64-linux))))))
 
 (define rock64-barebones-raw-image
   (image



reply via email to

[Prev in Thread] Current Thread [Next in Thread]