1ca987d46SWarner Losh.include <bsd.init.mk> 2ca987d46SWarner Losh 3ca987d46SWarner LoshPROG= ${LDR} 4ca987d46SWarner LoshINTERNALPROG= 5ca987d46SWarner LoshFILES= ${BOOT} 6ca987d46SWarner LoshMAN= ${BOOT}.8 7ca987d46SWarner LoshSRCS= ${LDR}.S 8ca987d46SWarner LoshCLEANFILES+= ${BOOT} 9ca987d46SWarner Losh 10ca987d46SWarner LoshBOOT= pxeboot 11ca987d46SWarner LoshLDR= pxeldr 12ca987d46SWarner LoshORG= 0x7c00 13ca987d46SWarner LoshLOADER= loader 14ca987d46SWarner Losh 15ca987d46SWarner Losh.if defined(BOOT_PXELDR_PROBE_KEYBOARD) 16ca987d46SWarner LoshCFLAGS+=-DPROBE_KEYBOARD 17ca987d46SWarner Losh.endif 18ca987d46SWarner Losh 19ca987d46SWarner Losh.if defined(BOOT_PXELDR_ALWAYS_SERIAL) 20ca987d46SWarner LoshCFLAGS+=-DALWAYS_SERIAL 21ca987d46SWarner Losh.endif 22ca987d46SWarner Losh 23ca987d46SWarner LoshCFLAGS+=-I${BOOTSRC}/i386/common 24ca987d46SWarner Losh 25*f4762e91SWarner Losh.if defined(PXEBOOT_DEFAULT_INTERP) 26*f4762e91SWarner LoshL=${PXEBOOT_DEFAULT_INTERP} 27*f4762e91SWarner Losh.else 289d45c24cSWarner LoshL=${LOADER_DEFAULT_INTERP} 29*f4762e91SWarner Losh.endif 309d45c24cSWarner LoshLOADERBIN= ${BOOTOBJ}/i386/loader_${L}/loader_${L}.bin 31ca987d46SWarner Losh 32ca987d46SWarner LoshCLEANFILES+= ${BOOT}.tmp 33ca987d46SWarner Losh 34ca987d46SWarner Losh${BOOT}: ${LDR} ${LOADER} 35ca987d46SWarner Losh cat ${LDR} ${LOADER} > ${.TARGET}.tmp 3687c5e64cSAlex Richardson ${DD} if=${.TARGET}.tmp of=${.TARGET} bs=2048 conv=sync 37ca987d46SWarner Losh rm ${.TARGET}.tmp 38ca987d46SWarner Losh 39ca987d46SWarner LoshLDFLAGS+=${LDFLAGS_BIN} 40ca987d46SWarner Losh 41ca987d46SWarner LoshCLEANFILES+= ${LOADER} 42ca987d46SWarner Losh 434c8ea3efSWarner Losh# Note: pxeldr.S assumes a.out and will require changes for ELF if the output 444c8ea3efSWarner Losh# format is changed to ELF. 45ca987d46SWarner Losh${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN} 464c8ea3efSWarner Losh btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \ 47ca987d46SWarner Losh -b ${BTXKERN} ${LOADERBIN} 48ca987d46SWarner Losh 49ca987d46SWarner Losh.include <bsd.prog.mk> 50