4.14: install modules directly to /usr/lib
Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
This commit is contained in:
parent
883c48688e
commit
952dc92356
17
PKGBUILD
17
PKGBUILD
@ -99,29 +99,26 @@ _package() {
|
|||||||
_basekernel=${_kernver%%-*}
|
_basekernel=${_kernver%%-*}
|
||||||
_basekernel=${_basekernel%.*}
|
_basekernel=${_basekernel%.*}
|
||||||
|
|
||||||
mkdir -p "${pkgdir}"/{boot,lib/modules,usr}
|
mkdir -p "${pkgdir}"/{boot,usr/lib/modules}
|
||||||
make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}" modules_install
|
make LOCALVERSION= INSTALL_MOD_PATH="${pkgdir}/usr" modules_install
|
||||||
cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
cp arch/x86/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
|
||||||
|
|
||||||
# make room for external modules
|
# make room for external modules
|
||||||
local _extramodules="extramodules-${_basekernel}${_kernelname:--ARCH}"
|
local _extramodules="extramodules-${_basekernel}${_kernelname:--ARCH}"
|
||||||
ln -s "../${_extramodules}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
|
ln -s "../${_extramodules}" "${pkgdir}/usr/lib/modules/${_kernver}/extramodules"
|
||||||
|
|
||||||
# add real version for building modules and running depmod from hook
|
# add real version for building modules and running depmod from hook
|
||||||
echo "${_kernver}" |
|
echo "${_kernver}" |
|
||||||
install -Dm644 /dev/stdin "${pkgdir}/lib/modules/${_extramodules}/version"
|
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modules/${_extramodules}/version"
|
||||||
|
|
||||||
# remove build and source links
|
# remove build and source links
|
||||||
rm "${pkgdir}"/lib/modules/${_kernver}/{source,build}
|
rm "${pkgdir}"/usr/lib/modules/${_kernver}/{source,build}
|
||||||
|
|
||||||
# now we call depmod...
|
# now we call depmod...
|
||||||
depmod -b "${pkgdir}" -F System.map "${_kernver}"
|
depmod -b "${pkgdir}/usr" -F System.map "${_kernver}"
|
||||||
|
|
||||||
# add vmlinux
|
# add vmlinux
|
||||||
install -Dt "${pkgdir}/lib/modules/${_kernver}/build" -m644 vmlinux
|
install -Dt "${pkgdir}/usr/lib/modules/${_kernver}/build" -m644 vmlinux
|
||||||
|
|
||||||
# move module tree /lib -> /usr/lib
|
|
||||||
mv -t "${pkgdir}/usr" "${pkgdir}/lib"
|
|
||||||
|
|
||||||
# sed expression for following substitutions
|
# sed expression for following substitutions
|
||||||
local _subst="
|
local _subst="
|
||||||
|
Loading…
Reference in New Issue
Block a user