diff options
| author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2016-03-01 00:48:23 +1300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-02 22:39:43 +0000 |
| commit | b145480d44b391ce9467389b4f1fbcd40fe4e269 (patch) | |
| tree | b5dd7b89ecd1fd0a8b49bc24b65f08d3205ae81a | |
| parent | b03936c8ee156855ba2a210db0c6ca73ccc69af9 (diff) | |
| download | poky-b145480d44b391ce9467389b4f1fbcd40fe4e269.tar.gz | |
classes/module: allow substitution of the modules_install target name
Quite a few external kernel modules I've found floating around don't
have a modules_install target, but they do have an install target that
basically differs only in name. To make it easier to build these just
make this a MODULES_INSTALL_TARGET variable that you can set from the
recipe - the alternative would be copy-and-paste the do_install
definition from this class which is potentially fragile.
(From OE-Core rev: effa6ce777540c5557e5cf904b48cc3369ee3f9f)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/module.bbclass | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass index 0952c0cca7..01c9309eb0 100644 --- a/meta/classes/module.bbclass +++ b/meta/classes/module.bbclass | |||
| @@ -6,6 +6,8 @@ do_make_scripts[depends] += "virtual/kernel:do_shared_workdir" | |||
| 6 | 6 | ||
| 7 | EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}" | 7 | EXTRA_OEMAKE += "KERNEL_SRC=${STAGING_KERNEL_DIR}" |
| 8 | 8 | ||
| 9 | MODULES_INSTALL_TARGET ?= "modules_install" | ||
| 10 | |||
| 9 | module_do_compile() { | 11 | module_do_compile() { |
| 10 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS | 12 | unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS |
| 11 | oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ | 13 | oe_runmake KERNEL_PATH=${STAGING_KERNEL_DIR} \ |
| @@ -21,7 +23,7 @@ module_do_install() { | |||
| 21 | oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \ | 23 | oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \ |
| 22 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ | 24 | CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ |
| 23 | O=${STAGING_KERNEL_BUILDDIR} \ | 25 | O=${STAGING_KERNEL_BUILDDIR} \ |
| 24 | modules_install | 26 | ${MODULES_INSTALL_TARGET} |
| 25 | } | 27 | } |
| 26 | 28 | ||
| 27 | EXPORT_FUNCTIONS do_compile do_install | 29 | EXPORT_FUNCTIONS do_compile do_install |
