mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-18 22:54:00 +00:00
84 lines
2.3 KiB
Bash
84 lines
2.3 KiB
Bash
buildarch=18
|
|
|
|
pkgbase=raspberrypi-firmware
|
|
pkgname=('raspberrypi-firmware'
|
|
'raspberrypi-firmware-bootloader'
|
|
'raspberrypi-firmware-emergency-kernel'
|
|
'raspberrypi-firmware-tools'
|
|
'raspberrypi-firmware-examples')
|
|
pkgver=20130308
|
|
pkgrel=2
|
|
pkgdesc="Firmware files for Raspberry Pi"
|
|
arch=('any')
|
|
url="https://github.com/raspberrypi/firmware"
|
|
makedepends=('git')
|
|
license=('custom')
|
|
options=(!strip)
|
|
_gitroot=git://github.com/raspberrypi/firmware.git
|
|
_gitname=firmware
|
|
|
|
build() {
|
|
msg "Connecting to GIT server...."
|
|
|
|
if [[ -d "$_gitname" ]]; then
|
|
cd "$_gitname" && git pull origin
|
|
msg "The local files are updated."
|
|
else
|
|
git clone --depth 1 "$_gitroot" "$_gitname"
|
|
fi
|
|
|
|
msg "GIT checkout done or server timeout"
|
|
|
|
rm -f "${srcdir}"/firmware/boot/kernel.img
|
|
}
|
|
|
|
package_raspberrypi-firmware() {
|
|
depends=('raspberrypi-firmware-bootloader'
|
|
'raspberrypi-firmware-emergency-kernel'
|
|
'raspberrypi-firmware-tools'
|
|
'raspberrypi-firmware-examples')
|
|
}
|
|
|
|
package_raspberrypi-firmware-bootloader() {
|
|
pkgdesc="Bootloader files for Raspberry Pi"
|
|
|
|
cp -R "${srcdir}"/firmware/boot "${pkgdir}"/boot
|
|
rm "${pkgdir}"/boot/{COPYING.linux,kernel*.img}
|
|
}
|
|
|
|
package_raspberrypi-firmware-emergency-kernel() {
|
|
pkgdesc="Emergency kernel for Raspberry Pi"
|
|
|
|
mkdir -p "${pkgdir}"/boot
|
|
cp "${srcdir}"/firmware/boot/{COPYING.linux,kernel*.img} "${pkgdir}"/boot
|
|
}
|
|
|
|
package_raspberrypi-firmware-tools() {
|
|
pkgdesc="Firmware tools and header files for Raspberry Pi"
|
|
|
|
mkdir -p "${pkgdir}"/opt/vc
|
|
|
|
if [[ $CARCH == "arm" ]]; then
|
|
cp -R "${srcdir}"/firmware/opt/vc/{bin,include,lib,sbin,LICENCE} "${pkgdir}"/opt/vc
|
|
elif [[ $CARCH == "armv6h" ]]; then
|
|
cp -R "${srcdir}"/firmware/hardfp/opt/vc/{bin,include,lib,sbin,LICENCE} "${pkgdir}"/opt/vc
|
|
fi
|
|
|
|
# Create lib links
|
|
mkdir -p "${pkgdir}"/etc/ld.so.conf.d/
|
|
|
|
# ensure we can load libs
|
|
echo "/opt/vc/lib/" > "${pkgdir}"/etc/ld.so.conf.d/raspberrypi-firmware.conf
|
|
}
|
|
|
|
package_raspberrypi-firmware-examples() {
|
|
pkgdesc="Firmware example sources for Raspberry Pi"
|
|
|
|
mkdir -p "${pkgdir}"/opt/vc
|
|
|
|
if [[ $CARCH == "arm" ]]; then
|
|
cp -R "${srcdir}"/firmware/opt/vc/src "${pkgdir}"/opt/vc
|
|
elif [[ $CARCH == "armv6h" ]]; then
|
|
cp -R "${srcdir}"/firmware/hardfp/opt/vc/src "${pkgdir}"/opt/vc
|
|
fi
|
|
}
|