Seagate Freeagent Dockstar

Aus DL8RDS Wiki
Version vom 2. Dezember 2012, 22:01 Uhr von Dl8rds (Diskussion | Beiträge)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

I am using a Seagate Freeagent Dockstar disk station as a fully fledged server at DB0ZM. Here are the pictures.

1 Pictures

Freeagent1.jpg

Freeagent2.jpg

2 Links

3 Procedure

3.1 Grabbing the serial port

First you need to connecto to the serial port. For this purpose you use an Arduino style level shifter with 3,3V which you connect to the pins 6, 4, 2:

 9  7  5  3  1 
10  8  6  4  2
      RX TX GND 3.3V!

Now do the following steps:

  • Connect the Freeagent to your DHCP router, but don't connect it to the internet! The Freeagent shall receive an IP address, but it shall not be able to phone home!
  • Start your terminal client (Linux: minicom), and don't forget to disable Hardware Flow Control in minicom!!

So when you now boot up the device, you'll get the following output in the terminal:

U-Boot 1.1.4 (Jul 16 2009 - 21:02:16) Cloud Engines (3.4.16)

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 00690D60

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 128MB 
DRAM Total size 128MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:256 MB

CPU : Marvell Feroceon (Rev 1)
CLOUD ENGINES BOARD: REDSTONE:1.0

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 

NAND read: device 0 offset 0x100000, size 0x300000

Reading data from 0x3ff800 -- 100% complete.
 3145728 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.22.18
   Created:      2009-08-31  23:31:05 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1976384 Bytes =  1.9 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK 

Starting kernel ... 

