summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorMarco Felsch <m.felsch@pengutronix.de>2024-01-24 14:47:37 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-02-06 16:04:41 +0100
commitfceaa92e4e8f5ff2a08103abcd4a41afb5fc90dd (patch)
treecf511adb74ec952825dbbb8e6a0b7ffb34041c42 /include/linux
parent19f44baf474da2a9292c8857ed28a5354e2ac12d (diff)
downloadbarebox-fceaa92e4e8f5ff2a08103abcd4a41afb5fc90dd.tar.gz
barebox-fceaa92e4e8f5ff2a08103abcd4a41afb5fc90dd.tar.xz
bootm: add support to boot ZSTD compressed images
This adds the support to bootm to decompress and boot ZSTD compressed kernels. The decompress_unzstd.c was taken from Linux and slighlty adapted. Also the unzstd() function is adapted since we don't support large >2G images yet like Linux does. Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20240124134738.133782-3-m.felsch@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/decompress/unzstd.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/decompress/unzstd.h b/include/linux/decompress/unzstd.h
new file mode 100644
index 0000000000..56d539ae88
--- /dev/null
+++ b/include/linux/decompress/unzstd.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DECOMPRESS_UNZSTD_H
+#define LINUX_DECOMPRESS_UNZSTD_H
+
+int unzstd(unsigned char *inbuf, long len,
+ long (*fill)(void*, unsigned long),
+ long (*flush)(void*, unsigned long),
+ unsigned char *output,
+ long *pos,
+ void (*error_fn)(char *x));
+#endif