- 浏览: 291280 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
di1984HIT:
xiexie~~
WebIM Client简单实现 -
di1984HIT:
x谢谢你啊。
bash下的通配符 Wildcard character -
wjilx2008:
您好,我把demo载下来,配置好openfire和apache ...
WebIM Client简单实现 -
除了你无可取代:
demo 能不能发我一份呢? 谢谢喽
WebIM Client简单实现 -
带个回家:
能不能把这些资料发到我的邮箱啊。 454949196@qq.c ...
炒股必杀
Requirements
Well, in order to compile your Linux Kernel, you need at least the following: (already included and updated on most distros)
Hardware
Therefore, the next step is to determine your current hardware, using a terminal move to your home directory (or wherever you wish to save hardware data) and type:
$ lspci > hardware.log
Then we need to have information about our CPU, again, type:
$ cat /proc/cpuinfo > cpuinfo.log
You'll have 2 files now, hardware.log and cpuinfo.log... what for? In order to respond correctly (no, it's not a test, just a cfg file !) some kernel configuration questions in order to tune your machine correctly, this info will come in handy specially when configuring NIC, soundcard, built-in components, etc...
Download kernel source...
We have a bifurcation here and all depends the road you'll take, you candownload a source from your distribution (already packed with all distro hacks,specific hardware support, etc...) or download a "pristine" kernel (community developed, large hardware support, experimental code, etc...). I'll prefer a pristine rathen than a distro pack, if you wish stability and support from your distro then take that way and please READ your distro kernel docs.
Staying with "pristine"? Well, the best place to download the kernel source is athttp://www.kenel.org, but please be generous and use a mirror near you, mirrors shown at http://www.kenel.org/mirrors. Choose a 2.6.x "tar.bz2" tarball and wait (it should not take more than 15 min using a 512 DSL internetconnection).
Extract kernel tarball
Uncompress the tarball as follows:
$ tar jxvf linux-2.6.x.tar.bz2
Replace the "x" with the version you're using. This will generate a directory "linux-2.6.x", get inside and ... let the party begins !
Configure the Linux Kernel
Having a bad day? Try to get a Paracetamol caplet or something because this step is a headache, takes lots of time (30 min at least) in order to configure properly your kernel... one keyword: PATIENCE !
To start configuring, inside the "linux-2.6.x" directory type the following at your terminal:
$ make mrproper
$ make xconfig
The first command will "prepare" some configuration files in order to compile correctly, in the past I received comments of kernel failure, this step seems to correct most of it. The next step will prepare and show your a graphical kernel configuration interface using qt (most of RH-based systems already includes qt), if you receive an error, please refer to your system updater (urpmi, apt, yast, yum ...) and download "qt" and "qt-devel" or any that refers to qt compilers, execution libraries, widgets and source code.
An alternative is to use "menuconfig" in the case you find difficult to get "qt" libraries and source, you can use it by changing "xconfig" with "menuconfig", like this:
$ make menuconfig
This command will need ncurses, but don't worry, most of Linux distros has them already (it is considered as an terminal developing standard to use ncurses ! That's why...)
If everythings smooth a window (or a blue menu inside your terminal) will appear you're ready to start configuring your kernel, open with the editor of your choice the 2 files we saved, remember? (hardware.log and cpuinfo.log) or print it if you wish.
I can't guide you here step-by-step but I can, at least, give to you important tips to follow, please take note:
Compile the Linux Kernel
The final showdown ! Now, after configuring and saving your kernel, type the following at the terminal:
$ make
That's it? Nothing else? No. For "pristine" Linux source tarballs, using the "make" command will build everything you need, using a powerful Intel or AMD processor and a simple configuration will take 10 minutes, this may vary from 7 minutes to 45 minutes or more (old Intel machines). So go and grab a lunch, take a nap or go walk for a while.
When you came back, look at the terminal, if no errors around then... HORAAY !
Install the Linux Kernel Modules
First of all, get root rights and type the following at your terminal:
# make modules_install
This command will install automagically every module you choose, it won't take long, so please wait, after booting with this freshly-baked linux kernel, you can load them as usual.
Prepare your bzImage
This is simple, what you are going to do is to copy 2 files, "System.map" and "bzImage", follow this steps at your terminal (with root right's of course !):
# cp arch/i386/boot/bzImage /boot/bzImage-<version>
# cp System.map /boot/System.map-<version>
# ln -s /boot/System.map-<version> /boot/System.map
<version> refers to the version you downloaded and compiled, this MUST match with this three given instructions.
Create initrd image
Some systems requires this instruction in order to boot the kernel, no problem, just look at "/lib/modules" for the "<version>" you just downloaded and compiled, take this data and do the following inside the "/boot" directory:
# mkinitrd /boot/initrd-<version>.img <version>
If success, nothing will returned, at any errors please read the output and figure it out the correct version you're compiling and installing.
Prepare GRUB and reboot
Finally, prepare "GRUB" for our new kernel image ! first of all, make a backup of /boot/grub/menu.lst and edit this file appending the following matching your new kernel image:
title My Distro (<version>)
title Test Kernel (<version>)
root (hd0,0)
kernel /boot/bzImage-<version> ro root=LABEL=/
initrd /boot/initrd-<version>.img
Please be sure about your HD device, one useful tip is to look and use the configuration from your distro root hd kernel. Be sure about every file path (bzImage and initrd), if everything's OK, then save and... reboot !
Take notes about any event or case
After rebooting, choose "Test Kernel" or any name you input here and check any errors you could have, when you arrive to runlevel 5, run the graphic server, interact with your computer, etc... This information will guide you to any misconfigured kernel parameter or missing module to load, I can't help much around here but If you got a functional system you'll notice that this recent kernel is way more fast than the distro ones... and the confidency that you compiled and tuned it, congratulations ! My job ends here !
Postamble
Thanks for reading ! I hope this would come in handy, before sending any questions or comments, try to read a complete Howto, they include for sure more FAQ's and troubleshooting, this is just an "Starting" guide, I'll appreciate any suggestions, corrections, addings or anything CONSTRUCTIVE. Well, again... Thank's for reading !!!
Reference
http://www.digitalhermit.com/linux/K...ild-HOWTO.html
总结:
#tar jxvf linux-2.6.16.bz2
#cd linux-2.6.16
#make xconfig 或者 make menuconfig
#make
#make modules_install install
发表评论
-
Install Slax on a Hard Drive
2010-08-07 21:45 2235Install on a Hard Drive copy ... -
install Oracle instant client for linux HOWTO
2010-07-28 16:52 2345install Oracle instant client f ... -
Debugging SSH public key authentication problems
2010-02-28 20:36 1514[转载]Debugging SSH public ke ... -
一行命令搞定ssh墙洞
2010-02-24 22:16 586sudo ssh -CfNg -D 8888 ... -
Howto debug nginx
2010-01-29 11:34 1240You need to build nginx with th ... -
Hadoop实践-入门篇
2009-09-23 18:24 2118淘宝的架构师岑文初是我非常佩服的一位架构师,其技术研究深入、严 ... -
服务器时间同步
2009-08-03 09:10 1170windows 2003的时间同步, 单击“开始”,单 ... -
LinuxMint7 发布以及硬盘安装方法
2009-06-04 14:35 1484好消息,非常好用的LinuxMint系统发布了LinuxMin ... -
usb制作启动盘、安装linux mint
2009-03-29 15:10 10909昨日参加beijingopenparty OpenPa ... -
kde4下gtk程序优化
2009-03-17 13:34 1161HOWTO: Make GTK applications lo ... -
crontab 格式备忘
2008-10-23 18:08 1242copy from http://blog.csdn.net/ ... -
jboss 4.2.2 启动多实例配置手册
2008-09-12 17:10 2390如果你想在一台机器上运行多个jboss实例,下面方法你可以 ... -
不输密码登录SSH
2007-10-21 23:13 12346环境:Debian Linux (sarge)openSSH步 ...
相关推荐
**知识点详解:Linux-2.6.32.2内核在mini2440上的移植** 在深入探讨Linux-2.6.32.2内核如何在mini2440开发板上进行移植之前,让我们先了解几个关键概念与步骤。 ### 1. 构建自主开发环境 开发环境的搭建是任何...
### s3c2410全线移植Linux 2.6.14.1及U盘、CS8900A、BusyBox详细过程 #### 一、简介 本指南主要介绍如何在S3C2410平台上进行Linux 2.6.14.1的完整移植工作,包括构建交叉编译环境、编译Bootloader Vivi或U-Boot、...
- 选中`[*] Use the ARM EABI to compile the kernel` - 选中`[*] Allow old ABI binaries to run with this kernel (EXPERIMENTAL)` 2. **Networking**: - 选中`[*] Networking support` - 选中`Networking ...
### Linux-2.6.14.1内核移植到ARM9平台的详细攻略 #### 标题解析:Linux-2.6.14.1内核移植攻略 标题明确了文章的主要内容是关于如何将Linux-2.6.14.1版本的内核移植到ARM9平台上。Linux-2.6.14.1是一个较早的内核...
### Linux 2.6.30.4 驱动移植详解 #### 一、概述 本文档将详细介绍如何在Linux 2.6.30.4内核下,针对S3C2410处理器进行LCD驱动、触摸屏驱动、网卡驱动以及声卡驱动的移植工作。此移植主要在Ubuntu 8.10操作系统环境...
**知识点:Linux-2.6.34.1内核移植至UP2440平台** **一、下载源代码** 在进行内核移植前,首先需从官方网站http://www.kernel.org/下载所需版本的内核源代码。本例中采用的是Linux-2.6.34.1版本。下载命令为`wget ...
在本文中,我们将深入探讨如何将Linux内核版本2.6.32.2成功地移植到Mini2440开发板的过程。Mini2440是一款基于S3C2440处理器的嵌入式开发平台,广泛用于教学和项目开发。Linux内核移植是一项复杂但至关重要的任务,...
在Linux世界中,内核是操作系统的核心部分,它负责管理硬件资源、进程调度、内存管理等关键任务。对于开发者和系统管理员来说,了解并能够编译Linux内核是一项重要的技能。本文将详细介绍如何编译Linux内核,适用于...
- This section discusses how to compile and build the Linux kernel image. It covers the necessary tools, configurations, and steps required to create a custom kernel tailored for specific needs. 2. ...
### Linux-2.6.25.3在S3C2410平台上的移植 #### 一、概述 在嵌入式系统开发过程中,将Linux内核移植到特定硬件平台是一项常见且重要的任务。本篇文章主要介绍了如何将Linux-2.6.25.3这一稳定版本的内核移植到S3C...
在Linux操作系统中,掌握一些基本的shell命令、文本编辑器如vi的使用,以及C语言的编译和调试技巧是至关重要的。以下是对这些主题的深入解析: **shell命令** shell是Linux系统的命令行界面,它允许用户通过输入...
### 移植Linux 2.6.17.13到S3C2410的知识点解析 #### 一、概述 在嵌入式系统开发中,将Linux内核移植到特定硬件平台是一项关键任务。本文将详细介绍如何将Linux 2.6.17.13版本的内核移植到S3C2410平台上,包括前期...
- 拉取Linux 2.6.14.1源码:`git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git` - 配置内核:`make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- defconfig` **2.3 配置系统服务** **...
WsManager A library that simplifies the use of OkHttp ...How to use Instantiate a WsManager object: OkHttpClient okHttpClient = new OkHttpClient().newBuilder() .pingInterval(15, TimeUnit.SECONDS)
然后执行`mvn install`或`mvn compile`,Maven会自动下载并添加依赖到你的项目中。 - **Gradle项目**:类似地,在`build.gradle`文件中添加依赖: ```groovy dependencies { implementation 'commons-dbcp:...
### 如何编译 Linux 内核 2.6 版本 随着技术的发展与进步,Linux 内核作为操作系统的核心部分,在系统管理、性能优化以及安全性方面起着至关重要的作用。对于想要深入了解 Linux 内核并对其进行定制化的用户来说,...
- 使用`tar xvf linux-2.6.38.8.tar.gz`命令解压Linux Kernel 2.6.38.8的源码包。 2. **配置交叉编译环境** - 修改顶层`Makefile`文件,指定目标架构为ARM,并设置交叉编译器路径。例如: ``` ARCH?=arm CROSS_...