MTD framework for Bifferboard Flash chips

19 views
Skip to first unread message

Razvan Dragomirescu

unread,
Aug 27, 2009, 2:41:55 PM8/27/09
to biffe...@googlegroups.com
Hello everyone,
 
I have spent some time trying to figure out a way to configure the Linux MTD framework to access the builtin Flash chip in the Bifferboard. I want to set it up so that I can save some basic configuration data in one of the unused Flash sectors (at physical address 0 - our kernel is small enough not to overlap that area).
 
The problem seems to be that the kernel does not detect the Flash chip at all, "cat /proc/mtd" displays just a header. I'm not sure which of the MTD physical chipset drivers I need to enable. I've used the "mtdparts" kernel command parameter but since the Flash is not even detected it doesn't do anything.
 
Has anyone managed to compile a kernel that can access the builtin Flash over the MTD framework? I'm using kernel 2.6.30.1 if it makes any difference.
 
Thank you,
Razvan

--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL

bifferos

unread,
Aug 27, 2009, 3:37:24 PM8/27/09
to Bifferboard
I believe you need to add the appropriate definition to drivers/mtd/
chips/jedec_probe.c. Look at the EN29LV800 datasheet, check the flash
layout, find a similar device, maybe AM29F800BB??? then create a new
entry in amd_flash_info. I wonder if AMD invented the JEDEC standard,
and that's why their name is the name of that table. It may not work,
but it's worth a try.

Here's the AMD one I was talking about:
}, {
.mfr_id = MANUFACTURER_AMD,
.dev_id = AM29F800BB,
.name = "AMD AM29F800BB",
.devtypes = CFI_DEVICETYPE_X16|
CFI_DEVICETYPE_X8,
.uaddr = MTD_UADDR_0x0AAA_0x0555,
.dev_size = SIZE_1MiB,
.cmd_set = P_ID_AMD_STD,
.nr_regions = 4,
.regions = {
ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2),
ERASEINFO(0x08000,1),
ERASEINFO(0x10000,15),
}

That last ERASEINFO probably wants to have a count of 14, not 15, and
that will presumably prevent erasure of the bootloader, even if a
process tries to. I'm just guessing here, though!

good luck,
Biff

On Aug 27, 7:41 pm, Razvan Dragomirescu

bifferos

