mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* fixed partitions issue
@ 2025-07-30 10:45 Stefano Manni
  2025-07-30 12:40 ` Ahmad Fatoum
  0 siblings, 1 reply; 4+ messages in thread
From: Stefano Manni @ 2025-07-30 10:45 UTC (permalink / raw)
  To: barebox

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













^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-05  5:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-07-30 10:45 fixed partitions issue Stefano Manni
2025-07-30 12:40 ` Ahmad Fatoum
2025-07-31 17:43   ` Stefano Manni
2025-08-05  5:24     ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox