From owner-freebsd-mips@FreeBSD.ORG Wed Apr 6 21:15:51 2011 Return-Path: Delivered-To: mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39B83106566C; Wed, 6 Apr 2011 21:15:51 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og115.obsmtp.com (exprod7og115.obsmtp.com [64.18.2.217]) by mx1.freebsd.org (Postfix) with ESMTP id ACA0F8FC0A; Wed, 6 Apr 2011 21:15:50 +0000 (UTC) Received: from P-EMHUB02-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob115.postini.com ([64.18.6.12]) with SMTP ID DSNKTZzYBoNUAsCf8LEMdQVKEWnf/XaXvtfA@postini.com; Wed, 06 Apr 2011 14:15:50 PDT Received: from p-emfe01-wf.jnpr.net (172.28.145.24) by P-EMHUB02-HQ.jnpr.net (172.24.192.36) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 6 Apr 2011 14:12:57 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe01-wf.jnpr.net ([fe80::d0d1:653d:5b91:a123%11]) with mapi; Wed, 6 Apr 2011 17:14:40 -0400 From: Andrew Duane To: Juli Mallett Date: Wed, 6 Apr 2011 17:14:39 -0400 Thread-Topic: Trouble making a filesystem Thread-Index: Acv0nlZQBcFXrWBpSpCUssnwCWcp0AAALEfw Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "mips@freebsd.org" Subject: RE: Trouble making a filesystem 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: Wed, 06 Apr 2011 21:15:51 -0000 Some sample files are: /sbin/init: ELF 64-bit MSB MIPS32 rel2 executable, MIPS, version 1 (FreeBSD= ), for FreeBSD 9.0 (900034), statically linked, not stripped /bin/cat: ELF 64-bit MSB MIPS32 rel2 executable, MIPS, version 1 (FreeBSD= ), for FreeBSD 9.0 (900034), dynamically linked (uses shared libs), not str= ipped=20 /sbin/init works, it is statically linked. /bin/cat does not, it is dynamic= ally linked. It could be an issue with the linker not being packaged or som= e other configuration issue, like ldscript not being there. I tried the "make distribute" and it yelled at me for /base not existing. D= ESTDIR is set to my local directory, which worked for installworld, but dis= tribute seems to forcibly override it to /base /Andrew =20 -----Original Message----- From: juli@clockworksquid.com [mailto:juli@clockworksquid.com] On Behalf Of= Juli Mallett Sent: Wednesday, April 06, 2011 5:05 PM To: Andrew Duane Cc: mips@freebsd.org Subject: Re: Trouble making a filesystem On Wed, Apr 6, 2011 at 13:58, Andrew Duane wrote: > I'm having trouble making a working filesystem for my OCTEON1 kernel to r= un on. I do a "buildworld", but there are three problems: > > 1) Most of the executables won't execute, they give "Exec format error". = The problem seems to be with dynamically linked executables. When I rebuilt= "/bin/sh" as a static executable, it worked OK. I guess I could manually f= ix every Makefile to use static linking, but that seems absurd. It would probably be helpful to include your build scripts and the output of 'file' on one of the troublesome binaries. > 2) Some things aren't being populated. For example, that the only thing i= n the buildworld output of etc is sendmail. In the installworld output ther= e are a handful of subdirectorties, but no "rc" files. You need 'make distribute DESTDIR=3D/whatever'. Or is it make distribution? Something. Then you'll just need to set up fstab and rc.conf > 3) Eventually, the kernel tips over with: > > =A0 panic: sched_priority: invalid priority 231: nice 0, ticks 1955000 ft= ick 14022821 ltick 14023821 tick pri 59 I've never seen this. Sounds like a problem with signed vs. unsigned chars for priorities. Most of those should be fixed these days, though.