2022-05-05 17:36:47 +00:00
|
|
|
# Maintainer: graysky <therealgraysky AT protonmail DOT com>
|
2021-05-31 11:08:12 +00:00
|
|
|
|
|
|
|
pkgname=rpi-eeprom
|
2022-08-02 16:58:06 +00:00
|
|
|
_commit=e4f90a89e62051ff658c40c57150d13c7e67553b
|
|
|
|
pkgver=20220802
|
2022-02-09 18:20:18 +00:00
|
|
|
pkgrel=1
|
2021-05-31 11:08:12 +00:00
|
|
|
pkgdesc="Bootloader and VL805 USB controller EEPROM update tool for RPi4"
|
|
|
|
arch=('any')
|
|
|
|
url='https://github.com/raspberrypi/rpi-eeprom'
|
|
|
|
license=('custom')
|
2021-06-05 20:32:58 +00:00
|
|
|
depends=(python pciutils raspberrypi-firmware coreutils binutils)
|
2021-06-12 10:59:02 +00:00
|
|
|
backup=("etc/default/$pkgname-update")
|
2021-11-24 19:28:02 +00:00
|
|
|
source=("$pkgname-$pkgver-${_commit:0:10}.tar.gz::https://github.com/raspberrypi/rpi-eeprom/archive/$_commit.tar.gz")
|
2022-08-02 16:58:06 +00:00
|
|
|
md5sums=('79a279768ac5944d4a9be6fd1ef1e2d4')
|
2021-10-05 12:35:50 +00:00
|
|
|
install="$pkgname.install"
|
2021-05-31 11:08:12 +00:00
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$pkgname-$_commit"
|
|
|
|
install -pd "$pkgdir/usr/bin"
|
|
|
|
install -pm755 rpi-eeprom-config "$pkgdir/usr/bin/rpi-eeprom-config"
|
2021-11-24 19:28:02 +00:00
|
|
|
install -pm755 rpi-eeprom-digest "$pkgdir/usr/bin/rpi-eeprom-digest"
|
2021-05-31 11:08:12 +00:00
|
|
|
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"
|
2022-05-20 09:53:17 +00:00
|
|
|
# remove old images
|
|
|
|
rm -f "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/$target/"pieeprom-202[0,1]*.bin
|
2021-05-31 11:08:12 +00:00
|
|
|
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"
|
2021-11-24 19:28:02 +00:00
|
|
|
|
|
|
|
# firmware files should not be executable
|
|
|
|
find "$pkgdir/usr/lib/firmware/raspberrypi/bootloader" -name '*.bin' -exec chmod 644 '{}' +
|
2022-05-20 09:53:17 +00:00
|
|
|
|
2021-05-31 11:08:12 +00:00
|
|
|
}
|