playstation2 support
This commit is contained in:
parent
9138cb0511
commit
0cbd019fc3
32
distrib/playstation2/Makefile
Normal file
32
distrib/playstation2/Makefile
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# $NetBSD: Makefile,v 1.1 2001/10/15 16:22:50 uch Exp $
|
||||||
|
|
||||||
|
.include "../Makefile.inc"
|
||||||
|
|
||||||
|
.include <bsd.own.mk>
|
||||||
|
.include <bsd.obj.mk>
|
||||||
|
.include <bsd.kernobj.mk>
|
||||||
|
|
||||||
|
SUBDIR=
|
||||||
|
|
||||||
|
ITARGET= ${RELEASEDIR}/installation
|
||||||
|
IINST= ${INSTALL} ${RENAME} ${PRESERVE} ${COPY} \
|
||||||
|
-o ${BINOWN} -g ${BINGRP} -m ${NONBINMODE}
|
||||||
|
|
||||||
|
.ifndef RELEASEDIR
|
||||||
|
release:
|
||||||
|
@echo setenv RELEASEDIR first
|
||||||
|
@false
|
||||||
|
.else
|
||||||
|
MINIROOTDIR = ${.CURDIR}/../miniroot
|
||||||
|
MINIROOTOBJ != cd ${MINIROOTDIR}; ${MAKE} print-objdir
|
||||||
|
|
||||||
|
release:
|
||||||
|
rm -f netbsd netbsd.gz
|
||||||
|
cp ${KERNOBJDIR}/RAMDISK/netbsd .
|
||||||
|
mdsetimage netbsd ${MINIROOTOBJ}/miniroot.fs
|
||||||
|
gzip -9 netbsd
|
||||||
|
${IINST} netbsd.gz ${ITARGET}/.
|
||||||
|
${.CURDIR}/../sets/makesums -t ${ITARGET} '*.gz'
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.include <bsd.subdir.mk>
|
4
distrib/playstation2/Makefile.inc
Normal file
4
distrib/playstation2/Makefile.inc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# $NetBSD: Makefile.inc,v 1.1 2001/10/15 16:22:50 uch Exp $
|
||||||
|
|
||||||
|
REV!=sh ${.CURDIR}/../../../sys/conf/osrelease.sh -s
|
||||||
|
VER!=sh ${.CURDIR}/../../../sys/conf/osrelease.sh
|
4
distrib/playstation2/miniroot/Makefile.inc
Normal file
4
distrib/playstation2/miniroot/Makefile.inc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# $NetBSD: Makefile.inc,v 1.1 2001/10/15 16:22:50 uch Exp $
|
||||||
|
|
||||||
|
VND=vnd0d
|
||||||
|
IMAGESIZE=10240
|
74
distrib/playstation2/miniroot/dot.profile
Normal file
74
distrib/playstation2/miniroot/dot.profile
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
# $NetBSD: dot.profile,v 1.1 2001/10/15 16:22:50 uch Exp $
|
||||||
|
#
|
||||||
|
# Copyright (c) 1997 Perry E. Metzger
|
||||||
|
# Copyright (c) 1994 Christopher G. Demetriou
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
# 3. All advertising materials mentioning features or use of this software
|
||||||
|
# must display the following acknowledgement:
|
||||||
|
# This product includes software developed for the
|
||||||
|
# NetBSD Project. See http://www.netbsd.org/ for
|
||||||
|
# information about NetBSD.
|
||||||
|
# 4. The name of the author may not be used to endorse or promote products
|
||||||
|
# derived from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# 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 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.
|
||||||
|
#
|
||||||
|
# <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>>
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/bin:/usr/sbin:/
|
||||||
|
export PATH
|
||||||
|
TERM=vt100
|
||||||
|
export TERM
|
||||||
|
HOME=/
|
||||||
|
export HOME
|
||||||
|
BLOCKSIZE=1k
|
||||||
|
export BLOCKSIZE
|
||||||
|
EDITOR=ed
|
||||||
|
export EDITOR
|
||||||
|
|
||||||
|
umask 022
|
||||||
|
|
||||||
|
ROOTDEV=/dev/md0a
|
||||||
|
|
||||||
|
if [ "X${DONEPROFILE}" = "X" ]; then
|
||||||
|
DONEPROFILE=YES
|
||||||
|
export DONEPROFILE
|
||||||
|
|
||||||
|
# set up some sane defaults
|
||||||
|
echo 'erase ^?, werase ^W, kill ^U, intr ^C'
|
||||||
|
stty newcrt werase ^W intr ^C kill ^U erase ^? 9600
|
||||||
|
echo ''
|
||||||
|
|
||||||
|
# mount the ramdisk read write
|
||||||
|
mount -u $ROOTDEV /
|
||||||
|
|
||||||
|
# mount the kern_fs so that we can examine the dmesg state
|
||||||
|
mount -t kernfs /kern /kern
|
||||||
|
|
||||||
|
# pull in the functions that people will use from the shell prompt.
|
||||||
|
# . /.commonutils
|
||||||
|
# . /.instutils
|
||||||
|
dmesg() cat /kern/msgbuf
|
||||||
|
grep() sed -n "/$1/p"
|
||||||
|
|
||||||
|
# run the installation or upgrade script.
|
||||||
|
sysinst
|
||||||
|
fi
|
100
distrib/playstation2/miniroot/list
Normal file
100
distrib/playstation2/miniroot/list
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
# $NetBSD: list,v 1.1 2001/10/15 16:22:50 uch Exp $
|
||||||
|
|
||||||
|
# playstation2 extra's: mountpoint for kernfs
|
||||||
|
SPECIAL mkdir kern
|
||||||
|
|
||||||
|
# extras in bin
|
||||||
|
LINK instbin bin/csh
|
||||||
|
LINK instbin bin/date
|
||||||
|
LINK instbin bin/rcp
|
||||||
|
LINK instbin bin/rcmd
|
||||||
|
|
||||||
|
# extras in sbin
|
||||||
|
LINK instbin sbin/disklabel
|
||||||
|
LINK instbin sbin/fdisk
|
||||||
|
LINK instbin sbin/mount_ext2fs
|
||||||
|
LINK instbin sbin/fsck_ext2fs
|
||||||
|
LINK instbin sbin/mount_kernfs
|
||||||
|
LINK instbin sbin/mount_msdos
|
||||||
|
|
||||||
|
# extras in /usr.bin
|
||||||
|
SYMLINK ../../instbin usr/bin/netstat
|
||||||
|
SYMLINK ../../instbin usr/bin/rsh
|
||||||
|
SYMLINK ../../instbin usr/bin/tset usr/bin/reset
|
||||||
|
SYMLINK ../../instbin usr/bin/vi
|
||||||
|
|
||||||
|
# OK, now do everything in /usr all over all again in usr.install,
|
||||||
|
# in case we try and install directly into the miniroot (mounting over /usr).
|
||||||
|
|
||||||
|
# local usr.bin
|
||||||
|
SPECIAL mkdir usr.install
|
||||||
|
SPECIAL mkdir usr.install/bin
|
||||||
|
SPECIAL mkdir usr.install/sbin
|
||||||
|
|
||||||
|
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/chflags
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/chgrp
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/ftp
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/gunzip
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/gzcat
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/gzip
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/netstat
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/sort
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/tar
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/tip
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/bin/vi
|
||||||
|
|
||||||
|
# local usr.sbin
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/sbin/chroot
|
||||||
|
SPECIAL ln -s ../../instbin usr.install/sbin/chown
|
||||||
|
|
||||||
|
|
||||||
|
# crunchgen source directory specials: progs built in nonstandard places
|
||||||
|
CRUNCHSPECIAL vi srcdir usr.bin/vi/build
|
||||||
|
CRUNCHSPECIAL sysinst srcdir distrib/utils/sysinst/arch/playstation2
|
||||||
|
|
||||||
|
|
||||||
|
# Minimize use of MFS
|
||||||
|
SYMLINK /tmp var/tmp
|
||||||
|
|
||||||
|
# copy the MAKEDEV script and make some devices
|
||||||
|
COPY ${DESTDIR}/dev/MAKEDEV dev/MAKEDEV
|
||||||
|
COPY ${DESTDIR}/dev/MAKEDEV.local dev/MAKEDEV.local
|
||||||
|
SPECIAL cd dev; sh MAKEDEV all
|
||||||
|
SPECIAL /bin/rm dev/MAKEDEV dev/MAKEDEV.local
|
||||||
|
|
||||||
|
# we need the contents of /usr/mdec
|
||||||
|
COPYDIR ${DESTDIR}/usr/mdec /usr/mdec
|
||||||
|
|
||||||
|
|
||||||
|
# the zoneinfo (dont use)
|
||||||
|
#COPYDIR ${DESTDIR}/usr/share/zoneinfo usr/share/zoneinfo
|
||||||
|
|
||||||
|
# and the termcap file
|
||||||
|
COPY ${CURDIR}/../playstation2/miniroot/termcap.vt100 usr/share/misc/termcap
|
||||||
|
|
||||||
|
# copy the kernel(s)
|
||||||
|
#COPY ${CURDIR}/../../sys/arch/playstation2/compile/GENERIC/netbsd netbsd
|
||||||
|
|
||||||
|
|
||||||
|
# various files that we need in /etc for the install
|
||||||
|
#COPY ${DESTDIR}/etc/disktab etc/disktab.shadow
|
||||||
|
COPY ${DESTDIR}/etc/spwd.db etc/spwd.db
|
||||||
|
LINK etc/spwd.db etc/pwd.db
|
||||||
|
#SYMLINK /tmp/disktab.shadow etc/disktab
|
||||||
|
#SYMLINK /tmp/fstab.shadow etc/fstab
|
||||||
|
#SYMLINK /tmp/resolv.conf.shadow etc/resolv.conf
|
||||||
|
#SYMLINK /tmp/hosts etc/hosts
|
||||||
|
|
||||||
|
# sysinst needs disktab template
|
||||||
|
COPY ${DESTDIR}/etc/disktab etc/disktab.preinstall
|
||||||
|
|
||||||
|
# and the installation tools
|
||||||
|
COPY ${ARCHDIR}/dot.profile .profile
|
||||||
|
LINK instbin sbin/sysinst
|
||||||
|
|
||||||
|
# and a spare .profile
|
||||||
|
COPY ${DESTDIR}/.profile tmp/.hdprofile
|
||||||
|
|
||||||
|
#the lists of obsolete files used by sysinst
|
||||||
|
SPECIAL sh ${CURDIR}/../../distrib/sets/makeobsolete -b -s ${CURDIR}/../../distrib/sets -t ./dist
|
29
distrib/playstation2/miniroot/termcap.vt100
Normal file
29
distrib/playstation2/miniroot/termcap.vt100
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# $NetBSD: termcap.vt100,v 1.1 2001/10/15 16:22:50 uch Exp $
|
||||||
|
#
|
||||||
|
# termcap for vt100 console(wscons)
|
||||||
|
# From:
|
||||||
|
######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE
|
||||||
|
#
|
||||||
|
# Version 9.13.25
|
||||||
|
# termcap syntax
|
||||||
|
#
|
||||||
|
# Eric S. Raymond (current maintainer)
|
||||||
|
# John Kunze, Berkeley
|
||||||
|
# Craig Leres, Berkeley
|
||||||
|
#
|
||||||
|
vt100|vt100-am|dec vt100 (w/advanced video):\
|
||||||
|
:am:bs:ms:xn:xo:\
|
||||||
|
:co#80:it#8:li#24:vt#3:\
|
||||||
|
:@8=\EOM:DO=\E[%dB:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:\
|
||||||
|
:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:\
|
||||||
|
:ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:\
|
||||||
|
:ae=\E(B:as=\E(0:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:\
|
||||||
|
:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:do=^J:\
|
||||||
|
:eA=\E(B:ho=\E[H:k0=\EOy:k1=\EOP:k2=\EOQ:k3=\EOR:\
|
||||||
|
:k4=\EOS:k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:\
|
||||||
|
:kb=^H:kd=\EOB:ke=\E[?1l\E>:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:\
|
||||||
|
:ku=\EOA:le=^H:mb=\E[5m:md=\E[1m:me=\E[m\017:mr=\E[7m:\
|
||||||
|
:nd=\E[C:r2=\E>\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:rc=\E8:\
|
||||||
|
:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;:\
|
||||||
|
:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:ue=\E[m:\
|
||||||
|
:up=\E[A:us=\E[4m:
|
2
distrib/sets/lists/base/md.playstation2
Normal file
2
distrib/sets/lists/base/md.playstation2
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# $NetBSD: md.playstation2,v 1.1 2001/10/15 16:22:51 uch Exp $
|
||||||
|
./sbin/fdisk base-sysutil-root
|
51
distrib/sets/lists/comp/md.playstation2
Normal file
51
distrib/sets/lists/comp/md.playstation2
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
# $NetBSD: md.playstation2,v 1.1 2001/10/15 16:22:51 uch Exp $
|
||||||
|
./usr/include/playstation2 comp-c-include
|
||||||
|
./usr/include/playstation2/_G_config.h comp-c-include
|
||||||
|
./usr/include/playstation2/ansi.h comp-c-include
|
||||||
|
./usr/include/playstation2/aout_machdep.h comp-c-include
|
||||||
|
./usr/include/playstation2/asm.h comp-c-include
|
||||||
|
./usr/include/playstation2/bswap.h comp-c-include
|
||||||
|
./usr/include/playstation2/cdefs.h comp-c-include
|
||||||
|
./usr/include/playstation2/cpu.h comp-c-include
|
||||||
|
./usr/include/playstation2/db_machdep.h comp-c-include
|
||||||
|
./usr/include/playstation2/disklabel.h comp-c-include
|
||||||
|
./usr/include/playstation2/ecoff_machdep.h comp-c-include
|
||||||
|
./usr/include/playstation2/elf_machdep.h comp-c-include
|
||||||
|
./usr/include/playstation2/endian.h comp-c-include
|
||||||
|
./usr/include/playstation2/endian_machdep.h comp-c-include
|
||||||
|
./usr/include/playstation2/float.h comp-c-include
|
||||||
|
./usr/include/playstation2/ieee.h comp-c-include
|
||||||
|
./usr/include/playstation2/ieeefp.h comp-c-include
|
||||||
|
./usr/include/playstation2/int_const.h comp-c-include
|
||||||
|
./usr/include/playstation2/int_fmtio.h comp-c-include
|
||||||
|
./usr/include/playstation2/int_limits.h comp-c-include
|
||||||
|
./usr/include/playstation2/int_mwgwtypes.h comp-c-include
|
||||||
|
./usr/include/playstation2/int_types.h comp-c-include
|
||||||
|
./usr/include/playstation2/intr.h comp-c-include
|
||||||
|
./usr/include/playstation2/kcore.h comp-c-include
|
||||||
|
./usr/include/playstation2/kdbparam.h comp-c-include
|
||||||
|
./usr/include/playstation2/limits.h comp-c-include
|
||||||
|
./usr/include/playstation2/lock.h comp-c-include
|
||||||
|
./usr/include/playstation2/locore.h comp-c-include
|
||||||
|
./usr/include/playstation2/math.h comp-c-include
|
||||||
|
./usr/include/playstation2/mips_opcode.h comp-c-include
|
||||||
|
./usr/include/playstation2/param.h comp-c-include
|
||||||
|
./usr/include/playstation2/pcb.h comp-c-include
|
||||||
|
./usr/include/playstation2/pmap.h comp-c-include
|
||||||
|
./usr/include/playstation2/proc.h comp-c-include
|
||||||
|
./usr/include/playstation2/profile.h comp-c-include
|
||||||
|
./usr/include/playstation2/psl.h comp-c-include
|
||||||
|
./usr/include/playstation2/pte.h comp-c-include
|
||||||
|
./usr/include/playstation2/ptrace.h comp-c-include
|
||||||
|
./usr/include/playstation2/reg.h comp-c-include
|
||||||
|
./usr/include/playstation2/regdef.h comp-c-include
|
||||||
|
./usr/include/playstation2/regnum.h comp-c-include
|
||||||
|
./usr/include/playstation2/reloc.h comp-c-include
|
||||||
|
./usr/include/playstation2/setjmp.h comp-c-include
|
||||||
|
./usr/include/playstation2/signal.h comp-c-include
|
||||||
|
./usr/include/playstation2/stdarg.h comp-c-include
|
||||||
|
./usr/include/playstation2/trap.h comp-c-include
|
||||||
|
./usr/include/playstation2/types.h comp-c-include
|
||||||
|
./usr/include/playstation2/varargs.h comp-c-include
|
||||||
|
./usr/include/playstation2/vmparam.h comp-c-include
|
||||||
|
./usr/include/ieeefp.h comp-c-include
|
2
distrib/sets/lists/etc/md.playstation2
Normal file
2
distrib/sets/lists/etc/md.playstation2
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# $NetBSD: md.playstation2,v 1.1 2001/10/15 16:22:51 uch Exp $
|
||||||
|
./etc/fstab.wd etc-sys-etc
|
16
distrib/utils/sysinst/arch/playstation2/Makefile
Normal file
16
distrib/utils/sysinst/arch/playstation2/Makefile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# $NetBSD: Makefile,v 1.1 2001/10/15 16:22:51 uch Exp $
|
||||||
|
#
|
||||||
|
# Makefile for playstation2
|
||||||
|
#
|
||||||
|
|
||||||
|
# have to have all of them here for crunch ...
|
||||||
|
|
||||||
|
SRCS= menu_defs.c msg_defs.c main.c install.c upgrade.c \
|
||||||
|
txtwalk.c run.c factor.c net.c disks.c disks_lfs.c util.c geom.c \
|
||||||
|
label.c target.c md.c mbr.c mbr_buf.s
|
||||||
|
|
||||||
|
fdisk.o md.o: menu_defs.h msg_defs.h
|
||||||
|
|
||||||
|
CPPFLAGS+=-DINET6
|
||||||
|
|
||||||
|
.include "../../Makefile.inc"
|
6
distrib/utils/sysinst/arch/playstation2/mbr_buf.s
Normal file
6
distrib/utils/sysinst/arch/playstation2/mbr_buf.s
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
.abicalls
|
||||||
|
.bss
|
||||||
|
.align 2
|
||||||
|
.space 2
|
||||||
|
.globl mbr
|
||||||
|
mbr: .space 512
|
682
distrib/utils/sysinst/arch/playstation2/md.c
Normal file
682
distrib/utils/sysinst/arch/playstation2/md.c
Normal file
@ -0,0 +1,682 @@
|
|||||||
|
/* $NetBSD: md.c,v 1.1 2001/10/15 16:22:52 uch Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 1997 Piermont Information Systems Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* This product includes software developed for the NetBSD Project by
|
||||||
|
* Piermont Information Systems Inc.
|
||||||
|
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||||
|
* or promote products derived from this software without specific prior
|
||||||
|
* written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``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 PIERMONT INFORMATION SYSTEMS INC. 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* md.c -- Machine specific code for i386 */
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <util.h>
|
||||||
|
#include <sys/param.h>
|
||||||
|
#include <machine/cpu.h>
|
||||||
|
#include <sys/sysctl.h>
|
||||||
|
#include "defs.h"
|
||||||
|
#include "md.h"
|
||||||
|
#include "msg_defs.h"
|
||||||
|
#include "menu_defs.h"
|
||||||
|
#if !defined(__i386__)
|
||||||
|
#include "endian.h"
|
||||||
|
#include "mbr.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
char mbr[512];
|
||||||
|
#else
|
||||||
|
extern char mbr[512];
|
||||||
|
#endif
|
||||||
|
int mbr_present, mbr_len;
|
||||||
|
int c1024_resp;
|
||||||
|
struct disklist *disklist = NULL;
|
||||||
|
struct nativedisk_info *nativedisk;
|
||||||
|
struct biosdisk_info *biosdisk = NULL;
|
||||||
|
int netbsd_mbr_installed = 0;
|
||||||
|
int netbsd_bootsel_installed = 0;
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
static int md_read_bootcode (char *, char *, size_t);
|
||||||
|
static int count_mbr_parts (struct mbr_partition *);
|
||||||
|
static int mbr_part_above_chs (struct mbr_partition *);
|
||||||
|
static int mbr_partstart_above_chs (struct mbr_partition *);
|
||||||
|
static void configure_bootsel (void);
|
||||||
|
#endif
|
||||||
|
static void md_upgrade_mbrtype (void);
|
||||||
|
|
||||||
|
struct mbr_bootsel *mbs;
|
||||||
|
int defbootselpart, defbootseldisk;
|
||||||
|
|
||||||
|
|
||||||
|
/* prototypes */
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
md_get_info()
|
||||||
|
{
|
||||||
|
read_mbr(diskdev, mbr, sizeof mbr);
|
||||||
|
if (!valid_mbr(mbr)) {
|
||||||
|
memset(&mbr[MBR_PARTOFF], 0,
|
||||||
|
NMBRPART * sizeof (struct mbr_partition));
|
||||||
|
/* XXX check result and give up if < 0 */
|
||||||
|
#ifdef __i386__
|
||||||
|
mbr_len = md_read_bootcode(_PATH_MBR, mbr, sizeof mbr);
|
||||||
|
#else
|
||||||
|
*((u_int16_t *)&mbr[MBR_MAGICOFF]) = le_to_native16(MBR_MAGIC);
|
||||||
|
#endif
|
||||||
|
netbsd_mbr_installed = 1;
|
||||||
|
} else
|
||||||
|
mbr_len = MBR_SECSIZE;
|
||||||
|
md_bios_info(diskdev);
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
edit:
|
||||||
|
#endif
|
||||||
|
edit_mbr((struct mbr_partition *)&mbr[MBR_PARTOFF]);
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
if (mbr_part_above_chs(part) &&
|
||||||
|
(biosdisk == NULL || !(biosdisk->bi_flags & BIFLAG_EXTINT13))) {
|
||||||
|
msg_display(MSG_partabovechs);
|
||||||
|
process_menu(MENU_noyes);
|
||||||
|
if (!yesno)
|
||||||
|
goto edit;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
if (count_mbr_parts(part) > 1) {
|
||||||
|
msg_display(MSG_installbootsel);
|
||||||
|
process_menu(MENU_yesno);
|
||||||
|
if (yesno) {
|
||||||
|
mbr_len =
|
||||||
|
md_read_bootcode(_PATH_BOOTSEL, mbr, sizeof mbr);
|
||||||
|
configure_bootsel();
|
||||||
|
netbsd_mbr_installed = netbsd_bootsel_installed = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mbr_partstart_above_chs(part) && !netbsd_mbr_installed) {
|
||||||
|
msg_display(MSG_installmbr);
|
||||||
|
process_menu(MENU_yesno);
|
||||||
|
if (yesno) {
|
||||||
|
mbr_len = md_read_bootcode(_PATH_MBR, mbr, sizeof mbr);
|
||||||
|
netbsd_mbr_installed = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
/* Compute minimum NetBSD partition sizes (in sectors). */
|
||||||
|
minfsdmb = STDNEEDMB * (MEG / sectorsize);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
/*
|
||||||
|
* Read MBR code from a file. It may be a maximum of "len" bytes
|
||||||
|
* long. This function skips the partition table. Space for this
|
||||||
|
* is assumed to be in the file, but a table already in the buffer
|
||||||
|
* is not overwritten.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
md_read_bootcode(path, buf, len)
|
||||||
|
char *path, *buf;
|
||||||
|
size_t len;
|
||||||
|
{
|
||||||
|
int fd, cc;
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
|
fd = open(path, O_RDONLY);
|
||||||
|
if (fd < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (fstat(fd, &st) < 0 || st.st_size > len || st.st_size < MBR_SECSIZE){
|
||||||
|
close(fd);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (read(fd, buf, MBR_PARTOFF) != MBR_PARTOFF) {
|
||||||
|
close(fd);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (lseek(fd, MBR_MAGICOFF, SEEK_SET) < 0) {
|
||||||
|
close(fd);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
cc = read(fd, &buf[MBR_MAGICOFF], st.st_size - MBR_MAGICOFF);
|
||||||
|
|
||||||
|
close(fd);
|
||||||
|
|
||||||
|
return (cc + MBR_MAGICOFF);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
md_pre_disklabel()
|
||||||
|
{
|
||||||
|
msg_display(MSG_dofdisk);
|
||||||
|
|
||||||
|
/* write edited MBR onto disk. */
|
||||||
|
if (write_mbr(diskdev, mbr, sizeof mbr, 1) != 0) {
|
||||||
|
msg_display(MSG_wmbrfail);
|
||||||
|
process_menu(MENU_ok);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
md_upgrade_mbrtype();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
md_post_disklabel(void)
|
||||||
|
{
|
||||||
|
/* Sector forwarding / badblocks ... */
|
||||||
|
if (*doessf) {
|
||||||
|
msg_display(MSG_dobad144);
|
||||||
|
return run_prog(RUN_DISPLAY, NULL, "/usr/sbin/bad144 %s 0",
|
||||||
|
diskdev);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
md_post_newfs(void)
|
||||||
|
{
|
||||||
|
#if !defined(__i386__)
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
/* boot blocks ... */
|
||||||
|
msg_display(MSG_dobootblks, diskdev);
|
||||||
|
return run_prog(RUN_DISPLAY, NULL,
|
||||||
|
"/usr/mdec/installboot -v /usr/mdec/biosboot.sym /dev/r%sa",
|
||||||
|
diskdev);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
md_copy_filesystem(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
md_make_bsd_partitions(void)
|
||||||
|
{
|
||||||
|
FILE *f;
|
||||||
|
int i;
|
||||||
|
int part;
|
||||||
|
int maxpart = getmaxpartitions();
|
||||||
|
int remain;
|
||||||
|
|
||||||
|
/* Ask for layout type -- standard or special */
|
||||||
|
msg_display(MSG_layout,
|
||||||
|
(1.0*fsptsize*sectorsize)/MEG,
|
||||||
|
(1.0*minfsdmb*sectorsize)/MEG,
|
||||||
|
(1.0*minfsdmb*sectorsize)/MEG+rammb+XNEEDMB);
|
||||||
|
process_menu(MENU_layout);
|
||||||
|
|
||||||
|
if (layoutkind == 3) {
|
||||||
|
ask_sizemult(dlcylsize);
|
||||||
|
} else {
|
||||||
|
sizemult = MEG / sectorsize;
|
||||||
|
multname = msg_string(MSG_megname);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Build standard partitions */
|
||||||
|
emptylabel(bsdlabel);
|
||||||
|
|
||||||
|
/* Partitions C and D are predefined. */
|
||||||
|
bsdlabel[C].pi_fstype = FS_UNUSED;
|
||||||
|
bsdlabel[C].pi_offset = ptstart;
|
||||||
|
bsdlabel[C].pi_size = fsptsize;
|
||||||
|
|
||||||
|
bsdlabel[D].pi_fstype = FS_UNUSED;
|
||||||
|
bsdlabel[D].pi_offset = 0;
|
||||||
|
bsdlabel[D].pi_size = fsdsize;
|
||||||
|
|
||||||
|
/* Standard fstypes */
|
||||||
|
bsdlabel[A].pi_fstype = FS_BSDFFS;
|
||||||
|
bsdlabel[B].pi_fstype = FS_SWAP;
|
||||||
|
bsdlabel[E].pi_fstype = FS_UNUSED;
|
||||||
|
bsdlabel[F].pi_fstype = FS_UNUSED;
|
||||||
|
bsdlabel[G].pi_fstype = FS_UNUSED;
|
||||||
|
bsdlabel[H].pi_fstype = FS_UNUSED;
|
||||||
|
|
||||||
|
switch (layoutkind) {
|
||||||
|
case 1: /* standard: a root, b swap, c/d "unused", e /usr */
|
||||||
|
case 2: /* standard X: a root, b swap (big), c/d "unused", e /usr */
|
||||||
|
partstart = ptstart;
|
||||||
|
|
||||||
|
/* check that we have enouth space */
|
||||||
|
i = NUMSEC(20+2*rammb, MEG/sectorsize, dlcylsize);
|
||||||
|
i += NUMSEC(layoutkind * 2 * (rammb < 16 ? 16 : rammb),
|
||||||
|
MEG/sectorsize, dlcylsize);
|
||||||
|
if ( i > fsptsize) {
|
||||||
|
msg_display(MSG_disktoosmall);
|
||||||
|
process_menu(MENU_ok);
|
||||||
|
goto custom;
|
||||||
|
}
|
||||||
|
/* Root */
|
||||||
|
i = NUMSEC(20+2*rammb, MEG/sectorsize, dlcylsize) + partstart;
|
||||||
|
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
|
||||||
|
dlcylsize) - partstart;
|
||||||
|
bsdlabel[A].pi_offset = partstart;
|
||||||
|
bsdlabel[A].pi_size = partsize;
|
||||||
|
bsdlabel[A].pi_bsize = 8192;
|
||||||
|
bsdlabel[A].pi_fsize = 1024;
|
||||||
|
strcpy (fsmount[A], "/");
|
||||||
|
partstart += partsize;
|
||||||
|
|
||||||
|
/* swap */
|
||||||
|
i = NUMSEC(layoutkind * 2 * (rammb < 16 ? 16 : rammb),
|
||||||
|
MEG/sectorsize, dlcylsize) + partstart;
|
||||||
|
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
|
||||||
|
dlcylsize) - partstart;
|
||||||
|
bsdlabel[B].pi_offset = partstart;
|
||||||
|
bsdlabel[B].pi_size = partsize;
|
||||||
|
partstart += partsize;
|
||||||
|
|
||||||
|
/* /usr */
|
||||||
|
partsize = fsptsize - (partstart - ptstart);
|
||||||
|
bsdlabel[E].pi_fstype = FS_BSDFFS;
|
||||||
|
bsdlabel[E].pi_offset = partstart;
|
||||||
|
bsdlabel[E].pi_size = partsize;
|
||||||
|
bsdlabel[E].pi_bsize = 8192;
|
||||||
|
bsdlabel[E].pi_fsize = 1024;
|
||||||
|
strcpy (fsmount[E], "/usr");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 3: /* custom: ask user for all sizes */
|
||||||
|
custom: ask_sizemult(dlcylsize);
|
||||||
|
msg_display(MSG_defaultunit, multname);
|
||||||
|
partstart = ptstart;
|
||||||
|
remain = fsptsize;
|
||||||
|
|
||||||
|
/* root */
|
||||||
|
i = NUMSEC(20+2*rammb, MEG/sectorsize, dlcylsize) + partstart;
|
||||||
|
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
|
||||||
|
dlcylsize) - partstart;
|
||||||
|
if (partsize > remain)
|
||||||
|
partsize = remain;
|
||||||
|
msg_display_add(MSG_askfsroot1, remain/sizemult, multname);
|
||||||
|
partsize = getpartsize(MSG_askfsroot2, partstart, partsize);
|
||||||
|
bsdlabel[A].pi_offset = partstart;
|
||||||
|
bsdlabel[A].pi_size = partsize;
|
||||||
|
bsdlabel[A].pi_bsize = 8192;
|
||||||
|
bsdlabel[A].pi_fsize = 1024;
|
||||||
|
strcpy (fsmount[A], "/");
|
||||||
|
partstart += partsize;
|
||||||
|
remain -= partsize;
|
||||||
|
|
||||||
|
/* swap */
|
||||||
|
i = NUMSEC( 2 * (rammb < 16 ? 16 : rammb),
|
||||||
|
MEG/sectorsize, dlcylsize) + partstart;
|
||||||
|
partsize = NUMSEC (i/(MEG/sectorsize)+1, MEG/sectorsize,
|
||||||
|
dlcylsize) - partstart;
|
||||||
|
if (partsize > remain)
|
||||||
|
partsize = remain;
|
||||||
|
msg_display(MSG_askfsswap1, remain/sizemult, multname);
|
||||||
|
partsize = getpartsize(MSG_askfsswap2, partstart, partsize);
|
||||||
|
bsdlabel[B].pi_offset = partstart;
|
||||||
|
bsdlabel[B].pi_size = partsize;
|
||||||
|
partstart += partsize;
|
||||||
|
remain -= partsize;
|
||||||
|
|
||||||
|
/* Others E, F, G, H */
|
||||||
|
part = E;
|
||||||
|
if (remain > 0)
|
||||||
|
msg_display (MSG_otherparts);
|
||||||
|
while (remain > 0 && part <= H) {
|
||||||
|
msg_display_add(MSG_askfspart1, diskdev,
|
||||||
|
partition_name(part), remain/sizemult, multname);
|
||||||
|
partsize = getpartsize(MSG_askfspart2, partstart,
|
||||||
|
remain);
|
||||||
|
if (partsize > 0) {
|
||||||
|
if (remain - partsize < sizemult)
|
||||||
|
partsize = remain;
|
||||||
|
bsdlabel[part].pi_fstype = FS_BSDFFS;
|
||||||
|
bsdlabel[part].pi_offset = partstart;
|
||||||
|
bsdlabel[part].pi_size = partsize;
|
||||||
|
bsdlabel[part].pi_bsize = 8192;
|
||||||
|
bsdlabel[part].pi_fsize = 1024;
|
||||||
|
if (part == E)
|
||||||
|
strcpy (fsmount[E], "/usr");
|
||||||
|
msg_prompt_add (MSG_mountpoint, fsmount[part],
|
||||||
|
fsmount[part], 20);
|
||||||
|
partstart += partsize;
|
||||||
|
remain -= partsize;
|
||||||
|
}
|
||||||
|
part++;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* OK, we have a partition table. Give the user the chance to
|
||||||
|
* edit it and verify it's OK, or abort altogether.
|
||||||
|
*/
|
||||||
|
if (edit_and_check_label(bsdlabel, maxpart, RAW_PART, RAW_PART) == 0) {
|
||||||
|
msg_display(MSG_abort);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
/*
|
||||||
|
* XXX check for int13 extensions.
|
||||||
|
*/
|
||||||
|
if ((bsdlabel[A].pi_offset + bsdlabel[A].pi_size) / bcylsize > 1024 &&
|
||||||
|
(biosdisk == NULL || !(biosdisk->bi_flags & BIFLAG_EXTINT13))) {
|
||||||
|
process_menu(MENU_cyl1024);
|
||||||
|
/* XXX UGH! need arguments to process_menu */
|
||||||
|
switch (c1024_resp) {
|
||||||
|
case 1:
|
||||||
|
edit_mbr((struct mbr_partition *)&mbr[MBR_PARTOFF]);
|
||||||
|
/*FALLTHROUGH*/
|
||||||
|
case 2:
|
||||||
|
goto editlab;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Disk name */
|
||||||
|
msg_prompt (MSG_packname, "mydisk", bsddiskname, DISKNAME_SIZE);
|
||||||
|
|
||||||
|
/* Create the disktab.preinstall */
|
||||||
|
run_prog (0, NULL, "cp /etc/disktab.preinstall /etc/disktab");
|
||||||
|
#ifdef DEBUG
|
||||||
|
f = fopen ("/tmp/disktab", "a");
|
||||||
|
#else
|
||||||
|
f = fopen ("/etc/disktab", "a");
|
||||||
|
#endif
|
||||||
|
if (f == NULL) {
|
||||||
|
endwin();
|
||||||
|
(void) fprintf (stderr, "Could not open /etc/disktab");
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
(void)fprintf (f, "%s|NetBSD installation generated:\\\n", bsddiskname);
|
||||||
|
(void)fprintf (f, "\t:dt=%s:ty=winchester:\\\n", disktype);
|
||||||
|
(void)fprintf (f, "\t:nc#%d:nt#%d:ns#%d:\\\n", dlcyl, dlhead, dlsec);
|
||||||
|
(void)fprintf (f, "\t:sc#%d:su#%d:\\\n", dlhead*dlsec, dlsize);
|
||||||
|
(void)fprintf (f, "\t:se#%d:%s\\\n", sectorsize, doessf);
|
||||||
|
for (i=0; i<8; i++) {
|
||||||
|
(void)fprintf (f, "\t:p%c#%d:o%c#%d:t%c=%s:",
|
||||||
|
'a'+i, bsdlabel[i].pi_size,
|
||||||
|
'a'+i, bsdlabel[i].pi_offset,
|
||||||
|
'a'+i, fstypenames[bsdlabel[i].pi_fstype]);
|
||||||
|
if (bsdlabel[i].pi_fstype == FS_BSDFFS)
|
||||||
|
(void)fprintf (f, "b%c#%d:f%c#%d",
|
||||||
|
'a'+i, bsdlabel[i].pi_bsize,
|
||||||
|
'a'+i, bsdlabel[i].pi_fsize);
|
||||||
|
if (i < 7)
|
||||||
|
(void)fprintf (f, "\\\n");
|
||||||
|
else
|
||||||
|
(void)fprintf (f, "\n");
|
||||||
|
}
|
||||||
|
fclose (f);
|
||||||
|
|
||||||
|
/* Everything looks OK. */
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Upgrade support */
|
||||||
|
int
|
||||||
|
md_update(void)
|
||||||
|
{
|
||||||
|
endwin();
|
||||||
|
md_copy_filesystem();
|
||||||
|
md_post_newfs();
|
||||||
|
md_upgrade_mbrtype();
|
||||||
|
wrefresh(curscr);
|
||||||
|
wmove(stdscr, 0, 0);
|
||||||
|
wclear(stdscr);
|
||||||
|
wrefresh(stdscr);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
md_upgrade_mbrtype()
|
||||||
|
{
|
||||||
|
struct mbr_partition *mbrp;
|
||||||
|
int i, netbsdpart = -1, oldbsdpart = -1, oldbsdcount = 0;
|
||||||
|
|
||||||
|
if (read_mbr(diskdev, mbr, sizeof mbr) < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
mbrp = (struct mbr_partition *)&mbr[MBR_PARTOFF];
|
||||||
|
|
||||||
|
for (i = 0; i < NMBRPART; i++) {
|
||||||
|
if (mbrp[i].mbrp_typ == MBR_PTYPE_386BSD) {
|
||||||
|
oldbsdpart = i;
|
||||||
|
oldbsdcount++;
|
||||||
|
} else if (mbrp[i].mbrp_typ == MBR_PTYPE_NETBSD)
|
||||||
|
netbsdpart = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (netbsdpart == -1 && oldbsdcount == 1) {
|
||||||
|
mbrp[oldbsdpart].mbrp_typ = MBR_PTYPE_NETBSD;
|
||||||
|
write_mbr(diskdev, mbr, sizeof mbr, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
md_cleanup_install(void)
|
||||||
|
{
|
||||||
|
char realfrom[STRSIZE];
|
||||||
|
char realto[STRSIZE];
|
||||||
|
char sedcmd[STRSIZE];
|
||||||
|
|
||||||
|
strncpy(realfrom, target_expand("/etc/rc.conf"), STRSIZE);
|
||||||
|
strncpy(realto, target_expand("/etc/rc.conf.install"), STRSIZE);
|
||||||
|
|
||||||
|
sprintf(sedcmd, "sed 's/rc_configured=NO/rc_configured=YES/' < %s > %s",
|
||||||
|
realfrom, realto);
|
||||||
|
scripting_fprintf(log, "%s\n", sedcmd);
|
||||||
|
do_system(sedcmd);
|
||||||
|
|
||||||
|
run_prog(RUN_FATAL, NULL, "mv -f %s %s", realto, realfrom);
|
||||||
|
run_prog(0, NULL, "rm -f %s", target_expand("/sysinst"));
|
||||||
|
run_prog(0, NULL, "rm -f %s", target_expand("/.termcap"));
|
||||||
|
run_prog(0, NULL, "rm -f %s", target_expand("/.profile"));
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
md_bios_info(dev)
|
||||||
|
char *dev;
|
||||||
|
{
|
||||||
|
#ifdef __i386__
|
||||||
|
int mib[2], i, len;
|
||||||
|
struct biosdisk_info *bip;
|
||||||
|
struct nativedisk_info *nip = NULL, *nat;
|
||||||
|
#endif
|
||||||
|
int cyl, head, sec;
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
if (disklist == NULL) {
|
||||||
|
mib[0] = CTL_MACHDEP;
|
||||||
|
mib[1] = CPU_DISKINFO;
|
||||||
|
if (sysctl(mib, 2, NULL, &len, NULL, 0) < 0)
|
||||||
|
goto nogeom;
|
||||||
|
disklist = (struct disklist *)malloc(len);
|
||||||
|
sysctl(mib, 2, disklist, &len, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
nativedisk = NULL;
|
||||||
|
|
||||||
|
for (i = 0; i < disklist->dl_nnativedisks; i++) {
|
||||||
|
nat = &disklist->dl_nativedisks[i];
|
||||||
|
if (!strcmp(dev, nat->ni_devname)) {
|
||||||
|
nativedisk = nip = nat;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (nip == NULL || nip->ni_nmatches == 0) {
|
||||||
|
nogeom:
|
||||||
|
#endif
|
||||||
|
msg_display(MSG_nobiosgeom, dlcyl, dlhead, dlsec);
|
||||||
|
if (guess_biosgeom_from_mbr(mbr, &cyl, &head, &sec) >= 0) {
|
||||||
|
msg_display_add(MSG_biosguess, cyl, head, sec);
|
||||||
|
set_bios_geom(cyl, head, sec);
|
||||||
|
} else
|
||||||
|
set_bios_geom(dlcyl, dlhead, dlsec);
|
||||||
|
biosdisk = NULL;
|
||||||
|
#ifdef __i386__
|
||||||
|
} else if (nip->ni_nmatches == 1) {
|
||||||
|
bip = &disklist->dl_biosdisks[nip->ni_biosmatches[0]];
|
||||||
|
msg_display(MSG_onebiosmatch);
|
||||||
|
msg_table_add(MSG_onebiosmatch_header);
|
||||||
|
msg_table_add(MSG_onebiosmatch_row, bip->bi_dev - 0x80,
|
||||||
|
bip->bi_cyl, bip->bi_head, bip->bi_sec);
|
||||||
|
process_menu(MENU_biosonematch);
|
||||||
|
} else {
|
||||||
|
msg_display(MSG_biosmultmatch);
|
||||||
|
msg_table_add(MSG_biosmultmatch_header);
|
||||||
|
for (i = 0; i < nip->ni_nmatches; i++) {
|
||||||
|
bip = &disklist->dl_biosdisks[nip->ni_biosmatches[i]];
|
||||||
|
msg_table_add(MSG_biosmultmatch_row, i,
|
||||||
|
bip->bi_dev - 0x80, bip->bi_cyl, bip->bi_head,
|
||||||
|
bip->bi_sec);
|
||||||
|
}
|
||||||
|
process_menu(MENU_biosmultmatch);
|
||||||
|
}
|
||||||
|
if (biosdisk != NULL && (biosdisk->bi_flags & BIFLAG_EXTINT13))
|
||||||
|
bsize = dlsize;
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
bsize = bcyl * bhead * bsec;
|
||||||
|
bcylsize = bhead * bsec;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __i386__
|
||||||
|
static int
|
||||||
|
count_mbr_parts(pt)
|
||||||
|
struct mbr_partition *pt;
|
||||||
|
{
|
||||||
|
int i, count = 0;;
|
||||||
|
|
||||||
|
for (i = 0; i < NMBRPART; i++)
|
||||||
|
if (pt[i].mbrp_typ != 0)
|
||||||
|
count++;
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
mbr_part_above_chs(pt)
|
||||||
|
struct mbr_partition *pt;
|
||||||
|
{
|
||||||
|
return ((pt[bsdpart].mbrp_start + pt[bsdpart].mbrp_size) >=
|
||||||
|
bcyl * bhead * bsec);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
mbr_partstart_above_chs(pt)
|
||||||
|
struct mbr_partition *pt;
|
||||||
|
{
|
||||||
|
return (pt[bsdpart].mbrp_start >= bcyl * bhead * bsec);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
configure_bootsel()
|
||||||
|
{
|
||||||
|
struct mbr_partition *parts =
|
||||||
|
(struct mbr_partition *)&mbr[MBR_PARTOFF];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
|
||||||
|
mbs = (struct mbr_bootsel *)&mbr[MBR_BOOTSELOFF];
|
||||||
|
mbs->flags = BFL_SELACTIVE;
|
||||||
|
|
||||||
|
process_menu(MENU_configbootsel);
|
||||||
|
|
||||||
|
for (i = 0; i < NMBRPART; i++) {
|
||||||
|
if (parts[i].mbrp_typ != 0 &&
|
||||||
|
parts[i].mbrp_start >= (bcyl * bhead * bsec)) {
|
||||||
|
mbs->flags |= BFL_EXTINT13;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
disp_bootsel(part, mbsp)
|
||||||
|
struct mbr_partition *part;
|
||||||
|
struct mbr_bootsel *mbsp;
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
msg_table_add(MSG_bootsel_header);
|
||||||
|
for (i = 0; i < 4; i++) {
|
||||||
|
msg_table_add(MSG_bootsel_row,
|
||||||
|
i, get_partname(i), mbs->nametab[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int
|
||||||
|
md_pre_update()
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
md_init()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
md_set_sizemultname()
|
||||||
|
{
|
||||||
|
|
||||||
|
set_sizemultname_meg();
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
md_set_no_x()
|
||||||
|
{
|
||||||
|
|
||||||
|
toggle_getit (8);
|
||||||
|
toggle_getit (9);
|
||||||
|
toggle_getit (10);
|
||||||
|
toggle_getit (11);
|
||||||
|
toggle_getit (12);
|
||||||
|
toggle_getit (13);
|
||||||
|
}
|
168
distrib/utils/sysinst/arch/playstation2/md.h
Normal file
168
distrib/utils/sysinst/arch/playstation2/md.h
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
/* $NetBSD: md.h,v 1.1 2001/10/15 16:22:52 uch Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 1997 Piermont Information Systems Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* This product includes software developed for the NetBSD Project by
|
||||||
|
* Piermont Information Systems Inc.
|
||||||
|
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||||
|
* or promote products derived from this software without specific prior
|
||||||
|
* written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``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 PIERMONT INFORMATION SYSTEMS INC. 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* md.h -- Machine specific definitions for the i386 */
|
||||||
|
|
||||||
|
|
||||||
|
#include <machine/cpu.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
/* i386 uses the mbr code. */
|
||||||
|
#include "mbr.h"
|
||||||
|
|
||||||
|
/* constants and defines */
|
||||||
|
|
||||||
|
|
||||||
|
#define STDNEEDMB 145 /* Min space for non X install */
|
||||||
|
#define XNEEDMB 39 /* Extra megs for full X installation */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Default filesets to fetch and install during installation
|
||||||
|
* or upgrade. The standard sets are:
|
||||||
|
* base, etc, comp, games, man, misc, text,
|
||||||
|
* xbase, xfont, xserver, xcontrib, xcomp.
|
||||||
|
*
|
||||||
|
* i386 has the MD set kern first, because generic kernels are too
|
||||||
|
* big to fit on install floppies. i386 does not yet include the x sets.
|
||||||
|
*
|
||||||
|
* Third entry is the last extension name in the split sets for loading
|
||||||
|
* from floppy.
|
||||||
|
*/
|
||||||
|
EXTERN distinfo dist_list[]
|
||||||
|
#ifdef MAIN
|
||||||
|
= {
|
||||||
|
{"kern", 1, "ag", "Kernel : "},
|
||||||
|
{"base", 1, "bw", "Base : "},
|
||||||
|
{"etc", 1, "aa", "System (/etc): "},
|
||||||
|
{"comp", 1, "bl", "Compiler : "},
|
||||||
|
{"games", 1, "am", "Games : "},
|
||||||
|
{"man", 1, "ar", "Manuals : "},
|
||||||
|
{"misc", 1, "aj", "Miscellaneous: "},
|
||||||
|
{"text", 1, "af", "Text tools : "},
|
||||||
|
|
||||||
|
/* XXX no X11 on floppies, what sets are they?*/
|
||||||
|
{"xbase", 1, "al", "X11 clients : "},
|
||||||
|
{"xfont", 1, "az", "X11 fonts : "},
|
||||||
|
{"xserver", 1, "cr", "X11 servers : "},
|
||||||
|
{"xcontrib",1, "aa", "X11 contrib : "},
|
||||||
|
{"xcomp", 1, "ah", "X programming: "},
|
||||||
|
{"xmisc", 1, NULL, "X11 Misc. : "},
|
||||||
|
{NULL, 0, NULL, NULL }
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disk names accepted as valid targets for a from-scratch installation.
|
||||||
|
*
|
||||||
|
* On i386, we allow "wd" ST-506/IDE disks and "sd" scsi disks.
|
||||||
|
*/
|
||||||
|
EXTERN char *disk_names[]
|
||||||
|
#ifdef MAIN
|
||||||
|
= {"wd", "sd", NULL}
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Legal start character for a disk for checking input.
|
||||||
|
* this must return 1 for a character that matches the first
|
||||||
|
* characters of each member of disk_names.
|
||||||
|
*
|
||||||
|
* On i386, that means matching 'w' for st-506/ide and 's' for sd.
|
||||||
|
*/
|
||||||
|
#define ISDISKSTART(dn) (dn == 'w' || dn == 's')
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Machine-specific command to write a new label to a disk.
|
||||||
|
* For example, i386 uses "/sbin/disklabel -w -r", just like i386
|
||||||
|
* miniroot scripts, though this may leave a bogus incore label.
|
||||||
|
* Sun ports should probably use DISKLABEL_CMD "/sbin/disklabel -w"
|
||||||
|
* to get incore to ondisk inode translation for the Sun proms.
|
||||||
|
* If not defined, we assume the port does not support disklabels and
|
||||||
|
* hand-edited disklabel will NOT be written by MI code.
|
||||||
|
*
|
||||||
|
* On i386, do what the 1.2 install scripts did.
|
||||||
|
*/
|
||||||
|
#define DISKLABEL_CMD "disklabel -w -r"
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Default fileystem type for floppy disks.
|
||||||
|
* On i386, that is msdos.
|
||||||
|
*/
|
||||||
|
EXTERN char *fdtype INIT("msdos");
|
||||||
|
|
||||||
|
extern struct disklist *disklist;
|
||||||
|
extern struct nativedisk_info *nativedisk;
|
||||||
|
extern struct biosdisk_info *biosdisk;
|
||||||
|
|
||||||
|
#define _PATH_MBR "/usr/mdec/mbr"
|
||||||
|
#define _PATH_BOOTSEL "/usr/mdec/mbr_bootsel"
|
||||||
|
|
||||||
|
struct mbr_bootsel {
|
||||||
|
u_int8_t defkey;
|
||||||
|
u_int8_t flags;
|
||||||
|
u_int16_t timeo;
|
||||||
|
char nametab[4][9];
|
||||||
|
u_int16_t magic;
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
extern struct mbr_bootsel *mbs;
|
||||||
|
|
||||||
|
#define BFL_SELACTIVE 0x01
|
||||||
|
#define BFL_EXTINT13 0x02
|
||||||
|
|
||||||
|
#define SCAN_ENTER 0x1c
|
||||||
|
#define SCAN_F1 0x3b
|
||||||
|
|
||||||
|
#define MBR_BOOTSELOFF (MBR_PARTOFF - sizeof (struct mbr_bootsel))
|
||||||
|
|
||||||
|
extern int defbootselpart, defbootseldisk;
|
||||||
|
|
||||||
|
void disp_bootsel (struct mbr_partition *, struct mbr_bootsel *);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* prototypes for MD code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
332
distrib/utils/sysinst/arch/playstation2/menus.md.en
Normal file
332
distrib/utils/sysinst/arch/playstation2/menus.md.en
Normal file
@ -0,0 +1,332 @@
|
|||||||
|
/* $NetBSD: menus.md.en,v 1.1 2001/10/15 16:22:52 uch Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 1997 Piermont Information Systems Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* This product includes software developed for the NetBSD Project by
|
||||||
|
* Piermont Information Systems Inc.
|
||||||
|
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||||
|
* or promote products derived from this software without specific prior
|
||||||
|
* written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``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 PIERMONT INFORMATION SYSTEMS INC. 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Menu definitions for sysinst. i386 version, machine dependent. */
|
||||||
|
|
||||||
|
menu fullpart, title "Select your choice";
|
||||||
|
option "Use only part of the disk", exit, action {usefull = 0;};
|
||||||
|
option "Use the entire disk", exit, action {usefull = 1;};
|
||||||
|
|
||||||
|
menu wdtype, title "Select type";
|
||||||
|
display action { msg_display (MSG_wdtype, diskdev); };
|
||||||
|
option "IDE", exit;
|
||||||
|
option "ESDI", exit, action
|
||||||
|
{ msg_display (MSG_sectforward);
|
||||||
|
process_menu (MENU_yesno);
|
||||||
|
if (yesno)
|
||||||
|
doessf = "sf:";
|
||||||
|
};
|
||||||
|
option "ST506", exit, action
|
||||||
|
{ msg_display (MSG_sectforward);
|
||||||
|
process_menu (MENU_yesno);
|
||||||
|
if (yesno)
|
||||||
|
doessf = "sf:";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
menu dlgeom, title "Choose an option";
|
||||||
|
display action { msg_display (MSG_dlgeom, diskdev, dlcyl, dlhead,
|
||||||
|
dlsec, disk->dd_cyl, disk->dd_head,
|
||||||
|
disk->dd_sec);
|
||||||
|
};
|
||||||
|
option "Use real geometry", exit, action {
|
||||||
|
dlcyl = disk->dd_cyl;
|
||||||
|
dlhead = disk->dd_head;
|
||||||
|
dlsec = disk->dd_sec;
|
||||||
|
};
|
||||||
|
option "Use disklabel geometry", exit, action {
|
||||||
|
disk->dd_cyl = dlcyl;
|
||||||
|
disk->dd_head = dlhead;
|
||||||
|
disk->dd_sec = dlsec;
|
||||||
|
};
|
||||||
|
|
||||||
|
menu editparttable, title "Choose your partition", exit;
|
||||||
|
display action { msg_display (MSG_editparttable);
|
||||||
|
disp_cur_part((struct mbr_partition *)&mbr[MBR_PARTOFF
|
||||||
|
], activepart,-1);
|
||||||
|
};
|
||||||
|
option "Edit partition 0", sub menu editpart,
|
||||||
|
action { editpart = 0; };
|
||||||
|
option "Edit partition 1", sub menu editpart,
|
||||||
|
action { editpart = 1; };
|
||||||
|
option "Edit partition 2", sub menu editpart,
|
||||||
|
action { editpart = 2; };
|
||||||
|
option "Edit partition 3", sub menu editpart,
|
||||||
|
action { editpart = 3; };
|
||||||
|
option "Reselect size specification",
|
||||||
|
action { reask_sizemult(bcylsize); };
|
||||||
|
|
||||||
|
menu editpart, title "Select to change";
|
||||||
|
display action { msg_display (MSG_editpart, editpart);
|
||||||
|
disp_cur_part((struct mbr_partition *)&mbr[MBR_PARTOFF
|
||||||
|
], activepart,editpart);
|
||||||
|
msg_display_add(MSG_newline);
|
||||||
|
};
|
||||||
|
option "Kind", sub menu chooseid;
|
||||||
|
option "Start and size", action
|
||||||
|
{ char buf[40]; int start, size;
|
||||||
|
msg_prompt_add (MSG_start, NULL, buf, 40);
|
||||||
|
start = NUMSEC(atoi(buf),sizemult,dlcylsize);
|
||||||
|
if (sizemult > 1 && start < bsec)
|
||||||
|
start = bsec;
|
||||||
|
msg_prompt_add (MSG_size, NULL, buf, 40);
|
||||||
|
size = NUMSEC(atoi(buf),sizemult,dlcylsize);
|
||||||
|
if (sizemult > 1 && start == bsec)
|
||||||
|
size -= bsec;
|
||||||
|
if (start + size > bsize)
|
||||||
|
size = bsize - start;
|
||||||
|
if (size < 0) {
|
||||||
|
size = 0;
|
||||||
|
start = 0;
|
||||||
|
}
|
||||||
|
part[editpart].mbrp_start = start;
|
||||||
|
part[editpart].mbrp_size = size;
|
||||||
|
};
|
||||||
|
option "Set active", action { activepart = editpart; };
|
||||||
|
option "Partition OK", exit;
|
||||||
|
|
||||||
|
menu chooseid, title "Partition Kind?";
|
||||||
|
option "NetBSD", exit, action
|
||||||
|
{
|
||||||
|
part[editpart].mbrp_typ = 169;
|
||||||
|
};
|
||||||
|
option "DOS < 32 Meg", exit, action
|
||||||
|
{
|
||||||
|
part[editpart].mbrp_typ = 4;
|
||||||
|
};
|
||||||
|
option "DOS > 32 Meg", exit, action
|
||||||
|
{
|
||||||
|
part[editpart].mbrp_typ = 6;
|
||||||
|
};
|
||||||
|
option "unused", exit, action
|
||||||
|
{
|
||||||
|
part[editpart].mbrp_typ = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
menu cyl1024;
|
||||||
|
display action {
|
||||||
|
msg_display(MSG_cyl1024);
|
||||||
|
};
|
||||||
|
option "Re-edit both MBR and label", exit, action
|
||||||
|
{
|
||||||
|
/* XXX UGH */
|
||||||
|
extern int c1024_resp;
|
||||||
|
|
||||||
|
c1024_resp = 1;
|
||||||
|
};
|
||||||
|
option "Re-edit the label", exit, action
|
||||||
|
{
|
||||||
|
extern int c1024_resp;
|
||||||
|
|
||||||
|
c1024_resp = 2;
|
||||||
|
};
|
||||||
|
option "Use it anyway", exit, action
|
||||||
|
{
|
||||||
|
extern int c1024_resp;
|
||||||
|
|
||||||
|
c1024_resp = 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
menu editfsparts, y=13, exit;
|
||||||
|
display action {
|
||||||
|
ask_sizemult(dlcylsize);
|
||||||
|
msg_display(MSG_fspart, multname);
|
||||||
|
disp_cur_fspart(-1, 1);
|
||||||
|
};
|
||||||
|
option "Change a", action { editpart = A;}, sub menu edfspart;
|
||||||
|
option "Change b", action { editpart = B;}, sub menu edfspart;
|
||||||
|
option "NetBSD partition - can't change", action {};
|
||||||
|
option "Whole disk - can't change", action {};
|
||||||
|
option "Change e", action { editpart = E;}, sub menu edfspart;
|
||||||
|
option "Change f", action { editpart = F;}, sub menu edfspart;
|
||||||
|
option "Change g", action { editpart = G;}, sub menu edfspart;
|
||||||
|
option "Change h", action { editpart = H;}, sub menu edfspart;
|
||||||
|
option "Set new allocation size", action { reask_sizemult(dlcylsize); };
|
||||||
|
|
||||||
|
|
||||||
|
menu md_distcustom, x=26, y=5, exit, title "Selection toggles inclusion";
|
||||||
|
display action { show_cur_distsets (); };
|
||||||
|
option "Kernel", action { toggle_getit (0); };
|
||||||
|
option "Base", action { toggle_getit (1); };
|
||||||
|
option "System (/etc)", action { toggle_getit (2); };
|
||||||
|
option "Compiler Tools", action { toggle_getit (3); };
|
||||||
|
option "Games", action { toggle_getit (4); };
|
||||||
|
option "Online Manual Pages", action { toggle_getit (5); };
|
||||||
|
option "Miscellaneous", action { toggle_getit (6); };
|
||||||
|
option "Text Processing Tools", action { toggle_getit (7); };
|
||||||
|
option "X11 base and clients", action { toggle_getit (8); };
|
||||||
|
option "X11 fonts", action { toggle_getit (9); };
|
||||||
|
option "X11 servers", action { toggle_getit (10); };
|
||||||
|
option "X contrib clients", action { toggle_getit (11); };
|
||||||
|
option "X11 programming", action { toggle_getit (12); };
|
||||||
|
option "X11 Misc.", action { toggle_getit (13); };
|
||||||
|
|
||||||
|
/*
|
||||||
|
menu biosonematch;
|
||||||
|
option "This is the correct geometry", exit, action {
|
||||||
|
extern struct disklist *disklist;
|
||||||
|
extern struct nativedisk_info *nativedisk;
|
||||||
|
struct biosdisk_info *bip;
|
||||||
|
extern struct biosdisk_info *biosdisk;
|
||||||
|
|
||||||
|
bip = &disklist->dl_biosdisks[nativedisk->ni_biosmatches[0]];
|
||||||
|
bcyl = bip->bi_cyl;
|
||||||
|
bhead = bip->bi_head;
|
||||||
|
bsec = bip->bi_sec;
|
||||||
|
biosdisk = bip;
|
||||||
|
};
|
||||||
|
option "Set the geometry by hand", exit, action {
|
||||||
|
set_bios_geom(dlcyl, dlhead, dlsec);
|
||||||
|
biosdisk = NULL;
|
||||||
|
};
|
||||||
|
|
||||||
|
menu biosmultmatch;
|
||||||
|
option "Use one of these disks", exit, action {
|
||||||
|
extern struct disklist *disklist;
|
||||||
|
extern struct nativedisk_info *nativedisk;
|
||||||
|
struct biosdisk_info *bip;
|
||||||
|
extern struct biosdisk_info *biosdisk;
|
||||||
|
int sel;
|
||||||
|
char res[80];
|
||||||
|
|
||||||
|
do {
|
||||||
|
strcpy(res, "0");
|
||||||
|
msg_prompt(MSG_pickdisk, res, res, 80);
|
||||||
|
sel = atoi(res);
|
||||||
|
} while (sel < 0 || sel >= nativedisk->ni_nmatches);
|
||||||
|
bip = &disklist->dl_biosdisks[nativedisk->ni_biosmatches[0]];
|
||||||
|
bcyl = bip->bi_cyl;
|
||||||
|
bhead = bip->bi_head;
|
||||||
|
bsec = bip->bi_sec;
|
||||||
|
biosdisk = bip;
|
||||||
|
};
|
||||||
|
option "Set the geometry by hand", exit, action {
|
||||||
|
set_bios_geom(dlcyl, dlhead, dlsec);
|
||||||
|
biosdisk = NULL;
|
||||||
|
};
|
||||||
|
|
||||||
|
menu configbootsel, title "Change a bootmenu item", exit;
|
||||||
|
display action { msg_display(MSG_configbootsel);
|
||||||
|
disp_bootsel((struct mbr_partition *)&mbr[MBR_PARTOFF], mbs);
|
||||||
|
msg_display_add(MSG_bootseltimeout, (1000 * mbs->timeo) / 18200);
|
||||||
|
msg_display_add(MSG_defbootselopt);
|
||||||
|
if (mbs->defkey == SCAN_ENTER)
|
||||||
|
msg_display_add(MSG_defbootseloptactive);
|
||||||
|
else if (mbs->defkey < (SCAN_F1 + 4))
|
||||||
|
msg_display_add(MSG_defbootseloptpart,
|
||||||
|
defbootselpart);
|
||||||
|
else
|
||||||
|
msg_display_add(MSG_defbootseloptdisk,
|
||||||
|
defbootseldisk);
|
||||||
|
};
|
||||||
|
option "Edit menu entry 0",
|
||||||
|
action {
|
||||||
|
if (part[0].mbrp_typ != 0)
|
||||||
|
msg_prompt(MSG_bootselitemname, mbs->nametab[0],
|
||||||
|
mbs->nametab[0], 8);
|
||||||
|
};
|
||||||
|
option "Edit menu entry 1",
|
||||||
|
action {
|
||||||
|
if (part[1].mbrp_typ != 0)
|
||||||
|
msg_prompt(MSG_bootselitemname, mbs->nametab[1],
|
||||||
|
mbs->nametab[1], 8);
|
||||||
|
};
|
||||||
|
option "Edit menu entry 2",
|
||||||
|
action {
|
||||||
|
if (part[2].mbrp_typ != 0)
|
||||||
|
msg_prompt(MSG_bootselitemname, mbs->nametab[2],
|
||||||
|
mbs->nametab[2], 8);
|
||||||
|
};
|
||||||
|
option "Edit menu entry 3",
|
||||||
|
action {
|
||||||
|
if (part[3].mbrp_typ != 0)
|
||||||
|
msg_prompt(MSG_bootselitemname, mbs->nametab[3],
|
||||||
|
mbs->nametab[3], 8);
|
||||||
|
};
|
||||||
|
option "Set timeout value",
|
||||||
|
action {
|
||||||
|
char tstr[8];
|
||||||
|
unsigned timo;
|
||||||
|
|
||||||
|
do {
|
||||||
|
snprintf(tstr, 8, "%u",
|
||||||
|
(1000 * mbs->timeo) / 18200);
|
||||||
|
msg_prompt(MSG_bootseltimeoutval, tstr, tstr,
|
||||||
|
8);
|
||||||
|
timo = (unsigned)atoi(tstr);
|
||||||
|
} while (timo > 3600);
|
||||||
|
mbs->timeo = (u_int16_t)((timo * 18200) / 1000);
|
||||||
|
};
|
||||||
|
option "Set default option", sub menu defaultbootsel;
|
||||||
|
|
||||||
|
menu defaultbootsel, title "Pick a default partition/disk to boot";
|
||||||
|
option "Partition 0", exit,
|
||||||
|
action {
|
||||||
|
if (mbs->nametab[0][0] != 0 && part[0].mbrp_typ != 0)
|
||||||
|
mbs->defkey = SCAN_F1; defbootselpart = 0;
|
||||||
|
};
|
||||||
|
option "Partition 1", exit,
|
||||||
|
action {
|
||||||
|
if (mbs->nametab[1][0] != 0 && part[1].mbrp_typ != 0)
|
||||||
|
mbs->defkey = SCAN_F1 + 1; defbootselpart = 1;
|
||||||
|
};
|
||||||
|
option "Partition 2", exit,
|
||||||
|
action {
|
||||||
|
if (mbs->nametab[2][0] != 0 && part[2].mbrp_typ != 0)
|
||||||
|
mbs->defkey = SCAN_F1 + 2; defbootselpart = 2;
|
||||||
|
};
|
||||||
|
option "Partition 3", exit,
|
||||||
|
action {
|
||||||
|
if (mbs->nametab[3][0] != 0 && part[3].mbrp_typ != 0)
|
||||||
|
mbs->defkey = SCAN_F1 + 3; defbootselpart = 3;
|
||||||
|
};
|
||||||
|
option "Harddisk 0", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 4; defbootseldisk = 0; };
|
||||||
|
option "Harddisk 1", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 5; defbootseldisk = 1; };
|
||||||
|
option "Harddisk 2", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 6; defbootseldisk = 2; };
|
||||||
|
option "Harddisk 3", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 7; defbootseldisk = 3; };
|
||||||
|
option "Harddisk 4", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 8; defbootseldisk = 4; };
|
||||||
|
option "Harddisk 5", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 9; defbootseldisk = 5; };
|
||||||
|
option "First active partition", exit,
|
||||||
|
action { mbs->defkey = SCAN_ENTER; };
|
||||||
|
*/
|
331
distrib/utils/sysinst/arch/playstation2/menus.md.fr
Normal file
331
distrib/utils/sysinst/arch/playstation2/menus.md.fr
Normal file
@ -0,0 +1,331 @@
|
|||||||
|
/* $NetBSD: menus.md.fr,v 1.1 2001/10/15 16:22:52 uch Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 1997 Piermont Information Systems Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* This product includes software developed for the NetBSD Project by
|
||||||
|
* Piermont Information Systems Inc.
|
||||||
|
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||||
|
* or promote products derived from this software without specific prior
|
||||||
|
* written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``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 PIERMONT INFORMATION SYSTEMS INC. 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Menu definitions for sysinst. i386 version, machine dependent. */
|
||||||
|
|
||||||
|
menu fullpart, y=15, title "Faite votre choix";
|
||||||
|
option "Utilisation d'une partie du disque", exit, action {usefull = 0;};
|
||||||
|
option "Utilisation de tout le disque", exit, action {usefull = 1;};
|
||||||
|
|
||||||
|
menu wdtype, title "Choix du type de disque";
|
||||||
|
display action { msg_display (MSG_wdtype, diskdev); };
|
||||||
|
option "IDE", exit;
|
||||||
|
option "ESDI", exit, action
|
||||||
|
{ msg_display (MSG_sectforward);
|
||||||
|
process_menu (MENU_yesno);
|
||||||
|
if (yesno)
|
||||||
|
doessf = "sf:";
|
||||||
|
};
|
||||||
|
option "ST506", exit, action
|
||||||
|
{ msg_display (MSG_sectforward);
|
||||||
|
process_menu (MENU_yesno);
|
||||||
|
if (yesno)
|
||||||
|
doessf = "sf:";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
menu dlgeom, title "Choisissez une option";
|
||||||
|
display action { msg_display (MSG_dlgeom, diskdev, dlcyl, dlhead,
|
||||||
|
dlsec, disk->dd_cyl, disk->dd_head,
|
||||||
|
disk->dd_sec);
|
||||||
|
};
|
||||||
|
option "Utilisation de la géométrie réelle", exit, action {
|
||||||
|
dlcyl = disk->dd_cyl;
|
||||||
|
dlhead = disk->dd_head;
|
||||||
|
dlsec = disk->dd_sec;
|
||||||
|
};
|
||||||
|
option "Utilisation de la géométrie du disklabel", exit, action {
|
||||||
|
disk->dd_cyl = dlcyl;
|
||||||
|
disk->dd_head = dlhead;
|
||||||
|
disk->dd_sec = dlsec;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
menu editparttable, title "Choisissez votre partition", exit;
|
||||||
|
display action { msg_display (MSG_editparttable);
|
||||||
|
disp_cur_part((struct mbr_partition *)&mbr[MBR_PARTOFF
|
||||||
|
], activepart,-1);
|
||||||
|
};
|
||||||
|
option "Edition de la partition 0", sub menu editpart,
|
||||||
|
action { editpart = 0; };
|
||||||
|
option "Edition de la partition 1", sub menu editpart,
|
||||||
|
action { editpart = 1; };
|
||||||
|
option "Edition de la partition 2", sub menu editpart,
|
||||||
|
action { editpart = 2; };
|
||||||
|
option "Edition de la partition 3", sub menu editpart,
|
||||||
|
action { editpart = 3; };
|
||||||
|
option "Changer d'untité",
|
||||||
|
action { reask_sizemult(bcylsize); };
|
||||||
|
|
||||||
|
menu editpart, title "Changement";
|
||||||
|
display action { msg_display (MSG_editpart, editpart);
|
||||||
|
disp_cur_part((struct mbr_partition *)&mbr[MBR_PARTOFF
|
||||||
|
], activepart,editpart);
|
||||||
|
msg_display_add(MSG_newline);
|
||||||
|
};
|
||||||
|
option "du type de FS", sub menu chooseid;
|
||||||
|
option "du Début et de la taille", action
|
||||||
|
{ char buf[40]; int start, size;
|
||||||
|
msg_prompt_add (MSG_start, NULL, buf, 40);
|
||||||
|
start = NUMSEC(atoi(buf),sizemult,dlcylsize);
|
||||||
|
if (sizemult > 1 && start < bsec)
|
||||||
|
start = bsec;
|
||||||
|
msg_prompt_add (MSG_size, NULL, buf, 40);
|
||||||
|
size = NUMSEC(atoi(buf),sizemult,dlcylsize);
|
||||||
|
if (sizemult > 1 && start == bsec)
|
||||||
|
size -= bsec;
|
||||||
|
if (start + size > bsize)
|
||||||
|
size = bsize - start;
|
||||||
|
if (size < 0) {
|
||||||
|
size = 0;
|
||||||
|
start = 0;
|
||||||
|
}
|
||||||
|
part[editpart].mbrp_start = start;
|
||||||
|
part[editpart].mbrp_size = size;
|
||||||
|
};
|
||||||
|
option "Rendre la partition active", action { activepart = editpart; };
|
||||||
|
option "Partition OK", exit;
|
||||||
|
|
||||||
|
menu chooseid, title "Type de Partition?";
|
||||||
|
option "NetBSD", exit, action
|
||||||
|
{
|
||||||
|
part[editpart].mbrp_typ = 169;
|
||||||
|
};
|
||||||
|
option "DOS < 32 Meg", exit, action
|
||||||
|
{
|
||||||
|
part[editpart].mbrp_typ = 4;
|
||||||
|
};
|
||||||
|
option "DOS > 32 Meg", exit, action
|
||||||
|
{
|
||||||
|
part[editpart].mbrp_typ = 6;
|
||||||
|
};
|
||||||
|
option "unused", exit, action
|
||||||
|
{
|
||||||
|
part[editpart].mbrp_typ = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
menu cyl1024;
|
||||||
|
display action {
|
||||||
|
msg_display(MSG_cyl1024);
|
||||||
|
};
|
||||||
|
option "Rééditer le secteur de boot et le label", exit, action
|
||||||
|
{
|
||||||
|
/* XXX UGH */
|
||||||
|
extern int c1024_resp;
|
||||||
|
|
||||||
|
c1024_resp = 1;
|
||||||
|
};
|
||||||
|
option "Rééditer le label", exit, action
|
||||||
|
{
|
||||||
|
extern int c1024_resp;
|
||||||
|
|
||||||
|
c1024_resp = 2;
|
||||||
|
};
|
||||||
|
option "L'utiliser tout de même", exit, action
|
||||||
|
{
|
||||||
|
extern int c1024_resp;
|
||||||
|
|
||||||
|
c1024_resp = 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
menu editfsparts, y=13, exit;
|
||||||
|
display action {
|
||||||
|
ask_sizemult(dlcylsize);
|
||||||
|
msg_display(MSG_fspart, multname);
|
||||||
|
disp_cur_fspart(-1, 1);
|
||||||
|
};
|
||||||
|
option "Changer a", action { editpart = A;}, sub menu edfspart;
|
||||||
|
option "Changer b", action { editpart = B;}, sub menu edfspart;
|
||||||
|
option "Partition de NetBSD - Changement impossible", action {};
|
||||||
|
option "Totalité du disque - Changement impossible", action {};
|
||||||
|
option "Changer e", action { editpart = E;}, sub menu edfspart;
|
||||||
|
option "Changer f", action { editpart = F;}, sub menu edfspart;
|
||||||
|
option "Changer g", action { editpart = G;}, sub menu edfspart;
|
||||||
|
option "Changer h", action { editpart = H;}, sub menu edfspart;
|
||||||
|
option "Changer d'unité", action { reask_sizemult(dlcylsize); };
|
||||||
|
|
||||||
|
|
||||||
|
menu md_distcustom, x=26, y=5, exit, title "Sélection des composants";
|
||||||
|
display action { show_cur_distsets (); };
|
||||||
|
option "Kernel", action { toggle_getit (0); };
|
||||||
|
option "Base", action { toggle_getit (1); };
|
||||||
|
option "System (/etc)", action { toggle_getit (2); };
|
||||||
|
option "Outils de développement", action { toggle_getit (3); };
|
||||||
|
option "Jeux", action { toggle_getit (4); };
|
||||||
|
option "Pages de manuel", action { toggle_getit (5); };
|
||||||
|
option "Divers", action { toggle_getit (6); };
|
||||||
|
option "Outils de manipulation de textes", action { toggle_getit (7); };
|
||||||
|
option "X11 base et clients", action { toggle_getit (8); };
|
||||||
|
option "X11 polices", action { toggle_getit (9); };
|
||||||
|
option "X11 serveurs", action { toggle_getit (10); };
|
||||||
|
option "X11 clients contribués", action { toggle_getit (11); };
|
||||||
|
option "X11 développement", action { toggle_getit (12); };
|
||||||
|
option "X11 Misc.", action { toggle_getit (13); };
|
||||||
|
|
||||||
|
menu biosonematch;
|
||||||
|
option "C'est le bon géométrie", exit, action {
|
||||||
|
extern struct disklist *disklist;
|
||||||
|
extern struct nativedisk_info *nativedisk;
|
||||||
|
struct biosdisk_info *bip;
|
||||||
|
extern struct biosdisk_info *biosdisk;
|
||||||
|
|
||||||
|
bip = &disklist->dl_biosdisks[nativedisk->ni_biosmatches[0]];
|
||||||
|
bcyl = bip->bi_cyl;
|
||||||
|
bhead = bip->bi_head;
|
||||||
|
bsec = bip->bi_sec;
|
||||||
|
biosdisk = bip;
|
||||||
|
};
|
||||||
|
option "Entrer la géométrie", exit, action {
|
||||||
|
set_bios_geom(dlcyl, dlhead, dlsec);
|
||||||
|
biosdisk = NULL;
|
||||||
|
};
|
||||||
|
|
||||||
|
menu biosmultmatch;
|
||||||
|
option "Utiliser l'un de ces disques", exit, action {
|
||||||
|
extern struct disklist *disklist;
|
||||||
|
extern struct nativedisk_info *nativedisk;
|
||||||
|
struct biosdisk_info *bip;
|
||||||
|
extern struct biosdisk_info *biosdisk;
|
||||||
|
int sel;
|
||||||
|
char res[80];
|
||||||
|
|
||||||
|
do {
|
||||||
|
strcpy(res, "0");
|
||||||
|
msg_prompt(MSG_pickdisk, res, res, 80);
|
||||||
|
sel = atoi(res);
|
||||||
|
} while (sel < 0 || sel >= nativedisk->ni_nmatches);
|
||||||
|
bip = &disklist->dl_biosdisks[nativedisk->ni_biosmatches[0]];
|
||||||
|
bcyl = bip->bi_cyl;
|
||||||
|
bhead = bip->bi_head;
|
||||||
|
bsec = bip->bi_sec;
|
||||||
|
biosdisk = bip;
|
||||||
|
};
|
||||||
|
option "Entrer la géométrie", exit, action {
|
||||||
|
set_bios_geom(dlcyl, dlhead, dlsec);
|
||||||
|
biosdisk = NULL;
|
||||||
|
};
|
||||||
|
|
||||||
|
menu configbootsel, title "Changer une entree du menu", exit;
|
||||||
|
display action { msg_display(MSG_configbootsel);
|
||||||
|
disp_bootsel((struct mbr_partition *)&mbr[MBR_PARTOFF], mbs);
|
||||||
|
msg_display_add(MSG_bootseltimeout, (1000 * mbs->timeo) / 18200);
|
||||||
|
msg_display_add(MSG_defbootselopt);
|
||||||
|
if (mbs->defkey == SCAN_ENTER)
|
||||||
|
msg_display_add(MSG_defbootseloptactive);
|
||||||
|
else if (mbs->defkey < (SCAN_F1 + 4))
|
||||||
|
msg_display_add(MSG_defbootseloptpart,
|
||||||
|
defbootselpart);
|
||||||
|
else
|
||||||
|
msg_display_add(MSG_defbootseloptdisk,
|
||||||
|
defbootseldisk);
|
||||||
|
};
|
||||||
|
option "Changer l'entrée 0 du menu",
|
||||||
|
action {
|
||||||
|
if (part[0].mbrp_typ != 0)
|
||||||
|
msg_prompt(MSG_bootselitemname, mbs->nametab[0],
|
||||||
|
mbs->nametab[0], 8);
|
||||||
|
};
|
||||||
|
option "Changer l'entrée 1 du menu",
|
||||||
|
action {
|
||||||
|
if (part[1].mbrp_typ != 0)
|
||||||
|
msg_prompt(MSG_bootselitemname, mbs->nametab[1],
|
||||||
|
mbs->nametab[1], 8);
|
||||||
|
};
|
||||||
|
option "Changer l'entrée 2 du menu",
|
||||||
|
action {
|
||||||
|
if (part[2].mbrp_typ != 0)
|
||||||
|
msg_prompt(MSG_bootselitemname, mbs->nametab[2],
|
||||||
|
mbs->nametab[2], 8);
|
||||||
|
};
|
||||||
|
option "Changer l'entrée 3 du menu",
|
||||||
|
action {
|
||||||
|
if (part[3].mbrp_typ != 0)
|
||||||
|
msg_prompt(MSG_bootselitemname, mbs->nametab[3],
|
||||||
|
mbs->nametab[3], 8);
|
||||||
|
};
|
||||||
|
option "Changer le temps d'attente",
|
||||||
|
action {
|
||||||
|
char tstr[8];
|
||||||
|
unsigned timo;
|
||||||
|
|
||||||
|
do {
|
||||||
|
snprintf(tstr, 8, "%u",
|
||||||
|
(1000 * mbs->timeo) / 18200);
|
||||||
|
msg_prompt(MSG_bootseltimeoutval, tstr, tstr,
|
||||||
|
8);
|
||||||
|
timo = (unsigned)atoi(tstr);
|
||||||
|
} while (timo > 3600);
|
||||||
|
mbs->timeo = (u_int16_t)((timo * 18200) / 1000);
|
||||||
|
};
|
||||||
|
option "Changer le choix par defaut", sub menu defaultbootsel;
|
||||||
|
|
||||||
|
menu defaultbootsel, title "Choisissez un disque ou partition";
|
||||||
|
option "Partition 0", exit,
|
||||||
|
action {
|
||||||
|
if (mbs->nametab[0][0] != 0 && part[0].mbrp_typ != 0)
|
||||||
|
mbs->defkey = SCAN_F1; defbootselpart = 0;
|
||||||
|
};
|
||||||
|
option "Partition 1", exit,
|
||||||
|
action {
|
||||||
|
if (mbs->nametab[1][0] != 0 && part[1].mbrp_typ != 0)
|
||||||
|
mbs->defkey = SCAN_F1 + 1; defbootselpart = 1;
|
||||||
|
};
|
||||||
|
option "Partition 2", exit,
|
||||||
|
action {
|
||||||
|
if (mbs->nametab[2][0] != 0 && part[2].mbrp_typ != 0)
|
||||||
|
mbs->defkey = SCAN_F1 + 2; defbootselpart = 2;
|
||||||
|
};
|
||||||
|
option "Partition 3", exit,
|
||||||
|
action {
|
||||||
|
if (mbs->nametab[3][0] != 0 && part[3].mbrp_typ != 0)
|
||||||
|
mbs->defkey = SCAN_F1 + 3; defbootselpart = 3;
|
||||||
|
};
|
||||||
|
option "Disque dur 0", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 4; defbootseldisk = 0; };
|
||||||
|
option "Disque dur 1", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 5; defbootseldisk = 1; };
|
||||||
|
option "Disque dur 2", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 6; defbootseldisk = 2; };
|
||||||
|
option "Disque dur 3", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 7; defbootseldisk = 3; };
|
||||||
|
option "Disque dur 4", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 8; defbootseldisk = 4; };
|
||||||
|
option "Disque dur 5", exit,
|
||||||
|
action { mbs->defkey = SCAN_F1 + 9; defbootseldisk = 5; };
|
||||||
|
option "Première partition active", exit,
|
||||||
|
action { mbs->defkey = SCAN_ENTER; };
|
293
distrib/utils/sysinst/arch/playstation2/msg.md.en
Normal file
293
distrib/utils/sysinst/arch/playstation2/msg.md.en
Normal file
@ -0,0 +1,293 @@
|
|||||||
|
/* $NetBSD: msg.md.en,v 1.1 2001/10/15 16:22:52 uch Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 1997 Piermont Information Systems Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* This product includes software developed for the NetBSD Project by
|
||||||
|
* Piermont Information Systems Inc.
|
||||||
|
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||||
|
* or promote products derived from this software without specific prior
|
||||||
|
* written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``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 PIERMONT INFORMATION SYSTEMS INC. 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* MD Message catalog -- english, i386 version */
|
||||||
|
|
||||||
|
message md_hello
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
message fullpart
|
||||||
|
{We are now going to install NetBSD on the disk %s. You may
|
||||||
|
choose to install NetBSD on the entire disk, or on part of the disk.
|
||||||
|
|
||||||
|
Partial-disk installation creates a partition, or `slice', for NetBSD
|
||||||
|
in your disk's MBR partition table. Whole-disk installation is
|
||||||
|
`dangerously dedicated': it takes over the entire MBR. This WILL
|
||||||
|
overwrite all existing data and OSes on the disk. It also prohibits later
|
||||||
|
installation of multiple OSes on that disk (unless you overwrite NetBSD and
|
||||||
|
reinstall using only part of the disk).
|
||||||
|
|
||||||
|
Which would you like to do?
|
||||||
|
}
|
||||||
|
|
||||||
|
message wdtype
|
||||||
|
{What kind of disk is %s?}
|
||||||
|
|
||||||
|
message sectforward
|
||||||
|
{Does your disk do AUTOMATIC sector forwarding?}
|
||||||
|
|
||||||
|
message dlgeom
|
||||||
|
{It appears that your disk, %s, has already been labeled with a BSD
|
||||||
|
disklabel and the disklabel reports geometry that is different from
|
||||||
|
the real geometry. The two geometries are:
|
||||||
|
|
||||||
|
disklabel: %d cylinders, %d heads, %d sectors
|
||||||
|
real geometry: %d cylinders, %d heads, %d sectors
|
||||||
|
}
|
||||||
|
|
||||||
|
/* the %s's will expand into three character strings */
|
||||||
|
message part_header
|
||||||
|
{ Total disksize %d sectors
|
||||||
|
|
||||||
|
Start(%3s) Size(%3s) End(%3s) Kind
|
||||||
|
---------- ---------- ---------- ----
|
||||||
|
}
|
||||||
|
|
||||||
|
message part_row_start_unused
|
||||||
|
{%-1d: }
|
||||||
|
|
||||||
|
message part_row_start_used
|
||||||
|
{%-1d: %-10d %-10d %-10d}
|
||||||
|
|
||||||
|
message part_row_end
|
||||||
|
{ %s\n}
|
||||||
|
|
||||||
|
message setbiosgeom
|
||||||
|
{You will be prompted for the geometry. Please enter the values you
|
||||||
|
want. The number of cylinders should be <= 1024 and the number of sectors
|
||||||
|
should be <= 63. If you have the BIOS set up to use > 1024 cylinders just
|
||||||
|
truncate that number to 1024 here; NetBSD will know about the rest of the
|
||||||
|
cylinders.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message confirmbiosgeom
|
||||||
|
{Please verify if the BIOS disk geometry below is correct. The value for
|
||||||
|
the number of cylinders may have been truncated to 1024. This is ok as
|
||||||
|
long as the other numbers are correct; only 1024 cylinders can be
|
||||||
|
specified in the MBR, the rest will be found in a different way by NetBSD.
|
||||||
|
|
||||||
|
If you reenter the values, make sure that the values are correct and
|
||||||
|
match those used by other systems on this disk. Values that do not match
|
||||||
|
may result in data corruption.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message badgeom
|
||||||
|
{The current values for your disk geometry are:
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message realgeom
|
||||||
|
{real geom: %d cyl, %d heads, %d sec (NB: for comparison only)\n}
|
||||||
|
|
||||||
|
message biosgeom
|
||||||
|
{BIOS geom: %d cyl, %d heads, %d sec\n}
|
||||||
|
|
||||||
|
message reentergeom
|
||||||
|
{The values just entered for the geometry are not usable. Please,
|
||||||
|
reenter the geometry.
|
||||||
|
}
|
||||||
|
|
||||||
|
message ovrwrite
|
||||||
|
{Your disk currently has a non-NetBSD partition. Do you really want to
|
||||||
|
overwrite that partition with NetBSD?
|
||||||
|
}
|
||||||
|
|
||||||
|
message parttable
|
||||||
|
{The partition table on your disk currently looks like the following:
|
||||||
|
}
|
||||||
|
|
||||||
|
message editpart
|
||||||
|
{Partition %d looks like:\n\n}
|
||||||
|
|
||||||
|
message editparttable
|
||||||
|
{Edit your DOS partition table. The highlighted partition is the currently
|
||||||
|
active partition. The partition table currently looks like:
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message reeditpart
|
||||||
|
{There are overlapping MBR partitions or there is not exactly one NetBSD
|
||||||
|
partition. You should reedit the MBR partition table.
|
||||||
|
|
||||||
|
Do you want to reedit it?
|
||||||
|
}
|
||||||
|
|
||||||
|
message nobsdpart
|
||||||
|
{There is no NetBSD partition in the MBR partition table.}
|
||||||
|
|
||||||
|
message multbsdpart
|
||||||
|
{There are multiple NetBSD partitions in the MBR partition table.
|
||||||
|
Partition %d will be the one used.}
|
||||||
|
|
||||||
|
message dofdisk
|
||||||
|
{Setting up the DOS partition table ...
|
||||||
|
}
|
||||||
|
|
||||||
|
message dobad144
|
||||||
|
{Installing the bad block table ...
|
||||||
|
}
|
||||||
|
|
||||||
|
message dobootblks
|
||||||
|
{Installing boot blocks on %s....
|
||||||
|
}
|
||||||
|
|
||||||
|
message askfsroot1
|
||||||
|
{I will be asking for partition information.
|
||||||
|
|
||||||
|
First the root partition. You have %d %s left on your disk.
|
||||||
|
}
|
||||||
|
|
||||||
|
message askfsroot2
|
||||||
|
{Root partition size? }
|
||||||
|
|
||||||
|
message askfsswap1
|
||||||
|
{
|
||||||
|
Next the swap partition. You have %d %s left on your disk.
|
||||||
|
}
|
||||||
|
|
||||||
|
message askfsswap2
|
||||||
|
{Swap partition size? }
|
||||||
|
|
||||||
|
message otherparts
|
||||||
|
{You still have some space remaining unallocated on your disk. Please
|
||||||
|
give sizes and mount points for the following partitions.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message askfspart1
|
||||||
|
{The next partition is /dev/%s%c. You have %d %s left on your disk.
|
||||||
|
}
|
||||||
|
|
||||||
|
message askfspart2
|
||||||
|
{Partition size? }
|
||||||
|
|
||||||
|
message cyl1024
|
||||||
|
{The disklabel (set of partitions) you specified has a root partition that
|
||||||
|
ends beyond the 1024 BIOS cylinder boundary. To be sure that the system
|
||||||
|
can be booted at all times, the entire root partition must lie below that
|
||||||
|
limit. You can either: }
|
||||||
|
|
||||||
|
message onebiosmatch
|
||||||
|
{This disk matches the following BIOS disk:
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message onebiosmatch_header
|
||||||
|
{BIOS # cylinders heads sectors
|
||||||
|
------ ---------- ------- -------
|
||||||
|
}
|
||||||
|
|
||||||
|
message onebiosmatch_row
|
||||||
|
{%-6x %-10d %-7d %d\n}
|
||||||
|
|
||||||
|
message biosmultmatch
|
||||||
|
{This disk matches the following BIOS disks:
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message biosmultmatch_header
|
||||||
|
{ BIOS # cylinders heads sectors
|
||||||
|
------ ---------- ------- -------
|
||||||
|
}
|
||||||
|
|
||||||
|
message biosmultmatch_row
|
||||||
|
{%-1d: %-6x %-10d %-7d %d\n}
|
||||||
|
|
||||||
|
message pickdisk
|
||||||
|
{Choose disk: }
|
||||||
|
|
||||||
|
message wmbrfail
|
||||||
|
{Rewrite of MBR failed. I can't continue.}
|
||||||
|
|
||||||
|
message partabovechs
|
||||||
|
{The NetBSD part of the disk lies outside of the range that the BIOS on
|
||||||
|
your machine can address. Booting from it may not be possible. Are you
|
||||||
|
sure you that you want to do this?
|
||||||
|
|
||||||
|
(Answering 'no' will take you back to the partition edit menu.)}
|
||||||
|
|
||||||
|
message installbootsel
|
||||||
|
{You appear to have more than one operating system installed on your
|
||||||
|
disk. Do you want to install a bootselector so that you can select
|
||||||
|
which system to start up when your computer is (re)started?}
|
||||||
|
|
||||||
|
message installmbr
|
||||||
|
{The start of the NetBSD part of the disk lies outside of the range
|
||||||
|
that the BIOS can address. The initial bootcode in the Master Boot
|
||||||
|
Record needs to be able to use the extended BIOS interface to boot
|
||||||
|
off this partition. Do you want to install the NetBSD bootcode into
|
||||||
|
the Master Boot Record so that this is ensured? Note that this will
|
||||||
|
overwrite the existing code in the MBR, like some bootselectors.}
|
||||||
|
|
||||||
|
message configbootsel
|
||||||
|
{Configure the different bootselection menu items. You can change the
|
||||||
|
simple menu entries for the matching partition entries that are displayed
|
||||||
|
when the system boots. Also, you can specify the timeout and default
|
||||||
|
action to be taken (if no selection is made in the bootmenu).\n}
|
||||||
|
|
||||||
|
message bootseltimeout
|
||||||
|
{Boot menu timeout: %d\n}
|
||||||
|
|
||||||
|
message defbootselopt
|
||||||
|
{Default boot menu action: }
|
||||||
|
|
||||||
|
message defbootseloptactive
|
||||||
|
{boot the first active partition.}
|
||||||
|
|
||||||
|
message defbootseloptpart
|
||||||
|
{boot off partition %d.\n}
|
||||||
|
|
||||||
|
message defbootseloptdisk
|
||||||
|
{boot off hard disk %d.\n}
|
||||||
|
|
||||||
|
message bootselitemname
|
||||||
|
{Enter name for menu item}
|
||||||
|
|
||||||
|
message bootseltimeoutval
|
||||||
|
{Timeout value in seconds (0-3600)}
|
||||||
|
|
||||||
|
message bootsel_header
|
||||||
|
{Number Type Menu entry
|
||||||
|
------ -------------------------------- ----------
|
||||||
|
}
|
||||||
|
|
||||||
|
message bootsel_row
|
||||||
|
{%-6d %-32s %s\n}
|
294
distrib/utils/sysinst/arch/playstation2/msg.md.fr
Normal file
294
distrib/utils/sysinst/arch/playstation2/msg.md.fr
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
/* $NetBSD: msg.md.fr,v 1.1 2001/10/15 16:22:52 uch Exp $ */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright 1997 Piermont Information Systems Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Written by Philip A. Nelson for Piermont Information Systems Inc.
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
* 3. All advertising materials mentioning features or use of this software
|
||||||
|
* must display the following acknowledgement:
|
||||||
|
* This product includes software developed for the NetBSD Project by
|
||||||
|
* Piermont Information Systems Inc.
|
||||||
|
* 4. The name of Piermont Information Systems Inc. may not be used to endorse
|
||||||
|
* or promote products derived from this software without specific prior
|
||||||
|
* written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``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 PIERMONT INFORMATION SYSTEMS INC. 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.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* MD Message catalog -- french, i386 version */
|
||||||
|
|
||||||
|
message md_hello
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
message fullpart
|
||||||
|
{Nous allons maintenant installer NetBSD sur votre disque %s. Vous devez
|
||||||
|
choisir si vous voulez installer NetBSD sur la totalité du disque ou seulement
|
||||||
|
sur une partie de celui-ci.
|
||||||
|
Une installation sur une partie du disque crée une partition, ou `slice', pour
|
||||||
|
NetBSD dans le secteur de démarage (Master Boot Record, alias MBR) de votre
|
||||||
|
disque. Une installation sur la totalité du disque est `dangereusement
|
||||||
|
dédiée' : elle réinitialise complétement le MBR, ce qui efface tout système
|
||||||
|
d'exploitation ou données existants sur le disque. Cela rend également
|
||||||
|
impossible l'installation ultérieure d'un deuxième système d'exploitation,
|
||||||
|
sauf si vous reinstallez complètement NetBSD en utilisant uniquement une
|
||||||
|
partie du disque.
|
||||||
|
|
||||||
|
Que désirez vous faire ?
|
||||||
|
}
|
||||||
|
|
||||||
|
message wdtype
|
||||||
|
{Quel type de disque est %s?}
|
||||||
|
|
||||||
|
message sectforward
|
||||||
|
{Est ce que votre disque réassigne AUTOMATIQUEMENT les secteurs défectueux ?}
|
||||||
|
|
||||||
|
message dlgeom
|
||||||
|
{Votre disque a déjà un label BSD. Ce label montre une géométrie différente
|
||||||
|
de la géométrie réelle du disque. Les deux géométrie sont :
|
||||||
|
|
||||||
|
disklabel: %d cylindres, %d têtes, %d secteurs
|
||||||
|
géom réelle: %d cylindres, %d têtes, %d secteurs
|
||||||
|
}
|
||||||
|
|
||||||
|
/* the %s's will expand into three character strings */
|
||||||
|
message part_header
|
||||||
|
{ Début(%3s) Taille(%3s) Fin(%3s) Type
|
||||||
|
---------- ----------- ---------- ----
|
||||||
|
}
|
||||||
|
|
||||||
|
message part_row_start_unused
|
||||||
|
{%-1d: }
|
||||||
|
|
||||||
|
message part_row_start_used
|
||||||
|
{%-1d: %-10d %-11d %-10d}
|
||||||
|
|
||||||
|
message part_row_end
|
||||||
|
{ %s\n}
|
||||||
|
|
||||||
|
message setbiosgeom
|
||||||
|
{On va vous demander la géométrie. SVP entrer les valeur que vous désirez.
|
||||||
|
Rappelez vous que le nombre de cylindre doit être <= 1024 et que le nombre
|
||||||
|
de secteur doit être <=63. Si votre BIOS est configuré avec plus de 1024
|
||||||
|
cylindre, tronquez ce nombre à 1024 ici, NetBSD saura utiliser les cylindres
|
||||||
|
restant.
|
||||||
|
}
|
||||||
|
|
||||||
|
message confirmbiosgeom
|
||||||
|
{SVP vérifiez que la géometrie du BIOS ci-dessous est correcte. Le nombre
|
||||||
|
de cylindre à pu etre tronquée à 1024. Ce n'est pas un problème du moment
|
||||||
|
que les autres paramètres sont corrects. Seulement 1024 cuylindres peuvent
|
||||||
|
etre specifiés dans le secteur de boot, le reste sera trouvé d'une manière
|
||||||
|
différente par NetBSD.
|
||||||
|
|
||||||
|
Si vous réentrez ces valeurs, vérifiez qu'elles sont correctes et
|
||||||
|
correspondent à celles utilisées par d'autre systèmes sur ce disque. Des
|
||||||
|
valeurs différentes peuvent conduire à des pertes de données.
|
||||||
|
}
|
||||||
|
|
||||||
|
message badgeom
|
||||||
|
{Les valeurs actuelles de la géométrie de votre disque sont :
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message realgeom
|
||||||
|
{ géom réelle: %d cylindres, %d têtes, %d secteurs (pour information)\n}
|
||||||
|
|
||||||
|
message biosgeom
|
||||||
|
{ géom fdisk: %d cylindres, %d têtes, %d secteurs \n}
|
||||||
|
|
||||||
|
message reentergeom
|
||||||
|
{La géométrie que vous venez de spécifier n'est pas utilisable. SVP entrez
|
||||||
|
de nouveau la géométrie.
|
||||||
|
}
|
||||||
|
|
||||||
|
message ovrwrite
|
||||||
|
{Votre disque a actuellement une partition autre que NetBSD. Voulez vous
|
||||||
|
vraiment l'écraser par une partition NetBSD ?
|
||||||
|
}
|
||||||
|
|
||||||
|
message parttable
|
||||||
|
{La table des partitions de votre disque est :
|
||||||
|
}
|
||||||
|
|
||||||
|
message editpart
|
||||||
|
{La partition %d ressemble à:\n\n}
|
||||||
|
|
||||||
|
message editparttable
|
||||||
|
{Editez votre table de partition DOS. La partition en surbrillance est
|
||||||
|
actuellement active. La table des partitions est :
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message reeditpart
|
||||||
|
{Il y a des partitions BIOS qui se recouvrent ou bien vous n'avez pas
|
||||||
|
exactement une partition NetBSD. Vous devez éditer de nouveau la table
|
||||||
|
des partitions.
|
||||||
|
|
||||||
|
Voulez vous la rééditer ?
|
||||||
|
}
|
||||||
|
|
||||||
|
message nobsdpart
|
||||||
|
{Il n'y a pas de partition NetBSD dans la table des partitions du secteur de
|
||||||
|
boot.}
|
||||||
|
|
||||||
|
message multbsdpart
|
||||||
|
{Il y a plusieurs partition NetBSD dans la table des partitions du secteur de
|
||||||
|
boot. La partition %d sera utilisée.}
|
||||||
|
|
||||||
|
message dofdisk
|
||||||
|
{Configuration de la table des partition DOS ...
|
||||||
|
}
|
||||||
|
|
||||||
|
message dobad144
|
||||||
|
{Installation de la table des block défectueux ...
|
||||||
|
}
|
||||||
|
|
||||||
|
message dobootblks
|
||||||
|
{Installation des block de démarrage sur %s ...
|
||||||
|
}
|
||||||
|
|
||||||
|
message askfsroot1
|
||||||
|
{Je vais vous demander la taille et le point de montage de quelque partitions.
|
||||||
|
|
||||||
|
Et tout d'abord la partition racine. Il vous reste %d %s de libre sur
|
||||||
|
votre disque.
|
||||||
|
}
|
||||||
|
message askfsroot2
|
||||||
|
{Taille de la partition racine ? }
|
||||||
|
|
||||||
|
message askfsswap1
|
||||||
|
{
|
||||||
|
Et maintenant la taille de swap. Il vous reste %d %s de libre sur
|
||||||
|
votre disque.
|
||||||
|
}
|
||||||
|
|
||||||
|
message askfsswap2
|
||||||
|
{Taille du swap ? }
|
||||||
|
|
||||||
|
message otherparts
|
||||||
|
{Il vous reste de l'espace libre non alloué sur votre disque. SVP donnez la
|
||||||
|
taille et le point de " montage " des partitions suivantes.
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message askfspart1
|
||||||
|
{La partition suivante est /dev/%s%c . Il vous reste %d %s de libre sur
|
||||||
|
votre disque.
|
||||||
|
}
|
||||||
|
message askfspart2
|
||||||
|
{Taille de la partition ? }
|
||||||
|
|
||||||
|
message cyl1024
|
||||||
|
{ Le label (liste des partitions) que vous avez entré a une partition racine
|
||||||
|
qui se termine après la limite du BIOS de 1024 cylindres. pour être sur que
|
||||||
|
le système puisse etre toujours démaré, cette partition doit etre entièrement
|
||||||
|
en dessous de cette limite. Vous pouvez: }
|
||||||
|
|
||||||
|
message onebiosmatch
|
||||||
|
{Ce disque correspond au disque du BIOS suivant:
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message onebiosmatch_header
|
||||||
|
{BIOS # cylinders heads sectors
|
||||||
|
------ ---------- ------- -------
|
||||||
|
}
|
||||||
|
|
||||||
|
message onebiosmatch_row
|
||||||
|
{%-6x %-10d %-7d %-10d\n}
|
||||||
|
|
||||||
|
message biosmultmatch
|
||||||
|
{Ce disque correspond aux disques du BIOS suivants:
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
message biosmultmatch_header
|
||||||
|
{ BIOS # cylinders heads sectors
|
||||||
|
------ ---------- ------- -------
|
||||||
|
}
|
||||||
|
|
||||||
|
message biosmultmatch_row
|
||||||
|
{%-1d: %-6x %-10d %-7d %d\n}
|
||||||
|
|
||||||
|
message pickdisk
|
||||||
|
{Choisissez un disque: }
|
||||||
|
|
||||||
|
message wmbrfail
|
||||||
|
{L'écriture du MBR a échouée. Je ne peux pas continuer.}
|
||||||
|
|
||||||
|
message partabovechs
|
||||||
|
{La partition de votre disque réservée à NetBSD se trouve en-dehors de l'espace
|
||||||
|
que le BIOS de votre machine peut adresser. L'amorcage depuis cette partition
|
||||||
|
ne sera peut-etre pas possible. Voulez-vous reelement faire ceci ?
|
||||||
|
|
||||||
|
('Non' vous ramènera au menu d'edition des partitions.)}
|
||||||
|
|
||||||
|
message installbootsel
|
||||||
|
{Il me semble que vous avez plusieur système d'exploitation sur ce disque.
|
||||||
|
Voulez-vous installer un selecteur de boot qui vous permettra de choisir
|
||||||
|
quel système chargé lorsque votre ordinateur est (re)démarré?}
|
||||||
|
|
||||||
|
message installmbr
|
||||||
|
{Le début de la partition de votre disque réservée à NetBSD se trouve en-dehors
|
||||||
|
de l'espace que le BIOS peut adresser. Le programme d'amorcage du secteur de
|
||||||
|
demmarage doit utiliser l'interface étendue du BIOS pour ammorcer depuis cette
|
||||||
|
partition. Voulez-vous installer le programme d'amorcage de NetBSD pour etre
|
||||||
|
sur de pouvoir démarer depuis cette partition ? Notez que cela va écraser
|
||||||
|
le programme d'amorcage existant, comme un selecteur de boot.}
|
||||||
|
|
||||||
|
message configbootsel
|
||||||
|
{Configurez les differents choix du selecteur de boot. Vous pouvez changer
|
||||||
|
le menu proposé pour chaque partition lorsque le système demarre.
|
||||||
|
Vous pouvez également préciser le choix par defaut et le temps d'attente.
|
||||||
|
}
|
||||||
|
|
||||||
|
message bootseltimeout
|
||||||
|
{Temps d'attente: %d\n}
|
||||||
|
|
||||||
|
message defbootselopt
|
||||||
|
{Action par defaut: }
|
||||||
|
|
||||||
|
message defbootseloptactive
|
||||||
|
{Démarrer la première partition active.}
|
||||||
|
|
||||||
|
message defbootseloptpart
|
||||||
|
{Démarrer depuis la partition %d.\n}
|
||||||
|
|
||||||
|
message defbootseloptdisk
|
||||||
|
{Demarrer depuis le disque %d.\n}
|
||||||
|
|
||||||
|
message bootselitemname
|
||||||
|
{Entrez un nom pour ce choix}
|
||||||
|
|
||||||
|
message bootseltimeoutval
|
||||||
|
{Temps d'attente en secondes (0-3600)}
|
||||||
|
|
||||||
|
message bootsel_header
|
||||||
|
{Numéro Type Nom
|
||||||
|
------ -------------------------------- ---
|
||||||
|
}
|
||||||
|
|
||||||
|
message bootsel_row
|
||||||
|
{%-6d %-32s %s\n}
|
381
etc/etc.playstation2/MAKEDEV
Executable file
381
etc/etc.playstation2/MAKEDEV
Executable file
@ -0,0 +1,381 @@
|
|||||||
|
#!/bin/sh -
|
||||||
|
#
|
||||||
|
# $NetBSD: MAKEDEV,v 1.1 2001/10/15 16:22:53 uch Exp $
|
||||||
|
#
|
||||||
|
# Copyright (c) 1990 The Regents of the University of California.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms are permitted provided
|
||||||
|
# that: (1) source distributions retain this entire copyright notice and
|
||||||
|
# comment, and (2) distributions including binaries display the following
|
||||||
|
# acknowledgement: ``This product includes software developed by the
|
||||||
|
# University of California, Berkeley and its contributors'' in the
|
||||||
|
# documentation or other materials provided with the distribution and in
|
||||||
|
# all advertising materials mentioning features or use of this software.
|
||||||
|
# Neither the name of the University nor the names of its contributors may
|
||||||
|
# be used to endorse or promote products derived from this software without
|
||||||
|
# specific prior written permission.
|
||||||
|
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||||
|
# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
#
|
||||||
|
# @(#)MAKEDEV 5.2 (Berkeley) 6/22/90
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
#
|
||||||
|
# PLEASE RUN "cd ../share/man/man8 ; perl5 MAKEDEV2manpage.pl"
|
||||||
|
# AFTER CHANGING THIS FILE, AND COMMIT THE UPDATED MANPAGE!
|
||||||
|
#
|
||||||
|
###########################################################################
|
||||||
|
#
|
||||||
|
# Device "make" file. Valid arguments:
|
||||||
|
# all makes all known devices, including local devices.
|
||||||
|
# Tries to make the 'standard' number of each type.
|
||||||
|
# std standard devices
|
||||||
|
# ramdisk devices to be put into INSTALL kernel ramdisks.
|
||||||
|
#
|
||||||
|
# Disks:
|
||||||
|
# wd* "winchester" disk drives (ST506,IDE,ESDI,RLL,...)
|
||||||
|
# vnd* "file" pseudo-disks
|
||||||
|
# md* memory pseudo-disk devices
|
||||||
|
# ccd* contatenated disk devices
|
||||||
|
# raid* RAIDframe disk devices
|
||||||
|
#
|
||||||
|
# Console ports:
|
||||||
|
# ttyE* wscons
|
||||||
|
#
|
||||||
|
# Pointing devices:
|
||||||
|
# wsmouse* wscons mouse events
|
||||||
|
#
|
||||||
|
# Keyboard devices:
|
||||||
|
# wskbd* wscons keyboard events
|
||||||
|
#
|
||||||
|
# Pseudo terminals:
|
||||||
|
# pty* set of 16 master and slave pseudo terminals
|
||||||
|
#
|
||||||
|
# Special purpose devices:
|
||||||
|
# fd file descriptors
|
||||||
|
# bpf* packet filter
|
||||||
|
# ipl ip filter
|
||||||
|
# random Random number generator
|
||||||
|
# tun* network tunnel driver
|
||||||
|
#
|
||||||
|
|
||||||
|
dialin=0
|
||||||
|
dialout=524288 # high bit of the minor number
|
||||||
|
callunit=262144
|
||||||
|
|
||||||
|
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
||||||
|
umask 77
|
||||||
|
|
||||||
|
for i
|
||||||
|
do
|
||||||
|
|
||||||
|
case $i in
|
||||||
|
|
||||||
|
all)
|
||||||
|
sh $0 std fd wd0 wd1
|
||||||
|
sh $0 wscons
|
||||||
|
sh $0 pty0 pty1 pty2 pty3
|
||||||
|
sh $0 bpf0 bpf1 bpf2 bpf3
|
||||||
|
sh $0 vnd0 vnd1 vnd2 vnd3
|
||||||
|
sh $0 random
|
||||||
|
sh $0 ipl
|
||||||
|
sh $0 tun0 tun1
|
||||||
|
sh $0 md0
|
||||||
|
sh $0 usbs
|
||||||
|
;;
|
||||||
|
|
||||||
|
std)
|
||||||
|
rm -f console drum mem kmem null zero io tty klog stdin stdout stderr
|
||||||
|
mknod console c 2 0
|
||||||
|
mknod drum c 1 0 ; chmod 640 drum ; chgrp kmem drum
|
||||||
|
mknod kmem c 0 1 ; chmod 640 kmem ; chgrp kmem kmem
|
||||||
|
mknod mem c 0 0 ; chmod 640 mem ; chgrp kmem mem
|
||||||
|
mknod null c 0 2 ; chmod 666 null
|
||||||
|
mknod zero c 0 12 ; chmod 666 zero
|
||||||
|
mknod io c 0 14 ; chmod 640 io ; chgrp kmem io
|
||||||
|
mknod tty c 3 0 ; chmod 666 tty
|
||||||
|
mknod klog c 5 0 ; chmod 600 klog
|
||||||
|
mknod stdin c 4 0 ; chmod 666 stdin
|
||||||
|
mknod stdout c 4 1 ; chmod 666 stdout
|
||||||
|
mknod stderr c 4 2 ; chmod 666 stderr
|
||||||
|
;;
|
||||||
|
|
||||||
|
ramdisk)
|
||||||
|
sh $0 md0
|
||||||
|
;;
|
||||||
|
|
||||||
|
wscons)
|
||||||
|
sh $0 ttyE0 ttyE1 ttyE2 ttyE3 ttyE4 ttyE5 ttyE6 ttyE7
|
||||||
|
sh $0 wsmouse0 wsmouse1 wsmouse2 wsmouse3
|
||||||
|
sh $0 wskbd0 wskbd1 wskbd2 wskbd3
|
||||||
|
sh $0 ttyEcfg
|
||||||
|
sh $0 wsmux0 wsmux1
|
||||||
|
;;
|
||||||
|
|
||||||
|
ttyEcfg)
|
||||||
|
chr=27
|
||||||
|
rm -f ttyEcfg
|
||||||
|
mknod ttyEcfg c $chr 255
|
||||||
|
chown root.wheel ttyEcfg
|
||||||
|
chmod 600 ttyEcfg
|
||||||
|
;;
|
||||||
|
|
||||||
|
ttyE*)
|
||||||
|
chr=27; unit=${i#ttyE}
|
||||||
|
rm -f ttyE$unit
|
||||||
|
mknod ttyE$unit c $chr $unit
|
||||||
|
chown root.wheel ttyE$unit
|
||||||
|
;;
|
||||||
|
|
||||||
|
wsmouse*)
|
||||||
|
unit=${i#wsmouse}
|
||||||
|
wsmouse=wsmouse$unit
|
||||||
|
major=29
|
||||||
|
rm -f $wsmouse
|
||||||
|
mknod $wsmouse c $major $unit
|
||||||
|
chown root.wheel $wsmouse
|
||||||
|
chmod 600 $wsmouse
|
||||||
|
;;
|
||||||
|
|
||||||
|
wskbd*)
|
||||||
|
unit=${i#wskbd}
|
||||||
|
wskbd=wskbd$unit
|
||||||
|
major=28
|
||||||
|
rm -f $wskbd
|
||||||
|
mknod $wskbd c $major $unit
|
||||||
|
chown root.wheel $wskbd
|
||||||
|
chmod 600 $wskbd
|
||||||
|
;;
|
||||||
|
|
||||||
|
wsmux*)
|
||||||
|
unit=${i#wsmux}
|
||||||
|
wsmux=wsmux$unit
|
||||||
|
major=30
|
||||||
|
rm -f $wsmux
|
||||||
|
mknod $wsmux c $major $unit
|
||||||
|
chown root.wheel $wsmux
|
||||||
|
chmod 600 $wsmux
|
||||||
|
;;
|
||||||
|
|
||||||
|
fd)
|
||||||
|
rm -f fd/*
|
||||||
|
mkdir fd > /dev/null 2>&1
|
||||||
|
n=0
|
||||||
|
while [ $n -lt 64 ]; do
|
||||||
|
mknod fd/$n c 4 $n
|
||||||
|
n=$(($n + 1))
|
||||||
|
done
|
||||||
|
chown -R root.wheel fd
|
||||||
|
chmod 755 fd
|
||||||
|
chmod 666 fd/*
|
||||||
|
;;
|
||||||
|
|
||||||
|
md*)
|
||||||
|
unit=${i#md}; blk=6; chr=12;
|
||||||
|
rm -f md${unit}? rmd${unit}?
|
||||||
|
mknod md${unit}a b $blk $(($unit * 8 + 0))
|
||||||
|
mknod md${unit}d b $blk $(($unit * 8 + 3))
|
||||||
|
chgrp operator md${unit}? #rmd${unit}?
|
||||||
|
chmod 640 md${unit}? #rmd${unit}?
|
||||||
|
;;
|
||||||
|
|
||||||
|
ccd*|vnd*|wd*|raid*)
|
||||||
|
case $i in
|
||||||
|
ccd*) name=ccd; unit=${i#ccd}; blk=7; chr=13;;
|
||||||
|
raid*) name=raid; unit=${i#raid}; blk=9; chr=15;;
|
||||||
|
vnd*) name=vnd; unit=${i#vnd}; blk=8; chr=14;;
|
||||||
|
wd*) name=wd; unit=${i#wd}; blk=1; chr=10;;
|
||||||
|
esac
|
||||||
|
rm -f $name$unit? r$name$unit?
|
||||||
|
mknod ${name}${unit}a b $blk $(($unit * 8 + 0))
|
||||||
|
mknod ${name}${unit}b b $blk $(($unit * 8 + 1))
|
||||||
|
mknod ${name}${unit}c b $blk $(($unit * 8 + 2))
|
||||||
|
mknod ${name}${unit}d b $blk $(($unit * 8 + 3))
|
||||||
|
mknod ${name}${unit}e b $blk $(($unit * 8 + 4))
|
||||||
|
mknod ${name}${unit}f b $blk $(($unit * 8 + 5))
|
||||||
|
mknod ${name}${unit}g b $blk $(($unit * 8 + 6))
|
||||||
|
mknod ${name}${unit}h b $blk $(($unit * 8 + 7))
|
||||||
|
mknod r${name}${unit}a c $chr $(($unit * 8 + 0))
|
||||||
|
mknod r${name}${unit}b c $chr $(($unit * 8 + 1))
|
||||||
|
mknod r${name}${unit}c c $chr $(($unit * 8 + 2))
|
||||||
|
mknod r${name}${unit}d c $chr $(($unit * 8 + 3))
|
||||||
|
mknod r${name}${unit}e c $chr $(($unit * 8 + 4))
|
||||||
|
mknod r${name}${unit}f c $chr $(($unit * 8 + 5))
|
||||||
|
mknod r${name}${unit}g c $chr $(($unit * 8 + 6))
|
||||||
|
mknod r${name}${unit}h c $chr $(($unit * 8 + 7))
|
||||||
|
chgrp operator $name$unit? r$name$unit?
|
||||||
|
chmod 640 $name$unit? r$name$unit?
|
||||||
|
;;
|
||||||
|
|
||||||
|
pty*)
|
||||||
|
class=${i#pty}
|
||||||
|
case $class in
|
||||||
|
0) name=p;;
|
||||||
|
1) name=q;;
|
||||||
|
2) name=r;;
|
||||||
|
3) name=s;;
|
||||||
|
4) name=t;;
|
||||||
|
5) name=u;;
|
||||||
|
6) name=v;;
|
||||||
|
7) name=w;;
|
||||||
|
8) name=x;;
|
||||||
|
9) name=y;;
|
||||||
|
10) name=z;;
|
||||||
|
11) name=P;;
|
||||||
|
12) name=Q;;
|
||||||
|
13) name=R;;
|
||||||
|
14) name=S;;
|
||||||
|
15) name=T;;
|
||||||
|
*) echo "$0: $i: pty unit must be between 0 and 15"
|
||||||
|
continue ;;
|
||||||
|
esac
|
||||||
|
rm -f tty$name[0-9a-f] pty$name[0-9a-f]
|
||||||
|
for j in 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
||||||
|
do
|
||||||
|
case $j in
|
||||||
|
[0-9]) jn=$j ;;
|
||||||
|
a) jn=10 ;;
|
||||||
|
b) jn=11 ;;
|
||||||
|
c) jn=12 ;;
|
||||||
|
d) jn=13 ;;
|
||||||
|
e) jn=14 ;;
|
||||||
|
f) jn=15 ;;
|
||||||
|
esac
|
||||||
|
unit=$(($class * 16 + $jn))
|
||||||
|
mknod tty$name$j c 7 $unit
|
||||||
|
mknod pty$name$j c 6 $unit
|
||||||
|
done
|
||||||
|
chgrp wheel tty$name? pty$name?
|
||||||
|
chmod 666 tty$name? pty$name?
|
||||||
|
;;
|
||||||
|
|
||||||
|
bpf*|tun*)
|
||||||
|
case $i in
|
||||||
|
bpf*) name=bpf; unit=${i#bpf}; chr=25;;
|
||||||
|
tun*) name=tun; unit=${i#tun}; chr=24;;
|
||||||
|
esac
|
||||||
|
rm -f $name$unit
|
||||||
|
mknod $name$unit c $chr $unit
|
||||||
|
chown root.wheel $name$unit
|
||||||
|
;;
|
||||||
|
|
||||||
|
ipl)
|
||||||
|
rm -f ipl ipnat ipstate ipauth
|
||||||
|
mknod ipl c 23 0
|
||||||
|
mknod ipnat c 23 1
|
||||||
|
mknod ipstate c 23 2
|
||||||
|
mknod ipauth c 23 3
|
||||||
|
chown root.wheel ipl ipnat ipstate ipauth
|
||||||
|
chmod 600 ipl ipnat ipstate ipauth
|
||||||
|
;;
|
||||||
|
|
||||||
|
random)
|
||||||
|
rm -f random urandom
|
||||||
|
mknod random c 26 0
|
||||||
|
mknod urandom c 26 1
|
||||||
|
chown root.wheel random urandom
|
||||||
|
chmod 444 random
|
||||||
|
chmod 644 urandom
|
||||||
|
;;
|
||||||
|
|
||||||
|
usbs)
|
||||||
|
sh $0 usb usb0
|
||||||
|
sh $0 uhid0 uhid1 uhid2 uhid3
|
||||||
|
sh $0 ulpt0 ulpt1
|
||||||
|
sh $0 ttyU0 ttyU1
|
||||||
|
sh $0 urio0
|
||||||
|
sh $0 uscanner0 uscanner1
|
||||||
|
;;
|
||||||
|
|
||||||
|
usb*)
|
||||||
|
unit=${i#usb}
|
||||||
|
if [ "$unit" = "" ]; then
|
||||||
|
unit=255
|
||||||
|
usb=usb
|
||||||
|
else
|
||||||
|
usb=usb$unit
|
||||||
|
fi
|
||||||
|
major=31
|
||||||
|
rm -f $usb
|
||||||
|
mknod $usb c $major $unit
|
||||||
|
chown root.wheel $usb
|
||||||
|
chmod 600 $usb
|
||||||
|
;;
|
||||||
|
|
||||||
|
uhid*)
|
||||||
|
unit=${i#uhid}
|
||||||
|
uhid=uhid$unit
|
||||||
|
major=32
|
||||||
|
rm -f $uhid
|
||||||
|
mknod $uhid c $major $unit
|
||||||
|
chown root.wheel $uhid
|
||||||
|
chmod 666 $uhid
|
||||||
|
;;
|
||||||
|
|
||||||
|
ulpt*)
|
||||||
|
unit=${i#ulpt}
|
||||||
|
ulpt=ulpt$unit
|
||||||
|
major=33
|
||||||
|
rm -f $ulpt
|
||||||
|
mknod $ulpt c $major $unit
|
||||||
|
chown root.wheel $ulpt
|
||||||
|
chmod 600 $ulpt
|
||||||
|
;;
|
||||||
|
|
||||||
|
ugen*)
|
||||||
|
unit=${i#ugen}
|
||||||
|
ugen=ugen$unit
|
||||||
|
major=34
|
||||||
|
for j in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
|
||||||
|
do
|
||||||
|
ugenj=$ugen.$j
|
||||||
|
rm -f $ugenj
|
||||||
|
mknod $ugenj c $major $(($unit * 16 + $j))
|
||||||
|
chown root.wheel $ugenj
|
||||||
|
chmod 600 $ugenj
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
|
||||||
|
ttyU*)
|
||||||
|
unit=${i#ttyU}
|
||||||
|
ttyU=ttyU$unit
|
||||||
|
dtyU=dtyU$unit
|
||||||
|
ctyU=ctyU$unit
|
||||||
|
major=35
|
||||||
|
rm -f $ttyU $dtyU $ctyU
|
||||||
|
mknod $ttyU c $major $(($unit + $dialin ))
|
||||||
|
mknod $dtyU c $major $(($unit + $dialout ))
|
||||||
|
mknod $ctyU c $major $(($unit + $callunit))
|
||||||
|
chown uucp.wheel $ttyU $dtyU $ctyU
|
||||||
|
chmod 600 $ttyU $dtyU $ctyU
|
||||||
|
;;
|
||||||
|
|
||||||
|
urio*)
|
||||||
|
unit=${i#urio}
|
||||||
|
urio=urio$unit
|
||||||
|
major=36
|
||||||
|
rm -f $urio
|
||||||
|
mknod $urio c $major $unit
|
||||||
|
chown root.wheel $urio
|
||||||
|
chmod 600 $urio
|
||||||
|
;;
|
||||||
|
|
||||||
|
uscanner*)
|
||||||
|
unit=${i#uscanner}
|
||||||
|
uscanner=uscanner$unit
|
||||||
|
major=37
|
||||||
|
rm -f $uscanner
|
||||||
|
mknod $uscanner c $major $unit
|
||||||
|
chown root.wheel $uscanner
|
||||||
|
chmod 600 $uscanner
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo $i: unknown device
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
done
|
11
etc/etc.playstation2/Makefile.inc
Normal file
11
etc/etc.playstation2/Makefile.inc
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
# $NetBSD: Makefile.inc,v 1.1 2001/10/15 16:22:53 uch Exp $
|
||||||
|
|
||||||
|
BUILD_KERNELS+= RAMDISK
|
||||||
|
|
||||||
|
snap_md_post:
|
||||||
|
.ifndef UPDATE
|
||||||
|
cd ${.CURDIR}/../distrib && ${MAKE} cleandir
|
||||||
|
.endif
|
||||||
|
cd ${.CURDIR}/../distrib && ${MAKE} depend && ${MAKE}
|
||||||
|
cd ${.CURDIR}/../distrib/playstation2 && ${MAKE} release
|
||||||
|
cd ${.CURDIR}/../distrib/notes && ${MAKE} release
|
39
etc/etc.playstation2/disktab
Normal file
39
etc/etc.playstation2/disktab
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# $NetBSD: disktab,v 1.1 2001/10/15 16:22:53 uch Exp $
|
||||||
|
#
|
||||||
|
# from: @(#)disktab 8.1 (Berkeley) 6/9/93
|
||||||
|
#
|
||||||
|
|
||||||
|
# Disk geometry and partition layout tables.
|
||||||
|
# Key:
|
||||||
|
# dt controller type
|
||||||
|
# ty type of disk (fixed, removeable, simulated)
|
||||||
|
# d[0-4] drive-type-dependent parameters
|
||||||
|
# ns #sectors/track
|
||||||
|
# nt #tracks/cylinder
|
||||||
|
# nc #cylinders/disk
|
||||||
|
# sc #sectors/cylinder, nc*nt default
|
||||||
|
# su #sectors/unit, sc*nc default
|
||||||
|
# se sector size, DEV_BSIZE default
|
||||||
|
# rm rpm, 3600 default
|
||||||
|
# sf supports bad144-style bad sector forwarding
|
||||||
|
# sk sector skew per track, default 0
|
||||||
|
# cs sector skew per cylinder, default 0
|
||||||
|
# hs headswitch time, default 0
|
||||||
|
# ts one-cylinder seek time, default 0
|
||||||
|
# il sector interleave (n:1), 1 default
|
||||||
|
# bs boot block size, default BBSIZE
|
||||||
|
# sb superblock size, default SBSIZE
|
||||||
|
# o[a-h] partition offsets in sectors
|
||||||
|
# p[a-h] partition sizes in sectors
|
||||||
|
# b[a-h] partition block sizes in bytes
|
||||||
|
# f[a-h] partition fragment sizes in bytes
|
||||||
|
# t[a-h] partition types (filesystem, swap, etc)
|
||||||
|
# b[0-1] primary and secondary bootstraps, optional
|
||||||
|
#
|
||||||
|
# All partition sizes contain space for bad sector tables unless
|
||||||
|
# the device drivers fail to support this. Smaller disks may
|
||||||
|
# not have all partitions and all disks have no defaults for
|
||||||
|
# the `h' partition. The strategy here is that `a' always
|
||||||
|
# has the same amount for all disks (currently 65536 sectors or 32megs).
|
||||||
|
* The `b' partition is approx 48 megs while `c' is always the entire disk. T
|
||||||
|
# The sum of `d', `e', and `f' is equal to `g' which is everything else.
|
5
etc/etc.playstation2/fstab.wd
Normal file
5
etc/etc.playstation2/fstab.wd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# $NetBSD: fstab.wd,v 1.1 2001/10/15 16:22:53 uch Exp $
|
||||||
|
/dev/wd0a / ffs rw 1 1
|
||||||
|
/dev/wd0b none swap sw 0 0
|
||||||
|
kernfs /kern kernfs rw 0 0
|
||||||
|
procfs /proc procfs rw 0 0
|
75
etc/etc.playstation2/ttys
Normal file
75
etc/etc.playstation2/ttys
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
#
|
||||||
|
# $NetBSD: ttys,v 1.1 2001/10/15 16:22:53 uch Exp $
|
||||||
|
#
|
||||||
|
# name getty type status comments
|
||||||
|
|
||||||
|
# Workstation console (framebuffer) ttys
|
||||||
|
ttyE0 "/usr/libexec/getty std.9600" vt100 on secure
|
||||||
|
|
||||||
|
#
|
||||||
|
# pseudo-terminals
|
||||||
|
#
|
||||||
|
ttyp0 none network
|
||||||
|
ttyp1 none network
|
||||||
|
ttyp2 none network
|
||||||
|
ttyp3 none network
|
||||||
|
ttyp4 none network
|
||||||
|
ttyp5 none network
|
||||||
|
ttyp6 none network
|
||||||
|
ttyp7 none network
|
||||||
|
ttyp8 none network
|
||||||
|
ttyp9 none network
|
||||||
|
ttypa none network
|
||||||
|
ttypb none network
|
||||||
|
ttypc none network
|
||||||
|
ttypd none network
|
||||||
|
ttype none network
|
||||||
|
ttypf none network
|
||||||
|
ttyq0 none network
|
||||||
|
ttyq1 none network
|
||||||
|
ttyq2 none network
|
||||||
|
ttyq3 none network
|
||||||
|
ttyq4 none network
|
||||||
|
ttyq5 none network
|
||||||
|
ttyq6 none network
|
||||||
|
ttyq7 none network
|
||||||
|
ttyq8 none network
|
||||||
|
ttyq9 none network
|
||||||
|
ttyqa none network
|
||||||
|
ttyqb none network
|
||||||
|
ttyqc none network
|
||||||
|
ttyqd none network
|
||||||
|
ttyqe none network
|
||||||
|
ttyqf none network
|
||||||
|
ttyr0 none network
|
||||||
|
ttyr1 none network
|
||||||
|
ttyr2 none network
|
||||||
|
ttyr3 none network
|
||||||
|
ttyr4 none network
|
||||||
|
ttyr5 none network
|
||||||
|
ttyr6 none network
|
||||||
|
ttyr7 none network
|
||||||
|
ttyr8 none network
|
||||||
|
ttyr9 none network
|
||||||
|
ttyra none network
|
||||||
|
ttyrb none network
|
||||||
|
ttyrc none network
|
||||||
|
ttyrd none network
|
||||||
|
ttyre none network
|
||||||
|
ttyrf none network
|
||||||
|
ttys0 none network
|
||||||
|
ttys1 none network
|
||||||
|
ttys2 none network
|
||||||
|
ttys3 none network
|
||||||
|
ttys4 none network
|
||||||
|
ttys5 none network
|
||||||
|
ttys6 none network
|
||||||
|
ttys7 none network
|
||||||
|
ttys8 none network
|
||||||
|
ttys9 none network
|
||||||
|
ttysa none network
|
||||||
|
ttysb none network
|
||||||
|
ttysc none network
|
||||||
|
ttysd none network
|
||||||
|
ttyse none network
|
||||||
|
ttysf none network
|
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: Makefile,v 1.19 2000/05/02 18:20:41 nonaka Exp $
|
# $NetBSD: Makefile,v 1.20 2001/10/15 16:22:53 uch Exp $
|
||||||
|
|
||||||
SUBDIR= mbr
|
SUBDIR= mbr
|
||||||
.if ${MACHINE} == "i386"
|
.if ${MACHINE} == "i386"
|
||||||
@ -7,7 +7,7 @@ SUBDIR+= mbr_bootsel
|
|||||||
|
|
||||||
.if (${MACHINE} == "i386" || ${MACHINE} == "bebox" || ${MACHINE} == "cobalt" ||\
|
.if (${MACHINE} == "i386" || ${MACHINE} == "bebox" || ${MACHINE} == "cobalt" ||\
|
||||||
${MACHINE} == "ofppc" || ${MACHINE} == "hpcmips" || ${MACHINE} == "arc" ||\
|
${MACHINE} == "ofppc" || ${MACHINE} == "hpcmips" || ${MACHINE} == "arc" ||\
|
||||||
${MACHINE} == "prep")
|
${MACHINE} == "prep" || ${MACHINE} == "playstation2")
|
||||||
PROG= fdisk
|
PROG= fdisk
|
||||||
SRCS= fdisk.c
|
SRCS= fdisk.c
|
||||||
DPADD+= ${LIBUTIL}
|
DPADD+= ${LIBUTIL}
|
||||||
|
Loading…
Reference in New Issue
Block a user