Reach out "dirty" state value

Çağlar Kilimci ckilimci at gmail.com
Tue Apr 25 02:17:47 PDT 2017


Hello,

>> barebox at Phytec phyCORE AM335x:/ of_dump /state
>> state {
>>         magic = <0x4aaef393>;
>>         compatible = "barebox,state";
>>         backend-type = "raw";
>>         backend = <0x3f>;
>>         backend-storage-type = "direct";
>>         backend-stridesize = <0x10>;
>
> The stridesize is too small. It must be at least the size of one state
> instance storage space which is the size of your data (0x20) and the
> size of the header (0xc), so total 0x2c. However, I recommend a bigger
> value, maybe 0x40 or 0x80.
> There should be an error message when the stridesize is too small.

Nothing changed even if the value of 0x80.

Here are some output, they may give you an idea:

barebox at Phytec phyCORE AM335x:/ devinfo state
Parameters:
  dirty: 0
  optional: none
  partname: mmc0.1

barebox at Phytec phyCORE AM335x:/ md -s /dev/eeprom0
00000000: 4aaef393 00200000 7b88e6a4 d0dfb994                ...J.. ....{....
00000010: 30636d6d 0000312e 00000000 00000000                mmc0.1..........
00000020: 656e6f6e 00000000 00000000 00000000                none............
00000030: 4aaef393 00200000 7b88e6a4 d0dfb994                ...J.. ....{....
00000040: 30636d6d 0000312e 00000000 00000000                mmc0.1..........
00000050: 656e6f6e 00000000 00000000 00000000                none............
00000060: 00000065 00000000 00000000 00000000                e...............
00000070: 00000000 00000000 00000000 6e6f6e00                .............non
00000080: 00000065 00000000 00000000 00000000                e...............
00000090: 00000000 ffff0000 ffffffff ffffffff                ................
000000a0: ffffffff fdf3ffff 003b2354 f3630000                ........T#;...c.
000000b0: 0000456e d8a5002b 9732f9fc 0000873f                nE..+.....2.?...
000000c0: 65646568 00000000 00000000 00000000                hede............
000000d0: 656e6f6e 00000000 00000000 00000000                none............
000000e0: 00000000 00000000 ffffff00 ffffffff                ................
000000f0: ffffffff ffffffff ffffffff ffffffff                ................

Then boot:
root at phyboard-wega-am335x-1:~# barebox-state -n /state -d
No backend-storage-type found, using default.
WARNING, no stridesize given although we use a direct file write.
Starting in degraded mode
Failed to initialize desired amount of direct buckets, only 1 of 3 succeeded
New state registered 'state'
partname=mmc0.1
optional=none

root at phyboard-wega-am335x-1:~# barebox-state -n /state -s partname=mmc0.2
No backend-storage-type found, using default.
WARNING, no stridesize given although we use a direct file write.
Starting in degraded mode
Failed to initialize desired amount of direct buckets, only 1 of 3 succeeded
New state registered 'state'

root at phyboard-wega-am335x-1:~# barebox-state -n /state -d
No backend-storage-type found, using default.
WARNING, no stridesize given although we use a direct file write.
Starting in degraded mode
Failed to initialize desired amount of direct buckets, only 1 of 3 succeeded
New state registered 'state'
partname=mmc0.2
optional=none

And then, reboot:
barebox at Phytec phyCORE AM335x:/ devinfo state
Parameters:
  dirty: 1
  optional: none
  partname: mmc0.1

barebox at Phytec phyCORE AM335x:/ md -s /dev/eeprom0
00000000: 2354fdf3 00000030 4aaef393 00200000                ..T#0......J.. .
00000010: c81ccb67 c3f780e7 30636d6d 0000322e                g.......mmc0.2..
00000020: 00000000 00000000 656e6f6e 00000000                ........none....
00000030: 00000000 00000000 7b88e6a4 d0dfb994                ...........{....
00000040: 30636d6d 0000312e 00000000 00000000                mmc0.1..........
00000050: 656e6f6e 00000000 00000000 00000000                none............
00000060: 00000065 00000000 00000000 00000000                e...............
00000070: 00000000 00000000 00000000 6e6f6e00                .............non
00000080: 00000065 00000000 00000000 00000000                e...............
00000090: 00000000 ffff0000 ffffffff ffffffff                ................
000000a0: ffffffff fdf3ffff 003b2354 f3630000                ........T#;...c.
000000b0: 0000456e d8a5002b 9732f9fc 0000873f                nE..+.....2.?...
000000c0: 65646568 00000000 00000000 00000000                hede............
000000d0: 656e6f6e 00000000 00000000 00000000                none............
000000e0: 00000000 00000000 ffffff00 ffffffff                ................
000000f0: ffffffff ffffffff ffffffff ffffffff                ................

Here is of_dump of state
barebox at Phytec phyCORE AM335x:/ of_dump /state
state {
        magic = <0x4aaef393>;
        compatible = "barebox,state";
        backend-type = "raw";
        backend = <0x3f>;
        backend-storage-type = "direct";
        backend-stridesize = <0x80>;
        partname {
                reg = <0x0 0x10>;
                type = "string";
                default = "mmc0.1";
        };
        optional {
                reg = <0x10 0x10>;
                type = "string";
                default = "none";
        };
};



-- 
Çağlar Kilimci



More information about the barebox mailing list