summaryrefslogtreecommitdiff
path: root/microkernel
diff options
context:
space:
mode:
Diffstat (limited to 'microkernel')
-rw-r--r--microkernel/mach/gnumach/debugging.mdwn35
1 files changed, 35 insertions, 0 deletions
diff --git a/microkernel/mach/gnumach/debugging.mdwn b/microkernel/mach/gnumach/debugging.mdwn
index a134b618..0e4898be 100644
--- a/microkernel/mach/gnumach/debugging.mdwn
+++ b/microkernel/mach/gnumach/debugging.mdwn
@@ -128,6 +128,41 @@ working directory. For example:
## [[open_issues/debugging_gnumach_startup_qemu_gdb]]
+## Debug 64-bit gnumach
+
+[[build|microkernel/mach/gnumach/building/]] 64-bit gnumach
+
+run a spare Hurd vm (prepare for data loss in vm):
+
+* `kvm -net user,hostfwd=tcp:127.0.0.1:2222-:22 -net nic,model=e1000 -drive file=$(echo debian-hurd*.img),cache=writeback -m 1G`
+* `cd gnumach/build`
+* `scp -P 2222 gnumach.gz user@127.0.0.1:/home/user/`
+* You may copy `gnumach.gz` (also create new grub entry) or replace using `mv /home/user/gnumach.gz /boot/gnumach-xxx.gz`
+* Shutdown vm.
+* Append `console=com0` in boot menu and switch to console mode in qemu. (We have known issues with vga output for 64-bit.)
+* You may load only required modules for debugging.
+* `kvm -s -S -net user,hostfwd=tcp:127.0.0.1:2222-:22 -net nic,model=e1000 -drive file=$(echo debian-hurd*.img),cache=writeback -m 1G` (note: `-s -S` added.)
+* `gdb ./gnumach`
+* `(gdb) target remote :1234`
+* Press `c` to continue booting.
+
+
+example `/boot/grub/grub.cfg`:
+
+ multiboot /boot/gnumach-1.8-486.gz root=part:2:device:hd0 console=com0
+ ...
+ module /hurd/acpi.static acpi \
+ --host-priv-port='${host-port}' --device-master-port='${device-port}' \
+ --next-task='${fs-task}' \
+ '$(acpi-task=task-create)' '$(task-resume)'
+ module /hurd/ext2fs.static ext2fs --readonly \
+ --multiboot-command-line='${kernel-command-line}' \
+ --exec-server-task='${exec-task}' -T typed '${root}' \
+ '$(fs-task=task-create)'
+ module /lib/ld.so.1 exec /hurd/exec '$(exec-task=task-create)'
+
+
+
# Code Inside the Kernel