mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
42 lines
1.7 KiB
Bash
42 lines
1.7 KiB
Bash
# Maintainer: graysky <therealgraysky AT protonmail DOT com>
|
|
|
|
pkgname=rpi-eeprom
|
|
_commit=3f85bc0126e271c8b84b99842fcad746bc68f1fd
|
|
pkgver=20221003
|
|
pkgrel=1
|
|
pkgdesc="Bootloader and VL805 USB controller EEPROM update tool for RPi4"
|
|
arch=('any')
|
|
url='https://github.com/raspberrypi/rpi-eeprom'
|
|
license=('custom')
|
|
depends=(python pciutils raspberrypi-firmware coreutils binutils)
|
|
backup=("etc/default/$pkgname-update")
|
|
source=("$pkgname-$pkgver-${_commit:0:10}.tar.gz::https://github.com/raspberrypi/rpi-eeprom/archive/$_commit.tar.gz")
|
|
md5sums=('a6859dfa30890f15175e5130ba36e505')
|
|
install="$pkgname.install"
|
|
|
|
package() {
|
|
cd "$pkgname-$_commit"
|
|
install -pd "$pkgdir/usr/bin"
|
|
install -pm755 rpi-eeprom-config "$pkgdir/usr/bin/rpi-eeprom-config"
|
|
install -pm755 rpi-eeprom-digest "$pkgdir/usr/bin/rpi-eeprom-digest"
|
|
install -pm755 rpi-eeprom-update "$pkgdir/usr/bin/rpi-eeprom-update"
|
|
install -pDm644 "$pkgname-update-default" "$pkgdir/etc/default/$pkgname-update"
|
|
|
|
# Arch ARM does not ship raspi-config
|
|
sed -i '/to change the release/d' "$pkgdir/usr/bin/rpi-eeprom-update"
|
|
|
|
install -pd "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/backup"
|
|
for target in beta critical stable; do
|
|
cp -a "firmware/$target" "$pkgdir/usr/lib/firmware/raspberrypi/bootloader"
|
|
# remove old images
|
|
rm -f "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/$target/"pieeprom-202[0,1]*.bin
|
|
done
|
|
ln -sf critical "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/default"
|
|
ln -sf stable "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/latest"
|
|
|
|
install -pDm644 LICENSE "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
# firmware files should not be executable
|
|
find "$pkgdir/usr/lib/firmware/raspberrypi/bootloader" -name '*.bin' -exec chmod 644 '{}' +
|
|
|
|
}
|