Hide minor edits - Show changes to markup
cd linux-2.6.15.6
patch -b -p1 < ../linux-2.6.15.5-kgdb-2.4/core-lite.patch
patch -b -p1 < ../ ... core.patch
patch -b -p1 < ../ ... i386-lite.patch
i386.patch
8250.patch
target remote ip_addr:8111 where ip_addr is the windows host IP address that this virtual machine sees. (e.g. on my machine 192.168.149.1, and the VM gets address 192.168.149.128)
KGDB should connect, and away you go.
Caveats - note that I've had a lot of trouble with the DHCP server in VMWare if I'm running multiple machines at once, as it tends to give the same address to each one. You may wish to hardcode the ip address, route, and DNS resolver instead on each VM.
You will need to download a 2.4 kgdb patch: linux-2.4.23-kgdb-1.9.patch
This is a single patch - apply it with -p1 in the same way as the separate patches for 2.6. Configure your kernel and enable KGDB. You will need to add the kernel command line argument "gdb" to get it to halt on boot, and by default it will use COM1.
I haven't tested it yet, but you can create a named pipe for a serial port - make it something like /tmp/com_1, and then in gdb you should be able to just use the command target remote /tmp/com_1.
This is a single patch - apply it with -p1 in the same way as the separate patches for 2.6. Configure your kernel and enable KGDB. (note - I tested the 1.8 patch, and you have to configure thread analysis or else it won't compile properly)
This is a single patch - apply it with -p1 in the same way as the separate patches for 2.6. Configure your kernel and enable KGDB. You will need to add the kernel command line argument "gdb" to get it to halt on boot, and by default it will use COM1.
You will need to download a 2.4 kgdb patch: linux-2.4.23-kgdb-1.9.patch
This is a single patch - apply it with -p1 in the same way as the separate patches for 2.6. Configure your kernel and enable KGDB. (note - I tested the 1.8 patch, and you have to configure thread analysis or else it won't compile properly)
I haven't tested it yet, but you can create a named pipe for a serial port - make it something like /tmp/com_1, and then in gdb you should be able to just use the command target remote /tmp/com_1.
cd linux-2.6.15.6
patch -b -p1 < ../linux-2.6.15.5-kgdb-2.4/core-lite.patch
patch -b -p1 < ../ ... core.patch
patch -b -p1 < ../ ... i386-lite.patch
i386.patch
8250.patch
target remote ip_addr:8111 where ip_addr is the windows host IP address that this virtual machine sees. (e.g. on my machine 192.168.149.1, and the VM gets address 192.168.149.128)
KGDB should connect, and away you go.
Caveats - note that I've had a lot of trouble with the DHCP server in VMWare if I'm running multiple machines at once, as it tends to give the same address to each one. You may wish to hardcode the ip address, route, and DNS resolver instead on each VM.
After powering down the virtual machine, edit the hardware settings to add a serial port, and direct its output to a file.
Add console=tty0 console=ttyS0 to the kernel command line in /boot/grub/menu.lst (or /etc/lilo.conf). This will make the screen be the primary console, but copy all messages to the serial port as well.
mountd[1818]: mount request from unknown host 127.0.0.1 for / (/)
mountd[1818]: mount request from unknown host #.#.#.# for / (/)
If you are running a Windows host, you'll want to do your compilation on the virtual machine. However, other than just using the vmware console, there are two ways in which you might wish to access your files on the virtual machine:
In the second case you may wish to install another editor besides VI in your virtual machine; you can get the Emacs package here and install it with the pkgadd command.
Note that in addition to enabling the ssh server (add sshd to SERVICES in /etc/rc.conf) you will want to remove the ALL: ALL: DENY line from /etc/hosts.deny, or tcpwrappers will not let you connect to ssh.
RPC: Program not registered
The NFS server is not running
nfssvc: Function not implemented
(in /var/log/messages) - NFS server support is not compiled into your kernel or available as a module.
mountd[1818]: mount request from unknown host 127.0.0.1 for / (/)
You haven't set up /etc/exports properly. (or you have, but you haven't rebooted yet. In that case, run exportfs -r to resync your exports, and see if it works.)
/ *(rw,all_squash,anonuid=0,anongid=0)
@] # Enable the NFS server on boot - change the SERVICES line in /etc/rc.conf to:
/ *(rw,all_squash,anonuid=0,anongid=0) @]
[=
[@
172.16.211.129:/ on /mnt/1 type nfs (rw,addr=172.16.211.129)
=]
172.16.211.129:/ on /mnt/1 type nfs (rw,addr=172.16.211.129) @]
[@
@] # Enable the NFS server on boot - change the SERVICES line in /etc/rc.conf to:
[@
@]
[=
[@
=]
@]
=]
[=
=]
If you are running VMware under Linux, it may be easier to compile and edit on the host machine. The simplest way to do this is by NFS-mounting the virtual machine filesystem:
make modules_install to install the modules.
[...]
(type ifconfig eth0 on the virtual machine to find its IP address)
The virtual machine filesystem may now be accessed on /mnt/1. If you want to do all your development work on the host machine, you can install modules onto the virtual machine with the following command:
make INSTALL_MOD_PATH=/mnt/1 modules_install
where /mnt/1 is the location the virtual machine filesystem has been mounted on.