MTD : No Space left on device

hposhtiw at hns.com hposhtiw at hns.com
Mon Oct 8 14:37:48 EDT 2007


Hi All,

I have been facing a strange problem ( At least strange to me).

I want total 10 partitions on a AMD flash. I created those with
the physical map.(~/mtd/maps/nomadik-flash.c)

Detailed Mapping / Partition is shown in the Log.

I made root file system's JFFS2 image from my linux machine and
then i flashed it on the flash device using tftp commands.

Now the boards boots and load root file system as i wished but it
doesn't allow me to create node or mount another mtd block device
on it , it says NO SPACE LEFT ON DEVICE.

So to make this work i changed the image root file system
partition and hence image size to 16 MB which allows me to mount
another device and allows me to write on FLASh but i don't have
same  partitions as i want ( I had to give up some of the
partiotions that is necessary)


*Another strange problem i found is that the actual root file
system is only 8.1 MB ,If i try to restrict the size to 10 MB
using mkfs.jffs2 command it creates 16 MB of image, How can i
achive 10 MB image.


./mkfs.jffs2 -l -e 0x20000 --pad=0xA00000 -d RootFS -o RootFs.img




flashed the root file system from 


Harshad Poshtiwala            Email:hposhtiw at hns.com
Hughes Network Systems, LLC.  Tel: (301) 428 2821
11717 Exploration Lane	      Cell:201-993-5860
Germantown, MD 20876	

Hughes Network Systems


-------------- next part --------------
U-Boot 1.1.4 (Aug 17 2007 - 14:26:52)

DRAM:  64 MB
Flash: 64 MB
Using default environment
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Booting image at 30060000 ...
   Image Name:   Linux-2.6.14.7-tiny1-WR1.4aq_sma
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1063396 Bytes =  1 MB
   Load Address: 00008000
   Entry Point:  00008000
OK

Starting kernel ...

Linux version 2.6.14.7-tiny1-WR1.4aq_small (hposhtiw at tlmcm3) (gcc version 3.4.4 (Wind River Linux)) #12 Fri Sep 28 17:43:05 EDT 2007
CPU: ARM926EJ-Sid(wb) [41069264] revision 4 (ARMv5TEJ)
Machine: ARM-Nomadik
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists
Kernel command line: root=/dev/mtdblock3 rootfs=jffs2 console=ttyAMA1,115200n8 init=linuxrc
VIC Init done...
PID hash table entries: 512 (order: 9, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62464KB available (1813K code, 447K data, 100K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
nomadik_epio_init: Core Board Revision 3.3,  CPLD Code Revision 3.7
EPIO init... done!
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
nomadik_clcd_setup
CLCD: Registers set to
  122e1238 040f0d3f 00ef1804 00000000
  03c00000 03c12c00 00000000 00130829
CLCD: Nomadik hardware, QVGA_P display
CLCD: Registers set to
  122e1238 040f0d3f 00ef1804 00000000
  03c00000 03c12c00 00000000 00130829
Console: switching to colour frame buffer device 30x40
Serial: AMBA PL011 UART driver
ttyAMA0 at MMIO map 0x101fd000 mem 0xc485a000 (irq = 12) is a AMBA/PL011
ttyAMA1 at MMIO map 0x101fb000 mem 0xc485c000 (irq = 17) is a AMBA/PL011
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
RAMDISK driver initialized: 16 RAM disks of 46080K size 1024 blocksize
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
NET: Registered protocol family 24
smc_init ......................
smc_drv_probe ......................
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico at cam.org>
smc91x: since no kernel option given, setting Random MAC address
smc91x: request_interrupt Requesting Interrupt Line GPIO Pin : 30
eth0: SMC91C11xFD (rev 2) at c485e300 IRQ 30 [nowait]
eth0: Ethernet addr: da:5a:ab:7e:e5:e6
FSMC Initialization for NOR (Bank 0)...done!
NOR Flash Bank 0: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
NOR Flash Bank 0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Nomadik NOR bank 0 found
...done!
There is no concationation 0
Could not concatanate BRH Flash Banks
Using static mappings
Creating 7 MTD partitions on "NOR Flash Bank 0":
0x00000000-0x00040000 : "BootLoader(NOR)"
0x00060000-0x00360000 : "Kernel Image(NOR)"
0x00360000-0x00660000 : "Kernel Image (Secondary Image)"
0x00660000-0x01260000 : "Root Filesystem(NOR)"
0x01260000-0x01e60000 : "Root Filesystem(Seconday Image)"
0x01e60000-0x02360000 : "Primary image of AP Application Filesystem(NOR)"
0x02360000-0x02860000 : "Secondary image of AP Application Filesystem(NOR)"
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 100K
init started:  BusyBox v1.1.2 (2007.09.10-16:57+0000) multi-call binary
Starting pid 698, console /dev/console: '/etc/init.d/rcS'
FATAL: Could not open /lib/modules/2.6.14.7-tiny1-WR1.4aq_small/modules.dep.temp for writing: No space left on device
Welcome to Wind River Linux

Please press Enter to activate this console.
Starting pid 706, console /dev/console: '/bin/sh'


BusyBox v1.1.2 (2007.09.10-16:57+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "BootLoader(NOR)"
mtd1: 00300000 00020000 "Kernel Image(NOR)"
mtd2: 00300000 00020000 "Kernel Image (Secondary Image)"
mtd3: 00c00000 00020000 "Root Filesystem(NOR)"
mtd4: 00c00000 00020000 "Root Filesystem(Seconday Image)"
mtd5: 00500000 00020000 "Primary image of AP Application Filesystem(NOR)"
mtd6: 00500000 00020000 "Secondary image of AP Application Filesystem(NOR)"
# df
Filesystem           1k-blocks      Used Available Use% Mounted on
tmpfs                    31300         0     31300   0% /dev/shm
## cat /proc/meminfo
MemTotal:        62600 kB
MemFree:         56536 kB
Buffers:             0 kB
Cached:           2380 kB
SwapCached:          0 kB
Active:           1016 kB
Inactive:         1644 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        62600 kB
LowFree:         56536 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:               0 kB
Writeback:           0 kB
Mapped:           1020 kB
Slab:             1492 kB
CommitLimit:     31300 kB
Committed_AS:     1040 kB
PageTables:         64 kB
VmallocTotal:   188416 kB
VmallocUsed:     65924 kB
VmallocChunk:   122364 kB
## cat /proc/devices
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 /dev/vc/0
  4 tty
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
 29 fb
 89 i2c
 90 mtd
108 ppp
128 ptm
136 pts
204 ttyAMA

Block devices:
#Block devices:
# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / jffs2 rw,noatime 0 0
proc /proc proc rw,nodiratime 0 0
sysfs /sys sysfs rw 0 0
devpts /dev/pts devpts rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
relayfs /mnt/relay relayfs rw 0 0
major minor  #blocks  name

  31     0        256 mtdblock0
  31     1       3072 mtdblock1
  31     2       3072 mtdblock2
  31     3      12288 mtdblock3
  31     4      12288 mtdblock4
  31     5       5120 mtdblock5
  31     6       5120 mtdblock6
#
# mknod /dev/mtdblock0 b 31 0
mknod: /dev/mtdblock0: No space left on device
#

mount -t jffs2 /dev/mtdblock4 /mnt
mount: Mounting /dev/mtdblock4 on /mnt failed: No such file or directory
# mknod /dev/mtdblock5 b 31 0
mknod: /dev/mtdblock5: No space left on device
# mknod /dev/mtdblock0 b 31 0
mknod: /dev/mtdblock0: No space left on device
# reboot
Starting pid 734, console /dev/console: '/sbin








NOW I CHANGED ROOT FILE SYSTEM PARTIOTION TO 16 MB


U-Boot 1.1.4 (Aug 17 2007 - 14:26:52)

DRAM:  64 MB
Flash: 64 MB
Using default environment
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Booting image at 30060000 ...
   Image Name:   Linux-2.6.14.7-tiny1-WR1.4aq_sma
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1042072 Bytes = 1017.6 kB
   Load Address: 00008000
   Entry Point:  00008000
OK

Starting kernel ...

Linux version 2.6.14.7-tiny1-WR1.4aq_small (hposhtiw at tlmcm3) (gcc version 3.4.4 (Wind River Linux)) #15 Mon Oct 1 14:20:02 EDT 2007
CPU: ARM926EJ-Sid(wb) [41069264] revision 4 (ARMv5TEJ)
Machine: ARM-Nomadik
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 32768 bytes, associativity 4, 32 byte lines, 256 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists
Kernel command line: root=/dev/mtdblock3 rootfs=jffs2 console=ttyAMA1,115200n8 init=linuxrc
VIC Init done...
PID hash table entries: 512 (order: 9, 8192 bytes)
Console: colour dummy device 80x30
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 64MB = 64MB total
Memory: 62464KB available (1772K code, 443K data, 100K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
nomadik_epio_init: Core Board Revision 3.3,  CPLD Code Revision 3.7
EPIO init... done!
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
nomadik_clcd_setup
CLCD: Registers set to
  122e1238 040f0d3f 00ef1804 00000000
  03c00000 03c12c00 00000000 00130829
CLCD: Nomadik hardware, QVGA_P display
CLCD: Registers set to
  122e1238 040f0d3f 00ef1804 00000000
  03c00000 03c12c00 00000000 00130829
Console: switching to colour frame buffer device 30x40
Serial: AMBA PL011 UART driver
ttyAMA0 at MMIO map 0x101fd000 mem 0xc485a000 (irq = 12) is a AMBA/PL011
ttyAMA1 at MMIO map 0x101fb000 mem 0xc485c000 (irq = 17) is a AMBA/PL011
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
RAMDISK driver initialized: 16 RAM disks of 46080K size 1024 blocksize
loop: loaded (max 8 devices)
smc_init ......................
smc_drv_probe ......................
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico at cam.org>
smc91x: since no kernel option given, setting Random MAC address
smc91x: request_interrupt Requesting Interrupt Line GPIO Pin : 30
eth0: SMC91C11xFD (rev 2) at c485e300 IRQ 30 [nowait]
eth0: Ethernet addr: ee:61:3c:d0:de:2c
FSMC Initialization for NOR (Bank 0)...done!
NOR Flash Bank 0: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
NOR Flash Bank 0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Nomadik NOR bank 0 found
...done!
There is no concationation 0
Could not concatanate BRH Flash Banks
Using static mappings
Creating 7 MTD partitions on "NOR Flash Bank 0":
0x00000000-0x00040000 : "BootLoader(NOR)"
mtd: Giving out device 0 to BootLoader(NOR)
0x00060000-0x00360000 : "Kernel Image(NOR)"
mtd: Giving out device 1 to Kernel Image(NOR)
0x00360000-0x00660000 : "Kernel Image (Secondary Image)"
mtd: Giving out device 2 to Kernel Image (Secondary Image)
0x00660000-0x01660000 : "Root Filesystem(NOR)"
mtd: Giving out device 3 to Root Filesystem(NOR)
0x01660000-0x11660000 : "Root Filesystem(Seconday Image)"
mtd: partition "Root Filesystem(Seconday Image)" extends beyond the end of device "NOR Flash Bank 0" -- size truncated to 0x29a0000
mtd: Giving out device 4 to Root Filesystem(Seconday Image)
0x02660000-0x02b60000 : "Primary image of AP Application Filesystem(NOR)"
mtd: Giving out device 5 to Primary image of AP Application Filesystem(NOR)
0x02b60000-0x03060000 : "Secondary image of AP Application Filesystem(NOR)"
mtd: Giving out device 6 to Secondary image of AP Application Filesystem(NOR)
mice: PS/2 mouse device common for all mice
i2c /dev entries driver
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
TCP bic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (jffs2 filesystem).
Freeing init memory: 100K
init started:  BusyBox v1.1.2 (2007.09.10-16:57+0000) multi-call binary
Starting pid 681, console /dev/console: '/etc/init.d/rcS'
Welcome to Wind River Linux

Please press Enter to activate this console.
Starting pid 689, console /dev/console: '/bin/sh'


BusyBox v1.1.2 (2007.09.10-16:57+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

# mknod /dev/mtdblock5 b 31 0
# mount -t jffs2 /dev/mtdblock5 /mnt
jffs2: Too few erase blocks (2)
mount: Mounting /dev/mtdblock5 on /mnt failed: Invalid argument
# mount -t jffs2 /dev/mtdblock4 /mnt
mount: Mounting /dev/mtdblock4 on /mnt failed: No such file or directory
# mknod /dev/mtdblock4 b 31 0
# mount -t jffs2 /dev/mtdblock4 /mnt
jffs2: Too few erase blocks (2)
mount: Mounting /dev/mtdblock4 on /mnt failed: Invalid argument
# mknod /dev/mtdblock3 b 31 0
# mount -t jffs2 /dev/mtdblock3 /mnt
jffs2: Too few erase blocks (2)
mount: Mounting /dev/mtdblock3 on /mnt failed: Invalid argument
# mknod /dev/mtdblock3 b 31 3
mknod: /dev/mtdblock3: File exists
# rm -rf /dev/mtdblock3
# rm -rf /dev/mtdblock4
# rm -rf /dev/mtdblock5
# mknod /dev/mtdblock0 b 31 0
# mknod /dev/mtdblock1 b 31 1
# mknod /dev/mtdblock2 b 31 2
# mknod /dev/mtdblock3 b 31 3
# mknod /dev/mtdblock4 b 31 4
# mknod /dev/mtdblock5 b 31 5
# mknod /dev/mtdblock6 b 31 6
# mknod /dev/mtdblock7 b 31 7
# mount -t jffs2 /dev/mtdblock3 /mnt
# mount -t jffs2 /dev/mtdblock5 /mnt
# umount /mnt

#
# mount -t jffs2 /dev/mtdblock5 /mnt
# cd mnt/
# ls
# cd ..
# umount /mnt
# reboot


More information about the linux-mtd mailing list