the HD one, floppy is still too large. Added our BOOT_CONFIG -c option.
Some small style nits.
-# $OpenBSD: Makefile,v 1.2 1997/03/22 00:19:56 niklas Exp $
+# $OpenBSD: Makefile,v 1.3 1997/03/25 17:05:49 niklas Exp $
NOPROG= installboot
MAN=installboot.8
SUBDIR=aout2bb txlt
-TXLT=txlt/txlt
+AOUT2BB!=cd $(.CURDIR)/aout2bb; \
+ printf "xxx:\n\techo \$${.OBJDIR}/aout2bb\n" | \
+ ${MAKE} -r -s -f - xxx | grep aout2bb
-OBJS = configure.o main.o
-OBJS += console.o xd.o
+TXLT!= cd $(.CURDIR)/txlt; \
+ printf "xxx:\n\techo \$${.OBJDIR}/txlt\n" | \
+ ${MAKE} -r -s -f - xxx | grep txlt
+
+OBJS= configure.o main.o
+OBJS+= console.o xd.o
# libsa library replacements:
-OBJS += alloc.o printf.o twiddle.o
+OBJS+= alloc.o printf.o twiddle.o
# libkern replacements:
-OBJS += bcopy.o bzero.o ashrdi3.o muldi3.o
+OBJS+= bcopy.o ashrdi3.o muldi3.o
# machine language startup code:
-OBJS += startit.o
+OBJS+= startit.o
-SRCS = installboot.sh configure.c main.c console.c xd.c
-SRCS+= twiddle.c
-SRCS+= bbstart.s libstubs.s alloc.s printf.s startit.s
-SRCS+= bcopy.s bzero.c ashrdi3.s muldi3.s
+SRCS= installboot.sh configure.c main.c console.c xd.c twiddle.c
+SRCS+= bbstart.s libstubs.s alloc.s printf.s startit.s
+SRCS+= bcopy.s ashrdi3.s muldi3.s
-CLEANFILES = $(OBJS) $(BOOTBLOCKS) x.out xxstart.s f.out fdstart.s
+CLEANFILES= $(OBJS) $(BOOTBLOCKS) x.out xxstart.s f.out fdstart.s
-S= ${.CURDIR}/../../../..
-INCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa
-COPTIM= -O2 -fomit-frame-pointer -fno-function-cse -Wa,-l -m68060 -Wa,-m68030
-CFLAGS = ${COPTIM} ${INCPATH} ${DEFS}
-COPTS += -Wall -Wstrict-prototypes
+S= ${.CURDIR}/../../../..
+INCPATH= -I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa
+COPTIM= -O -fomit-frame-pointer -fno-function-cse -Wa,-l -m68060 \
+ -Wa,-m68030
+CFLAGS= ${COPTIM} ${INCPATH} ${DEFS}
+COPTS+= -Wall -Wstrict-prototypes
-BOOTBLOCKS=xxboot # XXX fdboot is too large at the moment.
+BOOTBLOCKS= xxboot # XXX fdboot is too large at the moment.
.s.o:
- $(CC) $(CAFLAGS) $(COPTS) -x assembler-with-cpp -o $*.o -c \
- ${.CURDIR}/$*.s
+ $(CC) $(CAFLAGS) $(COPTS) -x assembler-with-cpp -o $*.o -c $<
#libs:
xxboot: x.out
rm -f $@
- aout2bb/aout2bb x.out $@ || nm -u x.out
+ ${AOUT2BB} x.out $@ || nm -u x.out
fdboot: f.out
rm -f $@
- aout2bb/aout2bb -F f.out $@ || nm -u f.out
+ ${AOUT2BB} -F f.out $@ || nm -u f.out
clean::
rm -f $(OBJS) fdstart.[os] xxstart.[os] f.out x.out installboot
+++ /dev/null
-/*
- * $OpenBSD: bzero.c,v 1.1 1997/01/16 09:26:30 niklas Exp $
- * $NetBSD: bzero.c,v 1.1.1.1 1996/11/29 23:36:29 is Exp $
- *
- * Copyright (c) 1996 Ignatios Souvatzis
- * 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.
- * 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 Ignatios Souvatzis
- * for the NetBSD project.
- * 4. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- *
- * Lightweight bzero.
- */
-
-#include <sys/types.h>
-#include <string.h>
-
-void
-bzero(p, len)
- void *p;
- size_t len;
-{
- char *s = p;
- while (len > 0) {
- *s++ = 0;
- --len;
- }
-}
-# $OpenBSD: Makefile,v 1.1 1997/01/16 09:26:53 niklas Exp $
+# $OpenBSD: Makefile,v 1.2 1997/03/25 17:05:57 niklas Exp $
# $NetBSD: Makefile,v 1.1.1.1 1996/11/29 23:36:30 is Exp $
LIB= sa
DIR_KERN = ${.CURDIR}/../../../../../lib/libkern
DIR_KERN_MD = ${.CURDIR}/../../../../../lib/libkern/arch/$(MACHINE_ARCH)
-TXLT = ${.CURDIR}/../txlt/txlt
+TXLT!= cd $(.CURDIR)/../txlt; \
+ printf "xxx:\n\techo \$${.OBJDIR}/txlt\n" | \
+ ${MAKE} -r -s -f - xxx | grep txlt
.PATH: $(DIR_SA) $(DIR_KERN) $(DIR_KERN_MD)
CFLAGS+=$(COPTS)
# stand routines
-SRCS= gets.c
+SRCS= gets.c memset.c
# memcpy.c bcopy.c strerror.c
# io routines
SRCS+= ufs.c
# kernlib routines
-SRCS+= strlen.S strcmp.S
+SRCS+= strlen.S strcmp.S strncpy.S
#$(DIR_KERN)/bcmp.c
/*
- * $OpenBSD: main.c,v 1.1 1997/01/16 09:26:38 niklas Exp $
+ * $OpenBSD: main.c,v 1.2 1997/03/25 17:05:53 niklas Exp $
* $NetBSD: main.c,v 1.1.1.1 1996/11/29 23:36:29 is Exp $
*
*
static long get_number(char **);
const char version[] = "2.0";
-char default_command[] = "openbsd -Sn2";
+char default_command[] = "bsd -Sn2";
int
pain()
int Z_flag = 0;
int m_value = 0;
int S_flag = 0;
- int t_flag = 0;
long stringsz;
u_int32_t fmem = 0x0;
int cmemsz = 0x0;
int eclock = SysBase->EClockFreq;
/* int skip_chipmem = 0; */
+#if 0
+ const char *memt;
+#endif
void (*start_it)(void *, u_long, u_long, void *, u_long, u_long, int,
void *, int, int, u_long, u_long, int) = startit;
*/
if (SysBase->LibNode.Version < EXECMIN) {
- printf("Exec V%ld, need V%ld\n",
+ printf("Exec V%ld < V%ld\n",
(long)SysBase->LibNode.Version, (long)EXECMIN);
goto out;
}
- printf("\2337mOpenBSD/Amiga bootblock %s\2330m\n%s :- ",
- version, kernel_name);
+ printf("\2337mOpenBSD/Amiga %s\2330m\n%s : ",version, kernel_name);
timelimit = 3;
gets(linebuf);
case 'b': /* ask for root device */
boothowto |= RB_ASKNAME;
break;
- case 'c': /* force machine model */
- cpuid = get_number(&path) << 16;
+ case 'c':
+ boothowto |= RB_CONFIG;
break;
case 'k': /* Reserve first 4M fastmem */
k_flag++;
case 's': /* single-user state */
boothowto |= RB_SINGLE;
break;
- case 't': /* test flag */
- t_flag = 1;
- break;
case 'A': /* enable AGA modes */
amiga_flags |= 1;
break;
+ case 'C': /* force machine model */
+ cpuid = get_number(&path) << 16;
+ break;
case 'D': /* enter Debugger */
boothowto |= RB_KDB;
break;
case 'I': /* inhibit sync negotiation */
I_flag = get_number(&path);
break;
- case 'K': /* remove 1st 4MB fastmem */
- break;
case 'S': /* include debug symbols */
S_flag = 1;
break;
kvers = (u_short *)(kp + eh->a_entry - 2);
if (*kvers > KERNEL_STARTUP_VERSION_MAX && *kvers != 0x4e73) {
- printf("\nnewer bootblock required: %ld\n", (long)*kvers);
+ printf("\nbootblock < V%ld\n", (long)*kvers);
goto freeall;
}
#if 0
(char *)startit_end - (char *)startit);
CacheClearU();
(caddr_t)start_it = kp + ksize + 256;
- printf("*** Loading from %08lx to Fastmem %08lx ***\n",
- (u_long)kp, (u_long)fmem);
- /* sleep(2); */
+#if 0
+ memt = "fast";
+#endif
} else {
/*
* Either the kernel doesn't suppport loading directly to
* fits into chipmem.
*/
if (ksize >= cmemsz) {
- printf("Kernel size %d exceeds Chip Memory of %d\n",
+ printf("Kernel size %d > chipmem size %d\n",
ksize, cmemsz);
return 20;
}
Z_flag = 1;
- printf("*** Loading from %08lx to Chipmem ***\n", (u_long)kp);
+#if 0
+ memt = "chip";
+ fmem = 0;
+#endif
}
+#if 0
+ printf("Loading %08lx to %smem %08lx\n", (u_long)kp, memt,
+ (u_long)fmem);
+#endif
#if 0
printf("would start(kp=0x%lx, ksize=%ld, entry=0x%lx,\n"
free(kp, ksize);
free(eh, sizeof(*eh));
err:
- printf("\nError %ld\n", (long)errno);
+ printf("\nErr %ld\n", (long)errno);
close(io);
out:
timelimit = 10;
sign = -1;
c = *++p;
}
- if (c == '$') {
- base = 16;
- c = *++p;
- } else if (c == '0') {
+ if (c == '0') {
c = *++p;
if ((c & 0xdf) == 'X') {
base = 16;
case 4000:
return 0;
default:
- printf("Amiga %ld ???\n",
- (long)(*cpuid >> 16));
+ printf("A%ld?\n", (long)(*cpuid >> 16));
return(1);
}
}
-/* $OpenBSD: startit.s,v 1.1 1997/01/16 09:26:41 niklas Exp $ */
+/* $OpenBSD: startit.s,v 1.2 1997/03/25 17:05:55 niklas Exp $ */
/* $NetBSD: startit.s,v 1.1.1.1 1996/11/29 23:36:29 is Exp $ */
/*
* 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.
- *
- *
- * From: $NetBSD: startit.s,v 1.1.1.1 1996/11/29 23:36:29 is Exp $
*/
.set ABSEXECBASE,4