User Tools

Site Tools


toh:iomega:iconnect

Iomega iConnect

Supported Versions

Version/Model S/N OpenWrt Version Supported Model Specific Notes
All - Attitude Adjustment 12.09 -

Highlights

CPU Ram Flash Network USB Serial JTag
Marvell 6281 Kirkwood@1000MHz 256 MiB DDR2 512 MiB 1 gigE 4x 2.0 Yes Yes

Hardware Specification

Part Name Description Product Page Documentation
CPU Marvell 88F6281 Feroceon 88FR131 revision 1 (ARMv5TE) Link Product Brief Hardware Spec Functional Spec
RAM 2x Hynix H5PS1G83EFR 128 MB Link Datasheet
Flash Hynix HY27UF084G2B 512 MB Link Datasheet
USB Hub Alcor AU6256 4x USB 2.0 Link
LAN Marvell Alaska 88E1116R-NNC1 1x Gigabit RJ45 Link Product Brief Technical Product Brief
WiFi SparkLAN WPER-116GN b/g/n, 150Mbps, Mini PCIE, Ralink RT3090, 1T1R Link Datasheet Drivers

Serial, JTAG and USB pinouts


Picture 1. iConnect board with pin outs description.

Serial port
Pins on board:
1 - VCC (in white rectangle)
2 - TX (connect here cable RX line)
3 - GND
4 - RX (connect here cable TX line

JTAG
Is standard ARM 20 pinout.
First pin is in white rectangle, just next to connector name J2.

USB
USB hub sockets numeration starts from one on the back (1) then on the front from status led (2). This may be important when you connect USB storage.
If many devices are connected at once then they will be mounted according to numeration of port.

Flash Layout

OpenWrt FlashLayout
mtd# mtd0 mtd0 mtd1 mtd2 mtd3
Start 0x00000 0x080000 0x100000 0x0400000 0x02400000
End 0x80000 0x100000 0x400000 0x2400000 0x20000000
Size 0x80000 0x20000 0x300000 0x2000000 0x17600000
Size MiB 800KB 200KB 4 32 473
Name U-Boot U-Boot env uImage (kernel) rootfs data
File system none none none JFFS2

Installation of OpenWRT from Trunk

This tutorial assumes that you are using Windows 7 OS. You will need:
PuTTY
WinSCP
tftpd
Files from Trunk

:!: Correctly if you want to use UBIFS you need to compile your own images.
Make sure that you enable "Include kernel in root filesystem" and "Include DTB in root filesystem" which you can find under "Target Images" in menuconfig.

1. Connect Serial Cable

Using description above connect serial cable to board and establish connection with serial console using PuTTY.

2. Connecting LAN

Connect LAN cable between your computer and iConnect.

Set computer IP to 192.168.1.5

Go to Start → Control Panel → Network and Sharing Center → Local Area connection → Properties → Internet Protocol Version 4(TCP/IPv4)

Choose "Use the following IP address" and set:

IP address: 192.168.1.5
Subnet mask: 255.255.255.0

Confirm by clicking OK.

3. Tftp server configuration

Extract zip to c:\tftpd, create folder c:\tftpd\files.

Download from trunk repository or final version if available:

openwrt-kirkwood-uImage
openwrt-kirkwood--jffs2-128k.img
openwrt-kirkwood-iconnect-u-boot.kwb
and copy them to c:\tftpd\files.

Run tftpd, click "Settings" button, choose TFTP tab and set "Base Directory" to c:\tftpd\files, click OK button.

Check if "Server interface" is 192.168.1.5, if not choose it from the list.

4. Updating U-Boot

!!! This is risky operation which can brick your iConnect. !!!
Please first skip to next point and continue with you current U-Boot.
If you will be having problems with running OpenWRT then come back here.

Even when you brick it, you may use JTAG connector to bring it live.

4.1 Backup your env settings

Power up iConnect and watch serial console output. When you notice:

Hit any key to stop autoboot:  0
press enter. Then type:
printenv
you will see all env variables, copy it and save to text file it will be needed later.

4.2 Flashing new U-Boot

Set tftp server and iConnect IP addresses.

setenv serverip 192.168.1.5
setenv ipaddr 192.168.1.200

Flash new U-Boot

mw 0x0800000 0xffff 0x100000 
tftp 0x0800000 openwrt-kirkwood-iconnect-u-boot.kwb
nand erase 0x0 0x100000
nand write 0x0800000 0x0 0x100000

Result should be similar to this:

iconnect => setenv serverip 192.168.1.5
iconnect => setenv ipaddr 192.168.1.200
iconnect => mw 0x0800000 0xffff 0x100000
iconnect => tftp 0x0800000 openwrt-kirkwood-iconnect-u-boot.kwb
Using egiga0 device
TFTP from server 192.168.1.5; our IP address is 192.168.1.200
Filename 'openwrt-kirkwood-iconnect-u-boot.kwb'.
Load address: 0x800000
Loading: ############################
done
Bytes transferred = 401136 (61ef0 hex)

iconnect => nand erase 0x0 0x100000

NAND erase: device 0 offset 0x0, size 0x100000
Erasing at 0xe0000 -- 100% complete.
OK

iconnect => nand write 0x0800000 0x0 0x100000

NAND write: device 0 offset 0x0, size 0x100000
 1048576 bytes written: OK

If there were no errors then type reset.

reset

If your iConnect does not bring up (blue diode don't blink), something went wrong and it is bricked. Don't be scary there is a way to bring it up, you must use JTAG connector, see article Flashing U-Boot with JTAG.

5. Default U-Boot configuration

To prevent any problems caused by old environment configuration it is best to reset them to default values.

Here is a default configuration of first run U-Boot.

iconnect => printenv
baudrate=115200
bootargs_root=noinitrd ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs
bootcmd=setenv bootargs ${console} ${mtdparts} ${bootargs_root}; ubi part rootfs; ubifsmount rootfs; ubifsload 0x800000 ${kernel}; bootm 0x800000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
kernel=/boot/uImage
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x80000@0x0(uboot),0x20000@0x80000(uboot_env),-@0xa0000(rootfs)
stderr=serial
stdin=serial
stdout=serial

Environment size: 487/131068 bytes

There are three ways to do that.

5.1 Remove unwanted env (safe way)

To remove env variables use:

setenv env_name ''

reapeat for each variable to remove.

5.2 Reset bootenv (safe)

env default -a
saveenv

5.3 Erase flash where env is stored (little bit risky)

To force U-Boot to recreate whole env with basic configuration you may erase this part of flash memory. It can be risky if env storage location is changed with future version and you erase part of U-Boot.

Execute:

nand erase 0x80000 0x100000
reset

After reset you will get two errors:

*** Warning - bad CRC, using default environment
Warning: failed to set MAC address
To fix it you must restore MAC address (search for ethaddr in your backup file) and save env values:
setenv ethaddr '00:D0:##:##:##:##'
saveenv
reset

After restart you shouldn't see any errors.

6. Flash OpenWRT with fresh U-Boot

6.1 Setting up environment

Find in your backup file MAC address, variable ethaddr.

Now add MAC, set server IP to 1.5, and iConnect IP to 1.200, save and restart:

setenv ethaddr '00:D0:##:##:##:##'
setenv serverip '192.168.1.5' 
setenv ipaddr '192.168.1.200'
saveenv
reset

:!: Please refer to section 6.4 if you want to use ubifs (recommended)

Set boot parameters:

setenv machid 'B36'
setenv arcNumber '2870'
setenv loadaddr '0x6400000'
setenv console 'console=ttyS0,115200 panic=20'
setenv bootargs_root 'root=/dev/mtdblock2 rootfstype=jffs2'

Add scripts which will make flashing easy:

setenv kernel_name 'openwrt-kirkwood-uImage'
setenv rootfs_name 'openwrt-kirkwood--jffs2-128k.img'

setenv download_kernel 'mw $(loadaddr) 0xffff 0x300000; tftp $(loadaddr) $(kernel_name);'
setenv flash_kernel 'nand erase 0x100000 0x400000; nand write.e $(loadaddr) 0x100000 0x400000;'

setenv download_rootfs 'mw $(loadaddr) 0xffff 0x200000; tftp $(loadaddr) $(rootfs_name);'
setenv flash_rootfs 'nand erase 0x500000 0xfb00000; nand write.e $(loadaddr) 0x500000 0x200000;'

setenv load_openwrt 'setenv bootargs $(console) $(bootargs_root); nand read $(loadaddr) 0x100000 0x400000; bootm $(loadaddr)'
setenv bootcmd 'run load_openwrt'
saveenv

6.3 Flashing images (jffs2)

Flash images by executing:

run download_kernel
run flash_kernel
run download_rootfs
run flash_rootfs
reset

Results:

iconnect => run download_kernel
Using egiga0 device
TFTP from server 192.168.1.5; our IP address is 192.168.1.200
Filename 'openwrt-kirkwood-uImage'.
Load address: 0x6400000
Loading: #################################################################
         ######################
done
Bytes transferred = 1264864 (134ce0 hex)

iconnect => run flash_kernel

NAND erase: device 0 offset 0x100000, size 0x400000
Erasing at 0x4e0000 -- 100% complete.
OK

NAND write: device 0 offset 0x100000, size 0x400000
 4194304 bytes written: OK

connect => run download_rootfs
Using egiga0 device
TFTP from server 192.168.1.5; our IP address is 192.168.1.200
Filename 'openwrt-kirkwood--jffs2-128k.img'.
Load address: 0x6400000
Loading: #################################################################
         ##################################
done
Bytes transferred = 1443840 (160800 hex)

iconnect => run flash_rootfs

NAND erase: device 0 offset 0x500000, size 0xfb00000
Skipping bad block at  0x0b5a0000
Skipping bad block at  0x0b5e0000
Skipping bad block at  0x0b620000
Erasing at 0xffe0000 -- 100% complete.
OK

NAND write: device 0 offset 0x500000, size 0x200000
 2097152 bytes written: OK

reset

6.4 Flashing images (ubifs)

It's important that you reset u-boot before flashing otherwise it will most likely fail to boot.

nand erase 0x200000 0x1fe00000
ubi part root ; ubi remove rootfs ; ubi create rootfs
tftpboot 0x800000 openwrt-kirkwood-iconnect-rootfs.ubifs ; ubi write 0x800000 rootfs ${filesize} ; reset

6.5 First boot (jffs2)

This is a bootlog from first start of OpenWRT:

U-Boot 2012.10 (Feb 12 2013 - 18:24:56) Iomega iConnect

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x100000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 06400000 ...
   Image Name:   Linux-3.3.8
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1264640 Bytes = 1.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK
Using machid 0xb36 from environment

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0
[    0.000000] Linux version 3.3.8 (openwrt@OpenWRTBuild) (gcc version 4.6.4 20121210 (prerelease) (Linaro GCC 4.6-2012.12) ) #1 Wed Jan 30 08:21:48 MST 2013
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Iomega iConnect Wireless

/* A lot of other lines */

[   14.512806] NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit)
[   14.521316] Scanning device for bad blocks
[   14.633823] Bad eraseblock 1453 at 0x00000b5a0000
[   14.638673] Bad eraseblock 1455 at 0x00000b5e0000
[   14.643509] Bad eraseblock 1457 at 0x00000b620000
[   14.768850] Bad eraseblock 3075 at 0x000018060000
[   14.773689] Bad eraseblock 3077 at 0x0000180a0000
[   14.854509] Creating 4 MTD partitions on "orion_nand":
[   14.859696] 0x000000000000-0x000000100000 : "u-boot"
[   14.865801] 0x000000100000-0x000000400000 : "uImage"
[   14.871789] 0x000000400000-0x000002400000 : "rootfs"
[   14.877811] 0x000002400000-0x000020000000 : "data"

/* A lot of other lines */

[   16.409415] jffs2_scan_eraseblock(): End of filesystem marker found at 0x260000
[   16.416814] jffs2_build_filesystem(): unlocking the mtd device... done.
[   16.423471] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[   22.954602] JFFS2 notice: (1) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   22.974126] VFS: Mounted root (jffs2 filesystem) on device 31:2.
[   22.980637] Freeing init memory: 124K
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
- init -

Please press Enter to activate this console. 

[Enter]

BusyBox v1.19.4 (2013-02-12 18:25:46 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r35572)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/#

We have working OpenWRT.

6.6 First boot (ubifs)

This is a bootlog from first start of OpenWRT:

U-Boot 2014.04 (Jun 23 2014 - 12:47:24) Iomega iConnect

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  512 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Hit any key to stop autoboot:  0
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI: attached mtd1 to ubi0
UBI: MTD device name:            "mtd=3"
UBI: MTD device size:            510 MiB
UBI: number of good PEBs:        4080
UBI: number of bad PEBs:         0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 4080
UBI: number of PEBs reserved for bad PEB handling: 40
UBI: max/mean erase counter: 4/1
UBIFS: mounted UBI device 0, volume 0, name "rootfs"
UBIFS: mounted read-only
UBIFS: file system size:   519321600 bytes (507150 KiB, 495 MiB, 4025 LEBs)
UBIFS: journal size:       9033728 bytes (8822 KiB, 8 MiB, 71 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: LZO
UBIFS: reserved for root:  0 bytes (0 KiB)
Loading file '/boot/zImage' to addr 0x00800000 with size 1535068 (0x00176c5c)...
Done
Loading file '/boot/iconnect.dtb' to addr 0x00700000 with size 8674 (0x000021e2)...
Done
Unmounting UBIFS volume rootfs!
Kernel image @ 0x800000 [ 0x000000 - 0x176c58 ]
## Flattened Device Tree blob at 00700000
   Booting using the fdt blob at 0x700000
   reserving fdt memory region: addr=700000 size=3000
   Loading Device Tree to 0fb13000, end 0fb18fff ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.10.36 (root@devbox) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r41029) ) #3 Mon Jun 23 15:37:45 CEST 2014
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=00053977
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine: Marvell Kirkwood (Flattened Device Tree), model: Iomega Iconnect
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(root) ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 256MB = 256MB total
[    0.000000] Memory: 252296k/252296k available, 9848k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff000000   ( 744 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc03e2d64   (3948 kB)
[    0.000000]       .init : 0xc03e3000 - 0xc040427c   ( 133 kB)
[    0.000000]       .data : 0xc0406000 - 0xc042a69c   ( 146 kB)
[    0.000000]        .bss : 0xc042a69c - 0xc045676c   ( 177 kB)
[    0.000000] NR_IRQS:114
[    0.000000] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474ms
[   12.340147] Calibrating delay loop... 990.41 BogoMIPS (lpj=4952064)
[   12.380122] pid_max: default: 32768 minimum: 301
[   12.380256] Mount-cache hash table entries: 512
[   12.382629] CPU: Testing write buffer coherency: ok
[   12.383014] Setting up static identity map for 0xc0010390 - 0xc00103cc
[   12.384671] pinctrl core: initialized pinctrl subsystem
[   12.385733] regulator-dummy: no parameters
[   12.386266] NET: Registered protocol family 16
[   12.386728] DMA: preallocated 256 KiB pool for atomic coherent allocations
[   12.389621] Kirkwood: MV88F6281-A0, TCLK=200000000.
[   12.389645] Feroceon L2: Enabling L2
[   12.389690] Feroceon L2: Cache support initialised.
[   12.402763] bio: create slab <bio-0> at 0
[   12.403299] mvebu-pcie pcie-controller.1: PCIe0.0: link down
[   12.403552] mvebu-pcie pcie-controller.1: PCI host bridge to bus 0000:00
[   12.403573] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[   12.403587] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xe7ffffff]
[   12.403601] pci_bus 0000:00: root bus resource [bus 00-ff]
[   12.403912] PCI: bus0: Fast back to back transfers disabled
[   12.403931] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[   12.404152] PCI: bus1: Fast back to back transfers enabled
[   12.404214] pci 0000:00:01.0: PCI bridge to [bus 01]
[   12.404235] PCI: enabling device 0000:00:01.0 (0140 -> 0143)
[   12.405353] SCSI subsystem initialized
[   12.406095] usbcore: registered new interface driver usbfs
[   12.406262] usbcore: registered new interface driver hub
[   12.406463] usbcore: registered new device driver usb
[   12.408047] Switching to clocksource orion_clocksource
[   12.410025] NET: Registered protocol family 2
[   12.410536] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[   12.410603] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[   12.410639] TCP: Hash tables configured (established 2048 bind 2048)
[   12.410703] TCP: reno registered
[   12.410717] UDP hash table entries: 256 (order: 0, 4096 bytes)
[   12.410747] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[   12.410946] NET: Registered protocol family 1
[   12.411198] Unpacking initramfs...
[   12.411213] Initramfs unpacking failed: junk in compressed archive
[   12.421530] Freeing initrd memory: 3068K (c4501000 - c4800000)
[   12.423119] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[   12.423136] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[   12.423383] msgmni has been set to 498
[   12.423790] io scheduler noop registered
[   12.423802] io scheduler deadline registered (default)
[   12.424790] kirkwood-pinctrl f1010000.pinctrl: registered pinctrl driver
[   12.506810] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   12.508327] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
[   12.934469] console [ttyS0] enabled
[   12.940258] NAND device: Manufacturer ID: 0xad, Chip ID: 0xdc (Hynix NAND 512MiB 3,3V 8-bit), 512MiB, page size: 2048, OOB size: 64
[   12.952181] Scanning device for bad blocks
[   13.262706] 4 cmdlinepart partitions found on MTD device orion_nand
[   13.269012] Creating 4 MTD partitions on "orion_nand":
[   13.274175] 0x000000000000-0x0000000e0000 : "uboot"
[   13.280185] 0x0000000e0000-0x000000100000 : "uboot_env"
[   13.286452] 0x000000100000-0x000000200000 : "second_stage_uboot"
[   13.293478] 0x000000200000-0x000020000000 : "root"
[   13.300542] libphy: orion_mdio_bus: probed
[   13.305424] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   13.313588] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:d0:b8:0d:99:d3
[   13.322527] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   13.329106] ehci-pci: EHCI PCI platform driver
[   13.333733] ehci-platform: EHCI generic platform driver
[   13.339198] ehci-orion: EHCI orion driver
[   13.343328] orion-ehci f1050000.ehci: EHCI Host Controller
[   13.348887] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   13.356689] orion-ehci f1050000.ehci: irq 19, io mem 0xf1050000
[   13.378089] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   13.384810] hub 1-0:1.0: USB hub found
[   13.388622] hub 1-0:1.0: 1 port detected
[   13.393209] usbcore: registered new interface driver usb-storage
[   13.399747] cpuidle: using governor ladder
[   13.404642] leds-gpio gpio-leds.2: pins are not configured from the driver
[   13.413818] TCP: cubic registered
[   13.417153] NET: Registered protocol family 17
[   13.421902] 8021q: 802.1Q VLAN Support v1.8
[   13.427255] regulator-dummy: disabling
[   13.431526] UBI: attaching mtd3 to ubi0
[   13.708290] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   13.898279] hub 1-1:1.0: USB hub found
[   13.902335] hub 1-1:1.0: 4 ports detected
[   14.246031] UBI: scanning is finished
[   14.264588] UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 40, need 80
[   14.276801] UBI: attached mtd3 (name "root", size 510 MiB) to ubi0
[   14.283046] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[   14.289880] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[   14.296520] UBI: VID header offset: 512 (aligned 512), data offset: 2048
[   14.303263] UBI: good PEBs: 4080, bad PEBs: 0, corrupted PEBs: 0
[   14.309314] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
[   14.316481] UBI: max/mean erase counter: 4/1, WL threshold: 4096, image sequence number: 0
[   14.324805] UBI: available PEBs: 0, total reserved PEBs: 4080, PEBs reserved for bad PEB handling: 40
[   14.334085] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[   14.341108] UBI: background thread "ubi_bgt0d" started, PID 748
[   14.377820] UBIFS: background thread "ubifs_bgt0_0" started, PID 750
[   14.410442] UBIFS: start fixing up free space
[   17.118001] UBIFS: free space fixup complete
[   17.179311] UBIFS: mounted UBI device 0, volume 0, name "rootfs"
[   17.185355] UBIFS: LEB size: 129024 bytes (126 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   17.194560] UBIFS: FS size: 519321600 bytes (495 MiB, 4025 LEBs), journal size 9033728 bytes (8 MiB, 71 LEBs)
[   17.204531] UBIFS: reserved for root: 0 bytes (0 KiB)
[   17.209622] UBIFS: media format: w4/r0 (latest is w4/r0), UUID 776A9DD4-F13A-4884-ACFA-A71ECCBAAC6E, small LPT model
[   17.269677] VFS: Mounted root (ubifs filesystem) on device 0:10.
[   17.276181] Freeing unused kernel memory: 132K (c03e3000 - c0404000)
procd: Console is alive
[   17.737666] Button Hotplug driver version 0.4.1
procd: - preinit -
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
mounting /dev/root
procd: - early -
procd: - ubus -
procd: - init -
Please press Enter to activate this console.
[   25.216079] NET: Registered protocol family 10
[   25.266254] RPC: Registered named UNIX socket transport module.
[   25.272250] RPC: Registered udp transport module.
[   25.276978] RPC: Registered tcp transport module.
[   25.281719] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   25.361168] tun: Universal TUN/TAP device driver, 1.6
[   25.366246] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   25.434358] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   25.456325] nf_conntrack version 0.5.0 (3992 buckets, 15968 max)
[   25.468764] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   25.504973] hidraw: raw HID events driver (C) Jiri Kosina
[   25.516603] ip_tables: (C) 2000-2006 Netfilter Core Team
[   25.540339] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[   25.558819] usbcore: registered new interface driver usbhid
[   25.564424] usbhid: USB HID core driver
[   25.580701] xt_time: kernel timezone is -0000
[   28.151391] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
procd: - init complete -
[   30.401641] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   30.411873] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready



BusyBox v1.22.1 (2014-06-23 01:37:36 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r41029)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/#

7. Accessing iConnect with SSH

To activate SSH you must first login with telnet.

In PuTTY set:

IP: 192.168.1.1
Port: 23
Connection type: Telnet

when logged in type:

passwd root

Changing password for root
New password:
Retype password:
Password for root changed by root

Telnet access will be disabled, SsH will be enabled.

8. Setting up Internet access

By default in OpenWRT network address is set to static 192.168.1.1 which may cause conflicts if you have router with the same address. We can change it.

Using WinSCP (or vi) open file /etc/config/network

If you want to keep it static just change ipaddr value.

If you want to use DHCP in local network set it to:

config interface 'lan'
        option ifname 'eth0'
        option proto 'dhcp'

If you want to use Internet connection from your provider change it to:

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'
        #option macaddr '00:30:##:##:##:##' #Optional

WAN or LAN names make different from firewall point of view.

Save it and reset iConnect.

More about network configuration: Network Wiki

9. Setting up the Wireless Adapter access

To install the RT3090 driver you need to install the kmod-rt2800-pci package:

opkg update
opkg install kmod-rt2800-pci
opkg install iw

Then you should see the options to enable the wireless adapter in luci.

Flashing U-Boot with JTAG (unbricking bootloader)

1. Introduction

This tutorial will show how to flash U-Boot on Iomega iConnect using JTAG.
It is based on my own experience as I broke U-Boot by improper flashing using serial cable and tftp server.

You might found already one tutorial here http://hardsoftmix.blogspot.com/2011/07/jtag-on-iconnect.html, it is written for OpenOCD 0.40 and works fine if you will use this version and your JTAG interface is working with it like Amontec JTAGkey-Tiny.

Since I bought my own JTAG interface JTAG-lock-pick Tiny 2, which support is included since OpenOCD 0.61 and this version has some changes in command names which makes it incompatible with old scripts, I decided to write my own tutorial. Additionally I will use OpenOCD on Windows.

2. Hardware and software used

Serial Interface based on board PL-2303 which originally was an USB cable for some old Nokia phone.

JTAG interface used:
- JTAG-lock-pick Tiny 2 (manual, drivers, eeprom) - based on latest high speed version of FT232HL chip, works with OpenOCD 0.61 and higher
- Amontec JTAGkey-Tiny - based on FT2232L, works with OpenOCD 0.40 and higher
- ZL30PRG (copy of ST-Link v1) - works with OpenOCD 0.61 and higher but only with ST ARMs so it is useless for iConnect (checked)
- see also supported hardware list on OpenOCD page

Software: OpenOCD Linux / Windows

3. Installing JTAG inteface in Windows

For FTDI chips there are at least four drivers avaliable. You may use:

- FTDI D2XX Direct drivers
- FTDI Virtual COM Port (VCP) drivers
- WinUSB (libusbx.org)
- libusb-win32

It is quite confusing which one to choose.
As I read in manual for JTAG-lock-pick Tiny 2 best option is to use WinUSB drivers so I will use that one.
Amontec JTAGkey-Tiny works with libusb-win32.

Instalation is simple, just connect JTAG to usb wait till system inform you that cannot find a drivers, then install it manually by device manager providing a patch to WinUSB drivers.

In case that you have a problems with installing drivers or want to replace it use Zadig.

4. Installing OpenOCD in Windows

Get latest stable version from www.freddiechopin.pl page, 0.61 is current at this moment (February 2013) and will be used in this article.
Unzip it to C: and open openocd-0.6.1 folder.
Download board configuration files for OpenOCD:
- copy iconnect.cfg to openocd\scripts\board
- copy iconnect_connection.cfg to openocd\bin or \openocd\bin-x64

I have 64bit Windows 7 and will use bin-x64 since now.

5. Configuration

Open openocd_iconnect.cfg find the line:

# Specify JTAG interface configuration file
source [find interface/ftdi/jtag-lock-pick_tiny_2.cfg]
browse C:\openocd-0.6.1\scripts\interface and find a cfg file whch describes yours interface and replace name.

6. Connecting with OpenOCD to board

Hold "Shift" button and right click on bin-x64 folder and choose "Open command line here".

Run:

openocd-x64-0.6.1.exe -f openocd_iconnect.cfg
You should see output similar to this:

C:\openocd-0.6.1\bin-x64>openocd-x64-0.6.1.exe -f openocd_iconnect.cfg
Open On-Chip Debugger 0.6.1 (2012-10-07-10:39)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
adapter speed: 6000 kHz
adapter_nsrst_assert_width: 1000
adapter_nsrst_delay: 200
debug_level: 1
    TargetName         Type       Endian TapName            State
--  ------------------ ---------- ------ ------------------ ------------
 0* feroceon.cpu       feroceon   little feroceon.cpu       running
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
background polling: on
TAP: feroceon.cpu (enabled)
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled

in case that you have got an error like this below, try again.

TARGET: feroceon.cpu - Not halted

Runtime Error: openocd_iconnect.cfg:40:
in procedure 'script'
at file "embedded:startup.tcl", line 58
in procedure 'reset' called at file "openocd_iconnect.cfg", line 40

If still not working go to openocd_iconnect.cfg and comment line reset halt, uncomment reset run and soft_reset_halt.
In case of further problems refer to OpenOCD manual section Reset Configuration.

7. Connect to OpenOCD telnet interface.

You may use PuTTY for that.

Configure as follow:

Host Name: 127.0.0.1
Port: 4444
Connection type: Telnet
You may want to save configuration for future usage.

Now click "Open" button, you should see welcome message:
Open On-Chip Debugger
>

8. First method - direct flash U-Boot

Download U-Boot image openwrt-kirkwood-iconnect-u-boot.kwb from:
- OpenWRT trunk http://downloads.openwrt.org/snapshots/trunk/kirkwood/uboot-kirkwood-iconnect/
- or from stable branch http://downloads.openwrt.org/attitude_adjustment/ if already relased.

Save it to C:\openocd-0.6.1\bin-x64

Go to PuTTY session and execute:

iconnect_reflash_uboot

If it works you are lucky, unfortunately it does not work for me. I keep getting error:

nand write 0 openwrt-kirkwood-iconnect-u-boot.kwb 0 oob_softecc_kw
timed out while waiting for target halted
error executing hosted NAND write
Unable to write data to NAND device
failed writing file openwrt-kirkwood-iconnect-u-boot.kwb to NAND flash 0 at offset 0x00000000
So I found second option.

9. Second method - booting U-Boot in RAM and flashing image using it.

Download U-Boot image openwrt-kirkwood-iconnect-u-boot.kwb from:
- OpenWRT trunk http://downloads.openwrt.org/snapshots/trunk/kirkwood/uboot-kirkwood-iconnect/
- or from stable branch http://downloads.openwrt.org/attitude_adjustment/ if already relased.

This is alternative to direct flashing which is not working in my case.
We will run U-Boot in RAM and flash it's image using U-Boot itself and tftp server.

You need:
- serial cable installed and connected to board serial port
- download tftpd server ZIP file from here http://tftpd32.jounin.net/

9.1 Prepare network card settings

Go to Start → Control Pannel → Network and Sharing Center → Local Area connection → Properties → Internet Protocol Version 4(TCP/IPv4)

Choose "Use the following IP address" and set:

IP address: 192.168.1.5 Sybnet mask: 255.255.255.0

Confirm by clicking OK.

9.2 Prepare tftpd server

Extract tftpd zip to c:\tftpd, create folder c:\tftpd\files.

Copy downloaded openwrt-kirkwood-iconnect-u-boot.kwb to c:\tftpd\files.

Run tftpd, click "Settings" button, choose TFTP tab and set "Base Directory" to c:\tftpd\files, click OK button.

Check if Server interface is 192.168.1.5, if not choose it from the list.

9.3 Runing U-Boot from RAM.

Establish Connection with board as described in point 6 and 7.

Using PuTTY connect to your serial cable, put window in visible area and monitor it.

In OpenOCD telnet connection (established in point 7) run:

Open On-Chip Debugger
> iconnect_load_uboot_bin

you should see this:

target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x000000d3 pc: 0xffff0000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
use of EmbeddedICE dbgrq instead of breakpoint for target halt disabled
400620 bytes written at address 0x00600000
downloaded 400620 bytes in 18.702635s (20.918 KiB/s)
>
Then on serial console you will see booting U-Boot:
U-Boot 2012.10 (Feb 12 2013 - 18:24:56) Iomega iConnect

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  512 MiB
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   egiga0
Warning: failed to set MAC address

Hit any key to stop autoboot:  0 
iconnect =>
Press enter key as soon as you will see "Hit any key to stop autoboot".

9.4 Configure basic env variables

We need to set server address and iConnect address to establish communication.

In Serial console execute:

setenv ethaddr '00:D0:01:01:01:01'
setenv serverip 192.168.1.5
setenv ipaddr 192.168.1.200
then:
mw 0x0800000 0xffff 0x100000 
nand erase 0x0 0x100000
tftp 0x0800000 openwrt-kirkwood-iconnect-u-boot.kwb
nand write 0x0800000 0x0 0x100000
Here is an output which you will see:
iconnect => setenv ethaddr '00:D0:01:01:01:01'
iconnect => setenv serverip 192.168.1.5
iconnect => setenv ipaddr 192.168.1.200
iconnect => mw 0x0800000 0xffff 0x100000
iconnect => nand erase 0x0 0x100000

NAND erase: device 0 offset 0x0, size 0x100000
Erasing at 0xe0000 -- 100% complete.
OK

iconnect => tftp 0x0800000 openwrt-kirkwood-iconnect-u-boot.kwb
Using egiga0 device
TFTP from server 192.168.1.5; our IP address is 192.168.1.200
Filename 'openwrt-kirkwood-iconnect-u-boot.kwb'.
Load address: 0x800000
Loading: ############################
done
Bytes transferred = 401136 (61ef0 hex)

iconnect => nand write 0x0800000 0x0 0x100000

NAND write: device 0 offset 0x0, size 0x100000
 1048576 bytes written: OK
Now reset it by executing:
reset
After reset the blue LED should start blinking and on serial console you will see U-Boot boot messages.

That's all your iConnect is unbricked.

10. Post rescue procedure.

You should set basic env settings by executing:

setenv ethaddr '00:D0:##:##:##:##' #Put here your real MAC address
setenv serverip 192.168.1.5
setenv ipaddr 192.168.1.200
saveenv
For OpenWRT installation instructions see above.

toh/iomega/iconnect.txt · Last modified: 2014/06/24 23:55 by diizzy