Switch sun68k standalone programs to using MI libsa and libkern.
Bump version. Tested bootxx + ufsboot on TME (sun2 and sun3) and 3/80 (sun3x).
This commit is contained in:
parent
9d27968892
commit
1b7ed0b13a
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.inc,v 1.15 2009/03/15 14:08:17 tsutsui Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.16 2009/03/20 11:42:25 tsutsui Exp $
|
||||
|
||||
# Must have S=/usr/src/sys (or equivalent)
|
||||
# But note: this is w.r.t. a subdirectory
|
||||
|
@ -23,7 +23,7 @@ CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
|
|||
CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}
|
||||
|
||||
SRTOBJ= ${LIBSA}/SRT0.o ${LIBSA}/SRT1.o
|
||||
SRTLIB= ${LIBSA}/libsa.a
|
||||
SRTLIB= ${LIBSA}/lib/sa/libsa.a ${LIBSA}/lib/kern/libkern.a
|
||||
|
||||
CLEANFILES+= ${SA_PROG} ${SA_PROG}.bin
|
||||
|
||||
|
|
|
@ -1,39 +1,17 @@
|
|||
# $NetBSD: Makefile,v 1.26 2009/03/19 10:19:33 tsutsui Exp $
|
||||
|
||||
LIB=sa
|
||||
|
||||
#
|
||||
# We're not actually building a profiled version,
|
||||
# but this way the separate object files get built
|
||||
#
|
||||
|
||||
POBJS=SRT0.o
|
||||
|
||||
NOLINT=# defined
|
||||
NOPIC=# defined
|
||||
NOPROFILE=# defined
|
||||
|
||||
.include <bsd.own.mk>
|
||||
# $NetBSD: Makefile,v 1.27 2009/03/20 11:42:25 tsutsui Exp $
|
||||
|
||||
# Logically src/sys
|
||||
S=${.CURDIR}/../../../..
|
||||
S!= cd ${.CURDIR}/../../../..; pwd
|
||||
DIR_SA=${S}/lib/libsa
|
||||
DIR_KERN=${S}/lib/libkern ${S}/lib/libkern/arch/m68k
|
||||
DIR_LIBC=${S}/../common/lib/libc
|
||||
|
||||
.PATH: ${DIR_SA} ${DIR_KERN} \
|
||||
${DIR_LIBC}/gen ${DIR_LIBC}/arch/m68k/gen \
|
||||
${DIR_LIBC}/inet ${DIR_LIBC}/arch/m68k/inet \
|
||||
${DIR_LIBC}/quad ${DIR_LIBC}/arch/m68k/quad \
|
||||
${DIR_LIBC}/string ${DIR_LIBC}/arch/m68k/string \
|
||||
${S}/arch/sun68k/sun68k
|
||||
|
||||
# DEBUG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
|
||||
# -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG -DDEBUG_PROM
|
||||
|
||||
CPUFLAGS= # ignore settings in /etc/mk.conf
|
||||
DEFS= -Dsun3 -D_STANDALONE -D__daddr_t=int32_t
|
||||
INCL= -I. -I${.CURDIR} -I${S}/lib/libsa -I${S} -I${.CURDIR}/../../..
|
||||
INCL= -I. -I${.CURDIR} -I${S}/lib/libsa -I${S} -I${S}/arch
|
||||
AFLAGS= -Wa,-mc68020 -Wa,-mc68851
|
||||
CFLAGS= -mc68000 -Wa,-mc68010 -Wa,-m68851 -msoft-float
|
||||
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
|
||||
|
@ -41,45 +19,29 @@ COPTS= -Os -fno-defer-pop -ffreestanding
|
|||
CPPFLAGS= ${DEFS} ${DEBUG} ${INCL}
|
||||
CLEANFILES= SRT0.o SRT1.o vers.c
|
||||
|
||||
SRC_net= net.c ether.c arp.c ip_cksum.c rarp.c
|
||||
SRCS= SRT0.S SRT1.c
|
||||
OBJS= SRT0.o SRT1.o
|
||||
|
||||
SRC_sa = alloc.c bcopy.c close.c files.c getfile.c loadfile.c loadfile_aout.c \
|
||||
loadfile_elf32.c lseek.c memcpy.c memmove.c open.c printf.c read.c \
|
||||
snprintf.c sprintf.c strerror.c subr_prf.c twiddle.c ctrlsp.S
|
||||
realall: ${OBJS}
|
||||
|
||||
SRC_kern= intoa.c
|
||||
.include <bsd.prog.mk>
|
||||
|
||||
# bring in the required libgcc integer support:
|
||||
SRC_libc_gen= mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S muldi3.c
|
||||
### find out what to use for libkern
|
||||
KERN_AS= library
|
||||
.include "${S}/lib/libkern/Makefile.inc"
|
||||
LIBKERN= ${KERNLIB}
|
||||
|
||||
SRC_libc_inet= inet_addr.c
|
||||
### find out what to use for libsa
|
||||
SA_AS= library
|
||||
SAMISCMAKEFLAGS= SA_USE_LOADFILE=yes SA_EXTRADIR=${.CURDIR}
|
||||
.include "${S}/lib/libsa/Makefile.inc"
|
||||
LIBSA= ${SALIB}
|
||||
|
||||
SRC_libc_quad= ashldi3.c ashrdi3.c
|
||||
LIBS= ${LIBSA} ${LIBKERN}
|
||||
|
||||
SRC_libc_string= bzero.S memcmp.S memset.S strcmp.S strlen.S strncmp.S
|
||||
realall: ${LIBS}
|
||||
|
||||
SRC_here= SRT1.c clock.c dev_disk.c devopen.c \
|
||||
gets.c idprom.c netif_sun.c panic.c \
|
||||
promboot.c promcons.c promdev.c putstr.c \
|
||||
sun2.c sun3.c sun3x.c vers.c xxboot.c
|
||||
cleandir distclean: cleanlibdir
|
||||
|
||||
SRCS= ${SRC_net} ${SRC_sa} ${SRC_kern} \
|
||||
${SRC_libc_gen} ${SRC_libc_inet} ${SRC_libc_quad} ${SRC_libc_string} \
|
||||
${SRC_here}
|
||||
|
||||
# only needed during build
|
||||
libinstall::
|
||||
|
||||
|
||||
.undef DESTDIR=
|
||||
.include <bsd.lib.mk>
|
||||
|
||||
# Nuke these...
|
||||
LOBJS=
|
||||
POBJS=
|
||||
SOBJS=
|
||||
|
||||
# Customized rules...
|
||||
|
||||
vers.c: ${.CURDIR}/version
|
||||
${HOST_SH} ${S}/conf/newvers_stand.sh -MD ${.CURDIR}/version "${MACHINE}"
|
||||
cleanlibdir:
|
||||
-rm -rf lib
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
# $NetBSD: Makefile.inc,v 1.1 2009/03/20 11:42:25 tsutsui Exp $
|
||||
|
||||
S!= cd ${SA_EXTRADIR}/../../../..; pwd
|
||||
|
||||
.PATH.c: ${SA_EXTRADIR}
|
||||
|
||||
# prefered local sources: gets.c panic.c
|
||||
|
||||
SRCS+= clock.c dev_disk.c devopen.c \
|
||||
idprom.c netif_sun.c \
|
||||
promboot.c promcons.c promdev.c putstr.c \
|
||||
sun2.c sun3.c sun3x.c xxboot.c
|
||||
|
||||
SRCS+= ${S}/arch/sun68k/sun68k/ctrlsp.S
|
||||
|
||||
# XXX libkern builds these only on m68000
|
||||
.PATH.S: ${S}/../common/lib/libc/arch/m68k/gen
|
||||
SRCS+= mulsi3.S divsi3.S udivsi3.S modsi3.S umodsi3.S
|
||||
|
||||
vers.c: ${SA_EXTRADIR}/version
|
||||
${HOST_SH} ${S}/conf/newvers_stand.sh \
|
||||
-MD ${SA_EXTRADIR}/version "${MACHINE}"
|
||||
|
||||
SRCS+= vers.c
|
||||
CLEANFILES+= vers.c
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: version,v 1.5 2005/12/11 12:19:29 christos Exp $
|
||||
$NetBSD: version,v 1.6 2009/03/20 11:42:25 tsutsui Exp $
|
||||
|
||||
NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this
|
||||
file is important - make sure the entries are appended on end, last item
|
||||
|
@ -19,3 +19,4 @@ is taken as the current.
|
|||
1.10: loadfile() update: ELF symbols no longer need backward seeks.
|
||||
1.11: loadfile() update to avoid backwards seeks for ELF Program Headers.
|
||||
1.12: tapeboot: file seek bug fixed, sun2 support added
|
||||
1.13: switched to using MI libsa and libkern
|
||||
|
|
Loading…
Reference in New Issue