[#4005] spi flash mount as rootfs fails on bf537
Submitted By: Mingquan Pan
Open Date
2008-04-02 06:47:13 Close Date
2009-03-02 05:27:40
Priority:
Medium Assignee:
Graf Yang
Status:
Closed Fixed In Release:
N/A
Found In Release:
2008R1.5-RC3 Release:
Category:
N/A Board:
N/A
Processor:
BF537 Silicon Revision:
Is this bug repeatable?:
Yes Resolution:
Rejected
Uboot version or rev.:
Toolchain version or rev.:
08r1-8
App binary format:
N/A
Summary: spi flash mount as rootfs fails on bf537
Details:
trunk spi flash mount as rootfs on bf537 fails on regression machine.(The spi board should be ok for at least the 08r1 spi image can still run.)
Sometimes the error is:
## Booting image at 02000000 ...
Image Name: Linux-2.6.24.4-ADI-2008R2-pre-sv
Created: 2008-04-02 9:43:27 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 897409 Bytes = 876.4 kB
Load Address: 00001000
Entry Point: 00184000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 184000
Linux version 2.6.24.4-ADI-2008R2-pre-svn4533 (test@linux) (gcc version 4.1.2 (ADI svn)) #143 Wed Apr 2 17:43:21 CST 2008
console [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0010ff00
rodata = 0x00110040-0x00162118
bss = 0x00162120-0x0016ff24
data = 0x0016ff24-0x00184000
stack = 0x00182000-0x00184000
init = 0x00184000-0x0019f000
available = 0x0019f000-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Reset caused by Software reset
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14224
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 earlyprintk=serial,uart0,57600
onfiguring 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: 55100k/65536k RAM, (108k init code, 1083k kernel code, 465k 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 (41 KB free)
Security Framework initialized
Mount-cache hash table entries: 512
net_namespace: 64 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
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
JFFS2 version 2.2. (NAND) B) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
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
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
m25p80 spi0.1: m25p64 (8192 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x00000000-0x00040000 : "bootloader"
0x00040000-0x00120000 : "kernel"
0x00120000-0x00800000 : "file system"
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 03:37:33 UTC (13053)
VFS: Mounted root (jffs2 filesystem).
Freeing unused kernel memory: 108k freed
Warning: unable to open an initial console.
JFFS2 warning: (101) jffs2_do_read_inode_internal: Truncating ino #273 to 95500 bytes failed because it only had 3508 bytes to start with!
Case 1 ...FAIL
Sometimes:
fin> bootm 0x2000000
## Booting image at 02000000 ...
Image Name: Linux-2.6.24.4-ADI-2008R2-pre-sv
Created: 2008-04-02 9:43:27 UTC
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 897409 Bytes = 876.4 kB
Load Address: 00001000
Entry Point: 00184000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 184000
Linux version 2.6.24.4-ADI-2008R2-pre-svn4533 (test@linux) (gcc version 4.1.2 (ADI svn)) #143 Wed Apr 2 17:43:21 CST 2008
console [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 56MB due to hardware anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0010ff00
rodata = 0x00110040-0x00162118
bss = 0x00162120-0x0016ff24
data = 0x0016ff24-0x00184000
stack = 0x00182000-0x00184000
init = 0x00184000-0x0019f000
available = 0x0019f000-0x037ff000
DMA Zone = 0x03f00000-0x04000000
Hardware Trace Active and Enabled
Reset caused by Software reset
Blackfin support (C) 2004-2008 Analog Devices, Inc.
Compiled for ADSP-BF537 Rev 0.2
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
Instruction Cache Enabled
Data Cache Enabled (write-through)
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 14224
Kernel command line: root=/dev/mtdblock2 rw rootfstype=jffs2 earlyprintk=serial,uart0,57600
onfiguring 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: 55100k/65536k RAM, (108k init code, 1083k kernel code, 465k 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 (41 KB free)
Security Framework initialized
Mount-cache hash table entries: 512
net_namespace: 64 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
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
JFFS2 version 2.2. (NAND) B) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
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
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
m25p80 spi0.1: unrecognized JEDEC id a02017
m25p80 spi0.1: found UNKNOWN, expected m25p64
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0
bfin-wdt: initialized: timeout=20 sec (nowayout=0)
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
rtc-bfin rtc-bfin: setting system clock to 1970-01-01 03:31:53 UTC (12713)
List of all partitions:
No filesystem could mount root, tried: jffs2
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Case 1 ...FAIL
Follow-ups
--- Manolo van Ee 2008-04-08 11:12:28
I have a similar problem on my custom board with spi dataflash. It seems to be
working when I turn of dma for the spi driver. Did you try that? I have to look
into it some more.
--- Manolo van Ee 2008-04-09 06:22:40
I found out that I can also fix it by disabling the cache.
And I found another problem which I can fix with disabling the cache.
Everytime I try to connect with for example telnet, the kernel crashes. Only
pinging seems to work without stopping the board.
Since I seem to have more problems, I don't know whether this all is related to
this bug. Especially since I have a custom board.
Maybe in my case it has something to do with not using the latest version of
u-boot. I'll ask in the forum whether that could be a problem.
--- Graf Yang 2008-07-17 00:02:38
The spi flash chip, that Grace testing, is damaged a lot.
The trunk kernel svn 4960 2008-07-14 and brach 2008-05-29 both can't boot on
this spi flash board.
Another spi flash board is OK.
1. Compare the flashed rootfs.jffs2 image failed use u-boot.
U-Boot 1.1.6-svn1258 (ADI-2008R1.5) (Jul 7 2008-13:02:28)
CPU: ADSP bf537-0.2 (Detected Rev: 0.2)
Board: ADI BF537 stamp board
...
bfin> tftp 0x1000000 rootfs.jffs2
Using Blackfin EMAC device
TFTP from server 192.168.1.105; our IP address is 192.168.1.37
Filename 'rootfs.jffs2'.
Load address: 0x1000000
Loading: #################################################################
... ##########
done
Bytes transferred = 4041680 (3dabd0 hex)
bfin> eeprom write 0x1000000 0x120000 0x3dabd0
EEPROM @0x0 write: addr 01000000 off 120000 count 4041680 ...
..............................e
bfin> eeprom read 0x2000000 0x120000 0x3dabd0
EEPROM @0x0 read: addr 02000000 off 120000 count 4041680 ...
...............................e
bfin> cmp.b 0x1000000 0x2000000 0x3dabd0
byte at 0x012e0000 (0x85) != byte at 0x022e0000 (0xff)
Total of 3014656 bytes were the same
bfin> cmp.b 0x12f0000 0x22f0000 0x400
byte at 0x012f0000 (0x85) != byte at 0x022f0000 (0xff)
Total of 0 bytes were the same
bfin> cmp.b 0x1400000 0x2400000 0x400
byte at 0x01400000 (0xaf) != byte at 0x02400000 (0xbd)
Total of 0 bytes were the same
2. Kernel can't boot.
Linux version 2.6.22.19-ADI-2008R1-svn (ymm@gyang) (gcc version 4.1.2 (ADI
svn)) #551 Wed Jul 8
...
m25p80 spi0.1: m25p64 (8192 Kbytes)
Creating 3 MTD partitions on "m25p80":
0x00000000-0x00040000 : "bootloader"
0x00040000-0x00120000 : "kernel"
0x00120000-0x00800000 : "file system"
bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0,
regs_base@ffc007
...
VFS: Mounted root (jffs2 filesystem).
Freeing unused kernel memory: 100k freed
Warning: unable to open an initial console.
PHY: 0:01 - Link is Up - 100/Full
Kernel panic - not syncing: Attempted to kill init!
3. Manual mount flash, can't find file /bin/init
root:/> mount -t jffs2 /dev/mtdblock2 /mnt
root:/> JFFS2 warning: (122) jffs2_do_read_inode_internal: Truncating ino
#214 to 245252 bytes!
root:/> ls /mnt/bin/init
ls: /mnt/bin/init: No such file or directory
root:/>
Files
Changes
Commits
Dependencies
Duplicates
Associations
Tags
File Name File Type File Size Posted By
No Files Were Found