1999-08-28 01:08:13 +00:00
|
|
|
# $FreeBSD$
|
1998-10-05 19:20:36 +00:00
|
|
|
|
2004-04-28 21:31:21 +00:00
|
|
|
PROG?= boot0
|
|
|
|
STRIP=
|
|
|
|
BINMODE=${NOBINMODE}
|
2004-12-21 08:47:35 +00:00
|
|
|
NO_MAN=
|
2004-04-28 21:31:21 +00:00
|
|
|
SRCS= ${PROG}.S
|
1998-10-05 10:08:37 +00:00
|
|
|
|
2002-01-10 21:40:33 +00:00
|
|
|
# The default set of flags compiled into boot0. This enables update (writing
|
|
|
|
# the modified boot0 back to disk after running so that the selection made is
|
|
|
|
# saved), packet mode (detect and use the BIOS EDD extensions if we try to
|
|
|
|
# boot past the 1024 cylinder liimt), and booting from all valid slices.
|
2004-08-27 00:18:03 +00:00
|
|
|
BOOT_BOOT0_FLAGS?= 0x8f
|
1998-10-19 19:13:53 +00:00
|
|
|
|
2002-01-10 21:40:33 +00:00
|
|
|
# The number of timer ticks to wait for a keypress before assuming the default
|
|
|
|
# selection. Since there are 18.2 ticks per second, the default value of
|
|
|
|
# 0xb6 (182d) corresponds to 10 seconds.
|
|
|
|
BOOT_BOOT0_TICKS?= 0xb6
|
|
|
|
|
|
|
|
# The base address that we the boot0 code to to run it. Don't change this
|
|
|
|
# unless you are glutton for punishment.
|
|
|
|
BOOT_BOOT0_ORG?= 0x600
|
1998-10-05 10:08:37 +00:00
|
|
|
|
2005-04-25 17:41:35 +00:00
|
|
|
# Comm settings for boot0sio.
|
|
|
|
# Bit(s) Description
|
|
|
|
# 7-5 data rate (110,150,300,600,1200,2400,4800,9600 bps)
|
|
|
|
# 4-3 parity (00 or 10 = none, 01 = odd, 11 = even)
|
|
|
|
# 2 stop bits (set = 2, clear = 1)
|
|
|
|
# 1-0 data bits (00 = 5, 01 = 6, 10 = 7, 11 = 8)
|
|
|
|
.if !defined(BOOT_BOOT0_COMCONSOLE_SPEED)
|
|
|
|
BOOT_COMCONSOLE_SPEED?= 9600
|
|
|
|
.if ${BOOT_COMCONSOLE_SPEED} == 9600
|
|
|
|
BOOT_BOOT0_COMCONSOLE_SPEED= "7 << 5 + 3"
|
|
|
|
.elif ${BOOT_COMCONSOLE_SPEED} == 4800
|
|
|
|
BOOT_BOOT0_COMCONSOLE_SPEED= "6 << 5 + 3"
|
|
|
|
.elif ${BOOT_COMCONSOLE_SPEED} == 2400
|
|
|
|
BOOT_BOOT0_COMCONSOLE_SPEED= "5 << 5 + 3"
|
|
|
|
.elif ${BOOT_COMCONSOLE_SPEED} == 1200
|
|
|
|
BOOT_BOOT0_COMCONSOLE_SPEED= "4 << 5 + 3"
|
|
|
|
.elif ${BOOT_COMCONSOLE_SPEED} == 600
|
|
|
|
BOOT_BOOT0_COMCONSOLE_SPEED= "3 << 5 + 3"
|
|
|
|
.elif ${BOOT_COMCONSOLE_SPEED} == 300
|
|
|
|
BOOT_BOOT0_COMCONSOLE_SPEED= "2 << 5 + 3"
|
|
|
|
.elif ${BOOT_COMCONSOLE_SPEED} == 150
|
|
|
|
BOOT_BOOT0_COMCONSOLE_SPEED= "1 << 5 + 3"
|
|
|
|
.elif ${BOOT_COMCONSOLE_SPEED} == 110
|
|
|
|
BOOT_BOOT0_COMCONSOLE_SPEED= "0 << 5 + 3"
|
|
|
|
.else
|
|
|
|
BOOT_BOOT0_COMCONSOLE_SPEED= "7 << 5 + 3"
|
|
|
|
.endif
|
|
|
|
.endif
|
2004-01-06 18:46:35 +00:00
|
|
|
|
2004-04-28 20:49:17 +00:00
|
|
|
CFLAGS+=-DFLAGS=${BOOT_BOOT0_FLAGS} \
|
|
|
|
-DTICKS=${BOOT_BOOT0_TICKS} \
|
|
|
|
-DCOMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED}
|
1998-10-05 10:08:37 +00:00
|
|
|
|
2004-04-25 20:36:44 +00:00
|
|
|
LDFLAGS=-N -e start -Ttext ${BOOT_BOOT0_ORG} -Wl,-S,--oformat,binary
|
1998-10-05 10:08:37 +00:00
|
|
|
|
2004-04-28 16:16:16 +00:00
|
|
|
.include <bsd.prog.mk>
|