Uncompressing Linux............................................................................................................................ done, booting the kernel.
[    0.000000] Linux version 2.6.22.18 (bdietrich@brad-ux) (gcc version 4.2.1) #57 Mon Aug 31 16:31:01 PDT 2009
[    0.000000] CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr=00053177
[    0.000000] Machine: Feroceon-KW
[    0.000000] Using UBoot passing parameters structure
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] CPU0: D VIVT write-back cache
[    0.000000] CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
[    0.000000] CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
[    0.000000] Built 1 zonelists.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/mtdblock2 ro
[    0.000000] PID hash table entries: 512 (order: 9, 2048 bytes)
[    0.000000] Console: colour dummy device 80x30
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 128MB 0MB 0MB 0MB = 128MB total
[    0.000000] Memory: 125824KB available (3588K code, 252K data, 120K init)
[    0.240000] Mount-cache hash table entries: 512
[    0.240000] CPU: Testing write buffer coherency: ok
[    0.240000] NET: Registered protocol family 16
[    0.240000] 
[    0.240000] CPU Interface
[    0.240000] -------------
[    0.240000] SDRAM_CS0 ....base 00000000, size 128MB 
[    0.240000] SDRAM_CS1 ....disable
[    0.240000] SDRAM_CS2 ....disable
[    0.240000] SDRAM_CS3 ....disable
[    0.240000] PEX0_MEM ....base e8000000, size 128MB 
[    0.240000] PEX0_IO ....base f2000000, size   1MB 
[    0.240000] INTER_REGS ....base f1000000, size   1MB 
[    0.240000] NFLASH_CS ....base fa000000, size   2MB 
[    0.240000] SPI_CS ....base f4000000, size  16MB 
[    0.240000] BOOT_ROM_CS ....no such
[    0.240000] DEV_BOOTCS ....no such
[    0.240000] CRYPT_ENG ....base f0000000, size   2MB 
[    0.240000] 
[    0.240000]   Marvell Development Board (LSP Version KW_LSP_4.2.7_patch21_with_rx_desc_tuned)-- SHEEVA PLUG  Soc: 88F6281 A0 LE
[    0.240000] 
[    0.240000]  Detected Tclk 200000000 and SysClk 400000000 
[    0.240000] MV Buttons Device Load
[    0.240000] Marvell USB EHCI Host controller #0: c0537600
[    0.740000] PEX0 interface detected no Link.
[    0.740000] PCI: bus0: Fast back to back transfers enabled
[    0.740000] SCSI subsystem initialized
[    0.740000] usbcore: registered new interface driver usbfs
[    0.740000] usbcore: registered new interface driver hub
[    0.740000] usbcore: registered new device driver usb
[    0.740000] NET: Registered protocol family 2
[    0.750000] Time: kw_clocksource clocksource has been installed.
[    0.840000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.840000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.840000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.840000] TCP: Hash tables configured (established 4096 bind 4096)
[    0.840000] TCP reno registered
[    0.870000] RTC has been updated!!!
[    0.870000] RTC registered
[    0.870000] Use the XOR engines (acceleration) for enhancing the following functions:
[    0.870000]   o RAID 5 Xor calculation
[    0.870000]   o kernel memcpy
[    0.870000]   o kenrel memzero
[    0.870000] Number of XOR engines to use: 4
[    0.870000] cesadev_init(c00116b4)
[    0.870000] mvCesaInit: sessions=640, queue=64, pSram=f0000000
[    0.870000] MV Buttons Driver Load
[    0.870000] squashfs: version 3.3 (2007/10/31) Phillip Lougher
[    0.870000] squashfs: LZMA suppport for slax.org by jro
[    0.870000] JFFS2 version 2.2. (NAND) �Â�© 2001-2006 Red Hat, Inc.
[    0.870000] io scheduler noop registered
[    0.870000] io scheduler anticipatory registered (default)
[    0.890000] Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
[    0.890000] serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[    0.900000] serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
[    0.900000] RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
[    0.910000] Loading Marvell Ethernet Driver:
[    0.920000]   o Cached descriptors in DRAM
[    0.920000]   o DRAM SW cache-coherency
[    0.920000]   o Single RX Queue support - ETH_DEF_RXQ=0
[    0.930000]   o Single TX Queue support - ETH_DEF_TXQ=0
[    0.940000]   o TCP segmentation offload enabled
[    0.940000]   o Receive checksum offload enabled
[    0.940000]   o Transmit checksum offload enabled
[    0.950000]   o Network Fast Processing (Routing) supported
[    0.960000]   o Driver ERROR statistics enabled
[    0.960000]   o Driver INFO statistics enabled
[    0.960000]   o Proc tool API enabled
[    0.970000]   o Rx descripors: q0=128
[    0.970000]   o Tx descripors: q0=532
[    0.980000]   o Loading network interface(s):
[    0.980000]     o eth0, ifindex = 1, GbE port = 0
[    0.990000]     o eth1, ifindex = 2, GbE port = 1
[    0.990000] 
[    1.000000] mvFpRuleDb (c7ed5000): 1024 entries, 4096 bytes
[    1.000000] Intel(R) PRO/1000 Network Driver - version 7.3.20-k2-NAPI
[    1.010000] Copyright (c) 1999-2006 Intel Corporation.
[    1.010000] e100: Intel(R) PRO/100 Network Driver, 3.5.17-k4-NAPI
[    1.020000] e100: Copyright(c) 1999-2006 Intel Corporation
[    1.020000] 
[    1.020000] Warning Sata is Powered Off
[    1.030000] NFTL driver: nftlcore.c $Revision: 1.98 $, nftlmount.c $Revision: 1.41 $
[    1.040000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit)
[    1.050000] Scanning device for bad blocks
[    1.140000] Bad eraseblock 1825 at 0x0e420000
[    1.150000] Using static partition definition
[    1.160000] Creating 4 MTD partitions on "nand_mtd":
[    1.160000] 0x00000000-0x00100000 : "u-boot"
[    1.170000] 0x00100000-0x00500000 : "uImage"
[    1.170000] 0x00500000-0x02500000 : "root"
[    1.180000] 0x02500000-0x10000000 : "data"
[    1.180000] ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
[    1.190000] ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
[    1.230000] ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
[    1.250000] ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
[    1.250000] usb usb1: configuration #1 chosen from 1 choice
[    1.260000] hub 1-0:1.0: USB hub found
[    1.260000] hub 1-0:1.0: 1 port detected
[    1.380000] USB Universal Host Controller Interface driver v3.0
[    1.660000] usb 1-1: new high speed USB device using ehci_marvell and address 2
[    1.810000] usb 1-1: configuration #1 chosen from 1 choice
[    1.810000] hub 1-1:1.0: USB hub found
[    1.820000] hub 1-1:1.0: 4 ports detected
[    2.170000] usb 1-1.2: new high speed USB device using ehci_marvell and address 3
[    2.270000] usb 1-1.2: configuration #1 chosen from 1 choice
[    2.280000] usbcore: registered new interface driver usblp
[    2.280000] drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver
[    2.290000] Initializing USB Mass Storage driver...
[    2.300000] scsi0 : SCSI emulation for USB Mass Storage devices
[    2.300000] usbcore: registered new interface driver usb-storage
[    2.310000] USB Mass Storage support registered.
[    2.310000] mice: PS/2 mouse device common for all mice
[    2.320000] i2c /dev entries driver
[    2.320000] Linux telephony interface: v1.00
[    2.330000] md: linear personality registered for level -1
[    2.330000] md: raid0 personality registered for level 0
[    2.340000] md: raid1 personality registered for level 1
[    2.510000] raid6: int32x1     97 MB/s
[    2.680000] raid6: int32x2    114 MB/s
[    2.850000] raid6: int32x4    122 MB/s
[    3.020000] raid6: int32x8    110 MB/s
[    3.020000] raid6: using algorithm int32x4 (122 MB/s)
[    3.020000] md: raid6 personality registered for level 6
[    3.030000] md: raid5 personality registered for level 5
[    3.030000] md: raid4 personality registered for level 4
[    3.040000] raid5: measuring checksumming speed
[    3.090000]    arm4regs  :  1084.000 MB/sec
[    3.140000]    8regs     :   754.800 MB/sec
[    3.190000]    32regs    :   890.400 MB/sec
[    3.190000] raid5: using function: arm4regs (1084.000 MB/sec)
[    3.200000] device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
[    3.200000] dm_crypt using the OCF package.
[    3.210000] sdhci: Secure Digital Host Controller Interface driver
[    3.210000] sdhci: Copyright(c) Pierre Ossman
[    3.220000] usbcore: registered new interface driver usbhid
[    3.220000] drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
[    3.230000] TCP cubic registered
[    3.230000] NET: Registered protocol family 1
[    3.240000] NET: Registered protocol family 17
[    3.240000] md: Autodetecting RAID arrays.
[    3.250000] md: autorun ...
[    3.250000] md: ... autorun DONE.
[    7.870000] Empty flash at 0x00de8e44 ends at 0x00de9000
[    8.020000] VFS: Mounted root (jffs2 filesystem) readonly.
[    8.030000] Freeing init memory: 120K
[    8.050000] scsi 0:0:0:0: Direct-Access              USB DISK 2.0     PMAP PQ: 0 ANSI: 4
[    8.150000] sd 0:0:0:0: [sda] 31277056 512-byte hardware sectors (16014 MB)
[    8.160000] sd 0:0:0:0: [sda] Write Protect is off
[    8.160000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    8.210000] sd 0:0:0:0: [sda] 31277056 512-byte hardware sectors (16014 MB)
[    8.220000] sd 0:0:0:0: [sda] Write Protect is off
[    8.220000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    8.230000]  sda: sda1
[    8.240000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    8.240000] sd 0:0:0:0: Attached scsi generic sg0 type 0
init started: BusyBox v1.7.0 (2008-02-26 19:25:17 IST)
starting pid 285, tty : '/etc/init.d/rcS'
[   10.200000] eth0: link down
[   10.200000] eth0: started
udhcpc (v1.7.0) started
HWADDR 00 0x10 0x75 0x1a 0xc0 0x57
PIP0 192
PIP1 87
Sending discover...
[   11.860000] eth0: link up, full duplex, speed 100 Mbps
Sending discover...
Sending select for 192.168.178.24...
Lease of 192.168.178.24 obtained, lease time 864000
HWADDR 00 0x10 0x75 0x1a 0xc0 0x57
PIP0 192
PIP1 87
eth0      Link encap:Ethernet  HWaddr 00:10:75:1A:C0:57  
          inet addr:192.168.178.24  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:532 
          RX bytes:1240 (1.2 KiB)  TX bytes:1180 (1.1 KiB)
          Interrupt:11 

eth0:0    Link encap:Ethernet  HWaddr 00:10:75:1A:C0:57  
          inet addr:169.254.192.87  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:11 

starting pid 339, tty : '/bin/sh'
-sh-3.2# 

So my Freeagent has received the IP 192.168.178.24

3.2 Logging in through the network

You may also find out its address if you look at the router GUI or if you use

fping -g 192.168.0.0/24

So when you know the IP, you can now log into the Freeagent using

ssh root@(Freeagent-IP)
Passwd: stxadmin

If you have plugged in a USB stick, you may see it with mount:

-bash-3.2# mount 
 rootfs on / type rootfs (rw) 
 /dev/root on / type jffs2 (ro) 
 none on /proc type proc (rw) 
 none on /sys type sysfs (rw) 
 none on /dev/pts type devpts (rw) 
 none on /tmp type tmpfs (rw) 
 /tmp/.cemnt/sda1 on /tmp/.cemnt/mnt_sda1 type ext2 (rw,nosuid,nodev,noexec,noatime) 

sda1 is a hard drive. 'cd' into it and back up the NAND:

-bash-3.2# cd /tmp/.cemnt/mnt_sda1
-bash-3.2# mkdir Backup 
-bash-3.2# cd Backup 
-bash-3.2# dd if=/dev/mtd0 of=mtd0 
   2048+0 records in 2048+0 records out 
-bash-3.2# sha1sum mtd0 >mtd0.sha1
-bash-3.2# dd if=/dev/mtd1 of=mtd1 
   8192+0 records in 8192+0 records out 
-bash-3.2# sha1sum mtd1 >mtd1.sha1 
-bash-3.2# dd if=/dev/mtd2 of=mtd2 
   65536+0 records in 65536+0 records out 
-bash-3.2# sha1sum mtd2 >mtd2.sha1 
-bash-3.2# dd if=/dev/mtd3 of=mtd3 
   448512+0 records in 448512+0 records out 
-bash-3.2# sha1sum mtd3 >mtd3.sha1 

3.3 Resume control

Now we want to resume control and make sure that the Pogoplug software won't call home.

-bash-3.2# killall hbwd                      #stop the Pogoplug binary
-bash-3.2# mount -o remount,rw /             #remount writeable
-bash-3.2# chmod go+w /dev/null              #fix a bug

Disable the pogoplug code to come up again when the system starts up the next time:

-bash-3.2# vi /etc/init.d/rcS 

Now go to the line that says

/etc/init.d/hbmgr.sh start

and disable it by writing a "#" in front.

Now you can reboot with

-bash-3.2# mount -o remount,ro / 
-bash-3.2# /sbin/halt 

3.4 Prepare the installation

The method with Jeff Doozan's script did not work for me because the repository seemed corrupted. The steps were taken from there: http://www.mikrocontroller.net/articles/DockstarDebianSqueeze#Debian_installieren

So I tried the TFTP method: http://www.plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash#Run_the_Debian_Installer

First you need to install atftpd: http://www.ubuntugeek.com/howto-setup-advanced-tftp-server-in-ubuntu.html

Note that the default tftp-directory is /srv/tftp

Then follow the advice given there: http://www.plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash#Fetch_the_bits and get the following files:

3.4.1 U-Boot Images

DENX U-Boot is recommended over the old, buggy Marvell version. Instructions re. upgrading are below.

3.4.2 Debian Installer

The latest installer images should be available at:

http://d-i.debian.org/daily-images/armel/daily/kirkwood/netboot/marvell/sheevaplug/

however, if the automated build fails, the above may not exist; in which case look for the last successful build in

http://d-i.debian.org/daily-images/armel/

For example, if at the time of writing (2011-06-02) the current build was missing, the last successful image could be:

http://d-i.debian.org/daily-images/armel/20110527-16:34/kirkwood/netboot/marvell/sheevaplug/

The above are the daily images, used for testing; if you prefer, you can find the latest stable images here:

ftp://ftp.debian.org/debian/dists/stable/main/installer-armel/current/images/kirkwood/netboot/marvell/sheevaplug/

You want both the uImage and uInitrd files. Into the TFTP directory they go.

3.4.3 Kernel

http://sheeva.with-linux.com/sheeva/ - what more is there to say? Oh, except that you probably want the latest, and you definitely want the sheeva-2.6.XX-uImage and sheeva-2.6.XX-Modules.tar.gz files. The config file might be good too, if you want to see what kernel config you're running with. Put 'em all in the TFTP directory.

3.5 Updating U-Boot

Follow the instructions given here: http://www.cyrius.com/debian/kirkwood/sheevaplug/uboot-upgrade.html

In order to do this, you need to get the TFTP server working on your desktop machine. Then get the u-boot image from: http://people.debian.org/~tbm/u-boot/2011.03-6/dockstar/u-boot.kwb

Then in the serial console enter these commands:

setenv serverip 192.168.1.2 # IP of your TFTP server
setenv ipaddr 192.168.1.200
tftpboot 0x0800000 u-boot.kwb
nand erase 0x0 0x60000
nand write 0x0800000 0x0 0x60000

then reboot with

resume. 

AND DO NOT UNPLUG POWER!!!!!!!!!!!!

The bootup should look line this:

Marvell>> reset
resetting ...


U-Boot 2011.03 (Apr 26 2011 - 21:19:56)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
NAND:  256 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0 
DockStar> version

U-Boot 2011.03 (Apr 26 2011 - 21:19:56)
Seagate FreeAgent DockStar
gcc (Debian 4.5.2-8) 4.5.2
GNU ld (GNU Binutils for Debian) 2.21.0.20110327
DockStar> printenv 
baudrate=115200
bootargs_root=ubi.mtd=1 root=ubi0:root rootfstype=ubifs ro
bootcmd=setenv bootargs ${console} ${mtdparts} ${bootargs_root}; ubi part root; ubifsmount root; ubifsload 0x800000 ${kernel}; ubifsload 0x1100000 ${initrd}; bootm 0x800000 0x110000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=02:50:43:ea:fa:25
initrd=/boot/uInitrd
kernel=/boot/uImage
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1m(uboot),-(root)
stderr=serial
stdin=serial
stdout=serial

Environment size: 521/131068 bytes
DockStar>

3.6 Do the installation

You need to do these steps over the serial console:

setenv ipaddr 192.168.178.24
setenv serverip 192.168.178.52
tftpboot 0x2000000 uImage
tftpboot 0x0800000 uInitrd
setenv bootargs console=ttyS0,115200 base-installer/initramfs-tools/driver-policy=most
bootm 0x2000000 0x0800000

This gets the installer and starts it with a reboot. Then go through all the steps as guided.

  • Note the installation will take A VERY LONG TIME!!!
  • Note, the installation will require some interaction!

3.6.1 Important Hints

When prompted, set the following:

  • Partitioning: Use the entire disk (default setting). This will make it easier to write the image to the NAND, if you wish so. Yet, it will be hard, especially if your image is very big.

3.7 Burn the kernel image

Now a kernel is missing. First check the environment because the variables, especially the mtd partitioning is highly important now. This is how it should be! (works for me)

baudrate=115200
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0xa0000@0x0(u-boot),0x400000@0x100000(uImage) root=/dev/sda2 rootwait rw
bootargs_root=ubi.mtd=1 root=ubi0:root rootfstype=ubifs ro
bootcmd=nand read 0x100000 uImage; bootm 0x100000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=02:50:43:5d:f2:96
fileaddr=2000000
filesize=2BB6E4
initrd=/boot/uInitrd
ipaddr=192.168.178.24
kernel=/boot/uImage
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtddevname=u-boot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage)
partition=nand0,0
serverip=192.168.178.52
stderr=serial
stdin=serial
stdout=serial

The command mtdparts says this:

DockStar> mtdparts 

device nand0 <orion_nand>, # parts = 2
 #: name                size            offset          mask_flags
 0: u-boot              0x00100000      0x00000000      0
 1: uImage              0x00400000      0x00100000      0

active partition: nand0,0 - (u-boot) 0x00100000 @ 0x00000000

defaults:
mtdids  : none
mtdparts: none
DockStar>

Please note that the uImage partition should have this name and it should be 4M in size. This is important in order to make the booting possible! If the u-boot comes up with weird errors, check the partitioning! I hit the scenario when the uBoot would forget the kernel I burned before or tell me that it didn't have the correct CRC number.

Now it's necessary to provide the kernel in the tftp directory and load it via tftp:

setenv ipaddr 192.168.178.24
setenv serverip 192.168.178.52
tftpboot 0x800000 uImage

Here's my command:

DockStar> tftpboot 0x2000000 sheeva-3.0.9-uImage
Using egiga0 device
TFTP from server 192.168.178.52; our IP address is 192.168.178.24
Filename 'uImage'.
Load address: 0x800000
Loading: #################################################################
         #################################################################
         #################################################################
         #
done
Bytes transferred = 2864868 (2bb6e4 hex)
DockStar>
nand erase 0x100000 0x400000

flatten everything at 0x100000!

nand write 0x2000000 0x100000 0x400000

read from 0x2000000, write 0x400000 bytes to the address 0x100000

setenv bootargs 'console=ttyS0,115200 mtdparts=nand_mtd:0xa0000@0x0(u-boot),0x400000@0x100000(uImage) root=/dev/sda2 rootwait rw'
setenv bootcmd 'nand read 0x100000 uImage; bootm 0x100000'
setenv bootargs_root 'ubi.mtd=1 root=ubi0:root rootfstype=ubifs ro'
saveenv

That should be it.

Now you also need the modules, but not during the kernel boot process, but later when the system starts. As soon as you can log into your Freeagent installation, copy them over to the Freeagent and unpack them to /lib/modules:

dockstar $ tar xvfz sheeva-3.0.9-Modules.tar.gz -C /
  • Note: If you chose the most recent kernel that comes with the most recent installer, this step is not necessary, because the most recent kernel's modules come with the installer.
  • Note: The kernel may be updated from within the running system when you install the initramfs-tools

Please note that the memory sections in my example differ from that of other instructions you find around the web. I got a memory error and some weird system behaviour with these examples. So I decided to use some other memory segment at around 0x2000000. There's enough memory around, the NAND has 256MB. Since I don't intend to squeeze the rootfs into RAM first of all, there's plenty of space.

3.8 Write the image to the FLASH

My image is 622 MB, so it won't fit into the NAND.

If you manage to shrink the image to below 256M (which is the NAND size), you will be successful!

Follow the instructions here: http://www.plugcomputer.org/plugwiki/index.php/Installing_Debian_To_Flash#Convert_internal_flash_root_partition_to_UBIFS

3.9 Configure Debian

This comes from here: http://www.mikrocontroller.net/articles/DockstarDebianSqueeze

You surely want wo install the following tools:

  • apt-get install ntpdate
Set the system time:
dockstar $ ntpdate ntp1.ptb.de
  • apt-get install busybox-syslogd
  • apt-get install usbmount
  • apt-get install cron
Add a few lines to crontab:
dockstar $ crontab -e
*/30 * * * * /usr/sbin/ntpdate ntp1.ptb.de >> /var/log/ntpdate.log 2>&1
@reboot /usr/sbin/openntpd -s
  • WARNING: DO NOT INSTALL usbmount! It will mount the USB memory stick before the fsck and this will break your boot process, requiring manual interaction. Without a serial console, you're locked out!