xref: /netbsd-src/usr.sbin/sysinst/arch/ofppc/md.h (revision 8e73b23597b53349100ae59b7a40fef89aa98883)
1*8e73b235Stsutsui /*	$NetBSD: md.h,v 1.5 2022/06/16 14:03:39 tsutsui Exp $	*/
250dbef1aSdholland 
350dbef1aSdholland /*
450dbef1aSdholland  * Copyright 1997 Piermont Information Systems Inc.
550dbef1aSdholland  * All rights reserved.
650dbef1aSdholland  *
750dbef1aSdholland  * Written by Philip A. Nelson for Piermont Information Systems Inc.
850dbef1aSdholland  *
950dbef1aSdholland  * Redistribution and use in source and binary forms, with or without
1050dbef1aSdholland  * modification, are permitted provided that the following conditions
1150dbef1aSdholland  * are met:
1250dbef1aSdholland  * 1. Redistributions of source code must retain the above copyright
1350dbef1aSdholland  *    notice, this list of conditions and the following disclaimer.
1450dbef1aSdholland  * 2. Redistributions in binary form must reproduce the above copyright
1550dbef1aSdholland  *    notice, this list of conditions and the following disclaimer in the
1650dbef1aSdholland  *    documentation and/or other materials provided with the distribution.
1750dbef1aSdholland  * 3. The name of Piermont Information Systems Inc. may not be used to endorse
1850dbef1aSdholland  *    or promote products derived from this software without specific prior
1950dbef1aSdholland  *    written permission.
2050dbef1aSdholland  *
2150dbef1aSdholland  * THIS SOFTWARE IS PROVIDED BY PIERMONT INFORMATION SYSTEMS INC. ``AS IS''
2250dbef1aSdholland  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2350dbef1aSdholland  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2450dbef1aSdholland  * ARE DISCLAIMED. IN NO EVENT SHALL PIERMONT INFORMATION SYSTEMS INC. BE
2550dbef1aSdholland  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2650dbef1aSdholland  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2750dbef1aSdholland  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2850dbef1aSdholland  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2950dbef1aSdholland  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
3050dbef1aSdholland  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
3150dbef1aSdholland  * THE POSSIBILITY OF SUCH DAMAGE.
3250dbef1aSdholland  *
3350dbef1aSdholland  */
3450dbef1aSdholland 
3550dbef1aSdholland /* md.h -- Machine specific definitions for the ofppc */
3650dbef1aSdholland 
3750dbef1aSdholland 
3850dbef1aSdholland #include <machine/cpu.h>
3950dbef1aSdholland #include <sys/types.h>
4050dbef1aSdholland #include <sys/stat.h>
4150dbef1aSdholland #include <fcntl.h>
4250dbef1aSdholland #include <unistd.h>
4350dbef1aSdholland 
4450dbef1aSdholland /* ofppc uses the mbr code. */
4550dbef1aSdholland #include "mbr.h"
4650dbef1aSdholland 
4750dbef1aSdholland /* constants and defines */
4850dbef1aSdholland #define PREP_BOOT_SIZE	1048576		/* 1MB for prep-style boot */
4950dbef1aSdholland #define BINFO_BOOT_SIZE	15*1024		/* 12k for bootinfo.txt */
5050dbef1aSdholland #define FAT12_BOOT_SIZE	10485760	/* 10MB boot partition */
5150dbef1aSdholland #define MIN_FAT12_BOOT	2097152		/* 2MB absoule minimum */
5250dbef1aSdholland #define MIN_PREP_BOOT	1048576
5350dbef1aSdholland #define MIN_BINFO_BOOT	13312
5450dbef1aSdholland 
554103857bSmartin /* we use three boot partitions: FAT12, BINFO and PREP */
564103857bSmartin #define	PART_BOOT	FAT12_BOOT_SIZE
574103857bSmartin #define	PART_BOOT_TYPE	FS_MSDOS
584103857bSmartin #define	PART_BOOT_SUBT	MBR_PTYPE_FAT12
594103857bSmartin #define	PART_BOOT_MOUNT	"/boot"
604103857bSmartin 
614103857bSmartin #define	PART_BOOT1	BINFO_BOOT_SIZE
624103857bSmartin #define	PART_BOOT1_TYPE	FS_OTHER
634103857bSmartin 
644103857bSmartin #define	PART_BOOT2	PREP_BOOT_SIZE
654103857bSmartin #define	PART_BOOT2_TYPE	FS_BOOT
664103857bSmartin 
6750dbef1aSdholland 
6850dbef1aSdholland #define DEFROOTSIZE	64	/* Default root size */
69*8e73b235Stsutsui #define DEFSWAPSIZE	128	/* Default swap size */
7050dbef1aSdholland #define DEFVARSIZE	32	/* Default /var size, if created */
717a2eea57Smartin #define DEFUSRSIZE	750	/* Default /usr size, if /home */
727a2eea57Smartin #define XNEEDMB 	256	/* Extra megs for full X installation */
737a2eea57Smartin #define DEBNEEDMB	900	/* Extra megs for debug sets */
7450dbef1aSdholland 
7550dbef1aSdholland /* allow using tmpfs for /tmp instead of mfs */
7650dbef1aSdholland #define HAVE_TMPFS
7750dbef1aSdholland 
7850dbef1aSdholland /*
7950dbef1aSdholland  *  Default filesets to fetch and install during installation
8050dbef1aSdholland  *  or upgrade. The standard sets are:
8150f74585Smaya  *      base etc comp games man misc rescue tests text xbase xcomp xetc xfont xserver
8250dbef1aSdholland  *
8350dbef1aSdholland  * i386 has the  MD set kern first, because generic kernels are  too
8450dbef1aSdholland  * big to fit on install floppies. i386 does not yet include the x sets.
8550dbef1aSdholland  *
8650dbef1aSdholland  * Third entry is the last extension name in the split sets for loading
8750dbef1aSdholland  * from floppy.
8850dbef1aSdholland  */
8950dbef1aSdholland #define SET_KERNEL_1_NAME	"kern-GENERIC"
9050dbef1aSdholland #define MD_SETS_SELECTED SET_KERNEL_1, SET_SYSTEM, SET_X11
9150dbef1aSdholland 
9250dbef1aSdholland /*
9350dbef1aSdholland  * Machine-specific command to write a new label to a disk.
9450dbef1aSdholland  * For example, i386  uses "/sbin/disklabel -w -r", just like i386
9550dbef1aSdholland  * miniroot scripts, though this may leave a bogus incore label.
9650dbef1aSdholland  * Sun ports should probably use  DISKLABEL_CMD "/sbin/disklabel -w"
9750dbef1aSdholland  * to get incore  to ondisk inode translation for the Sun proms.
9850dbef1aSdholland  * If not defined, we assume the port does not support disklabels and
9950dbef1aSdholland  * hand-edited disklabel will NOT be written by MI code.
10050dbef1aSdholland  *
10150dbef1aSdholland  * On ofppc, do what the 1.2 install scripts did.
10250dbef1aSdholland  */
10350dbef1aSdholland const char *md_disklabel_cmd(void);
10450dbef1aSdholland #define DISKLABEL_CMD md_disklabel_cmd()
105