* Quesion on copying to mtdblock0
@ 2002-05-15 18:43 Jim Zeus
2002-05-15 19:17 ` David Woodhouse
0 siblings, 1 reply; 11+ messages in thread
From: Jim Zeus @ 2002-05-15 18:43 UTC (permalink / raw)
To: David Woodhouse; +Cc: all in MTD mailinglist
Hi, David
I've got some confusion:
1.Is the command"cp jffs.img /dev/mtdblock0" after booting result as same as to burn the jffs.img into flash chip(which is presented as mtdblock0)with kernel Image?
2.Is "cp somefile /dev/mtd0" as same as "cp somefile /dev/mtdblock0"?
3.by the way , May I know the reason that you dont register the master MTD like you register the MTD partition?(just like hda and hda1,2,3...)
Thanks in advance
Jim Zeus
_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net
_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net http://www.everyone.net/?btn=tag
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
2002-05-15 18:43 Jim Zeus
@ 2002-05-15 19:17 ` David Woodhouse
0 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2002-05-15 19:17 UTC (permalink / raw)
To: zeusj; +Cc: all in MTD mailinglist
zeusj@firstlinux.net said:
> 1.Is the command"cp jffs.img /dev/mtdblock0" after booting result as
> same as to burn the jffs.img into flash chip(which is presented as
> mtdblock0)with kernel Image?
Yes.
> 2.Is "cp somefile /dev/mtd0" as same as "cp somefile /dev/mtdblock0"?
No. The block device erases it first.
> 3.by the way , May I know the reason that you dont register the master
> MTD like you register the MTD partition?(just like hda and hda1,2,3...)
Just a historical accident; the current partitioning code is just a hack.
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
@ 2002-05-16 9:05 Jim Zeus
2002-05-16 12:24 ` David Woodhouse
0 siblings, 1 reply; 11+ messages in thread
From: Jim Zeus @ 2002-05-16 9:05 UTC (permalink / raw)
To: David Woodhouse; +Cc: all in MTD mailinglist
--- David Woodhouse <dwmw2@infradead.org> wrote:
>The flash is not completely erased, and doesn't contain _anything_ that
>looks like valid JFFS2 data, so we don't erase it and start using it,
>because you might have mounted the wrong partition.
Yes, you are right, and I think I have to apologize for my stupid question
>> I know the "Last[3] is 9da5, datum is 6246" message is to tell me that
>> what should be written is wrongly different from what be read from
>> flash,its a sanity check,but why a printk() can affects the Flash
>> write?
>
>Timing? You definitely have flash driver problems.
Just forget about it,its ok now.
>> 1.Is the command"cp jffs.img /dev/mtdblock0" after booting result as
>> same as to burn the jffs.img into flash chip(which is presented as
>> mtdblock0)with kernel Image?
>
>Yes.
But I cant mount the jffs.img which was copied to mtdblock0(it has been *completely* erased) after booting.
What I mean is I can mount the mtdblock0 to /mnt, but after mounting,/mnt is still a empty directory,thought it should be many files and directories in it(because those are in jffs.img).I think the what the "mount" did is just find the long enough erased space in flash which is after the jffs.img and mount it on.
It may not recognize the jffs.img, what do you think about it?
And I took a same try with JFFS2, but I got "Magic bitmask not found"message then mount failed.Is seems to prove my conclusion.
_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net
_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net http://www.everyone.net/?btn=tag
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
2002-05-16 9:05 Jim Zeus
@ 2002-05-16 12:24 ` David Woodhouse
0 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2002-05-16 12:24 UTC (permalink / raw)
To: zeusj; +Cc: all in MTD mailinglist
zeusj@firstlinux.net said:
> But I cant mount the jffs.img which was copied to mtdblock0(it has
> been *completely* erased) after booting.
Are you sure the JFFS2 image was created correctly? Is your target
bigendian? If you read the image back from mtdblock0 after writing it and
compare with the original, is it intact? Can you send me the image?
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
@ 2002-05-17 6:58 Jim Zeus
2002-05-17 7:17 ` David Woodhouse
0 siblings, 1 reply; 11+ messages in thread
From: Jim Zeus @ 2002-05-17 6:58 UTC (permalink / raw)
To: David Woodhouse; +Cc: all in MTD mailinglist
--- David Woodhouse <dwmw2@infradead.org> wrote:
>Are you sure the JFFS2 image was created correctly?
Yes, I create it with mkfs.jffs2 :
mkfs.jffs2 --root=/some/place/ --eraseblock=8192KiB --output=jffs2.img
Is there anything I missed?should I change pagesize from default 4KiB?
>Is your target bigendian?
Yes, its dragonball.
But after I change the endianness of jffs.img/jffs2.img (exactly,I change the .b file), the problem is still there, just like what it shows before changing.Changing seems no use.
Thanks
Jim Zeus
_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net
_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net http://www.everyone.net/?btn=tag
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
2002-05-17 6:58 Jim Zeus
@ 2002-05-17 7:17 ` David Woodhouse
0 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2002-05-17 7:17 UTC (permalink / raw)
To: zeusj; +Cc: all in MTD mailinglist
zeusj@firstlinux.net said:
> Yes, I create it with mkfs.jffs2 : mkfs.jffs2 --root=/some/place/
> --eraseblock=8192KiB --output=jffs2.img Is there anything I
> missed?should I change pagesize from default 4KiB?
--big-endian?
> Yes, its dragonball. But after I change the endianness of jffs.img/
> jffs2.img (exactly,I change the .b file), the problem is still there,
> just like what it shows before changing.Changing seems no use.
Can you show me the image you loaded onto the flash? Just the first few
kilobytes should do.
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
[not found] <20020517073950.53BD02757@sitemail.everyone.net>
@ 2002-05-17 7:51 ` David Woodhouse
0 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2002-05-17 7:51 UTC (permalink / raw)
To: zeusj; +Cc: all in MTD mailinglist
zeusj@firstlinux.net said:
> >Can you show me the image you loaded onto the flash? Just the first
> few >kilobytes should do.
> Sure,with pleasure. If you dont mind , I send you the whole image in
> the attachment
<Mailman caught it because it was too large for the list.>
$ od -t x1 jffs2.img | head -1
0000000 85 19 02 e0 44 00 00 00 1d fb f7 98 01 00 00 00
That's a little-endian image. It ain't gonna work on a Dragonball.
Did it not say
"Magic bitmask is backwards at offset 0x00000000. Wrong endian filesystem?"?
Make sure you use the '--bigendian' option to mkfs.jffs2.
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
@ 2002-05-17 8:34 Jim Zeus
2002-05-17 8:42 ` David Woodhouse
0 siblings, 1 reply; 11+ messages in thread
From: Jim Zeus @ 2002-05-17 8:34 UTC (permalink / raw)
To: David Woodhouse; +Cc: all in MTD mailinglist
--- David Woodhouse <dwmw2@infradead.org> wrote:
>That's a little-endian image. It ain't gonna work on a Dragonball.
But I wrote a small program to tranfer the .b file into Big-endian
Maybe I got something wrong in it...
>Did it not say
>"Magic bitmask is backwards at offset 0x00000000. Wrong endian filesystem?"?
No, never.
>
>Make sure you use the '--bigendian' option to mkfs.jffs2.
OK, I'll try it.
_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net
_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net http://www.everyone.net/?btn=tag
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
2002-05-17 8:34 Quesion on copying to mtdblock0 Jim Zeus
@ 2002-05-17 8:42 ` David Woodhouse
0 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2002-05-17 8:42 UTC (permalink / raw)
To: zeusj; +Cc: all in MTD mailinglist
zeusj@firstlinux.net said:
> But I wrote a small program to tranfer the .b file into Big-endian
> Maybe I got something wrong in it...
Exactly what does your program do? You can't just byte-swap all words or
dwords in the whole image - you have to byteswap only the fields in the
JFFS2 node headers that are larger than a byte.
Unless your program had intimate knowledge of JFFS2 structure, it can't
possibly have got it right.
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
@ 2002-05-17 8:46 Jim Zeus
2002-05-17 8:57 ` David Woodhouse
0 siblings, 1 reply; 11+ messages in thread
From: Jim Zeus @ 2002-05-17 8:46 UTC (permalink / raw)
To: David Woodhouse; +Cc: all in MTD mailinglist
Maybe I just use the wrong version of mkfs.jffs2
what I am using is "mkfs.jffs2 revision 1.8"
And... is there any difference in mkfs.jffs2 between different architecture?
I mean, is the mkfs.jffs2 for M68K different from mkfs.jffs2 for ARM?
_____________________________________________________________
Want a new web-based email account ? ---> http://www.firstlinux.net
_____________________________________________________________
Promote your group and strengthen ties to your members with email@yourgroup.org by Everyone.net http://www.everyone.net/?btn=tag
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Quesion on copying to mtdblock0
2002-05-17 8:46 Jim Zeus
@ 2002-05-17 8:57 ` David Woodhouse
0 siblings, 0 replies; 11+ messages in thread
From: David Woodhouse @ 2002-05-17 8:57 UTC (permalink / raw)
To: zeusj; +Cc: all in MTD mailinglist
zeusj@firstlinux.net said:
> Maybe I just use the wrong version of mkfs.jffs2
> what I am using is "mkfs.jffs2 revision 1.8"
Cross-endian support was added in revision 1.9, over a year ago. The
current version in 1.25.
> And... is there any difference in mkfs.jffs2 between different
> architecture? I mean, is the mkfs.jffs2 for M68K different from
> mkfs.jffs2 for ARM?
Nope, the only real difference will be the endianness.
--
dwmw2
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2002-05-17 8:57 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-17 8:34 Quesion on copying to mtdblock0 Jim Zeus
2002-05-17 8:42 ` David Woodhouse
-- strict thread matches above, loose matches on Subject: below --
2002-05-17 8:46 Jim Zeus
2002-05-17 8:57 ` David Woodhouse
[not found] <20020517073950.53BD02757@sitemail.everyone.net>
2002-05-17 7:51 ` David Woodhouse
2002-05-17 6:58 Jim Zeus
2002-05-17 7:17 ` David Woodhouse
2002-05-16 9:05 Jim Zeus
2002-05-16 12:24 ` David Woodhouse
2002-05-15 18:43 Jim Zeus
2002-05-15 19:17 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox