Re: kernel cross-compile problem with embdebian's toolchain
I found the base problem, maybe a bug in binutils's objcopy...
So I have a kernel source (2.6.28.7) with drivers and config for my board and I compile it in two toochain... (old: original toolchain for my board (it works), new: emdebian toolchain (it isn't works))
Look the sizes! Compiling steps:
1., make ARCH=arm CROSS_COMPILE=$CROSS_COMPILE
old toolchain:
devel:~# ll old/vmlinux
-rwxr-xr-x 1 root root 28799987 2009-03-13 18:25 old/vmlinux
new:
devel:~# ll new/vmlinux
-rwxr-xr-x 1 root root 31585046 2009-03-13 18:33 new/vmlinux
no big differences in sizes
2., ${CROSS_COMPILE}objcopy -O binary -R .note -R .comment -S vmlinux linux.bin
old toolchain:
devel:~# ll old/linux.bin
-rwxr-xr-x 1 root root 3093848 2009-03-13 18:27 old/linux.bin
new toolchain:
devel:~# ll new/linux.bin
-rw-r--r-- 1 root root 3224300256 2009-03-13 18:33 new/linux.bin
BIG DIFFERENCE IN SIZES... After some stripe: Old toolchain: 29MB->3MB New toolchain: 32MB->3,2GB ??????????????????????
Still not end ;)
3., gzip -9 linux.bin
old toolchain:
devel:~# ll old/linux.bin.gz
-rwxr-xr-x 1 root root 1499911 2009-03-13 18:27 old/linux.bin.gz
new toolchain:
devel:~# ll new/linux.bin.gz
-rw-r--r-- 1 root root 4601072 2009-03-13 18:33 new/linux.bin.gz
Wow: old toolchain: 3MB->1,5MB, new toolchain: 3,2GB->4MB ?????????????????????????? Good algorithm ;)
4., make u-boot image
nothing strange here ;)
So it looks like somehow the emdebian's objcopy make something strange with my kernel image...
I put my kernel image (which I create with emdebian toolchain) to rapidshare:
http://rapidshare.com/files/208870801/vmlinux.html
MD5: 6B85E9BC0928D3FA0EE02008217B92A7
my emdebian's toolchain versions:
devel:~# dpkg -l|grep arm
ii binutils-arm-linux-gnu 2.18.1~cvs20080103-7 The GNU binary utilities, for arm-linux-gnu
ii cpp-4.3-arm-linux-gnu 4.3.2-1.1 The GNU C preprocessor
ii g++-4.3-arm-linux-gnu 4.3.2-1.1 The GNU C++ compiler
ii gcc-4.3-arm-linux-gnu 4.3.2-1.1 The GNU C compiler
ii gcc-4.3-arm-linux-gnu-base 4.3.2-1.1 The GNU Compiler Collection (base package)
ii libc6-arm-cross 2.7-18 GNU C Library: Shared libraries (for cross-c
ii libc6-dev-arm-cross 2.7-18 GNU C Library: Development Libraries and Hea
ii libgcc1-arm-cross 1:4.3.2-1.1 GCC support library
ii libstdc++6-4.3-dev-arm-cross 4.3.2-1.1 The GNU Standard C++ Library v3 (development
ii libstdc++6-arm-cross 4.3.2-1.1 The GNU Standard C++ Library v3
ii linux-libc-dev-arm-cross 2.6.26-13 Linux support headers for userspace developm
regards,
Balázs
Zachár Balázs wrote:
> I think I found the solution to my problem:
>
> I am using tftp to download the kernel to my board...
> It load the kernel (gzipped with -9) uboot image (about 4,3MB) to 0xa1000000
> The kernel load point is 0xa0008000
> So it has about 16MB
> But my kernel is about 27MB so when uboot unzip my kernel it is using the kernel u-boot image's memory space too and it overwrite it, so it unzip trash!
>
> Am I right?
>
>
> Hector Oron wrote:
>>> ii libc6-arm-cross 2.7-18 GNU C Library: Shared libraries (for cross-c
>>> ii libc6-dev-arm-cross 2.7-15 GNU C Library: Development Libraries and Hea
>> Could you try to get correct libc6-dev-arm-cross package?
>> apt-cross -a arm -i libc6-dev (or similar should work)
>>
>> I need to correct repository versions, i was looking last night that i
>> am missing some bits
>>
>>
>
>
Reply to: