- add no_parseopt(), no_setboot() and no_clearboot() methods for back-ends
to use when they don't support a particular method - don't automatically generate machines.c anymore - add entries for i386 (temporarily unsupported) and shark (permanently unsupported)
This commit is contained in:
parent
3dff47a43f
commit
38cd7942e5
@ -1,8 +1,9 @@
|
||||
# $NetBSD: Makefile,v 1.9 2002/04/06 15:27:55 bjh21 Exp $
|
||||
# $NetBSD: Makefile,v 1.10 2002/04/11 07:56:13 lukem Exp $
|
||||
#
|
||||
|
||||
PROG= installboot
|
||||
SRCS= installboot.c sum.c machines.c
|
||||
SRCS= installboot.c sum.c machines.c \
|
||||
alpha.c pmax.c sparc64.c vax.c
|
||||
MAN= installboot.8
|
||||
|
||||
WARNS?= 3
|
||||
@ -10,16 +11,11 @@ WARNS?= 3
|
||||
CPPFLAGS+= -I${.CURDIR}
|
||||
.PATH: ${.CURDIR}/arch
|
||||
|
||||
# list of MACHINEs to enable MD back-ends for
|
||||
#
|
||||
IB_MACHINES?= alpha pmax sparc64 vax
|
||||
|
||||
SRCS+= ${IB_MACHINES:S/$/.c/}
|
||||
|
||||
|
||||
.ifndef HOSTPROG
|
||||
# list of MACHINEs to enable the compat symlink /usr/mdec/installboot
|
||||
# XXX: eventually this should be done for all machines in ${IB_MACHINES}
|
||||
# XXX: eventually this should be done for all machines.
|
||||
# XXX: or /usr/mdec/installboot is replaced with a shell script that
|
||||
# XXX: tells the user to use /usr/sbin/installboot instead
|
||||
#
|
||||
COMPATLINKS?= pmax
|
||||
afterinstall:
|
||||
@ -30,12 +26,5 @@ afterinstall:
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
|
||||
regenmachines: mkmachines.awk Makefile
|
||||
-mv -f ${.CURDIR}/machines.c ${.CURDIR}/machines.c.bak
|
||||
awk -f ${.CURDIR}/mkmachines.awk ${IB_MACHINES} > ${.TARGET}
|
||||
mv ${.TARGET} ${.CURDIR}/machines.c
|
||||
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
.endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sparc64.c,v 1.4 2002/04/04 15:36:44 mrg Exp $ */
|
||||
/* $NetBSD: sparc64.c,v 1.5 2002/04/11 07:56:14 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
@ -66,7 +66,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID) && !defined(__lint)
|
||||
__RCSID("$NetBSD: sparc64.c,v 1.4 2002/04/04 15:36:44 mrg Exp $");
|
||||
__RCSID("$NetBSD: sparc64.c,v 1.5 2002/04/11 07:56:14 lukem Exp $");
|
||||
#endif /* !__lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -82,19 +82,9 @@ __RCSID("$NetBSD: sparc64.c,v 1.4 2002/04/04 15:36:44 mrg Exp $");
|
||||
|
||||
#include "installboot.h"
|
||||
|
||||
int sparc64_parseopt(ib_params *, const char *);
|
||||
int sparc64_setboot(ib_params *);
|
||||
int sparc64_clearboot(ib_params *);
|
||||
|
||||
int
|
||||
sparc64_parseopt(ib_params *params, const char *option)
|
||||
{
|
||||
|
||||
/* all options are unknown */
|
||||
warnx("Unknown -o option `%s'", option);
|
||||
return (0);
|
||||
}
|
||||
|
||||
#define SPARC64_BOOT_BLOCK_OFFSET DEV_BSIZE
|
||||
#define SPARC64_BOOT_BLOCK_BLOCKSIZE DEV_BSIZE
|
||||
#define SPARC64_BOOT_BLOCK_MAX_SIZE (DEV_BSIZE * 15)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: installboot.c,v 1.2 2002/04/04 03:27:53 simonb Exp $ */
|
||||
/* $NetBSD: installboot.c,v 1.3 2002/04/11 07:56:13 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
@ -38,7 +38,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#if defined(__RCSID) && !defined(__lint)
|
||||
__RCSID("$NetBSD: installboot.c,v 1.2 2002/04/04 03:27:53 simonb Exp $");
|
||||
__RCSID("$NetBSD: installboot.c,v 1.3 2002/04/11 07:56:13 lukem Exp $");
|
||||
#endif /* !__lint */
|
||||
|
||||
#include <sys/utsname.h>
|
||||
@ -223,6 +223,35 @@ parseoptionflag(ib_params *params, const char *option, ib_flags wantflags)
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
no_parseopt(ib_params *params, const char *option)
|
||||
{
|
||||
|
||||
/* all options are unsupported */
|
||||
warnx("Unsupported -o option `%s'", option);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
no_setboot(ib_params *params)
|
||||
{
|
||||
|
||||
/* boot block installation is not supported */
|
||||
warnx("%s: boot block installation is not supported",
|
||||
params->machine->name);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
no_clearboot(ib_params *params)
|
||||
{
|
||||
|
||||
/* boot block removal is not supported */
|
||||
warnx("%s: boot block removal is not supported",
|
||||
params->machine->name);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
getmachine(ib_params *param, const char *mach, const char *provider)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: installboot.h,v 1.2 2002/04/04 17:53:04 bjh21 Exp $ */
|
||||
/* $NetBSD: installboot.h,v 1.3 2002/04/11 07:56:13 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
@ -81,4 +81,8 @@ int parseoptionflag(ib_params *, const char *, ib_flags);
|
||||
u_int16_t compute_sunsum(const u_int16_t *);
|
||||
int set_sunsum(ib_params *, u_int16_t *, u_int16_t);
|
||||
|
||||
int no_parseopt(ib_params *, const char *);
|
||||
int no_setboot(ib_params *);
|
||||
int no_clearboot(ib_params *);
|
||||
|
||||
#endif /* _INSTALLBOOT_H */
|
||||
|
@ -1,6 +1,40 @@
|
||||
/* $NetBSD: machines.c,v 1.4 2002/04/04 13:45:25 lukem Exp $ */
|
||||
/* $NetBSD: machines.c,v 1.5 2002/04/11 07:56:13 lukem Exp $ */
|
||||
|
||||
/* DO NOT EDIT-- this file is automatically generated. */
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Luke Mewburn of Wasabi Systems.
|
||||
*
|
||||
* 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 by the NetBSD
|
||||
* Foundation, Inc. and its contributors.
|
||||
* 4. Neither the name of The NetBSD Foundation 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 BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``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 FOUNDATION OR CONTRIBUTORS
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include "installboot.h"
|
||||
@ -11,7 +45,6 @@ int alpha_clearboot(ib_params *);
|
||||
int pmax_parseopt(ib_params *, const char *);
|
||||
int pmax_setboot(ib_params *);
|
||||
int pmax_clearboot(ib_params *);
|
||||
int sparc64_parseopt(ib_params *, const char *);
|
||||
int sparc64_setboot(ib_params *);
|
||||
int sparc64_clearboot(ib_params *);
|
||||
int vax_parseopt(ib_params *, const char *);
|
||||
@ -20,8 +53,10 @@ int vax_clearboot(ib_params *);
|
||||
|
||||
struct ib_mach machines[] = {
|
||||
{ "alpha", alpha_parseopt, alpha_setboot, alpha_clearboot },
|
||||
{ "i386", no_parseopt, no_setboot, no_clearboot },
|
||||
{ "pmax", pmax_parseopt, pmax_setboot, pmax_clearboot },
|
||||
{ "sparc64", sparc64_parseopt, sparc64_setboot, sparc64_clearboot },
|
||||
{ "shark", no_parseopt, no_setboot, no_clearboot },
|
||||
{ "sparc64", no_parseopt, sparc64_setboot, sparc64_clearboot },
|
||||
{ "vax", vax_parseopt, vax_setboot, vax_clearboot },
|
||||
{ 0, 0, 0, 0 },
|
||||
};
|
||||
|
@ -1,58 +0,0 @@
|
||||
#!/usr/bin/awk
|
||||
#
|
||||
# $NetBSD: mkmachines.awk,v 1.1 2002/04/03 05:21:17 lukem Exp $
|
||||
#
|
||||
# Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# This code is derived from software contributed to The NetBSD Foundation
|
||||
# by Luke Mewburn of Wasabi Systems.
|
||||
#
|
||||
# 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 by the NetBSD
|
||||
# Foundation, Inc. and its contributors.
|
||||
# 4. Neither the name of The NetBSD Foundation 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 BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
# ``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 FOUNDATION OR CONTRIBUTORS
|
||||
# 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.
|
||||
#
|
||||
|
||||
BEGIN \
|
||||
{
|
||||
printf("/* \$\NetBSD\$ */\n\n");
|
||||
printf("/* DO NOT EDIT-- this file is automatically generated. */\n\n");
|
||||
printf("#include <sys/types.h>\n");
|
||||
printf("#include \"installboot.h\"\n\n");
|
||||
for (i = 1; i < ARGC; i++) {
|
||||
printf("int %s_parseopt(ib_params *, const char *);\n",
|
||||
ARGV[i]);
|
||||
printf("int %s_setboot(ib_params *);\n", ARGV[i]);
|
||||
printf("int %s_clearboot(ib_params *);\n", ARGV[i]);
|
||||
}
|
||||
printf("\nstruct ib_mach machines[] = {\n");
|
||||
for (i = 1; i < ARGC; i++) {
|
||||
printf("\t{ \"%s\",\t%s_parseopt,\t%s_setboot,\t%s_clearboot },\n",
|
||||
ARGV[i], ARGV[i], ARGV[i], ARGV[i]);
|
||||
}
|
||||
printf("\t{ 0, 0, 0, 0 },\n};\n");
|
||||
}
|
Loading…
Reference in New Issue
Block a user