Iomega Storcenter ix2 200 - vanaware/openwrt GitHub Wiki
Compile OpenWrt for kirkwood Iomega Storcenter ix2-200
link: http://www.cs.cmu.edu/~./ecc/old-dockstar-howto.html
link: https://archive.openwrt.org/snapshots/trunk/kirkwood/generic/
git checkout -b lede-17.01.04-iomega_ix2_200 444add156f2a6d92fc15005c5ade2208a978966c
git push -u origin lede-17.01.04-iomega_ix2_200
cd ~/openwrt
mkdir -p logs
git checkout lede-17.01.04-iomega_ix2_200
git pull
./scripts/feeds update -a
./scripts/feeds install -a
wget https://downloads.openwrt.org/releases/17.01.4/targets/kirkwood/generic/config.seed
cp config.seed .config
#cp lede-17.01.4-kirkwood-iomega_ix2_200.diffconfig .config
make defconfig
make oldconfig
make menuconfig
# make dirclean # deletes contents of the directories /bin and /build_dir and additionally /staging_dir and /toolchain and /logs.
make download
rm logs/build.log
FORCE_UNSAFE_CONFIGURE=1 ionice -c 3 nice -n 19 make -j 5 V=s 2>&1 | tee logs/build.log | grep -i -E "^make.*(error|[12345]...Entering dir)"
ls bin/targets/kirkwood/generic -la
cp .config lede-17.01.4-kirkwood-iomega_ix2_200.config
scripts/diffconfig.sh > lede-17.01.4-kirkwood-iomega_ix2_200.diffconfig
mv bin/targets/kirkwood/generic/*.manifest lede-17.01.4-kirkwood-iomega_ix2_200.manifest
cp ~/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar
cp ~/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-uImage lede-17.01.4-kirkwood-iomega_ix2_200-uImage
cp ~/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-rootfs.ubi lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-rootfs.ubi
sudo bash
fdisk /dev/sdh <<EOF
o
n
p
1
w
q
EOF
mkfs.ext2 -L ext2 /dev/sdh1
mount -t ext2 /dev/sdh1 /mnt/usb
rm -fr /mnt/usb/*
tar -vxf /var/lib/lxc/openwrt/rootfs/root/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar sysupgrade-iomega_ix2_200/root -O | cat >> root.squashfs
unsquashfs -f -d /mnt/usb/ root.squashfs
rm -f root.squashfs
tar -vxf /var/lib/lxc/openwrt/rootfs/root/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar sysupgrade-iomega_ix2_200/kernel -O | cat >> /mnt/usb/uImage
cp /var/lib/lxc/openwrt/rootfs/root/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-rootfs.ubi /mnt/usb/
sudo umount /mnt/usb
Copy files to ftp server (optional) and enter terminal
sudo ls /srv/tftp
sudo cp /var/lib/lxc/openwrt/rootfs/root/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-uImage /srv/tftp/uImage
sudo gpasswd --add username dialout
reboot
screen /dev/ttyUSB0 115200
Access openwrt using the pendrive
setenv bootcmd 'setenv bootargs console=ttyS0,115200n8 root=/dev/sda1; usb start; ext2load usb 0:1 0x00800000 /uImage; bootm 0x00800000'
run bootcmd
log into openwrt and issue commands bellow
cat /proc/mtd
ubiformat /dev/mtd3
ubiformat /dev/mtd3 -f /lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-rootfs.ubi
mtd erase kernel
mtd write /uImage kernel
Try both bootargs_root bellow
setenv mainlineLinux yes
setenv arcNumber 1682
saveenv
reset
setenv console 'console=ttyS0,115200n8'
setenv mtdparts 'mtdparts=orion_nand:0x100000@0x000000(u-boot)ro,0x20000@0xA0000(u-boot environment)ro,0x300000@0x100000(kernel),0x1C00000@0x400000(ubi)'
setenv bootargs_root 'root=/dev/ubiblock0_1 noinitrd ubi.mtd=3 rootfstype=ubifs rw'
setenv bootargs_root 'root='
setenv bootcmd 'setenv bootargs ${console} ${mtdparts} ${bootargs_root}; nand read.e 0x800000 0x100000 0x300000; bootm 0x00800000'
saveenv
reset
Three ways to upgrade bellow. need more testing on them.
sudo scp /var/lib/lxc/openwrt/rootfs/root/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar [email protected]:/tmp/
sysupgrade -d 5 -v /tmp/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar
sudo scp /var/lib/lxc/openwrt/rootfs/root/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar [email protected]:/tmp/
tar xf /tmp/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar sysupgrade-iomega_ix2_200/kernel -O | mtd write - kernel
#rootfslenght
tar xf $tar_file sysupgrade-$board_name/root -O | wc -c
#put lenght ahead
tar xf /tmp/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar sysupgrade-iomega_ix2_200/root -O | ubiupdatevol /dev/ubi0_0/ -s $rootfs_length -
sudo scp /var/lib/lxc/openwrt/rootfs/root/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-sysupgrade.tar [email protected]:/tmp/
sudo scp /var/lib/lxc/openwrt/rootfs/root/openwrt/bin/targets/kirkwood/generic/lede-17.01.4-kirkwood-iomega_ix2_200-uImage [email protected]:/tmp/
ubiformat /dev/mtd3
ubiformat /dev/mtd3 -f /tmp/lede-17.01.4-kirkwood-iomega_ix2_200-squashfs-rootfs.ubi
mtd erase kernel
mtd write /tmp/lede-17.01.4-kirkwood-iomega_ix2_200-uImage kernel