Welcome! Log In Create A New Profile

Advanced

Iomega ix4-200d U-boot needed

Posted by Reto 
Re: Iomega ix4-200d U-boot needed
February 10, 2016 03:28AM
How about this version.

-bodhi
===========================
Forum Wiki
bodhi's corner
Attachments:
open | download - blparam.tar (20 KB)
Re: Iomega ix4-200d U-boot needed
February 10, 2016 03:44AM
Same error. File is dated Aug 12 2012
Re: Iomega ix4-200d U-boot needed
February 10, 2016 11:45AM
Reto,

Let's not waste time pursuing this. Since you already have serial console, you can set/save envs as you need. And you can boot the latest kernel with stock u-boot!

When I have time to revisit this for building new u-boot, we'll do more experiment.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Iomega ix4-200d U-boot needed
February 10, 2016 11:42PM
Ok, so which guide should I follow to flash the kernel?
Re: Iomega ix4-200d U-boot needed
February 10, 2016 11:59PM
Reto Wrote:
-------------------------------------------------------
> Ok, so which guide should I follow to flash the
> kernel?

You already have the kernel running on USB rootfs:

http://forum.doozan.com/read.php?3,25120,25698#msg-25698

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Iomega ix4-200d U-boot needed
February 11, 2016 12:55AM
Yes I have. So I have to live with an USB memory key sticking out of the box for now?
Re: Iomega ix4-200d U-boot needed
February 11, 2016 02:36AM
Reto Wrote:
-------------------------------------------------------
> Yes I have. So I have to live with an USB memory
> key sticking out of the box for now?

No. You can migrate (copy) the rootfs to your HDD and then adjust u-boot envs to boot from the HDD.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Iomega ix4-200d U-boot needed
February 11, 2016 09:15AM
Ok. Thank you again bodhi for all your help to bring my ix4 back to life.

I would like to run it a raid 5. Do I have to create a partition on one of the disks first to copy the rootfs and only use the rest of the disk for the raid? Or should I first build the raid and then create a partition for rootfs on it?
Re: Iomega ix4-200d U-boot needed
February 11, 2016 02:10PM
Hi Reto,

I'm not using Raid so I'm not the best person to answer it. You can create a new Debian topic and I'm sure people will respond. However, if you are using Raid, you might want to keep your rootfs on USB (things are going to be much simpler).

-bodhi
===========================
Forum Wiki
bodhi's corner
Damian
Re: Iomega ix4-200d U-boot needed
March 18, 2016 04:35AM
Hi, just reading those posts about this NAS. Got mine under stock ROM if you need something else...I will try to boot debian and see how it goes...

Reading the posts I think that is 'safe' to try new u-boot by kwboot, isn't it?

Thanks and cheers!
Re: Iomega ix4-200d U-boot needed
March 18, 2016 02:59PM
Damian,

It is always safe to boot with kwboot. Just be careful and don't save anything. Like when in serial console, never do a saveenv. Even though it is good to use for kwboot purpose, this u-boot is different than the sheevaplug u-boot.

You can run new Debian rootfs, so try that only. When I have time to revisit this, I will see if I can build new u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Damian
Re: Iomega ix4-200d U-boot needed
March 21, 2016 01:52AM
Hi Body,

thanks for your answer, so your debian rootfs is bootable & installable on my device? Could I save the kernel+dtb on the nand and boot from it? I'm reading the post for this purpose, but as non english native speaker, I always have some doubts!
I also have a ix2-200 nas, but his dtb is on the debian repo so I did a almost regular debian netInstall, I expected I can do the same with this, but there is a few information about the ix4-200d compared to a ix2-200.

Thanks and best regards!
Damian
Re: Iomega ix4-200d U-boot needed
March 21, 2016 02:03AM
Hi Damian,

Yes, it should work. The Iomega ix2_200 is already supported in mainline. So you can follow Reto's example and create a new rootfs on USB using the latest rootfs: the tarball Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (20 Feb 2016) from the kernel/rootfs post:
http://forum.doozan.com/read.php?2,12096

In your case the DTB should be
/boot/dts/kirkwood-iomega_ix2_200.dtb

And you need to adjust u-boot envs in serial console, to make sure that you can test boot it without saving anything.

-bodhi
===========================
Forum Wiki
bodhi's corner
Damian
Re: Iomega ix4-200d U-boot needed
March 21, 2016 03:09AM
Thanks bodhi!
Damian
Re: Iomega ix4-200d U-boot needed
April 29, 2016 01:25AM
Hi bodhi,

running debian 8 + kernel 4.4.0 on usb + raid1 rootfs right now...I am wondering,
how can I find the correct values for flash the kernel to the nand?

Thanks for your amazing work and patience...

Regards!
Damian
Re: Iomega ix4-200d U-boot needed
April 29, 2016 01:57AM
Damian Wrote:
-------------------------------------------------------
> Hi bodhi,
>
> running debian 8 + kernel 4.4.0 on usb + raid1
> rootfs right now...I am wondering,
> how can I find the correct values for flash the
> kernel to the nand?
>
> Thanks for your amazing work and patience...
>
> Regards!

By the way,

setting this on /etc/fw_env.config

#mtd0: 000a0000 00004000 "uboot"
#mtd1: 00010000 00004000 "env"
#mtd2: 00228000 00004000 "zImage"
#mtd3: 00300000 00004000 "initrd"
#mtd4: 02000000 00004000 "flash"

# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd1 0x00000 0x4000 0x10000 1


Allows me to apparently run "fw_printenv"
bootdelay=1
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
run_diag=yes
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
console=console=ttyS0,115200 mtdparts=nand_mtd:0xa0000@0x0(uboot),0x00010000@0x000a0000(param),32m@0x0(flash)
uboot_start=0x0
uboot_size=0xa0000
env_start=0xa0000
env_size=0x10000
kernel_start=0xb0000
kernel_size=0x228000
initrd_size=0x300000
make_boot_args=setenv bootargs console=ttyS0,115200 mtdparts=nand_mtd:$(uboot_size)@$(uboot_start)(uboot),$(env_size)@$(env_start)(env),$(kernel_size)@$(kernel_start)(zImage),$(initrd_size)@$(initrd_start)(initrd),32m@0x0(flash);
flash_load=run make_boot_args;nand read.e 0x2000000 $(kernel_start) $(kernel_size);nand read.e 0x12000000 $(initrd_start) $(initrd_size);bootm 0x2000000 0x12000000;
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000;
ethmtu=1500
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
uboot_ver=v1.1.1
ethact=egiga0
mfgmodel=ix4
fw_ver=v1_0_11_30938744
preroot_ver=0.1.5
serial_number=5560Y01011G125003A1J0I1
ethaddr=00:D0:B8:1B:C1:31
serialno=EUB250L9A1
modelname=31962600
runintime=10800
ftpserver=192.168.43.4
testfile=100M
mfgtest_state=system_tested_ok
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_boot=usb start; run load_uimage; run load_initrd; bootm 0x800000 0x1100000
bootcmd=run usb_make_boot_args ; run usb_boot; reset
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
initrd_start=0x2d8000
disaMvPnp=no
eth1addr=00:d0:b8:1b:c1:32
enaAutoRecovery=yes
pcieTune=no
usb_make_boot_args=setenv bootargs console=ttyS0,115200 mtdparts=orion_nand:$(uboot_size)@$(uboot_start)(uboot),$(env_size)@$(env_start)(env),$(kernel_size)@$(kernel_start)(zImage),$(initrd_size)@$(initrd_start)(initrd),32m@0x0(flash) root=LABEL=rootfsdisk rootdelay=10

I also have a doubt about how to load the kernel for the sata disks (initialize or ext2ls... tried with iscsi 0:1 and so but no lucky)
Thanks again and sorry for my english
Re: Iomega ix4-200d U-boot needed
April 29, 2016 02:17AM
Damian,

You've already found the address for zimage and uinitrd:

#mtd2: 00228000 00004000 "zImage"
#mtd3: 00300000 00004000 "initrd"

However, I would not recommend to do this (you don't need to run the kernel in NAND).

To boot with SATA, envs need to change to use ide command, and then ext2load as usual.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 04/29/2016 02:19AM by bodhi.
Re: Iomega ix4-200d U-boot needed
April 29, 2016 02:25AM
So SATA boot is like this:

load_initrd=ext2load ide 0:1 0x1100000 /boot/uInitrd 
load_uimage=ext2load ide 0:1 0x800000 /boot/uImage 
sata_boot=ide reset; run load_uimage; run load_initrd; bootm 0x800000 0x1100000 
bootcmd=run usb_make_boot_args ; run sata_boot; reset

-bodhi
===========================
Forum Wiki
bodhi's corner
Damian
Re: Iomega ix4-200d U-boot needed
April 29, 2016 03:14AM
Absolutely gorgeous!

I'll try it ASAP
thanks for your help


bodhi Wrote:
-------------------------------------------------------
> So SATA boot is like this:
>
>
> load_initrd=ext2load ide 0:1 0x1100000
> /boot/uInitrd 
> load_uimage=ext2load ide 0:1 0x800000 /boot/uImage
> 
> sata_boot=ide reset; run load_uimage; run
> load_initrd; bootm 0x800000 0x1100000 
> bootcmd=run usb_make_boot_args ; run sata_boot;
> reset
> 
Re: Iomega ix4-200d U-boot needed
June 21, 2016 07:20AM
Hi all,
i've installed, with Bodhi support, the Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (Updated 20 Feb 2016), now my question is:
the embedded display remains with Iomega Logo, is possible to display same informations such as that displayed with stock firmware?

Regards
Francesco
Re: Iomega ix4-200d U-boot needed
June 21, 2016 10:57AM
Is there source available for the stock firmware? You will need to determine how the display is driven and source code for the stock firmware would be one way of determining this.
Re: Iomega ix4-200d U-boot needed
June 21, 2016 03:14PM
Hi,

i don't have stock firmware installed in this moment.
Is there any people who can do the tar of the stock firmware root?

Best regards
Francesco
Re: Iomega ix4-200d U-boot needed
August 22, 2016 02:54PM
just FYI: i also have uploaded the differen versions of the Iomega ix4-200d U-boot to this topic: klick
mgx
Re: Iomega ix4-200d U-boot needed
January 29, 2021 07:34AM
Hi there,

I am reading this all over and over again but cannot get out of the hell. I have bought ix4-200d without drives. I managed to install the recovery OS but did not like it at all, so I have started fiddling with Debian.


I managed to get it running via serial kwboot (Sheevaplug u-boot 2015 and 2017, both are working), so I decided to flash the mtd0 - and this is where it went off. I mus have done something wrong but i don't know what. I have flashed mtd0.bin that bodhi atached to this thread, looks the same, but it won't let me boot from ext3.

Here is the current state:
root@debian:~# fw_printenv 
Warning: Bad CRC, using default environment
bootcmd=run distro_bootcmd
bootdelay=2
baudrate=115200
stdin=serial,cros-ec-keyb,usbkbd
stdout=serial,vidconsole
stderr=serial,vidconsole
ethaddr=00:00:11:22:33:44
eth1addr=00:00:11:22:33:45
eth3addr=00:00:11:22:33:46
eth5addr=00:00:11:22:33:47
ipaddr=1.2.3.4
host_boot=if host dev ${devnum}; then setenv devtype host; run scan_dev_for_boot_part; fi
sata_boot=if sata dev ${devnum}; then setenv devtype sata; run scan_dev_for_boot_part; fi
scsi_init=if ${scsi_need_init}; then setenv scsi_need_init false; scsi scan; fi
scsi_boot=run scsi_init; if scsi dev ${devnum}; then setenv devtype scsi; run scan_dev_for_boot_part; fi
virtio_boot=if virtio dev ${devnum}; then setenv devtype virtio; run scan_dev_for_boot_part; fi
boot_prefixes=/ /boot/
boot_scripts=boot.scr.uimg boot.scr
boot_script_dhcp=boot.scr.uimg
boot_targets=host1 host0 
boot_syslinux_conf=extlinux/extlinux.conf
boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf}
scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi
boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr}
scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done
scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;
scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done
bootcmd_host1=setenv devnum 1; run host_boot
bootcmd_host0=setenv devnum 0; run host_boot
distro_bootcmd=setenv scsi_need_init; for target in ${boot_targets}; do run bootcmd_${target}; done
bootm_size=0x10000000
kernel_addr_r=0x1000000
fdt_addr_r=0xc00000
ramdisk_addr_r=0x2000000
scriptaddr=0x1000
pxefile_addr_r=0x2000

root@debian:~# uname -a
Linux debian 5.2.9-kirkwood-tld-1 #1 PREEMPT Sat Aug 17 15:00:56 PDT 2019 armv5tel GNU/Linux


root@debian:~# cat /etc/fw_env.config  
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000


root@debian:~# mtdinfo -a
Count of MTD devices:           3
Present MTD devices:            mtd0, mtd1, mtd2
Sysfs interface supported:      yes

mtd0
Name:                           u-boot
Type:                           nand
Eraseblock size:                16384 bytes, 16.0 KiB
Amount of eraseblocks:          64 (1048576 bytes, 1024.0 KiB)
Minimum input/output unit size: 512 bytes
Sub-page size:                  256 bytes
OOB size:                       16 bytes
Character device major/minor:   90:0
Bad blocks are allowed:         true
Device is writable:             false

mtd1
Name:                           uImage
Type:                           nand
Eraseblock size:                16384 bytes, 16.0 KiB
Amount of eraseblocks:          320 (5242880 bytes, 5.0 MiB)
Minimum input/output unit size: 512 bytes
Sub-page size:                  256 bytes
OOB size:                       16 bytes
Character device major/minor:   90:2
Bad blocks are allowed:         true
Device is writable:             true

mtd2
Name:                           rootfs
Type:                           nand
Eraseblock size:                16384 bytes, 16.0 KiB
Amount of eraseblocks:          1728 (28311552 bytes, 27.0 MiB)
Minimum input/output unit size: 512 bytes
Sub-page size:                  256 bytes
OOB size:                       16 bytes
Character device major/minor:   90:4
Bad blocks are allowed:         true
Device is writable:             true

as you can see mtd0 became unwritable, I don't know why.



when I load mtd0.bin which is supposed to be stock u-boot, it does not see USB flash drives at all

Marvell>> usb start

