Skip to contentSkip to conversation

Various sparc32 cleanups

PATCH In review Tom 'spot' Callaway 2 participants 2 messages Mar 31, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Various sparc32 cleanups

So, as part of an exercise in futility, I built 2.6 with CONFIG_SUN4=y. Not that there appears to be any working method to boot this kernel (yes, I do have a working sun4), but the cleanups needed were minor (and at least partially relevant to more modern sparc32 machines).

Patch is attached. I have no idea if it works, but the bw2 fix is obviously correct.

~spot
---
Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE Red Hat Sales Engineer || Aurora SPARC Linux Project Leader

"The author's mathematical treatment of the conception of purpose is novel and highly ingenious, but heretical and, so far as the present social order is concerned, dangerous and potentially subversive. Not to be published." -- Aldous Huxley's "Brave New World"

arch/sparc/mm/Makefile renamed from arch/sparc/mm/Makefile.BAD +5 -1
@@ -16,8 +16,12 @@
 obj-y	+= highmem.o
 endif
 
-ifdef CONFIG_SMP
+ifdef CONFIG_SMP 
+obj-y   += nosun4c.o
+else
+ifdef CONFIG_SUN4
 obj-y   += nosun4c.o
 else
 obj-y   += sun4c.o
 endif
+endif
arch/sparc/mm/nosrmmu.c renamed from arch/sparc/mm/nosrmmu.c.BAD +2 -0
@@ -46,6 +46,8 @@
 {
 }
 
+void *srmmu_nocache_pool;
+
 void __init srmmu_end_memory(unsigned long memory_size, unsigned long *mem_end_p)
 {
 	return 0;
arch/sparc/mm/nosun4c.c renamed from arch/sparc/mm/nosun4c.c.BAD +4 -0
@@ -75,3 +75,7 @@
 {
 	should_not_happen();
 }
+
+void sun4c_grow_kernel_ring(void)
+{
+}
drivers/video/bw2.c renamed from drivers/video/bw2.c.BAD +1 -1
@@ -321,7 +321,7 @@
 		resp = &res;
 		all->info.var.xres = all->info.var.xres_virtual = 1152;
 		all->info.var.yres = all->info.var.yres_virtual = 900;
-		all->info.bits_per_pixel = 1;
+		all->info.var.bits_per_pixel = 1;
 		linebytes = 1152 / 8;
 	} else
 #else
#1 lore raw
Quoted 7 lines · Tom 'spot' Callaway

So, as part of an exercise in futility, I built 2.6 with CONFIG_SUN4=y. Not that there appears to be any working method to boot this kernel (yes, I do have a working sun4), but the cleanups needed were minor (and at least partially relevant to more modern sparc32 machines).

Patch is attached. I have no idea if it works, but the bw2 fix is obviously correct.

Hmm - at last someone else who has a sun4.
I have not tried this for ages but a few pointers from memory. The max size of the boot image is rather small so you need to rip out all non-essentials. I am not sure what the PROM limits are, but it might not be possible to make 2.6 small enough without making an intermediate loader. SILO did not work.
Did you remember to use elftoaout with -b to remove the a.out header bytes, it will not even start without this.