File tree Expand file tree Collapse file tree 3 files changed +30
-24
lines changed
arch/mips/boot/compressed Expand file tree Collapse file tree 3 files changed +30
-24
lines changed Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ KBUILD_AFLAGS := $(LINUXINCLUDE) $(KBUILD_AFLAGS) -D__ASSEMBLY__ \
27
27
-DBOOT_HEAP_SIZE=$(BOOT_HEAP_SIZE ) \
28
28
-DKERNEL_ENTRY=$(VMLINUX_ENTRY_ADDRESS )
29
29
30
- targets := head.o decompress.o dbg.o uart-16550.o uart-alchemy.o
30
+ targets := head.o decompress.o string.o dbg.o uart-16550.o uart-alchemy.o
31
31
32
32
# decompressor objects (linked with vmlinuz)
33
- vmlinuzobjs-y := $(obj ) /head.o $(obj ) /decompress.o $(obj ) /dbg.o
33
+ vmlinuzobjs-y := $(obj ) /head.o $(obj ) /decompress.o $(obj ) /string.o $( obj ) / dbg.o
34
34
35
35
ifdef CONFIG_DEBUG_ZBOOT
36
36
vmlinuzobjs-$(CONFIG_SYS_SUPPORTS_ZBOOT_UART16550) += $(obj ) /uart-16550.o
Original file line number Diff line number Diff line change @@ -43,33 +43,11 @@ void error(char *x)
43
43
/* activate the code for pre-boot environment */
44
44
#define STATIC static
45
45
46
- #if defined(CONFIG_KERNEL_GZIP ) || defined(CONFIG_KERNEL_XZ ) || \
47
- defined(CONFIG_KERNEL_LZ4 )
48
- void * memcpy (void * dest , const void * src , size_t n )
49
- {
50
- int i ;
51
- const char * s = src ;
52
- char * d = dest ;
53
-
54
- for (i = 0 ; i < n ; i ++ )
55
- d [i ] = s [i ];
56
- return dest ;
57
- }
58
- #endif
59
46
#ifdef CONFIG_KERNEL_GZIP
60
47
#include "../../../../lib/decompress_inflate.c"
61
48
#endif
62
49
63
50
#ifdef CONFIG_KERNEL_BZIP2
64
- void * memset (void * s , int c , size_t n )
65
- {
66
- int i ;
67
- char * ss = s ;
68
-
69
- for (i = 0 ; i < n ; i ++ )
70
- ss [i ] = c ;
71
- return s ;
72
- }
73
51
#include "../../../../lib/decompress_bunzip2.c"
74
52
#endif
75
53
Original file line number Diff line number Diff line change
1
+ /*
2
+ * arch/mips/boot/compressed/string.c
3
+ *
4
+ * Very small subset of simple string routines
5
+ */
6
+
7
+ #include <linux/types.h>
8
+
9
+ void * memcpy (void * dest , const void * src , size_t n )
10
+ {
11
+ int i ;
12
+ const char * s = src ;
13
+ char * d = dest ;
14
+
15
+ for (i = 0 ; i < n ; i ++ )
16
+ d [i ] = s [i ];
17
+ return dest ;
18
+ }
19
+
20
+ void * memset (void * s , int c , size_t n )
21
+ {
22
+ int i ;
23
+ char * ss = s ;
24
+
25
+ for (i = 0 ; i < n ; i ++ )
26
+ ss [i ] = c ;
27
+ return s ;
28
+ }
You can’t perform that action at this time.
0 commit comments