README 3.7 KB

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