Skip to content

Commit

Permalink
Early skeleton based on server-soc spec.
Browse files Browse the repository at this point in the history
This is going to be structured in a very similar way.

Signed-off-by: Andrei Warkentin <andrei.warkentin@intel.com>
  • Loading branch information
andreiw committed Nov 30, 2023
1 parent b33c36c commit 1969541
Show file tree
Hide file tree
Showing 18 changed files with 428 additions and 211 deletions.
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ REVMARK ?= Draft
DOCKER_RUN := docker run --rm -v ${PWD}:/build -w /build \
riscvintl/riscv-docs-base-container-image:latest

HEADER_SOURCE := header.adoc
PDF_RESULT := spec-sample.pdf
HEADER_SOURCE := server_platform_header.adoc
PDF_RESULT := riscv-server-platform.pdf

TS_HEADER_SOURCE := server_platform_ts_header.adoc
TS_PDF_RESULT := riscv-server-platform-ts.pdf

ASCIIDOCTOR_PDF := asciidoctor-pdf
OPTIONS := --trace \
Expand Down Expand Up @@ -52,14 +55,17 @@ build:
build-container:
@echo "Starting build inside Docker container..."
$(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(PDF_RESULT) $(HEADER_SOURCE)"
$(DOCKER_RUN) /bin/sh -c "$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(TS_PDF_RESULT) $(TS_HEADER_SOURCE)"
@echo "Build completed successfully inside Docker container."

build-no-container:
@echo "Starting build..."
$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(PDF_RESULT) $(HEADER_SOURCE)
$(ASCIIDOCTOR_PDF) $(OPTIONS) $(REQUIRES) --out-file=$(TS_PDF_RESULT) $(TS_HEADER_SOURCE)
@echo "Build completed successfully."

clean:
@echo "Cleaning up generated files..."
rm -f $(PDF_RESULT)
rm -f $(TS_PDF_RESULT)
@echo "Cleanup completed."
47 changes: 0 additions & 47 deletions chapter2.adoc

This file was deleted.

36 changes: 0 additions & 36 deletions example.bib

This file was deleted.

66 changes: 0 additions & 66 deletions header.adoc

This file was deleted.

Binary file added images/riscv-server-platform.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images/riscv-server-platform.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 0 additions & 15 deletions intro.adoc

This file was deleted.

77 changes: 35 additions & 42 deletions readme.adoc
Original file line number Diff line number Diff line change
@@ -1,56 +1,49 @@
= RISC-V Specification Template
= RISC-V Server Platform and Server Platform Test specifications

This repository serves as a blueprint for creating GitHub repositories within the RISC-V organization for the purpose of developing specifications. The template aims to facilitate and standardize the process of specification development.
This document is capturing discussions at the Server Platform TG.
These are not official specifications and everything in this document may change.

NOTE: If you are viewing this in a specification repository, kindly update the title for this section and provide an introduction relevant to your repository.
= License

== License
This work is licensed under a Creative Commons Attribution 4.0 International License (CC-BY-4.0).
See the https://github.com/riscv/docs-spec-template/blob/main/LICENSE[LICENSE] file for details.

This work is licensed under a Creative Commons Attribution 4.0 International License (CC-BY-4.0). For details, see the link:LICENSE[LICENSE] file.
= Contributors

== Contributors
Contributors to this specification are contained in the
https://github.com/riscv-non-isa/riscv-server-platform/blob/main/server_platform_contributors.adoc[server_platform_contributors.adoc] file.

The list of contributors to this specification is maintained in the link:contributors.adoc[contributors] file.
= Dependencies

For guidelines on how to contribute, refer to the link:CONTRIBUTING.md[CONTRIBUTING] file.
This project is built using AsciiDoctor (Ruby). The repository has been setup to build the PDF on
checkin using GitHub actions. Workflow dependencies are located in the `dependencies` directory.

== Building the Document
For more information on AsciiDoctor, specification guidelines, or building locally, see the
https://github.com/riscv/docs-dev-guide[RISC-V Documentation Developer Guide].

=== Prerequisites
= Cloning the project

To build the document, you'll need the following tools installed on your system:
This project uses https://git-scm.com/book/en/v2/Git-Tools-Submodules[GitHub Submodules]
to include the https://github.com/riscv/docs-resources[RISC-V docs-resources project]
to achieve a common look and feel.

* Make
* asciiDoctor-pdf, asciidoctor-bibtex, asciidoctor-diagram and asciidoctor-mathematical
* Docker
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:

=== Cloning the Repository
$ 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

`git clone --recurse-submodules https://github.dev/riscv-non-isa/riscv-platforms`
= Building the documents

==== Setting Environment Variables

These variables can be overridden by setting environment variables on your system. Here's how you can do it in Linux and MacOS:

```bash
export VERSION=v1.2.3
export REVMARK=Release
export PDF_RESULT=spec.pdf
```

=== Building the Documentation

To start the build process, run `cd ./riscv-platforms && make build`.

The Makefile script will check the availability of Docker on your system:

* If Docker is available, the documentation will be built inside a Docker container using the image riscvintl/riscv-docs-base-container-image:latest. This ensures a consistent build environment across different systems.
* If Docker is not available, the documentation will be built directly on your system using the installed tools.

The documentation is generated from the AsciiDoctor source files in your project. The primary source file is specified by the `HEADER_SOURCE` variable in the Makefile.

The build process utilizes several options, including theming and font settings, and generates a PDF document as output.

=== Cleaning up

To clean up the generated files, run `make clean`. This will remove the generated PDF file.
The final specification form of PDF can be generated using the `make` command.
32 changes: 32 additions & 0 deletions server_platform.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@electronic{BRS,
title = {RISC-V Boot and Runtime Services Specification},
url = {https://github.com/riscv-non-isa/riscv-brs},
year = {}
}
@electronic{BRSTest,
title = {RISC-V Boot and Runtime Services Test Specification},
url = {https://github.com/riscv-non-isa/riscv-brs},
year = {}
}
@electronic{ServerSoC,
title = {RISC-V Server SoC Specification},
url = {https://github.com/riscv-non-isa/server-soc},
year = {}
}
@electronic{ServerSoCTest,
title = {RISC-V Server SoC Test Specification},
url = {https://github.com/riscv-non-isa/server-soc},
year = {}
}
@electronic{RFC_2119,
title = {Key words for use in RFCs to Indicate Requirement Levels},
url = {https://datatracker.ietf.org/doc/html/rfc2119}
}
@electronic{ACPI,
title = {Advanced Configuration and Power Interface (ACPI) Specification},
url = {https://uefi.org/specifications}
}
@electronic{UEFI,
title = {Unified Extensible Firmware Interface},
url = {https://uefi.org/specifications}
}
File renamed without changes.
5 changes: 2 additions & 3 deletions contributors.adoc → server_platform_contributors.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
== Contributors

This RISC-V specification has been contributed to directly or indirectly by:
This RISC-V specification has been contributed to directly or indirectly by (in alphabetical order):

[%hardbreaks]
* Author1 <required1@email.com>
* Author2 <required2@email.com>
Andrei Warkentin, Ved Shanbhogue
Loading

0 comments on commit 1969541

Please sign in to comment.