New IT forum Follow us on Twitter
23 May 2012, 04:33:15 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: EFIKA MX now in stock!
 
   Home   SHOP Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Booting from native eSata drive  (Read 3038 times)
apemberton
Full Member
***
Posts: 101


« on: 15 December 2010, 11:44:27 am »

I am trying to set up an eSata Sheevaplug to boot from the eSata drive. However, I am only getting so far. I should state the eSata drive is in a selectable eSata/USB case and is manually switchable.

I have already updated the kernel to 2.6.36.2 on NAND and a SHDC mmc card. Both of those will boot correctly (though the NAND has the old Ubuntu 9.04 on board so there are compatibility issues - but that is not germane to the issue at hand. SHDC works fine with Debian Squeeze and apps.

The version of u-boot I am using is uboot-sata-090903.bin

eSata booting is another matter. I have tried various combinations of u-boot commands but I cannot get the unit to boot natively from eSata. The current u-boot settings are:-

Code:
Marvell>> printenv
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethaddr=00:50:43:24:09:04
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
ipaddr=192.168.2.150
serverip=192.168.2.149
bootargs_root=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
bootargs_console=console=ttyS0,115200
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run recover2; saveenv; reset
recover2=run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs $(bootargs_console) $(mtdpartitions) $(ramdisk); bootm 0x00800000 0x01100000
recover3=run recover4; nand erase clean 0x00100000 0x00400000; nand write.e 0x00800000 0x00100000 0x00400000
recover4=tftpboot 0x00800000 uImage; tftpboot 0x01100000 uInitrd
mtdpartitions=mtdparts=orion_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
ramdisk=root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=mmc
bootcmd_nand=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root_nand); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootcmd_mmc=setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
bootargs_root_mmc=root=/dev/mmcblk0p2 rootdelay=5
fileaddr=1100000
bootargs=console=ttyS0,115200 root=/dev/sda2 rw rootdelay=5
bootargs_root_nand=rootfstype=jffs2 console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw
bootargs_disk=root=/dev/sda2 rw rootwait
arcNumber=2097
filesize=2D3A44
bootcmd=setenv arcNumber 2678; run bootcmd_disk; setenv arcNumber 2097; run bootcmd_mmc; run bootcmd_nand
bootcmd_disk=setenv bootargs $(bootargs_console) $(bootargs_disk); run ideload; bootm 0x800000
ideload=ide reset; ext2ls ide 1:2; ext2load ide 1:2 0x800000 /boot/uImage; ide device 1:2
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes

Environment size: 2647/131068 bytes

I am aware that I am booting in this instance from partition /dev/sda2/boot (ext2load 1:2) but I have also used partition /dev/sda1 (ext2load 1:1) but the results are the same. I switch from arcNumber 2097 to 2678 on the fly and if booting from ide fails, switch back to 2097. The latter seems to be important recognising inbuilt kernel modules. Booting proceeds so far and then cannot find the eSata device. Currently I am using bootargs bootargs_disk root=/dev/sda2/boot rw rootwait so that it deliberatly hangs if the kernel can't find /dev/sda. I have used a 10 second delay after which I get the VFS: Cannot open root device "sda2" or unknown-block message followed by information that mmcblk0/p1/p2 or mtd (driver?) are available and a set of trace records.

Code:
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: SHEEVA PLUG LE

U-Boot 1.1.4 (Jul 14 2009 - 06:46:57) Marvell version: 3.4.16

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CF120

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
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 1 0]: Enable DMA mode
  Device 1 @ 0 1:
Model: SAMSUNG HD103UJ                          Firm: 1AA01113 Ser#: S13PJ90QA75988
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)

<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
            3967 README-2.6.36.2
            4910 inst.sh
         5443838 sheeva-2.6.36.1-Modules.tar.gz
         5445655 sheeva-2.6.36.2-Modules.tar.gz
              65 sheeva-2.6.36.2-Modules.tar.gz.md5
         1192103 sheeva-2.6.36.2-System.map
         2964036 sheeva-2.6.36.2-uImage
              57 sheeva-2.6.36.2-uImage.md5
            2121 webmin-setup.out
