diff options
| author | Mathieu Othacehe <othacehe@gnu.org> | 2021-01-02 17:56:25 +0100 |
|---|---|---|
| committer | Mathieu Othacehe <othacehe@gnu.org> | 2021-01-10 16:07:44 +0100 |
| commit | b6473e506e4161b539fe710fb1b3e69eaeac7069 (patch) | |
| tree | 2d9b5faa579cd61f31bb40938ea8dc36b9f014ed /gnu | |
| parent | fcfa0490a5e89545a928e3a3beccc9206b2ef112 (diff) | |
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.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/system/image.scm | 12 | ||||
| -rw-r--r-- | gnu/system/images/novena.scm | 2 | ||||
| -rw-r--r-- | gnu/system/images/pine64.scm | 2 | ||||
| -rw-r--r-- | gnu/system/images/pinebook-pro.scm | 4 |
4 files changed, 11 insertions, 9 deletions
diff --git a/gnu/system/image.scm b/gnu/system/image.scm index 67930750d55..90b9209988d 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm | |||
| @@ -128,21 +128,21 @@ | |||
| 128 | (label "GUIX_IMAGE") | 128 | (label "GUIX_IMAGE") |
| 129 | (flags '(boot))))))) | 129 | (flags '(boot))))))) |
| 130 | 130 | ||
| 131 | (define arm32-disk-image | 131 | (define* (arm32-disk-image #:optional (offset root-offset)) |
| 132 | (image | 132 | (image |
| 133 | (format 'disk-image) | 133 | (format 'disk-image) |
| 134 | (target "arm-linux-gnueabihf") | 134 | (target "arm-linux-gnueabihf") |
| 135 | (partitions | 135 | (partitions |
| 136 | (list (partition | 136 | (list (partition |
| 137 | (inherit root-partition) | 137 | (inherit root-partition) |
| 138 | (offset root-offset)))) | 138 | (offset offset)))) |
| 139 | ;; FIXME: Deleting and creating "/var/run" and "/tmp" on the overlayfs | 139 | ;; FIXME: Deleting and creating "/var/run" and "/tmp" on the overlayfs |
| 140 | ;; fails. | 140 | ;; fails. |
| 141 | (volatile-root? #f))) | 141 | (volatile-root? #f))) |
| 142 | 142 | ||
| 143 | (define arm64-disk-image | 143 | (define* (arm64-disk-image #:optional (offset root-offset)) |
| 144 | (image | 144 | (image |
| 145 | (inherit arm32-disk-image) | 145 | (inherit (arm32-disk-image offset)) |
| 146 | (target "aarch64-linux-gnu"))) | 146 | (target "aarch64-linux-gnu"))) |
| 147 | 147 | ||
| 148 | 148 | ||
| @@ -189,12 +189,12 @@ set to the given OS." | |||
| 189 | (define arm32-image-type | 189 | (define arm32-image-type |
| 190 | (image-type | 190 | (image-type |
| 191 | (name 'arm32-raw) | 191 | (name 'arm32-raw) |
| 192 | (constructor (cut image-with-os arm32-disk-image <>)))) | 192 | (constructor (cut image-with-os (arm32-disk-image) <>)))) |
| 193 | 193 | ||
| 194 | (define arm64-image-type | 194 | (define arm64-image-type |
| 195 | (image-type | 195 | (image-type |
| 196 | (name 'arm64-raw) | 196 | (name 'arm64-raw) |
| 197 | (constructor (cut image-with-os arm64-disk-image <>)))) | 197 | (constructor (cut image-with-os (arm64-disk-image) <>)))) |
| 198 | 198 | ||
| 199 | 199 | ||
| 200 | ;; | 200 | ;; |
diff --git a/gnu/system/images/novena.scm b/gnu/system/images/novena.scm index c4d25e850e8..dfaf2c60ee4 100644 --- a/gnu/system/images/novena.scm +++ b/gnu/system/images/novena.scm | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | (define novena-image-type | 52 | (define novena-image-type |
| 53 | (image-type | 53 | (image-type |
| 54 | (name 'novena-raw) | 54 | (name 'novena-raw) |
| 55 | (constructor (cut image-with-os arm32-disk-image <>)))) | 55 | (constructor (cut image-with-os (arm32-disk-image) <>)))) |
| 56 | 56 | ||
| 57 | (define novena-barebones-raw-image | 57 | (define novena-barebones-raw-image |
| 58 | (image | 58 | (image |
diff --git a/gnu/system/images/pine64.scm b/gnu/system/images/pine64.scm index f0b0c3f50d0..63b31399a5c 100644 --- a/gnu/system/images/pine64.scm +++ b/gnu/system/images/pine64.scm | |||
| @@ -57,7 +57,7 @@ | |||
| 57 | (define pine64-image-type | 57 | (define pine64-image-type |
| 58 | (image-type | 58 | (image-type |
| 59 | (name 'pine64-raw) | 59 | (name 'pine64-raw) |
| 60 | (constructor (cut image-with-os arm64-disk-image <>)))) | 60 | (constructor (cut image-with-os (arm64-disk-image) <>)))) |
| 61 | 61 | ||
| 62 | (define pine64-barebones-raw-image | 62 | (define pine64-barebones-raw-image |
| 63 | (image | 63 | (image |
diff --git a/gnu/system/images/pinebook-pro.scm b/gnu/system/images/pinebook-pro.scm index b038e262cb8..02a0b8132d4 100644 --- a/gnu/system/images/pinebook-pro.scm +++ b/gnu/system/images/pinebook-pro.scm | |||
| @@ -57,7 +57,9 @@ | |||
| 57 | (define pinebook-pro-image-type | 57 | (define pinebook-pro-image-type |
| 58 | (image-type | 58 | (image-type |
| 59 | (name 'pinebook-pro-raw) | 59 | (name 'pinebook-pro-raw) |
| 60 | (constructor (cut image-with-os arm64-disk-image <>)))) | 60 | (constructor (cut image-with-os |
| 61 | (arm64-disk-image (* 9 (expt 2 20))) ;9MiB | ||
| 62 | <>)))) | ||
| 61 | 63 | ||
| 62 | (define pinebook-pro-barebones-raw-image | 64 | (define pinebook-pro-barebones-raw-image |
| 63 | (image | 65 | (image |
