1 # $FreeBSD: src/sys/i386/boot/rawboot/Makefile,v 1.13.2.1 2002/08/07 16:31:56 ru 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
10 .PATH: ${.CURDIR}/../biosboot
13 CFLAGS= -O2 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
15 -I${.CURDIR}/../biosboot \
16 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
17 CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
18 CFLAGS+= ${CWARNFLAGS}
20 # By default, if a serial port is going to be used as console, use COM1
22 BOOT_COMCONSOLE_PORT?=0x3F8
23 CFLAGS+= -DCOMCONSOLE=${BOOT_COMCONSOLE_PORT}
25 BOOT_COMCONSOLE_SPEED?=9600
26 CFLAGS+= -DCONSPEED=${BOOT_COMCONSOLE_SPEED}
28 # Enable code to take the default boot string from a fixed location on the
29 # disk. See nextboot(8) and README.386BSD for more info.
31 #CFLAGS+= -DNAMEBLOCK_WRITEBACK
33 # Bias the conversion from the BIOS drive number to the FreeBSD unit number
34 # for hard disks. This may be useful for people booting in a mixed IDE/SCSI
35 # environment (set BOOT_HD_BIAS to the number of IDE drives).
36 #CFLAGS+= -DBOOT_HD_BIAS=1
38 # Details: this only applies if BOOT_HD_BIAS > 0. If the BIOS drive number
39 # for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to
40 # be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS). E.g.,
41 # BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:sd(0,a) instead of
42 # 1:wd(1,a). If `sd' is given explicitly, then the drive is assumed to be
43 # SCSI and have BIOS drive number (sd_unit_number + BOOT_HD_BIAS). E.g.,
44 # BOOT_HD_BIAS=1 makes sd(0,a) correspond to 1:sd(0,a) instead of 0:sd(0,a).
46 CLEANFILES+= boot.nohdr boot.strip rawboot sizetest
47 LDFLAGS+= -N -T 0 -nostdlib
52 # tunable timeout parameter, waiting for keypress, calibrated in ms
54 # tunable timeout during string input, calibrated in ms
57 # Location that boot2 is loaded at
60 # Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
65 strip -aout boot.strip
68 boot.nohdr: boot.strip
69 dd if=boot.strip of=boot.nohdr ibs=32 skip=1 obs=1024b
73 dd if=boot.nohdr of=rawboot bs=8k count=1 conv=sync
78 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}\
79 rawboot ${DESTDIR}${BINDIR}/rawboot
81 .include <bsd.kern.mk>
82 .include <bsd.prog.mk>