Use mips/conf/stand.ldscript on link so that we can use objcopy(1)
to create raw bootxx binary. Tested on NWS-5000X.
This commit is contained in:
parent
15db645a13
commit
ec658ee9f9
@ -1,4 +1,4 @@
|
|||||||
# $NetBSD: Makefile,v 1.12 2009/04/15 17:15:13 tsutsui Exp $
|
# $NetBSD: Makefile,v 1.13 2009/04/16 12:36:06 tsutsui Exp $
|
||||||
|
|
||||||
S!= cd ${.CURDIR}/../../../..; pwd
|
S!= cd ${.CURDIR}/../../../..; pwd
|
||||||
|
|
||||||
@ -14,7 +14,8 @@ SIZE?= size
|
|||||||
|
|
||||||
COMMON!= cd ${.CURDIR}/../common && ${PRINTOBJDIR}
|
COMMON!= cd ${.CURDIR}/../common && ${PRINTOBJDIR}
|
||||||
|
|
||||||
LINKFLAGS= -x -N -Ttext a0004000 -e _start
|
LDSCRIPT= ${S}/arch/mips/conf/stand.ldscript
|
||||||
|
LINKFLAGS= -x -N -Ttext a0004000 -T ${LDSCRIPT} -e _start
|
||||||
CFLAGS= -Os -ffreestanding -mmemcpy -mno-abicalls -msoft-float -G 0
|
CFLAGS= -Os -ffreestanding -mmemcpy -mno-abicalls -msoft-float -G 0
|
||||||
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
|
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
|
||||||
|
|
||||||
@ -24,7 +25,7 @@ CPPFLAGS+= -nostdinc -I. -I${S}
|
|||||||
AFLAGS= -D_LOCORE -mno-abicalls
|
AFLAGS= -D_LOCORE -mno-abicalls
|
||||||
|
|
||||||
CLEANFILES+= machine mips ${PROG}.sym
|
CLEANFILES+= machine mips ${PROG}.sym
|
||||||
CLEANFILES+= ${PROG}.bin ${PROG}.tmp
|
CLEANFILES+= ${PROG}.bin
|
||||||
|
|
||||||
LIBS= ${COMMON}/romcalls.o
|
LIBS= ${COMMON}/romcalls.o
|
||||||
LIBS+= ${COMMON}/lib/sa/libsa.a ${COMMON}/lib/kern/libkern.a
|
LIBS+= ${COMMON}/lib/sa/libsa.a ${COMMON}/lib/kern/libkern.a
|
||||||
@ -33,10 +34,7 @@ ${PROG}: ${OBJS}
|
|||||||
${_MKTARGET_LINK}
|
${_MKTARGET_LINK}
|
||||||
${LD} ${LINKFLAGS} -o ${.TARGET}.sym ${OBJS} ${LIBS}
|
${LD} ${LINKFLAGS} -o ${.TARGET}.sym ${OBJS} ${LIBS}
|
||||||
${SIZE} ${.TARGET}.sym
|
${SIZE} ${.TARGET}.sym
|
||||||
# XXX objcopy does not work for prog at KSEG
|
${OBJCOPY} -O binary ${.TARGET}.sym ${.TARGET}.bin
|
||||||
# ${OBJCOPY} -O binary ${.TARGET}.sym ${.TARGET}
|
|
||||||
${STRIP} ${.TARGET}.sym -o ${.TARGET}.tmp
|
|
||||||
tail -c +177 ${.TARGET}.tmp > ${.TARGET}.bin
|
|
||||||
mv ${.TARGET}.bin ${.TARGET}
|
mv ${.TARGET}.bin ${.TARGET}
|
||||||
|
|
||||||
.include <bsd.klinks.mk>
|
.include <bsd.klinks.mk>
|
||||||
|
Loading…
Reference in New Issue
Block a user