1 # $FreeBSD: src/sys/i386/boot/biosboot/Makefile,v 1.70.2.2 2002/08/07 16:31:55 ru Exp $
2 # $DragonFly: src/sys/i386/boot/biosboot/Attic/Makefile,v 1.3 2003/11/15 19:01:31 dillon Exp $
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
11 CFLAGS= -O2 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
12 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
13 CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
14 CFLAGS+= ${CWARNFLAGS}
16 # By default, if a serial port is going to be used as console, use COM1
18 BOOT_COMCONSOLE_PORT?=0x3F8
19 CFLAGS+= -DCOMCONSOLE=${BOOT_COMCONSOLE_PORT}
21 BOOT_COMCONSOLE_SPEED?=9600
22 CFLAGS+= -DCONSPEED=${BOOT_COMCONSOLE_SPEED}
24 # Enable code to take the default boot string from a fixed location on the
25 # disk. See nextboot(8) and README.386BSD for more info.
27 #CFLAGS+= -DNAMEBLOCK_WRITEBACK
29 # Bias the conversion from the BIOS drive number to the FreeBSD unit number
30 # for hard disks. This may be useful for people booting in a mixed IDE/SCSI
31 # environment (set BOOT_HD_BIAS to the number of IDE drives).
32 #CFLAGS+= -DBOOT_HD_BIAS=1
34 # Details: this only applies if BOOT_HD_BIAS > 0. If the BIOS drive number
35 # for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to
36 # be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS). E.g.,
37 # BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:da(0,a) instead of
38 # 1:wd(1,a). If `da' is given explicitly, then the drive is assumed to be
39 # SCSI and have BIOS drive number (da_unit_number + BOOT_HD_BIAS). E.g.,
40 # BOOT_HD_BIAS=1 makes da(0,a) correspond to 1:da(0,a) instead of 0:da(0,a).
42 CLEANFILES+= boot.nohdr boot.strip boot1 boot2 sizetest
43 LDFLAGS+= -N -T 0 -nostdlib
48 # tunable timeout parameter, waiting for keypress, calibrated in ms
50 # tunable timeout during string input, calibrated in ms
53 # Location that boot2 is loaded at
56 # Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
61 strip -aout boot.strip
64 boot.nohdr: boot.strip
65 dd if=boot.strip of=boot.nohdr ibs=32 skip=1 obs=1024b
69 dd if=boot.nohdr of=boot1 bs=512 count=1
72 dd if=boot.nohdr of=boot2 bs=512 skip=1
73 @dd if=boot2 skip=14 of=sizetest 2> /dev/null
74 @if [ -s sizetest ] ; then \
75 echo "boot2 is too big" >&2 ; \
83 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
84 boot1 boot2 ${DESTDIR}${BINDIR}/
87 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
88 ${.CURDIR}/boot.help ${DESTDIR}/
90 .include "../../../conf/bsd.kern.mk"
91 .include <bsd.prog.mk>