bcd106e18b
- Now that bsd.prog.mk deals with programs linked with -nostdlib better, and has a notion of an "internal" program, use PROG where possible. This has a good impact on the contents of .depend files and causes programs to be linked with cc(1). XXX: boot2 couldn't be converted as it's actually two programs. Tested on: i386, amd64
43 lines
1.3 KiB
Makefile
43 lines
1.3 KiB
Makefile
# $FreeBSD$
|
|
|
|
PROG= ${BOOT}.out
|
|
INTERNALPROG=
|
|
FILES= ${BOOT}
|
|
NOMAN=
|
|
SRCS= ${BOOT}.s
|
|
CLEANFILES= ${BOOT}
|
|
|
|
BOOT?= boot0
|
|
|
|
# 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.
|
|
BOOT_BOOT0_FLAGS?= 0xf
|
|
|
|
# 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
|
|
|
|
# Comm settings for boot0sio. 0xE3 => 9600 8-N-1
|
|
# XXX: We should create a build-tool or something to convert BOOT_CONSOLE_SPEED
|
|
# and BOOT_COMCONSOLE_PORT into the correct values to define on the build
|
|
# command line
|
|
BOOT_BOOT0_COMCONSOLE_SPEED?= 0xE3
|
|
|
|
AFLAGS+=--defsym FLAGS=${BOOT_BOOT0_FLAGS} \
|
|
--defsym TICKS=${BOOT_BOOT0_TICKS} \
|
|
--defsym COMSPEED=${BOOT_BOOT0_COMCONSOLE_SPEED}
|
|
|
|
LDFLAGS=-N -e start -Ttext ${BOOT_BOOT0_ORG}
|
|
|
|
${BOOT}: ${BOOT}.out
|
|
objcopy -S -O binary ${BOOT}.out ${.TARGET}
|
|
|
|
.include <bsd.prog.mk>
|