summaryrefslogtreecommitdiff
path: root/PKGBUILD
blob: 97c20003fc0a0ee13c43f8a7e690920f42b82dbe (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
# 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=4
pkgdesc="U-Boot for Pinebook Pro"
arch=('aarch64')
#arch=('x86_64')
url='https://git.eno.space/pbp-uboot'
license=('GPL')
backup=('boot/boot.txt' 'boot/boot.scr')
depends=('uboot-tools')
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"
        'boot.txt'
        'mkscr')
b2sums=('SKIP'
        'SKIP'
        'cf03a62fd803187ab91db0942a5d7f835ffcf75c3b0b6ab8ca8c3e8a6762b328339580f3a80eeb1569bf4bca87a9cd60a83c3713338af2de4244717177c8d363'
        '4ea782264696aa85e30847413088bd338e2beb2ec4e57c2808f80af28ac613ab4ae82b37eb0ff902e66f8a12082a1f9a546bbf20dfeb4c43f59f465987043ede')

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"
  cp idbloader.img u-boot.itb  "${pkgdir}/boot"
  mkimage -A arm -O linux -T script -C none -n "U-Boot boot script" -d ${srcdir}/boot.txt "${pkgdir}/boot/boot.scr"
  cp ${srcdir}/{boot.txt,mkscr} "${pkgdir}"/boot
}