Skip to content

Commit

Permalink
Convert project to RISC-V template (#84)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Scheel <jeff@riscv.org>
  • Loading branch information
jjscheel authored and atishp04 committed Feb 4, 2022
1 parent 7df1d9f commit ca30099
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs-resources"]
path = docs-resources
url = /~https://github.com/riscv/docs-resources.git
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#

ASCIIDOCTOR = asciidoctor
ASCIIDOCTOR_PDF = $(ASCIIDOCTOR)-pdf
DITAA = ditaa
IMAGES = riscv-sbi-intro1.png
IMAGES += riscv-sbi-intro2.png
Expand All @@ -20,8 +21,13 @@ all: $(IMAGES) $(TARGETS)
%.html: %.adoc $(IMAGES)
$(ASCIIDOCTOR) -d book -b html $<

%.pdf: %.adoc $(IMAGES) riscv-sbi-theme.yml
$(ASCIIDOCTOR) -d book -r asciidoctor-pdf -a pdf-style=riscv-sbi-theme.yml -b pdf $<
%.pdf: %.adoc $(IMAGES) docs-resources/themes/riscv-pdf.yml
$(ASCIIDOCTOR_PDF) \
-a toc \
-a compress \
-a pdf-style=docs-resources/themes/riscv-pdf.yml \
-a pdf-fontsdir=docs-resources/fonts \
-o $@ $<

.PHONY: clean
clean:
Expand Down
33 changes: 33 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,39 @@ The files in this repository are licensed under the Creative Commons
Attribution 4.0 International License (CC-BY 4.0). The full license
text is available at https://creativecommons.org/licenses/by/4.0/.

= Dependencies
The PDF built in this project uses AsciiDoctor (Ruby). For more information
on AsciiDoctor, specification guidelines, or building locally, see the
/~https://github.com/riscv/docs-dev-guide[RISC-V Documentation Developer Guide].

= Cloning the Project
This project uses
https://git-scm.com/book/en/v2/Git-Tools-Submodules[GitHub Submodules] to
include the RISC-V
/~https://github.com/riscv/docs-resources[docs-resources project]
to achieve a common look and feel.

When cloning this repository for the first time, you must either use
`git clone --recurse-submodules` or execute `git submodule init` and
`git submodule update` after the clone to populate the `docs-resources`
directory. Failure to clone the submodule, will result in the PDF build
fail with an error message like the following:

....
$ make
asciidoctor-pdf \
-a toc \
-a compress \
-a pdf-style=docs-resources/themes/riscv-pdf.yml \
-a pdf-fontsdir=docs-resources/fonts \
--failure-level=ERROR \
-o profiles.pdf profiles.adoc
asciidoctor: ERROR: could not locate or load the built-in pdf theme `docs-resources/themes/riscv-pdf.yml'; reverting to default theme
No such file or directory - notoserif-regular-subset.ttf not found in docs-resources/fonts
Use --trace for backtrace
make: *** [Makefile:7: profiles.pdf] Error 1
....

= Building Documents

The final specification in form of PDF and HTML can be generated using
Expand Down
1 change: 1 addition & 0 deletions docs-resources
Submodule docs-resources added at 6a2d5b
51 changes: 47 additions & 4 deletions riscv-sbi.adoc
Original file line number Diff line number Diff line change
@@ -1,12 +1,50 @@
// SPDX-License-Identifier: CC-BY-4.0
[[riscv-doc-template]]
:description: RISC-V SBI definition specification
:company: RISC-V
:revdate: February 4, 2022
:revnumber: 1.0-rc2
:revremark: This document is in Frozen state. Change is extremely unlikely.
:url-riscv: http://riscv.org
:doctype: book
:preface-title: Preamble
:colophon:
:appendix-caption: Appendix
:title-logo-image: image:docs-resources/images/risc-v_logo.svg[pdfwidth=3.25in,align=center]
// Settings:
:experimental:
:reproducible:
:WaveDromEditorApp: wavedrom-cli
:icons: font
:lang: en
:listing-caption: Listing
:sectnums:
:sectnumlevels: 5
:toclevels: 5
:toc: left
:source-highlighter: pygments
ifdef::backend-pdf[]
:source-highlighter: coderay
endif::[]
:data-uri:
:hide-uri-scheme:
:stem: latexmath
:footnote:
:xrefstyle: short

= RISC-V Supervisor Binary Interface Specification
:author: RISC-V Platform Specification Task Group
:email: tech-unixplatformspec@lists.riscv.org
:revnumber: 1.0-rc1
:sectnums:
:xrefstyle: short
:toc: macro

// Preamble
[WARNING]
.This document is in the link:http://riscv.org/spec-state[Frozen state]
====
Change is extremely unlikely. A high threshold will be used, and a change
will only occur because of some truly critical issue being identified during
the public review cycle. Any other desired or needed changes can be the subject
of a follow-on new extension.
====

// table of contents
toc::[]
Expand All @@ -27,6 +65,11 @@ https://creativecommons.org/licenses/by/4.0/.
[preface]
== Change Log

=== Version 1.0-rc2
* Update to RISC-V formatting
* Improved the introduction
* Removed all references to RV32

=== Version 1.0-rc1
* A typo fix

Expand Down

0 comments on commit ca30099

Please sign in to comment.