All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Extend to kernel-module-split.bbclass
@ 2017-04-03 17:01 Zoltan Boszormenyi
  2017-04-03 17:01 ` [PATCH 1/2] kernel-module-split.bbclass: Support module compression Zoltan Boszormenyi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zoltan Boszormenyi @ 2017-04-03 17:01 UTC (permalink / raw)
  To: openembedded-devel


The changes are in two topics:

Support kernel module compression, both gz and xz. It needs
the kmod package to be built with zlib and/or lzma support.
The space saving is substantial.

The kernel-modules meta-package should refer to module subpackages
with versions, so if someone upgrades only a limited number of
packages at once instead of everything, the kernel upgrade can be
done by typing the kernel and kernel-modules package.

Signed-off-by: Zoltan Boszormenyi <zboszor@pr.hu>

 meta/classes/kernel-module-split.bbclass | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] kernel-module-split.bbclass: Support module compression
  2017-04-03 17:01 [PATCH 0/2] Extend to kernel-module-split.bbclass Zoltan Boszormenyi
@ 2017-04-03 17:01 ` Zoltan Boszormenyi
  2017-04-03 17:01 ` [PATCH 2/2] kernel-module-split.bbclass: kernel-modules depend on versioned modules Zoltan Boszormenyi
  2017-04-03 18:04 ` [PATCH 0/2] Extend to kernel-module-split.bbclass Martin Jansa
  2 siblings, 0 replies; 6+ messages in thread
From: Zoltan Boszormenyi @ 2017-04-03 17:01 UTC (permalink / raw)
  To: openembedded-devel

Support module compression: CONFIG_MODULE_COMPRESS=y and either
CONFIG_MODULE_COMPRESS_GZIP=y or CONFIG_MODULE_COMPRESS_XZ=y

