mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
ca29af76b0
Closes #2034
83 lines
3.2 KiB
Bash
83 lines
3.2 KiB
Bash
# Maintainer: graysky <therealgraysky AT protonmail DOT com>
|
|
|
|
pkgbase=rpi-eeprom
|
|
pkgname=(rpi4-eeprom rpi5-eeprom)
|
|
|
|
_commit=e430a41e7323a1e28fb42b53cf79e5ba9b5ee975
|
|
pkgver=20240605
|
|
pkgrel=1
|
|
arch=(any)
|
|
url='https://github.com/raspberrypi/rpi-eeprom'
|
|
license=(custom)
|
|
source=("$pkgbase-$pkgver-${_commit:0:10}.tar.gz::https://github.com/raspberrypi/rpi-eeprom/archive/$_commit.tar.gz")
|
|
md5sums=('49b6883237f26aaebc94157467c9e5a9')
|
|
|
|
package_rpi4-eeprom() {
|
|
pkgdesc="Bootloader and VLI USB controller EEPROM update for bcm2711/RPi4 SoC"
|
|
depends=(binutils coreutils nano pciutils python raspberrypi-utils)
|
|
conflicts=(rpi5-eeprom rpi-eeprom)
|
|
replaces=(rpi-eeprom)
|
|
backup=("etc/default/$pkgbase-update"
|
|
"etc/default/$pkgbase-eeprom-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-eeprom-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-2711/$target" "$pkgdir/usr/lib/firmware/raspberrypi/bootloader"
|
|
# remove old images
|
|
rm -f "$pkgdir/usr/lib/firmware/raspberrypi/bootloader/$target/"pieeprom-202[0,1,2]*.bin
|
|
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 '{}' +
|
|
}
|
|
|
|
package_rpi5-eeprom() {
|
|
pkgdesc="Bootloader EEPROM update for bcm2712/RPi5 SoC"
|
|
depends=(binutils coreutils nano pciutils python raspberrypi-utils)
|
|
optdepends=(
|
|
'flashrom: alternative method for updating firmware'
|
|
)
|
|
conflicts=(rpi4-eeprom)
|
|
backup=("etc/default/$pkgbase-update"
|
|
"etc/default/$pkgbase-eeprom-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-eeprom-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 '{}' +
|
|
}
|