PKGBUILDs/core/kernel26-dockstar/PKGBUILD
2010-11-15 19:01:19 -06:00

66 lines
2.1 KiB
Bash

# Maintainer: Mike Staszel <mikestaszel@gmail.com>
# This PKGBUILD makes a kernel for the DockStar with aholler's LED patches.
# It also includes scsi.h from http://lxr.linux.no/linux+v2.6.36/include/scsi/
pkgname=kernel26-dockstar
pkgver=2.6.36
pkgrel=3
pkgdesc="The Linux Kernel and modules with DockStar LEDs"
arch=('arm')
license=('GPL2')
url="http://www.kernel.org"
depends=('coreutils' 'module-init-tools')
makedepends=('uboot-mkimage')
conflicts=('kernel26')
provides=('kernel26')
install=kernel26-dockstar.install
source=(http://www.kernel.org/pub/linux/kernel/v2.6/linux-$pkgver.tar.bz2
dockstar-2.6.35.4.config
0001-MTD-partitons-used-by-the-Seagate-FreeAgent-DockStar.patch
0002-LED-definitions-for-the-Seagate-FreeAgent-DockStar.patch
0003-Change-board-name-for-the-SheevaPlug-to-reflect-the-.patch
scsi.h)
md5sums=('61f3739a73afb6914cb007f37fb09b62'
'2ef2ffc70856cd8e91816973760833c5'
'0ed85186b0b5446c4afbbc45639a7466'
'e81eae381cc2c282d169c879cc4da54b'
'75287077b9a0105156977acb85d57546'
'4e6a77d9f8ebc242eb3b7694cf86643b')
LDFLAGS=""
build() {
cd $srcdir/
cp 000* dockstar-2.6.35.4.config linux-$pkgver/
cd linux-$pkgver
# Apply Aholler's DockStar hardware patches
patch -p1 -i 0001-MTD-partitons-used-by-the-Seagate-FreeAgent-DockStar.patch
patch -p1 -i 0002-LED-definitions-for-the-Seagate-FreeAgent-DockStar.patch
patch -p1 -i 0003-Change-board-name-for-the-SheevaPlug-to-reflect-the-.patch
# Prepare for make
mv dockstar-2.6.35.4.config .config
echo "Press ENTER 4972 times..."
make oldconfig
make menuconfig
# Make!
make modules uImage || return 1
# Pack up the created uImage
mkdir -p $pkgdir/boot
cp $srcdir/linux-$pkgver/arch/arm/boot/uImage $pkgdir/boot/
# Make and package kernel modules
mkdir -p $pkgdir/{lib/modules,boot}
make INSTALL_MOD_PATH=${pkgdir} modules_install || return 1
# Remove the symlink to the build machine's build directory
rm $pkgdir/lib/modules/$pkgver-dockstar/build
# Hack to put in scsi.h
mkdir -p $pkgdir/usr/include/scsi
cp $srcdir/scsi.h $pkgdir/usr/include/scsi/
}