aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/sparc64
diff options
context:
space:
mode:
authorThomas Moestl <tmm@FreeBSD.org>2002-04-01 22:57:51 +0000
committerThomas Moestl <tmm@FreeBSD.org>2002-04-01 22:57:51 +0000
commit163f47b1ec6f8e965ff27ef6f14c521dc838de15 (patch)
treeb0ecf09b9aad505dde8696e0752ea2cc61d1250c /sys/boot/sparc64
parent3077469e0c95a87d71f364154ebacb673618f5ff (diff)
downloadsrc-163f47b1ec6f8e965ff27ef6f14c521dc838de15.tar.gz
src-163f47b1ec6f8e965ff27ef6f14c521dc838de15.zip
1.) Produce a boot1 disklabel template of the format disklabel(8) expects.
2.) Clean up and change over to using bsd.prog.mk Submitted by: jake (2)
Notes
Notes: svn path=/head/; revision=93605
Diffstat (limited to 'sys/boot/sparc64')
-rw-r--r--sys/boot/sparc64/boot1/Makefile34
1 files changed, 22 insertions, 12 deletions
diff --git a/sys/boot/sparc64/boot1/Makefile b/sys/boot/sparc64/boot1/Makefile
index f152c744fd47..bde5360df4b6 100644
--- a/sys/boot/sparc64/boot1/Makefile
+++ b/sys/boot/sparc64/boot1/Makefile
@@ -1,19 +1,29 @@
# $FreeBSD$
+PROG= boot1
+SRCS= _start.S boot1.c
+NOMAN=
+STRIP=
+BINDIR?= /boot
+BINMODE= 444
+
BOOTBLOCKBASE= 0x4000
-CFLAGS= -W -Wall -I../../ -I../../common/ -Os \
- -DBOOTBLOCKBASE=${BOOTBLOCKBASE} \
- -ffreestanding -mno-app-regs -mcmodel=medlow
-OBJ= boot1.o
+CFLAGS= -W -Wall -I../../ -I../../common/ -Os -ffreestanding -mno-app-regs \
+ -mcmodel=medlow
+
+boot1.elf: _start.o boot1.o
+ ${LD} -N -Ttext ${BOOTBLOCKBASE} -o ${.TARGET} _start.o boot1.o
+
+boot1.aout: boot1.elf
+ /usr/local/bin/elftoaout -o ${.TARGET} boot1.elf
-all: boot1
+# Construct boot1. disklabel expects it to contain zeroed-out space for the
+# label, and to be of the correct size.
+boot1: boot1.aout
+ dd if=/dev/zero of=${.TARGET} bs=512 count=16
+ dd if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc
-boot1.o: boot1.c
- ${CC} ${CFLAGS} -c -o ${.TARGET} ${.ALLSRC}
+CLEANFILES+= boot1.elf boot1.aout
-boot1: ${OBJ}
- ${LD} -N -Ttext ${BOOTBLOCKBASE} -e main -o boot1 ${OBJ}
- /usr/local/bin/elftoaout boot1
-clean:
- rm -f *.o boot1
+.include <bsd.prog.mk>