<DIR>       4096 bin
<DIR>       4096 boot
<DIR>       4096 dev
<DIR>       4096 etc
<DIR>       4096 home
<DIR>       4096 lib
<DIR>       4096 media
<DIR>       4096 mnt
<DIR>       4096 opt
<DIR>       4096 proc
<DIR>       4096 root
<DIR>       4096 sbin
<DIR>       4096 selinux
<DIR>       4096 srv
<DIR>       4096 sys
<DIR>       4096 tmp
<DIR>       4096 usr
<DIR>       4096 var

2964036 bytes read

IDE device 1: Model: SAMSUNG HD103UJ                          Firm: 1AA01113 Ser#: S13PJ90QA75988
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
... is now current device
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.36.2
   Created:      2010-12-11  13:38:26 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2963972 Bytes =  2.8 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.36.2 (kelly@speedy) (gcc version 4.4.3 (Sourcery G++ Lite er) ) #1 PREEMPT Sat Dec 11 06:38:22 MST 2010
CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053177
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 root=/dev/sda2 rw rootwait
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: 513100k/513100k available, 11188k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xe0800000 - 0xfe800000   ( 480 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc002f000   ( 156 kB)
      .text : 0xc002f000 - 0xc0567000   (5344 kB)
      .data : 0xc058c000 - 0xc05bba20   ( 191 kB)
SLUB: Genslabs=11, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
NR_IRQS:114
Console: colour dummy device 80x30
Calibrating delay loop... 1192.75 BogoMIPS (lpj=5963776)
pid_max: default: 32768 minimum: 301
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: Calling CRDA to update world regulatory domain
Switching to clocksource orion_clocksource
FS-Cache: Loaded
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
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
FS-Cache: Netfs 'nfs' registered for caching
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 4008, nTxLock = 32068
msgmni has been set to 1002
io scheduler noop 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
brd: module loaded
loop: module loaded
NAND device: Manufacturer ID: 0xec, Chip ID: 0xdc (Samsung NAND 512MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 326 at 0x0000028c0000
Bad eraseblock 2247 at 0x0000118e0000
Bad eraseblock 3112 at 0x000018500000
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:24:09:04
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
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
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
mmc0: mvsdio driver initialized, lacking card detect (fall back to polling)
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 )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor cpy )
mv_xor mv_xor.3: Marvell XOR: ( xor fill cpy )
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
oprofile: hardware counters not available
oprofile: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
Registering the dns_resolver key type
registered taskstats version 1
rtc-mv rtc-mv: setting system clock to 2010-12-15 10:07:20 UTC (1292407640)
Waiting for root device /dev/sda2...

If at this point I switch to USB, device /dev/sda appears and gets recognised after a few seconds Booting will continue successfully and the plug will operate correctly from the USB connected eSata drive. There is no SHDC card present and it is certainly not using NAND flash.

Something is wrong with the kernel recognising the native eSata connection though I don't know if it is me, the u-boot version, my u-boot environment variables, or the kernel version and modules.

I guess I could compile my own kernel though I'm no expert at the configuration (I did compile a kernel on another eSata sheevaplug using the .config file but did not apply patches. I didn't get any compile errors but I know it won't work.)

So in other words:- HELP!  Advice would be welcome as my forehead is getting decidedly flat banging it against the brick wall.


Logged

Tony Pemberton
peter a
Full Member
***
Posts: 162


« Reply #1 on: 15 December 2010, 01:45:13 pm »

Hi , I have 3 partitions .

1 - just for uImage
2 - Root file system
3 - Data to be mounted

and this is my uboot args :-

setenv bootcmd_ide 'setenv bootargs $(bootargs_console) $(bootargs_root_ide); ide reset; ext2load ide 1 0x800000 /uImage; bootm 0x00800000'
setenv bootargs_root_ide 'root=/dev/sda2 rootdelay=10'
setenv bootcmd 'run bootcmd_ide'

Logged
apemberton
Full Member
***
Posts: 101


« Reply #2 on: 15 December 2010, 02:52:46 pm »

Thanks Peter. My disk has three patitions but not quite the same as yours.

