summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZoltán Böszörményi <zboszor@gmail.com>2021-08-23 16:54:47 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-08-27 11:53:22 +0100
commit796d4661a6121dba878c29d2388258c795be3aeb (patch)
tree59840d92f2b4923bfbdf0235f1324e3b2141fef3
parentd0e694ef4ec7bd862bdefee494210e3878152b44 (diff)
downloadopenembedded-core-796d4661a6121dba878c29d2388258c795be3aeb.tar.gz
kernel-module-split.bbclass: Support zstd-compressed modules
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/kernel-module-split.bbclass11
1 files changed, 7 insertions, 4 deletions
diff --git a/meta/classes/kernel-module-split.bbclass b/meta/classes/kernel-module-split.bbclass
index b56dd4a9c7..6c1de4c992 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -44,17 +44,20 @@ python split_kernel_module_packages () {
def extract_modinfo(file):
import tempfile, subprocess
tempfile.tempdir = d.getVar("WORKDIR")
- compressed = re.match( r'.*\.([xg])z$', file)
+ compressed = re.match( r'.*\.(gz|xz|zst)$', file)
tf = tempfile.mkstemp()
tmpfile = tf[1]
if compressed:
tmpkofile = tmpfile + ".ko"
- if compressed.group(1) == 'g':
+ if compressed.group(1) == 'gz':
cmd = "gunzip -dc %s > %s" % (file, tmpkofile)
subprocess.check_call(cmd, shell=True)
- elif compressed.group(1) == 'x':
+ elif compressed.group(1) == 'xz':
cmd = "xz -dc %s > %s" % (file, tmpkofile)
subprocess.check_call(cmd, shell=True)
+ elif compressed.group(1) == 'zst':
+ cmd = "zstd -dc %s > %s" % (file, tmpkofile)
+ subprocess.check_call(cmd, shell=True)
else:
msg = "Cannot decompress '%s'" % file
raise msg
@@ -153,7 +156,7 @@ python split_kernel_module_packages () {
kernel_package_name = d.getVar("KERNEL_PACKAGE_NAME") or "kernel"
kernel_version = d.getVar("KERNEL_VERSION")
- module_regex = r'^(.*)\.k?o(?:\.[xg]z)?$'
+ module_regex = r'^(.*)\.k?o(?:\.(gz|xz|zst))?$'
module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')