Makefile revision 53217
1# $FreeBSD: head/sys/boot/pc98/boot2/Makefile 53217 1999-11-16 11:56:38Z nyan $ 2# 3 4PROG= boot 5# Order is very important on the SRCS line for this prog 6SRCS= start.S table.c boot2.S boot.c asm.S bios.S serial.S 7SRCS+= probe_keyboard.c io.c disk.c sys.c 8 9BINDIR= /boot 10BINMODE= 444 11CFLAGS= -Os -malign-functions=0 -malign-jumps=0 -malign-loops=0 \ 12 -mpreferred-stack-boundary=2 -mrtd \ 13 -DPC98 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT} 14CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK} 15CFLAGS+= ${CWARNFLAGS} 16CFLAGS+= -I${.CURDIR}/../../.. -aout 17 18 19# By default, if a serial port is going to be used as console, use COM1 20# (aka /dev/ttyd0). 21#BOOT_COMCONSOLE_PORT?=0x30 22BOOT_COMCONSOLE_PORT?=0x238 23BOOT_COMCONSOLE_CLK?=16 24BOOT_COMCONSOLE_MODE=0x0c 25CFLAGS+= -DCOMCONSOLE=${BOOT_COMCONSOLE_PORT} \ 26 -DCOMCONSOLE_CLK=${BOOT_COMCONSOLE_CLK} \ 27 -DCOMCONSOLE_MODE=${BOOT_COMCONSOLE_MODE} 28 29# feature not implemented 30BOOT_COMCONSOLE_SPEED?=9600 31CFLAGS+= -DCONSPEED=${BOOT_COMCONSOLE_SPEED} 32 33# Enable code to take the default boot string from a fixed location on the 34# disk. See nextboot(8) and README.386BSD for more info. 35#CFLAGS+= -DNAMEBLOCK 36#CFLAGS+= -DNAMEBLOCK_WRITEBACK 37 38# Bias the conversion from the BIOS drive number to the FreeBSD unit number 39# for hard disks. This may be useful for people booting in a mixed IDE/SCSI 40# environment (set BOOT_HD_BIAS to the number of IDE drives). 41#CFLAGS+= -DBOOT_HD_BIAS=1 42# 43# Details: this only applies if BOOT_HD_BIAS > 0. If the BIOS drive number 44# for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to 45# be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS). E.g., 46# BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:da(0,a) instead of 47# 1:wd(1,a). If `da' is given explicitly, then the drive is assumed to be 48# SCSI and have BIOS drive number (da_unit_number + BOOT_HD_BIAS). E.g., 49# BOOT_HD_BIAS=1 makes da(0,a) correspond to 1:da(0,a) instead of 0:da(0,a). 50 51CLEANFILES+= boot.nohdr boot.strip boot1 boot2 sizetest 52LDFLAGS+= -N -T 0 -nostdlib 53NOSHARED= YES 54NOMAN= 55STRIP= 56 57# tunable timeout parameter, waiting for keypress, calibrated in ms 58BOOTWAIT?= 5000 59# tunable timeout during string input, calibrated in ms 60#TIMEOUT?= 30000 61 62# Location that boot2 is loaded at 63BOOTSEG= 0x1000 64 65# Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned 66BOOTSTACK= 0xFFF0 67 68boot.strip: boot 69 cp -p boot boot.strip 70 strip -aout boot.strip 71 size -aout boot.strip 72 73boot.nohdr: boot.strip 74 dd if=boot.strip of=boot.nohdr ibs=32 skip=1 obs=1024b 75 ls -l boot.nohdr 76 77boot1: boot.nohdr 78 dd if=boot.nohdr of=boot1 bs=512 count=1 79 80boot2: boot.nohdr 81 dd if=boot.nohdr of=boot2 bs=512 skip=1 82 @dd if=boot2 skip=14 of=sizetest 2> /dev/null 83 @if [ -s sizetest ] ; then \ 84 echo "boot2 is too big" >&2 ; \ 85 rm boot2 ; \ 86 exit 2 ; \ 87 fi 88 89all: boot1 boot2 90 91install: 92 ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ 93 boot1 boot2 ${DESTDIR}${BINDIR} 94 95 96.include <bsd.kern.mk> 97.include <bsd.prog.mk> 98