From: Caliph Nomble via Guix-patches via <guix-patches@gnu.org>
To: "45584@debbugs.gnu.org" <45584@debbugs.gnu.org>
Cc: Mathieu Othacehe <othacehe@gnu.org>
Subject: [bug#45584] [PATCH 0/2] system: image: Fix root fs corruption from certain u-boot.
Date: Sun, 10 Jan 2021 00:48:33 +0000 [thread overview]
Message-ID: <XaDnfECdXA7BsEEFYRTYm2DkOtRe2-BlVF-k9jz-X30JFOMxNdCihvx8BN7WBzEKqJ-QLz4HMHC74I5i6-Ao5c2mE4B63NOYy38SpIdBCuk=@protonmail.com> (raw)
In-Reply-To: <87zh1rp8yx.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
Hi,
Sorry for the late response. I just got a chance to test on a pinebook-pro, and
was able to use a generated image on it. Screen wouldn't turn on but I got a
functioning shell on serial; I was still just using mainline
linux-libre-arm64-generic so I don't think that's a bootloader problem.
> 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.
I'm all for extensability, so that sounds good to me.
Over the past few days I've been playing with u-boot, and I think that the
install offset may be configurable, with the current offset just being used for
compatability with Rockchip's proprietary miniloader. I could make a patchset
to move u-boot up and test it out on the pinebook-pro and rockpro64, if that
would be a better solution?
Thanks!
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-offset.patch --]
[-- Type: text/x-diff; name=0001-offset.patch, Size: 3123 bytes --]
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")))
\f
@@ -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) <>))))
\f
;;
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
next prev parent reply other threads:[~2021-01-10 0:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-31 23:34 [bug#45584] [PATCH 0/2] system: image: Fix root fs corruption from certain u-boot Caliph Nomble via Guix-patches via
2021-01-01 1:11 ` [bug#45584] [PATCH 1/2] system: image: Add support for rockchip bootloader offsets Caliph Nomble via Guix-patches via
2021-01-01 1:12 ` [bug#45584] [PATCH 2/2] image: pinebook-pro: Fix pinebook-pro root filesystem Caliph Nomble via Guix-patches via
2021-01-01 16:10 ` [bug#45584] [PATCH 0/2] system: image: Fix root fs corruption from certain u-boot Mathieu Othacehe
2021-01-01 23:32 ` Caliph Nomble via Guix-patches via
2021-01-02 17:03 ` Mathieu Othacehe
2021-01-10 0:48 ` Caliph Nomble via Guix-patches via [this message]
2021-01-10 0:53 ` Caliph Nomble via Guix-patches via
2021-01-10 15:16 ` bug#45584: " Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='XaDnfECdXA7BsEEFYRTYm2DkOtRe2-BlVF-k9jz-X30JFOMxNdCihvx8BN7WBzEKqJ-QLz4HMHC74I5i6-Ao5c2mE4B63NOYy38SpIdBCuk=@protonmail.com' \
--to=guix-patches@gnu.org \
--cc=45584@debbugs.gnu.org \
--cc=calnomble@protonmail.com \
--cc=othacehe@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.