Skip to content

Commit a855ba3

Browse files
committed
Split into separate CC/DWARF/ELF documents and convert to AsciiDoc
Closes: #204
1 parent eb678d0 commit a855ba3

40 files changed

+1622
-1263
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,20 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v2
1717

18-
# Ubuntu 20.04's Pandoc treats the LaTeX in our YAML file as Markdown
19-
# that needs escaping, so use a new enough release (the latest at time of
20-
# writing).
21-
- name: Download Pandoc
22-
run: wget 'https://github.com/jgm/pandoc/releases/download/2.12/pandoc-2.12-1-amd64.deb'
23-
2418
- name: Install packages
25-
run: sudo apt-get update && sudo apt-get install -y make texlive-latex-extra ./pandoc-2.12-1-amd64.deb
19+
run: sudo apt-get update && sudo apt-get install -y make ruby
20+
21+
- name: Install gems
22+
run: sudo gem install asciidoctor asciidoctor-pdf
2623

2724
- name: Build
2825
run: make
2926

3027
- name: Upload artifact
3128
uses: actions/upload-artifact@v2
3229
with:
33-
name: riscv-elf.pdf
34-
path: riscv-elf.pdf
30+
name: riscv-abi.pdf
31+
path: riscv-abi.pdf
3532

3633
draft-release:
3734
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
@@ -41,7 +38,7 @@ jobs:
4138
- name: Download artifact
4239
uses: actions/download-artifact@v2
4340
with:
44-
name: riscv-elf.pdf
41+
name: riscv-abi.pdf
4542
path: ./
4643

4744
- name: Get current date
@@ -66,8 +63,8 @@ jobs:
6663
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6764
with:
6865
upload_url: ${{ steps.create_release.outputs.upload_url }}
69-
asset_path: riscv-elf.pdf
70-
asset_name: riscv-elf.pdf
66+
asset_path: riscv-abi.pdf
67+
asset_name: riscv-abi.pdf
7168
asset_content_type: application/pdf
7269

7370
release:
@@ -78,7 +75,7 @@ jobs:
7875
- name: Download artifact
7976
uses: actions/download-artifact@v2
8077
with:
81-
name: riscv-elf.pdf
78+
name: riscv-abi.pdf
8279
path: ./
8380

8481
- name: Upload release asset
@@ -88,6 +85,6 @@ jobs:
8885
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8986
with:
9087
upload_url: ${{ github.event.release.upload_url }}
91-
asset_path: riscv-elf.pdf
92-
asset_name: riscv-elf.pdf
88+
asset_path: riscv-abi.pdf
89+
asset_name: riscv-abi.pdf
9390
asset_content_type: application/pdf

Makefile

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
NAME = riscv-elf
1+
NAME = riscv-abi
22

33
DATE = $(shell date '+%B %d, %Y')
44

@@ -7,20 +7,13 @@ all: $(NAME).pdf
77

88
.PHONY: clean
99
clean:
10-
rm -rf build
1110
rm -f $(NAME).pdf
1211

13-
build:
14-
mkdir -p $@
15-
16-
build/include.md: $(NAME).md | build
17-
awk '/<!-- END COPYRIGHT -->/{b=0} b{print} /<!-- BEGIN COPYRIGHT -->/{b=1}' $< > $@
18-
19-
build/body.md: $(NAME).md | build
20-
awk 'BEGIN{b=1} /<!-- BEGIN TITLE -->/{b=0} b{print} /<!-- END TITLE -->/{b=1}' $< > $@
21-
22-
build/include.tex: build/include.md | build
23-
pandoc -o $@ $<
24-
25-
$(NAME).pdf: build/body.md build/include.tex $(NAME).yaml | build
26-
pandoc --metadata-file $(NAME).yaml --metadata date="$(DATE)" -o $@ $<
12+
$(NAME).pdf: $(NAME).adoc $(wildcard *.adoc)
13+
asciidoctor-pdf \
14+
-a compress \
15+
-a date="$(DATE)" \
16+
-a pdf-style=resources/themes/risc-v_spec-pdf.yml \
17+
-a pdf-fontsdir=resources/fonts \
18+
-v \
19+
$< -o $@

images/draft.png

89.3 KB
Loading

images/risc-v_logo.png

11.7 KB
Loading

preamble.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
This RISC-V ELF psABI specification document is
2+
3+
(C) 2016 Palmer Dabbelt <palmer@dabbelt.com> +
4+
(C) 2016 Stefan O'Rear <sorear2@gmail.com> +
5+
(C) 2016 Kito Cheng <kito[email protected]> +
6+
(C) 2016-2017 Andrew Waterman <aswaterman@gmail.com> +
7+
(C) 2016-2017 Michael Clark <michaeljclark@mac.com> +
8+
(C) 2017-2019 Alex Bradbury <asb@asbradbury.org> +
9+
(C) 2017 David Horner <ds2horner@gmail.com> +
10+
(C) 2017 Max Nordlund <max[email protected]> +
11+
(C) 2017 Karsten Merker <merker@debian.org> +
12+
(C) 2019 Sam Elliott <selliott@lowrisc.org>
13+
14+
It is licensed under the Creative Commons Attribution 4.0 International
15+
License (CC-BY 4.0). The full license text is available at
16+
https://creativecommons.org/licenses/by/4.0/.

prelude.adoc

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
:company: RISC-V.org
2+
:revdate: {date}
3+
:revnumber: 0.01
4+
:revremark: Pre-release version
5+
//development: assume everything can change
6+
//stable: assume everything could change
7+
//frozen: of you implement this version you assume the risk that something might change because of the public review cycle but we expect little to no change.
8+
//ratified: you can implement this and be assured nothing will change. if something needs to change due to an errata or enhancement, it will come out in a new extension. we do not revise extensions.
9+
:url-riscv: http://riscv.org
10+
:doctype: book
11+
:preface-title: Preamble
12+
:colophon:
13+
:appendix-caption: Appendix
14+
:imagesdir: images
15+
:title-logo-image: image:risc-v_logo.png[pdfwidth=3.25in,align=center]
16+
//:back-cover-image: image:backpage.png[opacity=25%]
17+
:experimental:
18+
:reproducible:
19+
:icons: font
20+
:lang: en
21+
:listing-caption: Listing
22+
:sectnums:
23+
:toc: left
24+
:toclevels: 3
25+
:source-highlighter: pygments
26+
ifdef::backend-pdf[]
27+
:source-highlighter: coderay
28+
endif::[]
29+
:data-uri:
30+
:hide-uri-scheme:
31+
:stem: latexmath
32+
:footnote:
33+
:xrefstyle: short
34+
35+
include::preamble.adoc[]

resources/fonts/DroidSans-Bold.ttf

190 KB
Binary file not shown.

resources/fonts/DroidSans.ttf

186 KB
Binary file not shown.

resources/fonts/cmunbbx.ttf

331 KB
Binary file not shown.

resources/fonts/cmunbmo.ttf

394 KB
Binary file not shown.

resources/fonts/cmunbmr.ttf

362 KB
Binary file not shown.

resources/fonts/cmunbso.ttf

391 KB
Binary file not shown.

resources/fonts/cmunbtl.ttf

401 KB
Binary file not shown.

resources/fonts/cmunbto.ttf

451 KB
Binary file not shown.

resources/fonts/cmunbxo.ttf

383 KB
Binary file not shown.

resources/fonts/cmunsi.ttf

395 KB
Binary file not shown.

resources/fonts/cmunso.ttf

452 KB
Binary file not shown.

resources/fonts/cmunss.ttf

361 KB
Binary file not shown.

resources/fonts/cmunsx.ttf

469 KB
Binary file not shown.
186 KB
Binary file not shown.

resources/fonts/mplus-1mn-bold.ttf

1.18 MB
Binary file not shown.

resources/fonts/mplus-1mn-light.ttf

1.18 MB
Binary file not shown.

resources/fonts/mplus-1mn-medium.ttf

1.17 MB
Binary file not shown.

resources/fonts/mplus-1mn-regular.ttf

1.19 MB
Binary file not shown.

resources/fonts/mplus-1mn-thin.ttf

1.17 MB
Binary file not shown.

resources/fonts/mplus-1p-black.ttf

1.28 MB
Binary file not shown.

resources/fonts/mplus-1p-bold.ttf

1.3 MB
Binary file not shown.

resources/fonts/mplus-1p-heavy.ttf

1.3 MB
Binary file not shown.

resources/fonts/mplus-1p-light.ttf

1.29 MB
Binary file not shown.

resources/fonts/mplus-1p-medium.ttf

1.28 MB
Binary file not shown.
1.3 MB
Binary file not shown.

resources/fonts/mplus-1p-regular.ttf

1.3 MB
Binary file not shown.

resources/fonts/mplus-1p-thin.ttf

1.28 MB
Binary file not shown.

0 commit comments

Comments
 (0)