[#5205] flash_eraseall fails to erase /dev/mtd2 on bf526 ezbrd for it is Read-only file system

Document created by Aaronwu Employee on Sep 3, 2013
Version 1Show Document
  • View in full screen mode

[#5205] flash_eraseall fails to erase /dev/mtd2 on bf526 ezbrd for it is Read-only file system

Submitted By: Mingquan Pan

Open Date

2009-06-04 03:30:12     Close Date

2009-06-04 05:12:42

Priority:

Medium     Assignee:

Nobody

Status:

Closed     Fixed In Release:

N/A

Found In Release:

N/A     Release:

Category:

N/A     Board:

N/A

Processor:

BF526     Silicon Revision:

Is this bug repeatable?:

Yes     Resolution:

Assigned (Not Start)

Uboot version or rev.:

    Toolchain version or rev.:

09r1-r6

App binary format:

N/A     

Summary: flash_eraseall fails to erase /dev/mtd2 on bf526 ezbrd for it is Read-only file system

Details:

 

flash_eraseall fails to erase /dev/mtd2 on bf526 ezbrd for it is Read-only file system.

 

## Booting kernel from Legacy Image at 02000000 ...

   Image Name:   Linux-2.6.28.10-ADI-2009R1-svn65

   Created:      2009-06-03  17:01:37 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    2331989 Bytes =  2.2 MB

   Load Address: 00001000

   Entry Point:  001a965c

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001a965c

Linux version 2.6.28.10-ADI-2009R1-svn6543 (test@uclinux81-bf526) (gcc version 4.1.2 (ADI svn)) #36 Wed Jun 3 17:01:29 GMT 2009

console [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x0011d980

  rodata    = 0x0011d980-0x0017672c

  bss       = 0x00177000-0x00187e94

  data      = 0x00187e94-0x0019c000

    stack   = 0x0019a000-0x0019c000

  init      = 0x0019c000-0x0042d000

  available = 0x0042d000-0x03eff000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace Active and Enabled

Boot Mode: 1

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

Compiled for ADSP-BF526 Rev 0.0

Warning: Compiled for Rev 0, but running on Rev 65535

Warning: Unsupported Chip Revision ADSP-BF526 Rev 0.65535 detected

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

Processor Speed: 400 MHz core clock and 80 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-back)

Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 16001

Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:bf526-ezbrd: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)

Memory available: 59664k/65536k RAM, (2628k init code, 1138k kernel code, 506k data, 1024k dma, 572k reserved)

Calibrating delay loop... 796.67 BogoMIPS (lpj=1593344)

Security Framework initialized

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

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

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

Blackfin L1 Instruction SRAM: 48 KB (42 KB free)

net_namespace: 288 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

ezbrd_init(): registering device resources

SCSI subsystem initialized

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

musb_hdrc: version 6.0, musb-dma, host, debug=0

musb_hdrc: USB Host mode controller at ffc03800 using DMA, IRQ 59

musb_hdrc musb_hdrc.0: MUSB HDRC host driver

musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1

usb usb1: configuration #1 chosen from 1 choice

hub 1-0:1.0: USB hub found

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

hub 1-0:1.0: 1 port detected

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

NET: Registered protocol family 1

msgmni has been set to 116

io scheduler noop registered (default)

bfin-otp: initialized

Serial: Blackfin serial driver

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

brd: module loaded

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=15)@sclk=80MHz)

bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1

Driver 'sd' needs updating - please use bus_type methods

physmap platform flash device: 00400000 at 20000000

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

Intel/Sharp Extended Query Table at 0x0039

Intel/Sharp Extended Query Table at 0x0039

Intel/Sharp Extended Query Table at 0x0039

Intel/Sharp Extended Query Table at 0x0039

Intel/Sharp Extended Query Table at 0x0039

cfi_cmdset_0001: Erase suspend on write enabled

cmdlinepart partition parsing not available

RedBoot partition parsing not available

Using physmap partition information

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

0x00000000-0x00040000 : "bootloader(nor)"

0x00040000-0x00200000 : "linux kernel(nor)"

0x00200000-0x00400000 : "file system(nor)"

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400

TCP cubic registered

NET: Registered protocol family 17

IP-Config: Complete:

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,

     host=bf526-ezbrd, domain=, nis-domain=(none),

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=

Freeing unused kernel memory: 2628k freed

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

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.13.4 (2009-06-03 12:43:13 GMT) built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/> version

kernel:    Linux release 2.6.28.10-ADI-2009R1-svn6543, build #36 Wed Jun 3 17:01:29 GMT 2009

toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)

user-dist: release svn-8184, build #558 Wed Jun 3 17:00:59 GMT 2009

root:/>

************** STEP 3: MTD test

 

cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00040000 00010000 "bootloader(nor)"

mtd1: 001c0000 00010000 "linux kernel(nor)"

mtd2: 00200000 0

Case 1 ...PASS

 

Case 1 ...PASS

0010000 "file system(nor)"

root:/>

************** STEP 4: Erase MTD

 

flash_eraseall -j /dev/mtd2

Erasing 64 Kibyte @ 0 --  0 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ 10000 --  3 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ 20000 --  6 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ 30000 --  9 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ 40000 -- 12 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ 50000 -- 15 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ 60000 -- 18 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ 70000 -- 21 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ 80000 -- 25 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ 90000 -- 28 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ a0000 -- 31 % complete.

flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system

Erasing 64 Kibyte @ b0000 -- 34 % complete.

 

Follow-ups

 

--- Mike Frysinger                                           2009-06-04 03:35:16

did you run the unlock utility like the other bug where you got this error ?

you cant assume the flash power up lock state.  your test scripts have to run

the unlock utility before attempting any erase/programming.

 

--- Mingquan Pan                                             2009-06-04 05:12:42

Yes, here I need run flash unlock. And it is readable after doing that. Close.

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes