100-compile_fixes.patch 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. Index: linux-2.6.25/arch/cris/mm/init.c
  2. ===================================================================
  3. --- linux-2.6.25.orig/arch/cris/mm/init.c 2008-05-03 09:53:53.000000000 +0100
  4. +++ linux-2.6.25/arch/cris/mm/init.c 2008-05-03 09:54:05.000000000 +0100
  5. @@ -112,3 +112,7 @@
  6. printk (KERN_INFO "Freeing unused kernel memory: %luk freed\n",
  7. (unsigned long)((&__init_end - &__init_begin) >> 10));
  8. }
  9. +
  10. +void free_initrd_mem(unsigned long start, unsigned long end)
  11. +{
  12. +}
  13. Index: linux-2.6.25/arch/cris/boot/compressed/Makefile
  14. ===================================================================
  15. --- linux-2.6.25.orig/arch/cris/boot/compressed/Makefile 2008-05-03 10:00:53.000000000 +0100
  16. +++ linux-2.6.25/arch/cris/boot/compressed/Makefile 2008-05-03 10:01:12.000000000 +0100
  17. @@ -7,7 +7,7 @@
  18. LD = ld-cris
  19. ldflags-y += -T $(obj)/decompress.ld
  20. OBJECTS = $(obj)/head.o $(obj)/misc.o
  21. -OBJCOPY = objcopy-cris
  22. +OBJCOPY = /usr/local/cris/objcopy-cris
  23. OBJCOPYFLAGS = -O binary --remove-section=.bss
  24. quiet_cmd_image = BUILD $@
  25. Index: linux-2.6.25/arch/cris/boot/Makefile
  26. ===================================================================
  27. --- linux-2.6.25.orig/arch/cris/boot/Makefile 2008-04-17 03:49:44.000000000 +0100
  28. +++ linux-2.6.25/arch/cris/boot/Makefile 2008-05-03 10:05:56.000000000 +0100
  29. @@ -2,10 +2,10 @@
  30. # arch/cris/arch-v10/boot/Makefile
  31. #
  32. -OBJCOPY = objcopy-cris
  33. +OBJCOPY = /usr/local/cris/objcopy-cris
  34. OBJCOPYFLAGS = -O binary --remove-section=.bss
  35. -subdir- := compressed rescue
  36. +subdir- := compressed
  37. targets := Image
  38. $(obj)/Image: vmlinux FORCE
  39. @@ -14,7 +14,6 @@
  40. $(obj)/compressed/vmlinux: $(obj)/Image FORCE
  41. $(Q)$(MAKE) $(build)=$(obj)/compressed $@
  42. - $(Q)$(MAKE) $(build)=$(obj)/rescue $(obj)/rescue/rescue.bin
  43. $(obj)/zImage: $(obj)/compressed/vmlinux
  44. @cp $< $@
  45. Index: linux-2.6.25/arch/cris/boot/compressed/Makefile
  46. ===================================================================
  47. --- linux-2.6.25.orig/arch/cris/boot/compressed/Makefile 2008-05-03 10:01:12.000000000 +0100
  48. +++ linux-2.6.25/arch/cris/boot/compressed/Makefile 2008-05-03 16:29:55.000000000 +0100
  49. @@ -2,9 +2,8 @@
  50. # arch/cris/arch-v10/boot/compressed/Makefile
  51. #
  52. -CC = gcc-cris -melf $(LINUXINCLUDE)
  53. ccflags-y += -O2
  54. -LD = ld-cris
  55. +LD=/usr/local/cris/ld-cris
  56. ldflags-y += -T $(obj)/decompress.ld
  57. OBJECTS = $(obj)/head.o $(obj)/misc.o
  58. OBJCOPY = /usr/local/cris/objcopy-cris
  59. @@ -22,10 +21,10 @@
  60. $(call if_changed,objcopy)
  61. $(obj)/head.o: $(obj)/head.S .config
  62. - @$(CC) -D__ASSEMBLY__ -traditional -c $< -o $@
  63. + /usr/local/cris/gcc-cris -melf $(LINUXINCLUDE) -D__ASSEMBLY__ -traditional -c $< -o $@
  64. $(obj)/misc.o: $(obj)/misc.c .config
  65. - @$(CC) -D__KERNEL__ -c $< -o $@
  66. + /usr/local/cris/gcc-cris -melf $(LINUXINCLUDE) -D__KERNEL__ -c $< -o $@
  67. $(obj)/vmlinux: $(obj)/piggy.gz $(obj)/decompress.bin FORCE
  68. $(call if_changed,image)
  69. Index: linux-2.6.25/arch/cris/boot/compressed/misc.c
  70. ===================================================================
  71. --- linux-2.6.25.orig/arch/cris/boot/compressed/misc.c 2008-05-03 16:22:44.000000000 +0100
  72. +++ linux-2.6.25/arch/cris/boot/compressed/misc.c 2008-05-03 16:23:26.000000000 +0100
  73. @@ -5,7 +5,7 @@
  74. * adapted for Linux.
  75. *
  76. * malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
  77. - * puts by Nick Holloway 1993, better puts by Martin Mares 1995
  78. + * putstr by Nick Holloway 1993, better putstr by Martin Mares 1995
  79. * adaptation for Linux/CRIS Axis Communications AB, 1999
  80. *
  81. */
  82. @@ -99,7 +99,7 @@
  83. static void gzip_mark(void **);
  84. static void gzip_release(void **);
  85. -static void puts(const char *);
  86. +static void putstr(const char *);
  87. /* the "heap" is put directly after the BSS ends, at end */
  88. @@ -139,7 +139,7 @@
  89. /* decompressor info and error messages to serial console */
  90. static void
  91. -puts(const char *s)
  92. +putstr(const char *s)
  93. {
  94. #ifndef CONFIG_ETRAX_DEBUG_PORT_NULL
  95. while(*s) {
  96. @@ -209,9 +209,9 @@
  97. static void
  98. error(char *x)
  99. {
  100. - puts("\n\n");
  101. - puts(x);
  102. - puts("\n\n -- System halted\n");
  103. + putstr("\n\n");
  104. + putstr(x);
  105. + putstr("\n\n -- System halted\n");
  106. while(1); /* Halt */
  107. }
  108. @@ -257,14 +257,7 @@
  109. makecrc();
  110. - __asm__ volatile ("move vr,%0" : "=rm" (revision));
  111. - if (revision < 10)
  112. - {
  113. - puts("You need an ETRAX 100LX to run linux 2.6\n");
  114. - while(1);
  115. - }
  116. -
  117. - puts("Uncompressing Linux...\n");
  118. + putstr("Uncompressing Linux...\n");
  119. gunzip();
  120. - puts("Done. Now booting the kernel.\n");
  121. + putstr("Done. Now booting the kernel.\n");
  122. }