Subject: Re: NetBSD/usermode
To: Jared D. McNeill <email@example.com>
From: matthew sporleder <firstname.lastname@example.org>
Date: 12/28/2007 10:38:06
On 12/28/07, Jared D. McNeill <email@example.com> wrote:
> Heyas folks --
> I'd like some feedback before I decide if I should commit a pet project
> I have been working on over the past few days.
> What I've done is created a port of NetBSD which runs as a userspace
> application and has full access to libc. It's not quite single user yet,
> but it's getting pretty close.
> Here's the code for review, tested so far only on amd64:
> Please note that for the time being, you will need to copy
> common/lib/libc/arch/<targetport> -> common/lib/libc/arch/usermode to
> let this build.
> It can boot up to the point where vfs_mountroot is called, but for some
> reason at this point bufpool_page_alloc is returning NULL so the
> scheduler is stuck spinning between softclk and idle lwps.
> There is a dmesg for the curious at the end of this email.
> $ gdb -q ./netbsd.gdb
> (gdb) run
> Starting program:
> NetBSD/usermode startup
> Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
> 2006, 2007
> The NetBSD Foundation, Inc. All rights reserved.
> Copyright (c) 1982, 1986, 1989, 1991, 1993
> The Regents of the University of California. All rights reserved.
> NetBSD 4.99.45 (GENERIC) #0: Fri Dec 28 05:25:34 EST 2007
> total memory = 128 MB
> avail memory = 123 MB
> mainbus0 (root)
> cpu0 at mainbus0
> clock0 at mainbus0
> ttycons0 at mainbus0: console
> md0: internal 5000 KB image area
> root on md0a dumps on md0b
I think this would be a great way to get a zone-type system, test
various images/features without rebooting, or setup a minimal boot
environment before switching into a more secure mode. (and, of
course, other awesome stuff I haven't thought of)