Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/arch/alpha/stand always -D NETBSD_VERS
details: https://anonhg.NetBSD.org/src/rev/c85f90fb3fa9
branches: netbsd-1-4
changeset: 468075:c85f90fb3fa9
user: cgd <cgd%NetBSD.org@localhost>
date: Mon Apr 05 22:03:49 1999 +0000
description:
always -D NETBSD_VERS
diffstat:
sys/arch/alpha/stand/Makefile.bootprogs | 115 ++++++++++++++++++++++++++++++++
sys/arch/alpha/stand/Makefile.bootxx | 36 ++++++++++
2 files changed, 151 insertions(+), 0 deletions(-)
diffs (159 lines):
diff -r 7214e242cf13 -r c85f90fb3fa9 sys/arch/alpha/stand/Makefile.bootprogs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/alpha/stand/Makefile.bootprogs Mon Apr 05 22:03:49 1999 +0000
@@ -0,0 +1,115 @@
+# $NetBSD: Makefile.bootprogs,v 1.12.2.2 1999/04/05 22:03:49 cgd Exp $
+
+S= ${.CURDIR}/../../../..
+
+.PATH: ${.CURDIR}/../common
+
+STRIPFLAG=
+BINMODE= 444
+
+STRIP?= strip
+
+# XXX Can't do warnings yet.
+WARNS= 0
+
+CHECKSIZE_CMD= SIZE=${SIZE} sh ${.CURDIR}/../common/checksize.sh
+
+.PHONY: machine-links
+beforedepend: machine-links
+# ${MACHINE} then ${MACHINE_ARCH}
+machine-links:
+ -rm -f machine && \
+ ln -s $S/arch/alpha/include machine
+ -rm -f alpha && \
+ ln -s $S/arch/alpha/include alpha
+CLEANFILES+=machine alpha
+
+all: machine-links ${PROG}
+
+AFLAGS+= -DASSEMBLER
+# -I${.CURDIR}/../.. done by Makefile.inc
+CPPFLAGS+= -nostdinc -I${.OBJDIR} -D_STANDALONE -I${S}
+CFLAGS= -Os -mno-fp-regs -g
+
+NETBSD_VERS!=sh ${.CURDIR}/../../../../conf/osrelease.sh
+CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
+
+HAVE_GCC28!= ${CC} --version | egrep "^(2\.8|egcs)" ; echo
+.if (${HAVE_GCC28} != "")
+CWARNFLAGS+= -Wno-main
+.endif
+
+# For descriptions of regions available to bootstrap programs, see
+# section 3.4.1.2 (pp. III 3-14 - III 3-18) of the second edition of
+# the Alpha AXP Architecture Reference Manual.
+
+REGION1_START= 0x20000000 # "Region 1 start"
+REGION1_SIZE!= expr 256 \* 1024 # 256k
+
+# our memory lauout:
+
+# 'unified' boot loaders (e.g. netboot) can consume all of region
+# 1 for their text+data, or text+data+bss.
+
+UNIFIED_LOAD_ADDRESS= ${REGION1_START}
+UNIFIED_MAX_LOAD!= expr ${REGION1_SIZE}
+UNIFIED_MAX_TOTAL!= expr ${REGION1_SIZE}
+
+#UNIFIED_HEAP_START= right after secondary bss
+UNIFIED_HEAP_LIMIT= (${REGION1_START} + ${REGION1_SIZE})
+
+# two-stage boot loaders must share region 1. The first stage
+# loads into the lowest portion, and uses the higest portion
+# for its heap. The second stage loads in between the primary image
+# and the heap, and can reuse the memory after it (i.e. the primary's
+# heap) for its own heap.
+
+PRIMARY_LOAD_ADDRESS= ${REGION1_START}
+#PRIMARY_MAX_LOAD= booter dependent, no more than ${PRIMARY_MAX_TOTAL}
+PRIMARY_MAX_TOTAL!= expr 16 \* 1024
+
+# XXX SECONDARY_LOAD_ADDRESS should be
+# XXX (${PRIMARY_LOAD_ADDRESS} + ${PRIMARY_MAX_TOTAL}) bt there's no easy
+# XXX way to do that calculation and 'ld' wants a single number.
+SECONDARY_LOAD_ADDRESS= 0x20004000 # XXX
+SECONDARY_MAX_LOAD!= expr 112 \* 1024
+SECONDARY_MAX_TOTAL!= expr ${REGION1_SIZE} - ${PRIMARY_MAX_TOTAL}
+
+PRIMARY_HEAP_START= (${SECONDARY_LOAD_ADDRESS} + ${SECONDARY_MAX_LOAD})
+PRIMARY_HEAP_LIMIT= (${REGION1_START} + ${REGION1_SIZE})
+
+#SECONDARY_HEAP_START= right after secondary bss
+SECONDARY_HEAP_LIMIT= (${REGION1_START} + ${REGION1_SIZE})
+
+FILE_FORMAT_CPPFLAGS= -DALPHA_BOOT_ECOFF -DALPHA_BOOT_ELF
+
+UNIFIED_CPPFLAGS= -DUNIFIED_BOOTBLOCK \
+ -DHEAP_LIMIT="${UNIFIED_HEAP_LIMIT}" \
+ ${FILE_FORMAT_CPPFLAGS}
+
+PRIMARY_CPPFLAGS= -DPRIMARY_BOOTBLOCK \
+ -DSECONDARY_LOAD_ADDRESS="${SECONDARY_LOAD_ADDRESS}" \
+ -DSECONDARY_MAX_LOAD="${SECONDARY_MAX_LOAD}" \
+ -DHEAP_LIMIT="${PRIMARY_HEAP_LIMIT}" \
+ -DHEAP_START="${PRIMARY_HEAP_START}"
+
+SECONDARY_CPPFLAGS= -DSECONDARY_BOOTBLOCK \
+ -DHEAP_LIMIT="${SECONDARY_HEAP_LIMIT}" \
+ ${FILE_FORMAT_CPPFLAGS}
+
+.include <bsd.prog.mk>
+
+### find out what to use for libkern
+KERN_AS= library
+.include "${S}/lib/libkern/Makefile.inc"
+LIBKERN= ${KERNLIB}
+
+### find out what to use for libz
+Z_AS= library
+.include "${S}/lib/libz/Makefile.inc"
+LIBZ= ${ZLIB}
+
+### find out what to use for libsa
+SA_AS= library
+.include "${S}/lib/libsa/Makefile.inc"
+LIBSA= ${SALIB}
diff -r 7214e242cf13 -r c85f90fb3fa9 sys/arch/alpha/stand/Makefile.bootxx
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/alpha/stand/Makefile.bootxx Mon Apr 05 22:03:49 1999 +0000
@@ -0,0 +1,36 @@
+# $NetBSD: Makefile.bootxx,v 1.2.2.2 1999/04/05 22:03:49 cgd Exp $
+
+SRCS = start.S bootxx.c booted_dev.c blkdev.c prom.c prom_disp.S \
+ putstr.c panic_putstr.c
+
+BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS}
+
+CPPFLAGS += ${PRIMARY_CPPFLAGS} \
+ -DLIBSA_FS_SINGLECOMPONENT -DLIBSA_NO_FS_WRITE \
+ -DLIBSA_NO_FS_CLOSE -DLIBSA_NO_FS_SEEK \
+ -DLIBSA_SINGLE_DEVICE=blkdev \
+ -D"blkdevioctl(x,y,z)=EINVAL" -D"blkdevclose(f)=0" \
+ -DLIBSA_NO_TWIDDLE \
+ -DLIBSA_NO_FD_CHECKING \
+ -DLIBSA_NO_RAW_ACCESS \
+ -DLIBSA_NO_DISKLABEL_MSGS \
+ -DLIBSA_USE_MEMCPY
+
+CLEANFILES+= ${PROG}.sym
+
+${PROG}: ${PROG}.sym
+ @echo creating ${PROG} from ${PROG}.sym...
+ @objcopy --output-target=binary ${PROG}.sym ${PROG}
+ @chmod 644 ${PROG}
+ @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"
+
+${PROG}.sym: ${OBJS} ${LIBSA} ${LIBKERN}
+ ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym \
+ ${OBJS} ${LIBSA} ${LIBKERN}
+ @chmod 644 ${PROG}.sym
+ @${SIZE} ${PROG}.sym
Home |
Main Index |
Thread Index |
Old Index