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

Re: [microblaze-uclinux] JFFS2 and MTD



Hi Robert,

Thanks for your help and patience on this - it seems my hunch was right 
that compiler-brokenness was the root of the problem.  In particular, 
the "long long" type, and shift operations, are not completely correct.

To test my theory I enabled the hardware barrel shift, and the compiler 
switch to support appropriate code generation.

Unfortunately the linux version of mb-gcc is built on fairly old 
sources, with a few early bugs still present.  One source file I had to 
do a mb-gcc -S to generate the assembly file, then hand edit it (mb-gcc 
generated an invalid "cmp" assembly statement ), and finally assemble it 
to the object code, before continuing the kernel compile - yuck.

Anyway after doing this stuff, the block device handling now gets 
further than it did - in particular the sizes of the various block 
devices are correctly reported by the kernel (instead of zero as was the 
case before!).  I'm still working through a few issues but I think the 
compiler stuff is the root cause.

I'll keep you posted on my progress.

Cheers,

John

Robert Swindells wrote:
> John Williams wrote:
> 
>>>Should I be writing a partition table somewhere?
>>
>>No, you only need one if you don't want to hard code partition sizes
>>into the kernel.
> 
> 
>>Do you mean the MTD map, mbvanilla-flash.c??
> 
> 
> Yes.
> 
> 
>>I've noted that I am also having trouble with the ramfs driver - it 
>>seems to start up properly but any writes to it fail with "no space on 
>>device".  I traced into the kernel to see that the inode associated with 
>>the ramdisk block driver has a size of zero, so all writes fail.  The 
>>actual write_page() code in the driver never gets called.
> 
> 
> I think that what is happening is that the loop in mount_block_root()
> in init/do_mounts.c is trying all of the available filesystem types
> for the ROOT_DEV that you have specified. It finds jffs2 first and
> tries to initialize the romfs.
> 
> If you initialize the command_line variable to "rootfstype=ramfs", or
> whatever, the correct filesystem should get used.
> 
> It might be cleaner to set the root device through the command line
> as well.
> 
> 
>>I don't know why this is but am suspicious that it's related to the 
>>failure on the mtdblock devices too.  I can read and write quite happily 
> 
>>from the mtd char devices, but jffs2 (which should just *work*) is 
> 
>>unhappy on the mtdblock.
> 
> 
> I would try using a "seed" image in the mtd block.
> 
> Robert Swindells
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@itee.uq.edu.au
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/


-- 
Dr John Williams, Research Fellow,
Reconfigurable Computing, School of ITEE
University of Queensland, Brisbane, Australia
Ph : (07) 3365 8305

___________________________
microblaze-uclinux mailing list
microblaze-uclinux@itee.uq.edu.au
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/