Cisco 3600 Series

From LinuxCisco

Jump to: navigation, search
Cisco 3620 Router
Cisco 3620 Router
The Cisco 3600-series were entry-level edge routers built on the IDT R4700 MIPS CPUs. The system controller is a Galileo GT-64010.

Contents

Design

The Cisco 3600-series routers were designed with expandability in mind. As such, the Cisco 3620 has two expansion slots; the 3640 has four (as is reflected in the size of the units) and the 3660 has 6 NM slots. These expansion modules sit on the NM expansion bus, which is essentially a modified PCI 2.1 bus with some proprietary extensions relating to EEPROM identication and what Cisco calls OIR, or Online Insertion and Removal. The Cisco 3620 does not have OIR.

Deeper technical information on the Cisco 3600-series can be found at [1]. Cisco also has made available a document describing the memory map of these routers, which can be found at [2].

NM Cards

The NM cards used in many Cisco products have a Motorola QUICC on them. While the purpose of this is unknown at this time, it is likely that the protocol decode core within the QUICC is used to assist in protocol functions; firmware appears to be loaded into the QUICC at startup time by IOS (via the IOFPGA on the board). This is likely the Motorola QUICC protocol support available freely from Freescale.

One possiblity is that once Linux/MIPS is booting on this hardware, the QUICCs can be leveraged to improve routing/networking performance of the 3600-series devices if they are to be used in a networking context.

Emulation

Dynamips has emulation of the Cisco 3600 series. The emulation is inadequate for booting a Linux kernel, and cannot be used with CILO. However, it works just fine for the Hello, World programs, and is great at running IOS.

ROMMON

The Cisco 3600 series have a fairly `standard' ROMMON. The ROMMON prompt can be accessed by hitting BREAK during boot (c-A F in Minicom). The priv command is available for the Cisco 3600 routers. Calculate your priv password based on your cookie here [3].

CILO, the bootloader used for the Cisco 3600 Series, boots directly from ROMMON before loading a kernel.

Booting

To boot a linux kernel on the Cisco 3600 series routers, you must install CILO. CILO enables booting of multi-LOAD-able segment ELF images, as well as, alternatively, LZMA-compressed images.

Hello World

One of the first pieces of third-party code run on the Cisco 3600 was a Hello, World, naturally. This can be found at http://www.sensi.org/~alec/mips/ciscohello.tgz.

Installing

Installing CILO then Linux on the Cisco 3600 series requires to have a running IOS with network connectivity since we rely on IOS to transfer images to the Flash. To do so, you have to compile CILO then a Linux kernel, copy them to the root of your TFTP server and run the following commands to have them setup on the flash :

Router#copy tftp://192.168.2.2/ciscoload.bin flash:
Destination filename [ciscoload.bin]?
Accessing tftp://192.168.2.2/ciscoload.bin...
Erase flash: before copying? [confirm]n
Loading ciscoload.bin from 192.168.2.2 (via Ethernet0/0): !!!!
[OK - 17896/34816 bytes]

If you are installing a pre-0.7 version of CILO, you also will need to install the stage two loader:

Verifying checksum...  OK (0x164C)
17896 bytes copied in 0.532 secs
Router#copy tftp://192.168.2.2/ciscoload.two flash:
Destination filename [ciscoload.two]?
Accessing tftp://192.168.2.2/ciscoload.two...
Erase flash: before copying? [confirm]n
Loading ciscoload.two from 192.168.2.2 (via Ethernet0/0): !
[OK - 124/4096 bytes]

Note that this step is unnecessary if you're running CILO 0.7 or the Multiplatform Alpha of CILO.

Finally, copy the kernel + initrd image to flash:

Verifying checksum...  OK (0xF1F0)
124 bytes copied in 0.224 secs
Router#copy tftp://192.168.2.2/openwrt-c3600-vmlinux.elf flash:
Destination filename [openwrt-c3600-vmlinux.elf]?
Accessing tftp://192.168.2.2/openwrt-c3600-vmlinux.elf...
Erase flash: before copying? [confirm]n
Loading openwrt-c3600-vmlinux.elf from 192.168.2.2 (via Ethernet0/0): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 2833288/5665792 bytes]

Verifying checksum...  OK (0x2832)
2833288 bytes copied in 38.96 secs (74560 bytes/sec)
Router#

Issue a reload to restart your router and get ready to use CILO to load the newly copied kernel image.

Current Status

Presently Linux does boot on the Cisco 3600 series in a somewhat usable form. CILO is well-supported on the C3600 series and can be found at [4]. Unless you're looking for something specific, use the latest version of CILO here. Bugginess guaranteed.

Do not use versions of CILO prior to 0.4 -- a major bug in the segment loading code caused issues with interrupt handling, among other things.

C3620 is now booting to userspace.

Attempting to load file openwrt-c3600-vmlinux.elf
Booting openwrt-c3600-vmlinux.elf.
Loaded 3527696 bytes at 80365410.
Kicking into Linux.
Linux version 2.6.27.10 (ffainelli@jumper) (gcc version 4.1.2) #1 Wed Jan 7 21:32:08 CET 2009
Cisco 3620 Multiservice Router with 131072kB of RAM.
console [early0] enabled
CPU revision is: 00002110 (R4700)
FPU revision is: 00002110
Determined physical RAM map:
 memory: 08000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00008000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00008000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit noinitrd console=ttyS0,115200console=ttyS0,62
Primary instruction cache 16kB, VIPT, 2-way, linesize 32 bytes.
Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 32 bytes
PID hash table entries: 512 (order: 9, 2048 bytes)
MIPS counter frequency: 40008530Hz
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 126292k/131072k available (1807k kernel code, 4608k reserved, 298k data, 1208k init, 0k highmem)
Calibrating delay loop... 79.61 BogoMIPS (lpj=159232)
Mount-cache hash table entries: 512
net_namespace: 592 bytes
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
audit: initializing netlink socket (disabled)
type=2000 audit(2.610:1): initialized
squashfs: version 3.0 (2006/03/15) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 247
io scheduler noop registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0x1e840000 (irq = 5) is a 16550A
console handover: boot [early0] -> real [ttyS0]
TCP bic registered
NET: Registered protocol family 17
Freeing unused kernel memory: 1208k freed
[sighandler]: No more events to be processed, quitting.
[cleanup]: Waiting for children.
[cleanup]: All children terminated.
- preinit -
Press CTRL-C for failsafe

Please press Enter to activate this console. PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Plase use
nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.



BusyBox v1.11.3 (2009-01-04 14:32:11 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (bleeding edge, r13923) -------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/#

Once an initrd has been added to the mix, the Cisco 3620 can be booted straight to userspace:

root@(none):/# cat /proc/cpuinfo                                                
system type             : Cisco 3620 Multiservice Router                        
processor               : 0                                                     
cpu model               : R4700 V1.0  FPU V1.0                                  
BogoMIPS                : 79.36                                                 
wait instruction        : yes                                                   
microsecond timers      : yes                                                   
tlb_entries             : 48                                                    
extra interrupt vector  : yes                                                   
hardware watchpoint     : no                                                    
ASEs implemented        :                                                       
shadow register sets    : 1                                                     
core                    : 0                                                     
VCED exceptions         : not available                                         
VCEI exceptions         : not available

There's still some work to do though, so keep watching!

You can grab the preliminary kernel support patch here[5]. A pre-built kernel image can be found at [6]. You will require CILO to boot the kernel, of course. Florian has prepared a patch against OpenWRT svn; this can be found at [7]. This patch needs to be updated to work with CILO 0.7, so if you're going to use the OpenWRT patch, stick with CILO 0.6 until further notice.

PCI Support

Preliminary PCI support has been achieved. Unfortunately, Cisco used non-standard hardware and vendor IDs for everything, so a bit more effort will be required to get things working in that regards, for the NM-1E2W, for example. If anyone wishes to donate a NM-1E or NM-4E to the project, please contact Phil.

End of Service for the Cisco 3600 Series

Cisco announced that the end of service for the 3600 series was to be December 31, 2008.[8] Because of this, it is likely that Linux will be the last new development for the platform at all.

Personal tools