|
楼主 |
发表于 2005-3-22 07:28:34
|
显示全部楼层
请教:我想通过ABS编译kernel26,但又想做到以下几点
先把ABS上同步来的PKGBUILD贴出来吧。再跟一个帖子看着问。
- # $Id: PKGBUILD,v 1.43 2005/03/15 02:38:30 judd Exp $
- # Maintainer: judd <jvinet@zeroflux.org>
- pkgname=kernel26
- pkgver=2.6.11.3
- pkgrel=1
- pkgdesc="The Linux Kernel and modules (IDE support)"
- url="http://www.kernel.org"
- backup=('boot/kconfig26')
- depends=('module-init-tools')
- install=kernel26.install
- source=(ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.3.tar.bz2 \
- config logo_linux_clut224.ppm \
- #http://www.acm.rpi.edu/~dilinger/patches/2.6.10/as2/patch-2.6.10-as2.gz \
- http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.6.11/acpi-20050228-2.6.11.diff.bz2 \
- http://ck.kolivas.org/patches/2.6/2.6.11/2.6.11-ck1/patches/nvidia_6111-6629_compat2.diff \
- http://gaugusch.at/acpi-dsdt-initrd-patches/acpi-dsdt-initrd-patch-v0.7d-2.6.9.patch)
- md5sums=('9328d85d07e4d02001e0e2ff13a8120d' '69a957616071eae6196db00a410b82db'\
- '5a62bcc7e96601052c7405459b483826' '627ebe9d46c2b34a7b6783fae99c59de'\
- '82488604906bbba37a412c78d7b5c5f0' '977bc6069e122e5f07b0311e094b5733')
- build() {
- cd $startdir/src/linux-2.6.11.3
- patch -Np1 -i ../acpi-20050228-2.6.11.diff || return 1
- patch -Np1 -i ../nvidia_6111-6629_compat2.diff || return 1
- patch -Np1 -i ../acpi-dsdt-initrd-patch-v0.7d-2.6.9.patch || return 1
- # various fixes by Andres Salomon
- #patch -Np1 -i ../patch-$pkgver-as2 || return 1
- # remove the -as2 tag
- #sed -i 's|^EXTRAVERSION = .*$|EXTRAVERSION =|g' Makefile
- # Arch logo!
- cp ../logo_linux_clut224.ppm drivers/video/logo/
- # get rid of the 'i' in i686
- carch=`echo $CARCH | sed 's|i||'`
- cat ../config | sed "s|#CARCH#|$carch|g" >./.config
- # build the full kernel version to use in pathnames
- . ./.config
- _kernver="${pkgver}${CONFIG_LOCALVERSION}"
- # load configuration
- yes "" | make config
- # build!
- make clean bzImage modules || return 1
- mkdir -p $startdir/pkg/{lib/modules,boot}
- make INSTALL_MOD_PATH=$startdir/pkg modules_install || return 1
- cp System.map $startdir/pkg/boot/System.map26
- cp arch/i386/boot/bzImage $startdir/pkg/boot/vmlinuz26
- install -D -m644 Makefile \
- $startdir/pkg/usr/src/linux-${_kernver}/Makefile
- install -D -m644 .config \
- $startdir/pkg/usr/src/linux-${_kernver}/.config
- install -D -m644 .config $startdir/pkg/boot/kconfig26
- mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/include
- mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/arch/i386/kernel
- for i in acpi asm-generic asm-i386 config linux math-emu net pcmcia scsi video; do
- cp -a include/$i $startdir/pkg/usr/src/linux-${_kernver}/include/
- done
- # copy files necessary for later builds, like nvidia and vmware
- cp -a scripts $startdir/pkg/usr/src/linux-${_kernver}
- mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/.tmp_versions
- cp arch/i386/Makefile $startdir/pkg/usr/src/linux-${_kernver}/arch/i386/
- cp arch/i386/kernel/asm-offsets.s \
- $startdir/pkg/usr/src/linux-${_kernver}/arch/i386/kernel/
- # copy in Kconfig files
- for i in `find . -name "Kconfig*"`; do
- mkdir -p $startdir/pkg/usr/src/linux-${_kernver}/`echo $i | sed 's|/Kconfig.*||'`
- cp $i $startdir/pkg/usr/src/linux-${_kernver}/$i
- done
- cd $startdir/pkg/usr/src/linux-${_kernver}/include && ln -s asm-i386 asm
- chown -R root.root $startdir/pkg/usr/src/linux-${_kernver}
- cd $startdir/pkg/lib/modules/${_kernver} && \
- (rm -f source build; ln -sf /usr/src/linux-${_kernver} build)
- }
复制代码 |
|