[Elphel-support] Issues with Compact Flash installation

Riccardo Di Roberto rickdiro at gmail.com
Sun Nov 9 20:43:17 PST 2014


Hello,
I am having some issues with the software installation of a CF card inside the Elphel camera.
I bought two 4GB Sandisk Extreme III CFs, and I have currently connected only one of them in the bottom slot (the one closer to the 10369 board).
I bought this model of CF since I read over various support channels that the Etrax CPU has a bug with the CF cards which are not explicitly compatibile with the DMA modes.
I tested both the CF cards on my pc for bad blocks or other errors, and they passed every verification.
I followed the wiki on HDD formatting, but as soon as I booted the camera, this is what I get with dmesg, an I/O error after probing IDE interface ide0:

# dmesg
Linux version 2.6.19 (oleg at SH67H3) (gcc version 3.2.1 Axis release R64/1.64) #1 Wed Jun 25 17:36:46 MDT 2014
Setting up paging and the MMU.
On node 0 totalpages: 8192
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 8160 pages, LIFO batch:0
  Normal zone: 0 pages used for memmap
Linux/CRISv32 port on ETRAX FS (C) 2003, 2004 Axis Communications AB
Built 1 zonelists.  Total pages: 8160
Kernel command line: root=/dev/mtdblock3 init=/linuxrc rootfstype=jffs2
PID hash table entries: 256 (order: 8, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 2, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 1, 16384 bytes)
Memory: 40304k/65536k available (1745k kernel code, 25232k reserved, 621k data, 72k init)
Calibrating delay loop... 199.47 BogoMIPS (lpj=997376)
Mount-cache hash table entries: 1024
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
IP route cache hash table entries: 512 (order: -2, 2048 bytes)
TCP established hash table entries: 2048 (order: 0, 8192 bytes)
TCP bind hash table entries: 1024 (order: -1, 4096 bytes)
TCP: Hash tables configured (established 2048 bind 1024)
TCP reno registered
Check hardware configuration of Elphel 353 camera
Elphel 10349/10369 IO extension board is present
fast_timer_init()
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
Serial: CRISv32 driver $Revision: 1.78 $ <6>ttyS0 at I/O 0xb0026000 (irq = 68) is a CRISv32
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
PPP generic driver version 2.4.2
ETRAX FS 10/100MBit ethernet v0.01 (c) 2003 Axis Communications AB
eth0: changed MAC to 00:40:8C:CD:00:00
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
ide: ETRAX FS built-in ATA DMA controller
cris_ide_init()
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for Belkin / Peracom / GoHubs USB Serial Adapter
usbcore: registered new interface driver belkin
drivers/usb/serial/belkin_sa.c: USB Belkin Serial converter driver v1.2
drivers/usb/serial/usb-serial.c: USB Serial support registered for cp2101
usbcore: registered new interface driver cp2101
drivers/usb/serial/cp2101.c: Silicon Labs CP2101/CP2102 RS232 serial adaptor driver v0.07
drivers/usb/serial/usb-serial.c: USB Serial support registered for Garmin GPS usb/tty
usbcore: registered new interface driver garmin_gps
drivers/usb/serial/garmin_gps.c: garmin gps driver v0.28
drivers/usb/serial/usb-serial.c: USB Serial support registered for MCT U232
usbcore: registered new interface driver mct_u232
drivers/usb/serial/mct_u232.c: Magic Control Technology USB-RS232 converter driver z2.0
drivers/usb/serial/usb-serial.c: USB Serial support registered for pl2303
usbcore: registered new interface driver pl2303
drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver
ETRAX FS stream co-processor driver v0.01, (c) 2003 Axis Communications AB
stream co-processor: init done.
axisflashmap: ...

Resetting flash...
bif_core_rw_grp3=0x6300483
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xf1 (Micron NAND 128MiB 3,3V 8-bit)
Additional Info: ID byte3=0x80, byte4=0x95
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
Flash is rated 25 ns, modifying bif_core_rw_grp3: old=0x6300483, new=0x6300000
NAND 128MiB 3,3V 8-bit: 0x08000000 bytes of NAND flash memory.
axisflashmap: Set to boot from NAND flash, making NAND flash primary device.
axisflashmap: flash read 512 bytes at 0x00040000, data: 00 b0 05 f0 25 ff ed 9c
axisflashmap: partition table offset 10, data: ef be 84 00 9e 0d 00 00
axisflashmap: Found a valid partition table at 0xc03019ae-0xc0301a3a.
offset == 0x00040000, size == 0x007C0000
offset == 0x00800000, size == 0x01800000
offset == 0x02000000, size == 0x05000000
offset == 0x07000000, size == 0x00C00000
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x08000000 : "main"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00000000-0x00040000 : "part0"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00040000-0x00800000 : "part1"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x00800000-0x02000000 : "part2"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x02000000-0x07000000 : "part3"
Creating 1 MTD partitions on "NAND 128MiB 3,3V 8-bit":
0x07000000-0x07c00000 : "part4"
ETRAX FS GPIO driver v2.5, (c) 2003-2006 Axis Communications AB
Elphel (R) model 353 FPGA (Xilinx (R) XC3S1200E) configuration driver - 132
Elphel (R) model 353 system clocks (PLL frequency synth.) driver - 133
fpga_control- 129
arch/cris/arch-v32/drivers/elphel/framepars.c:390:initGlobalPars GLOBALPARS(G_DEBUG)=0
arch/cris/arch-v32/drivers/elphel/framepars.c:420:initMultiPars GLOBALPARS(G_MULTI_NUM)=0
Elphel (R) Model 353 Frame Parameters device driver - 130 
Elphel FPGA interrupts initialized
Initializing DMA registers for EXTDMA3 - Elphel (R) Model 353 Camera Driver - 126
Elphel (R) model 353 i2c character device driver - 134, 2 channels
Raw image access driver- 131
Elphel (R) Model 353 video buffer device driver- 135
Elphel (R) model 353 Exif device driver - 125
Starting Elphel (R) Model 353 Gamma Tables device driver - 137 
Elphel (R) Model 353 Gamma Tables device driver - 137 
Elphel (R) Model 353 Histograms device driver

imu_logger- 141
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing unused kernel memory: 72k freed
Empty flash at 0x00b8f7f0 ends at 0x00b8f800
Empty flash at 0x03fc3904 ends at 0x03fc4000
Empty flash at 0x040636b0 ends at 0x04063800
Empty flash at 0x041f1230 ends at 0x041f1800
Empty flash at 0x04a76350 ends at 0x04a76800
JFFS2 notice: (599) check_node_data: wrong data CRC in data node at 0x04063000: read 0xaf75fad7, calculated 0xe6cdc69f.
eth0: changed MAC to 00:0E:64:08:1B:8A
eth0: changed MAC to 00:0E:64:08:1B:8A
JFFS2 notice: (599) check_node_data: wrong data CRC in data node at 0x04a74800: read 0x4fc06f38, calculated 0x78f8b81b.
arch/cris/arch-v32/drivers/elphel/framepars.c:390:initGlobalPars GLOBALPARS(G_DEBUG)=0
initSequencers:resetting both sequencers
arch/cris/arch-v32/drivers/elphel/framepars.c:420:initMultiPars GLOBALPARS(G_MULTI_NUM)=0

sensor clock set to 48000000
removing MRST from the sensor
Found MT9P001 2592x1944 sensor, chip ID=1801
trying MT9P001
Resetting MT9X001 sensor

Reading sensor registers to the shadows:

Initializing MT9X001 registers with default values:

Starting hardware sequencers
ETRAX FS IOP USB Host Controller version 1.10 (c) 2004, 2005, 2006	Axis Communications AB
crisv32_hc crisv32_hc.0: ETRAX FS IOP USB Host Controller
crisv32_hc crisv32_hc.0: new USB bus registered, assigned bus number 1
crisv32_hc crisv32_hc.0: irq 51, io base 0x00000000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
crisv32_hc crisv32_hc.0: ETRAX FS IOP USB Host Controller
usbcore: registered new interface driver snd-usb-audio
usbcore: registered new interface driver snd-usb-caiaq
usb 1-1: new full speed USB device using crisv32_hc and address 2
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
Probing IDE interface ide0...
hda: SanDisk SDCFX3-004G, CFA DISK drive
ide0 at 0x10000000-0x10000007,0x2c000000 on irq 65
hda: max request size: 128KiB
hda: 8027712 sectors (4110 MB) w/1KiB Cache, CHS=7964/16/63, UDMA(33)
 hda:hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
end_request: I/O error, dev hda, sector 0
Buffer I/O error on device hda, logical block 0
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
end_request: I/O error, dev hda, sector 0
Buffer I/O error on device hda, logical block 0
 unable to read partition table

Using the first command in the HDD formatting wiki, I get:

# cat /proc/partitions
major minor  #blocks  name

  31     0     131072 mtdblock0
  31     1        256 mtdblock1
  31     2       7936 mtdblock2
  31     3      24576 mtdblock3
  31     4      81920 mtdblock4
  31     5      12288 mtdblock5
   3     0    4013856 hda

