Discussion:
Custom kernel for DS5000 does no longer compile
(too old to reply)
Erik Bertelsen
2008-03-14 12:49:32 UTC
Permalink
My DS5000 can no longer compile its custom-configured kernel, but gives:

compile SOCKDEV/dec_3min.o
../../../../arch/pmax/pmax/dec_3min.c: In function 'dec_3min_tc_init':
../../../../arch/pmax/pmax/dec_3min.c:506: error:
'mips3_cp0_count_read' undeclared (first use in this function)
../../../../arch/pmax/pmax/dec_3min.c:506: error: (Each undeclared
identifier is reported only once
../../../../arch/pmax/pmax/dec_3min.c:506: error: for each function it
appears in.)


The kernel configuration file contains options MIPS1 and DEC_3MIN but
not MIPS3. By looking around in the code, I discovered that by adding
MIPS32 explicitly to the kernel configuration file, the resulting
kernel builds and boots.

I tried this because mips/locore.h declares mips3_cp0_count_read if
any of MIPS3, MIPS4, MIPS32, or MIPS64 is defined.

But by looking at the kernel configuration files coming with NetBSD I
really just consider this a kludge and not a solution. I'm not even
sure whether mips3_cp0_count_read should be declared or the call to it
should be skipped for my machine.

For reference my previous kernel was compiled on Dec 2nd last year (4.99.38).

- Erik

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2008-03-14 13:15:31 UTC
Permalink
Post by Erik Bertelsen
compile SOCKDEV/dec_3min.o
'mips3_cp0_count_read' undeclared (first use in this function)
../../../../arch/pmax/pmax/dec_3min.c:506: error: (Each undeclared
identifier is reported only once
../../../../arch/pmax/pmax/dec_3min.c:506: error: for each function it
appears in.)
Such mips3 stuff (for DS5000/150) should be wrapped
with #if defined(MIPS3)?
---
Izumi Tsutsui


Index: dec_3min.c
===================================================================
RCS file: /cvsroot/src/sys/arch/pmax/pmax/dec_3min.c,v
retrieving revision 1.59
diff -u -r1.59 dec_3min.c
--- dec_3min.c 3 Jan 2008 23:02:25 -0000 1.59
+++ dec_3min.c 14 Mar 2008 13:12:27 -0000
@@ -502,6 +502,7 @@
void
dec_3min_tc_init(void)
{
+#if defined(MIPS3)
static struct timecounter tc = {
.tc_get_timecount = (timecounter_get_t *)mips3_cp0_count_read,
.tc_counter_mask = ~0u,
@@ -517,4 +518,5 @@

tc_init(&tc);
}
+#endif
}


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Erik Bertelsen
2008-03-15 07:16:36 UTC
Permalink
2008/3/14, Izumi Tsutsui <***@ceres.dti.ne.jp>:
...
Post by Izumi Tsutsui
Such mips3 stuff (for DS5000/150) should be wrapped
with #if defined(MIPS3)?
---
Izumi Tsutsui
Index: dec_3min.c
===================================================================
RCS file: /cvsroot/src/sys/arch/pmax/pmax/dec_3min.c,v
retrieving revision 1.59
diff -u -r1.59 dec_3min.c
--- dec_3min.c 3 Jan 2008 23:02:25 -0000 1.59
+++ dec_3min.c 14 Mar 2008 13:12:27 -0000
@@ -502,6 +502,7 @@
void
dec_3min_tc_init(void)
{
+#if defined(MIPS3)
static struct timecounter tc = {
.tc_get_timecount = (timecounter_get_t *)mips3_cp0_count_read,
.tc_counter_mask = ~0u,
@@ -517,4 +518,5 @@
tc_init(&tc);
}
+#endif
}
I can confirm that my kernel builds and runs with the patch above -- thank you

- Erik

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Izumi Tsutsui
2008-03-15 08:50:40 UTC
Permalink
Post by Erik Bertelsen
I can confirm that my kernel builds and runs with the patch above -- thank you
Fix committed. Thanks,
---
Izumi Tsutsui

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...