1 - just for uImage - the same as yours - ext2
2 - Root file system - for the root and data - ext3 (Big space and I'm suprised it loaded the kernel from an ext3 partition!)
3 - Tiny swap partition - not sure if I need it.

Although the environmental variables are different, mine do not seem to be signifcantly different from your settings. I have loaded kernel from the boot partition but had the same .

I have a few questions though,

What version of u-boot and kernel worked?

What is the arcNumber? If set to 2678, supposedly for eSata, SDHC and NAND will not boot of course. I am trying to allow multiboot so I have a fallback.

I will try modifying my environment and see what happens.

Logged

Tony Pemberton
peter a
Full Member
***
Posts: 162


« Reply #3 on: 15 December 2010, 05:17:35 pm »

Yep I had a swap partition at first , but in the end found I didn`t need it !!!
when you think about it most other plugs / nas devices have 256 mb of ram plus a small swap file , which doesn`t equal the sheeva`s 512 mb of real ram.

Don`t forget not very long ago 256 mb of ram or less was the normal for a windows xp based system.

this my default multiboot setup for nand & sd card ( plus lines above ), so to make a multiboot nand and sata I guess it just a matter of changing "bootcmd=run bootcmd_mmc; run bootcmd_nand" to

bootcmd=run bootcmd_ide; run bootcmd_nand


Unknown command '<NULL>' - try 'help'
Marvell>> printenv

baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
bootargs_root=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
mtdpartitions=mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
ethaddr=00:50:43:01:52:80
bootargs_console=console=ttyS0,115200
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run recover2; saveenv; reset
recover2=run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs $(bootargs_console) $(mtdpartitions) root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=nand; bootm 0x00800000 0x01100000
recover3=run recover4; nand erase clean 0x00100000 0x00400000; nand write.e 0x00800000 0x00100000 0x00400000
recover4=usb start; fatload usb 0 0x00800000 uImage; fatload usb 0 0x01100000 initrd
bootargs_root_nand=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
bootcmd_nand=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root_nand); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootargs_root_mmc=root=/dev/mmcblk0p2 rootdelay=5
bootcmd_mmc=setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm 0x00800000
real_bootcmd=run bootcmd_mmc; run bootcmd_nand
arcNumber=2097
filesize=32D62A
bootcmd=run bootcmd_mmc; run bootcmd_nand
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes

Environment size: 2230/131068 bytes
Marvell>>
« Last Edit: 15 December 2010, 05:24:49 pm by peter a » Logged
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #4 on: 15 December 2010, 05:55:19 pm »

I switch from arcNumber 2097 to 2678 on the fly and if booting from ide fails, switch back to 2097. The latter seems to be important recognising inbuilt kernel modules. Booting proceeds so far and then cannot find the eSata device.


When you use the sheeva.with-linux.com kernel, (since 2.6.33) you MUST use arcNumber 2678 to have eSATA functionality. I'm not sure if the problem here is that you should saveenv before trying to boot in this way.
Logged
apemberton
Full Member
***
Posts: 101


« Reply #5 on: 17 December 2010, 11:27:56 am »

Having inserted a 'printenv' in the uboot script AFTER loading kernel from eSata disk but BEFORE executing the 'bootm 0x800000', the result shows 'arcNumber=2678'.

I did try peter a' script but again booting fails being unable to find /dev/sda2.

Plainly the kernel is looking for, but cannot find, /dev/sda2 (or any other /dev/sdan) in my eSata boot sequence.

The disk housing (Akasa Integral) has a switch to change from eSata to USB. Now if I connect the USB cable in parallel with the eSata cable and allow the u-boot script to load kernel from eSata and booting runs to a 'root=/dev/sda2 rw rootwait', I can throw the switch to the USB position. The kernel detects the now USB connected drive, goes through the sequence of device detection, registers /dev/sdan and continues booting to completion. However the drive is USB connected. Switching back to eSata kills the /dev/sdan devices with recognition that the USB connection is no longer active.

I have had a brief look at the '.config' file for the 2.6.32.2 kernel but I can't find anything yet.

I read somewhere that someone copied a kernel image from a USB stick to an eSata drive. I havn't tried that yet, but can anyone confirm this works? I don't think I have a spare USB stick of sufficient size to use yet.  


ETA: If I boot from SHDC with kernel 2.6.36.2, the eSata device will be recognised, /dev/sdan is populated and I can do things on the eSata drive.
« Last Edit: 17 December 2010, 11:34:45 am by apemberton » Logged

