1 ################################################################################
5 ################################################################################
8 KMOD_SOURCE
= kmod-
$(KMOD_VERSION
).
tar.xz
9 KMOD_SITE
= $(BR2_KERNEL_MIRROR
)/linux
/utils
/kernel
/kmod
10 KMOD_INSTALL_STAGING
= YES
11 KMOD_DEPENDENCIES
= host-pkgconf
12 HOST_KMOD_DEPENDENCIES
= host-pkgconf
14 # license info for libkmod only, conditionally add more below
15 KMOD_LICENSE
= LGPLv2.1
+ (library
)
16 KMOD_LICENSE_FILES
= libkmod
/COPYING
18 # static linking not supported, see
19 # https://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=b7016153ec8
20 KMOD_CONF_OPTS
= --disable-static
--enable-shared
22 KMOD_CONF_OPTS
+= --disable-manpages
23 HOST_KMOD_CONF_OPTS
= --disable-manpages
25 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
26 KMOD_DEPENDENCIES
+= zlib
27 KMOD_CONF_OPTS
+= --with-zlib
30 ifeq ($(BR2_PACKAGE_XZ
),y
)
31 KMOD_DEPENDENCIES
+= xz
32 KMOD_CONF_OPTS
+= --with-xz
35 ifeq ($(BR2_PACKAGE_PYTHON
)$(BR2_PACKAGE_PYTHON3
),y
)
36 KMOD_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_PYTHON
),python
,python3
)
37 KMOD_CONF_OPTS
+= --enable-python
40 ifeq ($(BR2_PACKAGE_KMOD_TOOLS
),y
)
42 # add license info for kmod tools
43 KMOD_LICENSE
:= $(KMOD_LICENSE
), GPLv2
+ (tools
)
44 KMOD_LICENSE_FILES
+= COPYING
46 # take precedence over busybox implementation
47 KMOD_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_BUSYBOX
),busybox
)
49 # /sbin is really /usr/sbin with merged /usr, so adjust relative symlink
50 ifeq ($(BR2_ROOTFS_MERGED_USR
),y
)
51 KMOD_BIN_PATH
= ..
/bin
/kmod
53 KMOD_BIN_PATH
= ..
/usr
/bin
/kmod
56 define KMOD_INSTALL_TOOLS
57 for i in depmod insmod lsmod modinfo modprobe rmmod
; do \
58 ln
-sf
$(KMOD_BIN_PATH
) $(TARGET_DIR
)/sbin
/$$i; \
62 KMOD_POST_INSTALL_TARGET_HOOKS
+= KMOD_INSTALL_TOOLS
64 KMOD_CONF_OPTS
+= --disable-tools
67 # We only install depmod, since that's the only tool used for the
69 define HOST_KMOD_INSTALL_TOOLS
70 mkdir
-p
$(HOST_DIR
)/sbin
/
71 ln
-sf ..
/usr
/bin
/kmod
$(HOST_DIR
)/sbin
/depmod
74 HOST_KMOD_POST_INSTALL_HOOKS
+= HOST_KMOD_INSTALL_TOOLS
76 $(eval
$(autotools-package
))
77 $(eval
$(host-autotools-package
))