1 # $FreeBSD: src/sys/i386/boot/biosboot/Makefile,v 1.70.2.2 2002/08/07 16:31:55 ru Exp $
5 # Order is very important on the SRCS line for this prog
6 SRCS= start.S table.c boot2.S boot.c asm.S bios.S serial.S
7 SRCS+= probe_keyboard.c io.c disk.c sys.c
10 CFLAGS= -O2 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
11 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
12 CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
13 CFLAGS+= ${CWARNFLAGS}
15 # By default, if a serial port is going to be used as console, use COM1
17 BOOT_COMCONSOLE_PORT?=0x3F8
18 CFLAGS+= -DCOMCONSOLE=${BOOT_COMCONSOLE_PORT}
20 BOOT_COMCONSOLE_SPEED?=9600
21 CFLAGS+= -DCONSPEED=${BOOT_COMCONSOLE_SPEED}
23 # Enable code to take the default boot string from a fixed location on the
24 # disk. See nextboot(8) and README.386BSD for more info.
26 #CFLAGS+= -DNAMEBLOCK_WRITEBACK
28 # Bias the conversion from the BIOS drive number to the FreeBSD unit number
29 # for hard disks. This may be useful for people booting in a mixed IDE/SCSI
30 # environment (set BOOT_HD_BIAS to the number of IDE drives).
31 #CFLAGS+= -DBOOT_HD_BIAS=1
33 # Details: this only applies if BOOT_HD_BIAS > 0. If the BIOS drive number
34 # for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to
35 # be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS). E.g.,
36 # BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:da(0,a) instead of
37 # 1:wd(1,a). If `da' is given explicitly, then the drive is assumed to be
38 # SCSI and have BIOS drive number (da_unit_number + BOOT_HD_BIAS). E.g.,
39 # BOOT_HD_BIAS=1 makes da(0,a) correspond to 1:da(0,a) instead of 0:da(0,a).
41 CLEANFILES+= boot.nohdr boot.strip boot1 boot2 sizetest
42 LDFLAGS+= -N -T 0 -nostdlib
47 # tunable timeout parameter, waiting for keypress, calibrated in ms
49 # tunable timeout during string input, calibrated in ms
52 # Location that boot2 is loaded at
55 # Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
60 strip -aout boot.strip
63 boot.nohdr: boot.strip
64 dd if=boot.strip of=boot.nohdr ibs=32 skip=1 obs=1024b
68 dd if=boot.nohdr of=boot1 bs=512 count=1
71 dd if=boot.nohdr of=boot2 bs=512 skip=1
72 @dd if=boot2 skip=14 of=sizetest 2> /dev/null
73 @if [ -s sizetest ] ; then \
74 echo "boot2 is too big" >&2 ; \
82 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
83 boot1 boot2 ${DESTDIR}${BINDIR}/
86 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${NOBINMODE} \
87 ${.CURDIR}/boot.help ${DESTDIR}/
89 .include <bsd.kern.mk>
90 .include <bsd.prog.mk>