mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
Removing /opt/vc/src from package and Adding raspberrypi-firmware.install script to check which start.elf is in use and replace it with the updated one with the same memory allocation after update
This commit is contained in:
parent
18a8612d8f
commit
b9ad2f17c4
2 changed files with 39 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
buildarch=2
|
||||
|
||||
pkgname=raspberrypi-firmware
|
||||
pkgver=20120726
|
||||
pkgver=20120728
|
||||
pkgrel=1
|
||||
pkgdesc="Firmware files for Raspberry Pi"
|
||||
arch=('any')
|
||||
|
@ -9,7 +9,7 @@ url="https://github.com/raspberrypi/firmware"
|
|||
makedepends=('git')
|
||||
license=('custom')
|
||||
options=(!strip)
|
||||
|
||||
install=${pkgname}.install
|
||||
_gitroot=git://github.com/raspberrypi/firmware.git
|
||||
_gitname=firmware
|
||||
|
||||
|
@ -29,5 +29,7 @@ build() {
|
|||
}
|
||||
|
||||
package() {
|
||||
cp -R "${srcdir}"/firmware/{boot,opt} "${pkgdir}"
|
||||
cp -R "${srcdir}"/firmware/boot "${pkgdir}"/boot
|
||||
mkdir -p "${pkgdir}"/opt/vc
|
||||
cp -R "${srcdir}"/firmware/opt/vc/{bin,include,lib,sbin,LICENCE} "${pkgdir}"/opt/vc
|
||||
}
|
||||
|
|
34
alarm/raspberrypi-firmware/raspberrypi-firmware.install
Normal file
34
alarm/raspberrypi-firmware/raspberrypi-firmware.install
Normal file
|
@ -0,0 +1,34 @@
|
|||
pre_upgrade() {
|
||||
startelfmd5="$(md5sum /boot/start.elf| awk '{print $1}')"
|
||||
|
||||
for file in /boot/*.elf; do
|
||||
|
||||
if [ $file != /boot/start.elf ]
|
||||
then
|
||||
currentmd5="$(md5sum $file| awk '{print $1}')"
|
||||
|
||||
if [ "$currentmd5" == "$startelfmd5" ]
|
||||
then
|
||||
echo "$file" > /tmp/rpifirmware.txt
|
||||
echo " >>>Current installed start.elf: $file"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
post_upgrade() {
|
||||
|
||||
if [ -e /tmp/rpifirmware.txt ]
|
||||
then
|
||||
firmwarename=$(head -n 1 /tmp/rpifirmware.txt)
|
||||
if [ -e "$firmwarename" ]
|
||||
then
|
||||
echo " >>>Replacing /boot/start.elf with $firmwarename"
|
||||
cp $firmwarename /boot/start.elf
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in a new issue