[LV] The kernel build process & tools any changes .

Mr. James W. Laferriere babydr at baby-dragons.com
Mon Mar 19 01:16:13 CET 2007


 	Hello Jan-Benedict ,

On Sun, 18 Mar 2007 23:33:08 +0100 ,  Jan-Benedict Glaw <jbglaw at lug-owl.de> Wrote:
> On Sun, 2007-03-18 15:04:39 -0700, Mr. James W. Laferriere <babydr at baby-dragons.com> wrote:
> > On Sun, 18 Mar 2007 20:56:00 +0100 ,  Jan-Benedict Glaw <jbglaw at lug-owl.de> Wrote:
> > > On Sun, 2007-03-18 12:27:20 -0700, Mr. James W. Laferriere <babydr at baby-dragons.com> wrote:
..snip...
> > >
> > > Just drop the ifdef stuff. If it works, then, well, it works :)  By
> > > the way, is it a seven segment display or 8 real LEDs in a row?
> > 
> >  	Ok ,  In the next patch .  A seven segment display .
> >  	If it makes a differnce .  Looks like it might .
>
> I'm just tryin' to get see what it actually is :-)  Initially, this
> was written for the small desktop machines with a row of LEDs. But now
> it's also used to display on those seven segment displays.  Maybe it'd
> be moved to the LED API that formed some months ago, but I guess we'd
> just keep diag_led.c for now.

 	Ok ,  Patch attached .  With all your suggestions .


> > > Another question: sgec is a candidate for bugfixing. Does it already
> > > work on your KA670 (eg. do you see ethernet traffix like DHCP
> > > requests) that originate from the Linux kernel or doesn't it work at
> > > all?
> > 
> >  	I don't know yet linux-kernel base has a bug in it ,  I think , 
> > 'asm/mutex.h' reported missing in 'kernel/mutex.c' per below(**) .  My 
> > linux-2.6.18.3 sources ,  which have been configured & well I'm using that 
> > kernel now ,  doesn't have that file either .  I'll check that tree's version 
> > 'kernel/mutex.c' and see if I can backout whatever change started this .
> > Tho a quick prayer for me would be nice as I'll need all the help I can get .
> > 
> >  	Here's the Killer(*) .  The below is the only place in 'kernel/mutex.c' 
> > that has that include .  I have not found in any source tree I have a 
> > link/file/... that is 'asm/mutex.h' .  I do find '$ARCH-asm/mutex.h' files , 
> > but none for ARCH=vax even in our vax-linux tree .
> >  	I do not know where to go from here ,  It is quite outside my abilities 
> > to decypher .  My kernel(i386) builds just fine & runs with the same definitions 
> > .
>
> We don't have one. Yet :)  OTOH, have you tested the path with setting
> CONFIG_DEBUG_MUTEXES?

 	Just did .  The kernel built .  But a previous 2.6.15 .config did not 
have to have CONFIG_DEBUG_MUTEXES defined and built and ran reasonably well on 
the ka660 I have (still stored) .

..snip...

> > 
> >  	Also this GAS message seems a little odd to me .  I always thought we 
> > were using gas ?  Even using the uclibc .
> > ...
> >    CC      kernel/posix-cpu-timers.o
> > kernel/posix-cpu-timers.c:1: warning: -g is only supported when using GAS on this processor,
> > kernel/posix-cpu-timers.c:1: warning: -g option disabled
> > ...
>
> *cough* This is the result of a hack.  Adding debugging stuff (DWARF
> handling) was reworked upstream. In the mean time, I disabled it
> entirely, but placed the warning to remind us. So it's harmless.
> You're only missing debugging infos you'd expect if you use the -g
> compile option.
>
> > 
> > (/**)...
> >    CC      kernel/mutex.o
> > kernel/mutex.c:1: warning: -g is only supported when using GAS on this processor,
> > kernel/mutex.c:1: warning: -g option disabled
> > kernel/mutex.c:30:24: error: asm/mutex.h: No such file or directory		<<< Here >>>
>
> That needs a fix.

 	I am quickly running out of play time .  But I'd give it a shot as long 
as I do not have to create the definitions needed out of thin air .  I do not 
have enough( hell any ) kernel hacking experience .  So if it can be done by 
copying another & palying a bit I can try to do so ,  But it will be next 
weekend or the weekend after before I can do so .

..included from last message...
> >       This brings up the lack of a mutex.[ch] and that for some reason we
> > don't create the above link into our 'include/vax-asm' ,  which s/b auto-magic
> > as far as we are concerned .  But undoubtedly soem place else needs patching .
>
> We do! The link should be there. If it isn't, the whole compilation
> run will be busted :)  It would, eg. try to build some of the i386
> assembler stuff with a VAX compiler/assembler, which won't work.

 	Yes I found that out after another test build just to see if it gets 
created at 'make' time .  It does .  I -really- wish the kernel doods would 
learn to setup all such items prior to build time .  Like during *config .  Oh 
well dream on .
 	I have a kernel that built with CONFIG_DEBUG_MUTEXES defined ,  so I'll 
try that out here soonest .  I have a FULL log of the build & boot going onto my 
webserver shortly .
 	Well the boot was unsuccessful .  I followed the README for th eitems 
needed if there is a failure .
 		Hth ,  JimL

Well sooner than later ...
http://www.baby-dragons.com/ka670-scsibxII-a-boot-200703181628.log
http://www.baby-dragons.com/ka670-scsibxII-a.config
http://www.baby-dragons.com/ka670-scsibxII-a.log

-- 
+-----------------------------------------------------------------+
| James   W.   Laferriere | System   Techniques | Give me VMS     |
| Network        Engineer | 663  Beaumont  Blvd |  Give me Linux  |
| babydr at baby-dragons.com | Pacifica, CA. 94044 |   only  on  AXP |
+-----------------------------------------------------------------+
-------------- next part --------------
diff -ruN vax-linux-kernel-200703172115-orig/Documentation/vax/cpu.txt vax-linux-kernel/Documentation/vax/cpu.txt
--- vax-linux-kernel-200703172115-orig/Documentation/vax/cpu.txt	2007-03-17 20:58:16.000000000 -0700
+++ vax-linux-kernel/Documentation/vax/cpu.txt	2007-03-17 23:28:07.000000000 -0700
@@ -29,6 +29,8 @@
    KA410
    KA630
    KA650
+   KA660
+   KA670	< in progress >
 
 UNSUPPORTED CPUS
 ================
@@ -40,7 +42,6 @@
    KA620
    KA640
    KA655
-   KA660
    KA730
    KA750
    KA780
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/Kconfig vax-linux-kernel/arch/vax/Kconfig
--- vax-linux-kernel-200703172115-orig/arch/vax/Kconfig	2007-03-17 20:58:34.000000000 -0700
+++ vax-linux-kernel/arch/vax/Kconfig	2007-03-17 23:25:32.000000000 -0700
@@ -92,6 +92,10 @@
 	bool "Support for KA660"
 	default n
 
+config CPU_KA670
+	bool "Support for KA670"
+	default n
+
 config CPU_KA410
 	bool "Support for KA410"
 	default n
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/defconfig vax-linux-kernel/arch/vax/defconfig
--- vax-linux-kernel-200703172115-orig/arch/vax/defconfig	2007-03-17 20:58:34.000000000 -0700
+++ vax-linux-kernel/arch/vax/defconfig	2007-03-17 23:33:58.000000000 -0700
@@ -24,6 +24,7 @@
 # CONFIG_CPU_KA640 is not set
 CONFIG_CPU_KA650=y
 # CONFIG_CPU_KA660 is not set
+# CONFIG_CPU_KA670 is not set
 # CONFIG_CPU_KA410 is not set
 CONFIG_CPU_KA42=y
 CONFIG_CPU_KA43=y
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/kernel/Makefile vax-linux-kernel/arch/vax/kernel/Makefile
--- vax-linux-kernel-200703172115-orig/arch/vax/kernel/Makefile	2007-03-17 20:58:34.000000000 -0700
+++ vax-linux-kernel/arch/vax/kernel/Makefile	2007-03-17 23:00:23.000000000 -0700
@@ -26,6 +26,7 @@
 obj-$(CONFIG_CPU_KA640)	+= cpu_ka640.o
 obj-$(CONFIG_CPU_KA650)	+= cpu_ka650.o
 obj-$(CONFIG_CPU_KA660)	+= cpu_ka660.o
+obj-$(CONFIG_CPU_KA670)	+= cpu_ka670.o
 obj-$(CONFIG_CPU_VXT)	+= cpu_vxt.o
 
 obj-$(CONFIG_MODULES)	+= module.o
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/kernel/cpu_ka670.c vax-linux-kernel/arch/vax/kernel/cpu_ka670.c
--- vax-linux-kernel-200703172115-orig/arch/vax/kernel/cpu_ka670.c	1969-12-31 16:00:00.000000000 -0800
+++ vax-linux-kernel/arch/vax/kernel/cpu_ka670.c	2007-03-17 23:11:08.000000000 -0700
@@ -0,0 +1,73 @@
+/*
+ *  This file contains machine vector handlers for the
+ *  KA670 CPU in the VAXserver 4000-500 machines.
+ *
+ *  KA670-A V3.7, VMB 2.12 ,  JimL
+ *
+ *  For the VAXserver machines I have, the SID is 14000006 and
+ *  the sidex is 01370502.  The sidex seems to have a simlar
+ *  breakdown that a CVAX with a Q22 bus has.  Bootstrap indicates
+ *  a firmware rev 3.7 supporting this assumption.  If anyone knows
+ *  differently, let me know.
+ *
+ *  modified from the cpu_ka660.c by Jan-Benedict Glaw jbglaw at lug-owl.de
+ *  by: James W. Laferriere <babydr at baby-dragons.com> 20070317
+ */
+
+#include <linux/types.h>	/* For NULL */
+#include <linux/kernel.h>	/* For printk */
+#include <linux/init.h>
+#include <linux/platform_device.h>
+
+#include <asm/mtpr.h>
+#include <asm/mv.h>
+#include <asm/vaxcpu.h>
+#include <asm/clock.h>		/* For clock_init routines */
+
+static const char *ka670_cpu_type_str(void)
+{
+	return "KA670";
+}
+
+struct vax_mv mv_ka670 = {
+	.pre_vm_putchar = mtpr_putchar,
+	.pre_vm_getchar = mtpr_getchar,
+	.post_vm_putchar = mtpr_putchar,
+	.post_vm_getchar = mtpr_getchar,
+	.cpu_type_str = ka670_cpu_type_str,
+	.clock_init = generic_clock_init,
+};
+
+static struct cpu_match __CPU_MATCH cpumatch_ka670 = {
+        .mv = &mv_ka670,
+        .sid_mask = VAX_SID_FAMILY_MASK,
+        .sid_match = VAX_SOC << VAX_SID_FAMILY_SHIFT,
+
+        .sidex_addr = SOC_SIDEX_ADDR,
+
+        .sidex_mask = SOC_SIDEX_TYPE_MASK | SOC_Q22_SUBTYPE_MASK,
+        .sidex_match = (SOC_SIDEX_TYPE_Q22 << SOC_SIDEX_TYPE_SHIFT) |
+                        (SOC_Q22_SUBTYPE_KA670 << SOC_Q22_SUBTYPE_SHIFT),
+};
+
+static struct platform_device ka670_cqbic_device = {
+	.name = "cqbic"
+};
+
+static struct platform_device ka670_iprcons_device = {
+	.name = "iprcons"
+};
+
+static int __init ka670_platform_device_init(void)
+{
+	if (!is_ka670())
+		return -ENODEV;
+
+	platform_device_register(&ka670_cqbic_device);
+	platform_device_register(&ka670_iprcons_device);
+
+	return 0;
+}
+
+arch_initcall(ka670_platform_device_init);
+
diff -ruN vax-linux-kernel-200703172115-orig/arch/vax/kernel/diag_led.c vax-linux-kernel/arch/vax/kernel/diag_led.c
--- vax-linux-kernel-200703172115-orig/arch/vax/kernel/diag_led.c	2007-03-17 20:58:34.000000000 -0700
+++ vax-linux-kernel/arch/vax/kernel/diag_led.c	2007-03-18 15:16:32.000000000 -0700
@@ -59,11 +59,9 @@
 	} else if (is_ka650 ()) {
 		inverted = 1;
 		return DIAG_LED_KA650_BASE;
-#if 0
 	} else if (is_ka670 ()) {
 		inverted = 1;
 		return DIAG_LED_KA670_BASE;
-#endif
 	} else if (is_ka43 ()) {
 		inverted = 1;
 		return DIAG_LED_KA43_BASE;
diff -ruN vax-linux-kernel-200703172115-orig/drivers/vax/net/sgec.c vax-linux-kernel/drivers/vax/net/sgec.c
--- vax-linux-kernel-200703172115-orig/drivers/vax/net/sgec.c	2007-03-17 20:59:12.000000000 -0700
+++ vax-linux-kernel/drivers/vax/net/sgec.c	2007-03-18 15:45:52.000000000 -0700
@@ -929,11 +929,9 @@
 	 */
 	printk("Ethernet address in ROM: ");
 	for (i = 0; i < 6; i++) {
-#if 0 /* Not yet */
 		if (is_ka670 ())
 			dev->dev_addr[i] = (esar[i] & 0xff00) >> 8;
 		else
-#endif
 			dev->dev_addr[i] = esar[i] & 0xff;
 		printk("%2.2x%c", dev->dev_addr[i], i == 5 ? '\n' : ':');
 	}
diff -ruN vax-linux-kernel-200703172115-orig/drivers/vax/serial/ipr.c vax-linux-kernel/drivers/vax/serial/ipr.c
--- vax-linux-kernel-200703172115-orig/drivers/vax/serial/ipr.c	2007-03-17 20:59:12.000000000 -0700
+++ vax-linux-kernel/drivers/vax/serial/ipr.c	2007-03-17 23:56:47.000000000 -0700
@@ -234,9 +234,10 @@
 {
 	/* This port is not software configurable.  It is fixed in
 	   hardware to 9600, 8 bits, no parity, one stop bit.
-	   (Actually - not completely true.  The KA650 console has a
-	   physical rotary switch for selecting the baud rate.  But
-	   we'll ignore this for now. */
+	   (Actually - not completely true.  
+	   The KA630 KA640 KA650 KA660 KA670 console(s) have a 
+	   physical rotary switch for selecting the baud rate.  
+	   But we'll ignore this for now.) */
 
 	unsigned long flags;
 
diff -ruN vax-linux-kernel-200703172115-orig/include/asm-vax/mv.h vax-linux-kernel/include/asm-vax/mv.h
--- vax-linux-kernel-200703172115-orig/include/asm-vax/mv.h	2007-03-17 20:59:38.000000000 -0700
+++ vax-linux-kernel/include/asm-vax/mv.h	2007-03-17 23:58:37.000000000 -0700
@@ -71,6 +71,7 @@
 extern struct vax_mv mv_ka640;
 extern struct vax_mv mv_ka650;
 extern struct vax_mv mv_ka660;
+extern struct vax_mv mv_ka670;
 extern struct vax_mv mv_vxt;
 
 /*
@@ -196,6 +197,14 @@
 #endif
 }
 
+static inline int is_ka670(void) {
+#ifdef CONFIG_CPU_KA670
+	return mv == &mv_ka670;
+#else
+	return 0;
+#endif
+}
+
 static inline int is_vxt(void) {
 #ifdef CONFIG_CPU_VXT
 	return mv == &mv_vxt;
diff -ruN vax-linux-kernel-200703172115-orig/include/asm-vax/vaxcpu.h vax-linux-kernel/include/asm-vax/vaxcpu.h
--- vax-linux-kernel-200703172115-orig/include/asm-vax/vaxcpu.h	2007-03-17 20:59:38.000000000 -0700
+++ vax-linux-kernel/include/asm-vax/vaxcpu.h	2007-03-18 12:41:50.000000000 -0700
@@ -48,6 +48,10 @@
 
 /* SOC */
 #define VAX_CPU_660	0x14000006	/* VAXserver 4000-200 (KA660-B) */
+
+/* REX */
+#define VAX_CPU_670	0x0B000006	/* VAXserver 4000-500 (KA670-A) */
+
 #define VAX_CPU_VXT	0x14000006	/* VXT2000 - from NetBSD */
 
 /*****************************************************************************/
@@ -278,6 +282,7 @@
 #define SOC_Q22_SUBTYPE_SIZE	8
 
 #define SOC_Q22_SUBTYPE_KA660	5
+#define SOC_Q22_SUBTYPE_KA670	5	/* An ass-u-mption ,  not a known fact */
 
 /*****************************************************************************/
 /* Definitions for NVAX family CPUs */
-------------- next part --------------
_______________________________________________
Linux-Vax mailing list
Linux-Vax at pergamentum.com
http://www.pergamentum.com/mailman/listinfo/linux-vax


More information about the Vax-linux mailing list