mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Stefano Manni <stefano.manni@gmail.com>
To: barebox <barebox@lists.infradead.org>
Subject: fixed partitions issue
Date: Wed, 30 Jul 2025 12:45:08 +0200	[thread overview]
Message-ID: <8JK70T.9NOP3AIQTVWR@gmail.com> (raw)

Dear all,

I'm encountering an issue with fixed-partitions on spinor with 
v2025.07.0 that
was not there in v2025.01.0.

The partitions are configured as follows:

 partitions {
     compatible = "fixed-partitions";
     #size-cells = <1>;
     #address-cells = <1>;

     barebox: partition@0 {
         label = "barebox";
         reg = <0x0 0x0100000>;
     };

     barebox_env: partition@100000 {
         label = "barebox-env";
         reg = <0x0100000 0x100000>;
     };

     barebox_state: partition@200000 {
         label = "barebox-state";
         reg = <0x0100000 0x100000>;
     };
 };

It seems to me the partition offsets (0, 0x100000, 0x200000) are not 
taken into account
so the results is that all the partitions point to the same piece of 
memory. That's how I tested it:

############
# v2025.01.0

barebox@mk8:/ md5sum /dev/nor0.barebox
937e462b306c7295096fb9446a97645f /dev/nor0.barebox
barebox@mk8:/ md5sum /dev/nor0.barebox-env
2fdd6851b32ae931637d4845c037b550 /dev/nor0.barebox-env
barebox@mk8:/ md5sum /dev/nor0.barebox-state
2fdd6851b32ae931637d4845c037b550 /dev/nor0.barebox-state

barebox@mk8:/ nv a=a
nv variable modified, will save nv variables on shutdown
barebox@mk8:/ nv -s
envfs: no envfs (magic mismatch) - envfs never written?

barebox@mk8:/ md5sum /dev/nor0.barebox
937e462b306c7295096fb9446a97645f /dev/nor0.barebox
barebox@mk8:/ md5sum /dev/nor0.barebox-env
392559d1b391d7fe69e36d068998983c /dev/nor0.barebox-env       -> it is 
expected to change
barebox@mk8:/ md5sum /dev/nor0.barebox-state
2fdd6851b32ae931637d4845c037b550 /dev/nor0.barebox-state

############
# v2025.07.0

barebox@mk8:/ md5sum /dev/nor0.barebox
01b367b04e57af6f4153b0043da594bc /dev/nor0.barebox
barebox@mk8:/ md5sum /dev/nor0.barebox-env
01b367b04e57af6f4153b0043da594bc /dev/nor0.barebox-env
barebox@mk8:/ md5sum /dev/nor0.barebox-state
01b367b04e57af6f4153b0043da594bc /dev/nor0.barebox-state

barebox@mk8:/ nv a=a
nv variable modified, will save nv variables on shutdown
barebox@mk8:/ nv -s
envfs: no envfs (magic mismatch) - envfs never written?

barebox@mk8:/ md5sum /dev/nor0.barebox
d41d8cd98f00b204e9800998ecf8427e /dev/nor0.barebox          -> it is 
NOT expected to change
barebox@mk8:/ md5sum /dev/nor0.barebox-env
d41d8cd98f00b204e9800998ecf8427e /dev/nor0.barebox-env      -> it is 
expected to change
barebox@mk8:/ md5sum /dev/nor0.barebox-state
d41d8cd98f00b204e9800998ecf8427e /dev/nor0.barebox-state    -> it is 
NOT expected to change


Do you have any hint? After the changes on drivers/of/partition.c 
between v2025.01.0 and v2025.07.0
shall I need to change something in my dts?

Best,
Stefano













             reply	other threads:[~2025-07-30 10:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-30 10:45 Stefano Manni [this message]
2025-07-30 12:40 ` Ahmad Fatoum
2025-07-31 17:43   ` Stefano Manni
2025-08-05  5:24     ` Ahmad Fatoum

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=8JK70T.9NOP3AIQTVWR@gmail.com \
    --to=stefano.manni@gmail.com \
    --cc=barebox@lists.infradead.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox