2008-07-15 10:36:24     ERROR: ioctl(MEMGETINFO) failed, errno=25 when writing into flash from uclinux

2008-07-15 10:36:24     ERROR: ioctl(MEMGETINFO) failed, errno=25 when writing into flash from uclinux

Oussema Harbi (TUNISIA)

Message: 58855   

Hi everybody,

I am working on a bf537 stamp board

Everytime i try to write on flash i get this error :

ERROR: ioctl(MEMGETINFO) failed, errno=25

I can erase the flash blocks ,but i cant mount them (when i try to mount /dev/mtdblock1 for example)

here is the kernel log :

root: /> dmesg

Linux version 2.6.22.18-ADI-2008R1-svn (root@MSI) (gcc version 4.1.2 (ADI svn)) #40 Tue Jul 15 16:15:37 CEST 2008

early printk enabled on early_BFuart0

Hardware Trace Active and Enabled

Warning: limiting memory to 56MB due to hardware anomaly 05000263

Reset caused by Software reset

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 500 MHz core clock and 100 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text = 0x00001000-0x000e9120

  rodata = 0x000ea000-0x00131efc

  data = 0x00132000-0x00142000

  stack = 0x00132000-0x00134000

  init = 0x00142000-0x0054f000

  bss = 0x0054f000-0x0055df50

  available = 0x0055df50-0x037ff000

  DMA Zone = 0x03f00000-0x04000000

On node 0 totalpages: 14335

  DMA zone: 111 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 14224 pages, LIFO batch:3

  Normal zone: 0 pages used for memmap

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists. Total pages: 14224

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=192.168.0.15:10.0.0.44:10.0.0.2:255.255.255.0:1:eth0:off ip=10.0.0.65:10.0.0.44:10.0.0.2:255.255.255.0:1:eth0:off

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

console handover: boot [early_BFuart0] -> real [ttyBF0]

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Kernel managed physical pages: 14335

Memory available: 51268k/65536k RAM, (4148k init code, 928k kernel code, 415k data, 1024k dma, 7756k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (15 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 48 KB (40 KB free)

Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)

Security Framework v1.0.0 initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

Generic PHY: Registered new driver

NET: Registered protocol family 2

IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

PPI: PPI-EKC Driver INIT IRQ:23

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

SMSC LAN83C185: Registered new driver

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)

bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver

physmap platform flash device: 00400000 at 20000000

physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank

Amd/Fujitsu Extended Query Table at 0x0040

number of CFI chips: 1

cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

RedBoot partition parsing not available

Using physmap partition information

Creating 4 MTD partitions on "physmap-flash.0":

0x00000000-0x00040000 : "Bootloader"

0x00040000-0x00120000 : "Kernel"

0x00120000-0x003f0000 : "RootFS"

0x003f0000-0x00400000 : "MAC Address"

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

Setting up Blackfin MMR debugfs

rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 01:36:09 (5769)

IP-Config: Complete:

  device=eth0, addr=10.0.0.65, mask=255.255.255.0, gw=10.0.0.2,

  host=1, domain=, nis-domain=(none),

  bootserver=10.0.0.44, rootserver=10.0.0.44, rootpath=

Freeing unused kernel memory: 4148k freed

dma_alloc_init: dma_page @ 0x0054c000 - 256 pages at 0x03f00000

PHY: 0:01 - Link is Up - 100/Full

Do you have any idea how to fix that ?

QuoteReplyEditDelete

2008-07-15 10:47:31     Re: ERROR: ioctl(MEMGETINFO) failed, errno=25 when writing into flash from uclinux

Mike Frysinger (UNITED STATES)

Message: 58856   

show the exact commands you're running and resulting output

QuoteReplyEditDelete

2008-07-15 11:42:56     Re: ERROR: ioctl(MEMGETINFO) failed, errno=25 when writing into flash from uclinux

Oussema Harbi (TUNISIA)

Message: 58860   

here are the commands and the output :

root: /> flashw -u -o 0x20100000 -f vmImage /dev/mtdblock1

ERROR: ioctl(MEMGETINFO) failed, errno=25

nandwrite -y /dev/mtdblack1 /vmlinux 

open flash: No such file or directory

root: /> mkdir /mnt/test

root: /> mount /dev/mtdblock1 /mnt/test

mount: mounting /dev/mtdblock1 on /mnt/test failed

root: /> mount

rootfs on / type rootfs (rw)

proc on /proc type proc (rw)

ramfs on /var type ramfs (rw)

sysfs on /sys type sysfs (rw)

devpts on /dev/pts type devpts (rw)

debugfs on /sys/kernel/debug type debugfs (rw)

securityfs on /sys/kernel/security type securityfs (rw)

root: /> cat /proc/mtd

dev: size erasesize name

mtd0: 00040000 00010000 "Bootloader"

mtd1: 000e0000 00010000 "Kernel"

mtd2: 002d0000 00010000 "RootFS"

mtd3: 00010000 00010000 "MAC Address"

root: /> cat /proc/filesystems

nodev sysfs

nodev rootfs

nodev bdev

nodev proc

nodev debugfs

nodev securityfs

nodev sockfs

nodev pipefs

nodev anon_inodefs

nodev futexfs

nodev tmpfs

nodev inotifyfs

nodev devpts

nodev ramfs

root: /> cat /proc/devices

Character devices:

  1 mem

  5 /dev/tty

  5 /dev/console

  5 /dev/ptmx

10 misc

13 input

90 mtd

128 ptm

136 pts

204 ttyBF

237 sport

254 rtc

Block devices:

  1 ramdisk

31 mtdblock

QuoteReplyEditDelete

2008-07-15 19:44:59     Re: ERROR: ioctl(MEMGETINFO) failed, errno=25 when writing into flash from uclinux

Mike Frysinger (UNITED STATES)

Message: 58879   

that value given to -o doesnt make any sense.  you give it an offset from the start of the mtd partition ... whether it is memory mapped, or SPI based, or whatever does not matter.

  • Created
Was this helpful?

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.