LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 532|回复: 4

HowTo Upgrade 2.6 With Patches; 2.6.0-test5

[复制链接]
发表于 2003-9-17 17:38:43 | 显示全部楼层 |阅读模式
Linux creator Linus Torvalds has released the linux 2.6.0-test5 kernel, with the following comments:

"Lots of small stuff, as usual. I think the biggest "core" change is the Futex changes by Jamie and Hugh, and the dev_t preparations by Al Viro. But there are ARM and ppc updates here too, and a few drivers have bigger fixes (tg3 driver and the USB gadget interface stand out on diffstat). Watchdog driver updates etc. And Russell King fixed more PCMCIA issues."

Read on for the full changelog.

Additionally, if you followed my recent upgrade howto [story], are running 2.6.0-test4, and are interested in upgrading to 2.6.0-test5, read on for a few simple tips on upgrading with incremental patches.

Step 0: Make a backup of important data.
You know the drill... if you're going to be running a development kernel be sure that you have a current backup of any important data.

Step 1: Obtain the 2.6.0-test5 patch.
If you're already running 2.6.0-test4 installed from source, then all you need to download is 'patch-2.6.0-test5.bz2' at 706 KB, or 'patch-2.6.0-test5.gz' at 827 KB. (It's also recommended that you download the *.sign file and verify the validity of your patch) This is much preferred to downloading the entire kernel, which even bzip2'd weighs in at nearly 40 MB.

Find a local mirror from here:http://kernel.org/mirrors/.

If you're trying to install a 2.6.0-test kernel for the first time, please refer to our earlier upgrading to 2.6 howto [story].

Step 2: Apply the 2.6.0-test5 patch.
Applying the patch to upgrade your source from 2.6.0-test4 to 2.6.0-test5 is a simple one line command. However, I tend to prefer to keep a copy of old source tree around "just in case", operating on the principal that hard drive space is cheap.

Here's what I did to patch my kernel:

# cd /usr/src
# cp -r linux-2.6.0-test4 linux-2.6.0-test5
# mv ~/patch-2.6.0-test5.bz2 .
# cd linux-2.6.0-test5
# bzip2 -dc ../patch-2.6.0-test5.bz2 | patch -p1

It's the last line that does the actual patching, taken straight out of the README that's in the top level of your Linux kernel source tree. If you're using a *.gz version of the patch, simply replace 'bzip2' with 'gzip' in that command.

Step 3: Cleanup old .o files and dependencies.
Now that your kernel source tree is patched up to 2.4.0-test5, be sure to remove the many old object files and dependencies. This is done with 'make mrproper', as follows:

# pwd
/usr/src/linux-2.6.0-test5
# make mrproper

Note: If you didn't save your old source tree, be sure to save a copy of your '.config' file before running 'make mrproper'!

Step 4: Configure your new kernel.
This step is made much simpler thanks to having already compiled a 2.6.0-test4 kernel. We'll use your old '.config' configuration file and the text based 'make oldconfig' method as follows:

# pwd
/usr/src/linux-2.6.0-test5
# cp ../linux-2.6.0-test4/.config .
# make oldconfig

Most all the options will zoom by, automatically answered based on your existing .config file. You'll only be asked about new options. For example, if upgrading from 2.6.0-test4, you'll see the following three new options:

HPET Timer Support (HPET_TIMER) [N/y/?] (NEW)
legacy /proc/scsi/ support (SCSI_PROC_FS) [Y/n/?] (NEW)
AMD Opteron/Athlon64 on-CPU GART support (AGP_AMD64) [N/m/y/?] (NEW)

Step 5: Build your new kernel.
To build a new kernel, type 'make bzImage'. If you've chosen to compile any modules, you'll also need to 'make modules' and 'make modules_install'. Or, you can string it all together like 'make bzImage && make modules && make modules_install'.

If you're curious about what other 'make' options there are when building your kernel, try 'make help'. For example, if building on an i386, you'll see from the resulting screen that a simple 'make' will automatically build 'bzImage' and 'modules' both. In other words, you could also do 'make && make modules_install'.

Step 6: Install your new kernel.
As before, now that you've built your kernel, you need to copy it into place. You'll want to copy this file and your new System.map into /boot. For example:

# pwd
/usr/src/linux-2.6.0-test5
# mv arch/i386/boot/bzImage /boot/bzImage-2.6.0-test5
# mv System.map /boot/System.map-2.6.0-test5
# cd /boot
# rm System.map
# ln -s System.map-2.6.0-test5 System.map

Having copied your new kernel into place, now you need to configure your boot loader. You're probably using grub [manual] or lilo [howto], refer to the appropriate documentation if you're unsure how your boot loader works.

Step 7: It's still not too late...
Even though you've probably had an excellent experience with running the 2.6.0-test4 kernel, I still recommend that if you have any important data on your hard drive now is still not late to make a back up.

Step 8: Try your new kernel.
It's time to reboot your computer and test your newly compiled 2.6 kernel. If you've done everything correctly, you'll watch some friendly boot messages, and then be prompted to login.

From: Linus Torvalds email blocked
To: Kernel Mailing List email blocked
Subject: Linux 2.6.0-test5
Date: Mon, 8 Sep 2003 13:32:05 -0700 (PDT)

Lots of small stuff, as usual. I think the biggest "core" change is the
Futex changes by Jamie and Hugh, and the dev_t preparations by Al Viro.

But there are ARM and ppc updates here too, and a few drivers have bigger
fixes (tg3 driver and the USB gadget interface stand out on diffstat).
Watchdog driver updates etc. And Russell King fixed more PCMCIA issues.

Linus
发表于 2003-9-17 20:30:44 | 显示全部楼层
需要这么麻烦吗?
发表于 2003-9-17 21:09:02 | 显示全部楼层
ltkun 版主老大, Linus他老人家说的话能有错吗?
发表于 2003-9-17 22:35:58 | 显示全部楼层
没人提那些头文件应该怎么处理。
2.4.*里的make symlinks在这里已经没用了。
发表于 2003-9-17 23:07:16 | 显示全部楼层
最初由 Glue 发表
没人提那些头文件应该怎么处理。
2.4.*里的make symlinks在这里已经没用了。


just leave them untouched
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表