unread,
Aug 27, 2009, 3:52:39 PM8/27/09
to Bifferboard
On 2nd thoughts... AM29LV800BB is a closer fit. It even has the same
device code 0x225B, so I think you can copy that, and just change the
mfr_id to EON, something like this:

}, {
.mfr_id = MANUFACTURER_EON,
.dev_id = AM29LV800BB,
.name = "EON EN29LV800B",
.devtypes = CFI_DEVICETYPE_X16|
CFI_DEVICETYPE_X8,
.uaddr = MTD_UADDR_0x0AAA_0x0555,
.dev_size = SIZE_1MiB,
.cmd_set = P_ID_AMD_STD,
.nr_regions = 4,
.regions = {
ERASEINFO(0x04000,1),
ERASEINFO(0x02000,2),
ERASEINFO(0x08000,1),
ERASEINFO(0x10000,14),
}
}, {

I think you don't even need any new #defines.

regards,
Biff.

Razvan Dragomirescu

unread,
Aug 27, 2009, 4:07:02 PM8/27/09
to biffe...@googlegroups.com
Thanks Biff, I'll give it a try. I've never done this before so I'm keeping my fingers crossed :). This would be a great addition to the current Bifferboard firmware, especially if you plan to move to 4MB or 8MB boards in the future.
 
Will try tomorrow and let everyone know how it went.
 
Best,
Razvan

--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL


Razvan Dragomirescu

unread,
Aug 27, 2009, 4:24:12 PM8/27/09
to biffe...@googlegroups.com
BTW, I found this: http://www.infradead.org/pipermail/linux-mtd/2005-July/012950.html - it contains a patch for the MTD framework to support EN29LV400AB/T and EN29LV800BB/T . I'm not sure if this is relevant in any way, it's just what Google found when searching for "EN29LV800BB" (the Wiki indicates EN29LV800BB-70TCP as the chip used in the Bifferboard 1MB) and "mtd".
 
Anyway, I'll try your solution first and see if anything gets detected. Any suggestions are welcome :).
 
Razvan

--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL


bifferos

unread,
Aug 27, 2009, 5:21:54 PM8/27/09
to Bifferboard
Hmmm.... in 2.6.30.5, in the code just before the work-around is
applied it says:

/* According to JEDEC "Standard Manufacturer's Identification
Code"
* (http://www.jedec.org/download/search/jep106W.pdf)
* several first banks can contain 0x7f instead of actual ID
*/

Which looks suspiciously like what your patch is trying to do, so I
would say you need only add the new definition.

Biff.


On Aug 27, 9:24 pm, Razvan Dragomirescu
<razvan.dragomire...@gmail.com> wrote:
> BTW, I found this:http://www.infradead.org/pipermail/linux-mtd/2005-July/012950.html- it
> contains a patch for the MTD framework to support EN29LV400AB/T and
> EN29LV800BB/T . I'm not sure if this is relevant in any way, it's just what
> Google found when searching for "EN29LV800BB" (the Wiki indicates
> EN29LV800BB-70TCP as the chip used in the Bifferboard 1MB) and "mtd".
>
> Anyway, I'll try your solution first and see if anything gets detected. Any
> suggestions are welcome :).
>
> Razvan
>
> --
> Razvan Dragomirescu
> Chief Technology Officer
> Cayenne Graphics SRL
>
> On Thu, Aug 27, 2009 at 11:07 PM, Razvan Dragomirescu <
>
> razvan.dragomire...@gmail.com> wrote:
> > Thanks Biff, I'll give it a try. I've never done this before so I'm keeping
> > my fingers crossed :). This would be a great addition to the current
> > Bifferboard firmware, especially if you plan to move to 4MB or 8MB boards in
> > the future.
>
> > Will try tomorrow and let everyone know how it went.
>
> > Best,
> >  Razvan
>
> > --
> > Razvan Dragomirescu
> > Chief Technology Officer
> > Cayenne Graphics SRL
>

Razvan Dragomirescu

unread,
Aug 28, 2009, 9:46:22 AM8/28/09
to biffe...@googlegroups.com
Hi everyone,

It seems I have made some progress but I'm now stuck again...

I've added the section as suggested by Biff in drivers/mtd/chips/jedec-probe.c but I noticed that the MTD framework also appears to need a mapping driver, telling it how the Flash is to be partitioned.

So I've tried to use the netsc520.c map driver (drivers/mtd/maps/netsc520.c) as a sample. Here's what I came up with:

----------------------

static struct mtd_partition partition_info[]={
    {
            .name = "Razvan config",
            .offset = 0,
            .size = 0x4000
    }
};
#define NUM_PARTITIONS ARRAY_SIZE(partition_info)

#define WINDOW_SIZE     0x00100000
#define WINDOW_ADDR     0x00200000

static struct map_info netsc520_map = {
        .name = "Razvan Flash Bank",
        .size = WINDOW_SIZE,
        .bankwidth = 1,
        .phys = WINDOW_ADDR,
};

----------------------------------------

This boots up fine, it creates the /dev/mtd0 file, I can write and read from it and I can see the debugging messages :

-----------------

/ # cat /etc/README > /dev/mtd0                                                
[  243.873899] MTD_open                                                        
[  243.877900] MTD_write                                                       
[  243.881985] MTD_write                                                       
[  243.881985] MTD_close                                                       

------------------------

If I then do "cat /dev/mtd0" I can see the file that I've just written.

The problem is that anything I write does not appear to be actually persisted to Flash. If I turn off the Bifferboard and turn it back on, it boots again, detects everything, but "cat /dev/mtd0" outputs some mumbo-jumbo.

So what am I doing wrong?

I'm not sure what these defines do:

#define WINDOW_SIZE     0x00100000
#define WINDOW_ADDR     0x00200000

