1. The errors I was getting in the sata subsystem were due to my new, (one month old), Samsung HM500JI sata drive being defective.
I replaced this drive with a Samsung HD501LJ drive I dug out, it appears to work perfectly (see later)
2. I found that neither of two Esata / usb external enclosures worked with the Plug Esata system
However connecting the disk drive(s) directly to the Plug esata connector worked. I did not need to power cycle to get the drive(s) visible to uboot
My esata to sata cable is one metre long, and unshielded, but the HD501LJ drive worked well.
3. Summary of today's tests.
3.1 I connected the replacement Sumsung drive HD501LJ to the Plug computer with an Esata / sata 1 metre cable and a 12/5 v power brick.
3.2 I started uboot and halted at prompt. Using the ide reset command I saw that Uboot had found the drive.
3.3 I then booted my modifed kernel uImage from SD card. The kernel loaded and loaded the ata sata drivers and created a dev/sda.
3.4 I repartitioned the drive and formatted it ext3 with no problems.
3.5 I ran the bonnie++ disk test /exercise program, with no errors, still working out the timing info, putty really screwed the formatting! (Higher disk transfer is good lower cpu usuage is good)
Version 1.03c ------Sequential Output------ --Sequential Input- --Random-------Sequential Create------ --------Random Create--------
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
sheevaplug 1G 5729 98 62350 57 28612 30 5981 99 80999 34 240.8 2
sheevaplug,1G,5729,98,62350,57,28612,30,5981,99,80999,34,240.8,2,16,6111,47,+++++,+++,21720,100,12521,94,+++++,+++,21274,99
4. Work to be done.
4.1 Finish installing filter caps.
4.2 Find out why plug sata system does not like my external enclosures on initiqalisation
4.3 Clean up modified kernel and document.
4.4. Cut hole in sheevaplug case to access esata connector.
4.5 Get a RMA for the defective drive and return it, ( there is "lifetime" warranty on the drive).
__ __ _ _
| \/ | __ _ _ ____ _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| | | | (_| | | \ V / __/ | |
|_| |_|\__,_|_| \_/ \___|_|_|
_ _ ____ _
| | | | | __ ) ___ ___ | |_
| | | |___| _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
\___/ |____/ \___/ \___/ \__|
** MARVELL BOARD: OpenRD-Base LE
U-Boot 1.1.4 (Oct 27 2009 - 21:57:24) Marvell version: 3.4.19
U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CFB00
Soc: 88F6281 A0 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz
DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000 size 256MB
DRAM CS[1] base 0x10000000 size 256MB
DRAM Total size 512MB 16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB
Flash: 0 kB
CPU : Marvell Feroceon (Rev 1)
Streaming disabled
Write allocate disabled
USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 3 0
Marvell>> u ide reset
Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
Marvell>> <INTERRUPT>
Marvell>> ide reset
Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
Marvell>> ide reset
Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 1 0]: Enable DMA mode (6)
Device 1 @ 0 1:
Model: SAMSUNG HD501LJ Firm: CR100-10 Ser#: S0MUJ1MP852091
Type: Hard Disk
Supports 48-bit addressing
Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Marvell>> ide reset
Unknown command 'ide' - try 'help'
Marvell>> <INTERRUPT>
Marvell>> ide ide le
Usage:
ide - IDE sub-system
Marvell>> <INTERRUPT>
Marvell>> ide reset
Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 1 0]: Enable DMA mode (6)
Device 1 @ 0 1:
Model: SAMSUNG HD501LJ Firm: CR100-10 Ser#: S0MUJ1MP852091
Type: Hard Disk
Supports 48-bit addressing
Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Marvell>> b <INTERRUPT>
Marvell>> set bootargs 'console=ttys S0, 115200 ro root=/dev/mmcblk0p1 rootdelay=1'
Marvell>> mmcinit
SDHC found. Card desciption is:
Manufacturer: 0x1b, OEM "SM"
Product name: "00000", revision 1.0
Serial number: 2054004964
Manufacturing date: 8/2009
CRC: 0x00, b0 = 0
Marvell>> ext2load mmc 0 0x800000 /boot/uImage
2274104 bytes read
Marvell>> bootm 0x800000
## Booting image at 00800000 ...
Image Name: Linux-2.6.32-rc6-00011-g3ad6b4c-
Created: 2009-11-13 11:22:38 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2274040 Bytes = 2.2 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Linux version 2.6.32-rc6-00011-g3ad6b4c-dirty (root@debiansilch) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #1 PREEMPT Fri Nov 13 11:22:22 GMT 2009
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
CPU: VIVT data cache, VIVT instruction cache
Machine: Marvell SheevaPlug Reference Board
Memory policy: ECC disabled, Data cache writeback
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyS0,115200 ro root=/dev/mmcblk0p1 rootdelay=1
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 256MB 256MB = 512MB total
Memory: 514176KB available (4176K code, 959K data, 116K init, 0K highmem)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:114
Console: colour dummy device 80x30
Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
Kirkwood: MV88F6281-A0, TCLK=200000000.
Feroceon L2: Enabling L2
Feroceon L2: Cache support initialised.
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Using static regulatory domain info
cfg80211: Regulatory domain: US
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)
(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 4, 65536 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 1004
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
console [ttyS0] enabled
loop: module loaded
sata_mv sata_mv.0: version 1.28
sata_mv sata_mv.0: slots 32 ports 2
scsi0 : sata_mv
scsi1 : sata_mv
ata1: SATA max UDMA/133 irq 21
ata2: SATA max UDMA/133 irq 21
NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Creating 3 MTD partitions on "orion_nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000020000000 : "root"
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:50:43:01:c1:e6
libertas_sdio: Libertas SDIO driver
libertas_sdio: Copyright Pierre Ossman
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usbcore: registered new interface driver ums-datafab
usbcore: registered new interface driver ums-freecom
usbcore: registered new interface driver ums-jumpshot
usbcore: registered new interface driver ums-sddr09
usbcore: registered new interface driver ums-sddr55
mice: PS/2 mouse device common for all mice
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
i2c /dev entries driver
cpuidle: using governor ladder
cpuidle: using governor menu
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
Registered led device: plug:green:health
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address 0001
mmcblk0: mmc0:0001 00000 7.60 GiB
mmcblk0: p1
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
ata1: SATA link down (SStatus 0 SControl F300)
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
usbcore: registered new interface driver usbhid
usbhid: v2.6:USB HID core driver
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
rtc-mv rtc-mv: setting system clock to 2009-03-25 16:07:52 UTC (1237997272)
Waiting 1sec before mounting root device...
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
ata2.00: ATA-8: SAMSUNG HD501LJ, CR100-10, max UDMA7
ata2.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access ATA SAMSUNG HD501LJ CR10 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
sda: sda1
sd 1:0:0:0: [sda] Attached SCSI disk
VFS: Mounted root (ext2 filesystem) readonly on device 179:1.
Freeing init memory: 116K
* Filesystem type 'fusectl' is not supported. Skipping mount.
* Setting preliminary keymap... /usr/bin/ckbcomp: No keycodes, nor layout specified
[ OK ]
* Starting kernel event manager...
[ OK ]
* Loading hardware drivers...
[ OK ]
* Loading kernel modules... * Loading manual drivers...
[ OK ]
* Setting kernel variables (/etc/sysctl.conf)... Unknown HZ value! (94) Assume 100.
[ OK ]
* Setting kernel variables (/etc/sysctl.d/10-console-messages.conf)... Unknown HZ value! (94) Assume 100.
[ OK ]
* Setting kernel variables (/etc/sysctl.d/10-network-security.conf)... Unknown HZ value! (94) Assume 100.
error: "net.ipv4.tcp_syncookies" is an unknown key
[fail]
* Activating swap...
[ OK ]
* Checking file systems... fsck 1.41.4 (27-Jan-2009)
[ OK ]
* Mounting local filesystems...
[ OK ]
* Activating swapfile swap...
[ OK ]
* Configuring network interfaces...
[ OK ]
* Setting up console font and keymap... /usr/bin/ckbcomp: No keycodes, nor layout specified
[ OK ]
* Starting system log daemon...
[ OK ]
* Starting kernel log daemon...
[ OK ]
* Starting OpenBSD Secure Shell server sshd
[ OK ]
Ubuntu 9.04 sheevaplug ttyS0
sheevaplug login: patrick
Password: * Restarting OpenBSD Secure Shell server sshd
Last login: Sat Nov 14 11:32:04 GMT 2009 on ttyS0
Linux sheevaplug 2.6.32-rc6-00011-g3ad6b4c-dirty #1 PREEMPT Fri Nov 13 11:22:22 GMT 2009 armv5tel
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
To access official Ubuntu documentation, please visit:
http://help.ubuntu.com/patrick@sheevaplug:~$ sudo fdisk /dev/sda
The number of cylinders for this disk is set to 60801.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00080843
Device Boot Start End Blocks Id System
/dev/sda1 1 60801 488384001 7 HPFS/NTFS
Command (m for help): t d
Selected partition 1
Command (m for help): p
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00080843
Device Boot Start End Blocks Id System
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-60801, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-60801, default 60801):
Using default value 60801
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
patrick@sheevaplug:~$sudo mkfs.ext3 /dev/sda1
mke2fs 1.41.4 (27-Jan-2009)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
30531584 inodes, 122096000 blocks
6104800 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
3727 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000
Writing inode tables: 0/3727 1/3727 2/3727 3/3727 4/3727 5/3727 6/3727 7/3727 8/3727 9/3727 10/3727 11/3727 12/3727 13/3727 14/3727 15/3727 16/3727 17/3727
....cut for brievity...
/37273719/37273720/37273721/37273722/37273723/37273724/37273725/37273726/3727done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
patrick@sheevaplug:
patrick@sheevaplug~$ cd /mnt/test
patrick@sheevaplug:/mnt/test$ dir
lost+found
patrick@sheevaplug:/mnt/test$ sudo mkdir btest
patrick@sheevaplug:/mnt/test$ cd ..
patrick@sheevaplug:/mnt$ bonnie++ --help
bonnie++: invalid option -- '-'
usage: bonnie++ [-d scratch-dir] [-s size(Mb)[:chunk-size(b)]]
[-n number-to-stat[:max-size[:min-size][:num-directories]]]
[-m machine-name]
[-r ram-size-in-Mb]
[-x number-of-tests] [-u uid-to-use:gid-to-use] [-g gid-to-use]
[-q] [-f] [-b] [-p processes | -y]
Version: 1.03c
patrick@sheevaplug:/mnt$ bonnie++ --helpsudo -u root -d /mnt/test/btest
Using uid:0, gid:0.
Writing with putc()...done
Writing intelligently...done
Rewriting...done
Reading with getc()...done
Reading intelligently...done
start 'em...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version 1.03c ------Sequential Output------ --Sequential Input- --Random-
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
sheevaplug 1G 5729 98 62350 57 28612 30 5981 99 80999 34 240.8 2
------Sequential Create------ --------Random Create--------
-Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 6111 47 +++++ +++ 21720 100 12521 94 +++++ +++ 21274 99
sheevaplug,1G,5729,98,62350,57,28612,30,5981,99,80999,34,240.8,2,16,6111,47,+++++,+++,21720,100,12521,94,+++++,+++,21274,99
patrick@sheevaplug:/mnt$ dir /mnt/test/btest
patrick@sheevaplug:/mnt$
patrick@sheevaplug:/mnt$ sudo hdparm -t /dev/sda
[sudo] password for patrick:
/dev/sda:
Timing buffered disk reads: 242 MB in 3.00 seconds = 80.62 MB/sec
patrick@sheevaplug:/mnt$ sudo hdparm -t /dev/sda /dev/sdaT /dev/sda
/dev/sda:
Timing cached reads: 672 MB in 2.00 seconds = 335.84 MB/sec
patrick@sheevaplug:/mnt$ sudo hdparm -T /dev/sda1
/dev/sda1:
Timing cached reads: 712 MB in 2.00 seconds = 356.04 MB/sec
patrick@sheevaplug:/mnt$ sudo hdparm -T /dev/sda1 /dev/sda1t /dev/sda1
/dev/sda1:
Timing buffered disk reads: 244 MB in 3.02 seconds = 80.82 MB/sec
patrick@sheevaplug:/mnt$