如何在Linux内核中启用CONFIG_PREEMPT选项? [英] How to enable CONFIG_PREEMPT option in Linux kernel?
问题描述
我是Linux内核编程的新手,试图与x86_64上的旧内核Linux 2.6.32一起使用.我想在其中启用CONFIG_PREEMPT选项,但找不到有关如何执行此操作的信息.我可以使用首选选项编译新内核,但是不知道在这种情况下需要做什么.谁能告诉我
I am new bee in Linux kernel programming, trying to work with an old kernel Linux 2.6.32 on x86_64. I want to enable the CONFIG_PREEMPT option in it but can not find information about how can I do it. I can compile a new kernel with my preferred options, but do not know what I need to do in this case. So can anyone please tell me
如何启用CONFIG_PREEMPT选项?我是否需要使用新的menuconfig再次重新编译内核?在那种情况下,哪个选项负责CONFIG_PREEMPT?
How can I enable CONFIG_PREEMPT option? Do I need to recompile the kernel again with new menuconfig? In that case which option is responsible for CONFIG_PREEMPT?
我认为对于以前使用过此工具的任何人来说都是微不足道的,所以请给我您的宝贵帮助!
I think it's trivial for anyone who worked with this before, so please give me your valuable help!
推荐答案
您可以使用make menuconfig
为内核启用 CONFIG_PREEMPT ;只需从菜单选项中选择它即可.要验证是否已启用它,请检查make menuconfig
生成的.config
文件是否存在以下行:
You can use make menuconfig
to enable CONFIG_PREEMPT for the kernel; just select it from the menu options. To verify that it's enabled, check the .config
file generated by make menuconfig
for the following line:
CONFIG_PREEMPT=y
如果愿意,还可以手动进行修改(make menuconfig
只是用于创建.config
文件的GUI).
You can also make the modification by hand if you prefer (make menuconfig
is simply a GUI to create the .config
file).
一切都配置好之后,用通常的方法重新编译内核:
Once everything is configured, recompile the kernel with the usual:
make && make modules_install && make install
这篇关于如何在Linux内核中启用CONFIG_PREEMPT选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!