内核头文件是否取决于处理器类型,供应商等? [英] Are kernel headers depend on processor type, vendor etc?

查看:93
本文介绍了内核头文件是否取决于处理器类型,供应商等?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从kernel.org下载了Linux内核的源代码,并通过调用创建了头文件

make ARCH=arm headers_check

我有一个嵌入式平台,问我自己是否足够,因为我没有供应商提供的头文件.头文件的依赖性是什么?在我看来,头文件是非常特定于硬件的,并且我希望它们取决于CPU类型等.仅通过ARCH = arm来指定体系结构就足够了吗?手臂系统的供应商是否有可能为Linux内核创建自己的头文件?

解决方案

如果您的项目有specific ARM board in mind,则可以选择board’s defconfig.defconfig是内核存储default set of build settings的方式,然后sets the configuration用于内核构建.

例如

1)make mrproper

2)make ARCH=arm integrator_defconfig

->在此上面的命令将内核构建的configuration设置为 integrator_defconfig文件.集成器是由ARM创建的用于进行开发工作的设备,并且是ARM体系结构中与通用设备最接近的设备.

可以通过设置其他特定的板(例如versatilepbvexpressexynox等)来为其他人完成同样的事情.

您可以在../arch/arm/configs/的内核源代码中找到默认配置. 下一个

3)make ARCH = arm INSTALL_HDR_PATH = dest headers_install

将安装specific board configured header files,以便这些文件包含有关call kernel services C libraries用于访问内核功能的方式的信息

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?

解决方案

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

这篇关于内核头文件是否取决于处理器类型,供应商等?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