How to generate kernel headers of a toolchain for ARM Integrator Target Machine

3.8k views Asked by At

I'm trying to build a toolchain from scratch for ARM Integrator target machine. I started by building binutils and it is OK. Now I have to generate kernel headers and I don't know how to do this in the right way. Any help will be useful.

1

There are 1 answers

0
pbarill On

I searched a lot for this, in order to cross compile gcc.

This example involves the source of linux-3.9.

#cd to the top directory of the kernel source
cd linux-3.9
make mrproper
make ARCH=arm integrator_defconfig
make ARCH=arm headers_check
make ARCH=arm INSTALL_HDR_PATH=$SOMEWHERE headers_install

variable $SOMEWHERE is where you want it extracted.

What if you want something else than integrator? How to find out? Assuming your are still at the top directory of the kernel's source tree, here are the other _defconfig you could use:

ls /arch/arm/configs/*

Idem for other architectures.

Note: If you build a cross toolchain with newlib instead of glibc, you do not need kernel headers. Which library should you use? It depends of your needs. newlib is aimed at embedded solutions.

Sources:

http://pmc.polytechnique.fr/pagesperso/dc/arm-en.html

http://www.ifp.illinois.edu/~nakazato/tips/xgcc.html

http://www.gentoo.org/proj/en/base/embedded/handbook/?part=1&chap=2