mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			
		
			
				
	
	
		
			33 lines
		
	
	
		
			897 B
		
	
	
	
		
			Diff
		
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			897 B
		
	
	
	
		
			Diff
		
	
	
| diff -drupN a/fs/squashfs/hardware_lzma.c b/fs/squashfs/hardware_lzma.c
 | |
| --- a/fs/squashfs/hardware_lzma.c	1970-01-01 03:00:00.000000000 +0300
 | |
| +++ b/fs/squashfs/hardware_lzma.c	2022-06-09 05:02:35.000000000 +0300
 | |
| @@ -0,0 +1,28 @@
 | |
| +#include <linux/kernel.h>
 | |
| +#include <linux/miscdevice.h>
 | |
| +#include <linux/fs.h>
 | |
| +#include <linux/io.h>
 | |
| +#include <linux/clk.h>
 | |
| +#include <linux/ioport.h>
 | |
| +#include <linux/platform_device.h>
 | |
| +#include <linux/dma-mapping.h>
 | |
| +#include <linux/slab.h>
 | |
| +#include <soc/base.h>
 | |
| +
 | |
| +
 | |
| +extern int jz_lzma_decompress(unsigned char *src, size_t size, unsigned char *dst);
 | |
| +//extern int jz_lzma_decompress(void);
 | |
| +
 | |
| +int unlzma_hardware(unsigned char *input,size_t in_len,unsigned char *output)
 | |
| +{
 | |
| +    int ret_icl;
 | |
| +
 | |
| +    ret_icl=jz_lzma_decompress(input,in_len,output);
 | |
| +    if(ret_icl < 0){
 | |
| +        printk("lzma_ioctl error\n");
 | |
| +        return -1;
 | |
| +    }
 | |
| +
 | |
| +    return 0;
 | |
| +
 | |
| +}
 |