2022-05-05 17:36:47 +00:00
|
|
|
# Maintainer: graysky <therealgraysky AT protonmail DOT com>
|
2021-05-31 11:08:12 +00:00
|
|
|
|
2023-09-30 14:47:36 +00:00
|
|
|
pkgbase=rpi-eeprom
|
|
|
|
pkgname=(rpi4-eeprom rpi5-eeprom)
|
|
|
|
|
2024-04-18 16:44:41 +00:00
|
|
|
_commit=7a1a01c24f48f800ff9ac6fe43fe1e109abf5f9d
|
|
|
|
pkgver=20240417
|
|
|
|
pkgrel=1
|
2023-09-30 14:47:36 +00:00
|
|
|
arch=(any)
|
2021-05-31 11:08:12 +00:00
|
|
|
url='https://github.com/raspberrypi/rpi-eeprom'
|
2023-09-30 14:47:36 +00:00
|
|
|
license=(custom)
|
|
|
|
source=("$pkgbase-$pkgver-${_commit:0:10}.tar.gz::https://github.com/raspberrypi/rpi-eeprom/archive/$_commit.tar.gz")
|
2024-04-18 16:44:41 +00:00
|
|
|
md5sums=('0f66fccbfab0f9a7a56221af14d4c5e6')
|
2021-05-31 11:08:12 +00:00
|
|
|
|
2023-09-30 14:47:36 +00:00
|
|
|
package_rpi4-eeprom() {
|
|
|
|
pkgdesc="Bootloader and VLI USB controller EEPROM update for bcm2711/RPi4 SoC"
|
2024-03-02 10:42:56 +00:00
|
|
|
depends=(binutils coreutils nano pciutils python raspberrypi-utils)
|
2023-09-30 14:47:36 +00:00
|
|
|
conflicts=(rpi5-eeprom rpi-eeprom)
|
|
|
|
replaces=(rpi-eeprom)
|
|
|
|
backup=("etc/default/$pkgbase-update")
|
|
|
|
install="rpi-eeprom.install"
|
|
|
|
|
|
|
|
cd "$pkgbase-$_commit"
|
2021-05-31 11:08:12 +00:00
|
|
|
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"
|
|
|
|
# Arch ARM does not ship raspi-config
|
|
|
|
sed -i '/to change the release/d' "$pkgdir/usr/bin/rpi-eeprom-update"
|
2023-09-30 14:47:36 +00:00
|
|
|
install -pDm644 rpi-eeprom-update-default "$pkgdir/etc/default/rpi-update"
|
|
|
|
install -pDm644 LICENSE "$pkgdir/usr/share/doc/$pkgname"
|
2021-05-31 11:08:12 +00:00
|
|
|
|
|
|
|
install -pd "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/backup"
|
2023-09-30 14:47:36 +00:00
|
|
|
for target in latest default; do
|
|
|
|
cp -a "firmware-2711/$target" "$pkgdir/usr/lib/firmware/raspberrypi/bootloader"
|
2022-05-20 09:53:17 +00:00
|
|
|
# remove old images
|
2023-08-02 20:36:39 +00:00
|
|
|
rm -f "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/$target/"pieeprom-202[0,1,2]*.bin
|
2021-05-31 11:08:12 +00:00
|
|
|
done
|
|
|
|
|
2023-09-30 14:47:36 +00:00
|
|
|
cd $pkgdir/usr/lib/firmware/raspberrypi/bootloader
|
|
|
|
ln -sf latest beta
|
|
|
|
ln -sf latest stable
|
|
|
|
ln -sf default critical
|
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 '{}' +
|
2023-09-30 14:47:36 +00:00
|
|
|
}
|
2022-05-20 09:53:17 +00:00
|
|
|
|
2023-09-30 14:47:36 +00:00
|
|
|
package_rpi5-eeprom() {
|
|
|
|
pkgdesc="Bootloader and VLI USB controller EEPROM update for bcm2712/RPi5 SoC"
|
2024-03-02 10:42:56 +00:00
|
|
|
depends=(binutils coreutils nano pciutils python raspberrypi-utils)
|
2024-01-08 12:55:20 +00:00
|
|
|
optdepends=(
|
|
|
|
'flashrom: alternative method for updating firmware'
|
|
|
|
)
|
2023-09-30 14:47:36 +00:00
|
|
|
conflicts=(rpi4-eeprom)
|
|
|
|
backup=("etc/default/$pkgbase-update")
|
|
|
|
install="rpi-eeprom.install"
|
|
|
|
|
|
|
|
cd "$pkgbase-$_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"
|
|
|
|
# Arch ARM does not ship raspi-config
|
|
|
|
sed -i '/to change the release/d' "$pkgdir/usr/bin/rpi-eeprom-update"
|
|
|
|
install -pDm644 rpi-eeprom-update-default "$pkgdir/etc/default/rpi-update"
|
|
|
|
install -pDm644 LICENSE "$pkgdir/usr/share/doc/$pkgname"
|
|
|
|
|
|
|
|
install -pd "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/backup"
|
|
|
|
for target in latest default; do
|
|
|
|
cp -a "firmware-2712/$target" "$pkgdir/usr/lib/firmware/raspberrypi/bootloader"
|
|
|
|
done
|
|
|
|
|
|
|
|
cd $pkgdir/usr/lib/firmware/raspberrypi/bootloader
|
|
|
|
ln -sf latest beta
|
|
|
|
ln -sf latest stable
|
|
|
|
ln -sf default critical
|
|
|
|
|
|
|
|
# firmware files should not be executable
|
|
|
|
find "$pkgdir/usr/lib/firmware/raspberrypi/bootloader" -name '*.bin' -exec chmod 644 '{}' +
|
2021-05-31 11:08:12 +00:00
|
|
|
}
|