Build all dkms modules near the end of the image build.
Work around ordering issues that cause dkms modules to not always be built for all installed kernels, add a post-install.d script to the base element that will force the issue. (Note that any module/kernel pairs with a pre-existing valid module will not be rebuilt, so this should not impact performance unnecessarily) Change-Id: Iccea14c6318014cc7e1fec77e71c14a224f7b76e
This commit is contained in:
parent
5695fbd39e
commit
be99db321b
19
elements/base/post-install.d/99-dkms
Executable file
19
elements/base/post-install.d/99-dkms
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Trigger a run of dkms for all the modules installed
|
||||||
|
# to ensure we have valid modules build for all.
|
||||||
|
|
||||||
|
modules=$(dkms status | tr ',:' ' ' | awk '{ print $1 "/" $2 }')
|
||||||
|
kernels=$(ls /usr/src/linux-headers-*-*-* -d | sed -e 's|/usr/src/linux-headers-||')
|
||||||
|
__ARCH=$ARCH
|
||||||
|
unset ARCH
|
||||||
|
|
||||||
|
for module in $modules ; do
|
||||||
|
for kernel in $kernels ; do
|
||||||
|
dkms build $module -k $kernel
|
||||||
|
dkms install $module -k $kernel
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
ARCH=$__ARCH
|
||||||
|
|
||||||
|
dkms status
|
Loading…
x
Reference in New Issue
Block a user