summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 2fc1f840f808444bf10f454906603c8166e2317f (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
# Maintainer: jc_gargma <jc_gargma@iserlohn-fortress.net>
# Maintainer (Manjaro): Dan Johansen <strit@manjaro.org>
# Contributor (Manjaro): Kevin Mihelich 
# Contributor (Manjaro): Adam <adam900710@gmail.com>

# # I maintain this because:
# Not in an official repo and I use it
# Manjaro version fails to build

pkgname=uboot-pinebookpro
pkgver=2020.01
pkgrel=7
pkgdesc="U-Boot for Pinebook Pro"
arch=('aarch64')
#arch=('x86_64')
url='https://git.eno.space/pbp-uboot'
license=('GPL')
backup=('boot/extlinux/extlinux.conf')
makedepends=('arm-none-eabi-gcc' 'bc' 'dtc' 'git' 'python')
install=${pkgname}.install
_commit_atf=22d12c4148c373932a7a81e5d1c59a767e143ac2
source=("git+https://git.eno.space/pbp-uboot.git"
        "git+https://github.com/ARM-software/arm-trusted-firmware.git#commit=$_commit_atf"
        'extlinux.conf')
        #'0001-nvme-support.patch')
b2sums=('SKIP'
        'SKIP'
        '0665108a28eda3f86929da34a5773ad4bb03838438c74687cd798f3f60b62ffdb8d329643752d494ba095d366fc2de3abce94d42de7258667a87846d3dbbffb2')

build() {
  cd arm-trusted-firmware
  unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
  make PLAT=rk3399
  cd ../pbp-uboot
  unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
  make pinebook_pro-rk3399_defconfig
  echo 'CONFIG_IDENT_STRING=" Arch Linux ARM"' >> .config
  make BL31=../arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf EXTRAVERSION=-${pkgrel}
}

package() {
  cd pbp-uboot

  mkdir -p "${pkgdir}/boot/extlinux"
  cp idbloader.img u-boot.itb  "${pkgdir}/boot"
  cp "${srcdir}"/extlinux.conf "${pkgdir}"/boot/extlinux
}