From owner-freebsd-mips@FreeBSD.ORG Tue Nov 30 15:16:06 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80CDE106564A for ; Tue, 30 Nov 2010 15:16:06 +0000 (UTC) (envelope-from freebsd-mips@dino.sk) Received: from loki.netlab.sk (loki.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id F3FF18FC18 for ; Tue, 30 Nov 2010 15:16:05 +0000 (UTC) Received: from door.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: PLAIN milan, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by loki.netlab.sk with esmtp; Tue, 30 Nov 2010 16:16:01 +0100 id 00033C0F.4CF51531.00012AD6 From: Milan Obuch To: Warner Losh Date: Tue, 30 Nov 2010 16:16:58 +0100 User-Agent: KMail/1.13.5 (FreeBSD/8.1-STABLE; KDE/4.5.3; i386; ; ) References: <201011261935.50734.freebsd-mips@dino.sk> <4CF3DF2C.6040109@bsdimp.com> In-Reply-To: <4CF3DF2C.6040109@bsdimp.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201011301617.00130.freebsd-mips@dino.sk> Cc: freebsd-mips@freebsd.org Subject: Re: [Re: First RSPRO deployed!] flash utility mkfwimage and RSPRO boot question X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2010 15:16:06 -0000 On Monday 29 November 2010 18:13:16 Warner Losh wrote: > On 11/26/2010 11:35, Milan Obuch wrote: > > On Friday 26 November 2010 17:59:05 Warner Losh wrote: > >> On 11/26/2010 08:54, Milan Obuch wrote: > >>> On Thursday 25 November 2010 12:12:06 Luiz Otavio O Souza wrote: > > [ snip] > > > >>>> Building world works with CPUTYPE=mips32 and for ports, add the > >>>> following line to /etc/make.conf: > >>>> > >>>> CFLAGS=-O2 -pipe -march=mips32 > >>> > >>> Hmm, I put just TARGET_ARCH=mipseb into /etc/make.conf and compiled > >>> almost all world (accidentally broken just before end, but that's a > >>> pilot error in this case) and sysutils/screen port compiled and run > >>> with no CPUTYPE nor CFLAGS definition. > >>> > >>> That should not be read as better from any side, but surely simpler :) > >>> Maybe even TARGET_ARCH should be known from running kernel, this would > >>> be similar how native build works on both i386 and amd64 platforms. > >>> Now, with screen in place I am going to test buildworld again (with > >>> some WITHOUT_XXX=YES in /etc/make.conf) to verify native builds... > >>> they are slowish here, which is expected, but seems to work, which is > >>> great. > >> > >> what does uname -a tell you? > > > > FreeBSD argo.dino.sk 9.0-CURRENT FreeBSD 9.0-CURRENT #3: Wed Nov 24 > > 10:16:14 CET 2010 > > root@wind.dino.sk:/tmp/rspro/obj/mips.mipseb/data/src9/sys/RSPRO mips > > > > Currently running world and kernel is from cross build on i386 host. > > > > Native buildworld just ended, I am going to try native buildkernel... for > > that I must apply some patches (already published on this list). > > Juli just committed some patches to make this better. I was going to do > it, but she got impatient waiting for my overbooked schedule to free up... > > Warner Well, over weekend it did not work, now it compiles. There is a problem, however. With no /etc/make.conf (TARGET nor TARGET_ARCH defined) both buildworld and buildkernel operation fails complaining about 'unknown target mips:mips'. After defining TARGET_ARCH=mipseb make buildworld succeeds, but this is not actually native buildworld - nake installworld complains about unknown target mips:mips as well, when TARGET_ARCH is defined, make errors with 'ERROR: Please set DESTDIR!' - so actually this is considered cross build. MAKEOBJDIRPREFIX is set to /usr/obj/mips.mipseb and this again indicates it is a cross-build. So I think for mips architecture we need to set TARGET_ARCH internally, somehow - after all, maybe endianness should be visible in output of uname -someswitch... Maybe uname -m or uname -p should be altered to output mipsel/mipseb... I think I saw it once, but now they are both mips... Regards, Milan