Tony Pemberton
NewIT_Marcus
Administrator
Hero Member
*****
Posts: 960


« Reply #6 on: 17 December 2010, 05:45:15 pm »

Having inserted a 'printenv' in the uboot script AFTER loading kernel from eSata disk but BEFORE executing the 'bootm 0x800000', the result shows 'arcNumber=2678'.


I am not certain about this, but the usual advice is to saveenv and reset when changing arcNumber. I am reasonably sure that it is important to do this.
Logged
apemberton
Full Member
***
Posts: 101


« Reply #7 on: 18 December 2010, 04:39:09 pm »

Maybe you do have to save the arcNumber but if I saveenv with arcnumber 2678 the thing still will not boot from eSata. Secondly if I switch off the eSata drive causing eSata to fail, change the arcNumber to 2097 on the fly, the kernel boots successfully from SDHC.

I did muck around with udev which showed that there were no 'hdparm.rules' in the '/etc/udev/rules.d' directory (there was another error due to a missing net-generator-???.rules file) though adding that a hdparm.rules file did not cure the problem.

After I have booted from SDHC, turning the eSata drive on (NOT USB connected) the eSata drive registers. Performing a 'lsmod' before and after turning the eSata drive on shows the appearance of module mv_sata.

Looking at the 'make menuconfig' for kernel 2.6.36.2 shows that eSata may loaded as a module and not built in to the kernel. The USB section showed that sata is built in.

Currently I am building (natively on another sheevaplug) a new kernel following generally the compilation rules elsewhere in this forum but modified for eSata loaded as a built-in, removal of the wireless LAN built-in and adding 'netconsole'.

I shall be interested if there is a change in the situation!

Logged

Tony Pemberton
apemberton
Full Member
***
Posts: 101


« Reply #8 on: 19 December 2010, 08:37:50 pm »

Well my newly compiled kernel 2.6.36.2 with eSata built-in rather than modularised now allows me to boot directly from eSata drive. And quick it is! However, I have not yet tried netconsole and I should have cut out built-in bluetooth since that is a little irrelevant on a Sheevaplug.

I'm feeling a little pleased with myself too!  Smiley

Problem solved.
Logged

Tony Pemberton
NewIT_James
Administrator
Sr. Member
*****
Posts: 394


« Reply #9 on: 20 December 2010, 10:12:29 am »

Hi apemberton,

It would be great if you could post your kernel on the forum, I would love to test it on the Guiplug.

Merry Xmas

NewIT Technical

Logged

NewITJames
apemberton
Full Member
***
Posts: 101


« Reply #10 on: 20 December 2010, 03:12:45 pm »

Basically I followed the compiling info in http://www.newit.co.uk/forum/index.php/topic,285.msg855.html#msg855 post herein. I used a working eSata sheevaplug with hard disk attached (actually my PBX box so it was (and is) working my home phone system. So I did not need the cross compiling info. Of course it is much slower than cross-compiling but, for me, that is not important. I did have to 'aptitude install uboot-envtools uboot-mkimage' to complete the 'uImage'

I downloaded the kernel from kernel.org rather than from http://sheeva.with-linux.com/sheeva/ though that is immaterial I think. I downloaded the http://sheeva.with-linux.com/sheeva/2.6.36.2/sheeva-2.6.36.2.config .config file as an almost complete framework. I investigated the 'make menuconfig' as supplied and as I remarked previously, the original '.config' file shows the eSata to be a kernel module and not a built-in. Thus with kernel 2.6.36.2, eSata will work quite happily as a plug-in drive, both USB and eSata. Incidentally, although I havn't tried it, I believe an eSata drive will boot from a USB connected drive since the USB modules are built-in, though that needs the appropriate uboot settingss and speed is limited to 480Mbits/sec as per USB2.

I was going to include my '.config' file but that makes my message too long.

My u-boot environment is:-

