fixed partitions issue

Stefano Manni stefano.manni at gmail.com
Wed Jul 30 03:45:08 PDT 2025


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 at 0 {
         label = "barebox";
         reg = <0x0 0x0100000>;
     };

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

     barebox_state: partition at 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 at mk8:/ md5sum /dev/nor0.barebox
937e462b306c7295096fb9446a97645f /dev/nor0.barebox
barebox at mk8:/ md5sum /dev/nor0.barebox-env
2fdd6851b32ae931637d4845c037b550 /dev/nor0.barebox-env
barebox at mk8:/ md5sum /dev/nor0.barebox-state
2fdd6851b32ae931637d4845c037b550 /dev/nor0.barebox-state

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

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

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

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

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

barebox at mk8:/ md5sum /dev/nor0.barebox
d41d8cd98f00b204e9800998ecf8427e /dev/nor0.barebox          -> it is 
NOT expected to change
barebox at mk8:/ md5sum /dev/nor0.barebox-env
d41d8cd98f00b204e9800998ecf8427e /dev/nor0.barebox-env      -> it is 
expected to change
barebox at 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













More information about the barebox mailing list