# $NetBSD: Makefile.buildboot,v 1.37.10.1 2024/06/22 10:57:10 martin Exp $ # RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long RELOC= FFF00000 S= ${.CURDIR}/../../../.. .PATH: ${.CURDIR}/../common PROG= ${PROGELF}.lif WARNS?= 1 SRCS= ${COMMONSOURCE} ${DRIVERSOURCE} ${PROGSOURCE} NOMAN= # defined STRIPFLAG= BINMODE= 444 CLEANFILES+= ${PROGELF} CPPFLAGS+= -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. -I${.OBJDIR} CPPFLAGS+= -Wno-main CPPFLAGS+= -D__daddr_t=int32_t CFLAGS= -Os -fno-unwind-tables -msoft-float -ffreestanding # XXX SHOULD NOT NEED TO DEFINE THESE! LIBCRT0= LIBCRTI= LIBC= LIBCRTBEGIN= LIBCRTEND= .if ${MKREPRO_TIMESTAMP:Uno} != "no" HP300MKBOOT_TIMESTAMP=-t "${MKREPRO_TIMESTAMP}" .endif ${PROG}: ${PROGELF} ${OBJCOPY} --output-target=binary ${PROGELF} ${PROGELF}.bin ${TOOL_HP300MKBOOT} -l 0x${RELOC} ${HP300MKBOOT_TIMESTAMP} ${PROGELF}.bin ${PROG} rm -f ${PROGELF}.bin .include "${S}/conf/newvers_stand.mk" CPPFLAGS+= -DDCACONSOLE -DAPCICONSOLE -DITECONSOLE -DDCMCONSOLE CPPFLAGS+= -DHIL_KEYBOARD -DUK_KEYBOARD CPPFLAGS+= -DDOMAIN_KEYBOARD CPPFLAGS+= -D_STANDALONE -DCOMPAT_NOLABEL -Dhp300 CPPFLAGS+= -DCOMPAT_UFS -DNO_LSEEK CPPFLAGS+= -DLIBSA_CREAD_NOCRC # if sun bootparams is desired #CPPFLAGS+= -DSUN_BOOTPARAMS # Limit the alloc() heap to below the msgbuf and ROM scratch pages. CPPFLAGS+= -DHEAP_LIMIT="0xffffdfff" COMMONSOURCE= srt0.S autoconf.c clock.c conf.c cons.c devopen.c \ exec.c machdep.c prf.c rawfs.c netio.c DRIVERSOURCE= apci.c ct.c dca.c dcm.c dnkbd.c fhpib.c hil.c \ hpib.c if_le.c ite.c ite_dumb.c ite_dv.c ite_gb.c \ ite_hy.c ite_rb.c ite_subr.c ite_tc.c ite_tvrx.c \ ite_sti.c \ kbd.c kbdconf.c nhpib.c rd.c scsi.c sd.c .include .include .include ### find out what to use for libkern KERN_AS= library .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 SAMISCMAKEFLAGS+="SA_USE_CREAD=yes" SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes" .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} ${PROGELF}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${LD} -N -Ttext ${RELOC} -e begin -o ${PROGELF} \ ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} @${SIZE} ${PROGELF} @echo ${PROGELF} total size should not exceed 1044480 bytes