Browse Source

add go9p/ufs instructions to readme

Change-Id: I52eb1f56628a6ced68c86ede023dcaac22c0b695
Aki Nyrhinen 8 years ago
parent
commit
860644a17a
2 changed files with 70 additions and 0 deletions
  1. 35 0
      README
  2. 35 0
      util/GO9PRUN

+ 35 - 0
README

@@ -2,6 +2,7 @@ This is Plan 9 for amd64 built with gcc (and soon, I hope, clang).
 
 This file is a quick list of instructions to get you started quickly.
 
+
 Prerequisites
 =============
 
@@ -11,6 +12,7 @@ you should be able to get going with
 
 	sudo aptitude install git golang build-essential bison qemu-system
 
+
 GERRIT
 ======
 
@@ -74,6 +76,39 @@ amend the change list as follows
 
 More information on using Gerrit can be found on the gerrithub.io website.
 
+
+Getting go9p to serve your files
+================================
+
+The currently recommended way of doing this is to run go9p/ufs as the file
+server for harvey. You can get go9p/ufs in the following way
+
+	cd util
+	mkdir go
+	cd go
+	export GOPATH=$(pwd)
+	go get github.com/rminnich/go9p
+	go get github.com/rminnich/go9p/ufs
+	go get github.com/rminnich/go9p
+	go install github.com/rminnich/go9p/ufs
+	cp bin/ufs ..
+
+After these, you have util/ufs, and you can use
+
+	(export HARVEY=$(pwd) && cd sys/src/9/k10 && sh ../../../../util/GO9PRUN)
+
+to boot with ufs serving the harvey directory for your harvey instance. Once
+harvey is up, you can telnet onto it with
+
+	util/telnet localhost:5555
+
+Where 5555 is forwarded to the harvey instance. This gives you a prompt 
+without any security. Once you have the prompt, you can mount the harvey
+directory as your root like this (10.0.2.2 is what qemu has as the host)
+
+	srv tcp!10.0.2.2!5640 k
+	mount -a /srv/k /
+
 <a href="https://scan.coverity.com/projects/5328">
   <img alt="Coverity Scan Build Status"
        src="https://scan.coverity.com/projects/5328/badge.svg"/>

+ 35 - 0
util/GO9PRUN

@@ -0,0 +1,35 @@
+
+trap : 2
+
+$HARVEY/util/ufs -root=$HARVEY &
+ufspid=$!
+
+sudo qemu-system-x86_64 -s -cpu Opteron_G1 -smp 1 -m 2048  \
+-enable-kvm \
+-serial stdio \
+--machine pc \
+-net nic,model=rtl8139 \
+-net user,hostfwd=tcp::5555-:1522 \
+-kernel 9k8cpu.32bit $*
+
+kill $ufspid
+wait
+
+# -nographic \
+#-S -gdb tcp::1234 \
+# -nographic \
+#-kernel mnt/hdd/kernel $*
+
+# if you need the dump.
+#-net dump,file=/tmp/vm0.pcap \
+
+#sudo qemu-system-x86_64 -s -cpu phenom -smp 8 -m 4096 -nographic  \
+#-net nic,model=rtl8139 mnt/hdd268mb.img \
+#-net user,hostfwd=tcp::5555-:23 \
+#-net dump,file=/tmp/vm0.pcap \
+#-kernel mnt/hdd/kernel $*
+#
+#sudo qemu-system-x86_64 -s -cpu phenom -smp 8 -m 6024 -nographic  -net nic,model=rtl8139 mnt/hdd268mb.img -netdev user,id=mynet0 -kernel mnt/hdd/kernel $*
+#sudo qemu-system-x86_64 -s -cpu phenom -smp 8 -m 6024 -nographic  -net nic,model=rtl8139 mnt/hdd268mb.img -netdev user,id=mynet0,net=192.168.76.0/24,dhcpstart=192.168.76.9 -kernel mnt/hdd/kernel $*
+
+#