Home»Projects »Linux for Cisco 2500 routers»Make your own kernel
So you want to make your own kernels? Good!
Connect the serial port of your PC to the cisco console port, and boot your cisco.
System Bootstrap, Version 5.2(5), RELEASE SOFTWARE
Copyright (c) 1986-1994 by cisco Systems
2500 processor with 16384 Kbytes of main memory
So this is a 2500 with 16mb of "main memory". Let's look this up in the following table.
This table provides values of MEM_END and IO_MEM_BASE depending upon
Main Memory | MEM_END | Cisco 2500 IO_MEM_BASE | Cisco 3000 IO_MEM_BASE | Comment |
---|---|---|---|---|
1 mb | 0x0fffff | 0x100000 | - | 2mb either in simm or on-board. Split up as 1mb main memory, 1mb i/o memory. |
2mb | 0x1fffff | 0x200000 | - | 4mb simm, no on-board. Split up as 2mb main memory, 2mb i/o memory. Or: 2mb simm as main memory, 2mb on-board as i/o memory. |
4mb | 0x3fffff | 0x400000 | 0x4000000 | 4mb simm as main memory, 2mb on-board as i/o memory |
6mb | 0x5fffff | 0x600000 | - | 8mb simm, no on-board. Split up as 6mb main memory, 2mb i/o memory |
8mb | 0x7fffff | 0x800000 | 0x4000000 | 8mb simm as main memory, 2 mb on-board as i/o memory. |
14mb | 0xdfffff | 0xe00000 | - | 16 mb simm, no on-board. Split up as 14 mb main memory, 2mb i/o memory |
16mb | 0xffffff | 0x4000000 | 0x4000000 | 16 mb simm as main memory, 2 mb on-board as i/o memory. |
MEM_END is the last address of "main memory". It equals the amount of "main memory" minus one. Main memory is general-purpose ram.
IO_MEM_BASE is where "i/o memory" is located - where network interfaces store their packets. If you are running
"i/o memory" begins at 0x4000000. In all other cases, "i/o memory" begins where "main memory" ends.
In the example, MEM_END is 0xffffff and IO_MEM_BASE is 0x4000000.
Grab the uClinux-cisco2500-0.1 source tree, and apply the 0.1.1-CB patch.
Edit MEM_END and IO_MEM_BASE to reflect the values found in the table. MEM_END
is defined in linux/arch/m68knommu/platform/68EC030/cisco2500/crt0_ram.S
.
IO_MEM_BASE is defined in linux/include/asm/cisco2500.h
.
Recompile the kernel, copy it to flash and reboot the cisco.
Back to uClinux-cisco2500