xref: /netbsd/usr.sbin/sysinst/arch/ofppc/md.h (revision 6c042427)
1*6c042427Stsutsui /*	$NetBSD: md.h,v 1.5 2022/06/16 14:03:39 tsutsui Exp $	*/
226165e63Sdholland 
326165e63Sdholland /*
426165e63Sdholland  * Copyright 1997 Piermont Information Systems Inc.
526165e63Sdholland  * All rights reserved.
626165e63Sdholland  *
726165e63Sdholland  * Written by Philip A. Nelson for Piermont Information Systems Inc.
826165e63Sdholland  *
926165e63Sdholland  * Redistribution and use in source and binary forms, with or without
1026165e63Sdholland  * modification, are permitted provided that the following conditions
1126165e63Sdholland  * are met:
1226165e63Sdholland  * 1. Redistributions of source code must retain the above copyright
1326165e63Sdholland  *    notice, this list of conditions and the following disclaimer.
1426165e63Sdholland  * 2. Redistributions in binary form must reproduce the above copyright
1526165e63Sdholland  *    notice, this list of conditions and the following disclaimer in the
1626165e63Sdholland  *    documentation and/or other materials provided with the distribution.
1726165e63Sdholland  * 3. The name of Piermont Information Systems Inc. may not be used to endorse
1826165e63Sdholland  *    or promote products derived from this software without specific prior
1926165e63Sdholland  *    written permission.
2026165e63Sdholland  *
2126165e63Sdholland  * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
2226165e63Sdholland  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2326165e63Sdholland  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2426165e63Sdholland  * ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
2526165e63Sdholland  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2626165e63Sdholland  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2726165e63Sdholland  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2826165e63Sdholland  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2926165e63Sdholland  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3026165e63Sdholland  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
3126165e63Sdholland  * THE POSSIBILITY OF SUCH DAMAGE.
3226165e63Sdholland  *
3326165e63Sdholland  */
3426165e63Sdholland 
3526165e63Sdholland /* md.h -- Machine specific definitions for the ofppc */
3626165e63Sdholland 
3726165e63Sdholland 
3826165e63Sdholland #include <machine/cpu.h>
3926165e63Sdholland #include <sys/types.h>
4026165e63Sdholland #include <sys/stat.h>
4126165e63Sdholland #include <fcntl.h>
4226165e63Sdholland #include <unistd.h>
4326165e63Sdholland 
4426165e63Sdholland /* ofppc uses the mbr code. */
4526165e63Sdholland #include "mbr.h"
4626165e63Sdholland 
4726165e63Sdholland /* constants and defines */
4826165e63Sdholland #define PREP_BOOT_SIZE	1048576		/* 1MB for prep-style boot */
4926165e63Sdholland #define BINFO_BOOT_SIZE	15*1024		/* 12k for bootinfo.txt */
5026165e63Sdholland #define FAT12_BOOT_SIZE	10485760	/* 10MB boot partition */
5126165e63Sdholland #define MIN_FAT12_BOOT	2097152		/* 2MB absoule minimum */
5226165e63Sdholland #define MIN_PREP_BOOT	1048576
5326165e63Sdholland #define MIN_BINFO_BOOT	13312
5426165e63Sdholland 
55dcc57e24Smartin /* we use three boot partitions: FAT12, BINFO and PREP */
56dcc57e24Smartin #define	PART_BOOT	FAT12_BOOT_SIZE
57dcc57e24Smartin #define	PART_BOOT_TYPE	FS_MSDOS
58dcc57e24Smartin #define	PART_BOOT_SUBT	MBR_PTYPE_FAT12
59dcc57e24Smartin #define	PART_BOOT_MOUNT	"/boot"
60dcc57e24Smartin 
61dcc57e24Smartin #define	PART_BOOT1	BINFO_BOOT_SIZE
62dcc57e24Smartin #define	PART_BOOT1_TYPE	FS_OTHER
63dcc57e24Smartin 
64dcc57e24Smartin #define	PART_BOOT2	PREP_BOOT_SIZE
65dcc57e24Smartin #define	PART_BOOT2_TYPE	FS_BOOT
66dcc57e24Smartin 
6726165e63Sdholland 
6826165e63Sdholland #define DEFROOTSIZE	64	/* Default root size */
69*6c042427Stsutsui #define DEFSWAPSIZE	128	/* Default swap size */
7026165e63Sdholland #define DEFVARSIZE	32	/* Default /var size, if created */
71d609e7dcSmartin #define DEFUSRSIZE	750	/* Default /usr size, if /home */
72d609e7dcSmartin #define XNEEDMB 	256	/* Extra megs for full X installation */
73d609e7dcSmartin #define DEBNEEDMB	900	/* Extra megs for debug sets */
7426165e63Sdholland 
7526165e63Sdholland /* allow using tmpfs for /tmp instead of mfs */
7626165e63Sdholland #define HAVE_TMPFS
7726165e63Sdholland 
7826165e63Sdholland /*
7926165e63Sdholland  *  Default filesets to fetch and install during installation
8026165e63Sdholland  *  or upgrade. The standard sets are:
81688c0875Smaya  *      base etc comp games man misc rescue tests text xbase xcomp xetc xfont xserver
8226165e63Sdholland  *
8326165e63Sdholland  * i386 has the  MD set kern first, because generic kernels are  too
8426165e63Sdholland  * big to fit on install floppies. i386 does not yet include the x sets.
8526165e63Sdholland  *
8626165e63Sdholland  * Third entry is the last extension name in the split sets for loading
8726165e63Sdholland  * from floppy.
8826165e63Sdholland  */
8926165e63Sdholland #define SET_KERNEL_1_NAME	"kern-GENERIC"
9026165e63Sdholland #define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11
9126165e63Sdholland 
9226165e63Sdholland /*
9326165e63Sdholland  * Machine-specific command to write a new label to a disk.
9426165e63Sdholland  * For example, i386  uses "/sbin/disklabel -w -r", just like i386
9526165e63Sdholland  * miniroot scripts, though this may leave a bogus incore label.
9626165e63Sdholland  * Sun ports should probably use  DISKLABEL_CMD "/sbin/disklabel -w"
9726165e63Sdholland  * to get incore  to ondisk inode translation for the Sun proms.
9826165e63Sdholland  * If not defined, we assume the port does not support disklabels and
9926165e63Sdholland  * hand-edited disklabel will NOT be written by MI code.
10026165e63Sdholland  *
10126165e63Sdholland  * On ofppc, do what the 1.2 install scripts did.
10226165e63Sdholland  */
10326165e63Sdholland const char *md_disklabel_cmd(void);
10426165e63Sdholland #define DISKLABEL_CMD md_disklabel_cmd()
105