* bareboxenv usage
@ 2011-09-12 13:54 Boaz Ben-David
2011-09-13 8:59 ` Boaz Ben-David
0 siblings, 1 reply; 8+ messages in thread
From: Boaz Ben-David @ 2011-09-12 13:54 UTC (permalink / raw)
To: barebox
Hi
I am using bareboxenv on a MLC NAND chip for reading and writing the
barebox environment on my imx35 board.
Up until now I have been using it with the mtdblock devices and suddenly
I noticed I get an error while reading (-l) the env(I/O error).
Using bareboxenv with the same partition but in the /dev/mtd form the
read works.
For some reason I assumed that I need to use the bareboxenv with
mtdblock devices.
Question is, what is the CORRECT way to use it on a nand partition?
Thanks,
Boaz.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: bareboxenv usage
2011-09-12 13:54 bareboxenv usage Boaz Ben-David
@ 2011-09-13 8:59 ` Boaz Ben-David
2011-09-13 9:14 ` Marc Kleine-Budde
0 siblings, 1 reply; 8+ messages in thread
From: Boaz Ben-David @ 2011-09-13 8:59 UTC (permalink / raw)
To: barebox
On 09/12/11 16:54, Boaz Ben-David wrote:
> Hi
>
> I am using bareboxenv on a MLC NAND chip for reading and writing the
> barebox environment on my imx35 board.
> Up until now I have been using it with the mtdblock devices and suddenly
> I noticed I get an error while reading (-l) the env(I/O error).
> Using bareboxenv with the same partition but in the /dev/mtd form the
> read works.
> For some reason I assumed that I need to use the bareboxenv with
> mtdblock devices.
> Question is, what is the CORRECT way to use it on a nand partition?
>
> Thanks,
>
> Boaz.
>
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
I see no one answered this, maybe I need to shorten my question (:
All I am asking is: do I need to use /dev/mtdblock or /dev/mtd when
loading and saving envs
with bareboxenv?
Thanks,
Boaz.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: bareboxenv usage
2011-09-13 8:59 ` Boaz Ben-David
@ 2011-09-13 9:14 ` Marc Kleine-Budde
2011-09-13 9:48 ` Boaz Ben-David
0 siblings, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2011-09-13 9:14 UTC (permalink / raw)
To: Boaz Ben-David; +Cc: barebox
[-- Attachment #1.1: Type: text/plain, Size: 674 bytes --]
On 09/13/2011 10:59 AM, Boaz Ben-David wrote:
> All I am asking is: do I need to use /dev/mtdblock or /dev/mtd when
> loading and saving envs
neither nor - loadenv & saveenv are not bad block aware. In barebox you
use the .bb devices, which are bad block are, under linux use nandwrite
+ nanddump to write or read data from the nand into a file. Then use
loadenv/saveenv.
cheers, Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: bareboxenv usage
2011-09-13 9:14 ` Marc Kleine-Budde
@ 2011-09-13 9:48 ` Boaz Ben-David
2011-09-13 11:25 ` Boaz Ben-David
2011-09-13 12:01 ` Marc Kleine-Budde
0 siblings, 2 replies; 8+ messages in thread
From: Boaz Ben-David @ 2011-09-13 9:48 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: barebox
On 09/13/11 12:14, Marc Kleine-Budde wrote:
> On 09/13/2011 10:59 AM, Boaz Ben-David wrote:
>> All I am asking is: do I need to use /dev/mtdblock or /dev/mtd when
>> loading and saving envs
> neither nor - loadenv& saveenv are not bad block aware. In barebox you
> use the .bb devices, which are bad block are, under linux use nandwrite
> + nanddump to write or read data from the nand into a file. Then use
> loadenv/saveenv.
>
> cheers, Marc
>
Hi,
Thanks for the reply.
First question, please tell me if these sequences are correct:
In Linux:
- Read:
1.nanddump from the mtd device to a file.
2.bareboxenv -l the file dumped.
-Write:
1.bareboxenv -s from source directory to a file
2.nandwrite that file to the mtd device.
Second question is: what would be the same sequences under barebox?
Thanks,
Boaz.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: bareboxenv usage
2011-09-13 9:48 ` Boaz Ben-David
@ 2011-09-13 11:25 ` Boaz Ben-David
2011-09-13 12:00 ` Marc Kleine-Budde
2011-09-13 12:01 ` Marc Kleine-Budde
1 sibling, 1 reply; 8+ messages in thread
From: Boaz Ben-David @ 2011-09-13 11:25 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: barebox
On 09/13/11 12:48, Boaz Ben-David wrote:
> On 09/13/11 12:14, Marc Kleine-Budde wrote:
>> On 09/13/2011 10:59 AM, Boaz Ben-David wrote:
>>> All I am asking is: do I need to use /dev/mtdblock or /dev/mtd when
>>> loading and saving envs
>> neither nor - loadenv& saveenv are not bad block aware. In barebox you
>> use the .bb devices, which are bad block are, under linux use nandwrite
>> + nanddump to write or read data from the nand into a file. Then use
>> loadenv/saveenv.
>>
>> cheers, Marc
>>
> Hi,
>
>
> Thanks for the reply.
>
> First question, please tell me if these sequences are correct:
>
> In Linux:
>
> - Read:
>
> 1.nanddump from the mtd device to a file.
>
> 2.bareboxenv -l the file dumped.
>
> -Write:
>
> 1.bareboxenv -s from source directory to a file
>
> 2.nandwrite that file to the mtd device.
>
>
> Second question is: what would be the same sequences under barebox?
>
>
> Thanks,
>
>
> Boaz.
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
There's something I don't get.
If loadenv/saveenv are not bad-block aware, why are they used in barebox
by default?
When the system boots envfs_load is used to load the environment from
/dev/env0 or whatever.
If /dev/env0 is not bad-block aware device (like the bb devices) this
means this could fail because of
a bad block in the env partition. Am I right?
Thanks,
Boaz.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: bareboxenv usage
2011-09-13 11:25 ` Boaz Ben-David
@ 2011-09-13 12:00 ` Marc Kleine-Budde
0 siblings, 0 replies; 8+ messages in thread
From: Marc Kleine-Budde @ 2011-09-13 12:00 UTC (permalink / raw)
To: Boaz Ben-David; +Cc: barebox
[-- Attachment #1.1: Type: text/plain, Size: 910 bytes --]
On 09/13/2011 01:25 PM, Boaz Ben-David wrote:
> There's something I don't get.
>
> If loadenv/saveenv are not bad-block aware, why are they used in barebox
> by default?
They operate on bad block aware devices (in barebox) by default.
> When the system boots envfs_load is used to load the environment from
> /dev/env0 or whatever.
>
> If /dev/env0 is not bad-block aware device (like the bb devices) this
> means this could fail because of
> a bad block in the env partition. Am I right?
Nope - the raw NAND is usually attached as "/dev/env0_raw" and the bad
block aware device as "/dev/env0".
cheers, Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: bareboxenv usage
2011-09-13 9:48 ` Boaz Ben-David
2011-09-13 11:25 ` Boaz Ben-David
@ 2011-09-13 12:01 ` Marc Kleine-Budde
2011-09-13 12:07 ` Boaz Ben-David
1 sibling, 1 reply; 8+ messages in thread
From: Marc Kleine-Budde @ 2011-09-13 12:01 UTC (permalink / raw)
To: Boaz Ben-David; +Cc: barebox
[-- Attachment #1.1: Type: text/plain, Size: 1258 bytes --]
On 09/13/2011 11:48 AM, Boaz Ben-David wrote:
> On 09/13/11 12:14, Marc Kleine-Budde wrote:
>> On 09/13/2011 10:59 AM, Boaz Ben-David wrote:
>>> All I am asking is: do I need to use /dev/mtdblock or /dev/mtd when
>>> loading and saving envs
>> neither nor - loadenv& saveenv are not bad block aware. In barebox you
>> use the .bb devices, which are bad block are, under linux use nandwrite
>> + nanddump to write or read data from the nand into a file. Then use
>> loadenv/saveenv.
>>
>> cheers, Marc
>>
>
> Hi,
>
>
> Thanks for the reply.
>
> First question, please tell me if these sequences are correct:
basically yes....but
> In Linux:
>
> - Read:
>
> 1.nanddump from the mtd device to a file.
read the nanddump help text, you need to skip bad blocks
> 2.bareboxenv -l the file dumped.
>
> -Write:
>
> 1.bareboxenv -s from source directory to a file
>
> 2.nandwrite that file to the mtd device.
use padding
cheers, Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: bareboxenv usage
2011-09-13 12:01 ` Marc Kleine-Budde
@ 2011-09-13 12:07 ` Boaz Ben-David
0 siblings, 0 replies; 8+ messages in thread
From: Boaz Ben-David @ 2011-09-13 12:07 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: barebox
On 09/13/11 15:01, Marc Kleine-Budde wrote:
> On 09/13/2011 11:48 AM, Boaz Ben-David wrote:
>> On 09/13/11 12:14, Marc Kleine-Budde wrote:
>>> On 09/13/2011 10:59 AM, Boaz Ben-David wrote:
>>>> All I am asking is: do I need to use /dev/mtdblock or /dev/mtd when
>>>> loading and saving envs
>>> neither nor - loadenv& saveenv are not bad block aware. In barebox you
>>> use the .bb devices, which are bad block are, under linux use nandwrite
>>> + nanddump to write or read data from the nand into a file. Then use
>>> loadenv/saveenv.
>>>
>>> cheers, Marc
>>>
>> Hi,
>>
>>
>> Thanks for the reply.
>>
>> First question, please tell me if these sequences are correct:
> basically yes....but
>
>> In Linux:
>>
>> - Read:
>>
>> 1.nanddump from the mtd device to a file.
> read the nanddump help text, you need to skip bad blocks
>
>> 2.bareboxenv -l the file dumped.
>>
>> -Write:
>>
>> 1.bareboxenv -s from source directory to a file
>>
>> 2.nandwrite that file to the mtd device.
> use padding
>
> cheers, Marc
>
Hi,
This was psuedo command line (:
Of course I will use padding and skip bb...
Thanks,
Boaz.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-09-13 12:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-12 13:54 bareboxenv usage Boaz Ben-David
2011-09-13 8:59 ` Boaz Ben-David
2011-09-13 9:14 ` Marc Kleine-Budde
2011-09-13 9:48 ` Boaz Ben-David
2011-09-13 11:25 ` Boaz Ben-David
2011-09-13 12:00 ` Marc Kleine-Budde
2011-09-13 12:01 ` Marc Kleine-Budde
2011-09-13 12:07 ` Boaz Ben-David
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox