2.6.32.2 kernel size?

davef
If I look at the size of the 2.6.32.2 kernel zImage (for the 64M machine)
on the downloads page I find it is 2517028.

If I compile the kernel source (without errors) using config_mini2440_n35
the size of zImage is 2058836 and it doesn't work.

Is it incorrect to assume I should get the same kernel size (and proper
operation) compiling it myself?

I would have thought that an unmodified config_mini2440_n35 from
FriendlyArm, as found in the kernel source, would give the same result as
their zImage_N35.

Any ideas about where I am going wrong?

Thanks,
Dave

eduardo
Attachment: config_mini2440_n35 (41.47 KB)
Hi Dave,

eduardo@eduardo-desktop:/opt/FriendlyARM/mini2440/linux-2.6.32.2/arch/arm/boot$
ls -la
total 7612
drwxr-xr-x  4 root root    4096 2010-03-23 08:37 .
drwxr-xr-x 80 root root    4096 2009-12-03 01:51 ..
drwxr-xr-x  2 root root    4096 2009-12-30 02:34 bootp
drwxr-xr-x  2 root root    4096 2010-03-23 08:37 compressed
-rw-r--r--  1 root root      40 2009-12-03 01:51 .gitignore
-rwxr-xr-x  1 root root 5224032 2010-03-23 08:36 Image
-rw-r--r--  1 root root     130 2010-03-23 08:36 .Image.cmd
-rw-r--r--  1 root root    1274 2009-12-03 01:51 install.sh
-rw-r--r--  1 root root    3118 2009-12-03 01:51 Makefile
-rwxr-xr-x  1 root root 2516996 2010-03-23 08:37 zImage
-rw-r--r--  1 root root     157 2010-03-23 08:37 .zImage.cmd
eduardo@eduardo-desktop:/opt/FriendlyARM/mini2440/linux-2.6.32.2/arch/arm/boot$


My own compiled kernel have 2516996 using config_mini2440_n35 (attached).
It works with no problem.
I'm using micro 2440 256mb, supervivi 128m and default rootfs.

eduardo@eduardo-desktop:/opt/FriendlyARM/mini2440/linux-2.6.32.2/arch/arm/boot$
arm-linux-g++ --version
arm-linux-g++ (Sourcery G++ Lite 2008q3-72) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.

Compiled with gcc 4.3.2.


It's not the same result, but very close.

hope it helps.

davef
Edurado,

Thank you for the listing of your boot directory.

I started again with clean a kernel extraction and this time got:

5240416 for the Image and 2517880 for the zImage.

Closer, I'll try it and see if it works.

I see that your config-mini2440_n35 is unmodified.  The fact you are using
a different machine should make not difference to the kernel size.

Did you do the:
arm-linux-g++ while you are in the boot directory?

I got "command not found".

What happens when you do the following in your boot directory:
readelf -a zImage

Did you find your USB?

Thanks,
Dave

eduardo
Hi Dave,

My kernel was downloaded from download section
(http://www.friendlyarm.net/downloads). But I think that this 1mb
difference won't change the kernel behavior too much (i hope... :S).

When I "readelf -a zImage" I got the following:

eduardo@eduardo-desktop:/opt/FriendlyARM/mini2440/linux-2.6.32.2/arch/arm/boot$
readelf -a zImage 
readelf: Error: Unable to seek to 0xea000002 for section headers
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
eduardo@eduardo-desktop:/opt/FriendlyARM/mini2440/linux-2.6.32.2/arch/arm/boot$


I did "arm-linux-g++ --version" on my boot directory. I was showing you my
arm-linux-g++/gcc compiler version.

And I found my usb dir!! Thanks for ask. :D
In fact I had found them some time ago, the problem was on fxload. I was
following the wrong trail... 
Take a look: http://www.friendlyarm.net/forum/topic/794?lang=en

Now it works perfectly.

Regards

davef
Good, we get the same printout for zImage.  I thought it would be a ELF
file, but obviously I thought wrong!

You must have your directories or paths set up different than me as I can't
see my arm-linux-g++ version from my boot directory.  I will investigate
this to ensure that I am compiling against the correct tools.

I still find it odd that with the same config file and the same toolchain
that we end up with different file sizes.  I will ask our ARM kernel guru.

Cheers,
Dave

eduardo
It's really strange... if you discover, please share it with me. 

I forgot to say that arm-linux-g++ is linked on my /usr/bin dir. So I can
use it from everywhere. Take a look:

eduardo@eduardo-desktop:/usr/bin$ ls -la | grep arm-linux
lrwxrwxrwx  1 root   root         50 2009-10-23 15:44 arm-linux-ar ->
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-ar
lrwxrwxrwx  1 root   root         51 2009-10-23 15:42 arm-linux-g++ ->
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-c++
lrwxrwxrwx  1 root   root         51 2009-10-23 15:43 arm-linux-gcc ->
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-gcc
lrwxrwxrwx  1 root   root         50 2009-10-23 15:43 arm-linux-ld ->
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-ld
lrwxrwxrwx  1 root   root         50 2009-10-23 15:59 arm-linux-nm ->
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-nm
lrwxrwxrwx  1 root   root         55 2009-10-23 16:58 arm-linux-objcopy ->
/usr/local/arm/4.3.2/bin/arm-none-linux-gnueabi-objcopy
eduardo@eduardo-desktop:/usr/bin$ 

regards

davef
"Even using the same machine, config, toolchain -- same everything --
recompile the kernel twice or thrice, and you'll get "probably" different
sizes. Ideally it would tend to be smaller with more iterations... but it's
not an ideal world."

And that is from a ARM kernel guru.

I have kept my toolchains separate from /usr/bin, so that explains why I
don't see my arm-linux-g++ version from "everywhere".

I'll test my new kernel tonight.