diff options
author | kefren <kefren@pkgsrc.org> | 2008-02-14 11:00:13 +0000 |
---|---|---|
committer | kefren <kefren@pkgsrc.org> | 2008-02-14 11:00:13 +0000 |
commit | 9aaf179189be0b10cba8cea9c10f659e7342e124 (patch) | |
tree | fc1f3e0e5dc8b1a7a1660616235b51e8f4c31128 | |
parent | 88c1237371625d270ef9c8b19f06eb92547da90f (diff) | |
download | pkgsrc-9aaf179189be0b10cba8cea9c10f659e7342e124.tar.gz |
Import dynamips, a Cisco 3600 and Cisco 7200 emulator
-rw-r--r-- | emulators/dynamips/DESCR | 22 | ||||
-rw-r--r-- | emulators/dynamips/MESSAGE | 11 | ||||
-rw-r--r-- | emulators/dynamips/Makefile | 30 | ||||
-rw-r--r-- | emulators/dynamips/PLIST | 3 | ||||
-rw-r--r-- | emulators/dynamips/distinfo | 6 | ||||
-rw-r--r-- | emulators/dynamips/patches/patch-aa | 56 |
6 files changed, 128 insertions, 0 deletions
diff --git a/emulators/dynamips/DESCR b/emulators/dynamips/DESCR new file mode 100644 index 00000000000..172a6eb9505 --- /dev/null +++ b/emulators/dynamips/DESCR @@ -0,0 +1,22 @@ +Cisco 3600 and Cisco 7200 emulator. You'll need an +IOS image in order to properly use this package. + +At this time, the emulator is able to boot a large +number of Cisco IOS releases available for the 7200 +and 3600 platforms, including the latest 12.2S and 12.4T. + +The following devices are emulated in the current release (0.2.5): + +- MIPS64 CPU processor. The instruction set is not completely + emulated now (FPU support is lacking, TLB support is not + finished and other minor things), but it is sufficient for IOS ; +- DRAM and Packet SRAM memory ; +- Non-Volatile Memory (NVRAM) ; +- Signetics SCN 2681 DUART (C7200 Console and AUX ports) ; +- National Semiconductors NS16552 DUART (C3600 Console and AUX ports) ; +- Dallas DS1620 Temperature Sensors and Voltage Sensors, allowing + the C7200 Environmental Monitor to work properly ; +- NMC93C46 Serial EEPROM ; +- Bootflash of 8 Mb (Intel 28F016SA) ; +- Galileo GT64010/GT64120 PCI controller, DEC 21x50 PCI bridges and so ; +- PCMCIA ATA disk emulation (C7200 only at this time). diff --git a/emulators/dynamips/MESSAGE b/emulators/dynamips/MESSAGE new file mode 100644 index 00000000000..f1a69438576 --- /dev/null +++ b/emulators/dynamips/MESSAGE @@ -0,0 +1,11 @@ +=========================================================================== +$NetBSD: MESSAGE,v 1.1.1.1 2008/02/14 11:00:13 kefren Exp $ + +By default dynamips will eat up all your CPU cycles. + +In this case you'll have to supply an idlepc value specific to each IOS +version. For more information see: + + http://dynagen.org/tutorial.htm#_Toc176827651 + +=========================================================================== diff --git a/emulators/dynamips/Makefile b/emulators/dynamips/Makefile new file mode 100644 index 00000000000..47cd08c01be --- /dev/null +++ b/emulators/dynamips/Makefile @@ -0,0 +1,30 @@ +# $NetBSD: Makefile,v 1.1.1.1 2008/02/14 11:00:13 kefren Exp $ + +DISTNAME= dynamips-0.2.7 +CATEGORIES= emulators +MASTER_SITES= http://www.ipflow.utc.fr/dynamips/ + +MAINTAINER= kefren@NetBSD.org +HOMEPAGE= http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator +COMMENT= Cisco 3600 and 7200 MIPS emulator + +USE_TOOLS+= gmake + +NO_CONFIGURE= yes + +BUILD_TARGET= # empty + +SUBST_CLASSES+= libelf +SUBST_STAGE.libelf= post-patch +SUBST_FILES.libelf= dynamips.h rom2c.c +SUBST_SED.libelf= -e 's,<libelf.h>,<libelf/libelf.h>,' +SUBST_MESSAGE.libelf= Fix libelf header file path + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/dynamips ${PREFIX}/bin + ${INSTALL_PROGRAM} ${WRKSRC}/nvram_export ${PREFIX}/bin + +.include "../../devel/libelf/buildlink3.mk" +.include "../../net/libpcap/buildlink3.mk" +.include "../../mk/pthread.buildlink3.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/emulators/dynamips/PLIST b/emulators/dynamips/PLIST new file mode 100644 index 00000000000..8dde6c48b28 --- /dev/null +++ b/emulators/dynamips/PLIST @@ -0,0 +1,3 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2008/02/14 11:00:13 kefren Exp $ +bin/dynamips +bin/nvram_export diff --git a/emulators/dynamips/distinfo b/emulators/dynamips/distinfo new file mode 100644 index 00000000000..ac04779e46d --- /dev/null +++ b/emulators/dynamips/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1.1.1 2008/02/14 11:00:13 kefren Exp $ + +SHA1 (dynamips-0.2.7.tar.gz) = 6f65a2e92f5d27aca9d8608369cb20c9539a8121 +RMD160 (dynamips-0.2.7.tar.gz) = 1c84f762c65dc2e83e84ee7b046793c71252c7b1 +Size (dynamips-0.2.7.tar.gz) = 522620 bytes +SHA1 (patch-aa) = 56da39ce9a9a1c65ec1ad00c903c177191eaedb3 diff --git a/emulators/dynamips/patches/patch-aa b/emulators/dynamips/patches/patch-aa new file mode 100644 index 00000000000..f2b4a78bac3 --- /dev/null +++ b/emulators/dynamips/patches/patch-aa @@ -0,0 +1,56 @@ +$NetBSD: patch-aa,v 1.1.1.1 2008/02/14 11:00:13 kefren Exp $ + +--- Makefile.orig 2007-05-26 11:52:33.000000000 +0200 ++++ Makefile 2007-07-16 19:07:57.000000000 +0200 +@@ -3,7 +3,19 @@ + + # Replace x86 by amd64 for a build on x86_64. + # Use "nojit" for architectures that are not x86 or x86_64. +-DYNAMIPS_ARCH?=x86 ++ifeq ($(shell uname -m), i386) ++ DYNAMIPS_ARCH?=x86 ++else ++ifeq ($(shell uname -m), i686) ++ DYNAMIPS_ARCH?=x86 ++else ++ifeq ($(shell uname -m), amd64) ++ DYNAMIPS_ARCH?=amd64 ++else ++ DYNAMIPS_ARCH?=nojit ++endif ++endif ++endif + + # Change this to 0 if your system doesn't support RFC 2553 extensions + HAS_RFC2553?=1 +@@ -40,8 +52,8 @@ + -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ + -DHAS_RFC2553=$(HAS_RFC2553) + +-PCAP_LIB=/usr/local/lib/libpcap.a +-#PCAP_LIB=-lpcap ++#PCAP_LIB=/usr/local/lib/libpcap.a ++PCAP_LIB=-lpcap + + ifeq ($(shell uname), FreeBSD) + PTHREAD_LIBS?=-pthread +@@ -49,6 +61,11 @@ + -D_FILE_OFFSET_BITS=64 + LIBS=-L/usr/local/lib -L. -lelf $(PTHREAD_LIBS) + else ++ifeq ($(shell uname -s), NetBSD) ++ PTHREAD_LIBS?=-pthread ++ CFLAGS+=-I${LOCALBASE}/include -I${LOCALBASE}/include/libelf ${PTHREAD_CFLAGS} ++ LIBS=-L${LOCALBASE}/lib -lelf ${PTHREAD_LIBS} ${PTHREAD_LDFLAGS} -R${LOCALBASE}/lib ++else + ifeq ($(shell uname), Linux) + PTHREAD_LIBS?=-lpthread + # PCAP_LIB=-lpcap +@@ -80,6 +97,7 @@ + endif + endif + endif ++endif + + PROG=dynamips$(BIN_EXT) + PACKAGE=$(PROG)-$(VERSION) |