7 .PATH: ${BOOTSRC}/i386/boot2 ${BOOTSRC}/i386/gptboot \
8 ${BOOTSRC}/i386/common ${SASRC}
15 BOOT_COMCONSOLE_PORT?= 0x3f8
16 BOOT_COMCONSOLE_SPEED?= 9600
25 CFLAGS+=-DBOOTPROG=\"isoboot\" \
27 -DSIOPRT=${BOOT_COMCONSOLE_PORT} \
28 -DSIOFMT=${B2SIOFMT} \
29 -DSIOSPD=${BOOT_COMCONSOLE_SPEED} \
31 -I${BOOTSRC}/i386/common \
32 -I${BOOTSRC}/i386/boot2 \
33 -Wall -Waggregate-return -Wbad-function-cast -Wno-cast-align \
34 -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
35 -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \
36 -Winline -Wno-pointer-sign
38 CFLAGS.gcc+= --param max-inline-insns-single=100
39 CFLAGS.clang+= -Oz ${CLANG_OPT_SMALL}
41 LD_FLAGS+=${LD_FLAGS_BIN}
45 isoboot: gptldr.bin isoboot.bin ${BTXKERN}
46 btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l gptldr.bin \
47 -o ${.TARGET} isoboot.bin
48 @set -- `ls -l ${.TARGET}`; x=$$((${ISOBOOTSIZE}-$$5)); \
49 echo "$$x bytes available"; test $$x -ge 0
51 CLEANFILES+= gptldr.bin gptldr.out gptldr.o
53 gptldr.bin: gptldr.out
54 ${OBJCOPY} -S -O binary gptldr.out ${.TARGET}
57 ${LD} ${LD_FLAGS} -e start -Ttext ${ORG1} -o ${.TARGET} gptldr.o
59 CLEANFILES+= isoboot.bin isoboot.out isoboot.o sio.o crc32.o drv.o \
60 cons.o ${OPENCRYPTO_XTS}
62 isoboot.bin: isoboot.out
63 ${OBJCOPY} -S -O binary isoboot.out ${.TARGET}
65 isoboot.out: ${BTXCRT} isoboot.o sio.o crc32.o drv.o cons.o ${OPENCRYPTO_XTS}
66 ${LD} ${LD_FLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBGELIBOOT} ${LIBSA32}
68 .include <bsd.prog.mk>