Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / sys / boot / pc98 / boot2 / Makefile
1 # $FreeBSD: src/sys/boot/pc98/boot2/Makefile,v 1.4.2.2 2002/08/07 16:31:53 ru Exp $
2 # $DragonFly: src/sys/boot/pc98/boot2/Attic/Makefile,v 1.2 2003/06/17 04:28:18 dillon Exp $
3 #
4
5 PROG=   boot
6 # Order is very important on the SRCS line for this prog
7 SRCS=   start.S table.c boot2.S boot.c asm.S bios.S serial.S
8 SRCS+=  probe_keyboard.c io.c disk.c sys.c
9
10 BINDIR=         /boot
11 BINMODE=        444
12 CFLAGS=         -elf -Os -fno-builtin -fforce-addr -fdata-sections \
13                 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
14                 -mpreferred-stack-boundary=2 -mrtd \
15                 -DPC98 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
16 CFLAGS+=        -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
17 CFLAGS+=        ${CWARNFLAGS}
18 CFLAGS+=        -I${.CURDIR}/../../..
19
20
21 # By default, if a serial port is going to be used as console, use COM1
22 # (aka /dev/ttyd0).
23 #BOOT_COMCONSOLE_PORT?=0x30
24 BOOT_COMCONSOLE_PORT?=0x238
25 BOOT_COMCONSOLE_CLK?=16
26 BOOT_COMCONSOLE_MODE=0x0c
27 CFLAGS+=        -DCOMCONSOLE=${BOOT_COMCONSOLE_PORT} \
28                 -DCOMCONSOLE_CLK=${BOOT_COMCONSOLE_CLK} \
29                 -DCOMCONSOLE_MODE=${BOOT_COMCONSOLE_MODE}
30
31 # feature not implemented
32 BOOT_COMCONSOLE_SPEED?=9600
33 CFLAGS+=        -DCONSPEED=${BOOT_COMCONSOLE_SPEED}
34
35 # Enable code to take the default boot string from a fixed location on the
36 # disk.  See nextboot(8) and README.386BSD for more info.
37 #CFLAGS+=       -DNAMEBLOCK
38 #CFLAGS+=       -DNAMEBLOCK_WRITEBACK
39
40 # Bias the conversion from the BIOS drive number to the FreeBSD unit number
41 # for hard disks.  This may be useful for people booting in a mixed IDE/SCSI
42 # environment (set BOOT_HD_BIAS to the number of IDE drives).
43 #CFLAGS+=       -DBOOT_HD_BIAS=1
44 #
45 # Details: this only applies if BOOT_HD_BIAS > 0.  If the BIOS drive number
46 # for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to
47 # be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS).  E.g.,
48 # BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:da(0,a) instead of
49 # 1:wd(1,a).  If `da' is given explicitly, then the drive is assumed to be
50 # SCSI and have BIOS drive number (da_unit_number + BOOT_HD_BIAS).  E.g.,
51 # BOOT_HD_BIAS=1 makes da(0,a) correspond to 1:da(0,a) instead of 0:da(0,a).
52
53 CLEANFILES+=    boot.nohdr boot.strip boot1 boot2 sizetest
54 LDFLAGS+=       -N -Ttext 0 -nostdlib -e start
55 NOSHARED=       YES
56 NOMAN=
57 STRIP=
58
59 # tunable timeout parameter, waiting for keypress, calibrated in ms
60 BOOTWAIT?=      5000
61 # tunable timeout during string input, calibrated in ms
62 #TIMEOUT?=      30000
63
64 # Location that boot2 is loaded at
65 BOOTSEG=        0x1000
66
67 # Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
68 BOOTSTACK=      0xFFF0
69
70 boot.nohdr:     boot
71         objcopy -S -O binary boot boot.nohdr
72         ls -l boot.nohdr
73
74 boot1:          boot.nohdr
75         dd if=boot.nohdr of=boot1 bs=512 count=1
76
77 boot2:          boot.nohdr
78         dd if=boot.nohdr of=boot2 bs=512 skip=1
79         @dd if=boot2 skip=14 of=sizetest 2> /dev/null
80         @if [ -s sizetest ] ; then \
81                 echo "boot2 is too big" >&2 ; \
82                 rm boot2 ; \
83                 exit 2 ; \
84         fi
85
86 all:            boot1 boot2
87
88 install:
89         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
90                 boot1 boot2 ${DESTDIR}${BINDIR}
91
92 .include <bsd.kern.mk>
93 .include <bsd.prog.mk>