summaryrefslogtreecommitdiff
path: root/libre/uboot-usbarmory/PKGBUILD
blob: e127af246a4b203485c76356d3305fd7886b426c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# U-Boot: Inverse Path USB Armory
# Maintainer: André Silva <emulatorman@hyperbola.info>

buildarch=4

pkgname=uboot-usbarmory
pkgver=2016.01
pkgrel=1.parabola1
pkgdesc="U-Boot for USB Armory"
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
makedepends=('bc')
depends=('linux-libre')
replaces=('uboot-usbarmory-linux-libre')
conflicts=('uboot4extlinux-usbarmory' 'uboot4grub-usbarmory')
install=${pkgname}.install
backup=(boot/boot.txt boot/boot.scr)
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
        '0001-parabola-arm-modifications.patch'
        'boot.txt'
        'mkscr')
md5sums=('7d4f65fd43d4d706f5c5650e020d899d'
         '15bacb3ff7c9bfb350e7e43f081bd9b3'
         'eb83db44c372a6ff3349e026083f15f9'
         '021623a04afd29ac3f368977140cfbfd')

prepare() {
  cd u-boot-${pkgver}

  patch -Np1 -i ../0001-parabola-arm-modifications.patch
}

build() {
  cd u-boot-${pkgver}

  unset CFLAGS CXXFLAGS LDFLAGS

  make distclean
  make usbarmory_config
  make
}

package() {
  cd u-boot-${pkgver}

  install -d "${pkgdir}"/boot
  install -Dm644 u-boot.imx "${pkgdir}"/boot

  install -Dm644 ../boot.txt "${pkgdir}"/boot/boot.txt
  tools/mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ../boot.txt "${pkgdir}"/boot/boot.scr
  install -Dm755 ../mkscr "${pkgdir}"/boot/mkscr
}