From imp at bsdimp.com Mon Jul 7 00:23:35 2008 From: imp at bsdimp.com (M. Warner Losh) Date: Mon Jul 7 00:23:47 2008 Subject: Minor reorg fyi Message-ID: <20080706.182254.-1585756927.imp@bsdimp.com> After talking with people in the FreeBSD mips community, I've moved some files around in subversion. For all the details, and some info about my plans in the near future, please see my blog http://bsdimp.blogspot.com/ If you have questions or concerns about things, please feel free to talk about them here... Warner From ehmoeok at gmail.com Tue Jul 15 22:54:52 2008 From: ehmoeok at gmail.com (Erik Moe) Date: Tue Jul 15 22:54:59 2008 Subject: Building FreeBSD MIPS Message-ID: <487D2407.8070001@gmail.com> Question, is current the FreeBSD MIPS code in a state where one could build a kernel? I've got the latest code from svn://svn.freebsd.org/base/head. I'm trying to build the kernel-toolchain with the following script: #!/bin/sh SRCROOT=/usr/home/emoe/fbsd-mips/current-svn/head export MAKEOBJDIRPREFIX=/usr/home/emoe/fbsd-mips/build-current-svn TARGET_ARCH=mips TARGET=mips TARGET_CPUTYPE=mips32 cd ${SRCROOT} make TARGET_ARCH=mips TARGET=mips TARGET_CPUTYPE=mips32 kernel-toolchain #make TARGET_ARCH=mips NO_MODULES=yes MIPS_LITTLE_ENDIAN=yes \ # buildkernel KERNCONF=MALTA I getting the following error: make: don't know how to make /usr/home/emoe/fbsd-mips/current-svn/head/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcc/config//.c. Stop I believe that this is because the GCC_CPU variable is not being set in gnu/usr.bin/cc/Makefile.tgt TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == "arm" GCC_CPU= arm .elif ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64" GCC_CPU= i386 .elif ${TARGET_ARCH} == "ia64" TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD GCC_CPU= ia64 .elif ${TARGET_ARCH} == "powerpc" GCC_CPU= rs6000 .elif ${TARGET_ARCH} == "sparc64" GCC_CPU= sparc TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc .endif So my assumption is that all the pieces to build the MIPS tool-chain aren't there. Erik Moe ehmoeok@gmail.com From gonzo at freebsd.org Wed Jul 16 19:37:32 2008 From: gonzo at freebsd.org (Oleksandr Tymoshenko) Date: Wed Jul 16 19:38:01 2008 Subject: Building FreeBSD MIPS In-Reply-To: <487D2407.8070001@gmail.com> References: <487D2407.8070001@gmail.com> Message-ID: <487E4DF6.1020106@freebsd.org> Erik Moe wrote: > I getting the following error: > > make: don't know how to make > /usr/home/emoe/fbsd-mips/current-svn/head/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcc/config//.c. > Stop > > I believe that this is because the GCC_CPU variable is not being set in > gnu/usr.bin/cc/Makefile.tgt The problem is not only in that. We're waiting for proper toolchain import to happen. Meanwhile, if you're interested I can provide mips2 snapshot or patch against HEAD. -- gonzo From ehmoeok at gmail.com Thu Jul 17 15:32:49 2008 From: ehmoeok at gmail.com (Erik Moe) Date: Thu Jul 17 15:32:55 2008 Subject: Building FreeBSD MIPS In-Reply-To: <487E4DF6.1020106@freebsd.org> References: <487D2407.8070001@gmail.com> <487E4DF6.1020106@freebsd.org> Message-ID: If you have a patch against HEAD that would be great. Thanks, On Wed, Jul 16, 2008 at 1:37 PM, Oleksandr Tymoshenko wrote: > Erik Moe wrote: > >> I getting the following error: >> >> make: don't know how to make >> /usr/home/emoe/fbsd-mips/current-svn/head/gnu/usr.bin/cc/cc_tools/../../../../contrib/gcc/config//.c. >> Stop >> >> I believe that this is because the GCC_CPU variable is not being set in >> gnu/usr.bin/cc/Makefile.tgt >> > The problem is not only in that. We're waiting for proper toolchain > import > to happen. Meanwhile, if you're interested I can provide mips2 snapshot or > patch against HEAD. > > -- > gonzo > From gonzo at freebsd.org Fri Jul 18 13:07:43 2008 From: gonzo at freebsd.org (Oleksandr Tymoshenko) Date: Fri Jul 18 13:07:49 2008 Subject: Building FreeBSD MIPS In-Reply-To: References: <487D2407.8070001@gmail.com> <487E4DF6.1020106@freebsd.org> Message-ID: <48809595.4000006@freebsd.org> Erik Moe wrote: > If you have a patch against HEAD that would be great. http://people.freebsd.org/~gonzo/mips2.diff.gz -- gonzo From imp at bsdimp.com Mon Jul 21 04:47:45 2008 From: imp at bsdimp.com (Warner Losh) Date: Mon Jul 21 04:47:52 2008 Subject: Building FreeBSD MIPS In-Reply-To: <48809595.4000006@freebsd.org> References: <487E4DF6.1020106@freebsd.org> <48809595.4000006@freebsd.org> Message-ID: <20080720.224527.74712336.imp@bsdimp.com> > Erik Moe wrote: > > If you have a patch against HEAD that would be great. > http://people.freebsd.org/~gonzo/mips2.diff.gz While driving across nebraska, I came up with something similar. I'll put it together and see how it differs. Warner From imp at bsdimp.com Tue Jul 22 07:39:23 2008 From: imp at bsdimp.com (M. Warner Losh) Date: Tue Jul 22 07:39:34 2008 Subject: Building FreeBSD MIPS In-Reply-To: <48809595.4000006@freebsd.org> References: <487E4DF6.1020106@freebsd.org> <48809595.4000006@freebsd.org> Message-ID: <20080722.013721.1683323800.imp@bsdimp.com> In message: <48809595.4000006@freebsd.org> Oleksandr Tymoshenko writes: : Erik Moe wrote: : > If you have a patch against HEAD that would be great. : http://people.freebsd.org/~gonzo/mips2.diff.gz I've uploaded my diffs. They are somewhat smaller and don't include other changes. Maybe they'd be easy to review? The trouble is that I run into problems here: cc -O -pipe -EL -msoft-float -G0 -mno-dsp -mabicalls -DHAVE_CONFIG_H -I/cache/svn/head/gnu/lib/libgomp -I. -I/cache/svn/head/gnu/lib/libgomp/../../../contrib/gcclibs/libgomp -I/cache/svn/head/gnu/lib/libgomp/../../../contrib/gcclibs/libgomp/config/posix -c /cache/svn/head/gnu/lib/libgomp/../../../contrib/gcclibs/libgomp/env.c In file included from /cache/svn/head/gnu/lib/libgomp/../../../contrib/gcclibs/libgomp/env.c:32: ./libgomp_f.h: In function 'omp_check_defines': ./libgomp_f.h:59: error: size of array 'test1' is negative ./libgomp_f.h:60: error: size of array 'test2' is negative ./libgomp_f.h:61: error: size of array 'test3' is negative ./libgomp_f.h:62: error: size of array 'test4' is negative ./libgomp_f.h:63: error: size of array 'test5' is negative *** Error code 1 Warner From gonzo at freebsd.org Tue Jul 22 14:10:41 2008 From: gonzo at freebsd.org (Oleksandr Tymoshenko) Date: Tue Jul 22 14:10:47 2008 Subject: Building FreeBSD MIPS In-Reply-To: <20080722.013721.1683323800.imp@bsdimp.com> References: <487E4DF6.1020106@freebsd.org> <48809595.4000006@freebsd.org> <20080722.013721.1683323800.imp@bsdimp.com> Message-ID: <4885EA58.6000401@freebsd.org> M. Warner Losh wrote: > In message: <48809595.4000006@freebsd.org> > Oleksandr Tymoshenko writes: > : Erik Moe wrote: > : > If you have a patch against HEAD that would be great. > : http://people.freebsd.org/~gonzo/mips2.diff.gz > > I've uploaded my diffs. They are somewhat smaller and don't include > other changes. Maybe they'd be easy to review? Just notcied - my diff contains a lot of garbage in it :(. Let's start with yours. -- gonzo From ehmoeok at gmail.com Tue Jul 22 15:10:05 2008 From: ehmoeok at gmail.com (Erik Moe) Date: Tue Jul 22 15:10:12 2008 Subject: Building FreeBSD MIPS In-Reply-To: <4885EA58.6000401@freebsd.org> References: <487E4DF6.1020106@freebsd.org> <48809595.4000006@freebsd.org> <20080722.013721.1683323800.imp@bsdimp.com> <4885EA58.6000401@freebsd.org> Message-ID: Sorry, I missed something. The http://people.freebsd.org/~gonzo/mips2.diff.gzisn't out there. There is a toolchain.diff . You were recommended that I use Warner's diffs instead? Were are Warner's diffs? Thanks On Tue, Jul 22, 2008 at 8:10 AM, Oleksandr Tymoshenko wrote: > M. Warner Losh wrote: > >> In message: <48809595.4000006@freebsd.org> >> Oleksandr Tymoshenko writes: >> : Erik Moe wrote: >> : > If you have a patch against HEAD that would be great. >> : http://people.freebsd.org/~gonzo/mips2.diff.gz >> >> I've uploaded my diffs. They are somewhat smaller and don't include >> other changes. Maybe they'd be easy to review? >> > Just notcied - my diff contains a lot of garbage in it :(. > Let's start with yours. > > -- > gonzo > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From imp at bsdimp.com Tue Jul 22 16:03:02 2008 From: imp at bsdimp.com (Warner Losh) Date: Tue Jul 22 16:03:08 2008 Subject: Building FreeBSD MIPS In-Reply-To: References: <20080722.013721.1683323800.imp@bsdimp.com> <4885EA58.6000401@freebsd.org> Message-ID: <20080722.100004.74655229.imp@bsdimp.com> From: "Erik Moe" Subject: Re: Building FreeBSD MIPS Date: Tue, 22 Jul 2008 09:10:03 -0600 > Sorry, I missed something. The > http://people.freebsd.org/~gonzo/mips2.diff.gzisn't > out there. There is a > toolchain.diff . You > were recommended that I use Warner's diffs instead? > > Were are Warner's diffs? http://people.freebsd.org/~imp/mips2-imp.diff.gz Warner > On Tue, Jul 22, 2008 at 8:10 AM, Oleksandr Tymoshenko wrote: > > > M. Warner Losh wrote: > > > >> In message: <48809595.4000006@freebsd.org> > >> Oleksandr Tymoshenko writes: > >> : Erik Moe wrote: > >> : > If you have a patch against HEAD that would be great. > >> : http://people.freebsd.org/~gonzo/mips2.diff.gz > >> > >> I've uploaded my diffs. They are somewhat smaller and don't include > >> other changes. Maybe they'd be easy to review? > >> > > Just notcied - my diff contains a lot of garbage in it :(. > > Let's start with yours. > > > > -- > > gonzo > > _______________________________________________ > > freebsd-mips@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > > From jrytoung at gmail.com Thu Jul 24 20:59:39 2008 From: jrytoung at gmail.com (Jerry Toung) Date: Thu Jul 24 20:59:46 2008 Subject: mips_phys_mask define Message-ID: <86068e730807241333v4d9f35d4ve4e4a266bb6d8121@mail.gmail.com> Hello list, still learning. Could someone explain why MIPS_PHYS_MASK is 0x1fffffff and not 0x7fffffff when you want to convert a program's address back to physical? Thanks, Jerry From gonzo at freebsd.org Thu Jul 24 21:39:20 2008 From: gonzo at freebsd.org (Oleksandr Tymoshenko) Date: Thu Jul 24 21:39:49 2008 Subject: mips_phys_mask define In-Reply-To: <86068e730807241333v4d9f35d4ve4e4a266bb6d8121@mail.gmail.com> References: <86068e730807241333v4d9f35d4ve4e4a266bb6d8121@mail.gmail.com> Message-ID: <4888F674.4010004@freebsd.org> Jerry Toung wrote: > Hello list, > still learning. Could someone explain why > MIPS_PHYS_MASK is 0x1fffffff and not 0x7fffffff when you want to convert a > program's address > back to physical? MIPS_PHYS_MASK is used to convert addresses from KSEG0 and KSEG1 to physical ones. KSEG0 and KSEG1 are 2**29 bytes each. So the mask should be 2**29 - 1. That gives us 0x1fffffff. I'd suggest you to read MIPS32(tm) Architecture For Programmers Volume III: The MIPS32(tm) Privileged Resource Architecture. It's a nice starting point. You can download the document from mips.com site. -- gonzo From jrytoung at gmail.com Fri Jul 25 00:02:40 2008 From: jrytoung at gmail.com (Jerry Toung) Date: Fri Jul 25 00:02:46 2008 Subject: mips_phys_mask define In-Reply-To: <4888F674.4010004@freebsd.org> References: <86068e730807241333v4d9f35d4ve4e4a266bb6d8121@mail.gmail.com> <4888F674.4010004@freebsd.org> Message-ID: <86068e730807241702u10c031a7k84cbcadaf727b810@mail.gmail.com> On Thu, Jul 24, 2008 at 2:39 PM, Oleksandr Tymoshenko wrote: > Jerry Toung wrote: > >> Hello list, >> still learning. Could someone explain why >> MIPS_PHYS_MASK is 0x1fffffff and not 0x7fffffff when you want to convert a >> program's address >> back to physical? >> > MIPS_PHYS_MASK is used to convert addresses from KSEG0 and KSEG1 to > physical > ones. KSEG0 and KSEG1 are 2**29 bytes each. So the mask should be 2**29 - > 1. > That gives us 0x1fffffff. > > I'd suggest you to read MIPS32(tm) Architecture For Programmers Volume III: > The MIPS32(tm) Privileged Resource Architecture. It's a nice starting > point. > You can download the document from mips.com site. > > -- > gonzo > thank you for the explaination Gonzo. I have been reading "see MIPS run Linux, 2nd edition" as suggested by Warner a while back. I'll download the doc you mentioned. Jerry From imp at bsdimp.com Tue Jul 29 22:10:01 2008 From: imp at bsdimp.com (M. Warner Losh) Date: Tue Jul 29 22:10:07 2008 Subject: Some patches Message-ID: <20080729.160859.1791047885.imp@bsdimp.com> Gonzo and I have been cleaning up the mips import. We're down to 4 patches and we thought we'd share them here for testing: http://people.freebsd.org/~gonzo/mips2/binutils.diff http://people.freebsd.org/~gonzo/mips2/cc.diff http://people.freebsd.org/~gonzo/mips2/cddl.diff http://people.freebsd.org/~gonzo/mips2/libpam.diff They are all independent, and are all required for a buildworld to succeed. Please share any feedback you have on them. Warner