Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src Apply patch (requested by pk):
details: https://anonhg.NetBSD.org/src/rev/982a57f86b8c
branches: netbsd-1-4
changeset: 470405:982a57f86b8c
user: he <he%NetBSD.org@localhost>
date: Tue Feb 22 23:06:31 2000 +0000
description:
Apply patch (requested by pk):
Make several sparc boot programs to run at different relocated
addresses. The boot build procedures can then pick the one which
is least likely to fail.
diffstat:
distrib/sparc/bootfs/Makefile | 4 +-
sys/arch/sparc/stand/Makefile.buildboot | 11 ++++++---
sys/arch/sparc/stand/boot/Makefile | 38 ++++++++++++++++++++++++--------
sys/arch/sparc/stand/bootxx/Makefile | 4 +-
4 files changed, 39 insertions(+), 18 deletions(-)
diffs (122 lines):
diff -r 6665c8bec9ef -r 982a57f86b8c distrib/sparc/bootfs/Makefile
--- a/distrib/sparc/bootfs/Makefile Tue Feb 22 23:05:28 2000 +0000
+++ b/distrib/sparc/bootfs/Makefile Tue Feb 22 23:06:31 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10.2.1 1999/04/08 21:18:03 pk Exp $
+# $NetBSD: Makefile,v 1.10.2.2 2000/02/22 23:07:07 he Exp $
TOP= ${.CURDIR}/..
MINIROOT= ${.CURDIR}/../../miniroot
@@ -48,7 +48,7 @@
@echo ""
@echo "installing new bootblocks"
-rm -f ${MOUNT_POINT}/boot
- /usr/mdec/binstall -v ffs ${MOUNT_POINT}
+ /usr/mdec/binstall -v -b boot.700000 ffs ${MOUNT_POINT}
umount ${MOUNT_POINT}
vnconfig -u ${VND_CDEV}
diff -r 6665c8bec9ef -r 982a57f86b8c sys/arch/sparc/stand/Makefile.buildboot
--- a/sys/arch/sparc/stand/Makefile.buildboot Tue Feb 22 23:05:28 2000 +0000
+++ b/sys/arch/sparc/stand/Makefile.buildboot Tue Feb 22 23:06:31 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.buildboot,v 1.5 1999/02/15 19:31:34 pk Exp $
+# $NetBSD: Makefile.buildboot,v 1.5.2.1 2000/02/22 23:06:31 he Exp $
S= ${.CURDIR}/../../../..
@@ -10,9 +10,12 @@
MKMAN= no
BINMODE= 444
-RELOC_SUN4= 0x240000
-RELOC_SUN4C= 0x340000
-RELOC_SUN4M= 0x440000
+RELOCS= 200000 300000 400000 700000
+# Note: a `RELOC' value of 0x300000 seems to work on most machines
+RELOC_DEFAULT?= 300000
+# `bootxx' is linked at a different address to circumvent i-cache
+# flushing issues on Hypersparcs
+RELOC_BOOTXX= 340000
# Note: a `RELOC' value of 0x340000 seems to work on most machines
RELOC?= ${RELOC_SUN4C}
diff -r 6665c8bec9ef -r 982a57f86b8c sys/arch/sparc/stand/boot/Makefile
--- a/sys/arch/sparc/stand/boot/Makefile Tue Feb 22 23:05:28 2000 +0000
+++ b/sys/arch/sparc/stand/boot/Makefile Tue Feb 22 23:06:31 2000 +0000
@@ -1,24 +1,36 @@
-# $NetBSD: Makefile,v 1.11 1999/03/05 11:13:39 pk Exp $
+# $NetBSD: Makefile,v 1.11.2.1 2000/02/22 23:06:31 he Exp $
PROG= boot
-PROGSOURCE= boot.c net.c netif_sun.c conf.c openfirm.c
+PROGSOURCE= boot.c net.c netif_sun.c conf.c openfirm.c vers.c
NEWVERSWHAT= "Secondary Boot"
-CLEANFILES+= vers.c vers.o
+FILES= ${RELOCS:S/^/boot./g}
+CLEANFILES:= vers.c ${FILES}
+LINKS= ${BINDIR}/boot.${RELOC_DEFAULT} ${BINDIR}/boot
INCLUDE_LIBZ= yes
SAMISCMAKEFLAGS= SA_USE_CREAD=yes
.include "../Makefile.buildboot"
+.if exists(${.CURDIR}/../Makefile.inc)
+.include "${.CURDIR}/../Makefile.inc"
+.endif
+.include <bsd.own.mk>
-RELOC= 0x300000
-LINKFLAGS= -N -Ttext ${RELOC} -e start
+OBJS=${SRCS:N*.h:N*.sh:N*.fth:R:S/$/.o/g}
+
+LINKFLAGS= -N -e start
-${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
+all: ${FILES}
+
+vers.c:
sh ${.CURDIR}/../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
- ${COMPILE.c} vers.c
- ${LD} -o ${.TARGET} ${LINKFLAGS} ${OBJS} \
- vers.o ${LIBSA} ${LIBZ} ${LIBKERN}
+
+.for RELOC in ${RELOCS}
+boot.${RELOC}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
+ ${LD} -o ${.TARGET} ${LINKFLAGS} -Ttext ${RELOC} ${OBJS} \
+ ${LIBSA} ${LIBZ} ${LIBKERN}
@size ${.TARGET}
+.endfor
afterinstall:
# conjure up a magic header that is accepted by all Sun PROMS;
@@ -30,4 +42,10 @@
chmod ${BINMODE} ${DESTDIR}/${BINDIR}/boot.net
chown ${BINOWN}.${BINGRP} ${DESTDIR}/${BINDIR}/boot.net
-.include <bsd.prog.mk>
+clean cleandir: cleanprog
+
+cleanprog:
+ rm -f ${OBJS} ${CLEANFILES}
+
+.include <bsd.files.mk>
+.include <bsd.links.mk>
diff -r 6665c8bec9ef -r 982a57f86b8c sys/arch/sparc/stand/bootxx/Makefile
--- a/sys/arch/sparc/stand/bootxx/Makefile Tue Feb 22 23:05:28 2000 +0000
+++ b/sys/arch/sparc/stand/bootxx/Makefile Tue Feb 22 23:06:31 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.9 1999/03/05 11:15:53 pk Exp $
+# $NetBSD: Makefile,v 1.9.2.1 2000/02/22 23:06:31 he Exp $
PROG= bootxx
PROGSOURCE= bootxx.c
@@ -7,7 +7,7 @@
CPPFLAGS+= -DBOOTXX
STRIPFLAG=
-LINKFLAGS= -N -Ttext ${RELOC} -e start
+LINKFLAGS= -N -Ttext ${RELOC_BOOTXX} -e start
${PROG}: ${OBJS} ${LIBSA} ${LIBKERN}
${LD} -o ${.TARGET} ${LINKFLAGS} ${OBJS} ${LIBSA} ${LIBKERN}
Home |
Main Index |
Thread Index |
Old Index