|
发表于 2010-9-4 14:04:32
|
显示全部楼层
Post by jqxl0205;2111026
我上个月(8月份)编译打了BFS的补丁的内核都不是有多少次了,最后搞了个ccache(不过感觉没有什么效果)
白开水隐士那个能让看以下你最后的PKGBUILD之类的东西不,我看下能不能结合aur中的kernel26-bfs弄一个只适用自己机器的东西出来。
顺便问下大家:有没有什么方法自动根据机器生成配置文件? 我是先配置好.config,再把下面的PKGBUILD和kernel26.install扔进linux-2.6.35目录中去的。pkgname=kernel26-zk
basekernel=2.6.35
pkgver=2.6.35.4
pkgrel=2
pkgdesc="The Linux Kernel and modules"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.kernel.org"
depends=('module-init-tools' 'mkinitcpio')
provides=(kernel26)
install=kernel26.install
build() {
LOCAL_VERSION="$(grep "CONFIG_LOCALVERSION=" $startdir/.config | sed 's/.*"\(.*\)"/\1/')"
cd ..
make || return 1
mkdir -p $startdir/pkg/{lib/modules,boot}
make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
# There's no separation of firmware depending on kernel version -
# comment this line if you intend on using the built kernel exclusively,
# otherwise there'll be file conflicts with the existing kernel
rm -rf $startdir/pkg/lib/firmware
install -Dm644 "System.map" "$startdir/pkg/boot/System.map26$LOCAL_VERSION"
install -Dm644 "arch/x86/boot/bzImage" "$startdir/pkg/boot/vmlinuz26$LOCAL_VERSION"
# Change the version strings in kernel26.install
sed -i \
-e "s/KERNEL_VERSION=.*/KERNEL_VERSION=\"$basekernel\"/" \
-e "s/LOCAL_VERSION=.*/LOCAL_VERSION=\"$LOCAL_VERSION\"/" \
$startdir/kernel26.install
} kernel26.installKERNEL_VERSION="2.6.35"
LOCAL_VERSION="-zk"
post_install () {
echo ">>> Updating module dependencies..."
/sbin/depmod -A -v ${KERNEL_VERSION}${LOCAL_VERSION}
}
post_upgrade() {
echo ">>> Updating module dependencies..."
/sbin/depmod -A -v ${KERNEL_VERSION}${LOCAL_VERSION}
} |
|