Skip to content

Commit c9725a7

Browse files
committed
all: riscv-specific README
Replace the README with RISC-V specific usage and contribution information. This will hopefully reduce confusion for new contributors. Alas, it will probably cause merge conflicts on every merge. Also fixes golang#15 in the move of riscv.md. Change-Id: I254346d1931343944465b45a4d58deebd447fea6
1 parent 8cae35c commit c9725a7

File tree

2 files changed

+47
-54
lines changed

2 files changed

+47
-54
lines changed

README.md

Lines changed: 47 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,62 @@
11
# The Go Programming Language
22

3-
Go is an open source programming language that makes it easy to build simple,
4-
reliable, and efficient software.
3+
## RISC-V Go Port
54

6-
![Gopher image](doc/gopher/fiveyears.jpg)
5+
This repository is home of the RISC-V port of the Go programming language.
76

8-
For documentation about how to install and use Go,
9-
visit https://golang.org/ or load doc/install-source.html
10-
in your web browser.
7+
The upstream Go project can be found at https://github.com/golang/go.
118

12-
Our canonical Git repository is located at https://go.googlesource.com/go.
13-
There is a mirror of the repository at https://github.com/golang/go.
9+
### Quick Start
1410

15-
Go is the work of hundreds of contributors. We appreciate your help!
11+
Setup:
1612

17-
To contribute, please read the contribution guidelines:
18-
https://golang.org/doc/contribute.html
13+
```sh
14+
$ git clone https://review.gerrithub.io/riscv/riscv-go riscv-go
15+
$ cd riscv-go
16+
$ git checkout riscvdev # RISC-V work happens on this branch
17+
$ export GOROOT_BOOTSTRAP=/path/to/prebuilt/go/tree
18+
$ export PATH="$(pwd)/misc/riscv:$(pwd)/bin:$PATH"
19+
$ cd src
20+
$ ./make.bash
21+
```
1922

20-
##### Note that we do not accept pull requests and that we use the issue tracker for bug reports and proposals only. Please ask questions on https://forum.golangbridge.org or https://groups.google.com/forum/#!forum/golang-nuts.
23+
Compile and run in spike using pk (which are expected to be in PATH):
2124

22-
Unless otherwise noted, the Go source files are distributed
23-
under the BSD-style license found in the LICENSE file.
25+
```sh
26+
$ GOARCH=riscv GOOS=linux go run ../riscvtest/add.go
27+
```
2428

25-
--
29+
Build:
2630

27-
## Binary Distribution Notes
31+
```sh
32+
$ GOARCH=riscv GOOS=linux go build ../riscvtest/add.go
33+
```
2834

29-
If you have just untarred a binary Go distribution, you need to set
30-
the environment variable $GOROOT to the full path of the go
31-
directory (the one containing this file). You can omit the
32-
variable if you unpack it into /usr/local/go, or if you rebuild
33-
from sources by running all.bash (see doc/install-source.html).
34-
You should also add the Go binary directory $GOROOT/bin
35-
to your shell's path.
35+
Test:
3636

37-
For example, if you extracted the tar file into $HOME/go, you might
38-
put the following in your .profile:
37+
Our basic tests are in the `riscvtest` directory:
3938

40-
export GOROOT=$HOME/go
41-
export PATH=$PATH:$GOROOT/bin
39+
```sh
40+
$ cd ../riscvtest
41+
$ go run run.go
42+
```
4243

43-
See https://golang.org/doc/install or doc/install.html for more details.
44+
If this exits without error, all is well!
45+
46+
Note that these tests currently use the special builtin `riscvexit` to exit,
47+
until we can build the standard library and use os.Exit.
48+
49+
### Contributing
50+
51+
All contributors must sign the upstream [Contributor License
52+
Agreement](https://golang.org/doc/contribute.html#cla), as this port will be
53+
merged into upstream Go upon completion.
54+
55+
Code review occurs via our
56+
[GerritHub](https://review.gerrithub.io/#/admin/projects/riscv/riscv-go)
57+
project, rather than via GitHub Pull Requests.
58+
59+
The upstream [contribution guidelines](https://golang.org/doc/contribute.html)
60+
include a basic overview of using Gerrit. While the upstream Go Gerrit server
61+
is different from ours, `codereview.cfg` will configure `git-codereview` to
62+
send CLs to GerritHub.

riscv.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)