Welcome! Log In Create A New Profile

Advanced

Debian uImage

Posted by habibie 
Debian uImage
February 22, 2015 09:03PM
I hope this is the right forum to ask the following. If not, please kindly move it to a more appropriate forum.

I finally managed to install debian wheezy rootfs on my Seagate GoFLEX Home device. However, the installation created the entries in /boot directory as shown below with vmlinuz kernel image that isn't compatible to uboot. Does anyone here know which debian package I should install to get the uImage kernel image file? If not, how do I convert the vmlinuz file into a uImage file?
root@alarm:/boot# ls -la
total 10168
drwxr-xr-x  2 root root    4096 Feb 22 19:55 .
drwxr-xr-x 21 root root    4096 Feb 22 18:39 ..
-rw-r--r--  1 root root 1213391 Jan 12 19:12 System.map-3.2.0-4-kirkwood
-rw-r--r--  1 root root  107566 Jan 12 19:12 config-3.2.0-4-kirkwood
-rw-r--r--  1 root root 7455845 Feb 22 18:54 initrd.img-3.2.0-4-kirkwood
-rw-r--r--  1 root root 1615096 Jan 12 19:11 vmlinuz-3.2.0-4-kirkwood
root@alarm:/boot#



Edited 1 time(s). Last edit at 02/22/2015 09:04PM by habibie.
Re: Debian uImage
February 22, 2015 09:26PM
Hi,

Did you follow some old guide on how to hack the GoFlex? I know that theres people from time to time that runs Jeffs script that are no longer working correct.

Just asking because the Kernel seems old.
You would want 3.18.5 from here:
http://forum.doozan.com/read.php?2,12096

If you did run Jeffs script maybe your Uboot isn't updated either. Any error messages?



Edited 1 time(s). Last edit at 02/22/2015 09:28PM by JohnW.
Re: Debian uImage
February 22, 2015 10:00PM
Probably, I did not make it clear when I said that I have managed to install debian wheezy on my Seagate GoFLEX Home device. What I meant is I am not using any existing rootfs tarball provided Bodhi and/or anyone else, but rather built my own from scratch by downloading/installing the packages. In doing so, the process installed vmlinuz kernel file in /boot directory as shown in my OP. AFAIK, a vmlinuz kernel image file that isn't compatible with uboot and needs be converted to uImage. In order to do so, I need to find out the strings "1f 8b 08" that separate the headers and the data that contains the uncompressed vmlinux image to extract. Unfortunately, the vmlinuz file doesn't contain such strings. If I presumed the vmlinuz file is an uncompressed version and use mkimage utility to convert it to uImage, uboot seems to load it and the LED remains solid, instead of flashing, but no network connection. I also have uInitrd file converted from initrd.img using mkimage utility. As you can see. this becomes a nightmare. I am hoping debian has a uImage kernel package that I can install and be done with it.



Edited 2 time(s). Last edit at 02/22/2015 10:33PM by habibie.
Re: Debian uImage
February 23, 2015 12:10AM
habibie,

> AFAIK, a vmlinuz kernel image file that
> isn't compatible with uboot and needs be converted
> to uImage

Yes.

>. In order to do so, I need to find out
> the strings "1f 8b 08" that separate the headers
> and the data that contains the uncompressed
> vmlinux image to extract. Unfortunately, the
> vmlinuz file doesn't contain such strings.

No. You've approached this in a wrong direction. You've should followed the direction in my kernel thread.

cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d /boot/vmlinuz-3.18.5-kirkwood-tld-1 /boot/uImage 
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.18.5-kirkwood-tld-1 -d /boot/initrd.img-3.18.5-kirkwood-tld-1 /boot/uInitrd

Just replace your kernel build 3.2.0-4 in these 2 commands above.

If this has become too much trouble, then you should use my uploaded rootfs in the thread above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 02/23/2015 12:53AM by bodhi.
Re: Debian uImage
February 23, 2015 07:30AM
bodhi Wrote:
-------------------------------------------------------
>
>
> cd /boot
> mkimage -A arm -O linux -T kernel -C none -a
> 0x00008000 -e 0x00008000 -n
> Linux-3.18.5-kirkwood-tld-1 -d
> /boot/vmlinuz-3.18.5-kirkwood-tld-1 /boot/uImage 
> mkimage -A arm -O linux -T ramdisk -C gzip -a
> 0x00000000 -e 0x00000000 -n
> initramfs-3.18.5-kirkwood-tld-1 -d
> /boot/initrd.img-3.18.5-kirkwood-tld-1
> /boot/uInitrd
>
>
> Just replace your kernel build 3.2.0-4 in these 2
> commands above.
>
That's what I had done, except I used -d vmlinuz-3.2.0-4-kirkwood instead of -d /boot/vmlinuz-3.2.0-4-kirkwood. Anyway, I tried your approach as shown above with the same problem, i.e. LED stays solid with no network. I also installed mactelnet-server and it too did not respond. It looks like my build has a problem.
Re: Debian uImage
February 23, 2015 03:02PM
habibie,

> I tried your approach as shown above with the same
> problem, i.e. LED stays solid with no network. I
> also installed mactelnet-server and it too did not
> respond. It looks like my build has a problem.

The most important tool in building your own kernel/rootfs is the serial console. Without it, you're shooting in the dark :) So connect one and then you will see things very clearly.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian uImage
February 23, 2015 05:13PM
habibie,

Before you connect serial console, consider this:

Quote

LED stays solid with no network.

If you've meant that the green LED flashing and then stays solid, then your kernel build was OK. Mounting the rootfs was most likely the problem.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian uImage
February 24, 2015 07:49PM
bodhi Wrote:
-------------------------------------------------------
> habibie,
>
> Before you connect serial console, consider this:
>
>
Quote

LED stays solid with no network.
>
> If you've meant that the green LED flashing and
> then stays solid, then your kernel build was OK.
> Mounting the rootfs was most likely the problem.

Hello Bodhi,

That is exactly what I meant.

BTW, I don't have a problem with a serial/console connection. However, the problem with a Seagate GoFLEX Home is it is very hard to hack its base/doc unit open. A few weeks back, a friend sent me this link that showed the bottom part has two screws. I removed those screws and it still won't come off. If you and/or anyone out here knows how to hack open a Seagate GoFLEX Home base/doc, I certainly would appreciate that.

BTW2, I also just got a 2nd used unit that I had recovered it. Perhaps, the previous owner was a heavy smoker that the unit emits strong smoke odors. I had managed to get rid off such odors from the HDD console by soaking it under liquid detergent overnight. If I can hack open the base/doc unit, I can at least soak the case in liquid detergent over night and also probably brush the board with liquid detergent to get rid off the smoke odors.
Re: Debian uImage
February 24, 2015 09:10PM
habibi,

It is very easy. After you've removed the screws, just use a thin plastic wedge or even a thin knife will work, but will leave some marks. Pry open the bottom plate at the groove, very gently and slowly. There are hinges inside the plate that snap to the vertical walls.

I've done it a few times. You'll might break some small hinges, but as long as there are some remained, they will keep the plate secured.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian uImage
February 25, 2015 09:42AM
Hello Bodhi,

Thank you. That's what I did. After removing the two screws, I inserted a credit card at the front-end side grooves (left and/or right) and it just won't open. After this, the button on the back becomes very hard to use, i.e. pressing it won't stick to ON/OFF and requires some jiggling. I must say that that scared the hell out of me and temporarily put me off. After your assurance, I will try that again sometimes later on.
Re: Debian uImage
February 25, 2015 11:46AM
habibie,

Here is what the disassembled GF Home looks like:
http://archlinuxarm.org/forum/viewtopic.php?f=18&t=3397

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 02/25/2015 11:47AM by bodhi.
Re: Debian uImage
February 25, 2015 10:03PM
bodhi Wrote:
-------------------------------------------------------
> habibie,
>
> Here is what the disassembled GF Home looks like:
> http://archlinuxarm.org/forum/viewtopic.php?f=18&t
> =3397

Hello Bodhi,

That is a nice peace of hack. Thank you.
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: