How can I generate kernel headers for an “unknown” ARM embedded system?

I have an (old) embedded system for which I want to compile programs. I don't have a toolchain, so I want to create one.

The embedded system has an ARM926EJ-S rev 5 (v5l) processor and "cat / proc / version" says it runs "Linux version 2.6.20.7" with GCC 4.0.2.

I heard that I should include kernel headers in the build process. I download the Linux 2.6.20 kernel from kernel.org, extract all the files and run "make headers_install ARCH = arm INSTALL_HDR_PATH = ~ / headers". Is this correct or are header files needed for a particular kernel?

+3
source share
2 answers

.

make mrproper

make ARCH=${arch} headers_check

e.g make ARCH=arm headers_check

make ARCH=${CLFS_ARCH} INSTALL_HDR_PATH=dest headers_install

.

→ C i.e , , .. C , .

do I need the header files of the specific kernel?

kernel-to-userspace ABI

- > 1) , headers older than the running kernel will work without problem, won't be able new system calls, data structures, ..

- > 2) , newer , , will break.

--- > 3) latest not necessary,

, "Linux version 2.6.20.7"

Linux 2.6.20 2.6.21 kernel.org.

.

+4

, libc

make ARCH=arm headers_check .

+1

All Articles