Seagate FreeAgent DockStar - Linux

Hardware info on main page.

Links

Install Debian Lenny on a DockStar, update uBoot on a DockStar,

Work log

2011-02-06: for reference, the uBoot commands that I am going to change:

debian:~# fw_printenv usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
debian:~# fw_printenv usb_init
usb_init=run usb_scan
debian:~#

that is all.

2011-02-06: Yes, it worked, we now have a new uBoot:

U-Boot 2010.09 (Oct 23 2010 - 11:49:22)
Marvell-Dockstar/Pogoplug by Jeff Doozan

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
Marvell>> version

U-Boot 2010.09 (Oct 23 2010 - 11:49:22)
Marvell-Dockstar/Pogoplug by Jeff Doozan
Marvell>>

Cool!

2011-02-06: now it is time to update uBoot. On the DockStar:

debian:~# cd /tmp
debian:/tmp#
wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
./install_uboot_mtd0.sh

Wow, that was quick - after the intial "ok" everything just flew along. Let's check a few things:

debian:/tmp# which nandwrite
/usr/sbin/nandwrite
debian:/tmp# which fw_printenv
/usr/sbin/fw_printenv

Good. and the rest:

debian:/tmp# fw_printenv
ethact=egiga0
bootdelay=3 
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3 
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootfstype=ext2
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
arcNumber=2097

Well, something has happened,

2011-02-06: first I created a usb stick for booting, by connecting the stick to my linux workstation:

sudo fdisk /dev/sdb

and created a large linux partition on it. Then make a filesystem:

sudo mkfs.ext3 /dev/sdb1

and mount it:

sudo mount /dev/sdb1 /mnt

then start populating it root filesystem

cd /mnt
sudo tar xvjf ~/doc/Seagate/DockStar/debian/base.tar.bz2

kernel

cd /mnt/boot
sudo rm -rf *
sudo wget http://sheeva.with-linux.com/sheeva/2.6.34.1/sheeva-2.6.34.1-uImage
sudo wget http://sheeva.with-linux.com/sheeva/2.6.34.1/sheeva-2.6.34.1-uImage.md5
tingo@kg-u35jc:/mnt/boot$ md5sum -c sheeva-2.6.34.1-uImage.md5
sheeva-2.6.34.1-uImage: OK
sudo ln -s sheeva-2.6.34.1-uImage uImage

modules

cd /mnt
sudo tar xvzf ~/doc/Seagate/DockStar/debian/sheeva-2.6.34.1-Modules.tar.gz
then unmount the usb key and plug it into your DockStar:
sudo umount /mnt

Now, on the DockStar, in the boot loader (CE>>), do this:

setenv arcNumber 2097
setenv mainlineLinux yes
setenv ipaddr 10.1.161.14
setenv serverip 10.1.161.15
setenv mtdparts 'orion_nand:0x100000@0x0(u-boot),0x400000@0x100000(uImage),0x2000000@0x500000(rootfs),0xDB00000@0x2500000(data)'
setenv tftpboot 'tftp 0x800000 uImage ; setenv bootargs $(console) root=/dev/sda1 rw rootdelay=5 $(mtdparts) ; bootm 0x800000'
setenv bootcmd 'run tftpboot'
CE>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done

Ok, now a reset to boot this thing

reset

will it work? Nope. and a boot also fails:

CE>> boot
Using egiga0 device
TFTP from server 10.1.161.15; our IP address is 10.1.161.14
Filename 'uImage'.
Load address: 0x800000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
*** ERROR: `eth1addr' not set

Abort

Ok, let's try to fix it:

CE>> setenv eth1addr 00:10:75:1A:24:35
CE>>
TFTP from server 10.1.161.15; our IP address is 10.1.161.14
Filename 'uImage'.
Load address: 0x800000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
Using egiga1 device
TFTP from server 10.1.161.15; our IP address is 10.1.161.14
Filename 'uImage'.
Load address: 0x800000
Loading: T T T T T T T T T T
Retry count exceeded; starting again

Abort

No, that didn't work either. I wonder what the problem is? It was user error:

CE>> printenv serverip
serverip=10.1.161.15
CE>> setenv serverip 10.1.161.5
CE>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
CE>>

Let's try now

CE>> boot
Using egiga0 device
TFTP from server 10.1.161.5; our IP address is 10.1.161.14
Filename 'uImage'.
Load address: 0x800000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################
done
Bytes transferred = 2746384 (29e810 hex)
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.34.1
   Created:      2010-07-20  21:19:26 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2746320 Bytes =  2.6 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.34.1 (kelly@speedy) (gcc version 4.4.3 (Sourcery G++ Lite er) ) #6 PREEMPT Tue Jul 20 15:19:20 MDT 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: 32512
Kernel command line: console=ttyS0,115200 root=/dev/sda1 rw rootdelay=5 orion_nand:0x100000@0x0(u-boot),0x400000@0x100000(uImage),0x2000000@0x500000(rootfs),0xDB00000@0x2500000(data)
PID hash table entries: 512 (order: -1, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 128MB = 128MB total
Memory: 123940k/123940k available, 7132k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xc8800000 - 0xfe800000   ( 864 MB)
    lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc002b000   ( 140 kB)
      .text : 0xc002b000 - 0xc04e4000   (4836 kB)
      .data : 0xc0506000 - 0xc05355a0   ( 190 kB)
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: Calling CRDA to update world regulatory domain
Switching to clocksource orion_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
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.
JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
JFS: nTxBlock = 968, nTxLock = 7746
msgmni has been set to 242
alg: No test for stdrng (krng)
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: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 40 at 0x000000500000
Bad eraseblock 87 at 0x000000ae0000
Bad eraseblock 167 at 0x0000014e0000
Bad eraseblock 186 at 0x000001740000
Bad eraseblock 340 at 0x000002a80000
Bad eraseblock 364 at 0x000002d80000
Bad eraseblock 389 at 0x0000030a0000
Bad eraseblock 458 at 0x000003940000
Bad eraseblock 548 at 0x000004480000
Bad eraseblock 561 at 0x000004620000
Bad eraseblock 566 at 0x0000046c0000
Bad eraseblock 578 at 0x000004840000
Bad eraseblock 595 at 0x000004a60000
Bad eraseblock 735 at 0x000005be0000
Bad eraseblock 788 at 0x000006280000
Bad eraseblock 802 at 0x000006440000
Bad eraseblock 806 at 0x0000064c0000
Bad eraseblock 868 at 0x000006c80000
Bad eraseblock 911 at 0x0000071e0000
Bad eraseblock 1028 at 0x000008080000
Bad eraseblock 1178 at 0x000009340000
Bad eraseblock 1359 at 0x00000a9e0000
Bad eraseblock 1523 at 0x00000be60000
Bad eraseblock 1707 at 0x00000d560000
Bad eraseblock 1778 at 0x00000de40000
Bad eraseblock 1779 at 0x00000de60000
Bad eraseblock 1866 at 0x00000e940000
Creating 3 MTD partitions on "orion_nand":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000500000 : "uImage"
0x000000500000-0x000010000000 : "root"
MV-643xx 10/100/1000 ethernet driver version 1.4
mv643xx_eth smi: probed
net eth0: port 0 with MAC address 00:10:75:1a:24:35
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
usb 1-1: new high speed USB device using orion-ehci and address 2
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
usb 1-1.3: new high speed USB device using orion-ehci and address 3
scsi0 : usb-storage 1-1.3:1.0
rtc-mv rtc-mv: internal RTC not ticking
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: using timer interrupt.
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
Waiting 5sec before mounting root device...
scsi 0:0:0:0: Direct-Access     Verbatim STORE N GO       3.00 PQ: 0 ANSI: 2
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] 7829504 512-byte logical blocks: (4.00 GB/3.73 GiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] Attached SCSI removable disk
kjournald starting.  Commit interval 5 seconds
EXT3-fs (sda1): using internal journal
EXT3-fs (sda1): mounted filesystem with writeback data mode
VFS: Mounted root (ext3 filesystem) on device 8:1.
Freeing init memory: 140K
INIT: version 2.86 booting
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev to be fully populated...done.
Setting the system clock.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Unable to set System Clock to: Thu Jan 1 00:00:12 UTC 1970 (warning).
Activating swap...done.
Setting the system clock.
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
Unable to set System Clock to: Thu Jan 1 00:00:15 UTC 1970 (warning).
Cleaning up ifupdown....
Loading kernel modules...done.
Assembling MD arrays...failed (failed to load MD subsystem).
Checking file systems...fsck 1.41.3 (12-Oct-2008)
done.
Setting kernel variables (/etc/sysctl.conf)...done.
Mounting local filesystems...done.
Activating swapfile swap...done.
Setting up networking....
Configuring network interfaces...done.
Starting portmap daemon....
Starting NFS common utilities: statd.
Setting console screen modes and fonts.
chown: failed to get attributes of `/var/log/dmesg': No such file or directory
chmod: failed to get attributes of `/var/log/dmesg': No such file or directory
INIT: Entering runlevel: 2
Starting enhanced syslogd: rsyslogd.
Starting OpenBSD Secure Shell server: sshd.
Starting MTA:eth0: link up, 100 Mb/s, full duplex, flow control disabled
 exim4.
Starting NFS common utilities: statd.
Not starting internet superserver: no services enabled.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: crond.

Debian GNU/Linux 5.0 debian ttyS0

debian login:

ok, so that did work. Nice!