Code:
Marvell>> printenv
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x1ff00000@0x100000(root)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethaddr=00:50:43:24:09:04
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
ipaddr=192.168.2.150
serverip=192.168.2.149
bootargs_root=ubi.mtd=1 root=ubi0:rootfs rootfstype=ubifs
recover1=setenv mainlineLinux yes; setenv arcNumber 2097; setenv bootcmd run recover2; saveenv; reset
recover2=run recover3; setenv bootcmd $(real_bootcmd); saveenv; setenv bootargs $(bootargs_console) $(mtdpartitions) $(ramdisk); bootm 0x00800000 0x01100000
recover3=run recover4; nand erase clean 0x00100000 0x00400000; nand write.e 0x00800000 0x00100000 0x00400000
recover4=tftpboot 0x00800000 uImage; tftpboot 0x01100000 uInitrd
mtdpartitions=mtdparts=orion_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs)
ramdisk=root=/dev/ram0 rw ramdisk=0x01100000,8M install_type=mmc
bootcmd_nand=setenv bootargs $(bootargs_console) $(mtdpartitions) $(bootargs_root_nand); nand read.e 0x00800000 0x00100000 0x00400000; bootm 0x00800000
bootargs_root_mmc=root=/dev/mmcblk0p2 rootdelay=5
fileaddr=1100000
bootargs=console=ttyS0,115200 root=/dev/sda2 rw rootdelay=5
bootargs_root_nand=rootfstype=jffs2 console=ttyS0,115200 mtdparts=orion_nand:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw root=/dev/mtdblock1 rw
filesize=2D3A44
bootargs_disk=root=/dev/sda2 rw rootwait
arcNumber=2678
bootcmd=run bootcmd_disk; setenv arcNumber 2097; run bootcmd_mmc; run bootcmd_nand
bootcmd_mmc=setenv bootargs $(bootargs_console) $(bootargs_root_mmc); mmcinit; ext2load mmc 0:1 0x800000 /uImage; bootm0x800000
ideload=ide reset; ext2load ide 1 0x800000 /uImage
bootargs_console=console=ttyS0,115200; ncip=6666@$serverip
bootcmd_disk=setenv bootargs $(bootargs_console) $(bootargs_disk); run ideload; bootm 0x800000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes

Environment size: 2603/131068 bytes

I have kept the standard, http://sheeva.with-linux.com/sheeva/ 2.6.36.2 kernel on SDHC and in NAND (though it doesn't like ubuntu 9.04 - but thats another story) which works well should the eSata drve not be available.

Booting and running Debian from eSata seems much faster than SDHC but I guess that may be due to the speed of the SDHC interface. (I believe that it is not recommended operating a SPIO serial connection at higher than 10Mbit/Sec though the SDHC card has a 'nibble' 4 bit interface - I don't know what GS have implemented).

Although I did compile the modules, I did not bother to use them and have stuck with the stock 2.6.36.2 kernel modules in '/lib/modules/2.6.36.2'. This might cause me problems later but I'll cross that bridge when I come to it.

I'm not sure where I can upload files, particularly my 'uImage'. I did have some problems with the length of file using atftp for some reason so i used a USB stick to transfer the file to the target eSata Sheevaplug.
The length of 'uImage' is as:-
Code:
root@debian:~# ls -al /mnt/sda1
total 2909
drwxr-xr-x 2 root root    1024 Dec 19 20:01 .
drwxr-xr-x 9 root root    4096 Dec 14 18:42 ..
-rwxr-xr-x 1 root root 2959576 Dec 19 20:01 uImage

Then ssh to the IP address allocated and:-

Code:
login as: root
         _sudZUZ#Z#XZo=_         DDDD   EEEEEE BBBB   IIIIII  AAAA   NN   NN
      _jmZZ2!!~---~!!X##wa       DD DD  EE     BB BB    II   AA  AA  NNN  NN
   .<wdP~~            -!YZL,     DD  DD EEEEE  BBBBB    II   AAAAAA  NNNN NN
  .mX2'       _%aaa__     XZ[.   DD  DD EE     BB  BB   II   AA  AA  NN NNNN
  oZ[      _jdXY!~?S#wa   ]Xb;   DDDD   EEEEEE BBBBB  IIIIII AA  AA  NN   NN
 _#e'     .]X2(     ~Xw|  )XXc
..2Z`      ]X[.       xY|  ]oZ(
..2#;      )3k;     _s!~   jXf`   Linux Version 2.6.36.2
 1Z>      -]Xb/    ~    __#2(    Compiled #2 PREEMPT Sat Dec 18 17:41:25 GMT 2010
 -Zo;       +!4ZwaaaauZZXY'      One ARM Feroceon Processor, 512M RAM
  *#[,        ~-?!!!!!!-~        1192.75 Bogomips Total
   XUb;.                         debian
    )YXL,,
      +3#bc,
        -)SSL,,
           ~~~~~


