From c417af20bbf905497e89ff4af57bae346609854c Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Tue, 21 Apr 2020 02:55:39 -0700 Subject: [PATCH 1/2] New Package: atf-rk3399-bl31-2.3. --- srcpkgs/atf-rk3399-bl31/template | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 srcpkgs/atf-rk3399-bl31/template diff --git a/srcpkgs/atf-rk3399-bl31/template b/srcpkgs/atf-rk3399-bl31/template new file mode 100644 index 00000000000..0f0effb0cfb --- /dev/null +++ b/srcpkgs/atf-rk3399-bl31/template @@ -0,0 +1,27 @@ +# Template file for 'atf-rk3399-bl31' +pkgname=atf-rk3399-bl31 +version=2.3 +revision=1 +archs="aarch64*" +wrksrc="trusted-firmware-a-${version}" +build_style=gnu-makefile +short_desc="ARM Trusted Firmware for Rockchip rk3399 boards (ARMv8, bl31 option)" +maintainer="Cameron Nemo " +license="BSD-3-Clause" +homepage="https://developer.trustedfirmware.org/dashboard/view/6/" +distfiles="https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/trusted-firmware-a-${version}.tar.gz" +checksum=37f917922bcef181164908c470a2f941006791c0113d738c498d39d95d543b21 +nostrip=yes + +do_build() { + unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS + if [ "$CROSS_BUILD" ]; then + export CROSS_COMPILE=${XBPS_CROSS_TRIPLET}- + fi + make ${makejobs} PLAT=rk3399 bl31 +} + +do_install() { + vinstall build/rk3399/release/bl31/bl31.elf 0755 usr/lib/trusted-firmware-a/rk3399 + vlicense docs/license.rst +} From a171c0914061be7e318a43e20087de48dc5da923 Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Tue, 21 Apr 2020 02:55:45 -0700 Subject: [PATCH 2/2] pinebookpro-uboot: use atf-rk3399-bl31. --- srcpkgs/pinebookpro-uboot/template | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/srcpkgs/pinebookpro-uboot/template b/srcpkgs/pinebookpro-uboot/template index b1fdd304ed1..f010c16d442 100644 --- a/srcpkgs/pinebookpro-uboot/template +++ b/srcpkgs/pinebookpro-uboot/template @@ -2,9 +2,8 @@ pkgname=pinebookpro-uboot reverts="20200212_1 20200212_2" version=0.0.20200212 -revision=3 +revision=4 _commit_uboot=365495a329c8e92ca4c134562d091df71b75845e -_commit_atf=22d12c4148c373932a7a81e5d1c59a767e143ac2 archs="aarch64*" hostmakedepends="git flex cross-arm-none-eabi dtc python3 bc" depends="u-boot-tools" @@ -23,11 +22,6 @@ do_fetch() { if [ "$XBPS_TARGET_LIBC" = "musl" ]; then touch include/stddef.h fi - - cd "${wrksrc}" - git clone https://github.com/ARM-software/arm-trusted-firmware.git - cd arm-trusted-firmware - git reset --hard ${_commit_atf} } do_configure() { @@ -44,12 +38,9 @@ do_build() { export CROSS_COMPILE=${XBPS_CROSS_TRIPLET}- fi - cd arm-trusted-firmware - make ${makejobs} PLAT=rk3399 - - cd ../pbp-uboot + cd pbp-uboot make ${makejobs} EXTRAVERSION=-${revision} \ - BL31=../arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf + BL31="${XBPS_CROSS_BASE}/usr/lib/trusted-firmware-a/rk3399/bl31.elf" } do_install() {