mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Çağlar Kilimci" <ckilimci@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox <barebox@lists.infradead.org>
Subject: Re: Reach out "dirty" state value
Date: Tue, 25 Apr 2017 12:17:47 +0300	[thread overview]
Message-ID: <CAGUZs0=7_Rg2pia3buPHytzLndjX0ai9JkAQ4RyeW7=SddH0Lw@mail.gmail.com> (raw)
In-Reply-To: <20170425064225.ubl6v2fdorcfbu63@pengutronix.de>

Hello,

>> 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>;
>
> 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@Phytec phyCORE AM335x:/ devinfo state
Parameters:
  dirty: 0
  optional: none
  partname: mmc0.1

barebox@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@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@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@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@Phytec phyCORE AM335x:/ devinfo state
Parameters:
  dirty: 1
  optional: none
  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                ................

Here is of_dump of state
barebox@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

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

  reply	other threads:[~2017-04-25  9:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-24  8:20 Çağlar Kilimci
2017-04-25  5:51 ` Sascha Hauer
2017-04-25  6:08   ` Çağlar Kilimci
2017-04-25  6:42     ` Sascha Hauer
2017-04-25  9:17       ` Çağlar Kilimci [this message]
2017-04-25 13:08         ` Çağlar Kilimci
2017-04-25 13:24           ` Çağlar Kilimci

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='CAGUZs0=7_Rg2pia3buPHytzLndjX0ai9JkAQ4RyeW7=SddH0Lw@mail.gmail.com' \
    --to=ckilimci@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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