README 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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
  20. http://review.gerrithub.io/tools/hooks/commit-msg
  21. chmod u+x .git/hooks/commit-msg
  22. git config remote.origin.push HEAD:refs/for/master
  23. You're now all set, you can build the whole thing just by running
  24. ./BUILD all
  25. which should take maybe a minute.
  26. Once building is complete, you can try booting the kernel with qemu
  27. (cd sys/src/9/k10 && sh ../../../../util/QRUN)
  28. Next you should find a bug somewhere in harvey and fix it. In general, the
  29. util/build tool "just works" in any subdirectory, so you can also build just
  30. the stuff you are looking at, too, eg.
  31. cd sys/src/cmd/aux
  32. build aux.json
  33. Let's say you found a bug and the files you needed to change were
  34. sys/src/9/ip/tcp.c and sys/src/9/ip/ipaux.c. To submit this for review, you do
  35. git add sys/src/9/ip/tcp.c
  36. git add sys/src/9/ip/ipaux.c
  37. git diff --staged # to check that the patch still makes sense
  38. git commit -m 'your description of the patch'
  39. git push
  40. Note the lack of qualifiers in the last push command. It is important,
  41. because it needs to be pushed to "origin HEAD:refs/for/master" for review
  42. (and not to master). This will generate a code-review change request, others
  43. will review it, and if it looks good we will merge it to the mainline repo
  44. using gerrithub.io.
  45. If your patch needs further work (you notice something wrong with it yourself,
  46. or someone suggests changes), you can just edit the affected files and then
  47. amend the change list as follows
  48. git add sys/src/9/ip/tcp.c
  49. git commit --amend
  50. git push
  51. More information on using Gerrit can be found on the gerrithub.io website.
  52. Getting go9p to serve your files
  53. ================================
  54. The currently recommended way of doing this is to run go9p/ufs as the
  55. file server for harvey. It is provided as a submodule in util/third_party
  56. and should be automatically compiled & copied to util/ when you run
  57. 'BUILD utils'.
  58. Once it's built, you can run this:
  59. (export HARVEY=$(pwd) && cd sys/src/9/k10 && sh ../../../../util/GO9PRUN)
  60. to boot with ufs serving the harvey directory for your harvey instance. Once
  61. harvey is up, you can telnet onto it with
  62. util/telnet localhost:5555
  63. Where 5555 is forwarded to the harvey instance. This gives you a prompt
  64. without any security. Once you have the prompt, you can mount the harvey
  65. directory as your root like this (10.0.2.2 is what qemu has as the host)
  66. srv tcp!10.0.2.2!5640 k
  67. mount -a /srv/k /
  68. <a href="https://scan.coverity.com/projects/5328">
  69. <img alt="Coverity Scan Build Status"
  70. src="https://scan.coverity.com/projects/5328/badge.svg"/>
  71. </a>