Subject: Re: MIPS cleanup/rototill and support for mips32/mips64
To: Simon Burge <>
From: FUKAUMI Naoki <>
List: port-mips
Date: 03/07/2002 09:25:08

I tried to make release ( with -R) yesterday. I got an error:
dependall ===> sys/lkm/netinet/if_ipl
CC=/home/tools/bin/mipsel--netbsd-gcc /home/tools/bin/nbmkdep -a  -DIPFILTER_LOG -I/usr/src/sys/netinet -DUSE_INET6 -DIPFILTER_LKM -nostdinc -I. -I/usr/src/sys/lkm/netinet/if_ipl -isystem /usr/src/sys -isystem /usr/src/sys/arch -D_KERNEL -D_LKM  /usr/src/sys/netinet/ip_fil.c /usr/src/sys/netinet/fil.c /usr/src/sys/lkm/netinet/if_ipl/mln_ipl.c /usr/src/sys/netinet/ip_nat.c /usr/src/sys/netinet/ip_frag.c /usr/src/sys/netinet/ip_state.c /usr/src/sys/netinet/ip_proxy.c /usr/src/sys/netinet/ip_auth.c /usr/src/sys/netinet/ip_log.c
In file included from machine/cpu.h:3,
                 from mips/mips_param.h:4,
                 from machine/param.h:49,
                 from /usr/src/sys/sys/param.h:144,
                 from /usr/src/sys/netinet/ip_fil.c:19:
mips/cpu.h:138: #error at least one of MIPS1, MIPS3, MIPS4, MIPS32 or MIPS64 must be specified

I saw sys/lkm/compat/ultrix/Makefile and I made patch:

Index: sys/lkm/netinet/if_ipl/Makefile
RCS file: /cvsroot/syssrc/sys/lkm/netinet/if_ipl/Makefile,v
retrieving revision 1.15
diff -u -r1.15 Makefile
--- Makefile	2002/01/24 13:50:32	1.15
+++ Makefile	2002/03/07 00:04:46
@@ -9,4 +9,8 @@
 SRCS=	ip_fil.c fil.c mln_ipl.c ip_nat.c ip_frag.c ip_state.c ip_proxy.c \
 	ip_auth.c ip_log.c
+.if ${MACHINE_CPU} == "mips"
 .include <>

I could compile this lkm module after this patch applied. (But not tested)

My environment is host=i386-current, target=hpcmips, cross compiling.

At Wed,  6 Mar 2002 03:36:23 +1100 (EST),
Simon Burge wrote:
> I've committed the code that I was talking about last week that
> add support for the mips32/mips64 architectures.  I've been able
> to compile GENERIC kernels (or whatever is closest) for all ports
> except playstation2 (where I didn't have the proper toolchain)
> and been able to test on a couple of them (algor, pmax) on r3000,
> r4000, r4400 and rm5200 CPUs.
> If you have any problems at all that my changes have caused, please
> send-pr and/or send mail to port-mips with the details.