a0d9d3bc54
XMS is recognized and used as temporary buffer for the kernel image. The processor must still be in real mode at program start, so EMM386 or QEMM are not allowed. W*95 is OK. Written by Martin Husemann (pr port-i386/3336). Completely separated from other bootloaders for sanity.
69 lines
2.1 KiB
Makefile
69 lines
2.1 KiB
Makefile
# $NetBSD: Makefile.booters,v 1.4 1997/06/13 17:49:22 drochner Exp $
|
|
|
|
BINDIR= /usr/mdec
|
|
STRIPFLAG=
|
|
BINMODE=444
|
|
|
|
.PATH: ${.CURDIR}/../lib/crt/bootsect ${.CURDIR}/../lib
|
|
BSSTART= start_bootsect.o fraglist.o bootsectmain.o biosdisk_ll.o bios_disk.o diskbuf.o
|
|
.PATH: ${.CURDIR}/../lib/crt/rom
|
|
ROMSTART= start_rom.o
|
|
.if exists(${.CURDIR}/../genprom/obj)
|
|
GENPROM= ${.CURDIR}/../genprom/obj/genprom
|
|
.else
|
|
GENPROM= ${.CURDIR}/../genprom/genprom
|
|
.endif
|
|
.PATH: ${.CURDIR}/../lib/crt/dos
|
|
DOSSTART= start_dos.o doscommain.o exec_fromdos.o
|
|
|
|
CPPFLAGS += -I$S -I${.CURDIR}/../lib -I$S/lib/libsa
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
### find out what to use for libkern
|
|
KERN_AS= library
|
|
# XXX only bzero is missing in libkern, but we have to list all we need
|
|
KERNMISCMAKEFLAGS= "SRCS=bzero.S bcmp.S strchr.c strncpy.c strcmp.S __main.c"
|
|
.include "${S}/lib/libkern/Makefile.inc"
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
### find out what to use for libz
|
|
Z_AS= library
|
|
.include "${S}/lib/libz/Makefile.inc"
|
|
LIBZ= ${ZLIB}
|
|
|
|
### find out what to use for libsa
|
|
SA_AS= library
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
LIBSA= ${SALIB}
|
|
|
|
### find out what to use for libi386
|
|
I386DIR= ${.CURDIR}/../lib # XXX
|
|
.include "${I386DIR}/Makefile.inc"
|
|
LIBI386= ${I386LIB}
|
|
|
|
${PROG}.sym: ${BSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
|
|
${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0 $(BSSTART) $(OBJS) \
|
|
${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
|
|
|
|
${PROG}.rom: ${GENPROM} ${ROMSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
|
|
${LD} -o ${PROG}.sym -M -e _start -N -Ttext ${RELOC} $(ROMSTART) $(OBJS) \
|
|
${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
|
|
cp ${PROG}.sym ${PROG}.bin
|
|
strip ${PROG}.bin
|
|
dd if=${PROG}.bin ibs=32 skip=1 | ${GENPROM} $(ROM_SIZE) > ${PROG}.rom || (rm ${PROG}.rom; false)
|
|
rm -f ${PROG}.bin
|
|
|
|
${PROG}.com: ${DOSSTART} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBI386}
|
|
${LD} -o ${PROG}.sym -M -e _start -N -Ttext 0x100 $(DOSSTART) $(OBJS) \
|
|
${LIBI386} ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} >${PROG}.list
|
|
cp ${PROG}.sym ${PROG}.bin
|
|
strip ${PROG}.bin
|
|
dd if=${PROG}.bin of=${PROG}.com ibs=32 skip=1 obs=1024b
|
|
rm -f ${PROG}.bin
|
|
|
|
${GENPROM}:
|
|
@echo "genprom" missing
|
|
@false
|
|
|