Rename tools to releasetools
This is in preparation of NetBSD's tools directory to build tools for cross compilation.
This commit is contained in:
151
tools/Makefile
151
tools/Makefile
@@ -1,151 +0,0 @@
|
||||
# Makefile for the kernel image.
|
||||
.include <bsd.own.mk>
|
||||
.include "nbsd.config"
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
u=/usr
|
||||
MDEC= /usr/mdec
|
||||
GEN_FILES= *.bak image kernel *.iso *.iso.gz cdfdimage rootimage src
|
||||
|
||||
# Specify the programs that are part of the system image.
|
||||
KERNEL= kernel
|
||||
# PROGRAMS are in the order they should be loaded by boot
|
||||
PROGRAMS= \
|
||||
../servers/ds/ds \
|
||||
../servers/rs/rs \
|
||||
../servers/pm/pm \
|
||||
../servers/sched/sched \
|
||||
../servers/vfs/vfs \
|
||||
../drivers/memory/memory \
|
||||
../drivers/log/log \
|
||||
../drivers/tty/tty \
|
||||
../servers/mfs/mfs \
|
||||
../servers/vm/vm \
|
||||
../servers/pfs/pfs \
|
||||
../servers/init/init
|
||||
|
||||
usage:
|
||||
@echo " " >&2
|
||||
@echo "Master Makefile to create new MINIX configuration." >& 2
|
||||
@echo "Root privileges are required." >&2
|
||||
@echo " " >&2
|
||||
@echo "Usage:" >&2
|
||||
@echo " make includes # Install include files" >&2
|
||||
@echo " make depend # Generate dependency files" >&2
|
||||
@echo " make services # Compile and install all services" >&2
|
||||
@echo " make install # Make image, and install to hard disk" >&2
|
||||
@echo " make hdboot # Make image, and install to hard disk" >&2
|
||||
@echo " make fdboot # Make image, and install to floppy disk" >&2
|
||||
@echo " make bootable # Make hard disk bootable" >&2
|
||||
@echo " make nbsd_fetch # Download current NetBSD reference sources" >&2
|
||||
@echo " make nbsd_diff # Update minix-port.patch in NetBSD sources" >&2
|
||||
@echo " make clean # Remove all compiler results, except libs" >&2
|
||||
@echo " " >&2
|
||||
@echo "To create a fresh MINIX configuration, try:" >&2
|
||||
@echo " make clean install # new boot image" >&2
|
||||
@echo " make fresh install # new everything" >&2
|
||||
@echo " " >&2
|
||||
|
||||
all: services
|
||||
|
||||
# rebuild the program or system libraries
|
||||
includes:
|
||||
$(MAKE) -C .. includes
|
||||
|
||||
depend: includes .gitignore
|
||||
$(MAKE) -C ../ depend
|
||||
|
||||
.gitignore: Makefile
|
||||
echo $(GEN_FILES) | tr ' ' '\n' >.gitignore
|
||||
|
||||
services: includes kernel servers .WAIT drivers
|
||||
|
||||
kernel: includes
|
||||
$(MAKE) -C ../kernel
|
||||
|
||||
servers: includes
|
||||
$(MAKE) -C ../servers all install
|
||||
|
||||
drivers: includes servers
|
||||
$(MAKE) -C ../drivers all install
|
||||
|
||||
# make bootable and place system images
|
||||
bootable:
|
||||
exec su root mkboot bootable
|
||||
|
||||
hdboot:
|
||||
rm -rf ${DESTDIR}/boot/minix/.temp/
|
||||
${INSTALL_DIR} {DESTDIR}/boot/minix/.temp
|
||||
# mod_0 is used to make alphabetical order equal to the boot order
|
||||
for i in ${PROGRAMS}; \
|
||||
do \
|
||||
let n=n+1 >/dev/null; \
|
||||
[ "$$n" -ge 10 ] && prefix="mod" || prefix="mod0"; \
|
||||
newname="${DESTDIR}/boot/minix/.temp/$${prefix}$${n}_`basename $$i`"; \
|
||||
cp $$i $$newname; \
|
||||
strip -s $$newname; \
|
||||
gzip $$newname; \
|
||||
done
|
||||
cp ../kernel/kernel ${DESTDIR}/boot/minix/.temp/
|
||||
strip -s ${DESTDIR}/boot/minix/.temp/kernel
|
||||
sh mkboot $@
|
||||
sh ../commands/update_bootcfg/update_bootcfg.sh
|
||||
|
||||
fdboot:
|
||||
exec su root mkboot $@
|
||||
@sync
|
||||
|
||||
install:
|
||||
if [ ${DESTDIR}X != X ]; \
|
||||
then ${MAKE} cross_install; \
|
||||
else ${MAKE} includes services hdboot; \
|
||||
fi
|
||||
|
||||
cross_install:
|
||||
${INSTALL_DIR} ${DESTDIR}/multiboot
|
||||
#ext2 might be needed
|
||||
for i in ${PROGRAMS} ../servers/ext2/ext2; \
|
||||
do \
|
||||
let n=n+1 >/dev/null; \
|
||||
[ "$$n" -ge 10 ] && prefix="mod" || prefix="mod0"; \
|
||||
newname="${DESTDIR}/multiboot/$${prefix}$${n}_`basename $$i`"; \
|
||||
${INSTALL} $$i $$newname; \
|
||||
strip -s $$newname; \
|
||||
gzip -f $$newname; \
|
||||
done
|
||||
${INSTALL} ../kernel/kernel ${DESTDIR}/multiboot/
|
||||
strip -s ${DESTDIR}/multiboot/kernel
|
||||
|
||||
# download and update NetBSD reference sources.
|
||||
nbsd_fetch:
|
||||
export CVS_RSH=ssh; \
|
||||
echo "retrieving hierarchies from ${NBSD_CVSROOT}"; \
|
||||
IFS=,; \
|
||||
cat nbsd_ports | grep -v '^#' | while read port ; \
|
||||
do set $$port; \
|
||||
date=$$1; minixpath=$$2; origpath=$$3; \
|
||||
if [ $$# -lt 3 ]; then origpath=$$2; fi; \
|
||||
echo "retrieving $$origpath .."; \
|
||||
cd ${NETBSDSRCDIR} && cvs -q -d ${NBSD_CVSROOT} co -N -D "$$date UTC" -d nbsdsrc "src/$$origpath" ; \
|
||||
done
|
||||
|
||||
nbsd_diff:
|
||||
find ${NETBSDSRCDIR} -name minix-port.patch | xargs rm
|
||||
cat nbsd_ports | grep -v '^#' | \
|
||||
( cd ${NETBSDSRCDIR} && awk -F, '{ minixpath=$$2; origpath=$$3; if(NF < 3) { origpath=$$2; } system("sh tools/nbsd_diff.sh " \
|
||||
"nbsdsrc/src/"origpath" "minixpath" "minixpath"/minix-port.patch");}' )
|
||||
find ${NETBSDSRCDIR} -name minix-port.patch | xargs wc -l | sort -n
|
||||
|
||||
|
||||
# clean up compile results
|
||||
clean:
|
||||
$(MAKE) -C ../kernel $@
|
||||
$(MAKE) -C ../servers $@
|
||||
$(MAKE) -C ../drivers $@
|
||||
rm -rf $(GEN_FILES)
|
||||
|
||||
cleandepend::
|
||||
$(MAKE) -C ../kernel $@
|
||||
$(MAKE) -C ../servers $@
|
||||
$(MAKE) -C ../drivers $@
|
||||
@@ -1,17 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
export SHELL=/bin/sh
|
||||
cd /usr/src
|
||||
|
||||
if [ $# -gt 0 ]
|
||||
then make $@
|
||||
exit $?
|
||||
fi
|
||||
make world
|
||||
cp /usr/mdec/boot_monitor /
|
||||
cp /boot/minix_latest/* /boot/minix_default/
|
||||
|
||||
if [ $MAKEMAP -ne 0 ]; then
|
||||
find . -type f -perm 755 | xargs nm -n 2> /dev/null > symbols.txt
|
||||
fi
|
||||
make clean cleandepend
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
Welcome to MINIX.
|
||||
|
||||
The system is now running and many commands work normally. To use MINIX
|
||||
in a serious way, you need to install it to your hard disk.
|
||||
|
||||
Type "root" at the login prompt, and hit enter.
|
||||
Then type "setup" and hit enter to start the installation process.
|
||||
121
tools/mkboot
121
tools/mkboot
@@ -1,121 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# mkboot 2.0 - make boot floppy, make root device bootable, etc.
|
||||
# Author: Kees J. Bot
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [bootable | hdboot | fdboot [device]]" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
rotate_oldest() {
|
||||
base_dir="$1"
|
||||
set -- `ls -t "$base_dir"`
|
||||
|
||||
case $# in
|
||||
0|1|2|3)
|
||||
# Not much there, do not remove a thing.
|
||||
;;
|
||||
*)
|
||||
# Remove the third-newest image in /boot/$hdboot_t, but
|
||||
# only if there's an older one (which is kept).
|
||||
echo "rm $root:$base_dir/$3"
|
||||
rm -rf "$base_dir/$3"
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
trap 'e=$?; rm -f /tmp/mkb.$$; exit $e' 0 2
|
||||
|
||||
mdec=/usr/mdec # bootstraps
|
||||
|
||||
# Check arguments.
|
||||
case "$#:$1" in
|
||||
1:bootable | 1:hdboot | [12]:fdboot )
|
||||
action=$1 dev=$2 size=$3
|
||||
;;
|
||||
*) usage
|
||||
esac
|
||||
|
||||
# Get the device table.
|
||||
FSTAB=/etc/fstab
|
||||
touch $FSTAB
|
||||
if grep -q "Poor man" $FSTAB
|
||||
then . $FSTAB
|
||||
else root="`awk <$FSTAB '{ if($2=="/") { print $1 } }'`"
|
||||
fi
|
||||
|
||||
# The real root device may be the RAM disk.
|
||||
realroot=`printroot -r`
|
||||
|
||||
# If it's an initial fstab, pretend root is real root
|
||||
if [ "$root" = "/dev/ROOT" -o -z "$root" ]
|
||||
then root=$realroot
|
||||
fi
|
||||
|
||||
case $action in
|
||||
bootable | hdboot)
|
||||
# We need the root device.
|
||||
|
||||
if [ $realroot = $root ]
|
||||
then
|
||||
rootdir=
|
||||
else
|
||||
umount $root 2>/dev/null
|
||||
mount $root /mnt || exit
|
||||
rootdir=/mnt
|
||||
fi
|
||||
esac
|
||||
|
||||
case $action in
|
||||
hdboot)
|
||||
sh tell_config OS_RELEASE . OS_VERSION >/tmp/mkb.$$
|
||||
version=`sed 's/[" ]//g;/^$/d' </tmp/mkb.$$`
|
||||
|
||||
# Retrieve the git revision; this only succeeds
|
||||
# if git is available, it's a git checkout, *and*
|
||||
# there are no uncommitted changes.
|
||||
if git diff --quiet 2>/dev/null
|
||||
then gitrev="-`git describe --always`"
|
||||
fi
|
||||
|
||||
revision=`cat revision 2>/dev/null`
|
||||
|
||||
if [ -z "$revision" ]
|
||||
then rrevision=""
|
||||
gitrev=""
|
||||
else rrevision=r$revision
|
||||
fi
|
||||
|
||||
oldrev=$revision
|
||||
|
||||
if [ -z "$revision" ]
|
||||
then
|
||||
revision=0
|
||||
rrevision=""
|
||||
else
|
||||
revision=`expr $revision + 1`
|
||||
rrevision=r$revision
|
||||
fi
|
||||
|
||||
target="${version}${rrevision}${gitrev}"
|
||||
|
||||
rotate_oldest "$rootdir/boot/minix"
|
||||
|
||||
# rotate system processes. We assume latest ones are in
|
||||
# /boot/modules/.temp and we maintain /boot/modules/ by ourselves.
|
||||
[ -d /boot/minix/.temp ] || exit 1
|
||||
rm -rf /boot/minix/"$target"/
|
||||
mv /boot/minix/.temp /boot/minix/"$target"
|
||||
rm -f /boot/minix_latest
|
||||
ln -s minix/"$target" /boot/minix_latest
|
||||
|
||||
# Save the revision number.
|
||||
test "$revision" != "$oldrev" && echo $revision >revision
|
||||
|
||||
test $realroot != $root && umount $root
|
||||
echo "Done."
|
||||
;;
|
||||
esac
|
||||
sync
|
||||
exit 0
|
||||
@@ -1,3 +0,0 @@
|
||||
NBSD_CVSROOT= anoncvs@anoncvs.netbsd.org:/cvsroot
|
||||
|
||||
NBSD_REF= "-D 2011-01-22 UTC0" # The date (or tag) of ported NetBSD sources.
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
diff=$3
|
||||
rm -f "$diff"
|
||||
if [ ! -d "$1" -o ! -d "$2" ]
|
||||
then echo Skipping $diff
|
||||
exit 0
|
||||
fi
|
||||
diff -aru $1 $2 | \
|
||||
sed /"^Only in"/d | \
|
||||
sed -e 's/^\(---.*\)\t.*/\1/' | \
|
||||
sed -e 's/^\(\+\+\+.*\)\t.*/\1/' > $diff
|
||||
|
||||
if [ ! -s "$diff" ]
|
||||
then rm -f "$diff"
|
||||
fi
|
||||
@@ -1,67 +0,0 @@
|
||||
# Format:
|
||||
# Timestamp in UTC,minixpath,netbsdpath
|
||||
# minixpath: path in Minix source tree (starting from /usr/src/)
|
||||
# netbsdpath: path in BSD source tree (starting from src/)
|
||||
2012/05/01 16:16:12,external/bsd/libarchive
|
||||
2012/02/10 16:16:12,usr.sbin/chroot
|
||||
2011/01/17 18:11:10,usr.bin/ldd
|
||||
2011/01/17 18:11:10,external/bsd/file
|
||||
2011/01/17 18:11:10,lib/csu
|
||||
2011/01/17 18:11:10,libexec/ld.elf_so
|
||||
2011/01/17 18:11:10,usr.bin/genassym
|
||||
2012/02/10 16:16:12,usr.bin/su
|
||||
2011/12/25 06:09:09,sys/arch/i386/stand
|
||||
2012/02/10 16:16:12,share/zoneinfo
|
||||
2012/02/10 16:16:12,share/misc
|
||||
2011/05/26 00:00:00,external/public-domain/xz
|
||||
2011/09/30 01:32:21,usr.bin/gzip
|
||||
2011/08/27 12:55:09,bin/date
|
||||
2011/10/17 09:24:54,common/lib/libprop
|
||||
2011/11/28 12:50:07,sys/ufs
|
||||
2010/09/10 15:51:20,sbin/newfs_ext2fs
|
||||
2011/09/16 16:13:18,sbin/fsck_ext2fs
|
||||
2011/09/30 22:08:19,lib/libprop
|
||||
2011/11/13 22:19:09,common/include
|
||||
2011/01/17 18:11:10,common/lib/libc
|
||||
2011/01/21 23:36:49,lib/libc
|
||||
2011/01/12 23:03:56,lib/libm
|
||||
2009/05/01 00:28:17,lib/libcrypt
|
||||
2010/10/12 12:57:51,lib/libterminfo
|
||||
2011/01/06 11:29:40,lib/libcurses
|
||||
2010/12/22 09:12:28,lib/libutil
|
||||
2009/05/13 02:50:31,common/lib/libutil
|
||||
2008/08/29 00:02:22,lib/libbz2
|
||||
2011/01/21 23:36:49,include
|
||||
2008/07/20 00:52:40,bin/mkdir
|
||||
2011/08/29 14:48:46,bin/rm
|
||||
2011/08/29 14:49:38,bin/rmdir
|
||||
2012/01/16 18:47:57,bin/ed
|
||||
2012/01/16 18:47:57,bin/cat
|
||||
2011/06/09 21:23:29,sbin/fsck
|
||||
2009/04/11 12:10:02,usr.bin/chpass
|
||||
2010/05/14 17:14:28,usr.bin/m4
|
||||
2011/01/12 06:17:52,usr.bin/indent
|
||||
2010/02/19 16:35:27,usr.bin/sed
|
||||
2011/01/15 22:54:10,usr.bin/stat
|
||||
2010/02/22 23:05:39,usr.bin/tic
|
||||
2010/10/15 05:46:48,usr.bin/mkdep
|
||||
2010/05/14 17:28:23,usr.bin/newgrp
|
||||
2010/10/06 07:59:18,usr.bin/uniq
|
||||
2010/05/27 08:40:19,usr.bin/seq
|
||||
2011/09/01 13:37:33,usr.bin/du
|
||||
2010/07/07 21:24:34,usr.bin/man
|
||||
2009/05/08 12:48:43,usr.bin/apropos
|
||||
2011/01/12 23:02:22,external/bsd/mdocml
|
||||
2011/11/03 20:46:41,usr.sbin/installboot
|
||||
2011/01/04 10:01:51,usr.sbin/pwd_mkdb
|
||||
2011/01/04 10:30:21,usr.sbin/user
|
||||
2009/04/19 00:44:49,usr.sbin/vipw
|
||||
2009/04/22 15:23:10,usr.sbin/zic
|
||||
2007/05/28 12:06:24,usr.bin/bzip2
|
||||
2007/05/28 12:06:25,usr.bin/bzip2recover
|
||||
2009/04/02 21:39:33,libexec/makewhatis
|
||||
2010/05/14 16:43:34,dist/bzip2
|
||||
2012/01/16 18:47:57,sys/lib/libsa
|
||||
2011/10/30 00:28:57,sys/lib/libz
|
||||
2012/02/10 16:16:12,external/bsd/file
|
||||
2012/02/10 16:16:12,usr.bin/login
|
||||
@@ -1,74 +0,0 @@
|
||||
9e-
|
||||
apr-1
|
||||
apr-util-
|
||||
autoconf-
|
||||
automake-
|
||||
bash-2
|
||||
bash-4
|
||||
bchunk-
|
||||
bcrypt-
|
||||
binutils-
|
||||
bison-
|
||||
curl-
|
||||
diffutils-
|
||||
digest-
|
||||
expat-
|
||||
f2c-
|
||||
figlet-2
|
||||
flex-
|
||||
gawk-
|
||||
gcc44-
|
||||
gettext-lib-
|
||||
gettext-tools-
|
||||
gmake-
|
||||
gmp-
|
||||
grep-
|
||||
gsed-
|
||||
gtexinfo-
|
||||
gzip-
|
||||
lcov-
|
||||
libiberty-
|
||||
libiconv-
|
||||
libidn-
|
||||
libtool-base-
|
||||
lua-
|
||||
m4-
|
||||
mdf2iso-
|
||||
minix-all
|
||||
mpfr-
|
||||
naim-
|
||||
nano-
|
||||
nawk-
|
||||
ncurses-
|
||||
neon-
|
||||
netdrv_tg3-
|
||||
openssh-
|
||||
openssl-
|
||||
p5-Digest-SHA1-
|
||||
p5-Error-
|
||||
p5-enum-
|
||||
p5-pkgsrc-Dewey-
|
||||
patch-
|
||||
pax-
|
||||
pdksh-
|
||||
perl-5
|
||||
pkg-config-
|
||||
pkg_install-info-
|
||||
pkg_leaves-
|
||||
pkgdep-
|
||||
pkgdepgraph-
|
||||
pkgdiff-
|
||||
pkglint-
|
||||
png-
|
||||
pth-
|
||||
readline-
|
||||
rsync-
|
||||
scmgit-base-
|
||||
sqlite3-
|
||||
unzip-
|
||||
url2pkg-
|
||||
vim-7
|
||||
vim-share-
|
||||
x11-6
|
||||
x11-links-
|
||||
zip-
|
||||
@@ -1,223 +0,0 @@
|
||||
|
||||
make_hdimage()
|
||||
{
|
||||
dd if=$TMPDISKUSR of=usrimage bs=$BS count=$USRBLOCKS
|
||||
|
||||
rootsize=`stat -f %z rootimage`
|
||||
usrsize=`stat -f %z usrimage`
|
||||
|
||||
rootsects=`expr $rootsize / 512`
|
||||
usrsects=`expr $usrsize / 512`
|
||||
|
||||
# installboot -m needs at least 1KB
|
||||
dd < /dev/zero >tmpimage count=2
|
||||
partition -fm tmpimage 2 81:$rootsects* 0:0 81:$usrsects
|
||||
installboot_nbsd -m tmpimage /usr/mdec/mbr
|
||||
dd < tmpimage > subpart count=1
|
||||
|
||||
primsects=`expr 1 + $rootsects + $usrsects`
|
||||
cyl=`expr '(' $primsects ')' / $secs + 1`
|
||||
padsects=`expr $cyl \* $secs - 1 - $primsects`
|
||||
|
||||
{ dd < /dev/zero count=1
|
||||
cat subpart
|
||||
cat rootimage
|
||||
cat usrimage
|
||||
dd < /dev/zero count=$padsects
|
||||
} > hdimage
|
||||
partition -m hdimage 81:`expr $primsects + $padsects`*
|
||||
installboot_nbsd -m hdimage /usr/mdec/mbr
|
||||
}
|
||||
|
||||
retrieve()
|
||||
{
|
||||
dir=$1
|
||||
list=`pwd`/$2
|
||||
URLS=""
|
||||
echo "Retrieving packages form $PACKAGEURL"
|
||||
(
|
||||
cd $dir || exit 1
|
||||
SUMMARY=pkg_summary
|
||||
rm -f pkg_summary* || true
|
||||
fetch $PACKAGEURL/$SUMMARY.bz2
|
||||
bzip2 -d $SUMMARY.bz2
|
||||
cat $list | while read name
|
||||
do pkgname="`fgrep PKGNAME=${name} $SUMMARY | sed 's/PKGNAME=//g'`"
|
||||
if [ `echo $pkgname | wc -w` -ne 1 ]
|
||||
then echo " *** Could not resolve $name (not found or too many matches: $pkgname) ***"
|
||||
else echo Getting $pkgname
|
||||
fetch -r ${PACKAGEURL}/${pkgname}.tgz
|
||||
fi
|
||||
echo -n "."
|
||||
done
|
||||
)
|
||||
echo done
|
||||
}
|
||||
|
||||
cd_root_changes()
|
||||
{
|
||||
cat >$CDFILES/boot.cfg <<END_BOOT_CFG
|
||||
banner=Welcome to the MINIX 3 installation CD
|
||||
banner================================================================================
|
||||
banner=
|
||||
menu=Regular MINIX 3:multiboot /kernel bootcd=1 cdproberoot=1 rootdevname=ram disable=inet
|
||||
menu=Drop to boot prompt:prompt
|
||||
clear=1
|
||||
timeout=10
|
||||
default=1
|
||||
load=/mod01_ds
|
||||
load=/mod02_rs
|
||||
load=/mod03_pm
|
||||
load=/mod04_sched
|
||||
load=/mod05_vfs
|
||||
load=/mod06_memory
|
||||
load=/mod07_log
|
||||
load=/mod08_tty
|
||||
load=/mod09_mfs
|
||||
load=/mod10_vm
|
||||
load=/mod11_pfs
|
||||
load=/mod12_init
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
# This space intentionally left blank - leave to appease bootloader!
|
||||
END_BOOT_CFG
|
||||
}
|
||||
|
||||
|
||||
hdemu_root_changes()
|
||||
{
|
||||
$RELEASEDIR/usr/sbin/installboot_nbsd $TMPDISKROOT \
|
||||
$RELEASEDIR/usr/mdec/bootxx_minixfs3
|
||||
|
||||
cat >$RELEASEMNTDIR/boot.cfg <<END_BOOT_CFG
|
||||
menu=Regular MINIX 3:load_mods /boot/minix_default/mod*;multiboot /boot/minix_default/kernel bootcd=2 disable=inet bios_wini=yes bios_remap_first=1 ramimagedev=c0d7p0s0
|
||||
menu=Drop to boot prompt:prompt
|
||||
clear=1
|
||||
timeout=10
|
||||
default=1
|
||||
END_BOOT_CFG
|
||||
}
|
||||
|
||||
usb_root_changes()
|
||||
{
|
||||
$RELEASEDIR/usr/sbin/installboot_nbsd $TMPDISKROOT \
|
||||
$RELEASEDIR/usr/mdec/bootxx_minixfs3
|
||||
echo \
|
||||
cat >$RELEASEMNTDIR/boot.cfg <<END_BOOT_CFG
|
||||
menu=Regular MINIX 3:load_mods /boot/minix_default/mod*;multiboot /boot/minix_default/kernel bios_wini=yes bios_remap_first=1 rootdevname=c0d7p0s0
|
||||
menu=Drop to boot prompt:prompt
|
||||
clear=1
|
||||
timeout=10
|
||||
default=1
|
||||
END_BOOT_CFG
|
||||
}
|
||||
|
||||
copy_local_packages()
|
||||
{
|
||||
if [ -d $PACKAGEDIR -a -f $PACKAGELIST -a $PACKAGES -ne 0 ]
|
||||
then
|
||||
index=pkg_summary
|
||||
indexpath=$PACKAGEDIR/.index
|
||||
|
||||
if [ ! -d $indexpath ]
|
||||
then mkdir $indexpath
|
||||
fi
|
||||
if [ ! -d $indexpath ]
|
||||
then echo "Couldn't create $indexpath."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "" >$PACKAGEDIR/All/$index
|
||||
|
||||
echo " * Transfering $PACKAGEDIR to $RELEASEPACKAGE"
|
||||
for pkgprefix in `cat $PACKAGELIST`
|
||||
do realfn="`echo $PACKAGEDIR/All/${pkgprefix}*.tgz`"
|
||||
if [ -f "$realfn" ]
|
||||
then
|
||||
# Copy package and create package's index
|
||||
(
|
||||
p="`basename $realfn`"
|
||||
cd $PACKAGEDIR/All
|
||||
cp $p $RELEASEPACKAGE/
|
||||
|
||||
indexname=$indexpath/$p.$index
|
||||
pkg_info -X $p >$indexname
|
||||
|
||||
if [ ! -f $indexname ]
|
||||
then echo Missing $indexname.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "`wc -l $indexname`" -lt 3 ]
|
||||
then $indexname is too short.
|
||||
rm $indexname
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cat $indexname >>$PACKAGEDIR/All/$index
|
||||
)
|
||||
else
|
||||
echo "Can't find $pkgprefix Missing."
|
||||
fi
|
||||
done
|
||||
|
||||
bzip2 -f $PACKAGEDIR/All/$index
|
||||
cp $PACKAGEDIR/All/$index.bz2 $RELEASEPACKAGE/
|
||||
fi
|
||||
}
|
||||
|
||||
fitfs()
|
||||
{
|
||||
path="$1"
|
||||
ramdisk="$2"
|
||||
extra_inodes="$3"
|
||||
extra_zones="$4"
|
||||
mbsdefault="$5"
|
||||
|
||||
# Determine number of inodes
|
||||
inodes=`find $path | egrep -v ^$path/usr | wc -l`
|
||||
inodes="`expr $inodes + $extra_inodes`"
|
||||
|
||||
# Determine number of data zones
|
||||
zonekbs=`du -ks $path | cut -d' ' -f1`
|
||||
zonekbsignore=0
|
||||
[ ! -d $path/usr ] || zonekbsignore=`du -ks $path/usr | cut -d" " -f1`
|
||||
zones="`expr \( $zonekbs - $zonekbsignore \) / \( $BS / 1024 \) + $extra_zones`"
|
||||
|
||||
# Determine file system size
|
||||
BSBITS="`expr $BS \* 8`"
|
||||
imap_blocks="`expr \( $inodes + $BSBITS - 1 \) / $BSBITS`"
|
||||
inode_blocks="`expr \( $inodes \* 64 + $BS - 1 \) / $BS`"
|
||||
zmap_blocks="`expr \( $zones + $BSBITS - 1 \) / $BSBITS`"
|
||||
blocks="`expr 1 + 1 + $imap_blocks + $zmap_blocks + $inode_blocks + $zones`"
|
||||
kbs="`expr $blocks \* \( $BS / 1024 \)`"
|
||||
|
||||
# Apply default if higher
|
||||
if [ -n "$mbsdefault" ]
|
||||
then
|
||||
kbsdefault="`expr $mbsdefault \* 1024`"
|
||||
if [ "$kbs" -lt "$kbsdefault" ]
|
||||
then kbs=$kbsdefault
|
||||
else echo "warning: ${mbsdefault}mb is too small, using ${kbs}kb"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create a filesystem on the target ramdisk
|
||||
ramdisk $kbs $ramdisk
|
||||
mkfs.mfs -B $BS -i $inodes $ramdisk
|
||||
}
|
||||
433
tools/release.sh
433
tools/release.sh
@@ -1,433 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
. release.functions
|
||||
|
||||
version_pretty="`sh tell_config OS_RELEASE . OS_VERSION | tr -dc 0-9.`"
|
||||
version="`echo $version_pretty | tr . _`"
|
||||
PACKAGEDIR=/usr/pkgsrc/packages/$version_pretty/`uname -m`
|
||||
|
||||
XBIN=usr/xbin
|
||||
XLIB=xlib
|
||||
SRC=src
|
||||
REPO=git://git.minix3.org/minix
|
||||
GITBRANCH=master
|
||||
|
||||
LD_LIB="LD_LIBRARY_PATH=/lib:/usr/lib:/$XLIB"
|
||||
BUILDPATH="PATH=/$XBIN:/usr/pkg/bin"
|
||||
BUILDENV="$BUILDPATH $LD_LIB"
|
||||
|
||||
# List of packages included on installation media
|
||||
PACKAGELIST=packages.install
|
||||
secs=`expr 32 '*' 64`
|
||||
export SHELL=/bin/sh
|
||||
|
||||
PKG_ADD=/usr/pkg/sbin/pkg_add
|
||||
PKG_INFO=/usr/pkg/sbin/pkg_info
|
||||
|
||||
if [ ! -x $PKG_ADD ]
|
||||
then echo Please install pkg_install from pkgsrc.
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Packages we have to pre-install, and url to use
|
||||
PACKAGEURL=ftp://ftp.minix3.org/pub/minix/packages/$version_pretty/`uname -m`/All/
|
||||
PREINSTALLED_PACKAGES="
|
||||
pkgin
|
||||
pkg_install
|
||||
bmake
|
||||
binutils
|
||||
clang
|
||||
"
|
||||
# pkg_tarup
|
||||
|
||||
PKG_ADD_URL=$PACKAGEURL
|
||||
|
||||
RELEASERC=$HOME/.releaserc
|
||||
|
||||
if [ -f $RELEASERC ]
|
||||
then . $RELEASERC
|
||||
fi
|
||||
|
||||
set -- $* $RELOPTS
|
||||
|
||||
# SVN trunk repo
|
||||
TRUNK=https://gforge.cs.vu.nl/svn/minix/trunk
|
||||
|
||||
RELEASEDIR=/usr/r-staging
|
||||
RELEASEMNTDIR=/usr/r
|
||||
RELEASEPACKAGE=${RELEASEDIR}/usr/install/packages
|
||||
|
||||
IMAGE=/usr/mdec/bootxx_cd9660
|
||||
ROOTIMAGE=rootimage
|
||||
CDFILES=/usr/tmp/cdreleasefiles
|
||||
sh tell_config OS_RELEASE . OS_VERSION >/tmp/rel.$$
|
||||
IMG_BASE=minix${version}_ide
|
||||
BS=4096
|
||||
|
||||
HDEMU=0
|
||||
COPY=0
|
||||
JAILMODE=0
|
||||
SVNREV=""
|
||||
REVTAG=""
|
||||
PACKAGES=1
|
||||
MINIMAL=0
|
||||
MAKEMAP=0
|
||||
EXTRAS_INSTALL=0
|
||||
EXTRAS_PATH=
|
||||
|
||||
# Do we have git?
|
||||
if git --version >/dev/null
|
||||
then if [ -d ../.git ]
|
||||
then LOCAL_REVTAG="`git describe --always`"
|
||||
GITMODE=1
|
||||
fi
|
||||
fi
|
||||
|
||||
FILENAMEOUT=""
|
||||
|
||||
while getopts "b:j:ls:pmMchu?r:f:L:e:" c
|
||||
do
|
||||
case "$c" in
|
||||
\?)
|
||||
echo "Usage: $0 [-l] [-p] [-c] [-h] [-m] [-M] [-r <tag>] [-u] [-f <filename>] [-s <username>] -j<jaildir> [-L <packageurl>] [-e <extras-path>]" >&2
|
||||
exit 1
|
||||
;;
|
||||
b)
|
||||
GITBRANCH=$OPTARG
|
||||
;;
|
||||
h)
|
||||
echo " * Making HD image"
|
||||
IMG_BASE=minix${version}_bios
|
||||
HDEMU=1
|
||||
;;
|
||||
c)
|
||||
echo " * Copying, not SVN"
|
||||
COPY=1
|
||||
;;
|
||||
p)
|
||||
PACKAGES=0
|
||||
;;
|
||||
r)
|
||||
SVNREV=-r$OPTARG
|
||||
;;
|
||||
j)
|
||||
RELEASEDIR=$OPTARG
|
||||
JAILMODE=1
|
||||
;;
|
||||
u)
|
||||
echo " * Making live USB-stick image"
|
||||
IMG_BASE=minix${version}_usb
|
||||
HDEMU=1
|
||||
USB=1
|
||||
;;
|
||||
f)
|
||||
FILENAMEOUT="$OPTARG"
|
||||
;;
|
||||
s) USERNAME="--username=$OPTARG"
|
||||
;;
|
||||
m) MINIMAL=1
|
||||
PACKAGES=0
|
||||
;;
|
||||
M) MAKEMAP=1
|
||||
;;
|
||||
l) PKG_ADD_URL=file://$PACKAGEDIR/All
|
||||
;;
|
||||
L) PKG_ADD_URL="$OPTARG"
|
||||
CUSTOM_PACKAGES=1
|
||||
;;
|
||||
e) EXTRAS_INSTALL=1
|
||||
EXTRAS_PATH="$OPTARG"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $GITMODE -ne 1 -a $COPY -ne 1 ]
|
||||
then echo "Need git to retrieve latest minix! Copying src instead!"
|
||||
COPY=1
|
||||
fi
|
||||
|
||||
if [ ! "$ZIP" ]
|
||||
then ZIP=bzip2
|
||||
fi
|
||||
|
||||
if [ $PACKAGES -ne 0 ]
|
||||
then mkdir -p $PACKAGEDIR/All || true
|
||||
retrieve $PACKAGEDIR/All $PACKAGELIST packages/`uname -p`/$VERSION_PRETTY
|
||||
fi
|
||||
|
||||
TMPDISKUSR=/dev/ram0
|
||||
TMPDISKROOT=/dev/ram1
|
||||
|
||||
if [ ! -b $TMPDISKUSR -o ! $TMPDISKROOT ]
|
||||
then echo "$TMPDISKUSR or $TMPDISKROOT is not a block device.."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $TMPDISKUSR = $TMPDISKROOT ]
|
||||
then
|
||||
echo "Temporary devices can't be equal."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $JAILMODE = 0 ]
|
||||
then echo " * Cleanup old files"
|
||||
umount $TMPDISKUSR || true
|
||||
umount $TMPDISKROOT || true
|
||||
umount $RELEASEMNTDIR/usr || true
|
||||
umount $RELEASEMNTDIR || true
|
||||
fi
|
||||
|
||||
rm -rf $RELEASEDIR $RELEASEMNTDIR $IMG $ROOTIMAGE $CDFILES image* || true
|
||||
mkdir -p $CDFILES || exit
|
||||
mkdir -p $RELEASEDIR $RELEASEMNTDIR
|
||||
mkdir -m 755 $RELEASEDIR/usr
|
||||
mkdir -m 1777 $RELEASEDIR/tmp
|
||||
|
||||
mkdir -p $RELEASEDIR/tmp
|
||||
mkdir -p $RELEASEDIR/usr/tmp
|
||||
mkdir -p $RELEASEDIR/$XBIN
|
||||
mkdir -p $RELEASEDIR/$XLIB
|
||||
mkdir -p $RELEASEDIR/libexec
|
||||
mkdir -p $RELEASEDIR/usr/bin
|
||||
mkdir -p $RELEASEDIR/bin
|
||||
mkdir -p $RELEASEPACKAGE
|
||||
|
||||
echo " * Transfering bootstrap dirs to $RELEASEDIR"
|
||||
|
||||
# Actual binaries
|
||||
cp -p /bin/* /usr/bin/* /usr/sbin/* /sbin/* $RELEASEDIR/$XBIN
|
||||
cp -rp /bin/cat /bin/sh /bin/echo /bin/install /bin/rm \
|
||||
/bin/date /bin/ls $RELEASEDIR/bin
|
||||
cp -rp /usr/bin/make /usr/bin/yacc /usr/bin/lex \
|
||||
/usr/bin/grep /usr/bin/egrep /usr/bin/awk /usr/bin/sed $RELEASEDIR/usr/bin
|
||||
|
||||
# For dynamically linked binaries: put interpreter there the
|
||||
# system's current crop of shared libraries so they'll run;
|
||||
# once they're rebuilt they can be thrown out in favour of the
|
||||
# new ones like $XBIN
|
||||
cp -p /libexec/ld.elf_so $RELEASEDIR/libexec/
|
||||
cp -p /lib/*.so* /usr/lib/*.so* $RELEASEDIR/$XLIB/
|
||||
|
||||
CONFIGHEADER=$RELEASEDIR/usr/src/include/minix/sys_config.h
|
||||
|
||||
copy_local_packages
|
||||
|
||||
if [ "$COPY" -ne 1 ]
|
||||
then
|
||||
echo "Retrieving latest minix repo from $REPO branch $GITBRANCH."
|
||||
srcdir=$RELEASEDIR/usr/src
|
||||
git clone -b $GITBRANCH $REPO $srcdir
|
||||
if [ "$REVTAG" ]
|
||||
then echo "Doing checkout of $REVTAG."
|
||||
(cd $srcdir && git checkout $REVTAG )
|
||||
else REVTAG=`(cd $srcdir && git rev-parse --short HEAD)`
|
||||
echo "Retrieved repository head in $srcdir is $REVTAG."
|
||||
fi
|
||||
if [ $MINIMAL -ne 0 ]
|
||||
then rm -r $srcdir/.git
|
||||
fi
|
||||
echo "
|
||||
/* Added by release script */
|
||||
#ifndef _VCS_REVISION
|
||||
#define _VCS_REVISION \"$REVTAG\"
|
||||
#endif" >>$CONFIGHEADER
|
||||
DATE=`date +%Y%m%d`
|
||||
# output image name
|
||||
if [ "$USB" -ne 0 ]; then
|
||||
IMG=${IMG_BASE}_${DATE}_${REVTAG}.img
|
||||
else
|
||||
IMG=${IMG_BASE}_${DATE}_${REVTAG}.iso
|
||||
fi
|
||||
else
|
||||
echo "Copying contents from current src dir."
|
||||
( cd .. && make depend && make clean )
|
||||
srcdir=/usr/$SRC
|
||||
( cd $srcdir && tar --exclude .svn -cf - . ) | ( cd $RELEASEDIR/usr && mkdir $SRC && cd $SRC && tar xf - )
|
||||
REVTAG=copy
|
||||
REVISION=unknown
|
||||
IMG=${IMG_BASE}_copy.iso
|
||||
fi
|
||||
|
||||
# Make sure the CD knows it's a CD, unless it's not
|
||||
if [ "$USB" -eq 0 ]
|
||||
then date >$RELEASEDIR/CD
|
||||
fi
|
||||
echo " * Bootstrap /usr/share/mk files"
|
||||
# Need /usr/share/mk in the new system to invoke make. Real ownerships
|
||||
# and permissions will be set by its own src/share/mk/Makefile.
|
||||
mkdir -p $RELEASEDIR/usr/share/mk
|
||||
chmod 755 $RELEASEDIR/usr/share/mk
|
||||
cp $RELEASEDIR/usr/src/share/mk/* $RELEASEDIR/usr/share/mk/
|
||||
chown -R root $RELEASEDIR/usr/share/mk
|
||||
rm -f $RELEASEDIR/usr/$SRC/tools/revision
|
||||
cp chrootmake.sh $RELEASEDIR/usr/$SRC/tools/chrootmake.sh
|
||||
|
||||
echo " * Make hierarchy"
|
||||
sh -c "$LD_LIB chroot $RELEASEDIR sh -c \"$BUILDENV sh -x /usr/$SRC/tools/chrootmake.sh etcfiles\"" || exit 1
|
||||
|
||||
for p in $PREINSTALLED_PACKAGES
|
||||
do echo " * Pre-installing: $p from $PKG_ADD_URL"
|
||||
$PKG_ADD -f -P $RELEASEDIR $PKG_ADD_URL/$p
|
||||
done
|
||||
|
||||
if [ "$CUSTOM_PACKAGES" ]
|
||||
then echo $PKG_ADD_URL >$RELEASEDIR/usr/pkg/etc/pkgin/repositories.conf
|
||||
fi
|
||||
|
||||
echo " * Resetting timestamps"
|
||||
find $RELEASEDIR | xargs touch
|
||||
echo " * Chroot build"
|
||||
sh -c "$LD_LIB MAKEMAP=$MAKEMAP chroot $RELEASEDIR sh -c \"$BUILDENV sh -x /usr/$SRC/tools/chrootmake.sh\"" || exit 1
|
||||
echo " * Chroot build done"
|
||||
echo " * Removing bootstrap files"
|
||||
rm -rf $RELEASEDIR/$XBIN
|
||||
rm -rf $RELEASEDIR/$XLIB
|
||||
# The build process leaves some file in $SRC as bin.
|
||||
chown -R root $RELEASEDIR/usr/src*
|
||||
cp issue.install $RELEASEDIR/etc/issue
|
||||
|
||||
echo $version_pretty, SVN revision $REVISION, generated `date` >$RELEASEDIR/etc/version
|
||||
rm -rf $RELEASEDIR/tmp/*
|
||||
|
||||
if [ $MINIMAL -ne 0 ]
|
||||
then
|
||||
if [ "$MAKEMAP" -ne 0 ]
|
||||
then
|
||||
echo " * Copying symbol map to ${IMG}-symbols.txt"
|
||||
cp $RELEASEDIR/usr/src/symbols.txt ${IMG}-symbols.txt
|
||||
$ZIP -f ${IMG}-symbols.txt
|
||||
fi
|
||||
|
||||
echo " * Removing files to create minimal image"
|
||||
rm -rf $RELEASEDIR/usr/man/man*/* \
|
||||
$RELEASEDIR/usr/share/zoneinfo* $RELEASEDIR/usr/src
|
||||
mkdir -p $RELEASEDIR/usr/src/tools
|
||||
fi
|
||||
|
||||
if [ $EXTRAS_INSTALL -ne 0 ] ; then
|
||||
echo " * Copying files from $EXTRAS_PATH"
|
||||
cp -Rv $EXTRAS_PATH/* $RELEASEDIR
|
||||
fi
|
||||
|
||||
# If we are making a jail, all is done!
|
||||
if [ $JAILMODE = 1 ]
|
||||
then echo "Created new minix install in $RELEASEDIR."
|
||||
echo "Enter it by typing: "
|
||||
echo "# chroot $RELEASEDIR /bin/sh"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo " * Counting files"
|
||||
extrakb=`du -ks $RELEASEDIR/usr/install | awk '{ print $1 }'`
|
||||
find $RELEASEDIR/usr | fgrep -v /install/ | wc -l >$RELEASEDIR/.usrfiles
|
||||
find $RELEASEDIR -print -path $RELEASEDIR/usr -prune | wc -l >$RELEASEDIR/.rootfiles
|
||||
|
||||
fstab_marker="# Poor man's File System Table."
|
||||
echo " * Writing fstab"
|
||||
if [ "$USB" -ne 0 ]
|
||||
then
|
||||
echo \
|
||||
"$fstab_marker
|
||||
root=/dev/c0d7p0s0
|
||||
usr=/dev/c0d7p0s2
|
||||
" > $RELEASEDIR/etc/fstab
|
||||
elif [ "$HDEMU" -ne 0 ]
|
||||
then
|
||||
echo \
|
||||
"$fstab_marker
|
||||
root=/dev/c0d7p0s0
|
||||
usr=/dev/c0d7p0s2
|
||||
usr_roflag=\"-r\"" > $RELEASEDIR/etc/fstab
|
||||
fi
|
||||
|
||||
echo " * Mounting $TMPDISKROOT as $RELEASEMNTDIR"
|
||||
fitfs $RELEASEDIR $TMPDISKROOT 64 256 "$ROOTMB"
|
||||
ROOTBLOCKS=$blocks
|
||||
ROOTSECTS="`expr $blocks \* \( $BS / 512 \)`"
|
||||
mount $TMPDISKROOT $RELEASEMNTDIR || exit
|
||||
|
||||
echo " * Mounting $TMPDISKUSR as $RELEASEMNTDIR/usr"
|
||||
fitfs $RELEASEDIR/usr $TMPDISKUSR 0 0 "$USRMB"
|
||||
USRBLOCKS=$blocks
|
||||
USRSECTS="`expr $blocks \* \( $BS / 512 \)`"
|
||||
mkdir -m 755 $RELEASEMNTDIR/usr
|
||||
mount $TMPDISKUSR $RELEASEMNTDIR/usr || exit
|
||||
|
||||
echo " * Copying files from staging to image"
|
||||
synctree -f $RELEASEDIR $RELEASEMNTDIR > /dev/null || true
|
||||
expr `df $TMPDISKUSR | tail -1 | awk '{ print $4 }'` - $extrakb >$RELEASEMNTDIR/.usrkb
|
||||
|
||||
echo " * Unmounting $TMPDISKUSR from $RELEASEMNTDIR/usr"
|
||||
umount $TMPDISKUSR || exit
|
||||
|
||||
echo " * Making image bootable"
|
||||
if [ "$USB" -ne 0 ]
|
||||
then
|
||||
usb_root_changes
|
||||
elif [ "$HDEMU" -ne 0 ]
|
||||
then
|
||||
hdemu_root_changes
|
||||
else
|
||||
cd_root_changes
|
||||
fi
|
||||
|
||||
echo " * Unmounting $TMPDISKROOT from $RELEASEMNTDIR"
|
||||
umount $TMPDISKROOT || exit
|
||||
rm -r $RELEASEMNTDIR
|
||||
|
||||
dd if=$TMPDISKROOT of=$ROOTIMAGE bs=$BS count=$ROOTBLOCKS
|
||||
cp release/cd/* $CDFILES || true
|
||||
echo "This is Minix version $version_pretty prepared `date`." >$CDFILES/VERSION.TXT
|
||||
|
||||
boottype=-n
|
||||
bootimage=$IMAGE
|
||||
if [ "$HDEMU" -ne 0 ]; then
|
||||
make_hdimage
|
||||
boottype='-h'
|
||||
bootimage=hdimage
|
||||
fi
|
||||
|
||||
if [ "$USB" -ne 0 ]; then
|
||||
mv $bootimage $IMG
|
||||
else
|
||||
cp $RELEASEDIR/usr/mdec/boot_monitor $CDFILES/boot
|
||||
cp -rf $RELEASEDIR/boot/minix_latest/* $CDFILES/
|
||||
gzip -d $CDFILES/*gz
|
||||
writeisofs -s0x0 -l MINIX -B $bootimage $boottype $CDFILES $IMG || exit 1
|
||||
|
||||
if [ "$HDEMU" -eq 0 ]
|
||||
then
|
||||
echo "Appending Minix root and usr filesystem"
|
||||
# Pad ISO out to cylinder boundary
|
||||
isobytes=`stat -f %z $IMG`
|
||||
isosects=`expr $isobytes / 512`
|
||||
isopad=`expr $secs - '(' $isosects % $secs ')'`
|
||||
dd if=/dev/zero count=$isopad >>$IMG
|
||||
# number of sectors
|
||||
isosects=`expr $isosects + $isopad`
|
||||
( cat $IMG $ROOTIMAGE ;
|
||||
dd if=$TMPDISKUSR bs=$BS count=$USRBLOCKS ) >m
|
||||
mv m $IMG
|
||||
# Make CD partition table
|
||||
installboot_nbsd -m $IMG /usr/mdec/mbr
|
||||
# Make sure there is no hole..! Otherwise the ISO format is
|
||||
# unreadable.
|
||||
partition -m $IMG 0 81:$isosects 81:$ROOTSECTS 81:$USRSECTS
|
||||
fi
|
||||
fi
|
||||
|
||||
# Clean up: RELEASEDIR no longer needed
|
||||
rm -r $RELEASEDIR
|
||||
|
||||
echo "${ZIP}ping $IMG"
|
||||
$ZIP -f $IMG
|
||||
|
||||
if [ "$FILENAMEOUT" ]
|
||||
then echo "$IMG" >$FILENAMEOUT
|
||||
fi
|
||||
|
||||
echo " * Freeing up memory used by ramdisks"
|
||||
ramdisk 1 $TMPDISKROOT
|
||||
ramdisk 1 $TMPDISKUSR
|
||||
@@ -1,58 +0,0 @@
|
||||
Welcome to MINIX 3.
|
||||
|
||||
MINIX 3 Copyright 2009, 2006, 1997, 1987 Vrije Universiteit
|
||||
All rights reserved.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
SYSTEM REQUIREMENTS:
|
||||
|
||||
Below is a list of minimum system requirements to install MINIX 3.
|
||||
|
||||
HARDWARE
|
||||
*MINIX 3 OS requires the following hardware:
|
||||
- PC with a Pentium or compatible processor
|
||||
- at least 200 MB of free disk space
|
||||
- IDE CD-ROM drive
|
||||
- IDE hard disk
|
||||
- NOT SUPPORTED: USB and SCSI disks; Some Serial ATA disks work.
|
||||
|
||||
SOFTWARE
|
||||
|
||||
* This is a live CD-ROM. You can insert it into your computer and boot
|
||||
from it. MINIX 3 will start automatically and you can log in as root.
|
||||
It does NOT require Windows, Linux, or any other operating system as
|
||||
it is self contained. However, to use it effectively, you must
|
||||
install it on your hard disk. Detailed installation instructions are
|
||||
given on the MINIX 3 website: http://www.minix3.org. Please be sure
|
||||
to read these instructions before attempting to install MINIX 3 as you
|
||||
must partition your hard disk before starting and this subject is
|
||||
discussed on the website. Disk partitioning must be done very
|
||||
carefully to prevent data loss. Please have a printed copy of the
|
||||
installation instructions available while you are doing the installation,
|
||||
as it will be very helpful to you then.
|
||||
|
||||
|
||||
WARNING
|
||||
* MINIX 3 is an operating system and will overwrite all the data in the
|
||||
partition in which it is installed. Be sure to back up all your files
|
||||
before installing it.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
CD CONTENTS:
|
||||
|
||||
This CD contains:
|
||||
|
||||
- README.TXT This file
|
||||
|
||||
There are also many invisible files used for installing MINIX 3.
|
||||
|
||||
------------------------------------------------------------------------
|
||||
|
||||
PRODUCT SUPPORT:
|
||||
|
||||
For further technical information about the MINIX software on this CD,
|
||||
visit the official MINIX website at
|
||||
|
||||
http://www.minix3.org
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# tellconfig - Tell the value of a <minix/config.h> parameter
|
||||
# Author: Kees J. Bot
|
||||
|
||||
echo "
|
||||
#include \"../include/minix/config.h\"
|
||||
$*
|
||||
" >/tmp/tell.$$
|
||||
exec </tmp/tell.$$
|
||||
rm /tmp/tell.$$
|
||||
|
||||
exec clang -P -E -
|
||||
Reference in New Issue
Block a user