Changeset 7325


Ignore:
Timestamp:
2007-05-24T02:52:37+02:00 (9 years ago)
Author:
nbd
Message:

nuke vga console support from the x86 lzma loader, it seems to cause problems at least in qemu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic-2.6/patches/600-x86_lzma.patch

    r7322 r7325  
    1 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 
    2 --- linux-2.6.21.1/arch/i386/boot/compressed/LzmaDecode.c       1970-01-01 01:00:00.000000000 +0100 
    3 +++ linux-2.6.21.1-owrt/arch/i386/boot/compressed/LzmaDecode.c  2007-05-14 11:55:38.000000000 +0200 
     1diff -Naur linux-old/arch/i386/boot/compressed/LzmaDecode.c linux-lzma/arch/i386/boot/compressed/LzmaDecode.c 
     2--- linux-old/arch/i386/boot/compressed/LzmaDecode.c    1969-12-31 19:00:00.000000000 -0500 
     3+++ linux-lzma/arch/i386/boot/compressed/LzmaDecode.c   2005-06-05 00:07:38.000000000 -0400 
    44@@ -0,0 +1,586 @@ 
    55+/* 
     
    589589+  return LZMA_RESULT_OK; 
    590590+} 
    591 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 
    592 --- linux-2.6.21.1/arch/i386/boot/compressed/LzmaDecode.h       1970-01-01 01:00:00.000000000 +0100 
    593 +++ linux-2.6.21.1-owrt/arch/i386/boot/compressed/LzmaDecode.h  2007-05-14 11:55:38.000000000 +0200 
     591diff -Naur linux-old/arch/i386/boot/compressed/LzmaDecode.h linux-lzma/arch/i386/boot/compressed/LzmaDecode.h 
     592--- linux-old/arch/i386/boot/compressed/LzmaDecode.h    1969-12-31 19:00:00.000000000 -0500 
     593+++ linux-lzma/arch/i386/boot/compressed/LzmaDecode.h   2005-06-05 00:07:39.000000000 -0400 
    594594@@ -0,0 +1,100 @@ 
    595595+/*  
     
    693693+ 
    694694+#endif 
    695 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 
    696 --- linux-2.6.21.1/arch/i386/boot/compressed/lzma_misc.c        1970-01-01 01:00:00.000000000 +0100 
    697 +++ linux-2.6.21.1-owrt/arch/i386/boot/compressed/lzma_misc.c   2007-05-14 11:55:38.000000000 +0200 
    698 @@ -0,0 +1,374 @@ 
     695diff -Naur linux-old/arch/i386/boot/compressed/lzma_misc.c linux-lzma/arch/i386/boot/compressed/lzma_misc.c 
     696--- linux-old/arch/i386/boot/compressed/lzma_misc.c     1969-12-31 19:00:00.000000000 -0500 
     697+++ linux-lzma/arch/i386/boot/compressed/lzma_misc.c    2005-06-04 21:33:48.000000000 -0400 
     698@@ -0,0 +1,281 @@ 
    699699+/* 
    700700+ * lzma_misc.c 
     
    852852+ */ 
    853853+static unsigned char *real_mode; /* Pointer to real-mode data */ 
    854 + 
    855 +#define RM_EXT_MEM_K   (*(unsigned short *)(real_mode + 0x2)) 
    856 +#ifndef STANDARD_MEMORY_BIOS_CALL 
    857 +#define RM_ALT_MEM_K   (*(unsigned long *)(real_mode + 0x1e0)) 
    858 +#endif 
    859 +#define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0)) 
    860 + 
    861854+extern unsigned char input_data[]; 
    862855+extern int input_len; 
     
    865858+static void *memcpy(void *dest, const void *src, unsigned n); 
    866859+ 
    867 +static void putstr(const char *); 
    868 + 
    869 +static char *vidmem = (char *)0xb8000; 
    870 +static int vidport; 
    871 +static int lines, cols; 
    872 + 
    873860+#ifdef CONFIG_X86_NUMAQ 
    874861+void *xquad_portio; 
    875862+#endif 
    876 + 
    877 +  
    878 +static void scroll(void) 
    879 +{ 
    880 +       int i; 
    881 + 
    882 +       memcpy ( vidmem, vidmem + cols * 2, ( lines - 1 ) * cols * 2 ); 
    883 +       for ( i = ( lines - 1 ) * cols * 2; i < lines * cols * 2; i += 2 ) 
    884 +               vidmem[i] = ' '; 
    885 +} 
    886 + 
    887 +static void putstr(const char *s) 
    888 +{ 
    889 +       int x,y,pos; 
    890 +       char c; 
    891 + 
    892 +       x = RM_SCREEN_INFO.orig_x; 
    893 +       y = RM_SCREEN_INFO.orig_y; 
    894 + 
    895 +       while ( ( c = *s++ ) != '\0' ) { 
    896 +               if ( c == '\n' ) { 
    897 +                       x = 0; 
    898 +                       if ( ++y >= lines ) { 
    899 +                               scroll(); 
    900 +                               y--; 
    901 +                       } 
    902 +               } else { 
    903 +                       vidmem [ ( x + cols * y ) * 2 ] = c; 
    904 +                       if ( ++x >= cols ) { 
    905 +                               x = 0; 
    906 +                               if ( ++y >= lines ) { 
    907 +                                       scroll(); 
    908 +                                       y--; 
    909 +                               } 
    910 +                       } 
    911 +               } 
    912 +       } 
    913 + 
    914 +       RM_SCREEN_INFO.orig_x = x; 
    915 +       RM_SCREEN_INFO.orig_y = y; 
    916 + 
    917 +       pos = (x + cols * y) * 2;       /* Update cursor position */ 
    918 +       outb_p(14, vidport); 
    919 +       outb_p(0xff & (pos >> 9), vidport+1); 
    920 +       outb_p(15, vidport); 
    921 +       outb_p(0xff & (pos >> 1), vidport+1); 
    922 +} 
    923863+ 
    924864+static void* memcpy(void* dest, const void* src, unsigned n) 
     
    949889+#include "LzmaDecode.c" 
    950890+ 
    951 +#ifdef  _LZMA_IN_CB 
    952891+static int read_byte(void *object, unsigned char **buffer, UInt32 *bufferSize); 
    953 +#endif 
    954892+ 
    955893+ 
     
    969907+       unsigned char* p; 
    970908+        
    971 +#ifdef  _LZMA_IN_CB 
    972909+       ILzmaInCallback callback; 
    973910+       callback.Read = read_byte; 
    974 +#else   
    975 +       unsigned char* inputbuf; 
    976 +       unsigned int lzma_workspace_size; 
    977 +       unsigned int compressedSize = 0; 
    978 +#endif 
    979911+ 
    980912+       /* lzma args */ 
     
    992924+            
    993925+       //get compressedSize  
    994 +#ifdef  _LZMA_IN_CB 
    995926+       for (i = 0; i < 4; i++)  
    996927+               get_byte(); 
    997 +#else 
    998 +       p= (char*)&compressedSize;       
    999 +       for (i = 0; i < 4; i++)  
    1000 +           *p++ = get_byte(); 
    1001 +#endif 
    1002928+        
    1003929+       // point it beyond uncompresedSize 
     
    1021947+       val = get_byte(); 
    1022948+       *buffer = &val; 
    1023 +       if ( i++ % ( 1024 * 50 ) == 0 ) 
    1024 +              putstr("."); 
    1025949+       return LZMA_RESULT_OK; 
    1026950+}       
     
    1029953+static void error(char *x) 
    1030954+{ 
    1031 +       putstr("\n\n"); 
    1032 +       putstr(x); 
    1033 +       putstr("\n\n -- System halted"); 
    1034 + 
    1035955+       while(1);       /* Halt */ 
    1036956+} 
     
    1040960+{ 
    1041961+       real_mode = rmode; 
    1042 + 
    1043 +       if (RM_SCREEN_INFO.orig_video_mode == 7) { 
    1044 +               vidmem = (char *) 0xb0000; 
    1045 +               vidport = 0x3b4; 
    1046 +       } else { 
    1047 +               vidmem = (char *) 0xb8000; 
    1048 +               vidport = 0x3d4; 
    1049 +       } 
    1050 + 
    1051 +       lines = RM_SCREEN_INFO.orig_video_lines; 
    1052 +       cols = RM_SCREEN_INFO.orig_video_cols; 
    1053962+ 
    1054963+       window = output; 
     
    1066975+#endif 
    1067976+ 
    1068 +       putstr("Uncompressing Linux... "); 
    1069977+       lzma_unzip(); 
    1070 +       putstr("Ok, booting the kernel.\n"); 
    1071978+       return; 
    1072979+} 
    1073 diff -Nur linux-2.6.21.1/arch/i386/boot/compressed/Makefile linux-2.6.21.1-owrt/arch/i386/boot/compressed/Makefile 
    1074 --- linux-2.6.21.1/arch/i386/boot/compressed/Makefile   2007-04-27 23:49:26.000000000 +0200 
    1075 +++ linux-2.6.21.1-owrt/arch/i386/boot/compressed/Makefile      2007-05-14 12:01:25.000000000 +0200 
     980diff -Naur linux-old/arch/i386/boot/compressed/Makefile linux-lzma/arch/i386/boot/compressed/Makefile 
     981--- linux-old/arch/i386/boot/compressed/Makefile        2005-06-04 21:53:40.000000000 -0400 
     982+++ linux-lzma/arch/i386/boot/compressed/Makefile       2005-06-05 00:25:23.000000000 -0400 
    1076983@@ -4,15 +4,15 @@ 
    1077984 # create a compressed vmlinux image from the original vmlinux 
     
    11131020+$(obj)/piggy.o: $(src)/vmlinux.scr $(obj)/vmlinux.bin.lzma FORCE 
    11141021        $(call if_changed,ld) 
    1115 diff -Nur linux-2.6.21.1/scripts/Makefile.lib linux-2.6.21.1-owrt/scripts/Makefile.lib 
    1116 --- linux-2.6.21.1/scripts/Makefile.lib 2007-04-27 23:49:26.000000000 +0200 
    1117 +++ linux-2.6.21.1-owrt/scripts/Makefile.lib    2007-05-14 11:55:38.000000000 +0200 
     1022diff -urN linux-2.6.19.2/scripts/Makefile.lib linux-2.6.19.2.new/scripts/Makefile.lib 
     1023--- linux-2.6.19.2/scripts/Makefile.lib 2007-01-10 20:10:37.000000000 +0100 
     1024+++ linux-2.6.19.2.new/scripts/Makefile.lib     2007-04-15 23:51:54.000000000 +0200 
    11181025@@ -162,4 +162,9 @@ 
    11191026 quiet_cmd_gzip = GZIP    $@ 
Note: See TracChangeset for help on using the changeset viewer.