(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found
Marvell>> 

(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
       scanning bus for storage devices... 0 Storage Device(s) found

Marvell>> version
U-Boot 1.1.4 (Mar 10 2011 - 15:01:57) Marvell version: 3.4.18


Marvell>> printenv

bootdelay=1
baudrate=115200
loads_echo=0
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
run_diag=yes
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
console=console=ttyS0,115200 mtdparts=nand_mtd:0xa0000@0x0(uboot),0x00010000@0x000a0000(param),32m@0x0(flash) 
uboot_start=0x0
uboot_size=0xa0000
env_start=0xa0000
env_size=0x10000
kernel_start=0xb0000
kernel_size=0x228000
initrd_start=0x2d8000
initrd_size=0x300000
make_boot_args=setenv bootargs console=ttyS0,115200 mtdparts=nand_mtd:$(uboot_size)@$(uboot_start)(uboot),$(env_size)@$(env_start)(env),$(kernel_size)@$(kernel_start)(zImage),$(initrd_size)@$(initrd_start)(initrd),32m@0x0(flash);
flash_load=run make_boot_args;nand read.e 0x2000000 $(kernel_start) $(kernel_size);nand read.e 0x12000000 $(initrd_start) $(initrd_size);bootm 0x2000000 0x12000000;
bootcmd=run flash_load;
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000;
ethaddr=00:50:43:a7:0f:2d
ethmtu=1500
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
uboot_ver=v1.1.1
ethact=egiga0
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
eth1addr=00:50:43:a7:0f:2e
enaAutoRecovery=yes
pcieTune=no
usb_root=LABEL=rootfs
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0xa0000@0x0(uboot),0x10000@0xa0000(env),0x228000@0xb0000(zImage),0x300000@0x2d8000(initrd),32m@0x0(flash)

Environment size: 1803/16380 bytes




is there any way to get the Debian running without serial kwboot? Is there any known running combination of U-Boot + RootFS for this machine please?

please help
mgx
Re: Iomega ix4-200d U-boot needed
January 29, 2021 04:01PM
well looks like I have found a way:

1. erased flash completely
2. loaded one of stock u-boots into flash
3. added DTS to kernel
4. tftpbooted u-boot into memory and nand write.e ADDR 0x0 blablabla the uboot location
5. reboot, tftpboot kernel and initrd
6. wrote kernel and initrd into flash (since the uboot does not know "usb" command)
7. rootfs is on a 20GB ext2 partition on 3TB WD RED drive which is recognized correctly

few adjustments in ENV and voila, after 24 hours of struggling it's working. while I'm writing this post I'm waiting to finish formatting of the rest of the disk to be added to fstab and shared via samba




tftpboot 0x2000000 uImage; tftpboot 0x12000000 uInitrd;
nand erase 0x1000000 0x943911; nand erase 0xb0000 0x4be192
nand write.e 0x12000000 0x1000000 0x943910; nand write.e 0x2000000 0x0b0000 0x4be192


that is a real nightmare, I'm gonna have bad dreams



Edited 1 time(s). Last edit at 01/29/2021 04:01PM by mgx.
Re: Iomega ix4-200d U-boot needed
May 31, 2021 01:41PM
Reto Wrote:
-------------------------------------------------------
> So far so good...
>
>
> Marvell>> setenv usb_make_boot_args 'setenv
> bootargs console=ttyS0,115200
> mtdparts=orion_nand:$(uboot_size)@$(uboot_start)(uboot),$(env_size)@$(env_start)(env),$(kernel_size)@$(kernel_start)(zImage),$(initrd_size)@$(initrd_start)(initrd),32m@0x0(flash)
> root=LABEL=rootfs rootdelay=10'
> Marvell>> setenv load_initrd 'ext2load usb 0:1
> 0x1100000 /boot/uInitrd'
> Marvell>> setenv load_uimage 'ext2load usb 0:1
> 0x800000 /boot/uImage'
> Marvell>> setenv usb_boot 'usb start; run
> load_uimage; run load_initrd; bootm 0x800000
> 0x1100000'
> Marvell>> setenv bootcmd 'run usb_make_boot_args ;
> run usb_boot; reset'
>


Please can someone explain me how i can get the both files

uInitrd
and
uImage

i am reading the forum for two days now but did not find that out..

EDIT: found it out

sudo tar -xjf '/home/user/Downloads/Iomega IX4-200d/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2' 
  cd boot
  cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt
  cat dts/kirkwood-iomega_ix4_200d.dtb  >> zImage.fdt
  mv uImage uImage.orig
  mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.4.0-kirkwood-tld-1 -d zImage.fdt  uImage
  sync



Edited 1 time(s). Last edit at 05/31/2021 02:47PM by damsma.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: