mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-25 11:11:35 +01:00
kernel_module, sample_package: correctly forward Buildroot -O and -g flags
readme: improve optimization documentation
This commit is contained in:
@@ -13,17 +13,17 @@ ifeq ($(BR2_PACKAGE_OPENBLAS),y)
|
||||
endif
|
||||
|
||||
define KERNEL_MODULE_BUILD_CMDS
|
||||
$(MAKE) -C '$(@D)/user' BR2_PACKAGE_OPENBLAS="$(BR2_PACKAGE_OPENBLAS)" CC="$(TARGET_CC)" LD="$(TARGET_LD)"
|
||||
$(MAKE) -C '$(@D)/user' $(TARGET_CONFIGURE_OPTS) BR2_PACKAGE_OPENBLAS="$(BR2_PACKAGE_OPENBLAS)"
|
||||
endef
|
||||
|
||||
define KERNEL_MODULE_INSTALL_TARGET_CMDS
|
||||
# The modules are already installed by the kernel-module package type
|
||||
# under /lib/modules/**, but let's also copy the modules to the root
|
||||
# for insmod convenience.
|
||||
#
|
||||
# Modules can be still be easily inserted with "modprobe module" however.
|
||||
$(INSTALL) -D -m 0655 $(@D)/*.ko '$(TARGET_DIR)'
|
||||
$(INSTALL) -D -m 0755 $(@D)/user/*.out '$(TARGET_DIR)'
|
||||
# The modules are already installed by the kernel-module package type
|
||||
# under /lib/modules/**, but let's also copy the modules to the root
|
||||
# for insmod convenience.
|
||||
#
|
||||
# Modules can be still be easily inserted with "modprobe module" however.
|
||||
$(INSTALL) -D -m 0655 $(@D)/*.ko '$(TARGET_DIR)'
|
||||
$(INSTALL) -D -m 0755 $(@D)/user/*.out '$(TARGET_DIR)'
|
||||
endef
|
||||
|
||||
$(eval $(kernel-module))
|
||||
|
||||
Reference in New Issue
Block a user