Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) #define _LINUX_STRING_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) #include <linux/compiler.h>	/* for inline */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) #include <linux/types.h>	/* for size_t */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) #include <linux/stddef.h>	/* for NULL */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) #include <linux/linkage.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <asm/string.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include "misc.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #define STATIC static
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #define STATIC_RW_DATA	/* non-static please */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) /* Diagnostic functions */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #ifdef DEBUG
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #  define Assert(cond,msg) {if(!(cond)) error(msg);}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #  define Trace(x) fprintf x
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #  define Tracev(x) {if (verbose) fprintf x ;}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #  define Tracevv(x) {if (verbose>1) fprintf x ;}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #  define Assert(cond,msg)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #  define Trace(x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #  define Tracev(x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #  define Tracevv(x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #  define Tracec(c,x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #  define Tracecv(c,x)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) /* Not needed, but used in some headers pulled in by decompressors */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) extern char * strstr(const char * s1, const char *s2);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) extern size_t strlen(const char *s);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) extern int memcmp(const void *cs, const void *ct, size_t count);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) extern char * strchrnul(const char *, int);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) #ifdef CONFIG_KERNEL_GZIP
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) #include "../../../../lib/decompress_inflate.c"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) #ifdef CONFIG_KERNEL_LZO
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) #include "../../../../lib/decompress_unlzo.c"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) #ifdef CONFIG_KERNEL_LZMA
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) #include "../../../../lib/decompress_unlzma.c"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) #ifdef CONFIG_KERNEL_XZ
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) /* Prevent KASAN override of string helpers in decompressor */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) #undef memmove
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) #define memmove memmove
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) #undef memcpy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) #define memcpy memcpy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55) #include "../../../../lib/decompress_unxz.c"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) #ifdef CONFIG_KERNEL_LZ4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) #include "../../../../lib/decompress_unlz4.c"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) 	return __decompress(input, len, NULL, NULL, output, 0, NULL, error);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) }