external.mk 854 B

123456789101112131415161718192021222324252627
  1. ################################################################################
  2. #
  3. # kernel_module
  4. #
  5. ################################################################################
  6. KERNEL_MODULE_VERSION = 1.0
  7. KERNEL_MODULE_SITE = $(BR2_EXTERNAL_KERNEL_MODULE_PATH)
  8. KERNEL_MODULE_SITE_METHOD = local
  9. define KERNEL_MODULE_BUILD_CMDS
  10. $(MAKE) -C '$(@D)/user' CC="$(TARGET_CC)" LD="$(TARGET_LD)"
  11. endef
  12. define KERNEL_MODULE_INSTALL_TARGET_CMDS
  13. # The modules are already installed by the kernel-module package type
  14. # under /lib/modules/**, but let's also copy the modules to the root
  15. # for insmod convenience.
  16. #
  17. # Modules can be still be easily inserted with "modprobe module" however.
  18. $(INSTALL) -D -m 0655 $(@D)/*.ko '$(TARGET_DIR)'
  19. $(INSTALL) -D -m 0755 $(@D)/user/*.out '$(TARGET_DIR)'
  20. endef
  21. $(eval $(kernel-module))
  22. $(eval $(generic-package))