Browse Source

add pandoc-and-latex-based pdf build script

master
Lukas F. Hartmann 2 months ago
parent
commit
ca6a7d6611
9 changed files with 109 additions and 14 deletions
  1. +9
    -1
      .gitignore
  2. BIN
     
  3. +3
    -0
      src/source/_tex/post.tex
  4. +21
    -0
      src/source/_tex/pre.tex
  5. +4
    -0
      src/source/_tex/section.tex
  6. +57
    -0
      src/source/build-pdf-book.sh
  7. +7
    -7
      src/source/motherboard.rst
  8. +0
    -1
      src/source/preface.rst
  9. +8
    -5
      src/source/referencemech.rst

+ 9
- 1
.gitignore View File

@@ -1 +1,9 @@
src/build/*
src/build/*
_*.tex
_*.rst
*.out
*.log
*.aux
*.toc
reform-handbook.tex


BIN
View File


+ 3
- 0
src/source/_tex/post.tex View File

@@ -0,0 +1,3 @@

\end{document}


+ 21
- 0
src/source/_tex/pre.tex View File

@@ -0,0 +1,21 @@
\documentclass{book}

\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX]{Inter}

% nuke a useless pandoc command
\newcommand{\tightlist}{}

\title{MNT Reform Operator Manual}
\date{2020-10-31}

\begin{document}

\maketitle

\tableofcontents

\newpage


+ 4
- 0
src/source/_tex/section.tex View File

@@ -0,0 +1,4 @@
% inserted before each section

\newpage


+ 57
- 0
src/source/build-pdf-book.sh View File

@@ -0,0 +1,57 @@
#!/bin/sh

set -e
set -x

# generate content tex files from individual rst sources

cat _tex/pre.tex >reform-handbook.tex

# concat _referenceelec subsections
# because pandoc can't work with toctree
echo >_referenceelec.rst
for subsection in \
referenceelec \
motherboard \
keyboard \
trackball \
trackpad \
power \
debug
do
cat $subsection.rst >>_referenceelec.rst
echo >>_referenceelec.rst
done

for section in \
preface \
safety \
quickstart \
tutorial \
_referenceelec \
referencemech \
credits
do
pandoc -o _$section.tex -frst+smart --verbose --top-level-division=chapter $section.rst
cat _tex/section.tex >>reform-handbook.tex
cat _$section.tex >>reform-handbook.tex
done

cat _tex/post.tex >>reform-handbook.tex

# generate reform-handbook.pdf
xelatex reform-handbook.tex
# twice to get the TOC built
xelatex reform-handbook.tex

# clean up
mv reform-handbook.pdf ../build/
rm _*.tex
rm _*.rst
rm *.out
rm *.log
rm *.aux
rm *.toc

echo ">>> generated ../build/reform-handbook.pdf <<<"


+ 7
- 7
src/source/motherboard.rst View File

@@ -5,13 +5,13 @@ TODO: line-art render of the motherboard STEP file with callouts of important pa

The motherboard spans the complete inner width of the device (around 27 cm) and ends with external ports on both sides. It has the following features:

**Power system:** includes a charger for LiFePO4 cells and seamlessly switches between wall and battery power.
**System controller:** coupled to the power system, an NXP LPC11U24 Cortex-M0 MCU controls an analog monitor chip for the eight battery cells as well as the charger. It is connected to the SoM via SPI, and has GPIO lines to the main power rail switchers in the system. It has a UART (serial port) that the keyboard can talk to directly for issuing power on/off commands and battery status queries.
**DSI to eDP converter:** it was an important goal for us to make the main display path for Reform blob-free, so we couldn't use the existing HDMI/DisplayPort block in i.MX8M to drive the internal display, because this needs a chunk of firmware related to content protection. Instead, we're using the MIPI DSI output and convert its signal to eDP using a Texas Instruments SN65DSI86 chip. All involved drivers are open and in mainline Linux.
**USB 3.0 hub:** i.MX8M has 2x USB 3.0 controllers. As we need two internal USB ports for the keyboard and trackball (or trackpad) and wanted to provide three external USB ports, we put a Texas Instruments TUSB8041 USB hub chip on the board that provides the extra ports. We have USB load switches on each external port to protect from too much current draw.
**Sound system:** the Reform motherboard features a Wolfson/Cirrus WM8960 audio DAC (digital-to-analog converter)/amplifier interfacing to the headphone/microphone jack and powering two speakers housed below the main display.
**M.2 slot:** a PCIe clock synthesizer on the board provides a reference clock for one or both PCIe 2.0 controllers in i.MX8M. We put one M.2 M-key slot on the board that can house a high-speed NVMe SSD.
**mPCIe slot:** the other PCIe controller drives an mPCIe connector that you can use for expansions like a Wi-Fi card (included in the Reform Max pledge level), an embedded graphics card or an FPGA board, for example.
- **Power system:** includes a charger for LiFePO4 cells and seamlessly switches between wall and battery power.
- **System controller:** coupled to the power system, an NXP LPC11U24 Cortex-M0 MCU controls an analog monitor chip for the eight battery cells as well as the charger. It is connected to the SoM via SPI, and has GPIO lines to the main power rail switchers in the system. It has a UART (serial port) that the keyboard can talk to directly for issuing power on/off commands and battery status queries.
- **DSI to eDP converter:** it was an important goal for us to make the main display path for Reform blob-free, so we couldn't use the existing HDMI/DisplayPort block in i.MX8M to drive the internal display, because this needs a chunk of firmware related to content protection. Instead, we're using the MIPI DSI output and convert its signal to eDP using a Texas Instruments SN65DSI86 chip. All involved drivers are open and in mainline Linux.
- **USB 3.0 hub:** i.MX8M has 2x USB 3.0 controllers. As we need two internal USB ports for the keyboard and trackball (or trackpad) and wanted to provide three external USB ports, we put a Texas Instruments TUSB8041 USB hub chip on the board that provides the extra ports. We have USB load switches on each external port to protect from too much current draw.
- **Sound system:** the Reform motherboard features a Wolfson/Cirrus WM8960 audio DAC (digital-to-analog converter)/amplifier interfacing to the headphone/microphone jack and powering two speakers housed below the main display.
- **M.2 slot:** a PCIe clock synthesizer on the board provides a reference clock for one or both PCIe 2.0 controllers in i.MX8M. We put one M.2 M-key slot on the board that can house a high-speed NVMe SSD.
- **mPCIe slot:** the other PCIe controller drives an mPCIe connector that you can use for expansions like a Wi-Fi card (included in the Reform Max pledge level), an embedded graphics card or an FPGA board, for example.

Schematics
----------


+ 0
- 1
src/source/preface.rst View File

@@ -1,5 +1,5 @@
Preface
+++++++++++++

Dear MNT Customer,
Today we are delivering your MNT Reform 2.0 Beta unit. Thank you for putting your trust in us and for


+ 8
- 5
src/source/referencemech.rst View File

@@ -6,11 +6,14 @@ The Case

The case consists of the following 5 parts. All parts except the bottom plate are milled from 6061 aluminum, sand blasted and anodized.

**Screen Back:** housing the display and upper half of hinges
**Screen Front:** housing speakers and providing display bezel
**Main Box:** to which all PCBs (printed circuit boards) are attached via M2 screws: The keyboard from the top and motherboard, trackball/trackpad, and battery boards from the bottom. The lower half of the hinges and the system controller OLED PCB are mounted from the top as well.
**Bezel:** a thin part that provides a bezel for the keyboard and the system controller OLED
**Bottom Plate:** the bottom lid that is either milled from clear acrylic or aluminum
.. image:: _static/speakers.jpg
:alt: Speaker Closers

1. **Screen Back:** housing the display and upper half of hinges
2. **Screen Front:** housing speakers and providing display bezel
3. **Main Box:** to which all PCBs (printed circuit boards) are attached via M2 screws: The keyboard from the top and motherboard, trackball/trackpad, and battery boards from the bottom. The lower half of the hinges and the system controller OLED PCB are mounted from the top as well.
4. **Bezel:** a thin part that provides a bezel for the keyboard and the system controller OLED
5. **Bottom Plate:** the bottom lid that is either milled from clear acrylic or aluminum

For easy (dis)assembly, Reform uses only M2 screws with Phillips-head everywhere (with one exception: M4 on the hinges).



Loading…
Cancel
Save