2020-12-10 17:34:32 +00:00
|
|
|
# Maintainer: Oleg Rakhmanov <oleg [at] archlinuxarm [dot] org>
|
2016-12-11 21:19:53 +00:00
|
|
|
# Maintainer: Kevin Mihelich <kevin@archlinuxarm.org>
|
2020-10-16 17:28:09 +00:00
|
|
|
# Maintainer: graysky <graysky@archlinux.us>
|
2016-12-11 21:19:53 +00:00
|
|
|
|
2020-12-10 17:34:32 +00:00
|
|
|
buildarch=28
|
2015-02-04 00:54:33 +00:00
|
|
|
|
2016-12-11 21:19:53 +00:00
|
|
|
pkgname=raspberrypi-firmware
|
2021-12-01 12:36:50 +00:00
|
|
|
pkgver=20211201
|
2021-10-04 10:59:34 +00:00
|
|
|
pkgrel=1
|
2021-12-01 12:36:50 +00:00
|
|
|
_commitfirmware=1a0297bfbf7c970f657c11edc42b22a671170d18
|
2021-11-25 15:56:36 +00:00
|
|
|
_commituserland=14b90ff9d9f031391a299e6e006965d02bfd1bb1
|
2016-12-11 21:19:53 +00:00
|
|
|
pkgdesc="Firmware tools, libraries, and headers for Raspberry Pi"
|
2020-12-10 17:34:32 +00:00
|
|
|
arch=('armv6h' 'armv7h' 'aarch64')
|
2020-12-11 23:05:37 +00:00
|
|
|
url="https://github.com/raspberrypi/firmware"
|
2012-03-17 18:53:40 +00:00
|
|
|
license=('custom')
|
2020-12-11 23:05:37 +00:00
|
|
|
makedepends_aarch64=('cmake')
|
2016-12-11 21:19:53 +00:00
|
|
|
replaces=('raspberrypi-firmware-tools')
|
2016-12-11 23:20:31 +00:00
|
|
|
provides=('raspberrypi-firmware-tools')
|
2012-03-17 18:53:40 +00:00
|
|
|
options=(!strip)
|
2020-12-28 14:53:14 +00:00
|
|
|
source=('00-raspberrypi-firmware.conf'
|
2021-02-13 15:00:09 +00:00
|
|
|
'10-raspberrypi-firmware.rules'
|
|
|
|
'raspberrypi-firmware.sh')
|
2021-11-23 21:28:47 +00:00
|
|
|
source_armv6h=("firmware-$pkgver-$pkgrel-${_commitfirmware:0:10}.tar.gz::https://github.com/raspberrypi/firmware/archive/$_commitfirmware.tar.gz")
|
|
|
|
source_armv7h=("firmware-$pkgver-$pkgrel-${_commitfirmware:0:10}.tar.gz::https://github.com/raspberrypi/firmware/archive/$_commitfirmware.tar.gz")
|
|
|
|
source_aarch64=("userland-$pkgver-$pkgrel-${_commituserland:0:10}.tar.gz::https://github.com/raspberrypi/userland/archive/$_commituserland.tar.gz"
|
2020-12-11 23:05:37 +00:00
|
|
|
"https://raw.githubusercontent.com/raspberrypi/firmware/master/opt/vc/LICENCE")
|
2020-12-28 14:53:14 +00:00
|
|
|
md5sums=('72e0d5818fc513ece1b964f25f7e7882'
|
2021-02-13 15:00:09 +00:00
|
|
|
'2ad54baf398afe59ff5a70eb655f1b96'
|
2021-02-15 19:07:24 +00:00
|
|
|
'60919cb17f31b4698b6650bbb46f18ed')
|
2021-12-01 12:36:50 +00:00
|
|
|
md5sums_armv6h=('57381f8f8a3140bee5c5bb39c4851cff')
|
|
|
|
md5sums_armv7h=('57381f8f8a3140bee5c5bb39c4851cff')
|
2021-11-25 15:56:36 +00:00
|
|
|
md5sums_aarch64=('88faeef362e7a08b7873ef1491de13b6'
|
2020-12-11 23:05:37 +00:00
|
|
|
'86e53f5f5909ee66900418028de11780')
|
2020-12-10 17:34:32 +00:00
|
|
|
|
|
|
|
build() {
|
|
|
|
if [[ "${CARCH}" = 'aarch64' ]]; then
|
2021-04-27 11:24:29 +00:00
|
|
|
cd "${srcdir}/userland-${_commituserland}"
|
2020-12-10 17:34:32 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DARM64=ON
|
2020-12-11 23:05:37 +00:00
|
|
|
make
|
2020-12-10 17:34:32 +00:00
|
|
|
fi
|
|
|
|
}
|
2012-05-18 22:58:41 +00:00
|
|
|
|
2016-12-11 21:19:53 +00:00
|
|
|
package() {
|
2020-12-28 14:53:14 +00:00
|
|
|
# setup permissions on video group for /opt/vc/bin/vcgencmd
|
|
|
|
install -Dm0644 "$srcdir/10-raspberrypi-firmware.rules" "$pkgdir/usr/lib/udev/rules.d/10-raspberrypi-firmware.rules"
|
|
|
|
|
2021-02-13 15:00:09 +00:00
|
|
|
# setup PATH to hit /opt/vc/bin/
|
2021-02-13 19:30:02 +00:00
|
|
|
install -Dt "$pkgdir/etc/profile.d" -m644 raspberrypi-firmware.sh
|
2021-04-27 11:24:29 +00:00
|
|
|
|
2021-04-26 13:17:45 +00:00
|
|
|
mkdir -p "${pkgdir}"/opt/vc
|
2021-02-13 15:00:09 +00:00
|
|
|
|
2020-12-11 23:05:37 +00:00
|
|
|
if [[ "${CARCH}" = 'aarch64' ]]; then
|
|
|
|
cd ${srcdir}/userland-${_commituserland}
|
|
|
|
make install DESTDIR="${pkgdir}"
|
|
|
|
install -m644 ../LICENCE "${pkgdir}"/opt/vc/LICENCE
|
|
|
|
rm -rf "${pkgdir}"/opt/vc/src
|
2012-08-07 16:03:08 +00:00
|
|
|
|
2020-12-11 23:05:37 +00:00
|
|
|
# Remove executable flag on shared objects
|
|
|
|
find "${pkgdir}" -type f -name '*.so' -print0 | xargs -0 chmod -x
|
2013-01-08 00:01:52 +00:00
|
|
|
|
2020-12-11 23:05:37 +00:00
|
|
|
# Create lib links
|
|
|
|
mkdir -p "${pkgdir}"/etc/ld.so.conf.d/
|
|
|
|
install -m644 ../00-raspberrypi-firmware.conf "${pkgdir}"/etc/ld.so.conf.d/00-raspberrypi-firmware.conf
|
2021-04-26 13:17:45 +00:00
|
|
|
else
|
2020-12-11 23:05:37 +00:00
|
|
|
cp -R "${srcdir}"/firmware-${_commitfirmware}/hardfp/opt/vc/{bin,include,lib,LICENCE} "${pkgdir}"/opt/vc
|
2021-04-27 11:24:29 +00:00
|
|
|
cp -R "${srcdir}"/firmware-${_commitfirmware}/opt/vc/man "${pkgdir}"/opt/vc
|
2020-12-10 17:34:32 +00:00
|
|
|
|
2020-12-11 23:05:37 +00:00
|
|
|
# Create lib links
|
|
|
|
mkdir -p "${pkgdir}"/etc/ld.so.conf.d/
|
|
|
|
cp "${srcdir}/00-raspberrypi-firmware.conf" "${pkgdir}"/etc/ld.so.conf.d/
|
2020-12-10 17:34:32 +00:00
|
|
|
fi
|
2021-04-27 11:24:29 +00:00
|
|
|
|
|
|
|
# Install man pages to /usr/share/man/ not to /opt/vc/man/
|
|
|
|
mkdir -p "${pkgdir}"/usr/share/man/man{1,7}
|
|
|
|
mv "${pkgdir}"/opt/vc/man/man1/*.1 "${pkgdir}"/usr/share/man/man1
|
|
|
|
mv "${pkgdir}"/opt/vc/man/man7/*.7 "${pkgdir}"/usr/share/man/man7
|
|
|
|
rm -rf "${pkgdir}"/opt/vc/man
|
2012-03-17 18:53:40 +00:00
|
|
|
}
|