Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/alpha/stand nuke installboot.old / bootxx combo (th...



details:   https://anonhg.NetBSD.org/src/rev/7012010ffe7b
branches:  trunk
changeset: 526443:7012010ffe7b
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri May 03 15:36:52 2002 +0000

description:
nuke installboot.old / bootxx combo (the old "primary bootstrap with
hardcoded blocks of secondary bootstrap"); it was only used by the
distrib ustarfs stuff, and that now uses usr/sbin/installboot and ustarboot

diffstat:

 sys/arch/alpha/stand/Makefile                      |    6 +-
 sys/arch/alpha/stand/bootxx/Makefile               |   34 -
 sys/arch/alpha/stand/bootxx/bootxx.c               |  178 ----------
 sys/arch/alpha/stand/installboot.old/Makefile      |    9 -
 sys/arch/alpha/stand/installboot.old/installboot.c |  364 ---------------------
 5 files changed, 1 insertions(+), 590 deletions(-)

diffs (truncated from 616 to 300 lines):

diff -r 1eafd2f3c3d7 -r 7012010ffe7b sys/arch/alpha/stand/Makefile
--- a/sys/arch/alpha/stand/Makefile     Fri May 03 15:22:55 2002 +0000
+++ b/sys/arch/alpha/stand/Makefile     Fri May 03 15:36:52 2002 +0000
@@ -1,10 +1,6 @@
-# $NetBSD: Makefile,v 1.13 1999/08/18 21:34:24 cgd Exp $
+# $NetBSD: Makefile,v 1.14 2002/05/03 15:36:52 lukem Exp $
 
 SUBDIR=                installboot mkbootimage setnetbootinfo
 SUBDIR+=       boot bootxx_cd9660 bootxx_ffs bootxx_lfs netboot ustarboot
 
-# temporary:
-SUBDIR+=       installboot.old
-SUBDIR+=       bootxx
-
 .include <bsd.subdir.mk>
diff -r 1eafd2f3c3d7 -r 7012010ffe7b sys/arch/alpha/stand/bootxx/Makefile
--- a/sys/arch/alpha/stand/bootxx/Makefile      Fri May 03 15:22:55 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-# $NetBSD: Makefile,v 1.24 2001/09/22 03:34:18 tv Exp $
-
-PROG = bootxx.old
-
-SRCS = start.S bootxx.c prom.c prom_disp.S putstr.c booted_dev.c
-
-BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS}
-PRIMARY_MAX_LOAD!=     expr 8192 - 512
-
-CPPFLAGS += ${PRIMARY_CPPFLAGS}
-
-CLEANFILES+= ${PROG}.sym ${PROG}.trunc
-
-${PROG}: ${PROG}.sym
-       @echo creating ${PROG} from ${PROG}.sym...
-       @${OBJCOPY} --output-target=binary ${PROG}.sym ${PROG}.trunc
-       @chmod 644 ${PROG}.trunc
-       @dd if=${PROG}.trunc of=${PROG} obs=`expr 15 \* 512` conv=osync
-       @ls -l ${PROG}
-       @${CHECKSIZE_CMD} ${PROG}.sym ${PROG} ${PRIMARY_MAX_LOAD} \
-           ${PRIMARY_MAX_TOTAL} || (rm -f ${PROG} ; false)
-
-SAMISCMAKEFLAGS= SA_INCLUDE_NET=no SA_USE_CREAD=no
-.include "../Makefile.bootprogs"
-
-NETBSD_VERS!=sh ${.CURDIR}/../../../../conf/osrelease.sh
-CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' \
-          -DBOOTXX_RAID1_SUPPORT
-
-${PROG}.sym: ${OBJS} ${LIBKERN}
-       ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym ${OBJS} \
-           ${LIBKERN}
-       @chmod 644 ${PROG}.sym
-       @${SIZE} ${PROG}.sym
diff -r 1eafd2f3c3d7 -r 7012010ffe7b sys/arch/alpha/stand/bootxx/bootxx.c
--- a/sys/arch/alpha/stand/bootxx/bootxx.c      Fri May 03 15:22:55 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,178 +0,0 @@
-/* $NetBSD: bootxx.c,v 1.15 1999/05/26 06:22:03 cgd Exp $ */
-
-/*
- * Copyright (C) 1998 by Ross Harvey
- *
- * This work was supported by Ross Harvey, Avalon Computer Systems, and The
- * NetBSD Foundation.
- *
- * This work may be distributed under the terms of the original license
- * below, provided that this notice is not changed.  ROSS HARVEY,
- * AVALON COMPUTER SYSTEMS, INC., AND THE NETBSD FOUNDATION DISCLAIM
- * ALL LIABILITY OF ANY KIND FOR THE USE OF THIS SOFTWARE.
- */
-/*
- * Copyright (c) 1995 Carnegie-Mellon University.
- * All rights reserved.
- *
- * Author: Chris G. Demetriou
- *
- * Permission to use, copy, modify and distribute this software and
- * its documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
- * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
- * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * Carnegie Mellon requests users of this software to return to
- *
- *  Software Distribution Coordinator  or  Software.Distribution%CS.CMU.EDU@localhost
- *  School of Computer Science
- *  Carnegie Mellon University
- *  Pittsburgh PA 15213-3890
- *
- * any improvements or extensions that they make and grant Carnegie the
- * rights to redistribute these changes.
- */
-
-#include <sys/param.h>
-
-#include <machine/prom.h>
-#include <lib/libkern/libkern.h>
-#include "stand/common/common.h"
-#include "stand/common/bbinfo.h"
-
-extern int _end, start;
-
-struct bbinfoloc desc = {
-       0xbabefacedeadbeef,
-       (u_int64_t)&start,
-       (u_int64_t)&_end,
-       { 0, },
-       0xdeadbeeffacebabe
-};
-
-#ifdef PBDEBUG
-static void
-errorstatus(const char *msg, u_int64_t val)
-{
-       int     i, c;
-
-       putstr(msg);
-       for(i=60; i >= 0; i -= 4) {
-               c = val >> i & 0xf;
-               if (c >= 10)
-                       c = c - 10 + 'a';
-               else    c += '0';
-               putchar(c);
-       }
-}
-#endif
-
-static int
-load_file(fd, bbinfop, loadaddr)
-       int fd;
-       struct bbinfo *bbinfop;
-       char *loadaddr;
-{
-       char *cp;
-       int twiddle;
-       prom_return_t ret;
-       int32_t cksum, *int32p;
-       int i, j, n, rv, nextblk, wantblk, blksize;
-
-       if (bbinfop->nblocks <= 0) {
-               putstr("invalid number of blocks in boot program description\n");
-               return 0;
-       }
-       if (bbinfop->bsize < DEV_BSIZE || bbinfop->bsize > MAXBSIZE) {
-               putstr("invalid block size in boot program description\n");
-               return 0;
-       }
-
-       int32p = (int32_t *)&_end;
-       n = bbinfop->nblocks +
-           (sizeof(*bbinfop) / sizeof(bbinfop->blocks[0])) - 1;
-       if ((long)&_end - (long)&start + sizeof(bbinfop->blocks[0]) * n >
-           15 * 512) {
-               putstr("way too many blocks\n");
-               return 0;
-       }
-
-       for (i = 0, cksum = 0; i < n; i++)
-               cksum += *int32p++;
-       if (cksum != 0) {
-               putstr("invalid checksum in boot program description\n");
-               return 0;
-       }
-
-       cp = loadaddr;
-       rv = 1;
-       nextblk = 16;
-       for (i = twiddle = 0; i < bbinfop->nblocks; i++) {
-               wantblk = bbinfop->blocks[i];
-               blksize = bbinfop->bsize;
-               for(j = 1; i + 1 < bbinfop->nblocks
-                  && bbinfop->blocks[i + 1] == wantblk + j
-                  && blksize < 50 * 1024; ++i, ++j)
-                       blksize += bbinfop->bsize;
-               for(; nextblk < wantblk && wantblk - nextblk <= 4; ++nextblk) {
-                       putchar('+');
-                       prom_read(fd, 512, cp, nextblk);
-               }
-               putchar(".oOo"[twiddle++ & 3]);
-               ret.bits = prom_read(fd, blksize, cp, wantblk);
-               putchar('\b');
-               nextblk += blksize / 512;
-               cp      += blksize;
-               if (ret.u.status) {
-                       rv = 0;
-                       putstr("\nBLOCK READ ERROR!\n");
-                       break;
-               }
-       }
-       putstr(".\n");
-
-       return (rv);
-}
-
-static void printdec(int n)
-{
-       if (n)
-               printdec(n/10);
-       putchar(n % 10 | '0');
-}
-
-void
-main()
-{
-       char *loadaddr;
-       struct bbinfo *bbinfop;
-       void (*entry) __P((int));
-
-       /* Init prom callback vector. */
-       init_prom_calls();
-
-       putstr("\nNetBSD/alpha " NETBSD_VERS " Primary Boot +\n");
-
-       bbinfop = (struct bbinfo *)&_end;
-       loadaddr = (char *)SECONDARY_LOAD_ADDRESS;
-
-       if (!booted_dev_open()) {
-               putstr("Can't open boot device\n");
-               return;
-       }
-       if (!load_file(booted_dev_fd, bbinfop, loadaddr)) {
-               putstr("\nLOAD FAILED!\n\n");
-               return;
-       }
-
-       putstr("Jumping to entry point...\n");
-       entry = (void (*)(int))loadaddr;
-       (*entry)(booted_dev_fd);
-       booted_dev_close();
-       putstr("SECONDARY BOOT RETURNED!\n");
-}
diff -r 1eafd2f3c3d7 -r 7012010ffe7b sys/arch/alpha/stand/installboot.old/Makefile
--- a/sys/arch/alpha/stand/installboot.old/Makefile     Fri May 03 15:22:55 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-# $NetBSD: Makefile,v 1.13 1999/04/05 05:48:12 cgd Exp $
-
-PROG=  installboot.old
-SRCS=  installboot.c
-
-LDADD+=        -lutil
-DPADD+=        ${LIBUTIL}
-
-.include <bsd.prog.mk>
diff -r 1eafd2f3c3d7 -r 7012010ffe7b sys/arch/alpha/stand/installboot.old/installboot.c
--- a/sys/arch/alpha/stand/installboot.old/installboot.c        Fri May 03 15:22:55 2002 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,364 +0,0 @@
-/* $NetBSD: installboot.c,v 1.16 2002/04/03 06:16:02 lukem Exp $ */
-
-/*-
- * Copyright (c) 1998 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Paul Kranenburg and Jason R. Thorpe of the Numerical Aerospace
- * Simulation Facility, NASA Ames Research Center.
- *
- * 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.
- */
-
-/*
- * Copyright (c) 1997 Christopher G. Demetriou.  All rights reserved.
- * 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.



Home | Main Index | Thread Index | Old Index