Tweaking linux kernel

修改Linux内核

问题 (Question)

I am new to linux programming & interested to tweak linux kernel(though I am not sure, what to tweak, I am planning to write drivers for particular device). To learn internal of kernel, I have started from historic kernel release (first release).

My problem is, how to test whatever changes I am doing for development, without disturbing my current os environment.(ubuntu 12, 64 bit). Is there any way like virtual box, sandbox?

Along with these, if anybody send some good approaches to learn these things, I would be really greatful.

Thank You.

我是新来的Linux Linux内核编程感兴趣的调整(尽管我不确定,什么办法,我计划写为特定的设备驱动程序)。学习的内部核心,我从历史的内核版本开始(第一版)。

我的问题是,如何测试的任何改变,我在发展,而不干扰我的当前操作系统的环境。(Ubuntu 12,64位)。有没有办法像虚拟盒,沙盒?

随着这些,如果有人把一些好的方法来学习这些东西,我会很感激的。

谢谢你

最佳答案 (Best Answer)

If you're new to linux programming then you really don't want to be tweaking the kernel. You really want to be an advanced programmer capable of programming drivers and complex software first.

But yes there is, you can can create a virtual machine using openbox or vmware. If you're really keen on tweaking the kernel you probably want to first just try compiling and configuring the kernel and seeing if that works.

Also make sure you're well acquainted with how the kernel works and advanced OS designs in general.

如果你是新来的Linux编程,那么你真的不想被调整的核心。你真的想成为一个高级程序员可编程驱动器和复杂的软件。

但是,是的,你可以创建使用Openbox或VMware虚拟机。如果你真的想改变你也许想先尝试编译和配置内核和看如果那工作的核心。

还要确保你熟悉如何核心工程和总体设计先进的操作系统。

答案 (Answer) 2

Search in google fr "Kernel configuration" you u will get many links how to configure your own kernel. And one more thing do not use a outdated version of kernel ,always use latest stable release , because a lot of code and API is changed in new versions and no book in market is updated so ,, u have to read from kernel documentation. Thats the best way to learn the most updated information about linux kernel

在谷歌搜索FR”内核配置,”你会得到许多环节如何配置自己的内核。还有一点不使用过时的版本的内核,总是使用最新的稳定版本,因为大量的代码和API的改变在新版本的书是没有市场的更新,所以,你看过内核。这是学习最新的信息关于Linux内核的最好方式

答案 (Answer) 3

Yes, you can test your changes on any of the commonly available virtual machines (VMs); that way, whatever changes you make to the VM kernel won't affect native OS.

Personally, I prefer using CentOS 64 bit on VMWare Player. With this setup, I got away with minimal system maintenance while was able to focus on the actual job at hand. Once the VM is up & running, you can download and compile one of the latest stable releases from kernel.org. Instructions on compiling your downloaded version of kernel could be found here and here; however, this may require little tweaking based on your actual setup. Once the VM is running on your desired version of kernel, using a combination of cscope and ctags will help you immensely in kernel code browsing.

Finally, if you want to become a serious kernel programmer and write your own device drivers, you need to get familiar with it in the first place. Below are a few excellent references -

Going through these books is a tedious job and chances are that you may hit the roadblock from time to time. kernelnewbies mailing list and StackOverflow are some of the few reliable places where people would be happy to answer to your queries.

Good luck!

是的,你可以测试你对任何常用的虚拟机(VM)的变化;这样,无论你改变虚拟机内核不会影响本地操作系统。

就我个人而言,我更喜欢使用CentOS 64点打开(放)VMware Player。此安装,我得到了最小的系统维护,能够专注于手头的工作实际。一旦虚拟机上运行,你可以下载和编译一个最新的稳定版本kernel.org。在编译你的下载版内核指令可能被发现在这里在这里;然而,这可能需要做些调整,根据您的实际安装。一旦该虚拟机是在您想要的版本的内核上运行,使用相结合的cscope和标签将帮助你非常的内核代码浏览。

最后,如果你想成为一个严重的内核程序员写自己的设备驱动程序,你首先需要了解它。下面是一些优秀的参考—

通过这些书是一项繁琐的工作,机会是,你会不时撞上路障。kernelnewbies邮件列表和计算器是少数可靠的地方,人们会很乐意回答你的疑问。

祝你好运!

本文翻译自StackoverFlow,英语好的童鞋可直接参考原文:http://stackoverflow.com/questions/22094443