Skip to contentSkip to conversation

package/kmod: enable compression in host variant

PATCH New Yann E. MORIN 2 participants 3 messages Apr 8, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/kmod: enable compression in host variant

When the modules are compressed by the kernel at install, it needs a depmod with compression support to br able to generate the modules.dep and associated files.

---
 package/kmod/kmod.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/kmod/kmod.mk +2 -2
index e1149b7b65..c6264e16ab 100644
@@ -9,7 +9,7 @@ KMOD_SOURCE = kmod-$(KMOD_VERSION).tar.xz
 KMOD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kmod
 KMOD_INSTALL_STAGING = YES
 KMOD_DEPENDENCIES = host-pkgconf
-HOST_KMOD_DEPENDENCIES = host-pkgconf
+HOST_KMOD_DEPENDENCIES = host-pkgconf host-xz host-zlib
 
 # license info for libkmod only, conditionally add more below
 KMOD_LICENSE = LGPL-2.1+ (library)
@@ -26,7 +26,7 @@ endif
 KMOD_CONF_OPTS = --disable-static --enable-shared
 
 KMOD_CONF_OPTS += --disable-manpages
-HOST_KMOD_CONF_OPTS = --disable-manpages
+HOST_KMOD_CONF_OPTS = --disable-manpages --with-xz --with-zlib
 
 ifeq ($(BR2_PACKAGE_ZLIB),y)
 KMOD_DEPENDENCIES += zlib
Signature · 1 line
2.14.1
#1 lore raw

PATCH 1/1 package/kmod: enable compression in host variant

Hello,

Quoted 15 lines · Yann E. MORIN

When the modules are compressed by the kernel at install, it needs a depmod with compression support to br able to generate the modules.dep and associated files.

---
 package/kmod/kmod.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/kmod/kmod.mk +0 -0
index e1149b7b65..c6264e16ab 100644

package/kmod/kmod.mk KMOD_SOURCE = kmod-$(KMOD_VERSION).tar.xz · line 12

Quoted 5 lines
package/kmod/kmod.mk +1 -1
@@ -9,7 +9,7 @@ KMOD_SOURCE = kmod-$(KMOD_VERSION).tar.xz
 KMOD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kmod
 KMOD_INSTALL_STAGING = YES
 KMOD_DEPENDENCIES = host-pkgconf
-HOST_KMOD_DEPENDENCIES = host-pkgconf
+HOST_KMOD_DEPENDENCIES = host-pkgconf host-xz host-zlib

It is a bit annoying to add those dependencies unconditionally :-/

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH 1/1 package/kmod: enable compression in host variant

Thomas, All,

On 2018-04-08 13:28 +0200, Thomas Petazzoni spake thusly:

Quoted 11 lines · Yann E. MORIN
Quoted 10 lines

When the modules are compressed by the kernel at install, it needs a depmod with compression support to br able to generate the modules.dep and associated files.

---
 package/kmod/kmod.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines

package/kmod/kmod.mk KMOD_SOURCE = kmod-$(KMOD_VERSION).tar.xz · line 12

Quoted 10 lines
package/kmod/kmod.mk +1 -1
index e1149b7b65..c6264e16ab 100644
@@ -9,7 +9,7 @@ KMOD_SOURCE = kmod-$(KMOD_VERSION).tar.xz
 KMOD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kmod
 KMOD_INSTALL_STAGING = YES
 KMOD_DEPENDENCIES = host-pkgconf
-HOST_KMOD_DEPENDENCIES = host-pkgconf
+HOST_KMOD_DEPENDENCIES = host-pkgconf host-xz host-zlib

It is a bit annoying to add those dependencies unconditionally :-/

Yep, bt we can't automatically know whether the user will be using compressed modules or not. And by the time we can look at the kernel's .config file, it is too late to add those dependencies to host-kmod.

The alternative is to add new options to linux/Config.in to enable module compression (which one, or none), and automatically derive the extra needed dependencies.

TBH, I'm not too fond of either solution...

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'