diff --git a/sys/arch/x68k/stand/boot/Makefile b/sys/arch/x68k/stand/boot/Makefile index 1cb041f6ceff..05ebba97a3dd 100644 --- a/sys/arch/x68k/stand/boot/Makefile +++ b/sys/arch/x68k/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2011/01/22 19:19:24 joerg Exp $ +# $NetBSD: Makefile,v 1.20 2011/04/12 14:07:35 tsutsui Exp $ NOMAN= # defined @@ -44,12 +44,14 @@ CFLAGS= -Wno-main -Os -m68020-60 LINKFLAGS= -N -static -T ${.CURDIR}/boot.ldscript LIBIOCS!= cd $M/stand/libiocs && ${PRINTOBJDIR} LIBSA!= cd $M/stand/libsa && ${PRINTOBJDIR} -LDLIBS= -L${LIBSA} -lsa -L${LIBIOCS} -liocs +L= ${LIBSA}/lib +LDLIBS= ${L}/sa/libsa.a ${L}/kern/libkern.a ${L}/z/libz.a +LDLIBS+= ${LIBIOCS}/libiocs.a .include "../Makefile.booters" realall: ${PROG} -${PROG}: ${OBJS} ${LIBSA}/libsa.a ${LIBIOCS}/libiocs.a +${PROG}: ${OBJS} ${LDLIBS} ${_MKTARGET_LINK} ${LD} ${LINKFLAGS} -o ${PROG}.sym ${OBJS} ${LDLIBS} ${STRIP} -F ${BFDNAME} -o ${PROG} ${PROG}.sym diff --git a/sys/arch/x68k/stand/boot/srt0.S b/sys/arch/x68k/stand/boot/srt0.S index 6b1d8ae048f3..053901fa41c6 100644 --- a/sys/arch/x68k/stand/boot/srt0.S +++ b/sys/arch/x68k/stand/boot/srt0.S @@ -1,4 +1,4 @@ -/* $NetBSD: srt0.S,v 1.1 2001/09/27 10:14:49 minoura Exp $ */ +/* $NetBSD: srt0.S,v 1.2 2011/04/12 14:07:35 tsutsui Exp $ */ /*- * Copyright (c) 2001 Minoura Makoto @@ -48,7 +48,7 @@ start0: movl %d6,%sp@- jbsr _C_LABEL(bootmain) -ENTRY_NOPROFILE(exit) +ENTRY_NOPROFILE(_rtt) pea %pc@(reboot_msg) jbsr _C_LABEL(printf) jbsr _C_LABEL(getchar) diff --git a/sys/arch/x68k/stand/libsa/Makefile b/sys/arch/x68k/stand/libsa/Makefile index 1b06fc71b3b2..b7d3c8964af1 100644 --- a/sys/arch/x68k/stand/libsa/Makefile +++ b/sys/arch/x68k/stand/libsa/Makefile @@ -1,43 +1,11 @@ -# $NetBSD: Makefile,v 1.25 2009/03/19 10:19:33 tsutsui Exp $ +# $NetBSD: Makefile,v 1.26 2011/04/12 14:07:35 tsutsui Exp $ S= ${.CURDIR}/../../../.. -LIBSADIR= $S/lib/libsa -LIBKERNDIR= $S/lib/libkern -LIBZDIR= $S/lib/libz -LIBZDIST= $S/../common/dist/zlib -LIB= sa - -SRCS+= alloc.c bcopy.c bzero.c errno.c getfile.c gets.c -SRCS+= memcmp.c memcpy.c memmove.c memset.c panic.c -SRCS+= printf.c snprintf.c sprintf.c subr_prf.c twiddle.c vsprintf.c - -SRCS+= close.c closeall.c cread.c dev.c fstat.c ioctl.c lseek.c -SRCS+= open.c read.c stat.c -SRCS+= loadfile.c loadfile_aout.c loadfile_elf32.c -SRCS+= cd9660.c lfsv1.c lfsv2.c nfs.c ufs.c ufs_ls.c ustarfs.c -SRCS+= globals.c -#SRCS+= arp.c ether.c in_cksum.c net.c netif.c rpc.c udp.c -#SRCS+= bootp.c - -SRCS+= ashldi3.c ashrdi3.c divdi3.c moddi3.c qdivrem.c -SRCS+= strcat.c strchr.c strcmp.c strcpy.c strerror.c strlen.c -SRCS+= strncmp.c strrchr.c - -SRCS+= adler32.c crc32.c inffast.c -SRCS+= inflate.c inftrees.c uncompr.c - -SRCS+= consio.c devopen.c parseutils.c sdcd.c fd.c fdsub.S chdsk.c -SRCS+= putimage.S - -NOPROFILE= # defined -NOPIC= # defined -NOLINT= # defined - -CPPFLAGS+= -I${.OBJDIR} -I${LIBSADIR} -I$S -I${LIBZDIR} -I${LIBZDIST} +CPPFLAGS+= -nostdinc -I${.OBJDIR} -I. -I${S} CPPFLAGS+= -I${.CURDIR}/../libiocs -I${.CURDIR}/../common CPPFLAGS+= -D_STANDALONE -CPPFLAGS+= -DHEAP_VARIABLE -D__INTERNAL_LIBSA_CREAD +CPPFLAGS+= -DHEAP_VARIABLE CPPFLAGS+= -DHAVE_CHANGEDISK_HOOK CPPFLAGS+= -DUSTAR_SECT_PER_CYL=16 #CPPFLAGS+= -DDEBUG @@ -45,11 +13,33 @@ CPPFLAGS+= -DUSTAR_SECT_PER_CYL=16 .PATH: ${LIBSADIR} ${LIBKERNDIR} ${LIBZDIR} ${LIBZDIST} .include "../Makefile.booters" -.include "${S}/../common/lib/libc/Makefile.inc" # only needed during build libinstall:: -.include -.undef DESTDIR -.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 SA_USE_LOADFILE=yes SA_EXTRADIR=${.CURDIR} +.include "${S}/lib/libsa/Makefile.inc" +LIBSA= ${SALIB} + +LIBS= ${LIBKERN} ${LIBZ} ${LIBSA} + +all realall: ${LIBS} + +cleandir distclean: .WAIT cleanlibdir + +cleanlibdir: + -rm -rf lib diff --git a/sys/arch/x68k/stand/libsa/Makefile.inc b/sys/arch/x68k/stand/libsa/Makefile.inc new file mode 100644 index 000000000000..0c011732f1d0 --- /dev/null +++ b/sys/arch/x68k/stand/libsa/Makefile.inc @@ -0,0 +1,11 @@ +# $NetBSD: Makefile.inc,v 1.1 2011/04/12 14:07:35 tsutsui Exp $ + +# MD libsa files + +.PATH.c: ${SA_EXTRADIR} +.PATH.S: ${SA_EXTRADIR} + +SRCS+= consio.c devopen.c parseutils.c sdcd.c fd.c fdsub.S chdsk.c +SRCS+= putimage.S + +#SRCS+= dev_net.c diff --git a/sys/arch/x68k/stand/libsa/consio.c b/sys/arch/x68k/stand/libsa/consio.c index 76904a80b029..2e9177eca5d9 100644 --- a/sys/arch/x68k/stand/libsa/consio.c +++ b/sys/arch/x68k/stand/libsa/consio.c @@ -1,4 +1,4 @@ -/* $NetBSD: consio.c,v 1.7 2011/04/11 14:00:02 tsutsui Exp $ */ +/* $NetBSD: consio.c,v 1.8 2011/04/12 14:07:35 tsutsui Exp $ */ /* * Copyright (c) 2001 MINOURA Makoto. @@ -136,20 +136,6 @@ awaitkey_1sec(void) return c; } -__dead void -panic(const char *fmt,...) -{ - va_list ap; - - va_start(ap, fmt); - - printf(fmt, ap); - printf("\n"); - va_end(ap); - - exit(1); -} - extern void put_image(int, int); void