<5>0x000000000000-0x000000080000 : "Boot firmware"
<5>0x000000080000-0x000000780000 : "Kernel"
<5>0x000000780000-0x000000800000 : "Reserve"
<6>NAND device: Manufacturer ID: 0x98, Chip ID: 0xdc (Toshiba NAND 512MiB 3,3V 8
-bit)
<6>Scanning device for bad blocks
<5>Creating 4 MTD partitions on "gen_nand.1":
<5>0x000000000000-0x000000800000 : "Spark kernel"
<5>0x000000800000-0x000018000000 : "Spark Userfs"
<5>0x000018000000-0x000018800000 : "E2 kernel"
<5>0x000018800000-0x00001ff00000 : "E2 Userfs"
[root@stlinux]#cat /proc/mtd
dev: size erasesize name
mtd0: 00080000 00010000 "Boot firmware"
mtd1: 00700000 00010000 "Kernel"
mtd2: 00080000 00010000 "Reserve"
mtd3: 00800000 00020000 "Spark kernel"
mtd4: 17800000 00020000 "Spark Userfs"
mtd5: 00800000 00020000 "E2 kernel"
mtd6: 07700000 00020000 "E2 Userfs"
Using physmap partition information
<5>Creating 3 MTD partitions on "physmap-flash":
<5>0x000000000000-0x000000080000 : "Boot firmware"
<5>0x000000080000-0x000000780000 : "Kernel"
<5>0x000000780000-0x000000800000 : "Reserve"
<6>NAND device: Manufacturer ID: 0x98, Chip ID: 0xdc (Toshiba NAND 512MiB 3,3V 8
-bit)
<6>Scanning device for bad blocks
<5>Creating 4 MTD partitions on "gen_nand.1":
<5>0x000000000000-0x000000800000 : "Spark kernel"
<5>0x000000800000-0x000018000000 : "Spark Userfs"
<5>0x000018000000-0x000018800000 : "E2 kernel"
<5>0x000018800000-0x00001ff00000 : "E2 Userfs"
[B]HOWTO implement NAND support[/B]
[B]Where can you get the code ?[/B]
The latest changes to JFFS2 and the underlying NAND code are not in the kernel code at the moment. The latest code is available from [URL="http://www.linux-mtd.infradead.org"]CVS and daily snapshots[/URL]
There are four layers of software
[LIST=1]
[*]JFFS2: filesystem driver
[*]MTD: Memory Technology Devices driver
[*]NAND: generic NAND driver
[*]Hardware specific driver
[/LIST]
the MTD driver just provides a mount point for JFFS2. The generic NAND driver provides all functions, which are neccecary to identify,
read, write and erase NAND Flash. [COLOR=#ff0000]The hardware dependend functions are provided by the hardware driver. They provide mainly the hardware access informations and functions for the generic NAND driver. For YAFFS applies the same.[/COLOR]
[B]API Documentation[/B]
A complete API documentation is available as DocBook template in the Documentation/DocBook directory of the MTD source tree.
Read the API documentation [B]Link ist nicht mehr aktiv.[/B]
[B]Supported chips[/B]
Most NAND chips actually available should be supported by the current code. If you have a chip, which is not supported, you can easily add it by extending the chiplist in drivers/mtd/nand/nand_ids.c. The chip name does not longer contain cryptic part numbers, as the device ID is just an information about size, erase block size, pagesize and operating voltage. Add an entry, which contains following information:
{ name, id, pagesize, chipsize, erasesize, options }
[TABLE]
[TR]
[TD][B]ref[/B][/TD]
[TD][B]comment[/B][/TD]
[/TR]
[TR]
[TD]name[/TD]
[TD]string: "NAND 'size' 'voltage' 'bus-width'"[/TD]
[/TR]
[TR]
[TD]id[/TD]
[TD]chip device code. This code is read during nand_scan. Check datasheet for the code of your chip[/TD]
[/TR]
[TR]
[TD]pagesize[/TD]
[TD]Page size (0,256,512). 0 indicates that the pagesize can be read out from the chip in the [COLOR=#ff0000]extended ID[/COLOR][/TD]
[/TR]
[TR]
[TD]chipsize[/TD]
[TD]The total size of the chip in MiB[/TD]
[/TR]
[TR]
[TD]erasesize[/TD]
[TD]the erasesize of your chip in bytes. 0 for chips with [COLOR=#ff0000]extended ID[/COLOR][/TD]
[/TR]
[TR]
[TD]options[/TD]
[TD]Options. Bitfield to enable chip specific options. See nand.h[/TD]
[/TR]
[/TABLE]
Please contact NAND driver maintainer to include it in the public source tree.
Manufacturer codes are scanned during nand_scan too. If the code is one of the known codes in the manufacturer ID table, the name of the manufacturer is printed out, else "Unknown" is printed. This happens when your hardware driver is loaded and calls nand_scan. Add codes, which are new and contact NAND driver maintainer to include it
[B]Config settings[/B]
The following config switches have to be set. JFFS2 on NAND [B]does not[/B] work, if one of these settings is missing.
CONFIG_MTD=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_YOURBOARD=y
CONFIG_JFFS2_FS=y
CONFIG_JFFS2_FS_DEBUG=0
CONFIG_JFFS2_FS_NAND=y
Make sure that fs/Config.in contains the following lines:
dep_tristate 'Journalling Flash File System v2 (JFFS2) support' CONFIG_JFFS2_FS $CONFIG_MTD
if [ "$CONFIG_JFFS2_FS" = "y" -o "$CONFIG_JFFS2_FS" = "m" ] ; then
int 'JFFS2 debugging verbosity (0 = quiet, 2 = noisy)' CONFIG_JFFS2_FS_DEBUG 0
bool 'JFFS2 support for NAND chips' CONFIG_JFFS2_FS_NAND
fi
Verwendest Du eigentlich die selbe Kernelversion wie Spark?<5>Creating 4 MTD partitions on "gen_nand.1":
<5>Linux version 2.6.32.42_stm24_V4.1-SAT7111_7111-STSDK -YW-STM24 0.0.02 v0.1.3
(d26lf@linux-server19) (gcc version 4.5.3 20110525 (STMicroelectronics/Linux Ba
se 4.5.3-79) (GCC) ) #47 PREEMPT Tue Aug 7 17:15:36 CST 2012
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash":
0x000000000000-0x000000080000 : "Boot firmware"
0x000000080000-0x000000780000 : "Kernel"
0x000000780000-0x000000800000 : "Reserve"
stm-nand-emi: Configuring EMI Bank 1 for NAND access
[MTD][NAND]: nand_decode_id: failed to decode NAND device ID
Failed to decode NAND READID [98 dc 90 15]
No NAND device found!!!
stm-nand-emi: nand_scan failed
[COLOR=#ff0000]No NAND device found!!!
stm-nand-flex:nand_scan failed[/COLOR]
stm-nand-emi: Configuring EMI Bank 1 for NAND access
[MTD][NAND]: nand_decode_id: failed to decode NAND device ID
Failed to decode NAND READID [98 dc 90 15]
No NAND device found!!!
stm-nand-emi: nand_scan failed
Using physmap partition information
[ 0.432000] Creating 3 MTD partitions on "physmap-flash":
[ 0.436000] 0x000000000000-0x000000080000 : "Boot firmware"
[ 0.440000] 0x000000080000-0x000000780000 : "Kernel"
[ 0.448000] 0x000000780000-0x000000800000 : "Reserve"
[ 0.452000] stm-nand-emi: Configuring EMI Bank 1 for NAND access
[ 0.456000] NAND device: Manufacturer ID: 0x98, Chip ID: 0xdc (Toshiba NAND 512MiB 3,3V 8-bit)
[ 0.460000] Creating 4 MTD partitions on "stm-nand-emi.[COLOR=#ff0000]0[/COLOR]":
[ 0.464000] 0x000000000000-0x000000800000 : "Spark Kernel"
[ 0.472000] 0x000000800000-0x000018000000 : "Spark Rootfs"
[ 0.476000] 0x000018000000-0x000018800000 : "E2 Kernel"
[ 0.484000] 0x000018800000-0x00001ff00000 : "E2 RootFs"
MB618> nand info
Device 0: NAND 512MiB 3,3V 8-bit, sector size 128 KiB
- 1st release of ntrino-hd and ntrino-hd2 for flash (thx mohousch)
(default bootup ntrino-hd and you can switch by osd to ntrino-hd2,
back from ntrino-hd2 to ntrino-hd: "rm /etc/.nhd2 && reboot -f",
or add plugins to user-blue-panel and select "startNHD")
Wir verwenden Cookies und ähnliche Technologien für die folgenden Zwecke:
Akzeptieren Sie Cookies und diese Technologien?
Wir verwenden Cookies und ähnliche Technologien für die folgenden Zwecke:
Akzeptieren Sie Cookies und diese Technologien?