Signed-off-by: Zoltan Boszormenyi <zboszor@pr.hu>
---
 meta/classes/kernel-module-split.bbclass | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 08d2262..8233848 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -39,16 +39,30 @@ python split_kernel_module_packages () {
 
     def extract_modinfo(file):
         import tempfile, subprocess
+        compression = re.match('^(.*)(\.k?o)(\.(xz|gz))?$', file)
+        modulefile = compression.group(1) + compression.group(2)
+        if compression.group(4) == 'xz':
+            rm_module_file = 1
+            cmd = "cat %s | xz -cd >%s" % (file, modulefile)
+            subprocess.call(cmd, shell=True)
+        elif compression.group(4) == 'gz':
+            rm_module_file = 1
+            cmd = "cat %s | gzip -cd >%s" % (file, modulefile)
+            subprocess.call(cmd, shell=True)
+        else:
+            rm_module_file = 0
         tempfile.tempdir = d.getVar("WORKDIR", True)
         tf = tempfile.mkstemp()
         tmpfile = tf[1]
-        cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX", True) or "", file, tmpfile)
+        cmd = "%sobjcopy -j .modinfo -O binary %s %s" % (d.getVar("HOST_PREFIX", True) or "", modulefile, tmpfile)
         subprocess.call(cmd, shell=True)
         f = open(tmpfile)
         l = f.read().split("\000")
         f.close()
         os.close(tf[0])
         os.unlink(tmpfile)
+        if rm_module_file == 1:
+            os.unlink(modulefile)
         vals = {}
         for i in l:
             m = modinfoexp.match(i)
@@ -119,7 +133,7 @@ python split_kernel_module_packages () {
         # Avoid automatic -dev recommendations for modules ending with -dev.
         d.setVarFlag('RRECOMMENDS_' + pkg, 'nodeprrecs', 1)
 
-    module_regex = '^(.*)\.k?o$'
+    module_regex = '^(.*)\.k?o(\.(xz|gz))?$'
 
     module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX', True)
     module_pattern = module_pattern_prefix + 'kernel-module-%s'
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] kernel-module-split.bbclass: kernel-modules depend on versioned modules
  2017-04-03 17:01 [PATCH 0/2] Extend to kernel-module-split.bbclass Zoltan Boszormenyi
  2017-04-03 17:01 ` [PATCH 1/2] kernel-module-split.bbclass: Support module compression Zoltan Boszormenyi
@ 2017-04-03 17:01 ` Zoltan Boszormenyi
  2017-04-03 18:04 ` [PATCH 0/2] Extend to kernel-module-split.bbclass Martin Jansa
  2 siblings, 0 replies; 6+ messages in thread
From: Zoltan Boszormenyi @ 2017-04-03 17:01 UTC (permalink / raw)
  To: openembedded-devel

The kernel-modules meta-packages should depend on module subpackages
with versions to allow upgrading the kernel easier with limiting
the upgrade to selected packages.

Signed-off-by: Zoltan Boszormenyi <zboszor@pr.hu>
---
 meta/classes/kernel-module-split.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index 8233848..a36a045 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -144,7 +144,8 @@ python split_kernel_module_packages () {
     modules = do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION", True)))
     if modules:
         metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE', True)
-        d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
+        for mod in modules:
+            d.appendVar('RDEPENDS_' + metapkg, ' ' + mod + ' (>= %s)' % (d.getVar("EXTENDPKGV", True)))
 
     # If modules-load.d and modprobe.d are empty at this point, remove them to
     # avoid warnings. removedirs only raises an OSError if an empty
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Extend to kernel-module-split.bbclass
  2017-04-03 17:01 [PATCH 0/2] Extend to kernel-module-split.bbclass Zoltan Boszormenyi
  2017-04-03 17:01 ` [PATCH 1/2] kernel-module-split.bbclass: Support module compression Zoltan Boszormenyi
  2017-04-03 17:01 ` [PATCH 2/2] kernel-module-split.bbclass: kernel-modules depend on versioned modules Zoltan Boszormenyi
@ 2017-04-03 18:04 ` Martin Jansa
  2017-04-04 13:19   ` Boszormenyi Zoltan
  2 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2017-04-03 18:04 UTC (permalink / raw)
  To: Zoltan Boszormenyi; +Cc: openembedded-devel

This needs to go to openembedded-core ML.

On Mon, Apr 3, 2017 at 7:01 PM, Zoltan Boszormenyi <zboszor@pr.hu> wrote:

>
> The changes are in two topics:
>
> Support kernel module compression, both gz and xz. It needs
> the kmod package to be built with zlib and/or lzma support.
> The space saving is substantial.
>
> The kernel-modules meta-package should refer to module subpackages
> with versions, so if someone upgrades only a limited number of
> packages at once instead of everything, the kernel upgrade can be
> done by typing the kernel and kernel-modules package.
>
> Signed-off-by: Zoltan Boszormenyi <zboszor@pr.hu>
>
>  meta/classes/kernel-module-split.bbclass | 21 ++++++++++++++++++---
>  1 file changed, 18 insertions(+), 3 deletions
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Extend to kernel-module-split.bbclass
  2017-04-03 18:04 ` [PATCH 0/2] Extend to kernel-module-split.bbclass Martin Jansa
@ 2017-04-04 13:19   ` Boszormenyi Zoltan
  2017-04-04 14:20     ` Leonardo Sandoval
  0 siblings, 1 reply; 6+ messages in thread
From: Boszormenyi Zoltan @ 2017-04-04 13:19 UTC (permalink / raw)
  To: Martin Jansa; +Cc: openembedded-devel

Catch 22.

I subscribed to openembedded-core ML two days ago, no confirmation or
admin approval yet.

A day later I sent this series to the openembedded-core ML, the automatic
reply said subscription is needed to send mail to the list.

Please someone wake up the list admins.

2017-04-03 20:04 keltezéssel, Martin Jansa írta:
> This needs to go to openembedded-core ML.
>
> On Mon, Apr 3, 2017 at 7:01 PM, Zoltan Boszormenyi <zboszor@pr.hu <mailto:zboszor@pr.hu>>
> wrote:
>
>
>     The changes are in two topics:
>
>     Support kernel module compression, both gz and xz. It needs
>     the kmod package to be built with zlib and/or lzma support.
>     The space saving is substantial.
>
>     The kernel-modules meta-package should refer to module subpackages
>     with versions, so if someone upgrades only a limited number of
>     packages at once instead of everything, the kernel upgrade can be
>     done by typing the kernel and kernel-modules package.
>
>     Signed-off-by: Zoltan Boszormenyi <zboszor@pr.hu <mailto:zboszor@pr.hu>>
>
>      meta/classes/kernel-module-split.bbclass | 21 ++++++++++++++++++---
>      1 file changed, 18 insertions(+), 3 deletions
>
>     --
>     _______________________________________________
>     Openembedded-devel mailing list
>     Openembedded-devel@lists.openembedded.org
>     <mailto:Openembedded-devel@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>     <http://lists.openembedded.org/mailman/listinfo/openembedded-devel>
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Extend to kernel-module-split.bbclass
  2017-04-04 13:19   ` Boszormenyi Zoltan
@ 2017-04-04 14:20     ` Leonardo Sandoval
  0 siblings, 0 replies; 6+ messages in thread
From: Leonardo Sandoval @ 2017-04-04 14:20 UTC (permalink / raw)
  To: Boszormenyi Zoltan; +Cc: openembedded-devel

On Tue, 2017-04-04 at 15:19 +0200, Boszormenyi Zoltan wrote:
> Catch 22.
> 
> I subscribed to openembedded-core ML two days ago, no confirmation or
> admin approval yet.
> 
> A day later I sent this series to the openembedded-core ML, the automatic
> reply said subscription is needed to send mail to the list.
> 
> Please someone wake up the list admins.
> 

CC Phillip, he solved a similar issue on the architecture mailing list.



> 2017-04-03 20:04 keltezéssel, Martin Jansa írta:
> > This needs to go to openembedded-core ML.
> >
> > On Mon, Apr 3, 2017 at 7:01 PM, Zoltan Boszormenyi <zboszor@pr.hu <mailto:zboszor@pr.hu>>
> > wrote:
> >
> >
> >     The changes are in two topics:
> >
> >     Support kernel module compression, both gz and xz. It needs
> >     the kmod package to be built with zlib and/or lzma support.
> >     The space saving is substantial.
> >
> >     The kernel-modules meta-package should refer to module subpackages
> >     with versions, so if someone upgrades only a limited number of
> >     packages at once instead of everything, the kernel upgrade can be
> >     done by typing the kernel and kernel-modules package.
> >
> >     Signed-off-by: Zoltan Boszormenyi <zboszor@pr.hu <mailto:zboszor@pr.hu>>
> >
> >      meta/classes/kernel-module-split.bbclass | 21 ++++++++++++++++++---
> >      1 file changed, 18 insertions(+), 3 deletions
> >
> >     --
> >     _______________________________________________
> >     Openembedded-devel mailing list
> >     Openembedded-devel@lists.openembedded.org
> >     <mailto:Openembedded-devel@lists.openembedded.org>
> >     http://lists.openembedded.org/mailman/listinfo/openembedded-devel
> >     <http://lists.openembedded.org/mailman/listinfo/openembedded-devel>
> >
> >
> 




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-04 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 17:01 [PATCH 0/2] Extend to kernel-module-split.bbclass Zoltan Boszormenyi
2017-04-03 17:01 ` [PATCH 1/2] kernel-module-split.bbclass: Support module compression Zoltan Boszormenyi
2017-04-03 17:01 ` [PATCH 2/2] kernel-module-split.bbclass: kernel-modules depend on versioned modules Zoltan Boszormenyi
2017-04-03 18:04 ` [PATCH 0/2] Extend to kernel-module-split.bbclass Martin Jansa
2017-04-04 13:19   ` Boszormenyi Zoltan
2017-04-04 14:20     ` Leonardo Sandoval

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.