Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
526 views
in Technique[技术] by (71.8m points)

embedded linux - Are kernel headers depend on processor type, vendor etc?

I have downloaded the sources for a Linux kernel from kernel.org and created the header files by calling

make ARCH=arm headers_check

I have an embedded platform and ask myself if this is enough because I don't have the header files from the vendor. What are the dependencies of header files? It looks to me that header files are quite hardware specific and I expect that they depend on the CPU type etc.. Is it enough to specify the architecture just by ARCH=arm? Is it probable that a vendor of an arm system creates its own header files for a Linux kernel?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you have a specific ARM board in mind for your project, you can select that board’s defconfig.A defconfig is the kernel’s way of storing the default set of build settings and then sets the configuration for the kernel build.

e.g.

1)make mrproper

2)make ARCH=arm integrator_defconfig

--> here above command sets configuration for the kernel build to the settings in the integrator_defconfig file. The integrator is a device created by ARM for doing development work and is the closest thing in the ARM architecture to a generic device.

same thing can be done for others by settting their respective specific board like versatilepb,vexpress, exynox,...etc.

You can find default configuration in ../arch/arm/configs/ in kernel source-code. next

3)make ARCH=arm INSTALL_HDR_PATH=dest headers_install

which installs specific board configured header files so that these files have information about how to call kernel services that the C libraries use to access kernel functionality


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...