Browse Source

A little more hand-holding for the README

Change-Id: Ie14db874c2b4ffcbfa8480c947d1f6b2583eda54
Aki Nyrhinen 8 years ago
parent
commit
6f706d8b12
1 changed files with 63 additions and 7 deletions
  1. 63 7
      README

+ 63 - 7
README

@@ -1,20 +1,76 @@
 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
+=============
+
+To build harvey and play with it, you need to have git, golang, qemu, gcc,
+binutils and bison installed. On a Debian, Ubuntu or other .deb system,
+you should be able to get going with
+
+	sudo aptitude install git golang build-essential bison qemu-system
+
 GERRIT
 ======
 
-We use gerrithub.io for code-review. If you want to submit changes, go to https://review.gerrithub.io/#/admin/projects/elbing/harvey and check out the repository from gerrithub rather than github.
+We use gerrithub.io for code-review. If you want to submit changes, go to
 
-Once you've checked out the repo, you'll need to run a few commands inside the top-level directory to get set up for code-review:
+	https://review.gerrithub.io/#/admin/projects/elbing/harvey
 
-curl -Lo .git/hooks/commit-msg http://review.gerrithub.io/tools/hooks/commit-msg
-chmod u+x .git/hooks/commit-msg
-git config remote.origin.push HEAD:refs/for/master
+and check out the repository from gerrithub rather than github. The clone
+command will probably look something like this:
 
-Now, when you've made a change you want reviewed, simply commit and push. This will generate a code-review change request, others will review it, and if it looks good we will merge it to the mainline repo.
+	git clone ssh://USERNAME@review.gerrithub.io:29418/elbing/harvey
 
-More information on using Gerrit can be found on the gerrithub.io website.
+you'll need to run a few commands inside the top-level directory to get set
+up for code-review:
+
+	cd harvey
+	curl -Lo .git/hooks/commit-msg
+	http://review.gerrithub.io/tools/hooks/commit-msg
+	chmod u+x .git/hooks/commit-msg
+	git config remote.origin.push HEAD:refs/for/master
+
+You're now all set, before the first build you may need to create some
+directories that the build system expects to be there, but arent in the
+repository. Create those with
+
+	for dir in aux auth ip fossil; do mkdir -p amd64/bin/$dir; done
+
+after which you can build the whole thing just by running
 
+	./BUILD all
+
+which should take maybe a minute. Once building is complete, you can try
+booting the kernel with qemu
+
+	(cd sys/src/9/k10 && sh ../../../../util/QRUN)
+
+Next you should find a bug somewhere in harvey and fix it. Let's say the files
+you needed to change were sys/src/9/ip/tcp.c and sys/src/9/ip/ipaux.c. You do
+
+	git add sys/src/9/ip/tcp.c
+	git add sys/src/9/ip/ipaux.c
+	git diff --staged # to check that the patch still makes sense
+	git commit -m 'your description of the patch'
+	git push
+
+Note the lack of qualifiers in the last push command. It is important,
+because it needs to be pushed to "origin HEAD:refs/for/master" for review
+(and not to master). This will generate a code-review change request, others
+will review it, and if it looks good we will merge it to the mainline repo
+using gerrithub.io.
+
+If your patch needs further work (you notice something wrong with it yourself,
+or someone suggests changes), you can just edit the affected files and then
+amend the change list as follows
+
+	git add sys/src/9/ip/tcp.c
+	git commit --amend
+	git push
+
+More information on using Gerrit can be found on the gerrithub.io website.
 
 <a href="https://scan.coverity.com/projects/5328">
   <img alt="Coverity Scan Build Status"