编译环境
Arch Linux on VirtualBox
下载内核
下载的内核压缩包,此时的最新内核版本为4.1:

解压包
# tar -xvJf linux-4.1.tar.xz
在这里为了方便直接切换到su权限了,如果为普通权限,须在每条命令前加上sudo,如果sudo可用的话。
(命令语句中划线的部分为文件名或目录名,是要根据实际情况更改的部分,后面也会遇到很多)
cd到源码根目录
# cd ~/Documents/linux-4.1
进行设置
这里我使用了当前运行内核的默认设置。
拷贝正在运行的内核的配置文件(.config文件)到编译根目录。
# zcat /proc/config.gz > .config

当然也可以手动设置
# sudo make menuconfig

(末尾参考资料一中有详细的说明)
编译内核
# sudo make [-j ]
后面的参数-j2表示,cpu要开启两个线程来编译内核,可以加快编译速度。
编译完成后的内核文件:

安装模块
# sudo make modules_install

将编译好的内核拷贝到/boot目录
# cp -v arch/x86/boot/bzImage /boot/vmlinuz-YourKernelName
# cp -v arch/x86/boot/bzImage /boot/vmlinuz-YourKernelName
在这里YourKernelName为4.1:
# cp -v arch/x86/boot/bzImage /boot/vmlinuz-4.1
# cp -v arch/x86/boot/bzImage /boot/vmlinuz-4.1

制作初始化内存盘
# mkinitcpio -k FullKernelName /etc/mkinitcpio.conf -g /boot/initramfs-YourKernelName.img
可以通过 ls /lib/modules 命令查询到可用的FullKernelName:

在这里FullKernelName为4.1.0-ARCH(如上图):
# mkinitcpio -k 4.1.0-ARCH -c /etc/mkinitcpio.conf -g /boot/initramfs-4.1.img

[拷贝System.map]
# cp System.map /boot/System.map-YourKernelName
在这里YourKernelName为4.1:
# cp System.map /boot/System.map-4.1
# ln -sf /boot/System.map-YourKernelName /boot/System.map
完成了这部操作后,/boot目录如下图所示:

在这里vmlinuz-linux为当前内核,vmlinuz-4.1为新编译的内核。initramfs-4.1.img为新的初始化内存盘,还有刚拷贝的System.map-4.1文件以及System.map链接。
下面我们需要对新的内核文件和内存盘进行引导,以启动新内核。
设置启动项
# grub-mkconfig -o /boot/grub/grub.cfg

我们可以看到grub自动添加了新的内核,新的内核启动选项在"Advanced options for Arch Linux"中。
重启
# reboot
编译前后内核对比
编译前:

编译后:

参考资料
(感谢Arch-Linux详细的wiki文档)