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 $
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
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}/../../..
21 # By default, if a serial port is going to be used as console, use COM1
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}
31 # feature not implemented
32 BOOT_COMCONSOLE_SPEED?=9600
33 CFLAGS+= -DCONSPEED=${BOOT_COMCONSOLE_SPEED}
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.
38 #CFLAGS+= -DNAMEBLOCK_WRITEBACK
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
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).
53 CLEANFILES+= boot.nohdr boot.strip boot1 boot2 sizetest
54 LDFLAGS+= -N -Ttext 0 -nostdlib -e start
59 # tunable timeout parameter, waiting for keypress, calibrated in ms
61 # tunable timeout during string input, calibrated in ms
64 # Location that boot2 is loaded at
67 # Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
71 objcopy -S -O binary boot boot.nohdr
75 dd if=boot.nohdr of=boot1 bs=512 count=1
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 ; \
89 ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
90 boot1 boot2 ${DESTDIR}${BINDIR}
92 .include <bsd.kern.mk>
93 .include <bsd.prog.mk>