Debian GNU/Linux 6.0 \n \l

root@192.168.2.39's password:
Linux debian 2.6.36.2 #2 PREEMPT Sat Dec 18 17:41:25 GMT 2010 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Dec 20 14:59:34 2010
root@debian:~#



Merry Christmas or whatever folks
Logged

Tony Pemberton
NewIT_James
Administrator
Sr. Member
*****
Posts: 394


« Reply #11 on: 21 December 2010, 09:08:01 pm »

Hi Tony,

I compiled a 2.6.36.2 kernel as above with eSata built in and I have to agree it's pretty awesome. I have tried it on a Guiplug and installing a large package (xfce4) as a test in synaptic took 1m and 30s compared to a 150x SLC SD card which took 5 mins.

I will post the compiled kernel in the GuiPlug section if anyone wishes to try it.

NewIT Technical
Logged

NewITJames
apemberton
Full Member
***
Posts: 101


« Reply #12 on: 22 December 2010, 10:46:14 am »

Glad you like it!

I am going to change my other two eSata sheevaplugs to boot from eSata but I have the snag that I have applications running partly on SDHC (binaries such as freeswitch and snmpd/mrtg) and eSata (data, compilations and configuration) so simply dd'ing the image over is not safe. I shall be interested in the performance of gnome on eSata.

OK for a bit of a wish list:-

A GP+ with space in the case for a 1.8" drive, hdmi output and a micro PCIe slot! Oh and a fanless or silent design. Thats my letter to to Santa posted up the lumb! (No I'm not Scottish!)

Have a good one!
Logged

Tony Pemberton
peter a
Full Member
***
Posts: 162


« Reply #13 on: 22 December 2010, 06:24:52 pm »

How I do it is boot from ( A ) !!! , which is normally NAND

and just use "cp -r -p /full path/from/* /full path/to" and copy from B to C

eg

mount /dev/mmcblkp2 /mnt/sd_card
mount /dev/sda2 /mnt/esata
cp -r -p /mnt/sd_card/* /mnt/esata
umount /mnt/sd_card
umount /mnt/esata
I`ve moved the root file system TO and FROM the SD & Esata , without problems each time.

   
Logged
apemberton
Full Member
***
Posts: 101


« Reply #14 on: 29 December 2010, 11:29:06 am »

If only copy-ing were as easy as that! Nothing is simple!

Having performed a complete copy from SDHC to HDD, I have had to rebuild (or am still re-building) previously working applications because of the split of binaries etc and data. Paths were disrupted so apps didn't know where to find things. Modifications to files in '/etc/init.d' Also needed editting. Updating 'etc/apt/sources.list' was required to match those Debian and third party mirrors I was using. Webmin needed complete re-installation.

On my SNMP/MRTG system I had to re-install and then rebuild snmpd.conf. With MRTG, reinstallation was only part of the  problems. Because of the different paths, the html files also had to be rejigged using the MRTG utilities. I only lost a day's statistics. But it is working again and no frequent rewrites of logs etc to SDHC.

My PBX is still not in service. I have had to recompile Freeswitch (so I am taking the opportunity to use the latest snapshot) and that needed a lot of compilation tools to be reinstalled. (The eSata kernel was compiled using the SDHC card) and the complete process continued as per Freeswitch instructions. I have had problems with using the 'git' clone so I used the tarball instead. I also had to edit the '/etc/init.d/freeswitch' startup file. At present, Freeswitch is running though there may be an issue with stack size. However the configuration files (all '.xml') are still being converted from the old Freeswitch 1.0.7 version to the putative 1.0.8 version. 'diff' shows up file differences but the meanings of the changes are not always clear. Freeswitch is not yet serving my extensions nor yet registering with my external SIP providers. Just a matter of time to solve that.

The upshot, in my experience, is that if you want to boot from eSata, start with a fresh installation if you can! 
Logged

Tony Pemberton
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!