emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#45021: closed ([PATCH 1/2] image: Add system field.)


From: GNU bug Tracking System
Subject: bug#45021: closed ([PATCH 1/2] image: Add system field.)
Date: Mon, 11 Oct 2021 12:07:02 +0000

Your message dated Mon, 11 Oct 2021 12:06:21 +0000
with message-id <87sfx722bm.fsf_-_@gnu.org>
and subject line Re: bug#45020: [PATCH 0/2] image: Add system field.
has caused the debbugs.gnu.org bug report #45020,
regarding [PATCH 1/2] image: Add system field.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
45020: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=45020
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH 1/2] image: Add system field. Date: Thu, 3 Dec 2020 11:53:52 +0100
* gnu/image.scm (<system>): New field.
* gnu/system/image.scm (arm32-disk-image, arm64-disk-image): Set the system
field.
(system-image): Do not try to cross-compile if we are running on the
appropriate system.
* gnu/system/images/hurd.scm (hurd-disk-image): Set the system field.
---
 gnu/image.scm              |  3 +++
 gnu/system/image.scm       | 12 +++++++++++-
 gnu/system/images/hurd.scm |  1 +
 3 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/image.scm b/gnu/image.scm
index a60d83b175..a56710d540 100644
--- a/gnu/image.scm
+++ b/gnu/image.scm
@@ -33,6 +33,7 @@
             image
             image-name
             image-format
+            image-system
             image-target
             image-size
             image-operating-system
@@ -77,6 +78,8 @@
   (name               image-name ;symbol
                       (default #f))
   (format             image-format) ;symbol
+  (system             image-system
+                      (default #f))
   (target             image-target
                       (default #f))
   (size               image-size  ;size in bytes as integer
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index 4972d9067b..f3d5734381 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -131,6 +131,7 @@
 (define arm32-disk-image
   (image
    (format 'disk-image)
+   (system "armhf-linux")
    (target "arm-linux-gnueabihf")
    (partitions
     (list (partition
@@ -143,6 +144,7 @@
 (define arm64-disk-image
   (image
    (inherit arm32-disk-image)
+   (system "aarch64-linux")
    (target "aarch64-linux-gnu")))
 
 
@@ -613,7 +615,15 @@ it can be used for bootloading."
   "Return the derivation of IMAGE.  It can be a raw disk-image or an ISO9660
 image, depending on IMAGE format."
   (define substitutable? (image-substitutable? image))
-  (define target (image-target image))
+
+  ;; The image definition may provide the appropriate "system" architecture
+  ;; for the image.  If we are already running on this system, the image can
+  ;; be built natively.  If we are running on a different system, then we need
+  ;; to cross-compile, using the "target" provided by the image definition.
+  (define system (image-system image))
+  (define target (if (eq? system (%current-system))
+                     #f
+                     (image-target image)))
 
   (with-parameters ((%current-target-system target))
     (let* ((os (operating-system-for-image image))
diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm
index 4417952c5d..6e7dbaa7a7 100644
--- a/gnu/system/images/hurd.scm
+++ b/gnu/system/images/hurd.scm
@@ -75,6 +75,7 @@
 (define hurd-disk-image
   (image
    (format 'disk-image)
+   (system "i586-gnu")
    (target "i586-pc-gnu")
    (partitions
     (list (partition
-- 
2.29.2




--- End Message ---
--- Begin Message --- Subject: Re: bug#45020: [PATCH 0/2] image: Add system field. Date: Mon, 11 Oct 2021 12:06:21 +0000 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hey,

> I plan to push that one in the next few days.

Pushed, thanks,

Mathieu


--- End Message ---

reply via email to

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