rootfs.py: find .ko.gz and .ko.xz kernel modules as well
PATCH 1/1 rootfs.py: find .ko.gz and .ko.xz kernel modules as well
From: Christophe Chapuis <[email protected]>
* with xz PACKAGECONFIG enabled in kmod and xz module compression enabled in kernel the do_rootfs task doesn't run depmod in the image, because it thinks there are no modules:
NOTE: No Kernel Modules found, not running depmod
--- meta/lib/oe/rootfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/rootfs.py +1 -1
@@ -305,7 +305,7 @@ class Rootfs(object, metaclass=ABCMeta): def _check_for_kernel_modules(self, modules_dir): for root, dirs, files in os.walk(modules_dir, topdown=True): for name in files: - found_ko = name.endswith(".ko") + found_ko = name.endswith(".ko") or name.endswith(".ko.gz") or name.endswith(".ko.xz") if found_ko: return found_ko return False
Signature · 1 line
2.30.2
Quoted 20 lines · Martin Jansa
From: Christophe Chapuis <[email protected]>
* with xz PACKAGECONFIG enabled in kmod and xz module compression enabled in kernel the
do_rootfstask doesn't run depmod in the image, because it thinks there are no modules:
NOTE: No Kernel Modules found, not running depmodSigned-off-by Martin Jansa <[email protected]>Signed-off-by Christophe Chapuis <[email protected]>---
meta/lib/oe/rootfs.py | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)meta/lib/oe/rootfs.py +0
-0@@ -305,7 +305,7 @@ class Rootfs(object, metaclass=ABCMeta):def
_check_for_kernel_modules(self, modules_dir):
for root, dirs, files inos.walk(modules_dir, topdown=True):
for name in files:
meta/lib/oe/rootfs.py class Rootfs(object, metaclass=ABCMeta): · line 308
Quoted 2 lines
meta/lib/oe/rootfs.py +1
-1- found_ko = name.endswith(".ko") + found_ko = name.endswith(".ko") or name.endswith(".ko.gz") or name.endswith(".ko.xz")
For reference you can do name.endswith((".ko", ".ko.gz", ".ko.xz")) as endswith takes a tuple.
Cheers,
Richard
PATCH v2 1/1 rootfs.py: find .ko.gz and .ko.xz kernel modules as well
From: Christophe Chapuis <[email protected]>
* with xz PACKAGECONFIG enabled in kmod and xz module compression enabled in kernel the do_rootfs task doesn't run depmod in the image, because it thinks there are no modules:
NOTE: No Kernel Modules found, not running depmod
---
v2: nothing else was broken, only xz was enabled only in target kmod, after enabling
it for kmod-native as well it seems to work fine.
Also use tuple as updated by Christophe and suggested by RP.
meta/lib/oe/rootfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/lib/oe/rootfs.py +1 -1
@@ -305,7 +305,7 @@ class Rootfs(object, metaclass=ABCMeta): def _check_for_kernel_modules(self, modules_dir): for root, dirs, files in os.walk(modules_dir, topdown=True): for name in files: - found_ko = name.endswith(".ko") + found_ko = name.endswith((".ko", ".ko.gz", ".ko.xz")) if found_ko: return found_ko return False