[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45584] [PATCH 0/2] system: image: Fix root fs corruption from certa
From: |
Mathieu Othacehe |
Subject: |
[bug#45584] [PATCH 0/2] system: image: Fix root fs corruption from certain u-boot. |
Date: |
Sat, 02 Jan 2021 18:03:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hey,
> I was originally considering doing something like that, but I was unsure how
> that'd interact with --image-type (unless there's another way to specify an
> image that I don't know of)? Would there still just be multiple image-types
> but
> with procedural disk-images?
Here's an attached patch that should do that, but I'm not sure it brings
a real improvement, unless there are a lot of different offset out
there.
>> Were you able to actually use the generated image on a pinebook-pro? I
>> added support for this machine without being able to test it.
>
> I just tried to use it on one, but I was unable to get it to boot. I'm not
> sure
> why, exactly, as I didn't have a chance to open it up to enable serial. Could
> just be the kernel, seeing as wip-pinebook-pro has its own patched linux-libre
> (which I was unable to get working with an inferior on the main branch, but
> I don't really know how to use them anyway).
It looks like the wip-pinebook-pro is adding some kernel patches, maybe
you could try to apply them directly on master?
> I did, however, test these changes on a rockpro64 (both pinebook-pro and
> rockpro64 use the rk3399 SoC), and it did fix fs corruption preventing proper
> boot.
That's nice, thanks for your work!
Mathieu
>From 2c0806c28ae5ca07cba136ce2e32a7de0702693d Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
Date: Sat, 2 Jan 2021 17:56:25 +0100
Subject: [PATCH] offset
---
gnu/system/image.scm | 12 ++++++------
gnu/system/images/novena.scm | 2 +-
gnu/system/images/pine64.scm | 2 +-
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 67930750d5..90b9209988 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -128,21 +128,21 @@
(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 @@ set to the given OS."
(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) <>))))
;;
diff --git a/gnu/system/images/novena.scm b/gnu/system/images/novena.scm
index c4d25e850e..dfaf2c60ee 100644
--- a/gnu/system/images/novena.scm
+++ b/gnu/system/images/novena.scm
@@ -52,7 +52,7 @@
(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
diff --git a/gnu/system/images/pine64.scm b/gnu/system/images/pine64.scm
index f0b0c3f50d..63b31399a5 100644
--- a/gnu/system/images/pine64.scm
+++ b/gnu/system/images/pine64.scm
@@ -57,7 +57,7 @@
(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
diff --git a/gnu/system/images/pinebook-pro.scm
b/gnu/system/images/pinebook-pro.scm
index b038e262cb..02a0b8132d 100644
--- a/gnu/system/images/pinebook-pro.scm
+++ b/gnu/system/images/pinebook-pro.scm
@@ -57,7 +57,9 @@
(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
--
2.29.2