WINDOW_SIZE apparently defines the size of the flash (so I've set it to 0x00100000 = 1MB). I'm not sure about WINDOW_ADDR though ... I have no idea what that value means.

Also, I'm setting the "bankwidth" to 1, is that correct?

I feel like I'm very close to getting this to work, but I'm just stuck :( ... any help would be greatly appreciated.

Thanks,

Razvan

--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL


bifferos

unread,
Aug 28, 2009, 10:04:42 AM8/28/09
to Bifferboard
In this thread:
http://groups.google.com/group/bifferboard/browse_thread/thread/e96a58057b12bd47#

Jason says something about an 'mtdwrite module'. Have you got one of
them?

Biff.

On Aug 28, 2:46 pm, Razvan Dragomirescu

Razvan Dragomirescu

unread,
Aug 28, 2009, 10:46:31 AM8/28/09
to biffe...@googlegroups.com
Hi Biff,

I think he meant the mtd-utils package, I have that. I've tried writing with "flashcp" which is the "official" mtd way of writing to Flash. Everything goes on smoothly, no errors, I can see the mtd debug messages, but as soon as I reboot - it's all gone ... does the bootloader erase the unused sectors in any way on reboot? I've increased the debugging for MTD all the way to level 3 (the maximum), I'll run it again and see if it displays anything interesting.


Razvan

--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL


bifferos

unread,
Aug 28, 2009, 11:38:23 AM8/28/09
to Bifferboard
Biffboot doesn't touch the flash unless you tell it to.

I wonder if your map has to include a spare sector for erase
operations or is that all in the layer up above (JFFS). Just thinking
'out loud'.

Might be worth to investigate the OpenWrt flash patches to see if they
give any insight.
https://dev.openwrt.org/browser/trunk/target/linux/rdc/files/drivers/mtd/maps

...athough they look far too complicated, so I suspect they're doing a
lot of stuff just to keep the bootloader happy.

Biff.

On Aug 28, 3:46 pm, Razvan Dragomirescu
<razvan.dragomire...@gmail.com> wrote:
> Hi Biff,
>
> I think he meant the mtd-utils package, I have that. I've tried writing with
> "flashcp" which is the "official" mtd way of writing to Flash. Everything
> goes on smoothly, no errors, I can see the mtd debug messages, but as soon
> as I reboot - it's all gone ... does the bootloader erase the unused sectors
> in any way on reboot? I've increased the debugging for MTD all the way to
> level 3 (the maximum), I'll run it again and see if it displays anything
> interesting.
>
> Razvan
>
> --
> Razvan Dragomirescu
> Chief Technology Officer
> Cayenne Graphics SRL
>
> On Fri, Aug 28, 2009 at 5:04 PM, bifferos <biffe...@yahoo.co.uk> wrote:
>
> > In this thread:
>
> >http://groups.google.com/group/bifferboard/browse_thread/thread/e96a5...
> ...
>
> read more »

Razvan Dragomirescu

unread,
Aug 28, 2009, 12:36:38 PM8/28/09
to biffe...@googlegroups.com
Ok, I give up ... I've spent like 14 hours on this and I'm not getting any closer to the finish line ... the best I could get was that "writes get written until reboot" situation I described... I have no idea why the contents of the flash would be erased on boot (if that is the case)... I've also tried to use the physmap driver with parameters both from the kernel command line (mtdparts=physmap-flash.0:... etc) and from the kernel config itself. That was even worse, it apparently detects the Flash as a ROM Flash and cannot write to it at all.

If someone knows more about this whole thing, feel free to take it from here. I've emailed the guys at RDC, I suspect they must have dealt with this before.

Good luck everyone,
R.


--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL


Razvan Dragomirescu

unread,
Aug 28, 2009, 12:52:55 PM8/28/09
to biffe...@googlegroups.com
I have the feeling that the netsc520.c map driver wasn't actually probing anything... the physmap driver shows a lot of debugging about how it probes and what it receives. Here's the probing sequence from the boot log with physmap:

------------------

[    0.444188] physmap platform flash device: 00004000 at 08000000             
[    0.448389] reset unlock called 555 2aa                                     
[    0.452254] Search for id:(75 c1) interleave(2) type(1)                     
[    0.457030] jedec_match(): ID is not 8bit                                   
[    0.460690] jedec_match(): ID is not 8bit                                   
[    0.464346] jedec_match(): ID is not 8bit                                   
[    0.464346] jedec_match(): ID is not 8bit                                   
[    0.471579] jedec_match(): ID is not 8bit                                   
[    0.475234] jedec_match(): ID is not 8bit                                   
[    0.478886] jedec_match(): ID is not 8bit                                   
[    0.482541] jedec_match(): ID is not 8bit                                   
[    0.486197] jedec_match(): ID is not 8bit                                   
[    0.489857] jedec_match(): ID is not 8bit                                   
[    0.493512] jedec_match(): ID is not 8bit                                   
[    0.497166] jedec_match(): ID is not 8bit                                   
[    0.500828] jedec_match(): ID is not 8bit                                   
[    0.504483] jedec_match(): ID is not 8bit                                   
[    0.508146] jedec_match(): ID is not 8bit                                   
[    0.508146] jedec_match(): ID is not 8bit                                   
[    0.515380] jedec_match(): ID is not 8bit                                   
[    0.519033] jedec_match(): ID is not 8bit                                   
[    0.522688] jedec_match(): ID is not 8bit                                   
[    0.526342] jedec_match(): ID is not 8bit                                   
[    0.529997] jedec_match(): ID is not 8bit                                   
[    0.533651] jedec_match(): ID is not 8bit                                   
[    0.537305] jedec_match(): ID is not 8bit                                   
[    0.540960] jedec_match(): ID is not 8bit                                   
[    0.544615] jedec_match(): ID is not 8bit                                   
[    0.548276] jedec_match(): ID is not 8bit                                   
[    0.548276] jedec_match(): ID is not 8bit                                   
[    0.555509] jedec_match(): ID is not 8bit                                   
[    0.559171] jedec_match(): ID is not 8bit                                   
[    0.562826] jedec_match(): ID is not 8bit                                   
[    0.566487] jedec_match(): ID is not 8bit                                   
[    0.570141] jedec_match(): ID is not 8bit                                   
[    0.573796] jedec_match(): ID is not 8bit                                   
[    0.577450] jedec_match(): ID is not 8bit                                   
[    0.581105] jedec_match(): ID is not 8bit                                   
[    0.584760] jedec_match(): ID is not 8bit                                   
[    0.588416] jedec_match(): ID is not 8bit                                   
[    0.592067] jedec_match(): ID is not 8bit                                   
[    0.592067] jedec_match(): ID is not 8bit                                   
[    0.599309] jedec_match(): ID is not 8bit                                   
[    0.602965] jedec_match(): ID is not 8bit                                   
[    0.606619] jedec_match(): ID is not 8bit                                   
[    0.610274] jedec_match(): ID is not 8bit                                   
[    0.613936] jedec_match(): ID is not 8bit                                   
[    0.617591] reset unlock called 555 aaa                                     
[    0.621185] Search for id:(75 c1) interleave(2) type(1)                     
[    0.625960] jedec_match(): ID is not 8bit                                   
[    0.629619] jedec_match(): ID is not 8bit                                   
[    0.633274] jedec_match(): ID is not 8bit                                   
[    0.636928] jedec_match(): ID is not 8bit                                   
[    0.640582] jedec_match(): ID is not 8bit                                   
[    0.644237] jedec_match(): ID is not 8bit                                   
[    0.644237] jedec_match(): ID is not 8bit                                   
[    0.651472] jedec_match(): ID is not 8bit                                   
[    0.655132] jedec_match(): ID is not 8bit                                   
[    0.658787] jedec_match(): ID is not 8bit                                   
[    0.662441] jedec_match(): ID is not 8bit                                   
[    0.666096] jedec_match(): ID is not 8bit                                   
[    0.669759] jedec_match(): ID is not 8bit                                   
[    0.673414] jedec_match(): ID is not 8bit                                   
[    0.677075] jedec_match(): ID is not 8bit                                   
[    0.680729] jedec_match(): ID is not 8bit                                   
[    0.684383] jedec_match(): ID is not 8bit                                   
[    0.688037] jedec_match(): ID is not 8bit                                   
[    0.688037] jedec_match(): ID is not 8bit                                   
[    0.695272] jedec_match(): ID is not 8bit                                   
[    0.698926] jedec_match(): ID is not 8bit                                   
[    0.702581] jedec_match(): ID is not 8bit                                   
[    0.706232] jedec_match(): ID is not 8bit                                   
[    0.709889] jedec_match(): ID is not 8bit                                   
[    0.713543] jedec_match(): ID is not 8bit                                   
[    0.717198] jedec_match(): ID is not 8bit                                   
[    0.720853] jedec_match(): ID is not 8bit                                   
[    0.724507] jedec_match(): ID is not 8bit                                   
[    0.728169] jedec_match(): ID is not 8bit                                   
[    0.728169] jedec_match(): ID is not 8bit                                   
[    0.735402] jedec_match(): ID is not 8bit                                   
[    0.739057] jedec_match(): ID is not 8bit                                   
[    0.742718] jedec_match(): ID is not 8bit                                   
[    0.746373] jedec_match(): ID is not 8bit                                   
[    0.750028] jedec_match(): ID is not 8bit                                   
[    0.753688] jedec_match(): ID is not 8bit                                   
[    0.757344] jedec_match(): ID is not 8bit                                   
[    0.760999] jedec_match(): ID is not 8bit                                   
[    0.764651] jedec_match(): ID is not 8bit                                   
[    0.768316] jedec_match(): ID is not 8bit                                   
[    0.768316] jedec_match(): ID is not 8bit                                   
[    0.775555] jedec_match(): ID is not 8bit                                   
[    0.779209] jedec_match(): ID is not 8bit                                   
[    0.782866] jedec_match(): ID is not 8bit                                   
[    0.786520] reset unlock called aaa 555                                     
[    0.790112] Search for id:(00 00) interleave(2) type(1)                     
[    0.794882] jedec_match(): ID is not 8bit                                   
[    0.798541] jedec_match(): ID is not 8bit                                   
[    0.802196] jedec_match(): ID is not 8bit                                   
[    0.805850] jedec_match(): ID is not 8bit                                   
[    0.809505] jedec_match(): ID is not 8bit                                   
[    0.813159] jedec_match(): ID is not 8bit                                   
[    0.816814] jedec_match(): ID is not 8bit                                   
[    0.820469] jedec_match(): ID is not 8bit                                   
[    0.824121] jedec_match(): ID is not 8bit                                   
[    0.824121] jedec_match(): ID is not 8bit                                   
[    0.831356] jedec_match(): ID is not 8bit                                   
[    0.835011] jedec_match(): ID is not 8bit                                   
[    0.838674] jedec_match(): ID is not 8bit                                   
[    0.842325] jedec_match(): ID is not 8bit                                   
[    0.845980] jedec_match(): ID is not 8bit                                   
[    0.849635] jedec_match(): ID is not 8bit                                   
[    0.853289] jedec_match(): ID is not 8bit                                   
[    0.856945] jedec_match(): ID is not 8bit                                   
[    0.860600] jedec_match(): ID is not 8bit                                   
[    0.864254] jedec_match(): ID is not 8bit                                   
[    0.864254] jedec_match(): ID is not 8bit                                   
[    0.871487] jedec_match(): ID is not 8bit                                   
[    0.875141] jedec_match(): ID is not 8bit                                   
[    0.878796] jedec_match(): ID is not 8bit                                   
[    0.882451] jedec_match(): ID is not 8bit                                   
[    0.886106] jedec_match(): ID is not 8bit                                   
[    0.889766] jedec_match(): ID is not 8bit                                   
[    0.893421] jedec_match(): ID is not 8bit                                   
[    0.897083] jedec_match(): ID is not 8bit                                   
[    0.900738] jedec_match(): ID is not 8bit                                   
[    0.904390] jedec_match(): ID is not 8bit                                   
[    0.908045] jedec_match(): ID is not 8bit                                   
[    0.908045] jedec_match(): ID is not 8bit                                   
[    0.915280] jedec_match(): ID is not 8bit                                   
[    0.918935] jedec_match(): ID is not 8bit                                   
[    0.922590] jedec_match(): ID is not 8bit                                   
[    0.926250] jedec_match(): ID is not 8bit                                   
[    0.929905] jedec_match(): ID is not 8bit                                   
[    0.933559] jedec_match(): ID is not 8bit                                   
[    0.937222] jedec_match(): ID is not 8bit                                   
[    0.940883] jedec_match(): ID is not 8bit                                   
[    0.944538] jedec_match(): ID is not 8bit                                   
[    0.948191] jedec_match(): ID is not 8bit                                   
[    0.948191] jedec_match(): ID is not 8bit                                   
[    0.955424] Search for id:(00 00) interleave(2) type(1)                     
[    0.956194] jedec_match(): ID is not 8bit                                   
[    0.956194] jedec_match(): ID is not 8bit                                   
[    0.963433] jedec_match(): ID is not 8bit                                   
[    0.967087] jedec_match(): ID is not 8bit                                   
[    0.970741] jedec_match(): ID is not 8bit                                   
[    0.974396] jedec_match(): ID is not 8bit                                   
[    0.978051] jedec_match(): ID is not 8bit                                   
[    0.981705] jedec_match(): ID is not 8bit                                   
[    0.985360] jedec_match(): ID is not 8bit                                   
[    0.989020] jedec_match(): ID is not 8bit                                   
[    0.992674] jedec_match(): ID is not 8bit                                   
[    0.996339] jedec_match(): ID is not 8bit                                   
[    0.996339] jedec_match(): ID is not 8bit                                   
[    1.003580] jedec_match(): ID is not 8bit                                   
[    1.007240] jedec_match(): ID is not 8bit                                   
[    1.010895] jedec_match(): ID is not 8bit                                   
[    1.014550] jedec_match(): ID is not 8bit                                   
[    1.018204] jedec_match(): ID is not 8bit                                   
[    1.021859] jedec_match(): ID is not 8bit                                   
[    1.025514] jedec_match(): ID is not 8bit                                   
[    1.029174] jedec_match(): ID is not 8bit                                   
[    1.032830] jedec_match(): ID is not 8bit                                   
[    1.036483] jedec_match(): ID is not 8bit                                   
[    1.040138] jedec_match(): ID is not 8bit                                   
[    1.040138] jedec_match(): ID is not 8bit                                   
[    1.047371] jedec_match(): ID is not 8bit                                   
[    1.051033] jedec_match(): ID is not 8bit                                   
[    1.054688] jedec_match(): ID is not 8bit                                   
[    1.058350] jedec_match(): ID is not 8bit                                   
[    1.062004] jedec_match(): ID is not 8bit                                   
[    1.065666] jedec_match(): ID is not 8bit                                   
[    1.069321] jedec_match(): ID is not 8bit                                   
[    1.072976] jedec_match(): ID is not 8bit                                   
[    1.076631] jedec_match(): ID is not 8bit                                   
[    1.080283] jedec_match(): ID is not 8bit                                   
[    1.080283] jedec_match(): ID is not 8bit                                   
[    1.087516] jedec_match(): ID is not 8bit                                   
[    1.091171] jedec_match(): ID is not 8bit                                   
[    1.094833] jedec_match(): ID is not 8bit                                   
[    1.098495] jedec_match(): ID is not 8bit                                   
[    1.102158] jedec_match(): ID is not 8bit                                   
[    1.105820] jedec_match(): ID is not 8bit                                   
[    1.109476] jedec_match(): ID is not 8bit                                   
[    1.113136] jedec_match(): ID is not 8bit                                   
[    1.116790] reset unlock called 2aa 155                                     
[    1.120386] Search for id:(00 00) interleave(2) type(2)                     
[    1.125154] reset unlock called 2aa 555                                     
[    1.128779] Search for id:(00 00) interleave(2) type(2)                     
[    1.133552] reset unlock called 555 2aa                                     
[    1.137185] Search for id:(00 00) interleave(2) type(2)                     
[    1.141958] Search for id:(00 00) interleave(2) type(2)                     
[    1.146764] reset unlock called 155 aa                                      
[    1.150321] Search for id:(00 00) interleave(2) type(4)                     
[    1.155091] reset unlock called 155 2aa                                     
[    1.158726] Search for id:(00 00) interleave(2) type(4)                     
[    1.163499] reset unlock called 2aa 155                                     
[    1.167131] Search for id:(00 00) interleave(2) type(4)                     
[    1.171905] Search for id:(00 00) interleave(2) type(4)                     
[    1.172712] reset unlock called 2aa 155                                     
[    1.176343] Search for id:(00 00) interleave(1) type(2)                     
[    1.181115] reset unlock called 2aa 555                                     
[    1.184739] Search for id:(00 00) interleave(1) type(2)                     
[    1.189514] reset unlock called 555 2aa                                     
[    1.193146] Search for id:(00 00) interleave(1) type(2)                     
[    1.197921] Search for id:(00 00) interleave(1) type(2)                     
[    1.202728] reset unlock called 155 aa                                      
[    1.206277] Search for id:(00 00) interleave(1) type(4)                     
[    1.211048] reset unlock called 155 2aa                                     
[    1.214679] Search for id:(00 00) interleave(1) type(4)                     
[    1.219453] reset unlock called 2aa 155                                     
[    1.223084] Search for id:(00 00) interleave(1) type(4)                     
[    1.227851] Search for id:(00 00) interleave(1) type(4)                     
[    1.228658] cmdlinepart partition parsing not available                     
[    1.236074] RedBoot partition parsing not available                         
[    1.240857] mtd: Giving out device 0 to physmap-flash.0                     
-------------------------------------------

Any ideas Biff? You wrote the Biffboot Flash interface, maybe some of the above sounds fishy, I don't know...


R.



--
Razvan Dragomirescu
Chief Technology Officer
Cayenne Graphics SRL


Jason

unread,
Aug 28, 2009, 6:14:49 PM8/28/09
to Bifferboard
On holiday at the moment so can only do a quick reply ...

I tend to use a more direct approach of mounting the MTD partition (if
JFFS2/UBIFS), which is usually achieved by enabling MTD/mtdblock
support in the Kernel (I've not had time to get this working on the
Bifferboard). Alternatively, one can use DD to write to mtdblock
device directly (if not using a filesystem). However, from the
thread it sounds like something intrinsic in the MTD stack is not
working yet (so these approaches may not work).

The MTD-Utils package (nandwrite etc) can also be used to support
various MTD operations (being a collection of tools mostly sourced via
infradead.org) and are useful if you want to update specific areas of
the flash.

In terms of the problems encountered it may be worth using the kernel
NANDSIM module to rule out any JFFS2 or MTD issues by emulating NAND
operations via a loop device to a file. If the content of the file
persists past a reboot then it confirms that the problem is most
likely the NAND chip driver.

If you looking for JFFS2 insight try http://www.linux-mtd.infradead.org/faq/jffs2.html
or for more general guidance try http://www.linux-mtd.infradead.org/doc/general.html.

Sorry - for not being able to help out further for the moment, I'll
have a look when I'm back from holiday.

Regards
Jason


On Aug 28, 3:46 pm, Razvan Dragomirescu
<razvan.dragomire...@gmail.com> wrote:
> Hi Biff,
>
> I think he meant the mtd-utils package, I have that. I've tried writing with
> "flashcp" which is the "official" mtd way of writing to Flash. Everything
> goes on smoothly, no errors, I can see the mtd debug messages, but as soon
> as I reboot - it's all gone ... does the bootloader erase the unused sectors
> in any way on reboot? I've increased the debugging for MTD all the way to
> level 3 (the maximum), I'll run it again and see if it displays anything
> interesting.
>
> Razvan
>
> --
> Razvan Dragomirescu
> Chief Technology Officer
> Cayenne Graphics SRL
>
> On Fri, Aug 28, 2009 at 5:04 PM, bifferos <biffe...@yahoo.co.uk> wrote:
>
> > In this thread:
>
> >http://groups.google.com/group/bifferboard/browse_thread/thread/e96a5...
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages