* [U-Boot] MTD partitions not mounted by the kernel
@ 2011-02-10 14:45 Alexandre Gambier
2011-02-10 14:50 ` Albert ARIBAUD
2011-02-10 14:59 ` Wolfgang Denk
0 siblings, 2 replies; 8+ messages in thread
From: Alexandre Gambier @ 2011-02-10 14:45 UTC (permalink / raw)
To: u-boot
Hello,
I use U-Boot 1.3.1 with a NOR and a NAND Flash.
I created the following partitions with U-Boot.
device nor0 <NOR>, # parts = 4
#: name size offset mask_flags
0: U-Boot 0x00080000 0x00000000 0
1: Environment 0x00020000 0x00080000 0
2: Kernel 0x00400000 0x000a0000 0
3: FreeNOR 0x00360000 0x004a0000 0
device nand0 <NAND>, # parts = 2
#: name size offset mask_flags
0: FS 0x02000000 0x00000000 0
1: FreeNAND 0x06000000 0x02000000 0
active partition: nor0,0 - (U-Boot) 0x00080000 @ 0x00000000
defaults:
mtdids : nor0=NOR,nand0=NAND
mtdparts:
mtdparts=NOR:512k(U-Boot),128k(Environment),4M(Kernel),-(FreeNOR);NAND:32M(FS),-(FreeNAND)
I checked the support for MTD devices and for the MTD command line in
the kernel config.
here is my bootargs environment variable :
bootargs=console=ttyAS0,115200 mem=128M root=/dev/nfs
nfsroot=192.168.1.60:/tftpboot/stlinux/skyworth/rootfs
ip=192.168.1.111:192.168.1.60:192.168.1.1:255.255.255.0
mtdparts=NOR:512k(U-Boot),128k(Environment),4M(Kernel),-(FreeNOR);NAND:32M(FS),-(FreeNAND)
The problem is that once my system is running the MTD devices in /dev
are not created and the file /proc/mtd is empty.
Is my command line wrong ?
Thanks in advance.
Alex
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] MTD partitions not mounted by the kernel
2011-02-10 14:45 [U-Boot] MTD partitions not mounted by the kernel Alexandre Gambier
@ 2011-02-10 14:50 ` Albert ARIBAUD
2011-02-10 14:59 ` Wolfgang Denk
1 sibling, 0 replies; 8+ messages in thread
From: Albert ARIBAUD @ 2011-02-10 14:50 UTC (permalink / raw)
To: u-boot
Le 10/02/2011 15:45, Alexandre Gambier a ?crit :
> Hello,
>
> I use U-Boot 1.3.1 with a NOR and a NAND Flash.
> I created the following partitions with U-Boot.
U-Boot 1.3.1 is rather old., BTW
> device nor0<NOR>, # parts = 4
> #: name size offset mask_flags
> 0: U-Boot 0x00080000 0x00000000 0
> 1: Environment 0x00020000 0x00080000 0
> 2: Kernel 0x00400000 0x000a0000 0
> 3: FreeNOR 0x00360000 0x004a0000 0
>
> device nand0<NAND>, # parts = 2
> #: name size offset mask_flags
> 0: FS 0x02000000 0x00000000 0
> 1: FreeNAND 0x06000000 0x02000000 0
>
> active partition: nor0,0 - (U-Boot) 0x00080000 @ 0x00000000
>
> defaults:
> mtdids : nor0=NOR,nand0=NAND
> mtdparts:
> mtdparts=NOR:512k(U-Boot),128k(Environment),4M(Kernel),-(FreeNOR);NAND:32M(FS),-(FreeNAND)
>
> I checked the support for MTD devices and for the MTD command line in
> the kernel config.
>
> here is my bootargs environment variable :
> bootargs=console=ttyAS0,115200 mem=128M root=/dev/nfs
> nfsroot=192.168.1.60:/tftpboot/stlinux/skyworth/rootfs
> ip=192.168.1.111:192.168.1.60:192.168.1.1:255.255.255.0
> mtdparts=NOR:512k(U-Boot),128k(Environment),4M(Kernel),-(FreeNOR);NAND:32M(FS),-(FreeNAND)
>
> The problem is that once my system is running the MTD devices in /dev
> are not created and the file /proc/mtd is empty.
>
> Is my command line wrong ?
The creation of the entries in /dev is not caused by the sole presence
of mtdpart= on the command line. Either you must create these entries
manually, or you have to have a dynamic /dev manager, for instance udev,
create them for you with the help of adequate configuration files.
Note that this has nothing to do with U-Boot, though.
> Thanks in advance.
> Alex
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] MTD partitions not mounted by the kernel
2011-02-10 14:45 [U-Boot] MTD partitions not mounted by the kernel Alexandre Gambier
2011-02-10 14:50 ` Albert ARIBAUD
@ 2011-02-10 14:59 ` Wolfgang Denk
2011-02-10 16:04 ` Alexandre Gambier
1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2011-02-10 14:59 UTC (permalink / raw)
To: u-boot
Dear Alexandre Gambier,
In message <4D53F9FA.2070702@ftemaximal.fr> you wrote:
>
> mtdids : nor0=NOR,nand0=NAND
...
> mtdparts=NOR:512k(U-Boot),128k(Environment),4M(Kernel),-(FreeNOR);NAND:32M(FS),-(FreeNAND)
...
> The problem is that once my system is running the MTD devices in /dev
> are not created and the file /proc/mtd is empty.
>
> Is my command line wrong ?
I think so. Most probably your kernel uses different identifiers
instead of "NOR" and "NAND". Check the kernel boot messages!
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
You could end up being oddly sad and full of a strange, diffuse com-
passion which would lead you to believe that it might be a good idea
to wipe out the whole human race and start again with amoebas.
- Terry Pratchett, _Guards! Guards!_
^ permalink raw reply [flat|nested] 8+ messages in thread* [U-Boot] MTD partitions not mounted by the kernel
2011-02-10 14:59 ` Wolfgang Denk
@ 2011-02-10 16:04 ` Alexandre Gambier
2011-02-10 18:24 ` Andreas Pretzsch
0 siblings, 1 reply; 8+ messages in thread
From: Alexandre Gambier @ 2011-02-10 16:04 UTC (permalink / raw)
To: u-boot
Dear Wolfgang,
I tried to put some printk in the MTD driver and it seems that the
parse_mtd_partitions function is never called...
I will try to find what's wrong with my kernel configuration.
alex
On 02/10/2011 03:59 PM, Wolfgang Denk wrote:
> Dear Alexandre Gambier,
>
> In message<4D53F9FA.2070702@ftemaximal.fr> you wrote:
>> mtdids : nor0=NOR,nand0=NAND
> ...
>> mtdparts=NOR:512k(U-Boot),128k(Environment),4M(Kernel),-(FreeNOR);NAND:32M(FS),-(FreeNAND)
> ...
>> The problem is that once my system is running the MTD devices in /dev
>> are not created and the file /proc/mtd is empty.
>>
>> Is my command line wrong ?
> I think so. Most probably your kernel uses different identifiers
> instead of "NOR" and "NAND". Check the kernel boot messages!
>
> Best regards,
>
> Wolfgang Denk
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] MTD partitions not mounted by the kernel
2011-02-10 16:04 ` Alexandre Gambier
@ 2011-02-10 18:24 ` Andreas Pretzsch
2011-02-11 7:56 ` Alexandre Gambier
0 siblings, 1 reply; 8+ messages in thread
From: Andreas Pretzsch @ 2011-02-10 18:24 UTC (permalink / raw)
To: u-boot
Am Donnerstag, den 10.02.2011, 17:04 +0100 schrieb Alexandre Gambier:
> Dear Wolfgang,
>
> I tried to put some printk in the MTD driver and it seems that the
> parse_mtd_partitions function is never called...
parse_mtd_partitions() is called from the mapping drivers. See e.g.
linux/drivers/mtd/maps/ and linux/drivers/mtd/nand/.
The mtd-id provided in kernel-cmdline has to match the name of the
mapping driver, e.g. "physmap-flash" in case of
drivers/mtd/maps/physmap.c.
See linux/drivers/mtd/cmdlinepart.c for the format. Your spec looks
fine, presumably beside "NOR" and "NAND" names.
> I will try to find what's wrong with my kernel configuration.
You'll need CONFIG_MTD_PARTITIONS and CONFIG_MTD_CMDLINE_PARTS.
Also check /proc/cmdline that it's really passed and not overwritten by
hardcoded kernel commandline (CONFIG_CMDLINE_BOOL not set).
>
> alex
>
> On 02/10/2011 03:59 PM, Wolfgang Denk wrote:
> > Dear Alexandre Gambier,
> >
> > In message<4D53F9FA.2070702@ftemaximal.fr> you wrote:
> >> mtdids : nor0=NOR,nand0=NAND
> > ...
> >> mtdparts=NOR:512k(U-Boot),128k(Environment),4M(Kernel),-(FreeNOR);NAND:32M(FS),-(FreeNAND)
> > ...
> >> The problem is that once my system is running the MTD devices in /dev
> >> are not created and the file /proc/mtd is empty.
> >>
> >> Is my command line wrong ?
> > I think so. Most probably your kernel uses different identifiers
> > instead of "NOR" and "NAND". Check the kernel boot messages!
> >
> > Best regards,
> >
> > Wolfgang Denk
> >
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
--
carpe noctem engineering
Ingenieurbuero fuer Hard- & Software-Entwicklung Andreas Pretzsch
Dipl.-Ing. (FH) Andreas Pretzsch Tel. +49-(0)731-5521572
Hahnengasse 3 Fax: +49-(0)731-5521573
89073 Ulm, Germany email: apr at cn-eng.de
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] MTD partitions not mounted by the kernel
2011-02-10 18:24 ` Andreas Pretzsch
@ 2011-02-11 7:56 ` Alexandre Gambier
2011-02-11 9:06 ` Wolfgang Denk
0 siblings, 1 reply; 8+ messages in thread
From: Alexandre Gambier @ 2011-02-11 7:56 UTC (permalink / raw)
To: u-boot
Hello Andreas,
Thanks for this explanation.
I will try to write my own driver for my board.
Best regards
alex
On 02/10/2011 07:24 PM, Andreas Pretzsch wrote:
> Am Donnerstag, den 10.02.2011, 17:04 +0100 schrieb Alexandre Gambier:
>> Dear Wolfgang,
>>
>> I tried to put some printk in the MTD driver and it seems that the
>> parse_mtd_partitions function is never called...
> parse_mtd_partitions() is called from the mapping drivers. See e.g.
> linux/drivers/mtd/maps/ and linux/drivers/mtd/nand/.
>
> The mtd-id provided in kernel-cmdline has to match the name of the
> mapping driver, e.g. "physmap-flash" in case of
> drivers/mtd/maps/physmap.c.
>
> See linux/drivers/mtd/cmdlinepart.c for the format. Your spec looks
> fine, presumably beside "NOR" and "NAND" names.
>
>> I will try to find what's wrong with my kernel configuration.
> You'll need CONFIG_MTD_PARTITIONS and CONFIG_MTD_CMDLINE_PARTS.
>
> Also check /proc/cmdline that it's really passed and not overwritten by
> hardcoded kernel commandline (CONFIG_CMDLINE_BOOL not set).
>
>> alex
>>
>> On 02/10/2011 03:59 PM, Wolfgang Denk wrote:
>>> Dear Alexandre Gambier,
>>>
>>> In message<4D53F9FA.2070702@ftemaximal.fr> you wrote:
>>>> mtdids : nor0=NOR,nand0=NAND
>>> ...
>>>> mtdparts=NOR:512k(U-Boot),128k(Environment),4M(Kernel),-(FreeNOR);NAND:32M(FS),-(FreeNAND)
>>> ...
>>>> The problem is that once my system is running the MTD devices in /dev
>>>> are not created and the file /proc/mtd is empty.
>>>>
>>>> Is my command line wrong ?
>>> I think so. Most probably your kernel uses different identifiers
>>> instead of "NOR" and "NAND". Check the kernel boot messages!
>>>
>>> Best regards,
>>>
>>> Wolfgang Denk
>>>
>> _______________________________________________
>> U-Boot mailing list
>> U-Boot at lists.denx.de
>> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-02-11 9:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-10 14:45 [U-Boot] MTD partitions not mounted by the kernel Alexandre Gambier
2011-02-10 14:50 ` Albert ARIBAUD
2011-02-10 14:59 ` Wolfgang Denk
2011-02-10 16:04 ` Alexandre Gambier
2011-02-10 18:24 ` Andreas Pretzsch
2011-02-11 7:56 ` Alexandre Gambier
2011-02-11 9:06 ` Wolfgang Denk
2011-02-11 9:34 ` Alexandre Gambier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.