]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel.bbclass: use ${base_libdir} and ${sysconfdir} instead of /lib and /etc
authorJavier Martinez Canillas <javier@dowhile0.org>
Sun, 5 Aug 2012 19:48:44 +0000 (21:48 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 6 Aug 2012 13:40:51 +0000 (14:40 +0100)
It is considered good practice to use the build system provided
variables instead of directly specify hardcoded paths.

Signed-off-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel.bbclass

index 1d8dff9adae6434c3d4a89075045fddaf25aa634..b434093561d5b99c0fddf7716f1204de50c7ede4 100644 (file)
@@ -109,10 +109,10 @@ kernel_do_install() {
        unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
        if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
                oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
-               rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.order"
-               rm -f "${D}/lib/modules/${KERNEL_VERSION}/modules.builtin"
-               rm "${D}/lib/modules/${KERNEL_VERSION}/build"
-               rm "${D}/lib/modules/${KERNEL_VERSION}/source"
+               rm -f "${D}${base_libdir}/modules/${KERNEL_VERSION}/modules.order"
+               rm -f "${D}${base_libdir}/modules/${KERNEL_VERSION}/modules.builtin"
+               rm "${D}${base_libdir}/modules/${KERNEL_VERSION}/build"
+               rm "${D}${base_libdir}/modules/${KERNEL_VERSION}/source"
        else
                bbnote "no modules to install"
        fi
@@ -127,8 +127,8 @@ kernel_do_install() {
        install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION}
        install -m 0644 vmlinux ${D}/boot/vmlinux-${KERNEL_VERSION}
        [ -e Module.symvers ] && install -m 0644 Module.symvers ${D}/boot/Module.symvers-${KERNEL_VERSION}
-       install -d ${D}/etc/modules-load.d
-       install -d ${D}/etc/modprobe.d
+       install -d ${D}${sysconfdir}/modules-load.d
+       install -d ${D}${sysconfdir}/modprobe.d
 
        #
        # Support for external module building - create a minimal copy of the