README 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. This is Plan 9 for amd64 built with gcc (and soon, I hope, clang).
  2. This file is a quick list of instructions to get you started quickly.
  3. Prerequisites
  4. =============
  5. To build harvey and play with it, you need to have git, golang, qemu, gcc,
  6. binutils and bison installed. On a Debian, Ubuntu or other .deb system,
  7. you should be able to get going with
  8. sudo aptitude install git golang build-essential bison qemu-system
  9. GERRIT
  10. ======
  11. We use gerrithub.io for code-review. If you want to submit changes, go to
  12. https://review.gerrithub.io/#/admin/projects/elbing/harvey
  13. and check out the repository from gerrithub rather than github. The clone
  14. command will probably look something like this:
  15. git clone ssh://USERNAME@review.gerrithub.io:29418/elbing/harvey
  16. you'll need to run a few commands inside the top-level directory to get set
  17. up for code-review:
  18. cd harvey
  19. curl -Lo .git/hooks/commit-msg http://review.gerrithub.io/tools/hooks/commit-msg
  20. chmod u+x .git/hooks/commit-msg
  21. git config remote.origin.push HEAD:refs/for/master
  22. You're now all set, you can build the whole thing just by running
  23. ./BUILD all
  24. which should take maybe a minute.
  25. Once building is complete, you can try booting the kernel with qemu
  26. (cd sys/src/9/k10 && sh ../../../../util/QRUN)
  27. Next you should find a bug somewhere in harvey and fix it. In general, the
  28. util/build tool "just works" in any subdirectory, so you can also build just
  29. the stuff you are looking at, too, eg.
  30. cd sys/src/cmd/aux
  31. build aux.json
  32. Let's say you found a bug and the files you needed to change were
  33. sys/src/9/ip/tcp.c and sys/src/9/ip/ipaux.c. To submit this for review, you do
  34. git add sys/src/9/ip/tcp.c
  35. git add sys/src/9/ip/ipaux.c
  36. git diff --staged # to check that the patch still makes sense
  37. git commit -m 'your description of the patch'
  38. git push
  39. Note the lack of qualifiers in the last push command. It is important,
  40. because it needs to be pushed to "origin HEAD:refs/for/master" for review
  41. (and not to master). This will generate a code-review change request, others
  42. will review it, and if it looks good we will merge it to the mainline repo
  43. using gerrithub.io.
  44. If your patch needs further work (you notice something wrong with it yourself,
  45. or someone suggests changes), you can just edit the affected files and then
  46. amend the change list as follows
  47. git add sys/src/9/ip/tcp.c
  48. git commit --amend
  49. git push
  50. More information on using Gerrit can be found on the gerrithub.io website.
  51. Getting go9p to serve your files
  52. ================================
  53. The currently recommended way of doing this is to run go9p/ufs as the
  54. file server for harvey. It is provided as a submodule in util/third_party
  55. and should be automatically compiled & copied to util/ when you run
  56. 'BUILD utils'.
  57. Once it's built, you can run this:
  58. (export HARVEY=$(pwd) && cd sys/src/9/k10 && sh ../../../../util/GO9PRUN)
  59. to boot with ufs serving the harvey directory for your harvey instance. Once
  60. harvey is up, you can telnet onto it with
  61. util/telnet localhost:5555
  62. Where 5555 is forwarded to the harvey instance. This gives you a prompt
  63. without any security. Once you have the prompt, you can mount the harvey
  64. directory as your root like this (10.0.2.2 is what qemu has as the host)
  65. srv tcp!10.0.2.2!5640 k
  66. mount -a /srv/k /
  67. <a href="https://scan.coverity.com/projects/5328">
  68. <img alt="Coverity Scan Build Status"
  69. src="https://scan.coverity.com/projects/5328/badge.svg"/>
  70. </a>