summaryrefslogtreecommitdiff
path: root/libre/uboot4extlinux-udoo/PKGBUILD
blob: 41f6960a4981e3b7bebcdd69552cfcee92161900 (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# U-Boot: UDOO
# Maintainer: André Silva <emulatorman@parabola.nu>

buildarch=4

pkgbase=uboot4extlinux-udoo
pkgname=('uboot4extlinux-udoo_dl' 'uboot4extlinux-udoo_quad')
pkgver=2015.01
pkgrel=1
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
makedepends=('bc')
backup=(boot/extlinux/extlinux.conf)
source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2"
        '0001-parabola-arm-modifications.patch'
        '0002-kernel-add-support-for-gcc-5.patch'
        'extlinux.conf')
md5sums=('7f08dc9e98a71652bd6968888ed6ec95'
         'f90125a266a2cd80980464f949d03d88'
         '721a46867e189d8dedc6b6f86a536a34'
         'e05d2d41a1bdbbd5d6fec02534784dcd')

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

  patch -Np1 -i ../0001-parabola-arm-modifications.patch
  patch -Np1 -i ../0002-kernel-add-support-for-gcc-5.patch
}

build() {
  cd u-boot-${pkgver}
  
  unset CFLAGS CXXFLAGS LDFLAGS
  
  mkdir bins
  for i in dl quad; do
    make distclean
    make udoo_${i}_config
    make
    mv u-boot.imx bins/u-boot-${i}.imx
  done
}

package_uboot4extlinux-udoo_dl() {
  pkgdesc="U-Boot with Extlinux support for UDOO Dual"
  replaces=('uboot-udoo-dual-linux-libre' 'uboot-udoo-dual-linux-libre-grsec'
            'uboot-udoo-dual' 'uboot-udoo_dl')
  conflicts=('uboot-udoo-dual-linux-libre' 'uboot-udoo-dual-linux-libre-grsec'
             'uboot-udoo-dual' 'uboot-udoo_dl' 'uboot4extlinux-udoo_quad' 'uboot4grub-udoo_dl' 'uboot4grub-udoo_quad')
  install=${pkgbase}.install

  mkdir -p "${pkgdir}"/boot/extlinux
  cp u-boot-${pkgver}/bins/u-boot-dl.imx "${pkgdir}"/boot/u-boot.imx
  cp "${srcdir}"/extlinux.conf "${pkgdir}"/boot/extlinux
}

package_uboot4extlinux-udoo_quad() {
  pkgdesc="U-Boot with Extlinux support for UDOO Quad"
  replaces=('uboot-udoo-quad-linux-libre' 'uboot-udoo-quad-linux-libre-grsec'
            'uboot-udoo-quad' 'uboot-udoo_quad')
  conflicts=('uboot-udoo-quad-linux-libre' 'uboot-udoo-quad-linux-libre-grsec'
             'uboot-udoo-quad' 'uboot-udoo_quad' 'uboot4extlinux-udoo_dl'  'uboot4grub-udoo_dl' 'uboot4grub-udoo_quad')
  install=${pkgbase}.install

  mkdir -p "${pkgdir}"/boot/extlinux
  cp u-boot-${pkgver}/bins/u-boot-quad.imx "${pkgdir}"/boot/u-boot.imx
  cp "${srcdir}"/extlinux.conf "${pkgdir}"/boot/extlinux
}