summaryrefslogtreecommitdiff
path: root/libre-testing/uboot4extlinux-udoo/PKGBUILD
blob: 97d250fb0329209b5833f38877ca72d6f5a450aa (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
# 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=4
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')
sha256sums=('383051a656ebe11757b17d38a3326387e4a1b0949ca8a9e8ee506bf71dac9fde'
            '9590ac46bd68e214da7741bef184ce9588a9f856b025a0d745e95ce7e73caf69'
            '257269c4573712d3454b7c6d53d04b45af1166cb65dd9df73bd397a087f85e1e'
            '1bb0cb3eac527182dcec2cecc128056610cce443eea8e57b0da3eb37e69623ea')

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"
  conflicts=('uboot-udoo' 'uboot4extlinux-udoo' 'uboot4grub-udoo')
  provides=('uboot4extlinux-udoo')
  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"
  conflicts=('uboot-udoo' 'uboot4extlinux-udoo' 'uboot4grub-udoo')
  provides=('uboot4extlinux-udoo')
  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
}