[#5138] pnormtd test fails on bf526 with error message "Read-only file system"
Submitted By: Vivi Li
Open Date
2009-05-18 06:36:38 Close Date
2009-07-16 21:35:45
Priority:
Medium Assignee:
Graf Yang
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:
Rejected
Uboot version or rev.:
Toolchain version or rev.:
gcc4.1-09r1_rc6
App binary format:
N/A
Summary: pnormtd test fails on bf526 with error message "Read-only file system"
Details:
pnormtd test fails on bf526. It always said "Read-only file system" when erase or copy on nor flash. JP7 is populated.
--
Linux version 2.6.28.10-ADI-2009R1-pre-svn6363 (test@uclinux81-bf526) (gcc version 4.1.2 (ADI svn)) #282 Mon May 18 00:19:51 GMT 2009^M
console [early_BFuart0] enabled^M
early printk enabled on early_BFuart0^M
Board Memory: 64MB^M
Kernel Managed Memory: 64MB^M
Memory map:^M
fixedcode = 0x00000400-0x00000490^M
text = 0x00001000-0x0012bb50^M
rodata = 0x0012bb50-0x00189f1c^M
bss = 0x0018a000-0x0019b818^M
data = 0x0019b818-0x001b0000^M
stack = 0x001ae000-0x001b0000^M
init = 0x001b0000-0x00491000^M
available = 0x00491000-0x03eff000^M
DMA Zone = 0x03f00000-0x04000000^M
Hardware Trace Active and Enabled^M
Boot Mode: 1^M
Blackfin support (C) 2004-2009 Analog Devices, Inc.^M
Compiled for ADSP-BF526 Rev 0.0^M
Warning: Compiled for Rev 0, but running on Rev 65535^M
Warning: Unsupported Chip Revision ADSP-BF526 Rev 0.65535 detected^M
Blackfin Linux support by http://blackfin.uclinux.org/^M
Processor Speed: 400 MHz core clock and 80 MHz System Clock^M
NOMPU: setting up cplb tables^M
Instruction Cache Enabled for CPU0^M
Data Cache Enabled for CPU0 (write-back)^M
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 16001^M
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^M
Configuring Blackfin Priority Driven Interrupts^M
PID hash table entries: 256 (order: 8, 1024 bytes)^M
console handover: boot [early_BFuart0] -> real [ttyBF0]^M
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)^M
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)^M
Memory available: 59264k/65536k RAM, (2948k init code, 1194k kernel code, 530k data, 1024k dma, 572k reserved)^M
Calibrating delay loop... 796.67 BogoMIPS (lpj=1593344)^M
Security Framework initialized^M
Mount-cache hash table entries: 512^M
Blackfin Scratchpad data SRAM: 4 KB^M
Blackfin L1 Data A SRAM: 16 KB (15 KB free)^M
Blackfin L1 Data B SRAM: 16 KB (16 KB free)^M
Blackfin L1 Instruction SRAM: 48 KB (42 KB free)^M
PDA for CPU0 reserved at 0018c000^M
net_namespace: 288 bytes^M
NET: Registered protocol family 16^M
Blackfin DMA Controller^M
ezbrd_init(): registering device resources^M
SCSI subsystem initialized^M
usbcore: registered new interface driver usbfs^M
usbcore: registered new interface driver hub^M
usbcore: registered new device driver usb^M
musb_hdrc: version 6.0, musb-dma, host, debug=0^M
musb_hdrc: USB Host mode controller at ffc03800 using DMA, IRQ 59^M
musb_hdrc musb_hdrc.0: MUSB HDRC host driver^M
musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1^M
usb usb1: configuration #1 chosen from 1 choice^M
hub 1-0:1.0: USB hub found^M
dma_alloc_init: dma_page @ 0x03e8d000 - 256 pages at 0x03f00000^M
hub 1-0:1.0: 1 port detected^M
NET: Registered protocol family 2^M
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)^M
TCP established hash table entries: 2048 (order: 2, 16384 bytes)^M
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)^M
TCP: Hash tables configured (established 2048 bind 2048)^M
TCP reno registered^M
NET: Registered protocol family 1^M
JFFS2 version 2.2. (NAND) Â 2001-2006 Red Hat, Inc.^M
msgmni has been set to 115^M
io scheduler noop registered (default)^M
bfin-otp: initialized^M
Serial: Blackfin serial driver^M
bfin-uart.1: ttyBF0 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART^M
brd: module loaded^M
bfin_mii_bus: probed^M
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=15)@sclk=80MHz)^M
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1^M
Driver 'sd' needs updating - please use bus_type methods^M
physmap platform flash device: 00400000 at 20000000^M
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank^M
Intel/Sharp Extended Query Table at 0x0039^M
Intel/Sharp Extended Query Table at 0x0039^M
Intel/Sharp Extended Query Table at 0x0039^M
Intel/Sharp Extended Query Table at 0x0039^M
Intel/Sharp Extended Query Table at 0x0039^M
cfi_cmdset_0001: Erase suspend on write enabled^M
cmdlinepart partition parsing not available^M
RedBoot partition parsing not available^M
Using physmap partition information^M
Creating 3 MTD partitions on "physmap-flash.0":^M
0x00000000-0x00040000 : "bootloader(nor)"^M
0x00040000-0x00200000 : "linux kernel(nor)"^M
0x00200000-0x00400000 : "file system(nor)"^M
Initializing USB Mass Storage driver...^M
usbcore: registered new interface driver usb-storage^M
USB Mass Storage support registered.^M
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base@ffc01400^M
TCP cubic registered^M
NET: Registered protocol family 17^M
IP-Config: Complete:^M
device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,^M
host=bf526-ezbrd, domain=, nis-domain=(none),^M
bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=^M
Freeing unused kernel memory: 2948k freed^M
PHY: 0:01 - Link is Up - 100/Full^M
_____________________________________^M
a8888b. / Welcome to the uClinux distribution \^M
d888888b. / _ _ \^M
8P"YP"Y88 / | | |_| __ __ (TM) |^M
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |^M
8' .88 \ | | | | _ \| | | | \ / |^M
8`._.' Y8. \ | |__ | | | | | |_| | / \ |^M
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |^M
dP . Y8b. \ For embedded processors including |^M
d8:' " `::88b \ the Analog Devices Blackfin /^M
d8" 'Y88b \___________________________________/^M
:8P ' :888^M
8a. : _a88P For further information, check out:^M
._/"Yaa_: .| 88P| - http://blackfin.uclinux.org/^M
\ YP" `| 8P `. - http://docs.blackfin.uclinux.org/^M
/ \.___.d| .' - http://www.uclinux.org/^M
`--..__)8888P`._.' jgs/a:f - http://www.analog.com/blackfin^M
^M
Have a lot of fun...^M
^M
^M
BusyBox v1.13.4 (2009-05-17 20:13:22 GMT) built-in shell (msh)^M
Enter 'help' for a list of built-in commands.^M
^M
root:/> version^M
kernel: Linux release 2.6.28.10-ADI-2009R1-pre-svn6363, build #282 Mon May 18 00:19:51 GMT 2009^M
toolchain: bfin-uclinux-gcc release gcc version 4.1.2 (ADI svn)^M
user-dist: release svn-8065, build #2465 Mon May 18 00:19:19 GMT 2009^M
root:/>
root:/> cat /proc/mtd ^M
dev: size erasesize name^M
mtd0: 00040000 00010000 "bootloader(nor)"^M
mtd1: 001c0000 00010000 "linux kernel(nor)"^M
mtd2: 00200000 00010000 "file system(nor)"^M
root:/> flash_eraseall -j /dev/mtd2^M
^MErasing 64 Kibyte @ 0 -- 0 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 10000 -- 3 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 20000 -- 6 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 30000 -- 9 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 40000 -- 12 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 50000 -- 15 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 60000 -- 18 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 70000 -- 21 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 80000 -- 25 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 90000 -- 28 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ a0000 -- 31 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ b0000 -- 34 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ c0000 -- 37 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ d0000 -- 40 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ e0000 -- 43 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ f0000 -- 46 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 100000 -- 50 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 110000 -- 53 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 120000 -- 56 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 130000 -- 59 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 140000 -- 62 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 150000 -- 65 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 160000 -- 68 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 170000 -- 71 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 180000 -- 75 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 190000 -- 78 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 1a0000 -- 81 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 1b0000 -- 84 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 1c0000 -- 87 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 1d0000 -- 90 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 1e0000 -- 93 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 1f0000 -- 96 % complete.^M
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system^M
^MErasing 64 Kibyte @ 200000 -- 100 % complete.^M
root:/> mkdir -p rootfs^M
root:/> echo This is test for mtd driver > rootfs/test^M
root:/> mkfs.jffs2 -r rootfs -o mtd.img^M
root:/> cp mtd.img /dev/mtd2^M
cp: write error: Read-only file system^M
root:/> mount -t jffs2 /dev/mtdblock2 /mnt^M
root:/> cp /bin/pwd /mnt^M
Write of 68 bytes at 0x001b8934 failed. returned -30, retlen 0^M
Not marking the space at 0x001b8934 as dirty because the flash driver returned retlen zero^M
Write of 68 bytes at 0x001b8934 failed. returned -30, retlen 0^M
Not marking the space at 0x001b8934 as dirty because the flash driver returned retlen zero^M
cp: cannot create '/mnt/pwd': Read-only file system^M
root:/>
--
Follow-ups
--- Mike Frysinger 2009-05-18 06:49:30
probably dupe of [#4884]
--- Vivi Li 2009-05-19 00:27:40
I rebuild the kernel and modify the partition boundary:
--
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00030000 : "bootloader(nor)"
0x00030000-0x00060000 : "linux kernel(nor)"
0x00060000-0x00080000 : "file system(nor)"
--
It still fails to erase:
--
root:/> 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 -- 50 % complete.
flash_eraseall: /dev/mtd2: MTD Erase failure: Read-only file system
Erasing 64 Kibyte @ 20000 -- 100 % complete.
root:/>
--
--
--- Graf Yang 2009-05-20 06:06:20
In u-boot run,
protect off all
then you can flash_eraseall in linux.
--- Graf Yang 2009-05-21 02:47:13
u-boot will un-protect some sectors in nor flash initial procedure.
I tested the latest 2009R1 u-boot, it's normal.
This bug may gone if you flash a new u-boot.
I think it's not a bug.
U-Boot 2008.10-svn1873 (ADI-2009R1-rc1) (May 21 2009 - 14:40:29)
CPU: ADSP bf526-0.0 (Detected Rev: 0.0) (parallel flash boot)
Board: ADI BF526 EZ-Board board
Support: http://blackfin.uclinux.org/
Clock: VCO: 400 MHz, Core: 400 MHz, System: 80 MHz
RAM: 64 MB
Flash: 4 MB
In: serial
Out: serial
Err: serial
Net: Blackfin EMAC
MAC: 8A:96:81:20:2C:2F
Hit any key to stop autoboot: 0
bfin> flinfo
Bank # 1: CFI conformant FLASH (16 x 16) Size: 4 MB in 71 Sectors
Intel Standard command set, Manufacturer ID: 0x20, Device ID: 0x15
Erase timeout: 4096 ms, write timeout: 1 ms
Sector Start Addresses:
20000000 RO 20002000 RO 20004000 RO 20006000 RO 20008000 RO
2000A000 RO 2000C000 RO 2000E000 RO 20010000 RO 20020000 RO
20030000 RO 20040000 RO 20050000 RO 20060000 RO 20070000 RO
20080000 20090000 200A0000 200B0000 200C0000
200D0000 200E0000 200F0000 20100000 20110000
20120000 20130000 20140000 20150000 20160000
20170000 20180000 20190000 201A0000 201B0000
201C0000 201D0000 201E0000 201F0000 20200000
20210000 20220000 20230000 20240000 20250000
20260000 20270000 20280000 20290000 202A0000
202B0000 202C0000 202D0000 202E0000 202F0000
20300000 20310000 20320000 20330000 20340000
20350000 20360000 20370000 20380000 20390000
203A0000 203B0000 203C0000 203D0000 203E0000
203F0000
bfin>
--- Graf Yang 2009-05-21 04:26:54
Sorry, the u-boot should all be OK. You only need set a environment parameters
in u-boot, to let this issue gone,
setenv unlock yes
save
--- Mike Frysinger 2009-05-21 08:43:59
shouldnt the kernel be able to unlock the sectors it needs ?
--- Mike Frysinger 2009-05-21 08:44:33
err, yeah ... your test code should probably run `flash_unlock` first and then
you dont have to worry about what u-boot has done
--- Vivi Li 2009-07-16 21:35:45
No such bug now. Close it.
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found