# U-Boot: sunXi # Maintainer: Kevin Mihelich buildarch=4 pkgbase=uboot-sunxi pkgname=('uboot-cubieboard2') pkgver=2013.07 pkgrel=3 arch=('armv7h') url="https://github.com/linux-sunxi/u-boot-sunxi/tree/sunxi-current" license=('GPL') makedepends=('sunxi-tools') _commit=29689232f8a4d1640e551ef433176b81cecfa9c7 source=("https://github.com/linux-sunxi/u-boot-sunxi/archive/${_commit}.tar.gz" 'alarm.patch' 'cubieboard2.fex' 'cubieboard2.env') md5sums=('7612f5c721a2804a36b41ba33925be02' '8b95ce286b84f52928bc0b4b07edd00a' '7423919c2ead208c5a04756edb6b948c' 'f73bce6dba2b239f49fb2a161b63d521') prepare() { cd u-boot-sunxi-${_commit} patch -p1 -i "${srcdir}"/alarm.patch } build() { cd u-boot-sunxi-${_commit} unset CFLAGS unset CXXFLAGS unset LDFLAGS for i in Cubieboard2; do mkdir bin_${i} make distclean make ${i} mv u-boot.bin spl/sunxi-spl.bin bin_${i} done } package_uboot-cubieboard2() { pkgdesc="U-Boot for Cubieboard 2" install=${pkgbase}.install mkdir -p "${pkgdir}"/boot cp u-boot-sunxi-${_commit}/bin_Cubieboard2/{u-boot.bin,sunxi-spl.bin} "${pkgdir}"/boot fex2bin cubieboard2.fex "${pkgdir}"/boot/script.bin cp cubieboard2.env "${pkgdir}"/boot/uEnv.txt }