PKGBUILDs/core/uboot-pogo/PKGBUILD
2010-05-23 14:31:09 -05:00

70 lines
3.2 KiB
Bash

# Maintainer: Ian Botley <ianjb@plugboxlinux.org>
# Contributor: Alexander Holler <holler@ahsoftware.de>
# NOTE: Comment out your LDFLAGS in /etc/makepkg.conf for making this!
pkgname=u-boot
pkgver=2010.03
pkgrel=2
pkgdesc="u-Boot for Pogoplug devices"
arch=('arm')
url="ftp://ftp.denx.de/pub/u-boot/"
license=('GPL')
source=(ftp://ftp.denx.de/pub/u-boot/$pkgname-$pkgver.tar.bz2
0001-DockStar-Change-RAM-definitions-to-one-bank-128-MB.patch
0002-DockStar-environment-is-at-0xa0000.patch
0003-DockStar-MTD-partitions.patch
0004-DockStar-Change-prompt-and-ident-string.patch
0005-DockStar-Disable-environment-in-NAND.-We-don-t-want-.patch
0006-DockStar-Add-support-for-ext2.patch
0007-DockStar-Include-long-help-messages.patch
0008-DockStar-Change-TEXT_BASE-from-0x600000-to-0xc00000-.patch
0009-DockStar-Small-build-script.patch
0010-DockStar-Definition-for-the-MAC.-CHANGE-THIS-TO-THE-.patch
0011-DockStar-CONFIG_PREBOOT-kernel-and-netconsole-CHANGE.patch
0012-DockStar-Boot-from-USB-and-netconsole.-CHANGE-THIS-T.patch
0013-DockStar-Workaround-to-get-the-kernel-loaded-after-a.patch
)
md5sums=('2bf5ebf497dddc52440b1ea386cc1332'
'ec91fd91674c43f87d8495bb6ecc60f3'
'2f1002f146b2bdf971ddac8de89136ad'
'8a99b74fe93a303320816f1b947dc793'
'196cd36aba108588bfd0954e7fe966c8'
'cc27674c73094fdaf79ecac15fe340f2'
'694570e1093416834e02e2a110b9ad87'
'030661be86bb7f811d0b2c66ee9ce3c6'
'd6aa5aa3713a7cea1cb2c5af6414fa2e'
'f06f2ec98531de780913e2ed388144f2'
'3b4b3cf8c327b16f92ded26e3d27136b'
'5c289aea0486daa8b969715dbb1367c7'
'a6b9b231c4e9e4eea2d24c5ed028844d'
'af964ca6d1a1456652b1463bd0db0052')
build() {
cd $srcdir/$pkgname-$pkgver
patch -p1 -i $srcdir/0001-DockStar-Change-RAM-definitions-to-one-bank-128-MB.patch || return 1
patch -p1 -i $srcdir/0002-DockStar-environment-is-at-0xa0000.patch || return 1
patch -p1 -i $srcdir/0003-DockStar-MTD-partitions.patch || return 1
patch -p1 -i $srcdir/0004-DockStar-Change-prompt-and-ident-string.patch || return 1
patch -p1 -i $srcdir/0005-DockStar-Disable-environment-in-NAND.-We-don-t-want-.patch || return 1
patch -p1 -i $srcdir/0006-DockStar-Add-support-for-ext2.patch || return 1
patch -p1 -i $srcdir/0007-DockStar-Include-long-help-messages.patch || return 1
patch -p1 -i $srcdir/0008-DockStar-Change-TEXT_BASE-from-0x600000-to-0xc00000-.patch || return 1
patch -p1 -i $srcdir/0009-DockStar-Small-build-script.patch || return 1
patch -p1 -i $srcdir/0010-DockStar-Definition-for-the-MAC.-CHANGE-THIS-TO-THE-.patch || return 1
patch -p1 -i $srcdir/0011-DockStar-CONFIG_PREBOOT-kernel-and-netconsole-CHANGE.patch || return 1
patch -p1 -i $srcdir/0012-DockStar-Boot-from-USB-and-netconsole.-CHANGE-THIS-T.patch || return 1
patch -p1 -i $srcdir/0013-DockStar-Workaround-to-get-the-kernel-loaded-after-a.patch || return 1
make sheevaplug_config || return 1
make u-boot.kwb || return 1
echo "Building u-boot.bin.pagesize"
# Slow but does the trick
bytes=$(stat --format='%s' u-boot.bin)
fillbytes=$[262144-$bytes]
cp u-boot.bin u-boot.bin.pagesize
while [ $fillbytes -ne 0 ]; do
printf "\xff" >>u-boot.bin.pagesize
fillbytes=$[$fillbytes-1]
done
}