2012-06-23 00:54:39 +04:00
|
|
|
/* $NetBSD: defs.h,v 1.163 2012/06/22 20:54:39 abs Exp $ */
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* 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.
|
2011-04-04 12:30:12 +04:00
|
|
|
* 3. The name of Piermont Information Systems Inc. may not be used to endorse
|
1997-09-27 03:02:53 +04:00
|
|
|
* 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
|
2011-04-04 12:30:12 +04:00
|
|
|
* 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
|
1997-09-27 03:02:53 +04:00
|
|
|
* 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)
|
2011-04-04 12:30:12 +04:00
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
1997-09-27 03:02:53 +04:00
|
|
|
* THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2003-05-19 00:40:09 +04:00
|
|
|
#ifndef _DEFS_H_
|
|
|
|
#define _DEFS_H_
|
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* defs.h -- definitions for use in the sysinst program. */
|
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* System includes needed for this. */
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/disklabel.h>
|
2003-11-30 17:36:43 +03:00
|
|
|
|
2012-01-06 02:18:36 +04:00
|
|
|
const char *getfslabelname(uint8_t);
|
|
|
|
|
2003-11-30 17:36:43 +03:00
|
|
|
static inline void *
|
|
|
|
deconst(const void *p)
|
|
|
|
{
|
|
|
|
return (char *)0 + ((const char *)p - (const char *)0);
|
|
|
|
}
|
1997-10-15 08:35:17 +04:00
|
|
|
|
1999-07-05 01:32:48 +04:00
|
|
|
#include "msg_defs.h"
|
2008-01-24 02:15:37 +03:00
|
|
|
#include "menu_defs.h"
|
1999-07-05 01:32:48 +04:00
|
|
|
|
2003-11-30 17:36:43 +03:00
|
|
|
#define min(a,b) ((a) < (b) ? (a) : (b))
|
|
|
|
#define max(a,b) ((a) > (b) ? (a) : (b))
|
2000-01-13 21:52:21 +03:00
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* constants */
|
2003-06-07 01:37:13 +04:00
|
|
|
#define MEG (1024 * 1024)
|
1997-09-27 03:02:53 +04:00
|
|
|
#define STRSIZE 255
|
1997-10-07 08:01:29 +04:00
|
|
|
#define SSTRSIZE 30
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* For run.c: collect() */
|
2003-11-30 17:36:43 +03:00
|
|
|
#define T_FILE 0
|
|
|
|
#define T_OUTPUT 1
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2006-01-13 01:02:44 +03:00
|
|
|
/* Some install status/response values */
|
|
|
|
#define SET_OK 0 /* Set extracted */
|
|
|
|
#define SET_RETRY 1 /* Retry */
|
|
|
|
#define SET_SKIP 2 /* Skip this set */
|
|
|
|
#define SET_SKIP_GROUP 3 /* Skip this set and rest of group */
|
|
|
|
#define SET_ABANDON 4 /* Abandon installation */
|
|
|
|
#define SET_CONTINUE 5 /* Continue (copy from floppy loop) */
|
|
|
|
|
2000-10-12 03:47:55 +04:00
|
|
|
/* run_prog flags */
|
2003-10-20 00:17:31 +04:00
|
|
|
#define RUN_DISPLAY 0x0001 /* Display program output */
|
2000-10-12 03:47:55 +04:00
|
|
|
#define RUN_FATAL 0x0002 /* errors are fatal */
|
|
|
|
#define RUN_CHROOT 0x0004 /* chroot to target disk */
|
|
|
|
#define RUN_FULLSCREEN 0x0008 /* fullscreen (use with RUN_DISPLAY) */
|
2003-10-20 00:17:31 +04:00
|
|
|
#define RUN_SILENT 0x0010 /* Do not show output */
|
|
|
|
#define RUN_ERROR_OK 0x0040 /* Don't wait for error confirmation */
|
|
|
|
#define RUN_PROGRESS 0x0080 /* Output is just progess test */
|
2003-11-30 17:36:43 +03:00
|
|
|
#define RUN_NO_CLEAR 0x0100 /* Leave program output after error */
|
2006-01-13 01:02:44 +03:00
|
|
|
#define RUN_XFER_DIR 0x0200 /* cd to xfer_dir in child */
|
2000-10-12 03:47:55 +04:00
|
|
|
|
2003-06-12 01:35:35 +04:00
|
|
|
/* Installation sets */
|
2006-01-13 01:02:44 +03:00
|
|
|
enum {
|
|
|
|
SET_NONE,
|
|
|
|
SET_KERNEL_FIRST,
|
|
|
|
SET_KERNEL_1, /* Usually GENERIC */
|
|
|
|
SET_KERNEL_2, /* MD kernel... */
|
|
|
|
SET_KERNEL_3, /* MD kernel... */
|
|
|
|
SET_KERNEL_4, /* MD kernel... */
|
|
|
|
SET_KERNEL_5, /* MD kernel... */
|
|
|
|
SET_KERNEL_6, /* MD kernel... */
|
|
|
|
SET_KERNEL_7, /* MD kernel... */
|
|
|
|
SET_KERNEL_8, /* MD kernel... */
|
|
|
|
SET_KERNEL_LAST, /* allow 8 kernels */
|
|
|
|
|
|
|
|
/* System sets */
|
|
|
|
SET_BASE, /* base */
|
|
|
|
SET_ETC, /* /etc */
|
|
|
|
SET_COMPILER, /* compiler tools */
|
|
|
|
SET_GAMES, /* text games */
|
|
|
|
SET_MAN_PAGES, /* online manual pages */
|
|
|
|
SET_MISC, /* miscellaneuous */
|
2009-09-07 06:31:53 +04:00
|
|
|
SET_MODULES, /* kernel modules */
|
2007-11-12 18:07:33 +03:00
|
|
|
SET_TESTS, /* tests */
|
2006-01-13 01:02:44 +03:00
|
|
|
SET_TEXT_TOOLS, /* text processing tools */
|
|
|
|
|
|
|
|
/* X11 sets */
|
|
|
|
SET_X11_FIRST,
|
|
|
|
SET_X11_BASE, /* X11 base and clients */
|
|
|
|
SET_X11_FONTS, /* X11 fonts */
|
|
|
|
SET_X11_SERVERS, /* X11 servers */
|
|
|
|
SET_X11_PROG, /* X11 programming */
|
|
|
|
SET_X11_ETC, /* X11 config */
|
|
|
|
SET_X11_LAST,
|
|
|
|
|
2011-07-01 00:09:15 +04:00
|
|
|
/* Machine dependent sets */
|
|
|
|
SET_MD_1, /* Machine dependent set */
|
|
|
|
SET_MD_2, /* Machine dependent set */
|
|
|
|
SET_MD_3, /* Machine dependent set */
|
|
|
|
SET_MD_4, /* Machine dependent set */
|
2012-01-11 01:02:47 +04:00
|
|
|
|
|
|
|
/* Source sets */
|
|
|
|
SET_SYSSRC,
|
|
|
|
SET_SRC,
|
|
|
|
SET_SHARESRC,
|
|
|
|
SET_GNUSRC,
|
|
|
|
SET_XSRC,
|
2006-01-13 01:02:44 +03:00
|
|
|
|
|
|
|
SET_LAST,
|
|
|
|
SET_GROUP, /* Start of submenu */
|
|
|
|
SET_GROUP_END, /* End of submenu */
|
2012-04-07 03:48:53 +04:00
|
|
|
SET_PKGSRC, /* pkgsrc, not counted as regular set */
|
2006-01-13 01:02:44 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Initialisers to select sets */
|
|
|
|
/* All kernels */
|
|
|
|
#define SET_KERNEL SET_KERNEL_1, SET_KERNEL_2, SET_KERNEL_3, SET_KERNEL_4, \
|
|
|
|
SET_KERNEL_5, SET_KERNEL_6, SET_KERNEL_7, SET_KERNEL_8
|
2006-09-04 06:20:40 +04:00
|
|
|
/* Core system sets */
|
2009-09-07 06:31:53 +04:00
|
|
|
#define SET_CORE SET_MODULES, SET_BASE, SET_ETC
|
2006-01-13 01:02:44 +03:00
|
|
|
/* All system sets */
|
2006-09-04 06:20:40 +04:00
|
|
|
#define SET_SYSTEM SET_CORE, SET_COMPILER, SET_GAMES, \
|
2007-11-12 18:07:33 +03:00
|
|
|
SET_MAN_PAGES, SET_MISC, SET_TESTS, SET_TEXT_TOOLS
|
2006-01-13 01:02:44 +03:00
|
|
|
/* All X11 sets */
|
|
|
|
#define SET_X11_NOSERVERS SET_X11_BASE, SET_X11_FONTS, SET_X11_PROG, SET_X11_ETC
|
|
|
|
#define SET_X11 SET_X11_NOSERVERS, SET_X11_SERVERS
|
|
|
|
|
2011-07-01 00:09:15 +04:00
|
|
|
/* All machine dependent sets */
|
2006-01-13 01:02:44 +03:00
|
|
|
#define SET_MD SET_MD_1, SET_MD_2, SET_MD_3, SET_MD_4
|
2003-06-12 01:35:35 +04:00
|
|
|
|
2012-01-11 01:02:47 +04:00
|
|
|
/* All source sets */
|
|
|
|
#define SET_SOURCE SET_SYSSRC, SET_SRC, SET_SHARESRC, SET_GNUSRC, SET_XSRC
|
|
|
|
|
2011-02-01 04:42:07 +03:00
|
|
|
/* Set list flags */
|
|
|
|
#define SFLAG_MINIMAL 1
|
|
|
|
#define SFLAG_NOX 2
|
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* Macros */
|
2003-06-05 00:05:12 +04:00
|
|
|
#define nelem(x) (sizeof (x) / sizeof *(x))
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* Round up to the next full cylinder size */
|
2003-06-05 00:05:12 +04:00
|
|
|
#define NUMSEC(size, sizemult, cylsize) \
|
2010-01-03 00:16:46 +03:00
|
|
|
((size) == ~0u ? ~0u : (sizemult) == 1 ? (size) : \
|
2006-10-05 01:27:27 +04:00
|
|
|
roundup((size) * (sizemult), (cylsize)))
|
1997-12-10 07:36:19 +03:00
|
|
|
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
/* What FS type? */
|
|
|
|
#define PI_ISBSDFS(p) ((p)->pi_fstype == FS_BSDLFS || \
|
|
|
|
(p)->pi_fstype == FS_BSDFFS)
|
|
|
|
|
2012-06-23 00:54:39 +04:00
|
|
|
/* standard cd0 device */
|
|
|
|
#define CD_NAMES "cd0a"
|
2011-01-26 13:58:19 +03:00
|
|
|
|
1997-10-29 04:06:42 +03:00
|
|
|
/* Types */
|
|
|
|
typedef struct distinfo {
|
2003-07-25 12:26:21 +04:00
|
|
|
const char *name;
|
2004-04-19 01:34:56 +04:00
|
|
|
uint set;
|
2003-06-12 01:35:35 +04:00
|
|
|
const char *desc;
|
2004-04-19 01:34:56 +04:00
|
|
|
const char *marker_file; /* set assumed installed if exists */
|
1997-10-29 04:06:42 +03:00
|
|
|
} distinfo;
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1999-03-31 04:44:48 +04:00
|
|
|
typedef struct _partinfo {
|
2003-07-07 16:30:19 +04:00
|
|
|
struct partition pi_partition;
|
|
|
|
#define pi_size pi_partition.p_size
|
|
|
|
#define pi_offset pi_partition.p_offset
|
|
|
|
#define pi_fsize pi_partition.p_fsize
|
|
|
|
#define pi_fstype pi_partition.p_fstype
|
|
|
|
#define pi_frag pi_partition.p_frag
|
|
|
|
#define pi_cpg pi_partition.p_cpg
|
2003-06-05 00:05:12 +04:00
|
|
|
char pi_mount[20];
|
2003-11-30 17:36:43 +03:00
|
|
|
uint pi_isize; /* bytes per inode (for # inodes) */
|
2003-07-07 16:30:19 +04:00
|
|
|
uint pi_flags;
|
2003-08-10 18:51:48 +04:00
|
|
|
#define PIF_NEWFS 0x0001 /* need to 'newfs' partition */
|
2003-11-30 17:36:43 +03:00
|
|
|
#define PIF_FFSv2 0x0002 /* newfs with FFSv2, not FFSv1 */
|
|
|
|
#define PIF_MOUNT 0x0004 /* need to mount partition */
|
2003-08-10 18:51:48 +04:00
|
|
|
#define PIF_ASYNC 0x0010 /* mount -o async */
|
|
|
|
#define PIF_NOATIME 0x0020 /* mount -o noatime */
|
|
|
|
#define PIF_NODEV 0x0040 /* mount -o nodev */
|
|
|
|
#define PIF_NODEVMTIME 0x0080 /* mount -o nodevmtime */
|
|
|
|
#define PIF_NOEXEC 0x0100 /* mount -o noexec */
|
|
|
|
#define PIF_NOSUID 0x0200 /* mount -o nosuid */
|
2009-02-22 14:21:55 +03:00
|
|
|
#define PIF__UNUSED 0x0400 /* unused */
|
2008-08-08 06:54:06 +04:00
|
|
|
#define PIF_LOG 0x0800 /* mount -o log */
|
2003-08-10 18:51:48 +04:00
|
|
|
#define PIF_MOUNT_OPTS 0x0ff0 /* all above mount flags */
|
|
|
|
#define PIF_RESET 0x1000 /* internal - restore previous values */
|
1999-03-31 04:44:48 +04:00
|
|
|
} partinfo; /* Single partition from a disklabel */
|
1997-12-04 14:27:56 +03:00
|
|
|
|
2008-01-24 02:15:37 +03:00
|
|
|
struct ptn_info {
|
|
|
|
int menu_no;
|
|
|
|
struct ptn_size {
|
|
|
|
int ptn_id;
|
|
|
|
char mount[20];
|
2009-05-14 20:23:38 +04:00
|
|
|
daddr_t dflt_size;
|
|
|
|
daddr_t size;
|
2008-01-24 02:15:37 +03:00
|
|
|
int limit;
|
|
|
|
int changed;
|
|
|
|
} ptn_sizes[MAXPARTITIONS + 1]; /* +1 for delete code */
|
|
|
|
menu_ent ptn_menus[MAXPARTITIONS + 1]; /* +1 for unit chg */
|
|
|
|
int free_parts;
|
2009-05-14 20:23:38 +04:00
|
|
|
daddr_t free_space;
|
2008-01-24 02:15:37 +03:00
|
|
|
struct ptn_size *pool_part;
|
|
|
|
char exit_msg[70];
|
|
|
|
};
|
2003-06-12 01:35:35 +04:00
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* variables */
|
|
|
|
|
2004-06-06 10:06:59 +04:00
|
|
|
int debug; /* set by -D option */
|
2003-06-25 19:45:21 +04:00
|
|
|
|
2004-06-06 10:06:59 +04:00
|
|
|
char rel[SSTRSIZE];
|
|
|
|
char machine[SSTRSIZE];
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2004-06-06 10:06:59 +04:00
|
|
|
int yesno;
|
|
|
|
int ignorerror;
|
|
|
|
int ttysig_ignore;
|
|
|
|
pid_t ttysig_forward;
|
|
|
|
int layoutkind;
|
|
|
|
int sizemult;
|
2011-04-04 12:30:12 +04:00
|
|
|
const char *multname;
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1999-01-21 11:02:17 +03:00
|
|
|
/* loging variables */
|
|
|
|
|
2004-06-06 10:06:59 +04:00
|
|
|
FILE *logfp;
|
|
|
|
FILE *script;
|
1999-01-21 11:02:17 +03:00
|
|
|
|
1997-10-07 08:01:29 +04:00
|
|
|
/* Actual name of the disk. */
|
2004-06-06 10:06:59 +04:00
|
|
|
char diskdev[SSTRSIZE];
|
|
|
|
int no_mbr; /* set for raid (etc) */
|
|
|
|
int rootpart; /* partition we install into */
|
|
|
|
const char *disktype; /* ST506, SCSI, ... */
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2003-05-21 14:05:20 +04:00
|
|
|
/* Area of disk we can allocate, start and size in disk sectors. */
|
2009-05-14 20:23:38 +04:00
|
|
|
daddr_t ptstart, ptsize;
|
Rather big update to sysinst, in order to get it working on the prep port.
1) Add an md_post_extract() function. This function is called after
extracting the sets, and allows the arch to do something at that time.
In the case of prep, it is much easier to install the bootcode after all
the sets are extracted, so we do it in md_post_extract(). Added empty
md_post_extract() functions to all other arches so they compile.
2) Add md_mbr_use_wholedisk() and md_check_mbr(). In edit_mbr() I have
split off the code that uses the whole disk for NetBSD, into the
mbr_use_wholedisk() function. On most ports that use mbr.c, I made
md_mbr_use_wholedisk() just call that and return. On prep we create the
magical prep boot partition here. The md_check_mbr() function allows the
arch to add additional checks after the user had manually edited the MBR
to make sure the choices he made allow NetBSD to function. Added a dummy
routine to all mbr.c using arches.
3) Added code to bsdlabel.c to create a partition of type boot if
PART_BOOT is defined, but BOOT_SIZE is not defined. Also added two more
globals "bootsize" and "bootstart" which must be seeded in order to do
so. This is done on prep in md_check_mbr().
4) Added MBR_PTYPE_PREP to the list of MBR partitions.
5) Made the prep port actually install sanely. It now creates a prep
boot partition, labels it correctly, installs all the sets, and then runs
mkbootimage and dd's the bootimage into the prep partition. The result
is a prep installer that creates a bootable NetBSD installation
automatically.
6) Edited the prep menus and messages files to add new labels. In the
case of the translated files, I just added the words in english for
someone to translate later.
I tried to xcompile a few arches to make sure I didn't break anything,
but I could have missed something. Please let me know if I have broken
your arch in any way. I'll watch the autobuilds for the next few days
too. For all ports other than prep there should be no functional changes
at all.
2006-04-05 20:55:01 +04:00
|
|
|
/* If we have an MBR boot partition, start and size in sectors */
|
|
|
|
int bootstart, bootsize;
|
1997-11-01 02:00:32 +03:00
|
|
|
|
2003-07-11 19:28:58 +04:00
|
|
|
/* Actual values for current disk - set by find_disks() or md_get_info() */
|
2004-06-06 10:06:59 +04:00
|
|
|
int sectorsize;
|
2009-05-14 20:23:38 +04:00
|
|
|
int dlcyl, dlhead, dlsec, dlcylsize;
|
|
|
|
daddr_t dlsize;
|
2004-06-06 10:06:59 +04:00
|
|
|
int current_cylsize;
|
2005-02-20 23:54:52 +03:00
|
|
|
unsigned int root_limit; /* BIOS (etc) read limit */
|
2003-05-21 14:05:20 +04:00
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* Information for the NetBSD disklabel */
|
2003-11-30 17:36:43 +03:00
|
|
|
enum DLTR { PART_A, PART_B, PART_C, PART_D, PART_E, PART_F, PART_G, PART_H,
|
|
|
|
PART_I, PART_J, PART_K, PART_L, PART_M, PART_N, PART_O, PART_P};
|
1999-08-16 12:29:04 +04:00
|
|
|
#define partition_name(x) ('a' + (x))
|
2004-06-06 10:06:59 +04:00
|
|
|
partinfo oldlabel[MAXPARTITIONS]; /* What we found on the disk */
|
|
|
|
partinfo bsdlabel[MAXPARTITIONS]; /* What we want it to look like */
|
2009-10-18 16:09:48 +04:00
|
|
|
daddr_t tmp_ramdisk_size;
|
2003-06-05 00:05:12 +04:00
|
|
|
|
2003-10-20 00:17:31 +04:00
|
|
|
#define DISKNAME_SIZE 16
|
2004-06-06 10:06:59 +04:00
|
|
|
char bsddiskname[DISKNAME_SIZE];
|
|
|
|
const char *doessf;
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1997-11-11 03:43:31 +03:00
|
|
|
/* Relative file name for storing a distribution. */
|
2011-04-04 12:30:12 +04:00
|
|
|
char xfer_dir[STRSIZE];
|
2006-01-13 01:02:44 +03:00
|
|
|
int clean_xfer_dir;
|
1998-10-25 22:15:04 +03:00
|
|
|
|
2002-06-06 13:53:22 +04:00
|
|
|
#if !defined(SYSINST_FTP_HOST)
|
2003-11-30 17:36:43 +03:00
|
|
|
#define SYSINST_FTP_HOST "ftp.NetBSD.org"
|
2000-03-25 00:56:04 +03:00
|
|
|
#endif
|
|
|
|
|
2002-06-06 13:53:22 +04:00
|
|
|
#if !defined(SYSINST_FTP_DIR)
|
2004-06-06 01:18:59 +04:00
|
|
|
#define SYSINST_FTP_DIR "pub/NetBSD/NetBSD-" REL
|
2002-06-06 13:53:22 +04:00
|
|
|
#endif
|
2000-03-25 00:56:04 +03:00
|
|
|
|
2012-04-07 03:48:53 +04:00
|
|
|
#if !defined(SYSINST_PKG_HOST)
|
|
|
|
#define SYSINST_PKG_HOST SYSINST_FTP_HOST
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(SYSINST_PKG_DIR)
|
|
|
|
#define SYSINST_PKG_DIR "pub/pkgsrc/packages/NetBSD"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !defined(SYSINST_PKGSRC_HOST)
|
|
|
|
#define SYSINST_PKGSRC_HOST SYSINST_PKG_HOST
|
|
|
|
#endif
|
|
|
|
|
2012-01-11 01:02:47 +04:00
|
|
|
/* Abs. path we extract binary sets from */
|
|
|
|
char ext_dir_bin[STRSIZE];
|
|
|
|
|
|
|
|
/* Abs. path we extract source sets from */
|
|
|
|
char ext_dir_src[STRSIZE];
|
|
|
|
|
2012-04-07 03:48:53 +04:00
|
|
|
/* Abs. path we extract pkgsrc from */
|
|
|
|
char ext_dir_pkgsrc[STRSIZE];
|
|
|
|
|
2012-01-11 01:02:47 +04:00
|
|
|
/* Place we look for binary sets in all fs types */
|
|
|
|
char set_dir_bin[STRSIZE];
|
2004-06-06 01:18:59 +04:00
|
|
|
|
2012-01-11 01:02:47 +04:00
|
|
|
/* Place we look for source sets in all fs types */
|
|
|
|
char set_dir_src[STRSIZE];
|
2004-06-06 01:18:59 +04:00
|
|
|
|
2012-04-07 03:48:53 +04:00
|
|
|
/* Place we look for pkgs in all fs types */
|
|
|
|
char pkg_dir[STRSIZE];
|
|
|
|
|
|
|
|
/* Place we look for pkgsrc in all fs types */
|
|
|
|
char pkgsrc_dir[STRSIZE];
|
|
|
|
|
|
|
|
struct ftpinfo {
|
2006-01-13 01:02:44 +03:00
|
|
|
char host[STRSIZE];
|
|
|
|
char dir[STRSIZE] ;
|
|
|
|
char user[SSTRSIZE];
|
|
|
|
char pass[STRSIZE];
|
|
|
|
char proxy[STRSIZE];
|
|
|
|
const char *xfer_type; /* "ftp" or "http" */
|
2012-04-07 03:48:53 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/* use the same struct for sets ftp and to build pkgpath */
|
|
|
|
struct ftpinfo ftp, pkg, pkgsrc;
|
1997-09-27 03:02:53 +04:00
|
|
|
|
2006-01-13 01:02:44 +03:00
|
|
|
int (*fetch_fn)(const char *);
|
2004-06-06 10:06:59 +04:00
|
|
|
char nfs_host[STRSIZE];
|
|
|
|
char nfs_dir[STRSIZE];
|
1997-10-15 08:35:17 +04:00
|
|
|
|
2006-02-26 13:25:52 +03:00
|
|
|
char cdrom_dev[SSTRSIZE]; /* Typically "cd0a" */
|
|
|
|
char fd_dev[SSTRSIZE]; /* Typically "/dev/fd0a" */
|
|
|
|
const char *fd_type; /* "msdos", "ffs" or maybe "ados" */
|
1997-10-20 10:13:25 +04:00
|
|
|
|
2004-06-06 10:06:59 +04:00
|
|
|
char localfs_dev[SSTRSIZE];
|
|
|
|
char localfs_fs[SSTRSIZE];
|
|
|
|
char localfs_dir[STRSIZE];
|
1997-11-06 01:45:53 +03:00
|
|
|
|
2004-06-06 10:06:59 +04:00
|
|
|
char targetroot_mnt[SSTRSIZE];
|
1998-02-20 05:33:51 +03:00
|
|
|
|
2004-06-06 10:06:59 +04:00
|
|
|
int mnt2_mounted;
|
1997-10-20 10:13:25 +04:00
|
|
|
|
2004-06-06 10:06:59 +04:00
|
|
|
char dist_postfix[SSTRSIZE];
|
1997-11-25 09:53:07 +03:00
|
|
|
|
1997-09-27 03:02:53 +04:00
|
|
|
/* needed prototypes */
|
2003-06-05 00:05:12 +04:00
|
|
|
void set_menu_numopts(int, int);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* Machine dependent functions .... */
|
defs.h:
- Re-order the md_*() definitions so they are in the order called
- Add some comments
- Remove obsolete md_set_no_x() definition
- Remove md_copy_filesystem()
- #if defined(DEBUG) declare backtowin(void) to avoid scattering
externs in various md .c files
mbr.[ch]:
- Add a set_bios_geom_with_mbr_guess() which can be called by all
the non x86 ports rather than copying the same code into arc,
bebox, cobalt, evbmips, evbppc, hpcarm, hpcmips, landisk, ofppc,
prep, sandpoint, and zaurus md.c
install.c:
- Remove now unnecessary call to md_copy_filesystem()
upgrade.c:
- Move move_aout_libs() here, and put under #ifdef AOUT2ELF
- Rather than having *every* md_update call wrefresh(curscr),
wmove(stdscr, 0, 0), wclear(stdscr), and wrefresh(stdscr),
move them here
arch/acorn26/md.c:
- Just include arch/acorn32/md.c, but add a note there warning
about this, and while here add a note to i386/md.c that it
is included by amd64
arch/*/md.c:
- By all means "Vive la difference", but we have 38 pairs of md.[ch],
and they could not even agree on the order in which to list the
md hooks, let alone formatting. Sort the md hooks to match the
(now sane) order in def.sh, and try to normalise the formatting
- Also copy across some function level comments everywhere
- Ensure functions only used inside each md.c are defined as static
- Remove some now unused functions
- Some files had enable_rc_conf in #ifdef DEBUG. Add this to all
- bebox, evbppc and sandpoint were still playing broken games with
copying the booted ramdisk to the target disk, the primary result
of which was just to slow things down and ensure the target system
lost the .profile extracted from the sets. Just kill this.
- For some ports md_update() called endwin(), and in others not.
Take a cure from i386/amd64 and a few other more active ports,
and update everything to match (no endwin())
- In a couple of cases correct port names in comments
- ANSIfy some lingering old style functions
- Consistently use "return 0;" rather than "return (0);"
More of the mbr code should be abstracted, along with the
get_ramsize() / set_swap() logic, but this is (more than)
enough for one day...
sysinst built for all ports but only runtime tested on amd64 & i386
2009-09-19 18:57:27 +04:00
|
|
|
void md_init(void);
|
2011-02-01 04:42:07 +03:00
|
|
|
void md_init_set_status(int); /* SFLAG_foo */
|
defs.h:
- Re-order the md_*() definitions so they are in the order called
- Add some comments
- Remove obsolete md_set_no_x() definition
- Remove md_copy_filesystem()
- #if defined(DEBUG) declare backtowin(void) to avoid scattering
externs in various md .c files
mbr.[ch]:
- Add a set_bios_geom_with_mbr_guess() which can be called by all
the non x86 ports rather than copying the same code into arc,
bebox, cobalt, evbmips, evbppc, hpcarm, hpcmips, landisk, ofppc,
prep, sandpoint, and zaurus md.c
install.c:
- Remove now unnecessary call to md_copy_filesystem()
upgrade.c:
- Move move_aout_libs() here, and put under #ifdef AOUT2ELF
- Rather than having *every* md_update call wrefresh(curscr),
wmove(stdscr, 0, 0), wclear(stdscr), and wrefresh(stdscr),
move them here
arch/acorn26/md.c:
- Just include arch/acorn32/md.c, but add a note there warning
about this, and while here add a note to i386/md.c that it
is included by amd64
arch/*/md.c:
- By all means "Vive la difference", but we have 38 pairs of md.[ch],
and they could not even agree on the order in which to list the
md hooks, let alone formatting. Sort the md hooks to match the
(now sane) order in def.sh, and try to normalise the formatting
- Also copy across some function level comments everywhere
- Ensure functions only used inside each md.c are defined as static
- Remove some now unused functions
- Some files had enable_rc_conf in #ifdef DEBUG. Add this to all
- bebox, evbppc and sandpoint were still playing broken games with
copying the booted ramdisk to the target disk, the primary result
of which was just to slow things down and ensure the target system
lost the .profile extracted from the sets. Just kill this.
- For some ports md_update() called endwin(), and in others not.
Take a cure from i386/amd64 and a few other more active ports,
and update everything to match (no endwin())
- In a couple of cases correct port names in comments
- ANSIfy some lingering old style functions
- Consistently use "return 0;" rather than "return (0);"
More of the mbr code should be abstracted, along with the
get_ramsize() / set_swap() logic, but this is (more than)
enough for one day...
sysinst built for all ports but only runtime tested on amd64 & i386
2009-09-19 18:57:27 +04:00
|
|
|
|
|
|
|
/* MD functions if user selects install - in order called */
|
2003-05-19 00:40:09 +04:00
|
|
|
int md_get_info(void);
|
|
|
|
int md_make_bsd_partitions(void);
|
defs.h:
- Re-order the md_*() definitions so they are in the order called
- Add some comments
- Remove obsolete md_set_no_x() definition
- Remove md_copy_filesystem()
- #if defined(DEBUG) declare backtowin(void) to avoid scattering
externs in various md .c files
mbr.[ch]:
- Add a set_bios_geom_with_mbr_guess() which can be called by all
the non x86 ports rather than copying the same code into arc,
bebox, cobalt, evbmips, evbppc, hpcarm, hpcmips, landisk, ofppc,
prep, sandpoint, and zaurus md.c
install.c:
- Remove now unnecessary call to md_copy_filesystem()
upgrade.c:
- Move move_aout_libs() here, and put under #ifdef AOUT2ELF
- Rather than having *every* md_update call wrefresh(curscr),
wmove(stdscr, 0, 0), wclear(stdscr), and wrefresh(stdscr),
move them here
arch/acorn26/md.c:
- Just include arch/acorn32/md.c, but add a note there warning
about this, and while here add a note to i386/md.c that it
is included by amd64
arch/*/md.c:
- By all means "Vive la difference", but we have 38 pairs of md.[ch],
and they could not even agree on the order in which to list the
md hooks, let alone formatting. Sort the md hooks to match the
(now sane) order in def.sh, and try to normalise the formatting
- Also copy across some function level comments everywhere
- Ensure functions only used inside each md.c are defined as static
- Remove some now unused functions
- Some files had enable_rc_conf in #ifdef DEBUG. Add this to all
- bebox, evbppc and sandpoint were still playing broken games with
copying the booted ramdisk to the target disk, the primary result
of which was just to slow things down and ensure the target system
lost the .profile extracted from the sets. Just kill this.
- For some ports md_update() called endwin(), and in others not.
Take a cure from i386/amd64 and a few other more active ports,
and update everything to match (no endwin())
- In a couple of cases correct port names in comments
- ANSIfy some lingering old style functions
- Consistently use "return 0;" rather than "return (0);"
More of the mbr code should be abstracted, along with the
get_ramsize() / set_swap() logic, but this is (more than)
enough for one day...
sysinst built for all ports but only runtime tested on amd64 & i386
2009-09-19 18:57:27 +04:00
|
|
|
int md_check_partitions(void);
|
|
|
|
int md_pre_disklabel(void);
|
2003-05-19 00:40:09 +04:00
|
|
|
int md_post_disklabel(void);
|
2011-11-04 15:27:00 +04:00
|
|
|
int md_pre_mount(void);
|
2003-05-19 00:40:09 +04:00
|
|
|
int md_post_newfs(void);
|
defs.h:
- Re-order the md_*() definitions so they are in the order called
- Add some comments
- Remove obsolete md_set_no_x() definition
- Remove md_copy_filesystem()
- #if defined(DEBUG) declare backtowin(void) to avoid scattering
externs in various md .c files
mbr.[ch]:
- Add a set_bios_geom_with_mbr_guess() which can be called by all
the non x86 ports rather than copying the same code into arc,
bebox, cobalt, evbmips, evbppc, hpcarm, hpcmips, landisk, ofppc,
prep, sandpoint, and zaurus md.c
install.c:
- Remove now unnecessary call to md_copy_filesystem()
upgrade.c:
- Move move_aout_libs() here, and put under #ifdef AOUT2ELF
- Rather than having *every* md_update call wrefresh(curscr),
wmove(stdscr, 0, 0), wclear(stdscr), and wrefresh(stdscr),
move them here
arch/acorn26/md.c:
- Just include arch/acorn32/md.c, but add a note there warning
about this, and while here add a note to i386/md.c that it
is included by amd64
arch/*/md.c:
- By all means "Vive la difference", but we have 38 pairs of md.[ch],
and they could not even agree on the order in which to list the
md hooks, let alone formatting. Sort the md hooks to match the
(now sane) order in def.sh, and try to normalise the formatting
- Also copy across some function level comments everywhere
- Ensure functions only used inside each md.c are defined as static
- Remove some now unused functions
- Some files had enable_rc_conf in #ifdef DEBUG. Add this to all
- bebox, evbppc and sandpoint were still playing broken games with
copying the booted ramdisk to the target disk, the primary result
of which was just to slow things down and ensure the target system
lost the .profile extracted from the sets. Just kill this.
- For some ports md_update() called endwin(), and in others not.
Take a cure from i386/amd64 and a few other more active ports,
and update everything to match (no endwin())
- In a couple of cases correct port names in comments
- ANSIfy some lingering old style functions
- Consistently use "return 0;" rather than "return (0);"
More of the mbr code should be abstracted, along with the
get_ramsize() / set_swap() logic, but this is (more than)
enough for one day...
sysinst built for all ports but only runtime tested on amd64 & i386
2009-09-19 18:57:27 +04:00
|
|
|
int md_post_extract(void);
|
|
|
|
void md_cleanup_install(void);
|
|
|
|
|
|
|
|
/* MD functions if user selects upgrade - in order called */
|
2003-05-19 00:40:09 +04:00
|
|
|
int md_pre_update(void);
|
|
|
|
int md_update(void);
|
defs.h:
- Re-order the md_*() definitions so they are in the order called
- Add some comments
- Remove obsolete md_set_no_x() definition
- Remove md_copy_filesystem()
- #if defined(DEBUG) declare backtowin(void) to avoid scattering
externs in various md .c files
mbr.[ch]:
- Add a set_bios_geom_with_mbr_guess() which can be called by all
the non x86 ports rather than copying the same code into arc,
bebox, cobalt, evbmips, evbppc, hpcarm, hpcmips, landisk, ofppc,
prep, sandpoint, and zaurus md.c
install.c:
- Remove now unnecessary call to md_copy_filesystem()
upgrade.c:
- Move move_aout_libs() here, and put under #ifdef AOUT2ELF
- Rather than having *every* md_update call wrefresh(curscr),
wmove(stdscr, 0, 0), wclear(stdscr), and wrefresh(stdscr),
move them here
arch/acorn26/md.c:
- Just include arch/acorn32/md.c, but add a note there warning
about this, and while here add a note to i386/md.c that it
is included by amd64
arch/*/md.c:
- By all means "Vive la difference", but we have 38 pairs of md.[ch],
and they could not even agree on the order in which to list the
md hooks, let alone formatting. Sort the md hooks to match the
(now sane) order in def.sh, and try to normalise the formatting
- Also copy across some function level comments everywhere
- Ensure functions only used inside each md.c are defined as static
- Remove some now unused functions
- Some files had enable_rc_conf in #ifdef DEBUG. Add this to all
- bebox, evbppc and sandpoint were still playing broken games with
copying the booted ramdisk to the target disk, the primary result
of which was just to slow things down and ensure the target system
lost the .profile extracted from the sets. Just kill this.
- For some ports md_update() called endwin(), and in others not.
Take a cure from i386/amd64 and a few other more active ports,
and update everything to match (no endwin())
- In a couple of cases correct port names in comments
- ANSIfy some lingering old style functions
- Consistently use "return 0;" rather than "return (0);"
More of the mbr code should be abstracted, along with the
get_ramsize() / set_swap() logic, but this is (more than)
enough for one day...
sysinst built for all ports but only runtime tested on amd64 & i386
2009-09-19 18:57:27 +04:00
|
|
|
/* Also calls md_post_extract() */
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1997-12-04 12:05:35 +03:00
|
|
|
/* from main.c */
|
2003-05-19 00:40:09 +04:00
|
|
|
void toplevel(void);
|
1997-12-04 12:05:35 +03:00
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* from disks.c */
|
2012-06-23 00:54:39 +04:00
|
|
|
const char *get_default_cdrom(void);
|
2003-06-28 02:20:14 +04:00
|
|
|
int find_disks(const char *);
|
2003-07-07 16:30:19 +04:00
|
|
|
struct menudesc;
|
|
|
|
void fmt_fspart(struct menudesc *, int, void *);
|
2003-05-19 00:40:09 +04:00
|
|
|
void disp_cur_fspart(int, int);
|
|
|
|
int write_disklabel(void);
|
|
|
|
int make_filesystems(void);
|
|
|
|
int make_fstab(void);
|
2003-11-30 17:36:43 +03:00
|
|
|
int mount_disks(void);
|
2003-06-16 14:42:47 +04:00
|
|
|
int set_swap(const char *, partinfo *);
|
|
|
|
int check_swap(const char *, int);
|
2009-04-07 14:45:04 +04:00
|
|
|
char *bootxx_name(void);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
/* from disks_lfs.c */
|
2003-05-19 00:40:09 +04:00
|
|
|
int fs_is_lfs(void *);
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
|
1997-12-04 14:27:56 +03:00
|
|
|
/* from label.c */
|
2006-06-10 18:48:46 +04:00
|
|
|
const char *get_last_mounted(int, int, partinfo *);
|
2003-05-19 00:40:09 +04:00
|
|
|
int savenewlabel(partinfo *, int);
|
|
|
|
int incorelabel(const char *, partinfo *);
|
|
|
|
int edit_and_check_label(partinfo *, int, int, int);
|
2003-11-30 17:36:43 +03:00
|
|
|
void set_bsize(partinfo *, int);
|
|
|
|
void set_fsize(partinfo *, int);
|
2005-01-21 00:59:35 +03:00
|
|
|
void set_ptype(partinfo *, int, int);
|
1997-12-04 14:27:56 +03:00
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* from install.c */
|
2003-05-19 00:40:09 +04:00
|
|
|
void do_install(void);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* from factor.c */
|
2003-05-19 00:40:09 +04:00
|
|
|
void factor(long, long *, int, int *);
|
1997-10-15 08:35:17 +04:00
|
|
|
|
1999-03-31 04:44:48 +04:00
|
|
|
/* from fdisk.c */
|
2003-05-19 00:40:09 +04:00
|
|
|
void get_disk_info(char *);
|
|
|
|
void set_disk_info(char *);
|
1999-03-31 04:44:48 +04:00
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* from geom.c */
|
2003-07-07 16:30:19 +04:00
|
|
|
int get_geom(const char *, struct disklabel *);
|
|
|
|
int get_real_geom(const char *, struct disklabel *);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* from net.c */
|
2012-04-07 03:48:53 +04:00
|
|
|
extern int network_up;
|
2003-07-20 02:07:36 +04:00
|
|
|
extern char net_namesvr6[STRSIZE];
|
2004-11-12 00:24:40 +03:00
|
|
|
int get_via_ftp(const char *);
|
2003-05-19 00:40:09 +04:00
|
|
|
int get_via_nfs(void);
|
|
|
|
int config_network(void);
|
|
|
|
void mnt_net_config(void);
|
2012-04-07 03:48:53 +04:00
|
|
|
void make_url(char *, struct ftpinfo *, const char *);
|
|
|
|
int get_pkgsrc(void);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
1997-10-15 08:35:17 +04:00
|
|
|
/* From run.c */
|
2012-01-06 01:22:49 +04:00
|
|
|
int collect(int, char **, const char *, ...) __printflike(3, 4);
|
|
|
|
int run_program(int, const char *, ...) __printflike(2, 3);
|
2003-05-19 00:40:09 +04:00
|
|
|
void do_logging(void);
|
|
|
|
int do_system(const char *);
|
1997-10-15 08:35:17 +04:00
|
|
|
|
|
|
|
/* from upgrade.c */
|
2003-05-19 00:40:09 +04:00
|
|
|
void do_upgrade(void);
|
|
|
|
void do_reinstall_sets(void);
|
2003-07-18 13:44:20 +04:00
|
|
|
void restore_etc(void);
|
1997-09-27 03:02:53 +04:00
|
|
|
|
|
|
|
/* from util.c */
|
2003-05-19 00:40:09 +04:00
|
|
|
int dir_exists_p(const char *);
|
|
|
|
int file_exists_p(const char *);
|
|
|
|
int file_mode_match(const char *, unsigned int);
|
2004-07-17 14:55:03 +04:00
|
|
|
uint get_ramsize(void);
|
2003-05-19 00:40:09 +04:00
|
|
|
void ask_sizemult(int);
|
|
|
|
void run_makedev(void);
|
2011-03-25 01:01:13 +03:00
|
|
|
int boot_media_still_needed(void);
|
2003-05-19 00:40:09 +04:00
|
|
|
int get_via_floppy(void);
|
|
|
|
int get_via_cdrom(void);
|
|
|
|
int get_via_localfs(void);
|
|
|
|
int get_via_localdir(void);
|
|
|
|
void show_cur_distsets(void);
|
|
|
|
void make_ramdisk_dir(const char *);
|
2006-01-13 01:02:44 +03:00
|
|
|
void set_kernel_set(unsigned int);
|
|
|
|
unsigned int get_kernel_set(void);
|
|
|
|
unsigned int set_X11_selected(void);
|
2004-06-06 01:18:59 +04:00
|
|
|
int get_and_unpack_sets(int, msg, msg, msg);
|
2003-05-19 00:40:09 +04:00
|
|
|
int sanity_check(void);
|
|
|
|
int set_timezone(void);
|
2012-01-06 01:22:49 +04:00
|
|
|
void scripting_fprintf(FILE *, const char *, ...) __printflike(2, 3);
|
|
|
|
void scripting_vfprintf(FILE *, const char *, va_list) __printflike(2, 0);
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
void add_rc_conf(const char *, ...);
|
2012-04-07 03:48:53 +04:00
|
|
|
int del_rc_conf(const char *);
|
2012-01-06 01:22:49 +04:00
|
|
|
void add_sysctl_conf(const char *, ...) __printflike(1, 2);
|
2003-10-20 00:17:31 +04:00
|
|
|
void enable_rc_conf(void);
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
void set_sizemultname_cyl(void);
|
|
|
|
void set_sizemultname_meg(void);
|
|
|
|
int check_lfs_progs(void);
|
2006-09-04 06:20:40 +04:00
|
|
|
void init_set_status(int);
|
2003-06-12 01:35:35 +04:00
|
|
|
void customise_sets(void);
|
2003-10-20 00:17:31 +04:00
|
|
|
void umount_mnt2(void);
|
2012-01-11 01:02:47 +04:00
|
|
|
int set_is_source(const char *);
|
|
|
|
const char *set_dir_for_set(const char *);
|
|
|
|
const char *ext_dir_for_set(const char *);
|
2012-04-07 03:48:53 +04:00
|
|
|
void replace(const char *, const char *, ...);
|
|
|
|
void get_tz_default(void);
|
|
|
|
int extract_file(distinfo *, int);
|
1997-11-02 12:41:57 +03:00
|
|
|
|
|
|
|
/* from target.c */
|
defs.h:
- Re-order the md_*() definitions so they are in the order called
- Add some comments
- Remove obsolete md_set_no_x() definition
- Remove md_copy_filesystem()
- #if defined(DEBUG) declare backtowin(void) to avoid scattering
externs in various md .c files
mbr.[ch]:
- Add a set_bios_geom_with_mbr_guess() which can be called by all
the non x86 ports rather than copying the same code into arc,
bebox, cobalt, evbmips, evbppc, hpcarm, hpcmips, landisk, ofppc,
prep, sandpoint, and zaurus md.c
install.c:
- Remove now unnecessary call to md_copy_filesystem()
upgrade.c:
- Move move_aout_libs() here, and put under #ifdef AOUT2ELF
- Rather than having *every* md_update call wrefresh(curscr),
wmove(stdscr, 0, 0), wclear(stdscr), and wrefresh(stdscr),
move them here
arch/acorn26/md.c:
- Just include arch/acorn32/md.c, but add a note there warning
about this, and while here add a note to i386/md.c that it
is included by amd64
arch/*/md.c:
- By all means "Vive la difference", but we have 38 pairs of md.[ch],
and they could not even agree on the order in which to list the
md hooks, let alone formatting. Sort the md hooks to match the
(now sane) order in def.sh, and try to normalise the formatting
- Also copy across some function level comments everywhere
- Ensure functions only used inside each md.c are defined as static
- Remove some now unused functions
- Some files had enable_rc_conf in #ifdef DEBUG. Add this to all
- bebox, evbppc and sandpoint were still playing broken games with
copying the booted ramdisk to the target disk, the primary result
of which was just to slow things down and ensure the target system
lost the .profile extracted from the sets. Just kill this.
- For some ports md_update() called endwin(), and in others not.
Take a cure from i386/amd64 and a few other more active ports,
and update everything to match (no endwin())
- In a couple of cases correct port names in comments
- ANSIfy some lingering old style functions
- Consistently use "return 0;" rather than "return (0);"
More of the mbr code should be abstracted, along with the
get_ramsize() / set_swap() logic, but this is (more than)
enough for one day...
sysinst built for all ports but only runtime tested on amd64 & i386
2009-09-19 18:57:27 +04:00
|
|
|
#if defined(DEBUG) || defined(DEBUG_ROOT)
|
|
|
|
void backtowin(void);
|
|
|
|
#endif
|
2003-05-19 00:40:09 +04:00
|
|
|
const char *concat_paths(const char *, const char *);
|
|
|
|
const char *target_expand(const char *);
|
|
|
|
void make_target_dir(const char *);
|
|
|
|
void append_to_target_file(const char *, const char *);
|
|
|
|
void echo_to_target_file(const char *, const char *);
|
2012-01-06 01:22:49 +04:00
|
|
|
void sprintf_to_target_file(const char *, const char *, ...)
|
|
|
|
__printflike(2, 3);
|
2003-05-19 00:40:09 +04:00
|
|
|
void trunc_target_file(const char *);
|
|
|
|
const char *target_prefix(void);
|
|
|
|
int target_chdir(const char *);
|
|
|
|
void target_chdir_or_die(const char *);
|
|
|
|
int target_already_root(void);
|
|
|
|
FILE *target_fopen(const char *, const char *);
|
2003-07-25 12:26:21 +04:00
|
|
|
int target_collect_file(int, char **, const char *);
|
2003-09-27 14:47:17 +04:00
|
|
|
int is_active_rootpart(const char *, int);
|
2003-05-19 00:40:09 +04:00
|
|
|
int cp_to_target(const char *, const char *);
|
|
|
|
void dup_file_into_target(const char *);
|
|
|
|
void mv_within_target_or_die(const char *, const char *);
|
2003-12-28 08:30:47 +03:00
|
|
|
int cp_within_target(const char *, const char *, int);
|
2003-11-30 17:36:43 +03:00
|
|
|
int target_mount(const char *, const char *, int, const char *);
|
2003-05-19 00:40:09 +04:00
|
|
|
int target_test(unsigned int, const char *);
|
|
|
|
int target_dir_exists_p(const char *);
|
|
|
|
int target_file_exists_p(const char *);
|
|
|
|
int target_symlink_exists_p(const char *);
|
|
|
|
void unwind_mounts(void);
|
2012-04-07 03:48:53 +04:00
|
|
|
int target_mounted(void);
|
1997-12-04 14:27:56 +03:00
|
|
|
|
extend sysinst disk handling, some general clean ups, better /etc support
and some sparc64 fixes. details:
- new scripting_{,v}fprintf() that also write to the script log (if open).
- support of creation of LFS filesystems
- standard installs now allow one to choose which file systems to create,
out of the list of /usr, /var, /home, MFS /tmp, and swap. a / is always
created, but the rest all optional. [*]
- new disklabel method: use existing. this requires one to fill in the
mount points (and having at least a "/" is enforced).
- preservation of existing filesystems (at install) is supported.
- rewrote most of make_fstab(): the entire thing is generated from the
bsdlabel now, rather than hard coding / to 'a' and swap to 'b'. create
MFS /tmp if requested.
- if IPv6 support isn't present, don't display any ipv6 messages.
- better rc.conf support
- sparc & sparc64 default to "cylinders" now.
- choosing "standard" instead of "standard with X" de-selects the X pkgs
by default.
- sparc64: don't install bootblocks until we have a complete system, avoids
booting with no /dev/console.
- sparc64: bump STDNEEDMB, it is way low.
[*] i have added default values for DEFVARSIZE & DEFUSRSIZE (this is used
only if /usr and /home are selected) to each port, based on STDNEEDMB. as
such, my guesses might be wrong so port maintainers should look at these.
2001-01-14 05:38:13 +03:00
|
|
|
/* from bsddisklabel.c */
|
2003-05-21 14:05:20 +04:00
|
|
|
int make_bsd_partitions(void);
|
2009-05-14 20:23:38 +04:00
|
|
|
int save_ptn(int, daddr_t, daddr_t, int, const char *);
|
2008-01-24 02:15:37 +03:00
|
|
|
void set_ptn_titles(menudesc *, int, void *);
|
|
|
|
void set_ptn_menu(struct ptn_info *);
|
|
|
|
int set_ptn_size(menudesc *, void *);
|
2009-05-14 20:23:38 +04:00
|
|
|
void get_ptn_sizes(daddr_t, daddr_t, int);
|
2002-02-04 01:21:55 +03:00
|
|
|
|
|
|
|
/* from aout2elf.c */
|
2003-05-19 00:40:09 +04:00
|
|
|
int move_aout_libs(void);
|
2004-06-12 23:18:24 +04:00
|
|
|
|
|
|
|
#ifdef WSKBD
|
|
|
|
void get_kb_encoding(void);
|
|
|
|
void save_kb_encoding(void);
|
|
|
|
#else
|
|
|
|
#define get_kb_encoding()
|
|
|
|
#define save_kb_encoding()
|
|
|
|
#endif
|
2012-04-07 03:48:53 +04:00
|
|
|
|
|
|
|
/* from configmenu.c */
|
|
|
|
void do_configmenu(void);
|
|
|
|
|
|
|
|
/* from checkrc.c */
|
|
|
|
int check_rcvar(const char *);
|
|
|
|
int check_rcdefault(const char *);
|
2003-05-19 00:40:09 +04:00
|
|
|
#endif /* _DEFS_H_ */
|