hdparm seems to be using DMA:

# hdparm /dev/hda

/dev/hda:
 multcount	=  0 (off)
 IO_support	=  0 (default 16-bit)
 unmaskirq	=  0 (off)
 using_dma	=  1 (on)
 keepsettings	=  0 (off)
 readonly	=  0 (off)
 readahead	= 256 (on)
 geometry	= 7964/16/63, sectors = 8027712, start = 0


the details about the CF are:

# hdparm -i /dev/hda

/dev/hda:

 Model=SanDisk SDCFX3-004G, FwRev=HDX 4.32, SerialNo=116904F1008I1304
 Config={ HardSect NotMFM Removeable DTR>10Mbs nonMagnetic }
 RawCHS=7964/16/63, TrkSize=0, SectSize=576, ECCbytes=4
 BuffType=(2) DualPort, BuffSize=1kB, MaxMultSect=4, MultSect=off
 CurCHS=7964/16/63, CurSects=8027712, LBA=yes, LBAsects=8027712
 IORDY=no, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0mdma1mdma2
 UDMA modes: udma0 udma1 *udma2 
 AdvancedPM=no WriteCache=disabled
 Drive conforms to: Unspecified:  ATA/ATAPI-4

 * current active mode


so the CF is compatible with DMA modes (as it should be, since it's a Sandisk Extreme III)

# hdparm -I /dev/hda

/dev/hda:

CompactFlash ATA device, with removable media
	Model Number:        SDCFX3-004G                     
	Serial Number:          116904F1008I1304
	Firmware Revision:   4.32
Standards:
	Supported: 4 
	Likely used: 4
Configuration:
	Logical		max	current
	cylinders	7964	7964
	heads		16	16
	sectors/track	63	63
	--
	CHS current addressable sectors:    8027712
	LBA    user addressable sectors:    8027712
	device size with M = 1024*1024:        3919 MBytes
	device size with M = 1000*1000:        4110 MBytes (4 GB)
Capabilities:
	LBA, IORDY(may be)(cannot be disabled)
	Queue depth: 1
	Standby timer values: spec'd by Vendor
	R/W multiple sector transfer: Max = 4	Current = 0
	DMA: mdma0 mdma1 mdma2 udma0 udma1 *udma2 udma3 udma4 
		Cycle time: min=120ns recommended=120ns
	PIO: pio0 pio1 pio2 pio3 pio4 
		Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
	Enabled	Supported:
		Write cache
	   *	CFA feature set

while, when entering the command "fdisk -l" :

# fdisk -l
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
end_request: I/O error, dev hda, sector 0
Buffer I/O error on device hda, logical block 0
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
end_request: I/O error, dev hda, sector 16
Buffer I/O error on device hda, logical block 1
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
ide0: reset: success
hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x84 { DriveStatusError BadCRC }
ide: failed opcode was: unknown
end_request: I/O error, dev hda, sector 0
Buffer I/O error on device hda, logical block 0

I tried setting the i2c bit, as explained here: http://wiki.elphel.com/index.php?title=10369#Example_-_setting_SATA_to_be_IDE_slave_.28needed_if_bottom_CF_card_or_internal_HDD_is_installed.29:
I clicked on the link , then commanded "reboot -f" via serial. I could not find any improvement: the errors were the same as the previous boot.

In the web gui, Elphel correctly detects the CF card:

Master CF Card in Slot 1 (CF0 bottom):	detected
Slave CF Card in Slot 2 (CF1 top):	not detected

/dev/              3.83GB                Mount

I tried forcing the use of one of the DMA modes, using the string "hdparm -X mdma2 /dev/hda/" (found at https://szaszak.wordpress.com/linux/elphel-as-a-digital-cinema-camera/) and rebooting
I checked on my pc, and the CF's partition table is MBR, and the partition is FAT32.

I'm running out of ideas.
What can I do in order for the CF to be recognized by the camera?

Thanks a lot in advance.
Cheers,


Riccardo

 

<>-<>-<>-<>-<>-<>-<>-<>-<>-<>
Riccardo Di Roberto - IZ0VXZ
Dept. of Astronautics
School of Aerospace Engineering
Università di Roma "La Sapienza"
Mobile phone: +39 3283783580
E-mail: rickdiro at gmail.com
<>-<>-<>-<>-<>-<>-<>-<>-<>-<>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://support.elphel.com/pipermail/support-list_support.elphel.com/attachments/20141110/f168a2e4/attachment-0002.html>


More information about the Support-list mailing list