Re: Reach out "dirty" state value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sascha,

2017-04-25 8:51 GMT+03:00 Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>:
> Hi Çağlar,
>
> On Mon, Apr 24, 2017 at 11:20:47AM +0300, Çağlar Kilimci wrote:
>> Hi all,
>>
>> I would like to use state framework and now I can read variables from
>> both barebox and regular kernel space. In addition, if I can change
>> from barebox, I can successfully read the changes from kernel space
>> but if I change from kernel space, I could not reach out the new value
>> from barebox. The dirty variable is set and I can see the new value
>> from eeprom (where I store the values) but I guess there would be
>> better way to reach out the "dirty" values. So, how can I read last
>> value for that state variable?
>
> If you get outdated variables in barebox that's a bug. You are on latest
> master, right? Do you have stridesize specified in the devicetree?

Yes, I am on the latest master. And yes, I have specified stridsize.
Here is my of_dump of my state device:

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

I do not know how to calculate stridsize.

Here is my state variable value and layout in the eeprom:
barebox@Phytec phyCORE AM335x:/ echo $state.partname
mmc0.1
barebox@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                ................

And here is the output from Linux side:
root@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

--
Çağlar Kilimci

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux