Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mvmeppc/stand Switch mvmeppc bootloader to using MI...



details:   https://anonhg.NetBSD.org/src/rev/14b2a413d4d5
branches:  trunk
changeset: 760302:14b2a413d4d5
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jan 02 09:40:51 2011 +0000

description:
Switch mvmeppc bootloader to using MI libsa and libkern for maintainability.
Mostly taken from mvme68k.

Compile test only, but no functional changes.

diffstat:

 sys/arch/mvmeppc/stand/Makefile.booters   |  16 +-------
 sys/arch/mvmeppc/stand/boot/Makefile      |   4 +-
 sys/arch/mvmeppc/stand/libsa/Makefile     |  52 +++++++++++++-----------------
 sys/arch/mvmeppc/stand/libsa/Makefile.inc |  13 +++++++
 4 files changed, 40 insertions(+), 45 deletions(-)

diffs (130 lines):

diff -r 94b3e06ea06c -r 14b2a413d4d5 sys/arch/mvmeppc/stand/Makefile.booters
--- a/sys/arch/mvmeppc/stand/Makefile.booters   Sun Jan 02 09:33:45 2011 +0000
+++ b/sys/arch/mvmeppc/stand/Makefile.booters   Sun Jan 02 09:40:51 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.booters,v 1.10 2009/12/24 16:41:01 tsutsui Exp $
+#      $NetBSD: Makefile.booters,v 1.11 2011/01/02 09:40:51 tsutsui Exp $
 
 S?=            ${.CURDIR}/../../../..
 MDEC_DIR?=     /usr/mdec
@@ -53,18 +53,8 @@
 
 LIB_SA_DIR=    ${.CURDIR}/../libsa
 LIBSA_DIR!=    cd ${LIB_SA_DIR} && ${PRINTOBJDIR}
-LIBSA=${LIBSA_DIR}/libsa.a
-
-.PHONY: ${LIBSA}
-${LIBSA}:
-       @echo making sure libsa is up to date...
-       @cd ${LIB_SA_DIR} && ${MAKE}
-
-SRTOBJ?= ${LIBSA_DIR}/srt0.o
-.PHONY: ${SRTOBJ}
-${SRTOBJ}:
-       @echo making sure srt0 is up to date...
-       @cd ${LIB_SA_DIR} && ${MAKE} srt0.o
+LIBSA=         ${LIBSA_DIR}/lib/sa/libsa.a
+LIBKERN=       ${LIBSA_DIR}/lib/kern/libkern.a
 
 #WRTVID_BOOT_DIR=  ${.CURDIR}/../wrtvid
 #WRTVID_DIR!=  cd ${WRTVID_BOOT_DIR} && ${PRINTOBJDIR}
diff -r 94b3e06ea06c -r 14b2a413d4d5 sys/arch/mvmeppc/stand/boot/Makefile
--- a/sys/arch/mvmeppc/stand/boot/Makefile      Sun Jan 02 09:33:45 2011 +0000
+++ b/sys/arch/mvmeppc/stand/boot/Makefile      Sun Jan 02 09:40:51 2011 +0000
@@ -1,8 +1,8 @@
-#      $NetBSD: Makefile,v 1.4 2005/12/11 12:18:20 christos Exp $
+#      $NetBSD: Makefile,v 1.5 2011/01/02 09:40:51 tsutsui Exp $
 
 SRCS=   boot.c conf.c devopen.c
 PROG=  boot.elf
-LIBS=  ${LIBSA}
+LIBS=  ${LIBSA} ${LIBKERN}
 DPADD= ${LIBS}
 CLEANFILES+= boot.bin
 
diff -r 94b3e06ea06c -r 14b2a413d4d5 sys/arch/mvmeppc/stand/libsa/Makefile
--- a/sys/arch/mvmeppc/stand/libsa/Makefile     Sun Jan 02 09:33:45 2011 +0000
+++ b/sys/arch/mvmeppc/stand/libsa/Makefile     Sun Jan 02 09:40:51 2011 +0000
@@ -1,27 +1,6 @@
-#      $NetBSD: Makefile,v 1.9 2010/03/16 01:46:38 mrg Exp $
-
-LIB=sa
-
-# Logically src/sys
-DIR_SA=$S/lib/libsa
-DIR_KERN=$S/lib/libkern
-
-SRC_net= nfs.c rpc.c net.c ether.c arp.c ip_cksum.c netif.c \
-        bootparam.c rarp.c dev_net.c bootp.c
-
+#      $NetBSD: Makefile,v 1.10 2011/01/02 09:40:52 tsutsui Exp $
 
-SRC_sa = alloc.c memcpy.c memset.c close.c exit.c files.c getfile.c gets.c \
-        open.c printf.c read.c strerror.c ufs.c globals.c lseek.c panic.c \
-        closeall.c dev.c dkcksum.c nullfs.c fstat.c twiddle.c sprintf.c \
-        subr_prf.c intoa.c udp.c memcmp.c loadfile.c loadfile_aout.c \
-        loadfile_elf32.c dev_net.c ether_sprintf.c snprintf.c strncmp.c
-
-SRC_kern= ashldi3.c ashrdi3.c strcmp.c strlen.c strncpy.c inet_addr.c
-
-SRC_here= srt0.S bugsyscalls.S exec_mvme.c parse_args.c getchar.c putchar.c
-SRC_here+= if_bug.c clock.c
-
-SRCS= ${SRC_net} ${SRC_sa} ${SRC_kern} ${SRC_here}
+S!= cd ${.CURDIR}/../../../..; pwd
 
 # DBG= -DDEBUG -DNETIF_DEBUG -DNFS_DEBUG -DRPC_DEBUG \
 #      -DNET_DEBUG -DRARP_DEBUG -DETHER_DEBUG
@@ -34,15 +13,28 @@
 CPPFLAGS+= -DSUPPORT_NFS -DNFS_NOSYMLINK
 
 .include "../Makefile.booters"
-.include "${S}/../common/lib/libc/Makefile.inc"
-
-.PATH:  ${DIR_SA} ${DIR_KERN}
 
 # only needed during build
 libinstall::
 
-all realall: lib${LIB}.a
+.include <bsd.prog.mk>
+
+### 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}
 
-.include <bsd.own.mk>
-.undef DESTDIR
-.include <bsd.lib.mk>
+### find out what to use for libkern
+KERN_AS= library
+.include "${S}/lib/libkern/Makefile.inc"
+LIBKERN= ${KERNLIB}
+
+LIBS= ${LIBSA} ${LIBKERN}
+
+all realall: ${LIBS}
+
+cleandir distclean: .WAIT cleanlibdir
+ 
+cleanlibdir:
+       rm -rf lib
diff -r 94b3e06ea06c -r 14b2a413d4d5 sys/arch/mvmeppc/stand/libsa/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/mvmeppc/stand/libsa/Makefile.inc Sun Jan 02 09:40:51 2011 +0000
@@ -0,0 +1,13 @@
+#      $NetBSD: Makefile.inc,v 1.1 2011/01/02 09:40:52 tsutsui Exp $
+
+S!= cd ${SA_EXTRADIR}/../../../..; pwd
+
+.PATH.c: ${SA_EXTRADIR}
+.PATH.S: ${SA_EXTRADIR}
+
+SRC_sa= dev_net.c
+
+SRC_here= srt0.S bugsyscalls.S exec_mvme.c parse_args.c getchar.c putchar.c
+SRC_here+= if_bug.c clock.c
+
+SRCS+= ${SRC_sa} ${SRC_here}



Home | Main Index | Thread Index | Old Index