summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/stand/bootxx/Makefile
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-05-05 06:02:04 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-05-05 06:02:04 +0000
commit3d10bc794d2e03421fd174136259f42a03004bca (patch)
treed1b03f69e85167322eb9804fa9e85237ce45b7f1 /sys/arch/alpha/stand/bootxx/Makefile
parent53e6b51c98a2cae3f0e7c41c03a85f76fcd17341 (diff)
Updates from NetBSD (cgd):
- seriously clean up makefiles. use libsa/libkern/libz as appropriate, and don't build the various sources into objs locally by specifying them directly in the Makefiles. - move the secondary bootstrap down (to 0x20004000), and add a HEAP_LIMIT so that we don't exhaust our bootstrap address space (when using the new, not yet checked in, memory allocator). - clean up installboot, deal with secondary bootstrap programs not on 'a' partition or 'a' partition not starting at 0. - add padding to structures in bbinfo.h for future expansion. Add a netbbinfo structure to allow netboot information to be hard-coded in network boot blocks, so that they can be made to work even on systems with firmware which doesn't support the new "ethernet address in boot device" convention. - move the sync() calls to the correct place in installboot.c - remove a kludge in disk.c which was breaking multiple opens/closes of the disk - allow netboot ethernet address to be hard-coded into binary so that machines with old firmware which doesn't pass it in the boot device can work. Assume that if the ethernet address isn't passed in, it uses the old (dain-bramaged) 'read' interface works on my 3000/300LX. - Add setnetbootinfo, a program to hard code an ethernet address into a network boot. - move an 'int debug;' into boot.c (it was the only diff between boot.c and netboot.c), and nuke netboot.c (using boot.c instead for net boot blocks). - add cd9660 file system ops to the file system ops table in filesystem.c - if a file name is given (i.e. BOOTED_FILE) is set, boot only that file, but if not then try to boot "bsd", "bsd.bak", "bsd.old", and "obsd" (in that order) until one is found or until the list of names is exhausted. - add support for reading gzipped kernels. - use strerror() to print errors, rather than just printing error numbers - if no disk label exists, fake one up - slightly relax the block size checks in bootxx.c; they were a bit to paranoid And local changes: - don't build a copy of libsa/libkern/libz for each boot prog, just build a single copy and use it for everything.
Diffstat (limited to 'sys/arch/alpha/stand/bootxx/Makefile')
-rw-r--r--sys/arch/alpha/stand/bootxx/Makefile68
1 files changed, 36 insertions, 32 deletions
diff --git a/sys/arch/alpha/stand/bootxx/Makefile b/sys/arch/alpha/stand/bootxx/Makefile
index f2a724efda2..47e2f85db19 100644
--- a/sys/arch/alpha/stand/bootxx/Makefile
+++ b/sys/arch/alpha/stand/bootxx/Makefile
@@ -1,45 +1,49 @@
-# $OpenBSD: Makefile,v 1.4 1996/10/30 22:40:48 niklas Exp $
-# $NetBSD: Makefile,v 1.6 1996/10/18 06:02:02 thorpej Exp $
+# $OpenBSD: Makefile,v 1.5 1997/05/05 06:01:53 millert Exp $
+# $NetBSD: Makefile,v 1.12 1997/04/17 07:27:49 thorpej Exp $
-.PATH: ${.CURDIR}/.. ${.CURDIR}/../../../../lib/libsa
+S= ${.CURDIR}/../../../..
-BOOT_PROG = bootxx
-BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS}
+.PATH: ${.CURDIR}/..
+
+PROG = bootxx
-BOOT_SRCS = start.S bootxx.c prom.c prom_disp.S bzero.c puts.c
-BOOT_OBJS = ${BOOT_SRCS:N*.h:R:S/$/.o/g}
+SRCS = start.S bootxx.c prom.c prom_disp.S puts.c
+NOMAN=
+INSTALL_STRIP=
+BINMODE= 444
+BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS}
HEADERSIZE_PROG = headersize
-AFLAGS += -DASSEMBLER
-CPPFLAGS += -I${.CURDIR}/../.. -I${.CURDIR}/../../../.. -DPRIMARY_BOOTBLOCK
-CFLAGS = -Werror -mno-fp-regs -g
+CLEANFILES+= ${PROG}.sym ${PROG}.nosym ${HEADERSIZE_PROG}
+
+DEFNS= -DPRIMARY_BOOTBLOCK
-.PATH: ${.CURDIR}/../../../../lib/libkern
+AFLAGS += -DASSEMBLER ${DEFNS}
+CPPFLAGS += -I${.CURDIR}/../.. -I${S} ${DEFNS}
+CFLAGS = -Werror -mno-fp-regs
-all: ${BOOT_PROG}
+${PROG}.nosym: ${PROG}.sym
+ cp ${PROG}.sym ${PROG}.nosym
+ strip ${PROG}.nosym
-${BOOT_PROG}: ${BOOT_OBJS} ${HEADERSIZE_PROG}
- ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${BOOT_PROG}.hdr \
- ${BOOT_OBJS}
- size ${BOOT_PROG}.hdr
- strip ${BOOT_PROG}.hdr
- dd if=${BOOT_PROG}.hdr of=${BOOT_PROG}.nohdr \
- bs=`./${HEADERSIZE_PROG} ${BOOT_RELOC} ${BOOT_PROG}.hdr` skip=1
- dd if=${BOOT_PROG}.nohdr of=${BOOT_PROG} bs=`expr 15 \* 512` conv=sync
+${PROG}: ${PROG}.nosym ${HEADERSIZE_PROG}
+ dd if=${PROG}.nosym of=${PROG} \
+ ibs=`./${HEADERSIZE_PROG} ${BOOT_RELOC} ${PROG}.nosym` skip=1 \
+ obs=`expr 15 \* 512` conv=osync
-install:
- ${INSTALL} -c -o bin -g bin -m 444 ${BOOT_PROG} \
- ${DESTDIR}${BINDIR}/${BOOT_PROG}
+# no lint here (yet?)
+lint:
-clean: _SUBDIRUSE
- rm -f a.out [Ee]rrs mklog core *.core \
- ${BOOT_PROG} ${BOOT_OBJS} ${CLEANFILES} \
- ${BOOT_PROG}.hdr ${BOOT_PROG}.nohdr ${HEADERSIZE_PROG}
+.include <bsd.prog.mk>
-cleandir: _SUBDIRUSE clean
+### find out what to use for libkern
+KERN_AS= library
+KERNDST= ${.CURDIR}/../libkern/${__objdir}
+.include "${.CURDIR}/../libkern/Makefile.inc"
+LIBKERN= ${KERNLIB}
-.include "${.CURDIR}/../Makefile.inc"
-.include <bsd.obj.mk>
-.include <bsd.dep.mk>
-.include <bsd.subdir.mk>
+${PROG}.sym: ${OBJS} ${LIBKERN}
+ ${LD} -Ttext ${BOOT_RELOC} -N -e start -o ${PROG}.sym ${OBJS} \
+ ${LIBKERN}
+ size ${PROG}.sym