1 # $FreeBSD: src/sys/i386/boot/rawboot/Makefile,v 1.13.2.1 2002/08/07 16:31:56 ru Exp $
2 # $DragonFly: src/sys/platform/pc32/boot/rawboot/Attic/Makefile,v 1.2 2003/06/17 04:28:35 dillon Exp $
7 # Order is very important on the SRCS line for this prog
8 SRCS= start.S table.c boot2.S boot.c asm.S bios.S serial.S
9 SRCS+= probe_keyboard.c io.c disk.c sys.c
11 .PATH: ${.CURDIR}/../biosboot
14 CFLAGS= -O2 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
16 -I${.CURDIR}/../biosboot \
17 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
18 CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
19 CFLAGS+= ${CWARNFLAGS}
21 # By default, if a serial port is going to be used as console, use COM1
23 BOOT_COMCONSOLE_PORT?=0x3F8
24 CFLAGS+= -DCOMCONSOLE=${BOOT_COMCONSOLE_PORT}
26 BOOT_COMCONSOLE_SPEED?=9600
27 CFLAGS+= -DCONSPEED=${BOOT_COMCONSOLE_SPEED}
29 # Enable code to take the default boot string from a fixed location on the
30 # disk. See nextboot(8) and README.386BSD for more info.
32 #CFLAGS+= -DNAMEBLOCK_WRITEBACK
34 # Bias the conversion from the BIOS drive number to the FreeBSD unit number
35 # for hard disks. This may be useful for people booting in a mixed IDE/SCSI
36 # environment (set BOOT_HD_BIAS to the number of IDE drives).
37 #CFLAGS+= -DBOOT_HD_BIAS=1
39 # Details: this only applies if BOOT_HD_BIAS > 0. If the BIOS drive number
40 # for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to
41 # be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS). E.g.,
42 # BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:sd(0,a) instead of
43 # 1:wd(1,a). If `sd' is given explicitly, then the drive is assumed to be
44 # SCSI and have BIOS drive number (sd_unit_number + BOOT_HD_BIAS). E.g.,
45 # BOOT_HD_BIAS=1 makes sd(0,a) correspond to 1:sd(0,a) instead of 0:sd(0,a).
47 CLEANFILES+= boot.nohdr boot.strip rawboot sizetest
48 LDFLAGS+= -N -T 0 -nostdlib
53 # tunable timeout parameter, waiting for keypress, calibrated in ms
55 # tunable timeout during string input, calibrated in ms
58 # Location that boot2 is loaded at
61 # Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
66 strip -aout boot.strip
69 boot.nohdr: boot.strip
70 dd if=boot.strip of=boot.nohdr ibs=32 skip=1 obs=1024b
74 dd if=boot.nohdr of=rawboot bs=8k count=1 conv=sync
79 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}\
80 rawboot ${DESTDIR}${BINDIR}/rawboot
82 .include <bsd.kern.mk>
83 .include <bsd.prog.mk>