mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-09-12 16:58:03 +03:00
nuke vga console support from the x86 lzma loader, it seems to cause problems at least in qemu
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7325 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
bbe65263ca
commit
1a0c6ae7d7
@ -1,6 +1,6 @@
|
|||||||
diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/LzmaDecode.c linux-2.6.21.1-owrt/arch/i386/boot/compressed/LzmaDecode.c
|
diff -Naur linux-old/arch/i386/boot/compressed/LzmaDecode.c linux-lzma/arch/i386/boot/compressed/LzmaDecode.c
|
||||||
--- linux-2.6.21.1/arch/i386/boot/compressed/LzmaDecode.c 1970-01-01 01:00:00.000000000 +0100
|
--- linux-old/arch/i386/boot/compressed/LzmaDecode.c 1969-12-31 19:00:00.000000000 -0500
|
||||||
+++ linux-2.6.21.1-owrt/arch/i386/boot/compressed/LzmaDecode.c 2007-05-14 11:55:38.000000000 +0200
|
+++ linux-lzma/arch/i386/boot/compressed/LzmaDecode.c 2005-06-05 00:07:38.000000000 -0400
|
||||||
@@ -0,0 +1,586 @@
|
@@ -0,0 +1,586 @@
|
||||||
+/*
|
+/*
|
||||||
+ LzmaDecode.c
|
+ LzmaDecode.c
|
||||||
@ -588,9 +588,9 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/LzmaDecode.c linux-2.6.21.1-o
|
|||||||
+ *outSizeProcessed = nowPos;
|
+ *outSizeProcessed = nowPos;
|
||||||
+ return LZMA_RESULT_OK;
|
+ return LZMA_RESULT_OK;
|
||||||
+}
|
+}
|
||||||
diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/LzmaDecode.h linux-2.6.21.1-owrt/arch/i386/boot/compressed/LzmaDecode.h
|
diff -Naur linux-old/arch/i386/boot/compressed/LzmaDecode.h linux-lzma/arch/i386/boot/compressed/LzmaDecode.h
|
||||||
--- linux-2.6.21.1/arch/i386/boot/compressed/LzmaDecode.h 1970-01-01 01:00:00.000000000 +0100
|
--- linux-old/arch/i386/boot/compressed/LzmaDecode.h 1969-12-31 19:00:00.000000000 -0500
|
||||||
+++ linux-2.6.21.1-owrt/arch/i386/boot/compressed/LzmaDecode.h 2007-05-14 11:55:38.000000000 +0200
|
+++ linux-lzma/arch/i386/boot/compressed/LzmaDecode.h 2005-06-05 00:07:39.000000000 -0400
|
||||||
@@ -0,0 +1,100 @@
|
@@ -0,0 +1,100 @@
|
||||||
+/*
|
+/*
|
||||||
+ LzmaDecode.h
|
+ LzmaDecode.h
|
||||||
@ -692,10 +692,10 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/LzmaDecode.h linux-2.6.21.1-o
|
|||||||
+ UInt32 *outSizeProcessed);
|
+ UInt32 *outSizeProcessed);
|
||||||
+
|
+
|
||||||
+#endif
|
+#endif
|
||||||
diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c linux-2.6.21.1-owrt/arch/i386/boot/compressed/lzma_misc.c
|
diff -Naur linux-old/arch/i386/boot/compressed/lzma_misc.c linux-lzma/arch/i386/boot/compressed/lzma_misc.c
|
||||||
--- linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c 1970-01-01 01:00:00.000000000 +0100
|
--- linux-old/arch/i386/boot/compressed/lzma_misc.c 1969-12-31 19:00:00.000000000 -0500
|
||||||
+++ linux-2.6.21.1-owrt/arch/i386/boot/compressed/lzma_misc.c 2007-05-14 11:55:38.000000000 +0200
|
+++ linux-lzma/arch/i386/boot/compressed/lzma_misc.c 2005-06-04 21:33:48.000000000 -0400
|
||||||
@@ -0,0 +1,374 @@
|
@@ -0,0 +1,281 @@
|
||||||
+/*
|
+/*
|
||||||
+ * lzma_misc.c
|
+ * lzma_misc.c
|
||||||
+ *
|
+ *
|
||||||
@ -851,76 +851,16 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c linux-2.6.21.1-ow
|
|||||||
+ * This is set up by the setup-routine at boot-time
|
+ * This is set up by the setup-routine at boot-time
|
||||||
+ */
|
+ */
|
||||||
+static unsigned char *real_mode; /* Pointer to real-mode data */
|
+static unsigned char *real_mode; /* Pointer to real-mode data */
|
||||||
+
|
|
||||||
+#define RM_EXT_MEM_K (*(unsigned short *)(real_mode + 0x2))
|
|
||||||
+#ifndef STANDARD_MEMORY_BIOS_CALL
|
|
||||||
+#define RM_ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0))
|
|
||||||
+#endif
|
|
||||||
+#define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0))
|
|
||||||
+
|
|
||||||
+extern unsigned char input_data[];
|
+extern unsigned char input_data[];
|
||||||
+extern int input_len;
|
+extern int input_len;
|
||||||
+
|
+
|
||||||
+static void error(char *x);
|
+static void error(char *x);
|
||||||
+static void *memcpy(void *dest, const void *src, unsigned n);
|
+static void *memcpy(void *dest, const void *src, unsigned n);
|
||||||
+
|
+
|
||||||
+static void putstr(const char *);
|
|
||||||
+
|
|
||||||
+static char *vidmem = (char *)0xb8000;
|
|
||||||
+static int vidport;
|
|
||||||
+static int lines, cols;
|
|
||||||
+
|
|
||||||
+#ifdef CONFIG_X86_NUMAQ
|
+#ifdef CONFIG_X86_NUMAQ
|
||||||
+void *xquad_portio;
|
+void *xquad_portio;
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
+
|
|
||||||
+static void scroll(void)
|
|
||||||
+{
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ memcpy ( vidmem, vidmem + cols * 2, ( lines - 1 ) * cols * 2 );
|
|
||||||
+ for ( i = ( lines - 1 ) * cols * 2; i < lines * cols * 2; i += 2 )
|
|
||||||
+ vidmem[i] = ' ';
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void putstr(const char *s)
|
|
||||||
+{
|
|
||||||
+ int x,y,pos;
|
|
||||||
+ char c;
|
|
||||||
+
|
|
||||||
+ x = RM_SCREEN_INFO.orig_x;
|
|
||||||
+ y = RM_SCREEN_INFO.orig_y;
|
|
||||||
+
|
|
||||||
+ while ( ( c = *s++ ) != '\0' ) {
|
|
||||||
+ if ( c == '\n' ) {
|
|
||||||
+ x = 0;
|
|
||||||
+ if ( ++y >= lines ) {
|
|
||||||
+ scroll();
|
|
||||||
+ y--;
|
|
||||||
+ }
|
|
||||||
+ } else {
|
|
||||||
+ vidmem [ ( x + cols * y ) * 2 ] = c;
|
|
||||||
+ if ( ++x >= cols ) {
|
|
||||||
+ x = 0;
|
|
||||||
+ if ( ++y >= lines ) {
|
|
||||||
+ scroll();
|
|
||||||
+ y--;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ RM_SCREEN_INFO.orig_x = x;
|
|
||||||
+ RM_SCREEN_INFO.orig_y = y;
|
|
||||||
+
|
|
||||||
+ pos = (x + cols * y) * 2; /* Update cursor position */
|
|
||||||
+ outb_p(14, vidport);
|
|
||||||
+ outb_p(0xff & (pos >> 9), vidport+1);
|
|
||||||
+ outb_p(15, vidport);
|
|
||||||
+ outb_p(0xff & (pos >> 1), vidport+1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void* memcpy(void* dest, const void* src, unsigned n)
|
+static void* memcpy(void* dest, const void* src, unsigned n)
|
||||||
+{
|
+{
|
||||||
+ int i;
|
+ int i;
|
||||||
@ -948,9 +888,7 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c linux-2.6.21.1-ow
|
|||||||
+#include "LzmaDecode.h"
|
+#include "LzmaDecode.h"
|
||||||
+#include "LzmaDecode.c"
|
+#include "LzmaDecode.c"
|
||||||
+
|
+
|
||||||
+#ifdef _LZMA_IN_CB
|
|
||||||
+static int read_byte(void *object, unsigned char **buffer, UInt32 *bufferSize);
|
+static int read_byte(void *object, unsigned char **buffer, UInt32 *bufferSize);
|
||||||
+#endif
|
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
+/*
|
+/*
|
||||||
@ -968,14 +906,8 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c linux-2.6.21.1-ow
|
|||||||
+ unsigned int uncompressedSize = 0;
|
+ unsigned int uncompressedSize = 0;
|
||||||
+ unsigned char* p;
|
+ unsigned char* p;
|
||||||
+
|
+
|
||||||
+#ifdef _LZMA_IN_CB
|
|
||||||
+ ILzmaInCallback callback;
|
+ ILzmaInCallback callback;
|
||||||
+ callback.Read = read_byte;
|
+ callback.Read = read_byte;
|
||||||
+#else
|
|
||||||
+ unsigned char* inputbuf;
|
|
||||||
+ unsigned int lzma_workspace_size;
|
|
||||||
+ unsigned int compressedSize = 0;
|
|
||||||
+#endif
|
|
||||||
+
|
+
|
||||||
+ /* lzma args */
|
+ /* lzma args */
|
||||||
+ i = get_byte();
|
+ i = get_byte();
|
||||||
@ -991,14 +923,8 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c linux-2.6.21.1-ow
|
|||||||
+ *p++ = get_byte();
|
+ *p++ = get_byte();
|
||||||
+
|
+
|
||||||
+ //get compressedSize
|
+ //get compressedSize
|
||||||
+#ifdef _LZMA_IN_CB
|
|
||||||
+ for (i = 0; i < 4; i++)
|
+ for (i = 0; i < 4; i++)
|
||||||
+ get_byte();
|
+ get_byte();
|
||||||
+#else
|
|
||||||
+ p= (char*)&compressedSize;
|
|
||||||
+ for (i = 0; i < 4; i++)
|
|
||||||
+ *p++ = get_byte();
|
|
||||||
+#endif
|
|
||||||
+
|
+
|
||||||
+ // point it beyond uncompresedSize
|
+ // point it beyond uncompresedSize
|
||||||
+ workspace = window + uncompressedSize;
|
+ workspace = window + uncompressedSize;
|
||||||
@ -1020,18 +946,12 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c linux-2.6.21.1-ow
|
|||||||
+ *bufferSize = 1;
|
+ *bufferSize = 1;
|
||||||
+ val = get_byte();
|
+ val = get_byte();
|
||||||
+ *buffer = &val;
|
+ *buffer = &val;
|
||||||
+ if ( i++ % ( 1024 * 50 ) == 0 )
|
|
||||||
+ putstr(".");
|
|
||||||
+ return LZMA_RESULT_OK;
|
+ return LZMA_RESULT_OK;
|
||||||
+}
|
+}
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
+static void error(char *x)
|
+static void error(char *x)
|
||||||
+{
|
+{
|
||||||
+ putstr("\n\n");
|
|
||||||
+ putstr(x);
|
|
||||||
+ putstr("\n\n -- System halted");
|
|
||||||
+
|
|
||||||
+ while(1); /* Halt */
|
+ while(1); /* Halt */
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
@ -1040,17 +960,6 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c linux-2.6.21.1-ow
|
|||||||
+{
|
+{
|
||||||
+ real_mode = rmode;
|
+ real_mode = rmode;
|
||||||
+
|
+
|
||||||
+ if (RM_SCREEN_INFO.orig_video_mode == 7) {
|
|
||||||
+ vidmem = (char *) 0xb0000;
|
|
||||||
+ vidport = 0x3b4;
|
|
||||||
+ } else {
|
|
||||||
+ vidmem = (char *) 0xb8000;
|
|
||||||
+ vidport = 0x3d4;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ lines = RM_SCREEN_INFO.orig_video_lines;
|
|
||||||
+ cols = RM_SCREEN_INFO.orig_video_cols;
|
|
||||||
+
|
|
||||||
+ window = output;
|
+ window = output;
|
||||||
+ inbuf = input_data; /* Input buffer */
|
+ inbuf = input_data; /* Input buffer */
|
||||||
+ insize = input_len;
|
+ insize = input_len;
|
||||||
@ -1065,14 +974,12 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c linux-2.6.21.1-ow
|
|||||||
+ error("Wrong destination address");
|
+ error("Wrong destination address");
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
+ putstr("Uncompressing Linux... ");
|
|
||||||
+ lzma_unzip();
|
+ lzma_unzip();
|
||||||
+ putstr("Ok, booting the kernel.\n");
|
|
||||||
+ return;
|
+ return;
|
||||||
+}
|
+}
|
||||||
diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/Makefile linux-2.6.21.1-owrt/arch/i386/boot/compressed/Makefile
|
diff -Naur linux-old/arch/i386/boot/compressed/Makefile linux-lzma/arch/i386/boot/compressed/Makefile
|
||||||
--- linux-2.6.21.1/arch/i386/boot/compressed/Makefile 2007-04-27 23:49:26.000000000 +0200
|
--- linux-old/arch/i386/boot/compressed/Makefile 2005-06-04 21:53:40.000000000 -0400
|
||||||
+++ linux-2.6.21.1-owrt/arch/i386/boot/compressed/Makefile 2007-05-14 12:01:25.000000000 +0200
|
+++ linux-lzma/arch/i386/boot/compressed/Makefile 2005-06-05 00:25:23.000000000 -0400
|
||||||
@@ -4,15 +4,15 @@
|
@@ -4,15 +4,15 @@
|
||||||
# create a compressed vmlinux image from the original vmlinux
|
# create a compressed vmlinux image from the original vmlinux
|
||||||
#
|
#
|
||||||
@ -1112,9 +1019,9 @@ diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/Makefile linux-2.6.21.1-owrt/
|
|||||||
-$(obj)/piggy.o: $(src)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
|
-$(obj)/piggy.o: $(src)/vmlinux.scr $(obj)/vmlinux.bin.gz FORCE
|
||||||
+$(obj)/piggy.o: $(src)/vmlinux.scr $(obj)/vmlinux.bin.lzma FORCE
|
+$(obj)/piggy.o: $(src)/vmlinux.scr $(obj)/vmlinux.bin.lzma FORCE
|
||||||
$(call if_changed,ld)
|
$(call if_changed,ld)
|
||||||
diff -Nur linux-2.6.21.1/scripts/Makefile.lib linux-2.6.21.1-owrt/scripts/Makefile.lib
|
diff -urN linux-2.6.19.2/scripts/Makefile.lib linux-2.6.19.2.new/scripts/Makefile.lib
|
||||||
--- linux-2.6.21.1/scripts/Makefile.lib 2007-04-27 23:49:26.000000000 +0200
|
--- linux-2.6.19.2/scripts/Makefile.lib 2007-01-10 20:10:37.000000000 +0100
|
||||||
+++ linux-2.6.21.1-owrt/scripts/Makefile.lib 2007-05-14 11:55:38.000000000 +0200
|
+++ linux-2.6.19.2.new/scripts/Makefile.lib 2007-04-15 23:51:54.000000000 +0200
|
||||||
@@ -162,4 +162,9 @@
|
@@ -162,4 +162,9 @@
|
||||||
quiet_cmd_gzip = GZIP $@
|
quiet_cmd_gzip = GZIP $@
|
||||||
cmd_gzip = gzip -f -9 < $< > $@
|
cmd_gzip = gzip -f -9 < $< > $@
|
||||||
|
Loading…
Reference in New Issue
Block a user