5 .PATH: ${BOOTSRC}/i386/boot2 ${BOOTSRC}/i386/gptboot \
6 ${BOOTSRC}/i386/common ${SASRC}
11 BOOT_COMCONSOLE_PORT?= 0x3f8
12 BOOT_COMCONSOLE_SPEED?= 9600
21 CFLAGS+=-DBOOTPROG=\"isoboot\" \
23 -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
24 -DSIOFMT=${B2SIOFMT} \
25 -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
27 -I${BOOTSRC}/i386/common \
28 -I${BOOTSRC}/i386/boot2 \
29 -Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
30 -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
31 -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
32 -Winline -Wno-pointer-sign
34 CFLAGS.gcc+= --param max-inline-insns-single=100
35 .if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201
36 CFLAGS.gcc+= -Wno-uninitialized
38 CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL}
40 LD_FLAGS+=${LD_FLAGS_BIN}
44 isoboot: gptldr.bin isoboot.bin ${BTXKERN}
45 btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l gptldr.bin \
46 -o ${.TARGET} isoboot.bin
47 @set -- `ls -l ${.TARGET}`; x=$$((${ISOBOOTSIZE}-$$5)); \
48 echo "$$x bytes available"; test $$x -ge 0
50 CLEANFILES+= gptldr.bin gptldr.out gptldr.o
52 gptldr.bin: gptldr.out
53 ${OBJCOPY} -S -O binary gptldr.out ${.TARGET}
56 ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o
58 CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o crc32.o drv.o \
59 cons.o ${OPENCRYPTO_XTS}
61 isoboot.bin: isoboot.out
62 ${OBJCOPY} -S -O binary isoboot.out ${.TARGET}
64 isoboot.out: ${BTXCRT} isoboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS}
65 ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSA32}
67 .include <bsd.prog.mk>