summaryrefslogtreecommitdiff
path: root/arch/cris/arch-v10/boot/compressed/misc.c
diff options
context:
space:
mode:
authorJesper Nilsson <jesper@jni.nu>2008-06-30 01:15:19 +0400
committerJesper Nilsson <jesper@jni.nu>2008-06-30 01:15:19 +0400
commitbdb144b67a7660ce5d044ae9a2fd1a8030f12523 (patch)
tree493177c56790bdf9a0358e5e5936e5b575006cc8 /arch/cris/arch-v10/boot/compressed/misc.c
parent543cf4cb3fe6f6cae3651ba918b9c56200b257d0 (diff)
downloadlinux-bdb144b67a7660ce5d044ae9a2fd1a8030f12523.tar.xz
[CRIS] Build fixes for compressed and rescue images for v10 and v32:
- Use the normal cross gcc instead of using an elf specific cris toolchain. This removes the dependency of this second toolchain. - Use the normal cross objcopy instead of overriding it to use elf-toolchain. This allows compiling using "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu-" instead of just "CROSS_COMPILE=$CRIS_GCC/cris-axis-linux-gnu/bin/" - Remove redundant rules for compiling, the implicit rules are sufficient. - Convert the arch/cris/arch-v10/boot/compressed/head.S to format accepted by the cris-axis-linux-gnu-gcc (registers must be prefixed with '$', remove explicit underscore on exported symbols) - Remove a number of unused (and duplicated) prototypes from arch/cris/arch-v10/boot/compressed/misc.c. - Correct memcpy and memset return values (actually return them!) Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
Diffstat (limited to 'arch/cris/arch-v10/boot/compressed/misc.c')
-rw-r--r--arch/cris/arch-v10/boot/compressed/misc.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/arch/cris/arch-v10/boot/compressed/misc.c b/arch/cris/arch-v10/boot/compressed/misc.c
index 9a43ab19391e..59961f20fabb 100644
--- a/arch/cris/arch-v10/boot/compressed/misc.c
+++ b/arch/cris/arch-v10/boot/compressed/misc.c
@@ -30,8 +30,7 @@
#define STATIC static
void* memset(void* s, int c, size_t n);
-void* memcpy(void* __dest, __const void* __src,
- size_t __n);
+void* memcpy(void* __dest, __const void* __src, size_t __n);
#define memzero(s, n) memset ((s), 0, (n))
@@ -81,11 +80,8 @@ static unsigned outcnt = 0; /* bytes in output buffer */
# define Tracecv(c,x)
#endif
-static int fill_inbuf(void);
static void flush_window(void);
static void error(char *m);
-static void gzip_mark(void **);
-static void gzip_release(void **);
extern char *input_data; /* lives in head.S */
@@ -95,7 +91,6 @@ static unsigned long output_ptr = 0;
static void *malloc(int size);
static void free(void *where);
-static void error(char *m);
static void gzip_mark(void **);
static void gzip_release(void **);
@@ -103,8 +98,8 @@ static void puts(const char *);
/* the "heap" is put directly after the BSS ends, at end */
-extern int end;
-static long free_mem_ptr = (long)&end;
+extern int _end;
+static long free_mem_ptr = (long)&_end;
#include "../../../../../lib/inflate.c"
@@ -170,6 +165,8 @@ memset(void* s, int c, size_t n)
char *ss = (char*)s;
for (i=0;i<n;i++) ss[i] = c;
+
+ return s;
}
void*
@@ -180,6 +177,8 @@ memcpy(void* __dest, __const void* __src,
char *d = (char *)__dest, *s = (char *)__src;
for (i=0;i<__n;i++) d[i] = s[i];
+
+ return __dest;
}
/* ===========================================================================
@@ -216,14 +215,12 @@ error(char *x)
while(1); /* Halt */
}
-void
-setup_normal_output_buffer()
+void setup_normal_output_buffer(void)
{
output_data = (char *)KERNEL_LOAD_ADR;
}
-void
-decompress_kernel()
+void decompress_kernel(void)
{
char revision;
@@ -257,7 +254,7 @@ decompress_kernel()
makecrc();
- __asm__ volatile ("move vr,%0" : "=rm" (revision));
+ __asm__ volatile ("move $vr,%0" : "=rm" (revision));
if (revision < 10)
{
puts("You need an ETRAX 100LX to run linux 2.6\n");