• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: custom Linux kernel and problems with arm-linux-gnueabi-objdump  (Read 4135 times)
zerros
Newbie
*

Karma: 0
Posts: 7


View Profile
« on: March 27, 2010, 08:32:41 AM »

Hi, sorry for my bd english, I'm a french people.

I'm trying to compile a new Kernel from kernel.org (2.6.32) and I have an error durong
compiling with :
Code:
CC      scripts/mod/empty.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/selinux/mdp/mdp
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  CC      init/main.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  CC      init/do_mounts.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  CC      init/do_mounts_rd.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  CC      init/do_mounts_initrd.o
/bin/sh: arm-linux-gnueabi-objdump: command not found
  LD      init/mounts.o
/bin/sh: arm-linux-gnueabi-ld: command not found
make[2]: *** [init/mounts.o] Erreur 127
make[1]: *** [init] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-2.6.32 »
make: *** [debian/stamp/build/kernel] Erreur 2
zeus:/usr/src/linux# aptitude install arm-linux-gnueabi

I have installed the arm-linux-eabi (debian lenny), but the command doesn't exists.
I'm cros-compiling it on my PC (i386) in a chroot environnment.

Any idea to solve my problem ? Thanks in advance for your help.
Logged

zerros
Newbie
*

Karma: 0
Posts: 7


View Profile
« Reply #1 on: March 30, 2010, 06:04:39 AM »

I have finally found how to cross-compile my own kernel from kernel.org on my desktop PC(i386)

I have done it with 2.6.32 kernel, and I placed it on the MMC card. I have created my own uImage and uInitrd
Now I have 3 .deb packages and 2 files :
- linux-image-2.6.32-zerros-1.0-arm.deb
- linux-headers-2.6.32-zerros-1.0-arm.deb
- linux-source-2.6.32-zerros-1.0-arm.deb
- uImage
- uInitrd

Wink How could I put a Resolve flag on the topic ?

++
Logged

paketecuento
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #2 on: April 01, 2010, 02:23:31 PM »

I have finally found how to cross-compile my own kernel from kernel.org on my desktop PC(i386)

I have done it with 2.6.32 kernel, and I placed it on the MMC card. I have created my own uImage and uInitrd
Now I have 3 .deb packages and 2 files :
- linux-image-2.6.32-zerros-1.0-arm.deb
- linux-headers-2.6.32-zerros-1.0-arm.deb
- linux-source-2.6.32-zerros-1.0-arm.deb
- uImage
- uInitrd

Wink How could I put a Resolve flag on the topic ?

++

Hi zerros,

can you detail your procedure to get deb packages, plase??

I'm stuck crosscompiling my own uImage and headers...

thanks
Logged

zerros
Newbie
*

Karma: 0
Posts: 7


View Profile
« Reply #3 on: April 02, 2010, 01:58:29 AM »

Hi, I will try to explain you how to get a .deb kernel image and headers. I'm french, and i'm trying to write correctly in english.

First, you have to install on your host the packages :
Code:
kernel-package
initramfs-tools
uboot-mkimage

I'm using the eabi toolchain to compile my kernel and progs. You can find it there : http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite
Decompress and mv the directory somewhere in your host.

Now you have to download your kernel from kernel.org, and decompress it. Go into this directory and do :
Code:
export ARCH=arm
make ARCH=arm menuconfig

At this step, you can configure all options you want (I advice you to get the .config of a running kernel on sheevaplug to configure easily your kernel).
Save your new configuration.

Now your can run the cmpiling process using :
Code:
make-kpkg --arch arm --cross_compile /usr/local/arm-2009q3/bin/arm-none-linux-gnueabi --initrd kernel_image kernel_headers

This line force the compilation to use the toolchain eabi and to create a linux-image and linux-headers .deb files
The option --initrd force to create a running initrd image.

BUT, the sheevaplug knows how to use uImage end uInitrd, so, you will need to create one manually (I didn't found hos to do this using make-kpkg).
To do this, you have to chroot on your arm arch on the host system, and install the .deb files.
After that, go into /boot and run :
Code:
mkimage -A arm -O linux -T kernel  -C none -a 0x00008000 -e 0x00008000 -n Linux-2.6.32-zerros -d vmlinuz-2.6.32-zerros uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs -d initrd.img-2.6.32-zerros uInitrd
The command is :
Code:
mkimage -A arm -o linux -T <image type> -C <compression> -e <entry point necessary for nand to boot> -n <image name> -d <image file> <image to create>
If your sheevaplug already running, you can do all this step directly on the plug.

I'm trying to compile a deb package that integrate uImage and uInitrd.

If you have somme question, don't hesitate. I'll try to help you.

++
Logged

paketecuento
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #4 on: April 03, 2010, 01:11:28 AM »

ok, I will give a try.... thanks Wink

Anyway, now I'm able to compile my uImage following some wiki entries like http://computingplugs.com/index.php/Building_a_custom_kernel, but my main need is not to compile new uImages (I think I can do at this moment), but to get the same headers package as you can find in repositories, for example:

* linux-headers-2.6.32.2-kirkwood
* linux-headers-2.6.32.2-common
* linux-kbuild-2.6.32.2

When compiling manually, or even downloading form sheeva.with-linux.com, you get headers with a different structure of directories (there is no scripts directory, nor .config nor Kbuild, for example), and because of that I cannot compile my custom module.

Without repository haders, my compilation of custom modules allways fail. Using repository headers, I can compile... so the question is:

how can I generate the above 3 mentioned deb packages for my custom kernel??

thanks
Logged

paketecuento
Newbie
*

Karma: 0
Posts: 19


View Profile
« Reply #5 on: April 03, 2010, 01:43:44 AM »


BUT, the sheevaplug knows how to use uImage end uInitrd, so, you will need to create one manually (I didn't found hos to do this using make-kpkg).


do you flash uInitrd also???  I have the one I got with sheeva-installer, but I didn't flash anymore when re-flashing new kernels... is it mandatory??

regards
Logged

Pages: [1]
Print
Jump to: