[arch-general] Kernel version in hooks
Can I somehow get the kernel version from a hook invoked on the kernel package update? -- damjan
On 17 May 2016 at 14:50, Damjan Georgievski <gdamjan@gmail.com> wrote:
Can I somehow get the kernel version from a hook invoked on the kernel package update?
by version I mean the "4.5.4-1-ARCH" kernel version, not the "4.5.4-1" package version -- damjan
Am 17.05.2016 um 14:51 schrieb Damjan Georgievski:
Can I somehow get the kernel version from a hook invoked on the kernel package update? by version I mean the "4.5.4-1-ARCH" kernel version, not the "4.5.4-1"
On 17 May 2016 at 14:50, Damjan Georgievski <gdamjan@gmail.com> wrote: package version
How do you detect the kernel package upgrade? If you use the path to its modules, you can add "NeedsTargets" to the hook and extract the version from the module path just like the dkms hook does it.
Can I somehow get the kernel version from a hook invoked on the kernel package update?
by version I mean the "4.5.4-1-ARCH" kernel version, not the "4.5.4-1" package version
How do you detect the kernel package upgrade? If you use the path to its modules, you can add "NeedsTargets" to the hook and extract the version from the module path just like the dkms hook does it.
the package name, ie. Type = Package Target = linux are you saying to use Type = File and Target = usr/lib/modules/* ? that'll have some unwanted targets though (the extramodules on for ex.) -- damjan
On 17 May 2016 at 14:50, Damjan Georgievski <gdamjan@gmail.com> wrote:
Can I somehow get the kernel version from a hook invoked on the kernel package update?
so I ended up with this (for now): https://gist.github.com/gdamjan/dd94057318f9c68327066068cacf99bc The reason was, I needed to run mkinitcpio by hand for linux-armv7 since the package itself doesn't do it (they expect that the kernel has everything to boot, which is not true since I boot my BeagleBoard over NFS). the second problem is that the `mkinitcpio -p preset` didn't work either since the kver function in mkinitcpio can't find the version out of the zImage file. this current setup doesn't support more kernels though - I'd have to find the KERNEL_NAME for that. ps. not specifing "NeedsTargets" in the hook makes the "read TARGET" block. I guess stdin should be /dev/null in that case. -- damjan
participants (2)
-
Damjan Georgievski
-
ProgAndy