Lenovo Iomega EZ Media & Backup Center

man mkimage

1 Like

Please, I already read the man page of mkimage, but I don't know yet what I need to do, I never used mkimage in the past...

It sounds like your best option is to get someone who knows what they are doing to do it for you.

1 Like

I know how to connect it using my serial-ttl cable, I know how to run commands on linux vm, I know how to use dd I already have a usb-sata cable and serial-ttl cable and have correctly identified pins on board, and I successfully disk-flashed a WDMybookLive (similar box)... but I just don't understand the linux kernel thing and the uImage image thing... I just need help with that... I am completely lost on Doozan forums about this... there is so many files and config trial and error and missing steps...
I want to try to install LEDE, to see if it works (the WDMybookLive works like a charm), if not, I want to just install Debian to be able to use the damn NAS for god sake... with stock firmware this shit it is just unusable.

Do you have a recovery plan if you brick the device?

As far i can tell with the serial ttl I can modify the 1mb flash of the board if it is needed to boot properly.
No problem if my hardrive fails in some way, and no problem if my any of my USB flash drive fails in some way.
If the on-board flash of the Iomega fails no problem to me, I already have my WD MybookLive with LEDE up and working.

That is because I want to do experiments, no problem if I brick the hardware, I also have lots of Routers, and some PogoPlug Mobile too, all flashed with LEDE.

I am very careful with my notes, I will write it down as I always do as a step-by-step guide if I had success to allow other to learn to do it with their hardware or similar ones.

For start, Can someone explain to me what is and the relation between of "Plain kernel", uBoot, uImage, a Initramfs, a zImage, ramdisk, initrd, dtb, etc, etc, may be if I understand all of that well I will understand easily what involves the mkimage process in order to get the files to ´dd´ in to the Iomega EZ.

'Plain kernel' is the binary which is the result of compiling&linking the kernel source.
zImage is a compressed plain kernel with a 'pyggyback'. Some extra code which can decompress the kernel before booting it.
uImage is (in most cases) a zImage with a 64 byte uImage header, which contains the load address & entry point of the zImage, so that uBoot knows what to do with it. Further is contains a description of the actual contents (linux kernel, version, ...)
An initramfs and initrd are basically the same. It's a filesystem in memory, which contains userland software. In an embedded environment it might contain the whole distro, on bigger systems it can contain tools&scripts to assemble&mount raid arrays and stuff like that before passing userland boot to them. Both can have a uHeader, to let uBoot know what it is.
dtb is a database describing the hardware. (How many Sata ports, their addresses, gpio, ... ).

You have at least to set the load address and entry point of the uImage correctly. Else u-boot doesn't know what to do. Don't know if uBoot actually cares about the other fields. But they are not hard to guess
Here you can see the uImage header of an ix2-dl:
Image Name: Linux-
Created: 2013-03-12 21:25:40 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2943440 Bytes = 2.8 MB
Load Address: 00008000
Entry Point: 00008000

1 Like

Loud and Clear... Understood perfectly! MANY Thanks!!!

Ok, do you recommend that I must give a try to use mkimage then with this image?

so I need to convert that zImage into a uImage passing to mkimage with the entrypoint of 00008000 right?

It is something like this?

mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.11.3-kirkwood-tld-2 -d zImage.fdt uImage

I just found it here, I just missed it, I speed read again the forum post and I just found it: https://forum.doozan.com/read.php?2,35331,35434#msg-35434

the setenv commands in "u-boot reconfiguration" are needed to be executed on the same debian VM that I wil l use to run the mkimage command right ? or it goes on some file ?

In the post, I don't understand, are he running the commands on the box itself on the /boot directory? it says root@iomega:/boot#

I will write now to Eine from Doozan Forum to see if he can give a hand on this experiment too

@Mijzelf Again, thank you so much.

It is something like this?


the setenv commands in “u-boot reconfiguration” are needed to be executed on the same debian VM that I wil l use to run the mkimage command right ? or it goes on some file ?

No. They are executed in the u-boot prompt, and the environment is stored in the 'u-boot environment partition' in flash.

In the post, I don’t understand, are he running the commands on the box itself on the /boot directory?

Yes. He already seems to have Debian running, which he uses to upgrade the kernel. So he can use dd to write the image to the local flash partition.
In your case you can run mkimage on any OS/platform which it can run on, and you'll have to upload using tftp to u-boot, and flash it using u-boot. (If you know another way to write it it's also fine, of course.)

Amazing, Thanks!.
I am chating with Ein on Skype, he help me too with this.
I will try to make the image and flash it.

I'll keep you posted.

Ok, Debian worked perfectly fine!
Now I will try to flash LEDE, boot to USB, and other thing, I will post my findings here too, so If anyone want to see a simplified step-by-step on this: https://gist.github.com/braian87b/b5a4c5f20d1112473c470b096df766a3