--- /dev/null 2011-04-12 00:13:31.000000000 +0900 +++ libsa/Makefile.inc 2011-04-11 23:06:46.000000000 +0900 @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.25 2009/03/19 10:19:33 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 Index: boot/Makefile =================================================================== RCS file: /cvsroot/src/sys/arch/x68k/stand/boot/Makefile,v retrieving revision 1.19 diff -u -p -r1.19 Makefile --- boot/Makefile 22 Jan 2011 19:19:24 -0000 1.19 +++ boot/Makefile 11 Apr 2011 15:47:40 -0000 @@ -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 Index: boot/srt0.S =================================================================== RCS file: /cvsroot/src/sys/arch/x68k/stand/boot/srt0.S,v retrieving revision 1.1 diff -u -p -r1.1 srt0.S --- boot/srt0.S 27 Sep 2001 10:14:49 -0000 1.1 +++ boot/srt0.S 11 Apr 2011 15:47:40 -0000 @@ -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) Index: libsa/Makefile =================================================================== RCS file: /cvsroot/src/sys/arch/x68k/stand/libsa/Makefile,v retrieving revision 1.25 diff -u -p -r1.25 Makefile --- libsa/Makefile 19 Mar 2009 10:19:33 -0000 1.25 +++ libsa/Makefile 11 Apr 2011 15:47:40 -0000 @@ -1,43 +1,11 @@ # $NetBSD: Makefile,v 1.25 2009/03/19 10:19:33 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 Index: libsa/consio.c =================================================================== RCS file: /cvsroot/src/sys/arch/x68k/stand/libsa/consio.c,v retrieving revision 1.7 diff -u -p -r1.7 consio.c --- libsa/consio.c 11 Apr 2011 14:00:02 -0000 1.7 +++ libsa/consio.c 11 Apr 2011 15:47:40 -0000 @@ -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