# Contributor: Milan P. Stanić # Maintainer: Milan P. Stanić pkgname=crust pkgver=0.5 pkgrel=1 pkgdesc="libre SCP firmware for Allwinner sunxi SoCs" url="https://github.com/crust-firmware/crust" arch="aarch64" # only needed for sunxi ARM64 SOCs license="BSD-3-clause or GPL-2.0-only" options="!check" # no tests makedepends="gcc-or1k-elf binutils-or1k-elf dtc bison flex" source="https://github.com/crust-firmware/crust/archive/v$pkgver/crust-v$pkgver.tar.gz binutils-2.39.patch " _platforms="pinebook pinephone pinetab pine_h64 pine64_plus" for platform in $_platforms do subpackages="$subpackages $pkgname-$platform:_subpackage" done build() { for platform in $_platforms do msg "Building SCP firmware for: $platform" mkdir -p "$builddir"/build/$platform make CROSS_COMPILE=or1k-elf- "$platform"_defconfig make CROSS_COMPILE=or1k-elf- OBJ="$builddir"/build/$platform "$platform"_defconfig scp make clean done } package() { install -Dm644 "$builddir"/LICENSE.md "$pkgdir"/usr/share/license/$pkgname/LICENSE.md } _subpackage() { pkgdesc="SCP Firmware for: ${subpkgname#crust-}" install -Dm644 "$builddir"/build/"${subpkgname#crust-}"/scp/scp.bin "$subpkgdir"/usr/share/crust/"${subpkgname#crust-}"/scp.bin } sha512sums=" 1a3811053fd3a27285a1377888ab5b36e9363a2f5818f69966eb7f5214e571475a2a7865b9e1b68387940a9a7e9dc3841d2458544c155aecc5b9da041eb946ba crust-v0.5.tar.gz cd24118ce079200716aa57467b1db83dfaeb637a865439eaefd027df760bf6f4a630df268baba02b571009236e36656a860396dd9c964d4e489a8ba99d4f744e binutils-2.39.patch "