system: image: Fix root offset on rockchip platforms.

Fixes: <https://issues.guix.gnu.org/45584>.

* gnu/system/image.scm (arm32-disk-image, arm64-disk-image): Turn into
procedures, taking the root partition offset as argument.
* gnu/system/images/novena.scm (novena-image-type): Adapt accordingly.
* gnu/system/images/pine64.scm (pine64-image-type): Ditto.
* gnu/system/images/pinebook-pro.scm (pinebook-pro-image-type): Use a 9MiB
offset for the root partition.
This commit is contained in:
Mathieu Othacehe 2021-01-02 17:56:25 +01:00
parent fcfa0490a5
commit b6473e506e
No known key found for this signature in database
GPG key ID: 8354763531769CA6
4 changed files with 11 additions and 9 deletions

View file

@ -128,21 +128,21 @@ (define iso9660-image
(label "GUIX_IMAGE")
(flags '(boot)))))))
(define arm32-disk-image
(define* (arm32-disk-image #:optional (offset root-offset))
(image
(format 'disk-image)
(target "arm-linux-gnueabihf")
(partitions
(list (partition
(inherit root-partition)
(offset root-offset))))
(offset offset))))
;; FIXME: Deleting and creating "/var/run" and "/tmp" on the overlayfs
;; fails.
(volatile-root? #f)))
(define arm64-disk-image
(define* (arm64-disk-image #:optional (offset root-offset))
(image
(inherit arm32-disk-image)
(inherit (arm32-disk-image offset))
(target "aarch64-linux-gnu")))
@ -189,12 +189,12 @@ (define uncompressed-iso-image-type
(define arm32-image-type
(image-type
(name 'arm32-raw)
(constructor (cut image-with-os arm32-disk-image <>))))
(constructor (cut image-with-os (arm32-disk-image) <>))))
(define arm64-image-type
(image-type
(name 'arm64-raw)
(constructor (cut image-with-os arm64-disk-image <>))))
(constructor (cut image-with-os (arm64-disk-image) <>))))
;;

View file

@ -52,7 +52,7 @@ (define novena-barebones-os
(define novena-image-type
(image-type
(name 'novena-raw)
(constructor (cut image-with-os arm32-disk-image <>))))
(constructor (cut image-with-os (arm32-disk-image) <>))))
(define novena-barebones-raw-image
(image

View file

@ -57,7 +57,7 @@ (define pine64-barebones-os
(define pine64-image-type
(image-type
(name 'pine64-raw)
(constructor (cut image-with-os arm64-disk-image <>))))
(constructor (cut image-with-os (arm64-disk-image) <>))))
(define pine64-barebones-raw-image
(image

View file

@ -57,7 +57,9 @@ (define pinebook-pro-barebones-os
(define pinebook-pro-image-type
(image-type
(name 'pinebook-pro-raw)
(constructor (cut image-with-os arm64-disk-image <>))))
(constructor (cut image-with-os
(arm64-disk-image (* 9 (expt 2 20))) ;9MiB
<>))))
(define pinebook-pro-barebones-raw-image
(image