diff --git a/core/linux-raspberrypi/60-linux.hook b/core/linux-raspberrypi/60-linux.hook new file mode 100644 index 000000000..584ce3537 --- /dev/null +++ b/core/linux-raspberrypi/60-linux.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/modules/%KERNVER%/* + +[Action] +Description = Updating %PKGBASE% module dependencies... +When = PostTransaction +Exec = /usr/bin/depmod %KERNVER% diff --git a/core/linux-raspberrypi/90-linux.hook b/core/linux-raspberrypi/90-linux.hook new file mode 100644 index 000000000..c29cd4928 --- /dev/null +++ b/core/linux-raspberrypi/90-linux.hook @@ -0,0 +1,12 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Target = boot/kernel.img +Target = boot/kernel7.img +Target = usr/lib/initcpio/* + +[Action] +Description = Updating %PKGBASE% initcpios... +When = PostTransaction +Exec = /usr/bin/mkinitcpio -p %PKGBASE% diff --git a/core/linux-raspberrypi/PKGBUILD b/core/linux-raspberrypi/PKGBUILD index 960cc2950..a1fd603f4 100644 --- a/core/linux-raspberrypi/PKGBUILD +++ b/core/linux-raspberrypi/PKGBUILD @@ -12,7 +12,7 @@ _srcname=linux-${_commit} _kernelname=${pkgbase#linux} _desc="RPi 1 and 2" pkgver=5.10.63 -pkgrel=15 +pkgrel=16 pkgdesc='Linux' url="http://www.kernel.org/" arch=(armv6h armv7h) @@ -25,11 +25,17 @@ source=("https://github.com/raspberrypi/linux/archive/${_commit}.tar.gz" cmdline.txt config.txt config + linux.preset + 60-linux.hook + 90-linux.hook ) md5sums=('8b6f5b06d5a252cbb06ea1b33ee45c25' '31c02f4518d46deb5f0c2ad1f8b083cd' '9669d916a5929a2eedbd64477f83d99e' - '18d63f130f6e161aece55aea93b38e14') + '18d63f130f6e161aece55aea93b38e14' + '86d4a35722b5410e3b29fc92dae15d4b' + '0a5f16bfec6ad982a2f6782724cca8ba' + '69e1db90d78f691dc446fe2ab94727eb') # setup vars if [[ $CARCH == "armv6h" ]]; then @@ -102,6 +108,22 @@ _package() { elif [[ $CARCH == "armv7h" ]]; then rm -f "${pkgdir}"/boot/bcm{2835,2838,2708,2711}*.dtb fi + + # sed expression for following substitutions + local _subst=" + s|%PKGBASE%|${pkgbase}|g + s|%KERNVER%|${kernver}|g + " + + # install mkinitcpio preset file + sed "${_subst}" ../linux.preset | + install -Dm644 /dev/stdin "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset" + + # install pacman hooks + sed "${_subst}" ../60-linux.hook | + install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/60-${pkgbase}.hook" + sed "${_subst}" ../90-linux.hook | + install -Dm644 /dev/stdin "${pkgdir}/usr/share/libalpm/hooks/90-${pkgbase}.hook" } _package-headers() { diff --git a/core/linux-raspberrypi/linux.preset b/core/linux-raspberrypi/linux.preset new file mode 100644 index 000000000..8d7f379c9 --- /dev/null +++ b/core/linux-raspberrypi/linux.preset @@ -0,0 +1,10 @@ +# mkinitcpio preset file for the '%PKGBASE%' package + +ALL_config="/etc/mkinitcpio.conf" +ALL_kver="%KERNVER%" + +PRESETS=('default') + +#default_config="/etc/mkinitcpio.conf" +default_image="/boot/initramfs-linux.img" +#default_options=""