* MTD nand driver help
@ 2007-08-16 16:41 Tushar Kapse
2007-08-16 16:46 ` Josh Boyer
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Tushar Kapse @ 2007-08-16 16:41 UTC (permalink / raw)
To: linux-mtd
Hi,
I am writing the nand driver, I would like to know the MTD nand
driver information. Can some body help me to get the MTD documentation
regarding code structure?
Regards,
Tushar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-16 16:41 MTD nand driver help Tushar Kapse
@ 2007-08-16 16:46 ` Josh Boyer
2007-08-16 17:22 ` Artem Bityutskiy
2007-08-23 6:17 ` Tushar Kapse
2 siblings, 0 replies; 14+ messages in thread
From: Josh Boyer @ 2007-08-16 16:46 UTC (permalink / raw)
To: Tushar Kapse; +Cc: linux-mtd
On Thu, 16 Aug 2007 22:11:15 +0530
"Tushar Kapse" <tusharkapse@gmail.com> wrote:
> Hi,
> I am writing the nand driver, I would like to know the MTD nand
> driver information. Can some body help me to get the MTD documentation
> regarding code structure?
http://linux-mtd.infradead.org/doc/general.html
josh
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-16 16:41 MTD nand driver help Tushar Kapse
2007-08-16 16:46 ` Josh Boyer
@ 2007-08-16 17:22 ` Artem Bityutskiy
2007-08-16 17:23 ` Artem Bityutskiy
2007-08-23 6:17 ` Tushar Kapse
2 siblings, 1 reply; 14+ messages in thread
From: Artem Bityutskiy @ 2007-08-16 17:22 UTC (permalink / raw)
To: Tushar Kapse; +Cc: linux-mtd
On Thu, 2007-08-16 at 22:11 +0530, Tushar Kapse wrote:
> I am writing the nand driver, I would like to know the MTD nand
> driver information. Can some body help me to get the MTD documentation
> regarding code structure?
I do not think there is better description the - you'll have to dig the
code.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-16 17:22 ` Artem Bityutskiy
@ 2007-08-16 17:23 ` Artem Bityutskiy
0 siblings, 0 replies; 14+ messages in thread
From: Artem Bityutskiy @ 2007-08-16 17:23 UTC (permalink / raw)
To: Tushar Kapse; +Cc: linux-mtd
On Thu, 2007-08-16 at 20:22 +0300, Artem Bityutskiy wrote:
> On Thu, 2007-08-16 at 22:11 +0530, Tushar Kapse wrote:
> > I am writing the nand driver, I would like to know the MTD nand
> > driver information. Can some body help me to get the MTD documentation
> > regarding code structure?
>
> I do not think there is better description the - you'll have to dig the
> code.
Sorry, I meant better description that the description referred by Josh.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-16 16:41 MTD nand driver help Tushar Kapse
2007-08-16 16:46 ` Josh Boyer
2007-08-16 17:22 ` Artem Bityutskiy
@ 2007-08-23 6:17 ` Tushar Kapse
2007-08-23 6:24 ` Ricard Wanderlof
2 siblings, 1 reply; 14+ messages in thread
From: Tushar Kapse @ 2007-08-23 6:17 UTC (permalink / raw)
To: linux-mtd
Hi,
Can some body explain me how to burn the JFFS2 image in the nand flash
using MTD utility.
Regards,
Tushar
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-23 6:17 ` Tushar Kapse
@ 2007-08-23 6:24 ` Ricard Wanderlof
[not found] ` <3db60e760708222340g49294138w9ce3372ab5eb50bf@mail.gmail.com>
0 siblings, 1 reply; 14+ messages in thread
From: Ricard Wanderlof @ 2007-08-23 6:24 UTC (permalink / raw)
To: Linux mtd
On Thu, 23 Aug 2007, Tushar Kapse wrote:
> Can some body explain me how to burn the JFFS2 image in the nand flash
> using MTD utility.
There is an mtd utility called nandwrite, which can be used for writing
images to a nand flash.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
[not found] ` <3db60e760708222340g49294138w9ce3372ab5eb50bf@mail.gmail.com>
@ 2007-08-23 6:44 ` Ricard Wanderlof
2007-08-23 9:11 ` Tushar Kapse
0 siblings, 1 reply; 14+ messages in thread
From: Ricard Wanderlof @ 2007-08-23 6:44 UTC (permalink / raw)
To: Linux mtd
On Thu, 23 Aug 2007, Tushar Kapse wrote:
> Thanx for the reply,
> But, my problem is as follows,
>
> I have the board with PXA255 and want to port the Linux with MTD driver support.
> I got the steps for creating the JFFS2 file system are :
> 1. using mkfs.jffs2 create the file system.
> 2. using eraseall erase the /dev/mtdn device
> 3. using nandwrite copy the jffs2 image to /dev/mtdn.
> But, my qustion is for erasing and copping jffs2 image in /dev/mtdn
> device do i need to have the file system exist in the nand already.
No, that should not be necessary. Copying the image using nandwrite to an
erased nand partition /dev/mtdn should be ok.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-23 6:44 ` Ricard Wanderlof
@ 2007-08-23 9:11 ` Tushar Kapse
2007-08-23 10:03 ` hinko.kocevar
0 siblings, 1 reply; 14+ messages in thread
From: Tushar Kapse @ 2007-08-23 9:11 UTC (permalink / raw)
To: Ricard Wanderlof; +Cc: linux-mtd
Thank you for your nice support..
here i will explain detail of my problem.
1.I have PXA255 SBC board, and ported linux 2.6.12 on it without File System.
Linux Image : Resides in NOR Device ( 4Mb)
File System: To be reside in NAND Device (128Mb). Still to be done .
2.Now i want to put JFFS2 file system on NAND device.
3. First I have created the Linux image with MTD support (also JFFS2
file system selected) and ported on NOR device. On power ON of SBC
board, Linux is booted and got error "Kernel panic - not syncing: VFS:
Unable to mount root fs on unknown-block(31,0)"
4. As there is no JFFS2 File System on it we got this error.
5. We have downloaded the MTD utilities on the host system (PC).
Kindly please tell me the procedure to put JFFS2 FS in the NAND device
for the first time.
Note that we don't have any filesystem on NAND device.
Regards,
Tushar
On 8/23/07, Ricard Wanderlof <ricard.wanderlof@axis.com> wrote:
>
> On Thu, 23 Aug 2007, Tushar Kapse wrote:
>
> > Thanx for the reply,
> > But, my problem is as follows,
> >
> > I have the board with PXA255 and want to port the Linux with MTD driver support.
> > I got the steps for creating the JFFS2 file system are :
> > 1. using mkfs.jffs2 create the file system.
> > 2. using eraseall erase the /dev/mtdn device
> > 3. using nandwrite copy the jffs2 image to /dev/mtdn.
> > But, my qustion is for erasing and copping jffs2 image in /dev/mtdn
> > device do i need to have the file system exist in the nand already.
>
> No, that should not be necessary. Copying the image using nandwrite to an
> erased nand partition /dev/mtdn should be ok.
>
> /Ricard
> --
> Ricard Wolf Wanderlöf ricardw(at)axis.com
> Axis Communications AB, Lund, Sweden www.axis.com
> Phone +46 46 272 2016 Fax +46 46 13 61 30
>
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-23 9:11 ` Tushar Kapse
@ 2007-08-23 10:03 ` hinko.kocevar
2007-08-23 11:39 ` Tushar Kapse
0 siblings, 1 reply; 14+ messages in thread
From: hinko.kocevar @ 2007-08-23 10:03 UTC (permalink / raw)
To: Tushar Kapse; +Cc: linux-mtd, Ricard Wanderlof
Tushar Kapse wrote:
> Thank you for your nice support..
> here i will explain detail of my problem.
> 1.I have PXA255 SBC board, and ported linux 2.6.12 on it without File System.
> Linux Image : Resides in NOR Device ( 4Mb)
> File System: To be reside in NAND Device (128Mb). Still to be done .
> 2.Now i want to put JFFS2 file system on NAND device.
> 3. First I have created the Linux image with MTD support (also JFFS2
> file system selected) and ported on NOR device. On power ON of SBC
> board, Linux is booted and got error "Kernel panic - not syncing: VFS:
> Unable to mount root fs on unknown-block(31,0)"
> 4. As there is no JFFS2 File System on it we got this error.
> 5. We have downloaded the MTD utilities on the host system (PC).
> Kindly please tell me the procedure to put JFFS2 FS in the NAND device
> for the first time.
> Note that we don't have any filesystem on NAND device.
If NAND device holds your boot partition you can
a) upload the image to the NAND device from your bootloader (if one
exists on your machine and supports NAND flash) or
b) boot from NFS rootfs for the first time and then use the nandwrite to
transfer the image to NAND device.
HTH,
Hinko
--
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: hinko.kocevar@cetrtapot.si
Http: www.cetrtapot.si
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-23 10:03 ` hinko.kocevar
@ 2007-08-23 11:39 ` Tushar Kapse
2007-08-23 12:00 ` Ricard Wanderlof
2007-08-23 12:03 ` hinko.kocevar
0 siblings, 2 replies; 14+ messages in thread
From: Tushar Kapse @ 2007-08-23 11:39 UTC (permalink / raw)
To: hinko.kocevar@cetrtapot.si; +Cc: linux-mtd, Ricard Wanderlof
thanx for your valuable suggestion..
Here are the steps followed to create JFFS2 and dumped into the NAND
using Boot Loader utility for NAND:
1) On the Host(x86) we have created a directory "Target" and copied
the minumum required file system into that directory.
2)Then we have created a jffs2 image using the following command:
"#./mkfs.jffs2 --pad=0xa00000 --eraseblock=0x20000 --pagesize=2048 -l
-n --root=Target --output Target.jffs2"
Note: Here we want to create 10Mb image.
3)Then we have copied Target.jffs2 into NAND device using Boot Loader
NAND utility which reside in the NOR.
Note:
1)We have copied Target.jffs2 from 0th Block, 0th Page onwards...
2)We dont have any partitions on NAND device. NAND formated using
utility of Bootloader.
If we have missed any steps kindly tell us,
waiting for your reply
Best regards
tushar
Once we have followed above steps,and when i Boot the Linux we found
the error as follows:
"Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(31,0)"
On 8/23/07, hinko.kocevar@cetrtapot.si <hinko.kocevar@cetrtapot.si> wrote:
> Tushar Kapse wrote:
> > Thank you for your nice support..
> > here i will explain detail of my problem.
> > 1.I have PXA255 SBC board, and ported linux 2.6.12 on it without File System.
> > Linux Image : Resides in NOR Device ( 4Mb)
> > File System: To be reside in NAND Device (128Mb). Still to be done .
> > 2.Now i want to put JFFS2 file system on NAND device.
> > 3. First I have created the Linux image with MTD support (also JFFS2
> > file system selected) and ported on NOR device. On power ON of SBC
> > board, Linux is booted and got error "Kernel panic - not syncing: VFS:
> > Unable to mount root fs on unknown-block(31,0)"
> > 4. As there is no JFFS2 File System on it we got this error.
> > 5. We have downloaded the MTD utilities on the host system (PC).
> > Kindly please tell me the procedure to put JFFS2 FS in the NAND device
> > for the first time.
> > Note that we don't have any filesystem on NAND device.
>
> If NAND device holds your boot partition you can
> a) upload the image to the NAND device from your bootloader (if one
> exists on your machine and supports NAND flash) or
> b) boot from NFS rootfs for the first time and then use the nandwrite to
> transfer the image to NAND device.
>
> HTH,
> Hinko
>
> --
> ČETRTA POT, d.o.o., Kranj
> Planina 3
> 4000 Kranj
> Slovenia, Europe
> Tel. +386 (0) 4 280 66 03
> E-mail: hinko.kocevar@cetrtapot.si
> Http: www.cetrtapot.si
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-23 11:39 ` Tushar Kapse
@ 2007-08-23 12:00 ` Ricard Wanderlof
2007-08-23 12:03 ` hinko.kocevar
1 sibling, 0 replies; 14+ messages in thread
From: Ricard Wanderlof @ 2007-08-23 12:00 UTC (permalink / raw)
To: Tushar Kapse; +Cc: Linux mtd
On Thu, 23 Aug 2007, Tushar Kapse wrote:
> thanx for your valuable suggestion..
> Here are the steps followed to create JFFS2 and dumped into the NAND
> using Boot Loader utility for NAND:
> ...
> Once we have followed above steps,and when i Boot the Linux we found
> the error as follows:
> "Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(31,0)"
Have you tried specifying the file system type of the root file system on
the kernel command line (i.e. rootfstype=jffs2 ) ? Depending on the file
system support configured in the kernel, it may not necessarily
auto-detect a jffs2 file system.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-23 11:39 ` Tushar Kapse
2007-08-23 12:00 ` Ricard Wanderlof
@ 2007-08-23 12:03 ` hinko.kocevar
2007-08-23 14:21 ` Tushar Kapse
1 sibling, 1 reply; 14+ messages in thread
From: hinko.kocevar @ 2007-08-23 12:03 UTC (permalink / raw)
To: Tushar Kapse; +Cc: linux-mtd, Ricard Wanderlof
Tushar Kapse wrote:
> thanx for your valuable suggestion..
> Here are the steps followed to create JFFS2 and dumped into the NAND
> using Boot Loader utility for NAND:
> 1) On the Host(x86) we have created a directory "Target" and copied
> the minumum required file system into that directory.
> 2)Then we have created a jffs2 image using the following command:
> "#./mkfs.jffs2 --pad=0xa00000 --eraseblock=0x20000 --pagesize=2048 -l
> -n --root=Target --output Target.jffs2"
> Note: Here we want to create 10Mb image.
> 3)Then we have copied Target.jffs2 into NAND device using Boot Loader
> NAND utility which reside in the NOR.
> Note:
> 1)We have copied Target.jffs2 from 0th Block, 0th Page onwards...
> 2)We dont have any partitions on NAND device. NAND formated using
> utility of Bootloader.
Can you check that the jffs2 image was indeed written on the NAND (by
using some bootloader commands)?
By dumping and HEX comparing, lets say, first few bytes, kbytes...
>
> If we have missed any steps kindly tell us,
> waiting for your reply
> Best regards
> tushar
>
> Once we have followed above steps,and when i Boot the Linux we found
> the error as follows:
> "Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(31,0)"
Are you sure that this NAND device (partition) is located on
/dev/mtdblk0 (as the error suggests)? If you have NOR flash also present
on your this might not be the case...
Regards,
Hinko
--
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: hinko.kocevar@cetrtapot.si
Http: www.cetrtapot.si
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-23 12:03 ` hinko.kocevar
@ 2007-08-23 14:21 ` Tushar Kapse
2007-08-23 14:49 ` Ricard Wanderlof
0 siblings, 1 reply; 14+ messages in thread
From: Tushar Kapse @ 2007-08-23 14:21 UTC (permalink / raw)
To: hinko.kocevar@cetrtapot.si; +Cc: linux-mtd, Ricard Wanderlof
Thanx....
we have verified the jffs2 image in the nand with the bootloader
utility and it is correct.
how to verify that this NAND device is located on /dev/mtdblk0 ?
since we do not have any partion in the nand, is it necessary to have
the partition in the nand?
Regards,
Tushar
On 8/23/07, hinko.kocevar@cetrtapot.si <hinko.kocevar@cetrtapot.si> wrote:
> Tushar Kapse wrote:
> > thanx for your valuable suggestion..
> > Here are the steps followed to create JFFS2 and dumped into the NAND
> > using Boot Loader utility for NAND:
> > 1) On the Host(x86) we have created a directory "Target" and copied
> > the minumum required file system into that directory.
> > 2)Then we have created a jffs2 image using the following command:
> > "#./mkfs.jffs2 --pad=0xa00000 --eraseblock=0x20000 --pagesize=2048 -l
> > -n --root=Target --output Target.jffs2"
> > Note: Here we want to create 10Mb image.
> > 3)Then we have copied Target.jffs2 into NAND device using Boot Loader
> > NAND utility which reside in the NOR.
> > Note:
> > 1)We have copied Target.jffs2 from 0th Block, 0th Page onwards...
> > 2)We dont have any partitions on NAND device. NAND formated using
> > utility of Bootloader.
>
> Can you check that the jffs2 image was indeed written on the NAND (by
> using some bootloader commands)?
> By dumping and HEX comparing, lets say, first few bytes, kbytes...
>
> >
> > If we have missed any steps kindly tell us,
> > waiting for your reply
> > Best regards
> > tushar
> >
> > Once we have followed above steps,and when i Boot the Linux we found
> > the error as follows:
> > "Kernel panic - not syncing: VFS: Unable to mount root fs on
> > unknown-block(31,0)"
>
> Are you sure that this NAND device (partition) is located on
> /dev/mtdblk0 (as the error suggests)? If you have NOR flash also present
> on your this might not be the case...
>
> Regards,
> Hinko
>
> --
> ČETRTA POT, d.o.o., Kranj
> Planina 3
> 4000 Kranj
> Slovenia, Europe
> Tel. +386 (0) 4 280 66 03
> E-mail: hinko.kocevar@cetrtapot.si
> Http: www.cetrtapot.si
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: MTD nand driver help
2007-08-23 14:21 ` Tushar Kapse
@ 2007-08-23 14:49 ` Ricard Wanderlof
0 siblings, 0 replies; 14+ messages in thread
From: Ricard Wanderlof @ 2007-08-23 14:49 UTC (permalink / raw)
To: Linux mtd
On Thu, 23 Aug 2007, Tushar Kapse wrote:
> Thanx....
> we have verified the jffs2 image in the nand with the bootloader
> utility and it is correct.
> how to verify that this NAND device is located on /dev/mtdblk0 ?
> since we do not have any partion in the nand, is it necessary to have
> the partition in the nand?
Even if you haven't partitioned your nand flash, you will probably find
that for instance your nor flash is /dev/mtdblock0 and your nand flash
then may be /dev/mtdblock1, assuming don't have any partitions in the nor
flash. I.e. even without partitioning, each flash chip has its own
/dev/mtdblockn device. This is especially true when the devices are not
the same type (nor vs. nand). If you have several nor devices of the same
type, depending on your mtd configuration, they can be concatenated to one
single /dev/mtdblockn device.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2007-08-23 14:50 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-16 16:41 MTD nand driver help Tushar Kapse
2007-08-16 16:46 ` Josh Boyer
2007-08-16 17:22 ` Artem Bityutskiy
2007-08-16 17:23 ` Artem Bityutskiy
2007-08-23 6:17 ` Tushar Kapse
2007-08-23 6:24 ` Ricard Wanderlof
[not found] ` <3db60e760708222340g49294138w9ce3372ab5eb50bf@mail.gmail.com>
2007-08-23 6:44 ` Ricard Wanderlof
2007-08-23 9:11 ` Tushar Kapse
2007-08-23 10:03 ` hinko.kocevar
2007-08-23 11:39 ` Tushar Kapse
2007-08-23 12:00 ` Ricard Wanderlof
2007-08-23 12:03 ` hinko.kocevar
2007-08-23 14:21 ` Tushar Kapse
2007-08-23 14:49 ` Ricard Wanderlof
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox