OpenWrt Forum Archive

Topic: Iomega Iconnect Firmware Problem

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
I have an "Iomega Iconnect" which I would like to upgrade to OpenWRT
I have followed this guide "wiki.openwrt.org/toh/iomega/iconnect"
I used the image files from "downloads.openwrt.org/snapshots/trunk/kirkwood/generic/"

The files which are available for my device are the following :

openwrt-kirkwood-uImage    
openwrt-kirkwood-generic-jffs2-nand-2048-128k.img

openwrt-kirkwood-iconnect-u-boot.bin
openwrt-kirkwood-iconnect-u-boot.img
openwrt-kirkwood-iconnect-u-boot.kwb

openwrt-kirkwood-iconnect_second_stage-u-boot.bin
openwrt-kirkwood-iconnect_second_stage-u-boot.img
openwrt-kirkwood-iconnect_second_stage-u-boot.kwb

openwrt-kirkwood-iconnect-squashfs-factory.bin
openwrt-kirkwood-iconnect-squashfs-sysupgrade.tar

I used the following files as they where close to the ones mentioned within the guide

openwrt-kirkwood-uImage    
openwrt-kirkwood-generic-jffs2-nand-2048-128k.img
openwrt-kirkwood-iconnect-u-boot.kwb

I followed the guide made a backup of my MAC address and successfully flashed uBoot
This reloaded to the uBoot prompt and I followed the rest of the guide to flash the uimage and jiffs image.

The problem I have is that nothing loads past the uboot prompt after reboot.

This is a console log of what I see on screen :

U-Boot 2014.10 (Aug 21 2017 - 16:46:23) 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:   ARM OpenWrt Linux-4.4.14
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    1921852 Bytes = 1.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
Using machid 0xb36 from environment

Starting kernel ...

As you can see the device is stuck indefinitely at starting kernel prompt.

I can still successfully enter uboot so might be able to correct this.

The question is how? I suspect the guide is slightly outdated.

Here is a dump of the current environmental variable with the MAC address obscured.

iconnect => printenv
arcNumber=2870
baudrate=115200
bootargs=console=ttyS0,115200 mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(ubi)
bootargs_root=root=/dev/mtdblock2 rootfstype=jffs2
bootcmd=run load_openwrt
bootdelay=3
console=console=ttyS0,115200 panic=20
download_kernel=mw $(loadaddr) 0xffff 0x300000; tftp $(loadaddr) $(kernel_name);
download_rootfs=mw $(loadaddr) 0xffff 0x200000; tftp $(loadaddr) $(rootfs_name);
ethact=egiga0
ethaddr=00:d0:b8:??:??:??
flash_kernel=nand erase 0x100000 0x400000; nand write.e $(loadaddr) 0x100000 0x400000;
flash_rootfs=nand erase 0x500000 0xfb00000; nand write.e $(loadaddr) 0x500000 0x200000;
ipaddr=172.16.0.138
kernel_name=openwrt-kirkwood-uImage
load_openwrt=setenv bootargs $(console) $(bootargs_root); nand read $(loadaddr) 0x100000 0x400000; bootm $(loadaddr)
loadaddr=0x6400000
machid=B36
mtddevname=uboot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(ubi)
partition=nand0,0
rootfs_name=openwrt-kirkwood-generic-jffs2-nand-2048-128k.img
serverip=172.16.0.107
stderr=serial
stdin=serial
stdout=serial

Environment size: 1269/131068 bytes

How do I get this device to work with the JFFS filing system?

Also what are the other images for this device like the uboot second stage loader and a squashfs image which is not recommended for nand flash.

Thanks

(Last edited by firefly123 on 5 Sep 2017, 11:08)

You are using snapshot. That's a bit unsupported, the binaries you used are not even available anymore.

How about retrying with CC?

Mijzelf wrote:

You are using snapshot. That's a bit unsupported, the binaries you used are not even available anymore.

How about retrying with CC?

OK
I've visited

downloads.openwrt.org/chaos_calmer/15.05.1/kirkwood/generic/

I already have a working uboot.

Files I find related to my device are :

openwrt-15.05.1-kirkwood-iconnect-rootfs.tar.gz    
openwrt-15.05.1-kirkwood-iconnect-rootfs.ubi    
openwrt-15.05.1-kirkwood-iconnect-rootfs.ubifs    
openwrt-15.05.1-kirkwood-iconnect-uImage    
openwrt-15.05.1-kirkwood-iconnect-zImage    
openwrt-15.05.1-kirkwood-iconnect.dtb

openwrt-kirkwood-iconnect-u-boot.bin
openwrt-kirkwood-iconnect-u-boot.img
openwrt-kirkwood-iconnect-u-boot.kwb

openwrt-kirkwood-iconnect_second_stage-u-boot.bin
openwrt-kirkwood-iconnect_second_stage-u-boot.img
openwrt-kirkwood-iconnect_second_stage-u-boot.kwb

I follow the guide from "wiki.openwrt.org/toh/iomega/iconnect" to install "openwrt-15.05.1-kirkwood-iconnect-rootfs.ubifs"

From uboot I do the following as shown in the guide.

env default -a
saveenv
reset
iconnect => setenv ethaddr '00:d0:b8:??:??:??'
iconnect => set ipaddr 172.16.0.138
iconnect => set serverip 172.16.0.107
iconnect => saveenv
reset

On reset: <My Current Environmental Variables are>

iconnect => printenv
baudrate=115200
bootcmd=setenv bootargs ${console} ${mtdparts} ${bootargs_root}; ubi part ubi; ubi read 0x800000 kernel; bootz 0x800000
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=00:d0:b8:??:??:??
ipaddr=172.16.0.138
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100000@0x100000(second_stage_uboot),-@0x200000(ubi)
serverip=172.16.0.107
stderr=serial
stdin=serial
stdout=serial

I issue the following commands as instructed by the guide :

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

There is an error back from the "ubi part root ; ubi remove rootfs ; ubi create rootfs" line

iconnect => ubi part root ; ubi remove rootfs ; ubi create rootfs
incorrect device type in root
Partition root not found!
Error, no UBI device/partition selected!
Error, no UBI device/partition selected!

The other commands execute without error.

The unit resets and produces a few errors and drops out into uboot :

iconnect => tftpboot 0x800000 openwrt-15.05.1-kirkwood-iconnect-rootfs.ubifs ; ubi write 0x800000 rootfs ${filesize} ; reset
Using egiga0 device
TFTP from server 172.16.0.107; our IP address is 172.16.0.138
Filename 'openwrt-15.05.1-kirkwood-iconnect-rootfs.ubifs'.
Load address: 0x800000
Loading: *#################################################################
     #################################################################
     #################################################################
     #################################################################
     ################################################
     4.6 MiB/s
done
Bytes transferred = 4515840 (44e800 hex)
Error, no UBI device/partition selected!
resetting ...


U-Boot 2014.10 (Aug 21 2017 - 16:46:23) 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:  3  2  1  0 
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
UBI: empty MTD device detected
UBI: attached mtd1 (name "mtd=3", size 510 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
UBI: VID header offset: 512 (aligned 512), data offset: 2048
UBI: good PEBs: 4079, bad PEBs: 1, corrupted PEBs: 0
UBI: user volume: 0, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 0
UBI: available PEBs: 3996, total reserved PEBs: 83, PEBs reserved for bad PEB handling: 79
Read 0 bytes from volume kernel to 800000
Volume kernel not found!
Bad Linux ARM zImage magic!
iconnect => 

I think the guide I am following is missing some steps for the ubifs image.

Please can someone advise me how to fix this ?

Many Thanks

(Last edited by firefly123 on 5 Sep 2017, 11:06)

I managed to solve they mystery of the missing information and successfully made the iomega iconnect boot OpenWRT.

I found a guide for a similar chipset device called a "Seagate Dockstar"
Here "github.com/solarkennedy/wiki.xkyle.com/wiki/Installing-OpenWrt-15.05-On-A-Seagate-Dockstar"

It turns out the OpenWRT "ubifs" image contains no "zimage" or "dtb" files and these need to be added after booting the "zimage" from RAM

I modified the guides information as follows:

Erase and Prepare:

nand erase 0x200000 0x1fe00000
ubi part ubi
ubi create rootfs 0xA00000
tftpboot 0x800000 openwrt-15.05.1-kirkwood-iconnect-rootfs.ubifs
ubi write 0x800000 rootfs ${filesize}
ubi create rootfs_data

Setup Environmental Variables

setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; ubi part ubi; ubifsmount ubi:rootfs; run ubiboot_n1'
setenv ubiboot_n1 'ubifsload 0x800000 ${kernel}; ubifsumount; bootz 0x800000'
setenv kernel /boot/zImage
setenv fdt /boot/iconnect.dtb
saveenv

Load the Zimage into RAM and Boot

setenv bootargs ${console} ${mtdparts} ${bootargs_root}
tftpboot 0x800000 openwrt-15.05.1-kirkwood-iconnect-zImage
bootz 0x800000;

Add the missing dtb and zimage to ubifs

mkdir -p /rom/boot
wget -O /rom/boot/iconnect.dtb ht_tp://downloads.openwrt.org/chaos_calmer/15.05.1/kirkwood/generic/openwrt-15.05.1-kirkwood-iconnect.dtb
wget -O /rom/boot/zImage ht_tp://downloads.openwrt.org/chaos_calmer/15.05.1/kirkwood/generic/openwrt-15.05.1-kirkwood-iconnect-zImage
reboot

The device should reboot and load without any manual intervention.

#Add Wifi Driver

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

#Install Other Packages

opkg update
opkg install nano wget luci uboot-envtools pciutils usbutils htop wireless-tools kmod-rt2x00-pci kmod-usb-core kmod-usb-storage block-mount kmod-fs-ext4 kmod-fs-vfat kmod-fs-ntfs kmod-nls-cp437 kmod-nls-iso8859-1 e2fsprogs fdisk kmod-usb2 samba36-server samba36-client luci-app-samba kmod-rtl8187 wireless-tools kmod-usb-net-asix-ax88179 kmod-rt2800-lib kmod-rt2800-usb kmod-rt2x00-lib kmod-rt2x00-usb kmod-usb-serial-pl2303 kmod-usb-serial-cp210x kmod-usb-serial-ftdi kmod-usb-serial-ch341 picocom screen 

opkg install coreutils-stty lua luasocket wireless-tools ser2net usbutils kmod-usb-ohci kmod-video-core kmod-video-uvc mjpg-streamer kmod-usb-uhci motion wpad-mini hostapd wpa_supplicant

I hope this can be used as a guide to help other people who are struggling with this device.

(Last edited by firefly123 on 5 Sep 2017, 22:22)

The discussion might have continued from here.