initial import (Boeing r1752, NRL r878)
This commit is contained in:
commit
f8f46d28be
394 changed files with 99738 additions and 0 deletions
7
packaging/bsd/core-kernel-deinstall-4.11.sh
Executable file
7
packaging/bsd/core-kernel-deinstall-4.11.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo Restoring /kernel.old ...
|
||||
install -m 555 -o root -g wheel -fschg /kernel.old /kernel
|
||||
rm -rf /modules
|
||||
mv /modules.old /modules
|
||||
|
21
packaging/bsd/core-kernel-deinstall-8.x.sh
Executable file
21
packaging/bsd/core-kernel-deinstall-8.x.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
PREV=""
|
||||
|
||||
if [ ! -e "/boot/kernel.old" ] ; then
|
||||
if [ ! -e "/boot/GENERIC" ] ; then
|
||||
echo Previous kernel does not exist in /boot/kernel.old or /boot/GENERIC !
|
||||
exit 1;
|
||||
else
|
||||
PREV="/boot/GENERIC"
|
||||
fi;
|
||||
else
|
||||
PREV="/boot/kernel.old"
|
||||
fi;
|
||||
|
||||
echo Removing current kernel...
|
||||
chflags -R noschg /boot/kernel
|
||||
rm -rf /boot/kernel
|
||||
echo Restoring previous kernel from $PREV...
|
||||
mv $PREV /boot/kernel
|
||||
|
||||
exit 0;
|
96
packaging/bsd/core-kernel-pkgcreate.sh
Executable file
96
packaging/bsd/core-kernel-pkgcreate.sh
Executable file
|
@ -0,0 +1,96 @@
|
|||
#!/bin/sh
|
||||
VER=0.0
|
||||
|
||||
# determine FreeBSD 4.11 or 8.x
|
||||
REL=`uname -r`
|
||||
case "$REL" in
|
||||
9.*)
|
||||
echo "Using FreeBSD 9.x..."
|
||||
KERN=9.x
|
||||
SCRIPTVER=8.x
|
||||
;;
|
||||
8.*)
|
||||
echo "Using FreeBSD 8.x..."
|
||||
KERN=8.x
|
||||
SCRIPTVER=8.x
|
||||
;;
|
||||
4.11-RELEASE)
|
||||
echo "Using FreeBSD 4.11..."
|
||||
KERN=4.11
|
||||
SCRIPTVER=4.11
|
||||
;;
|
||||
*)
|
||||
echo "What version of FreeBSD are you running (4.11/8.x) ?"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
if [ "a$1" = "a" ]
|
||||
then
|
||||
echo "usage: ./core-kernel-release.sh 20080228 [clean]"
|
||||
echo a version number is required
|
||||
exit 1;
|
||||
else
|
||||
VER=$1
|
||||
fi;
|
||||
|
||||
if [ "a$2" = "aclean" ]
|
||||
then
|
||||
echo Cleaning up...
|
||||
rm -f core-kernel.pkglist.tmp
|
||||
rm -f core-kernel.pkglist
|
||||
rm -f core-kernel-${KERN}-${VER}.tbz
|
||||
exit
|
||||
fi;
|
||||
|
||||
|
||||
# check for /kernel.new on 4.11
|
||||
if [ ${KERN} = "4.11" ]
|
||||
then
|
||||
|
||||
if [ -e "/kernel.new" ]
|
||||
then
|
||||
echo Note: proceeding using this kernel...
|
||||
ls -al /kernel.new
|
||||
else
|
||||
echo "error: first copy the desired kernel to /kernel.new"
|
||||
exit
|
||||
fi;
|
||||
|
||||
fi;
|
||||
|
||||
|
||||
|
||||
#
|
||||
# build the packing list
|
||||
#
|
||||
echo @comment ORIGIN:net/core-kernel > core-kernel.pkglist
|
||||
if [ ${KERN} = "4.11" ]
|
||||
# FreeBSD 4.11
|
||||
then
|
||||
echo @cwd / >> core-kernel.pkglist
|
||||
echo kernel.new >> core-kernel.pkglist
|
||||
find /modules \! -type d > core-kernel.pkglist.tmp
|
||||
find /sbin/vimage >> core-kernel.pkglist.tmp
|
||||
find /usr/share/man/man8/vimage.8.gz >> core-kernel.pkglist.tmp
|
||||
find /sbin/ngctl >> core-kernel.pkglist.tmp
|
||||
find /usr/share/man/man8/ngctl.8.gz >> core-kernel.pkglist.tmp
|
||||
# FreeBSD 8.x
|
||||
else
|
||||
echo @cwd /boot >> core-kernel.pkglist
|
||||
PWDOLD=${PWD}
|
||||
cd /boot
|
||||
find kernel \! -type d > ${PWDOLD}/core-kernel.pkglist.tmp
|
||||
cd ${PWDOLD}
|
||||
echo @cwd / >> core-kernel.pkglist.tmp
|
||||
find /usr/sbin/vimage >> core-kernel.pkglist.tmp
|
||||
find /usr/share/man/man8/vimage.8.gz >> core-kernel.pkglist.tmp
|
||||
fi;
|
||||
|
||||
# remove leading '/' from lines
|
||||
sed -e "s,^/,," core-kernel.pkglist.tmp >> core-kernel.pkglist
|
||||
|
||||
#
|
||||
# build the package
|
||||
#
|
||||
pkg_create -c core-kernel.pkgdesc -d core-kernel.pkgdesclong -f core-kernel.pkglist -i core-kernel-preinstall-${SCRIPTVER}.sh -K core-kernel-deinstall-${SCRIPTVER}.sh -v core-kernel-${KERN}-${VER}.tbz
|
||||
|
18
packaging/bsd/core-kernel-preinstall-4.11.sh
Executable file
18
packaging/bsd/core-kernel-preinstall-4.11.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "x$2" = "xPOST-INSTALL" ]
|
||||
then
|
||||
install -m 555 -o root -g wheel -fschg /kernel.new /kernel
|
||||
rm -f /kernel.new
|
||||
echo Please reboot this machine to enable the new CORE kernel.
|
||||
exit 0;
|
||||
fi;
|
||||
|
||||
install -m 555 -o root -g wheel -fschg /kernel /kernel.old
|
||||
if [ -e /modules.old ]
|
||||
then
|
||||
rm -rf /modules.old
|
||||
fi;
|
||||
|
||||
mv /modules /modules.old
|
||||
exit 0;
|
27
packaging/bsd/core-kernel-preinstall-8.x.sh
Executable file
27
packaging/bsd/core-kernel-preinstall-8.x.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "x$2" = "xPOST-INSTALL" ]
|
||||
then
|
||||
echo Please reboot this machine to enable the new CORE kernel.
|
||||
exit 0;
|
||||
fi;
|
||||
|
||||
# PRE-INSTALL
|
||||
# save the GENERIC kernel
|
||||
OLDNAME=`strings /boot/kernel/kernel | tail -n 1`
|
||||
if [ "x$OLDNAME" = "xGENERIC" ]
|
||||
then
|
||||
chflags -R noschg /boot/kernel
|
||||
mv /boot/kernel /boot/GENERIC
|
||||
exit 0;
|
||||
fi;
|
||||
# get rid of /boot/kernel.old if it is in the way
|
||||
if [ -e "/boot/kernel.old" ] ; then
|
||||
chflags -R noschg /boot/kernel.old
|
||||
rm -rf /boot/kernel.old
|
||||
fi;
|
||||
|
||||
chflags -R noschg /boot/kernel
|
||||
mv /boot/kernel /boot/kernel.old
|
||||
|
||||
exit 0;
|
1
packaging/bsd/core-kernel.pkgdesc
Normal file
1
packaging/bsd/core-kernel.pkgdesc
Normal file
|
@ -0,0 +1 @@
|
|||
CORE FreeBSD kernel enables lightweight virtual machines
|
1
packaging/bsd/core-kernel.pkgdesclong
Normal file
1
packaging/bsd/core-kernel.pkgdesclong
Normal file
|
@ -0,0 +1 @@
|
|||
This package contains the CORE FreeBSD kernel with kernel modules. Custom modules include ng_pipe and ng_wlan. Also contains the userspace utility program vimage. This package can be used along with the CORE GUI to build emulated networks. This kernel is based on the GENERIC kernel with the VIMAGE option turned on (per-jail network stack virtualization), and with a small patch to allow per-node filesystem access.
|
68
packaging/bsd/core-pkgcreate.sh
Executable file
68
packaging/bsd/core-pkgcreate.sh
Executable file
|
@ -0,0 +1,68 @@
|
|||
#!/bin/sh
|
||||
|
||||
VER=`grep -m 1 "set CORE_VERSION" ../../gui/version.tcl | awk '{ print $3 }'`
|
||||
ARCH=`uname -m`
|
||||
# determine FreeBSD 4.11 or 7.x
|
||||
REL=`uname -r`
|
||||
case "$REL" in
|
||||
9.*)
|
||||
echo "Using FreeBSD 9.x..."
|
||||
KERN=9.x
|
||||
;;
|
||||
8.*)
|
||||
echo "Using FreeBSD 8.x..."
|
||||
KERN=8.x
|
||||
;;
|
||||
4.11-RELEASE)
|
||||
echo "Using FreeBSD 4.11..."
|
||||
KERN=4.11
|
||||
;;
|
||||
*)
|
||||
echo "What version of FreeBSD are you running (4.11/8.x) ?"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
if [ "a$1" = "aclean" ]
|
||||
then
|
||||
echo Cleaning up...
|
||||
rm -f core.pkglist.tmp
|
||||
rm -f core.pkglist
|
||||
rm -f core-${KERN}-${VER}.tbz
|
||||
rm -rf /tmp/staging
|
||||
exit
|
||||
fi;
|
||||
|
||||
|
||||
#
|
||||
# build the packing list
|
||||
#
|
||||
echo @comment ORIGIN:net/core > core.pkglist
|
||||
echo @cwd /usr/local >> core.pkglist
|
||||
PKG_BASH=`pkg_info -E -x ^bash`
|
||||
# for 4.11 change this back to 8.4
|
||||
PKG_TCL=`pkg_info -E -x ^tcl-8.5`
|
||||
PKG_TK=`pkg_info -E -x ^tk-8.5`
|
||||
echo @pkgdep ${PKG_BASH} >> core.pkglist
|
||||
echo @comment DEPORIGIN:shells/bash >> core.pkglist
|
||||
echo @pkgdep ${PKG_TCL} >> core.pkglist
|
||||
echo @comment DEPORIGIN:lang/tcl85 >> core.pkglist
|
||||
echo @pkgdep ${PKG_TK} >> core.pkglist
|
||||
echo @comment DEPORIGIN:x11-toolkits/tk85 >> core.pkglist
|
||||
|
||||
SAVEDIR=`pwd`
|
||||
cd ../..
|
||||
rm -rf /tmp/staging
|
||||
gmake DESTDIR=/tmp/staging install
|
||||
cd $SAVEDIR
|
||||
find /tmp/staging/usr/local \! -type d >> core.pkglist
|
||||
echo @cwd /etc >> core.pkglist
|
||||
find /tmp/staging/etc \! -type d >> core.pkglist
|
||||
sed -e "s,^/tmp/staging/usr/local/,," core.pkglist > core.pkglist.new1
|
||||
sed -e "s,^/tmp/staging/etc/,," core.pkglist.new1 > core.pkglist
|
||||
rm -f core.pkglist.new1
|
||||
|
||||
#
|
||||
# build the package
|
||||
#
|
||||
pkg_create -c core.pkgdesc -d core.pkgdesclong -f core.pkglist -v core-${KERN}-${ARCH}-${VER}.tbz
|
||||
|
1
packaging/bsd/core.pkgdesc
Normal file
1
packaging/bsd/core.pkgdesc
Normal file
|
@ -0,0 +1 @@
|
|||
Common Open Research Emulator userspace components
|
3
packaging/bsd/core.pkgdesclong
Normal file
3
packaging/bsd/core.pkgdesclong
Normal file
|
@ -0,0 +1,3 @@
|
|||
The Common Open Research Emulator (CORE) is a tool that allows you to emulate entire networks on a FreeBSD or Linux machine. You can connect these emulated networks to live networks (or to additional emulated networks) via the machine's physical interfaces. This package contains CORE userspace components for easily drawing topologies that drive lightweight virutalized network stacks.
|
||||
|
||||
WWW: http://cs.itd.nrl.navy.mil/work/core/index.php
|
Loading…
Add table
Add a link
Reference in a new issue