2011-09-16 19:39:25 +04:00
|
|
|
/* $NetBSD: rump_allserver.c,v 1.22 2011/09/16 15:39:28 joerg Exp $ */
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
|
|
|
|
/*-
|
2011-02-04 23:06:23 +03:00
|
|
|
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
|
|
|
|
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#ifndef lint
|
2011-09-16 19:39:25 +04:00
|
|
|
__RCSID("$NetBSD: rump_allserver.c,v 1.22 2011/09/16 15:39:28 joerg Exp $");
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
#endif /* !lint */
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
2011-02-04 23:06:23 +03:00
|
|
|
#include <sys/disklabel.h>
|
2010-12-12 21:32:47 +03:00
|
|
|
#include <sys/signal.h>
|
2010-12-13 17:13:21 +03:00
|
|
|
#include <sys/module.h>
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
|
|
|
|
#include <rump/rump.h>
|
2010-12-12 21:32:47 +03:00
|
|
|
#include <rump/rump_syscalls.h>
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
|
2010-12-13 16:32:25 +03:00
|
|
|
#include <dlfcn.h>
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
#include <err.h>
|
|
|
|
#include <errno.h>
|
2010-12-14 19:40:05 +03:00
|
|
|
#include <fcntl.h>
|
2010-12-12 21:32:47 +03:00
|
|
|
#include <semaphore.h>
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
2011-02-04 23:06:23 +03:00
|
|
|
#include <util.h>
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
|
2011-09-16 19:39:25 +04:00
|
|
|
__dead static void
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
usage(void)
|
|
|
|
{
|
|
|
|
|
2011-01-03 15:18:25 +03:00
|
|
|
fprintf(stderr, "usage: %s [-s] [-c ncpu] [-d drivespec] [-l libs] "
|
2011-01-03 13:44:40 +03:00
|
|
|
"[-m modules] bindurl\n", getprogname());
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2011-09-16 19:39:25 +04:00
|
|
|
__dead static void
|
2010-12-11 13:44:55 +03:00
|
|
|
die(int sflag, int error, const char *reason)
|
|
|
|
{
|
|
|
|
|
|
|
|
warnx("%s: %s", reason, strerror(error));
|
|
|
|
if (!sflag)
|
|
|
|
rump_daemonize_done(error);
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2010-12-12 21:32:47 +03:00
|
|
|
static sem_t sigsem;
|
|
|
|
static void
|
|
|
|
sigreboot(int sig)
|
|
|
|
{
|
|
|
|
|
|
|
|
sem_post(&sigsem);
|
|
|
|
}
|
|
|
|
|
2010-12-14 19:40:05 +03:00
|
|
|
static const char *const disktokens[] = {
|
|
|
|
#define DKEY 0
|
|
|
|
"key",
|
|
|
|
#define DFILE 1
|
|
|
|
"hostpath",
|
|
|
|
#define DSIZE 2
|
2011-02-17 19:59:46 +03:00
|
|
|
#define DSIZE_E -1
|
2010-12-14 19:40:05 +03:00
|
|
|
"size",
|
2011-02-03 14:21:16 +03:00
|
|
|
#define DOFFSET 3
|
|
|
|
"offset",
|
2011-02-04 23:06:23 +03:00
|
|
|
#define DLABEL 4
|
|
|
|
"disklabel",
|
2011-02-17 19:03:05 +03:00
|
|
|
#define DTYPE 5
|
|
|
|
"type",
|
2010-12-14 19:40:05 +03:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
struct etfsreg {
|
|
|
|
const char *key;
|
|
|
|
const char *hostpath;
|
|
|
|
off_t flen;
|
2011-02-03 14:21:16 +03:00
|
|
|
off_t foffset;
|
2011-02-04 23:06:23 +03:00
|
|
|
char partition;
|
2010-12-14 19:40:05 +03:00
|
|
|
enum rump_etfs_type type;
|
|
|
|
};
|
|
|
|
|
2011-02-17 19:03:05 +03:00
|
|
|
struct etfstype {
|
|
|
|
const char *name;
|
|
|
|
enum rump_etfs_type type;
|
|
|
|
} etfstypes[] = {
|
|
|
|
{ "blk", RUMP_ETFS_BLK },
|
|
|
|
{ "chr", RUMP_ETFS_CHR },
|
|
|
|
{ "reg", RUMP_ETFS_REG },
|
|
|
|
};
|
|
|
|
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
2010-12-11 13:44:55 +03:00
|
|
|
const char *serverurl;
|
2010-12-13 17:13:21 +03:00
|
|
|
char **modarray = NULL;
|
|
|
|
unsigned nmods = 0, curmod = 0, i;
|
2010-12-14 19:40:05 +03:00
|
|
|
struct etfsreg *etfs = NULL;
|
|
|
|
unsigned netfs = 0, curetfs = 0;
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
int error;
|
2010-12-11 13:44:55 +03:00
|
|
|
int ch, sflag;
|
2011-01-03 13:44:40 +03:00
|
|
|
int ncpu;
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
|
|
|
|
setprogname(argv[0]);
|
|
|
|
|
2010-12-11 13:44:55 +03:00
|
|
|
sflag = 0;
|
2011-02-21 21:50:21 +03:00
|
|
|
while ((ch = getopt(argc, argv, "c:d:l:m:r:sv")) != -1) {
|
2010-12-11 13:44:55 +03:00
|
|
|
switch (ch) {
|
2011-01-03 13:44:40 +03:00
|
|
|
case 'c':
|
|
|
|
ncpu = atoi(optarg);
|
|
|
|
/* XXX: MAXCPUS is from host, not from kernel */
|
|
|
|
if (ncpu < 1 || ncpu > MAXCPUS)
|
|
|
|
err(1, "CPU count needs to be between "
|
|
|
|
"1 and %d\n", MAXCPUS);
|
|
|
|
setenv("RUMP_NCPU", optarg, 1);
|
|
|
|
break;
|
2010-12-14 19:40:05 +03:00
|
|
|
case 'd': {
|
|
|
|
char *options, *value;
|
|
|
|
char *key, *hostpath;
|
2011-02-03 14:21:16 +03:00
|
|
|
long long flen, foffset;
|
2011-02-04 23:06:23 +03:00
|
|
|
char partition;
|
2011-02-17 19:03:05 +03:00
|
|
|
int ftype;
|
2010-12-14 19:40:05 +03:00
|
|
|
|
2011-02-03 14:21:16 +03:00
|
|
|
flen = foffset = 0;
|
2011-02-04 23:06:23 +03:00
|
|
|
partition = 0;
|
2010-12-14 19:40:05 +03:00
|
|
|
key = hostpath = NULL;
|
2011-02-17 19:03:05 +03:00
|
|
|
ftype = -1;
|
2010-12-14 19:40:05 +03:00
|
|
|
options = optarg;
|
|
|
|
while (*options) {
|
|
|
|
switch (getsubopt(&options,
|
|
|
|
__UNCONST(disktokens), &value)) {
|
|
|
|
case DKEY:
|
2010-12-15 22:07:43 +03:00
|
|
|
if (key != NULL) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"key already given\n");
|
|
|
|
usage();
|
|
|
|
}
|
2010-12-14 19:40:05 +03:00
|
|
|
key = value;
|
|
|
|
break;
|
2011-02-04 23:06:23 +03:00
|
|
|
|
2010-12-14 19:40:05 +03:00
|
|
|
case DFILE:
|
2010-12-15 22:07:43 +03:00
|
|
|
if (hostpath != NULL) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"hostpath already given\n");
|
|
|
|
usage();
|
|
|
|
}
|
2010-12-14 19:40:05 +03:00
|
|
|
hostpath = value;
|
|
|
|
break;
|
2011-02-04 23:06:23 +03:00
|
|
|
|
2010-12-14 19:40:05 +03:00
|
|
|
case DSIZE:
|
2010-12-15 22:07:43 +03:00
|
|
|
if (flen != 0) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"size already given\n");
|
|
|
|
usage();
|
|
|
|
}
|
2011-02-18 12:54:03 +03:00
|
|
|
if (strcmp(value, "host") == 0) {
|
2011-02-17 19:59:46 +03:00
|
|
|
if (foffset != 0) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"cannot specify "
|
|
|
|
"offset with "
|
2011-02-22 18:51:59 +03:00
|
|
|
"size=host\n");
|
2011-02-17 19:59:46 +03:00
|
|
|
usage();
|
|
|
|
}
|
|
|
|
flen = DSIZE_E;
|
|
|
|
} else {
|
|
|
|
/* XXX: off_t max? */
|
|
|
|
flen = strsuftoll("-d size",
|
|
|
|
value, 0, LLONG_MAX);
|
|
|
|
}
|
2010-12-14 19:40:05 +03:00
|
|
|
break;
|
2011-02-03 14:21:16 +03:00
|
|
|
case DOFFSET:
|
|
|
|
if (foffset != 0) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"offset already given\n");
|
|
|
|
usage();
|
|
|
|
}
|
2011-02-17 19:59:46 +03:00
|
|
|
if (flen == DSIZE_E) {
|
|
|
|
fprintf(stderr, "cannot "
|
|
|
|
"specify offset with "
|
2011-02-22 18:51:59 +03:00
|
|
|
"size=host\n");
|
2011-02-17 19:59:46 +03:00
|
|
|
usage();
|
|
|
|
}
|
2011-02-03 14:21:16 +03:00
|
|
|
/* XXX: off_t max? */
|
|
|
|
foffset = strsuftoll("-d offset", value,
|
|
|
|
0, LLONG_MAX);
|
|
|
|
break;
|
2011-02-04 23:06:23 +03:00
|
|
|
|
|
|
|
case DLABEL:
|
|
|
|
if (foffset != 0 || flen != 0) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"disklabel needs to be "
|
|
|
|
"used alone\n");
|
|
|
|
usage();
|
|
|
|
}
|
|
|
|
if (strlen(value) != 1 ||
|
|
|
|
*value < 'a' || *value > 'z') {
|
|
|
|
fprintf(stderr,
|
|
|
|
"invalid label part\n");
|
|
|
|
usage();
|
|
|
|
}
|
|
|
|
partition = *value;
|
|
|
|
break;
|
|
|
|
|
2011-02-17 19:03:05 +03:00
|
|
|
case DTYPE:
|
|
|
|
if (ftype != -1) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"type already specified\n");
|
|
|
|
usage();
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = 0;
|
|
|
|
i < __arraycount(etfstypes);
|
|
|
|
i++) {
|
|
|
|
if (strcmp(etfstypes[i].name,
|
|
|
|
value) == 0)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (i == __arraycount(etfstypes)) {
|
|
|
|
fprintf(stderr,
|
|
|
|
"invalid type %s\n", value);
|
|
|
|
usage();
|
|
|
|
}
|
|
|
|
ftype = etfstypes[i].type;
|
|
|
|
break;
|
|
|
|
|
2010-12-14 19:40:05 +03:00
|
|
|
default:
|
|
|
|
fprintf(stderr, "invalid dtoken\n");
|
|
|
|
usage();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-04 23:06:23 +03:00
|
|
|
if (key == NULL || hostpath == NULL ||
|
|
|
|
(flen == 0 && partition == 0)) {
|
2010-12-14 19:40:05 +03:00
|
|
|
fprintf(stderr, "incomplete drivespec\n");
|
|
|
|
usage();
|
|
|
|
}
|
2011-02-17 19:03:05 +03:00
|
|
|
if (ftype == -1)
|
|
|
|
ftype = RUMP_ETFS_BLK;
|
2010-12-14 19:40:05 +03:00
|
|
|
|
|
|
|
if (netfs - curetfs == 0) {
|
|
|
|
etfs = realloc(etfs, (netfs+16)*sizeof(*etfs));
|
|
|
|
if (etfs == NULL)
|
|
|
|
err(1, "realloc etfs");
|
|
|
|
netfs += 16;
|
|
|
|
}
|
|
|
|
|
|
|
|
etfs[curetfs].key = key;
|
|
|
|
etfs[curetfs].hostpath = hostpath;
|
|
|
|
etfs[curetfs].flen = flen;
|
2011-02-03 14:21:16 +03:00
|
|
|
etfs[curetfs].foffset = foffset;
|
2011-02-04 23:06:23 +03:00
|
|
|
etfs[curetfs].partition = partition;
|
2011-02-17 19:03:05 +03:00
|
|
|
etfs[curetfs].type = ftype;
|
2010-12-14 19:40:05 +03:00
|
|
|
curetfs++;
|
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
2010-12-13 16:32:25 +03:00
|
|
|
case 'l':
|
2010-12-13 17:26:22 +03:00
|
|
|
if (dlopen(optarg, RTLD_LAZY|RTLD_GLOBAL) == NULL) {
|
|
|
|
char pb[MAXPATHLEN];
|
|
|
|
/* try to mimic linker -l syntax */
|
|
|
|
|
|
|
|
snprintf(pb, sizeof(pb), "lib%s.so", optarg);
|
|
|
|
if (dlopen(pb, RTLD_LAZY|RTLD_GLOBAL) == NULL) {
|
|
|
|
errx(1, "dlopen %s failed: %s",
|
|
|
|
pb, dlerror());
|
|
|
|
}
|
|
|
|
}
|
2010-12-13 16:32:25 +03:00
|
|
|
break;
|
2010-12-13 17:13:21 +03:00
|
|
|
case 'm':
|
|
|
|
if (nmods - curmod == 0) {
|
|
|
|
modarray = realloc(modarray,
|
|
|
|
(nmods+16) * sizeof(char *));
|
|
|
|
if (modarray == NULL)
|
|
|
|
err(1, "realloc");
|
|
|
|
nmods += 16;
|
|
|
|
}
|
|
|
|
modarray[curmod++] = optarg;
|
|
|
|
break;
|
2011-02-21 21:50:21 +03:00
|
|
|
case 'r':
|
|
|
|
setenv("RUMP_MEMLIMIT", optarg, 1);
|
|
|
|
break;
|
2010-12-11 13:44:55 +03:00
|
|
|
case 's':
|
|
|
|
sflag = 1;
|
|
|
|
break;
|
2011-02-21 21:50:21 +03:00
|
|
|
case 'v':
|
|
|
|
setenv("RUMP_VERBOSE", "1", 1);
|
|
|
|
break;
|
2010-12-11 13:44:55 +03:00
|
|
|
default:
|
|
|
|
usage();
|
|
|
|
/*NOTREACHED*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
argc -= optind;
|
|
|
|
argv += optind;
|
|
|
|
|
|
|
|
if (argc != 1)
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
usage();
|
|
|
|
|
2010-12-11 13:44:55 +03:00
|
|
|
serverurl = argv[0];
|
|
|
|
|
|
|
|
if (!sflag) {
|
|
|
|
error = rump_daemonize_begin();
|
|
|
|
if (error)
|
|
|
|
errx(1, "rump daemonize: %s", strerror(error));
|
|
|
|
}
|
|
|
|
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
error = rump_init();
|
|
|
|
if (error)
|
2010-12-11 13:44:55 +03:00
|
|
|
die(sflag, error, "rump init failed");
|
2010-12-13 17:13:21 +03:00
|
|
|
|
2010-12-14 19:40:05 +03:00
|
|
|
/* load modules */
|
2010-12-13 17:13:21 +03:00
|
|
|
for (i = 0; i < curmod; i++) {
|
|
|
|
struct modctl_load ml;
|
|
|
|
|
|
|
|
#define ETFSKEY "/module.mod"
|
|
|
|
if ((error = rump_pub_etfs_register(ETFSKEY,
|
|
|
|
modarray[0], RUMP_ETFS_REG)) != 0)
|
|
|
|
die(sflag, error, "module etfs register failed");
|
|
|
|
memset(&ml, 0, sizeof(ml));
|
|
|
|
ml.ml_filename = ETFSKEY;
|
|
|
|
if (rump_sys_modctl(MODCTL_LOAD, &ml) == -1)
|
|
|
|
die(sflag, errno, "module load failed");
|
|
|
|
rump_pub_etfs_remove(ETFSKEY);
|
2010-12-14 19:40:05 +03:00
|
|
|
#undef ETFSKEY
|
|
|
|
}
|
|
|
|
|
|
|
|
/* register host drives */
|
|
|
|
for (i = 0; i < curetfs; i++) {
|
2011-02-04 23:06:23 +03:00
|
|
|
char buf[1<<16];
|
|
|
|
struct disklabel dl;
|
2011-02-03 14:21:16 +03:00
|
|
|
struct stat sb;
|
2011-02-04 23:06:23 +03:00
|
|
|
off_t foffset, flen, fendoff;
|
2011-02-17 19:59:46 +03:00
|
|
|
int fd, oflags;
|
2010-12-14 19:40:05 +03:00
|
|
|
|
2011-02-17 19:59:46 +03:00
|
|
|
oflags = etfs[i].flen == DSIZE_E ? 0 : O_CREAT;
|
|
|
|
fd = open(etfs[i].hostpath, O_RDWR | oflags, 0644);
|
2010-12-14 19:40:05 +03:00
|
|
|
if (fd == -1)
|
2011-02-17 19:59:46 +03:00
|
|
|
die(sflag, errno, "etfs hostpath open");
|
2011-02-04 23:06:23 +03:00
|
|
|
|
|
|
|
if (etfs[i].partition) {
|
|
|
|
int partition = etfs[i].partition - 'a';
|
|
|
|
|
|
|
|
pread(fd, buf, sizeof(buf), 0);
|
|
|
|
if (disklabel_scan(&dl, buf, sizeof(buf)))
|
|
|
|
die(sflag, ENOENT, "disklabel not found");
|
|
|
|
|
|
|
|
if (partition >= dl.d_npartitions)
|
|
|
|
die(sflag, ENOENT, "partition not available");
|
|
|
|
|
|
|
|
foffset = dl.d_partitions[partition].p_offset
|
|
|
|
<< DEV_BSHIFT;
|
|
|
|
flen = dl.d_partitions[partition].p_size
|
|
|
|
<< DEV_BSHIFT;
|
|
|
|
} else {
|
|
|
|
foffset = etfs[i].foffset;
|
|
|
|
flen = etfs[i].flen;
|
|
|
|
}
|
|
|
|
|
2011-02-03 14:21:16 +03:00
|
|
|
if (fstat(fd, &sb) == -1)
|
|
|
|
die(sflag, errno, "fstat etfs hostpath");
|
2011-02-17 19:59:46 +03:00
|
|
|
if (flen == DSIZE_E) {
|
2011-02-22 18:51:59 +03:00
|
|
|
if (sb.st_size == 0)
|
|
|
|
die(sflag, EINVAL, "size=host, but cannot "
|
|
|
|
"query non-zero size");
|
2011-02-17 19:59:46 +03:00
|
|
|
flen = sb.st_size;
|
|
|
|
}
|
|
|
|
fendoff = foffset + flen;
|
2011-02-04 23:06:23 +03:00
|
|
|
if (S_ISREG(sb.st_mode) && sb.st_size < fendoff) {
|
|
|
|
if (ftruncate(fd, fendoff) == -1)
|
2011-02-03 14:21:16 +03:00
|
|
|
die(sflag, errno, "truncate");
|
|
|
|
}
|
2010-12-14 19:40:05 +03:00
|
|
|
close(fd);
|
|
|
|
|
2011-02-03 14:21:16 +03:00
|
|
|
if ((error = rump_pub_etfs_register_withsize(etfs[i].key,
|
2011-02-04 23:06:23 +03:00
|
|
|
etfs[i].hostpath, etfs[i].type, foffset, flen)) != 0)
|
2010-12-14 19:40:05 +03:00
|
|
|
die(sflag, error, "etfs register");
|
2010-12-13 17:13:21 +03:00
|
|
|
}
|
|
|
|
|
2010-12-11 13:44:55 +03:00
|
|
|
error = rump_init_server(serverurl);
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
if (error)
|
2010-12-11 13:44:55 +03:00
|
|
|
die(sflag, error, "rump server init failed");
|
|
|
|
|
|
|
|
if (!sflag)
|
2010-12-12 15:49:37 +03:00
|
|
|
rump_daemonize_done(RUMP_DAEMONIZE_SUCCESS);
|
2010-12-11 13:44:55 +03:00
|
|
|
|
2010-12-12 21:32:47 +03:00
|
|
|
sem_init(&sigsem, 0, 0);
|
|
|
|
signal(SIGTERM, sigreboot);
|
|
|
|
signal(SIGINT, sigreboot);
|
|
|
|
sem_wait(&sigsem);
|
|
|
|
|
|
|
|
rump_sys_reboot(0, NULL);
|
2010-12-12 21:33:44 +03:00
|
|
|
/*NOTREACHED*/
|
|
|
|
|
2010-12-12 21:32:47 +03:00
|
|
|
return 0;
|
Add a rump server which comes with all the drivers currently
available. In terms of modules it maps to:
golem> rump.modstat
NAME CLASS SOURCE REFS SIZE REQUIRES
bpf driver builtin 0 - -
cd9660 vfs builtin 0 - -
cgd driver builtin 0 - -
dm driver builtin 0 - -
efs vfs builtin 0 - -
ext2fs vfs builtin 0 - ffs
fdesc vfs builtin 0 - -
ffs vfs builtin 3 - -
fss driver builtin 0 - -
hfs vfs builtin 0 - -
kernfs vfs builtin 0 - -
ksem misc builtin 0 - -
layerfs misc builtin 2 - -
lfs vfs builtin 0 - ffs
mfs vfs builtin 0 - ffs
msdos vfs builtin 0 - -
nfs vfs builtin 1 - -
nfsserver misc builtin 0 - nfs
nilfs vfs builtin 0 - -
ntfs vfs builtin 0 - -
null vfs builtin 0 - layerfs
pad driver builtin 0 - -
ptyfs vfs builtin 0 - -
puffs vfs builtin 0 - putter
putter driver builtin 1 - -
scsiverbose misc builtin 0 - -
smbfs vfs builtin 0 - -
suser secmodel builtin 0 - -
swsensor driver builtin 0 - -
sysvbfs vfs builtin 0 - -
tmpfs vfs builtin 0 - -
udf vfs builtin 0 - -
umap vfs builtin 0 - layerfs
union vfs builtin 0 - -
usbverbose misc builtin 0 - -
wapbl vfs builtin 0 - -
In terms of interfaces:
golem> rump.ifconfig -C
shmif virt lo carp
and dmesg:
NetBSD 5.99.41 (RUMP-ROAST) #0: Tue Nov 30 15:35:05 CET 2010
pooka@pain-rustique.localhost:/usr/allsrc/src/sys/rump/librump/rumpkern
total memory = unlimited (host limit)
timecounter: Timecounters tick every 10.000 msec
timecounter: Timecounter "rumpclk" frequency 100 Hz quality 0
cpu0 at thinair0: rump virtual cpu
cpu1 at thinair0: rump virtual cpu
root file system type: rumpfs
mainbus0 (root)
ugenhc0 at mainbus0
usb0 at ugenhc0: USB revision 2.0
uhub0 at usb0: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub0: 1 port with 1 removable, self powered
ugenhc1 at mainbus0
usb1 at ugenhc1: USB revision 2.0
uhub1 at usb1: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub1: 1 port with 1 removable, self powered
ugenhc2 at mainbus0
usb2 at ugenhc2: USB revision 2.0
uhub2 at usb2: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub2: 1 port with 1 removable, self powered
ugenhc3 at mainbus0
usb3 at ugenhc3: USB revision 2.0
uhub3 at usb3: vendor 0x7275 product 0x6d70, class 9/0, rev 0.00/0.00, addr 1
uhub3: 1 port with 1 removable, self powered
scsitest0 at mainbus0
scsibus0 at scsitest0: 2 targets, 1 lun per target
cd0 at scsibus0 target 1 lun 0: <RUMPHOBO, It's a LIE, 0.00> cdrom removable
Chicony Electronics Chicony Electronics, class 0/0, rev 2.00/1.00, addr 2, uhub0 port 1 not configured
AuthenTec AuthenTec, class 255/255, rev 1.10/6.21, addr 2, uhub1 port 1 not configured
swwdog0: software watchdog initialized
Kernelized RAIDframe activated
pad0: outputs: 44100Hz, 16-bit, stereo
audio0 at pad0: half duplex, playback, capture
There a bunch of other stuff which doesn't show up as any of the
above, plus of course the usb drivers which are probed only if I
have the appropriate hardware plugged into my workstation.
2010-12-05 20:37:32 +03:00
|
|
|
}
|