[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: [microblaze-uclinux] Can't get access to Flash
Hi Matthieu,
Many thanks. The erase/eraseall works now. However, it seems the image file is not written correctly by using tftp. All the data bits are still 1. I'll try this later.
On 6/5/06, Matthieu Simon <mathieu.simon@xxxxxxxxxx> wrote:
Hi,
opb_emc is configured to work with a bus width about 8bits by default.
Try to modify
#define BUS_WIDTH 4
to
#define BUS_WIDTH 1
in drivers/mtd/maps/mb_auto.c
Source :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/archive/2006/03/msg00005.html
Here is my log (we use the same board, spartan3e starter kit) :
--------------------------------------------------------------------
Linux version 2.4.32-uc0 (root@serveur) (version gcc 3.4.1 ( Xilinx EDK
8.1 Build EDK_I.17 090206 )) #77 lun jun 5 19:11:28 CEST 2006
On node 0 totalpages: 8192
zone(0): 8192 pages.
zone(1): 0 pages.
zone(2): 0 pages.
CPU: MICROBLAZE
Kernel command line:
Console: xmbserial on UARTLite
Calibrating delay loop... 24.37 BogoMIPS
Memory: 32MB = 32MB total
Memory: 29744KB available (1299K code, 1361K data, 52K init)
Dentry cache hash table entries: 4096 (order: 3, 32768 bytes)
Inode cache hash table entries: 2048 (order: 2, 16384 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 8192 (order: 3, 32768 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Microblaze UARTlite serial driver version 1.00
ttyS0 at 0x40600000 (irq = 3) is a Microblaze UARTlite
Starting kswapd
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
eth0: using fifo mode.
eth0: Xilinx EMAC #0 at 0x40C00000 mapped to 0x40C00000, irq=2
eth0: id 2.0l; block id 11, type 1
eth0: 10Mbps - FullDuplex
MicroBlaze auto-config flash probe(0x21000000,8388608,1): 800000 at 21000000
cfi_cmdset_0001: Erase suspend on write enabled
0: offset=0x0,size=0x20000,blocks=128
Using buffer write method
Creating 8 MTD partitions on "Flash":
0x00000000-0x00004000 : "Bootloader"
mtd: partition "Bootloader" doesn't end on an erase block -- force read-only
0x00004000-0x00008000 : "Bootargs"
mtd: partition "Bootargs" doesn't start on an erase block boundary --
force read-only
0x00008000-0x0000c000 : "MAC"
mtd: partition "MAC" doesn't start on an erase block boundary -- force
read-only
0x00010000-0x00020000 : "Config"
mtd: partition "Config" doesn't start on an erase block boundary --
force read-only
0x0000c000-0x00010000 : "Spare"
mtd: partition "Spare" doesn't start on an erase block boundary -- force
read-only
0x00100000-0x00400000 : "Image"
0x00400000-0x00800000 : "JFFS2"
0x00000000-0x01000000 : "Flash"
MicroBlaze auto-config ram probe(0x2217eae8,1159168,4): 11b000 at 2217eae8
Creating 1 MTD partitions on "RAM":
0x00000000-0x0011b000 : "Romfs"
ftl_cs: FTL header corrupt!
ftl_cs: FTL header corrupt!
ftl_cs: FTL header corrupt!
ftl_cs: FTL header corrupt!
ftl_cs: FTL header corrupt!
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
ftl_cs: FTL header not found.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
VFS: Mounted root (romfs filesystem) readonly.
Freeing init memory: 52K
Mounting proc:
Mounting var:
Populating /var:
Running local start scripts.
Mounting /etc/config:
Populating /etc/config:
flatfsd: Nonexistent or bad flatfs (-48), creating new one...
flatfsd: Failed to write flatfs (-48): Permission denied
flatfsd: Created 5 configuration files (271 bytes)
Setting hostname:
Setting up interface lo:
Setting up interface eth0:
Starting inetd:
uclinux-auto login: root
Password:
# eraseall /dev/flash/image
Erasing 128 Kibyte @ 0 -- 0 % complete.
Erasing 128 Kibyte @ 20000 -- 4 % complete.
Erasing 128 Kibyte @ 40000 -- 8 % complete.
Erasing 128 Kibyte @ 60000 -- 12 % complete.
Erasing 128 Kibyte @ 80000 -- 16 % complete.
Erasing 128 Kibyte @ a0000 -- 20 % complete.
Erasing 128 Kibyte @ c0000 -- 25 % complete.
Erasing 128 Kibyte @ e0000 -- 29 % complete.
Erasing 128 Kibyte @ 100000 -- 33 % complete.
Erasing 128 Kibyte @ 120000 -- 37 % complete.
Erasing 128 Kibyte @ 140000 -- 41 % complete.
Erasing 128 Kibyte @ 160000 -- 45 % complete.
Erasing 128 Kibyte @ 180000 -- 50 % complete.
Erasing 128 Kibyte @ 1a0000 -- 54 % complete.
Erasing 128 Kibyte @ 1c0000 -- 58 % complete.
Erasing 128 Kibyte @ 1e0000 -- 62 % complete.
Erasing 128 Kibyte @ 200000 -- 66 % complete.
Erasing 128 Kibyte @ 220000 -- 70 % complete.
Erasing 128 Kibyte @ 240000 -- 75 % complete.
Erasing 128 Kibyte @ 260000 -- 79 % complete.
Erasing 128 Kibyte @ 280000 -- 83 % complete.
Erasing 128 Kibyte @ 2a0000 -- 87 % complete.
Erasing 128 Kibyte @ 2c0000 -- 91 % complete.
Erasing 128 Kibyte @ 2e0000 -- 95 % complete.
Erased 3072 Kibyte @ 0 -- 100% complete.
# eraseall /dev/flash/all
Erasing 128 Kibyte @ 0 -- 0 % complete.
Erasing 128 Kibyte @ 20000 -- 0 % complete.
Erasing 128 Kibyte @ 40000 -- 1 % complete.
Erasing 128 Kibyte @ 60000 -- 2 % complete.
Erasing 128 Kibyte @ 80000 -- 3 % complete.
Erasing 128 Kibyte @ a0000 -- 3 % complete.
Erasing 128 Kibyte @ c0000 -- 4 % complete.
Erasing 128 Kibyte @ e0000 -- 5 % complete.
Erasing 128 Kibyte @ 100000 -- 6 % complete.
Erasing 128 Kibyte @ 120000 -- 7 % complete.
Erasing 128 Kibyte @ 140000 -- 7 % complete.
Erasing 128 Kibyte @ 160000 -- 8 % complete.
Erasing 128 Kibyte @ 180000 -- 9 % complete.
Erasing 128 Kibyte @ 1a0000 -- 10 % complete.
Erasing 128 Kibyte @ 1c0000 -- 10 % complete.
Erasing 128 Kibyte @ 1e0000 -- 11 % complete.
Erasing 128 Kibyte @ 200000 -- 12 % complete.
Erasing 128 Kibyte @ 220000 -- 13 % complete.
Erasing 128 Kibyte @ 240000 -- 14 % complete.
Erasing 128 Kibyte @ 260000 -- 14 % complete.
Erasing 128 Kibyte @ 280000 -- 15 % complete.
Erasing 128 Kibyte @ 2a0000 -- 16 % complete.
Erasing 128 Kibyte @ 2c0000 -- 17 % complete.
Erasing 128 Kibyte @ 2e0000 -- 17 % complete.
Erasing 128 Kibyte @ 300000 -- 18 % complete.
Erasing 128 Kibyte @ 320000 -- 19 % complete.
Erasing 128 Kibyte @ 340000 -- 20 % complete.
Erasing 128 Kibyte @ 360000 -- 21 % complete.
Erasing 128 Kibyte @ 380000 -- 21 % complete.
Erasing 128 Kibyte @ 3a0000 -- 22 % complete.
Erasing 128 Kibyte @ 3c0000 -- 23 % complete.
Erasing 128 Kibyte @ 3e0000 -- 24 % complete.
Erasing 128 Kibyte @ 400000 -- 25 % complete.
Erasing 128 Kibyte @ 420000 -- 25 % complete.
Erasing 128 Kibyte @ 440000 -- 26 % complete.
Erasing 128 Kibyte @ 460000 -- 27 % complete.
Erasing 128 Kibyte @ 480000 -- 28 % complete.
Erasing 128 Kibyte @ 4a0000 -- 28 % complete.
Erasing 128 Kibyte @ 4c0000 -- 29 % complete.
Erasing 128 Kibyte @ 4e0000 -- 30 % complete.
Erasing 128 Kibyte @ 500000 -- 31 % complete.
Erasing 128 Kibyte @ 520000 -- 32 % complete.
Erasing 128 Kibyte @ 540000 -- 32 % complete.
Erasing 128 Kibyte @ 560000 -- 33 % complete.
Erasing 128 Kibyte @ 580000 -- 34 % complete.
Erasing 128 Kibyte @ 5a0000 -- 35 % complete.
Erasing 128 Kibyte @ 5c0000 -- 35 % complete.
Erasing 128 Kibyte @ 5e0000 -- 36 % complete.
Erasing 128 Kibyte @ 600000 -- 37 % complete.
Erasing 128 Kibyte @ 620000 -- 38 % complete.
Erasing 128 Kibyte @ 640000 -- 39 % complete.
Erasing 128 Kibyte @ 660000 -- 39 % complete.
Erasing 128 Kibyte @ 680000 -- 40 % complete.
Erasing 128 Kibyte @ 6a0000 -- 41 % complete.
Erasing 128 Kibyte @ 6c0000 -- 42 % complete.
Erasing 128 Kibyte @ 6e0000 -- 42 % complete.
Erasing 128 Kibyte @ 700000 -- 43 % complete.
Erasing 128 Kibyte @ 720000 -- 44 % complete.
Erasing 128 Kibyte @ 740000 -- 45 % complete.
Erasing 128 Kibyte @ 760000 -- 46 % complete.
Erasing 128 Kibyte @ 780000 -- 46 % complete.
Erasing 128 Kibyte @ 7a0000 -- 47 % complete.
Erasing 128 Kibyte @ 7c0000 -- 48 % complete.
Erasing 128 Kibyte @ 7e0000 -- 49 % complete.
Erasing 128 Kibyte @ 800000 -- 50 % complete.
Erasing 128 Kibyte @ 820000 -- 50 % complete.
Erasing 128 Kibyte @ 840000 -- 51 % complete.
Erasing 128 Kibyte @ 860000 -- 52 % complete.
Erasing 128 Kibyte @ 880000 -- 53 % complete.
Erasing 128 Kibyte @ 8a0000 -- 53 % complete.
Erasing 128 Kibyte @ 8c0000 -- 54 % complete.
Erasing 128 Kibyte @ 8e0000 -- 55 % complete.
Erasing 128 Kibyte @ 900000 -- 56 % complete.
Erasing 128 Kibyte @ 920000 -- 57 % complete.
Erasing 128 Kibyte @ 940000 -- 57 % complete.
Erasing 128 Kibyte @ 960000 -- 58 % complete.
Erasing 128 Kibyte @ 980000 -- 59 % complete.
Erasing 128 Kibyte @ 9a0000 -- 60 % complete.
Erasing 128 Kibyte @ 9c0000 -- 60 % complete.
Erasing 128 Kibyte @ 9e0000 -- 61 % complete.
Erasing 128 Kibyte @ a00000 -- 62 % complete.
Erasing 128 Kibyte @ a20000 -- 63 % complete.
Erasing 128 Kibyte @ a40000 -- 64 % complete.
Erasing 128 Kibyte @ a60000 -- 64 % complete.
Erasing 128 Kibyte @ a80000 -- 65 % complete.
Erasing 128 Kibyte @ aa0000 -- 66 % complete.
Erasing 128 Kibyte @ ac0000 -- 67 % complete.
Erasing 128 Kibyte @ ae0000 -- 67 % complete.
Erasing 128 Kibyte @ b00000 -- 68 % complete.
Erasing 128 Kibyte @ b20000 -- 69 % complete.
Erasing 128 Kibyte @ b40000 -- 70 % complete.
Erasing 128 Kibyte @ b60000 -- 71 % complete.
Erasing 128 Kibyte @ b80000 -- 71 % complete.
Erasing 128 Kibyte @ ba0000 -- 72 % complete.
Erasing 128 Kibyte @ bc0000 -- 73 % complete.
Erasing 128 Kibyte @ be0000 -- 74 % complete.
Erasing 128 Kibyte @ c00000 -- 75 % complete.
Erasing 128 Kibyte @ c20000 -- 75 % complete.
Erasing 128 Kibyte @ c40000 -- 76 % complete.
Erasing 128 Kibyte @ c60000 -- 77 % complete.
Erasing 128 Kibyte @ c80000 -- 78 % complete.
Erasing 128 Kibyte @ ca0000 -- 78 % complete.
Erasing 128 Kibyte @ cc0000 -- 79 % complete.
Erasing 128 Kibyte @ ce0000 -- 80 % complete.
Erasing 128 Kibyte @ d00000 -- 81 % complete.
Erasing 128 Kibyte @ d20000 -- 82 % complete.
Erasing 128 Kibyte @ d40000 -- 82 % complete.
Erasing 128 Kibyte @ d60000 -- 83 % complete.
Erasing 128 Kibyte @ d80000 -- 84 % complete.
Erasing 128 Kibyte @ da0000 -- 85 % complete.
Erasing 128 Kibyte @ dc0000 -- 85 % complete.
Erasing 128 Kibyte @ de0000 -- 86 % complete.
Erasing 128 Kibyte @ e00000 -- 87 % complete.
Erasing 128 Kibyte @ e20000 -- 88 % complete.
Erasing 128 Kibyte @ e40000 -- 89 % complete.
Erasing 128 Kibyte @ e60000 -- 89 % complete.
Erasing 128 Kibyte @ e80000 -- 90 % complete.
Erasing 128 Kibyte @ ea0000 -- 91 % complete.
Erasing 128 Kibyte @ ec0000 -- 92 % complete.
Erasing 128 Kibyte @ ee0000 -- 92 % complete.
Erasing 128 Kibyte @ f00000 -- 93 % complete.
Erasing 128 Kibyte @ f20000 -- 94 % complete.
Erasing 128 Kibyte @ f40000 -- 95 % complete.
Erasing 128 Kibyte @ f60000 -- 96 % complete.
Erasing 128 Kibyte @ f80000 -- 96 % complete.
Erasing 128 Kibyte @ fa0000 -- 97 % complete.
Erasing 128 Kibyte @ fc0000 -- 98 % complete.
Erasing 128 Kibyte @ fe0000 -- 99 % complete.
Erased 16384 Kibyte @ 0 -- 100% complete.
#
--------------------------------------------------------------------
Matthieu Simon a �crit :
>
> ----- Original Message -----
> *From:* Qichen Huang <mailto:
huangqichen@xxxxxxxx>
> *To:* microblaze-uclinux@xxxxxxxxxxxxxx
> <mailto:
microblaze-uclinux@xxxxxxxxxxxxxx>
> *Sent:* Thursday, June 01, 2006 9:16 PM
> *Subject:* [microblaze-uclinux] Can't get access to Flash
>
> Hi,
>
> I'm using Xilinx spartan3E-starter-kit. The on-board Flash is Intel
> Nor Flash 16Mx8. I have enabled Intel device support, but found the
> maximum flash size in menuconfig is 8MB. Dose that matter?
> By erase the flash image I got the following error message:
>
> # eraseall /dev/flash/image
> eraseall /dev/flash/image
> Erasing 256 Kibyte @ 0 -- 0 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 40000 -- 8 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 80000 -- 16 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ c0000 -- 25 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 100000 -- 33 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 140000 -- 41 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 180000 -- 50 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 1c0000 -- 58 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 200000 -- 66 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 240000 -- 75 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 280000 -- 83 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erasing 256 Kibyte @ 2c0000 -- 91 % complete.
> eraseall: /dev/flash/image: MTD Erase failure: Input/output error
> Erased 3072 Kibyte @ 0 -- 100% complete.
> #
>
> When trying to write the flash image, the error message is:
> /dev/flash/image: Read-only file system
>
> Any suggestions?
> Thanks!
>
> Qichen
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive :
http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/