new project

This commit is contained in:
Qubot 2023-06-19 01:17:31 +08:00
parent 3bee85d024
commit 677094733f
12 changed files with 4979 additions and 0 deletions

16
README.adoc Executable file
View File

@ -0,0 +1,16 @@
= Asciidoctor Maven Plugin: AsciiDoc to PDF Book Example
An example project that demonstrates how to convert AsciiDoc to PDF using Asciidoctor PDF with the Asciidoctor Maven plugin.
This example produces a book and make use of a custom https://github.com/asciidoctor/asciidoctor-pdf/blob/v1.6.x/docs/theming-guide.adoc[Asciidoctor PDF theme] (defined in `src/theme`).
The same document is rendered twice:
* Without the theme configuration, output is `target/generated-docs-default-theme/example-manual.pdf`
* With the theme configuration, output is `target/generated-docs-custom-theme/example-manual.pdf`
== Usage
Convert the AsciiDoc to PDF using Asciidoctor PDF by invoking the `process-resources` goal (configured as the default goal):
$ mvn
Open the file _target/generated-docs-custom-theme/example-manual.pdf_ in your PDF viewer to see the generated PDF.

83
pom.xml Executable file
View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.asciidoctor.maven</groupId>
<artifactId>asciidoctor-pdf-with-theme-example</artifactId>
<version>1.0.0-SNAPSHOT</version>
<name>Asciidoctor PDF with theme Maven example</name>
<description>An example project that demonstrates how to convert AsciiDoc to PDF using Asciidoctor PDF with the Asciidoctor Maven plugin.</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<asciidoctor.maven.plugin.version>2.2.4</asciidoctor.maven.plugin.version>
<asciidoctorj.pdf.version>2.3.7</asciidoctorj.pdf.version>
<asciidoctorj.version>2.5.10</asciidoctorj.version>
<jruby.version>9.4.2.0</jruby.version>
</properties>
<build>
<defaultGoal>process-resources</defaultGoal>
<plugins>
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor.maven.plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-pdf</artifactId>
<version>${asciidoctorj.pdf.version}</version>
</dependency>
<!-- Comment this section to use the default jruby artifact provided by the plugin -->
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby</artifactId>
<version>${jruby.version}</version>
</dependency>
<!-- Comment this section to use the default AsciidoctorJ artifact provided by the plugin -->
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>${asciidoctorj.version}</version>
</dependency>
</dependencies>
<configuration>
<sourceDirectory>src/docs/asciidoc</sourceDirectory>
<!-- Attributes common to all output formats -->
<attributes>
<sourcedir>${project.build.sourceDirectory}</sourcedir>
</attributes>
</configuration>
<executions>
<execution>
<id>generate-pdf-doc-custom-theme</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>pdf</backend>
<outputDirectory>${project.build.directory}/generated-docs-custom-theme</outputDirectory>
<!-- Use `book` docType to enable title page generation -->
<doctype>book</doctype>
<attributes>
<pdf-theme>custom</pdf-theme>
<pdf-themesdir>${project.basedir}/src/theme</pdf-themesdir>
<source-highlighter>rouge</source-highlighter>
<icons>font</icons>
<pagenums/>
<toc/>
<toc-placement>macro</toc-placement>
<idprefix/>
<idseparator>-</idseparator>
</attributes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,130 @@
= Banana Pi Compute Module 4
:outlinelevels: 3
A Banana Pi for deeply embedded applica
:example-caption!:
ifndef::imagesdir[:imagesdir: images]
== Colophon
© 2020-2023 Raspberry Pi Ltd (formerly Raspberry Pi (Trading) Ltd.)
The documentation around the Raspberry Pi Compute Module 4 is licensed under a Creative Commons AttributionNoDerivatives 4.0 International (CC BY-ND).
build-date: 2023-03-09
build-version: githash: ff2d02e-clean
Legal disclaimer notic
=== Legal disclaimer notice
TECHNICAL AND RELIABILITY DATA FOR RASPBERRY PI PRODUCTS (INCLUDING DATASHEETS) AS MODIFIED FROM
TIME TO TIME (“RESOURCES”) ARE PROVIDED BY RASPBERRY PI LTD (“RPL”) "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN NO
EVENT SHALL RPL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THE RESOURCES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
RPL reserves the right to make any enhancements, improvements, corrections or any other modifications to the
RESOURCES or any products described in them at any time and without further notice.
The RESOURCES are intended for skilled users with suitable levels of design knowledge. Users are solely responsible for
their selection and use of the RESOURCES and any application of the products described in them. User agrees to
indemnify and hold RPL harmless against all liabilities, costs, damages or other losses arising out of their use of the
RESOURCES.
RPL grants users permission to use the RESOURCES solely in conjunction with the Raspberry Pi products. All other use
of the RESOURCES is prohibited. No licence is granted to any other RPL or other third party intellectual property right.
HIGH RISK ACTIVITIES. Raspberry Pi products are not designed, manufactured or intended for use in hazardous
environments requiring fail safe performance, such as in the operation of nuclear facilities, aircraft navigation or
communication systems, air traffic control, weapons systems or safety-critical applications (including life support
systems and other medical devices), in which the failure of the products could lead directly to death, personal injury or
severe physical or environmental damage (“High Risk Activities”). RPL specifically disclaims any express or implied
warranty of fitness for High Risk Activities and accepts no liability for use or inclusions of Raspberry Pi products in High
Risk Activities.
Raspberry Pi products are provided subject to RPLs Standard Terms. RPLs provision of the RESOURCES does not
expand or otherwise modify RPLs Standard Terms including but not limited to the disclaimers and warranties
expressed in them.
<<<
toc::[]
== Chapter 1. Introduction
=== 1.1 Introduction
image::BPI-CM4.jpg[scaledwidth=75%]
The Banana Pi Compute Module 4(CM4)is a System on Module(SoM) containing processor,DRAM, eMMC Flash and supporting power circuitry. These modules allow a designer touse the Banana Pi hardware and software stack in their own custom systems and formfactors. And, These modules offer additional IO interfaces beyond what is provided on Banana Pi boards, providing designers with more options.
The design of the CM4 is loosely based on the Amlogic A311D, Quad core ARM Cortex-A73 and dual core ARM Cortex-A53 CPU , ARM G52MP4(6EE) GPU,NPU for AI at 5.0 TOPS, support Camera and MIPI-CSI interface ,HDMI output,2 Gigabit port . 4G RAM and 16 GB eMMC flash.
for A311D chip PIN limited . just support 1 HDMI ,1 CSI and 1 DSI , Raspberry Pi support 2 HDMI ,2 CSI and 2 DSI , Other is Pin2Pin . you can use Raspberry Pi CM4 baseboard.
NOTE: for A311D chip PIN limited . just support 1 HDMI ,1 CSI and 1 DSI , Raspberry Pi support 2 HDMI ,2 CSI and 2 DSI , Other is Pin2Pin . you can use Raspberry Pi CM4 baseboard.
<<<
=== 1.2 Key Feature
Key feature of the BPI-CM4 are as follows:
* Amlogic A311D Quad core ARM Cortex-A73 and dual core ARM Cortex-A53,ARM G52 MP4(6EE) GPU
* NPU for AI Next generation, deep-neural-network applications, at 5.0 TOPS
* OpenGL ES 3.2, Vulkan 1.1 and OpenCL 2.0 support
* 4GB LPDDR4 RAM
* 16GB eMMC flash (Max 128G)
* MIPI DSI :
** 1x4-Lane MIPI DSI Display Interface
* MIPI CSI :
** 1x4-Lane MIPI CSI Camera Interface
* PCIe Interface:
** 1xPCIe 1-Lane Host,Gen 2(5Gbps)
* HDMI Interface:
** 1xHDMI 2.1 Output Interface(up tp 4Kx2K@60)
* Gigabit Ethernet PHY supporting
* 26 PIN GPIO:
** 1x PCM
** 1x IIC
** 1x UART
** 1x PWM
* Single +5V PSU Input
* Support Android and Linux system
* Size: 55x40mm
== Chapter 2. Interfaces
=== Wireless
The BPI-CM4 supports an onboard wireless module based on Realtek RTL8822CS,supports both
* 2.4GHz & 5GHz IEEE 802.11 a/b/g/n/ac 2x2 MIMO wireless
* Bluetooth 5.0 BR/EDR/LE
These wireless interfaces can be individually enabled or disabled as required via CPU GPIO. In the case of many application environments, a service engineer can enable wireless operation and then disable it when done.
The CPU can also turn on the wireless by itself for data communication, and turn ff the wireless after completion to reduce power consumption.
The BPI-CM4 has two standard IPEX-1G connector on the module, If you want to use 2x2 MIMO, need to connect 2x 2.4G&5G antenna.
Banana Pi Ltd has an antenna kit which is certified to be used with the BPI-CM4. If a different antenna is used then separate certification will be required.
== Build
This page was built by the following command:
$ mvn
=== Attributes
.Built-in
asciidoctor-version:: {asciidoctor-version}
safe-mode-name:: {safe-mode-name}
docdir:: {docdir}
docfile:: {docfile}
imagesdir:: {imagesdir}
.Custom
sourcedir:: {sourcedir}
== Includes
WARNING: Includes can be tricky!

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
src/theme/cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

61
src/theme/custom-theme.yml Executable file
View File

@ -0,0 +1,61 @@
extends: # 继承默认字体和备用字体
- default-with-fallback-font
title-page: # 标题页的样式
align: left # 对齐方式为左对齐
background-color: #3661f8 # 背景颜色为蓝色
title: # 标题样式
top: 0% # 位置位于页面顶部
font-color: #FFFFFF # 字体颜色为白色
page: # 页面样式
margin: [0.75in, 1in, 0.75in, 1in] # 边距为[0.75英寸, 1英寸, 0.75英寸, 1英寸]
base: # 基本样式
line-height-length: 20 # 行高长度为20
heading: # 标题样式
font-color: #000000 # 字体颜色为黑色
font-size: 12 # 字体大小为12
line-height: 1.2 # 行高为1.2
link: # 链接样式
font-color: #548bc9 # 字体颜色为蓝色
header: # 页眉样式
border-color: #3661f8 # 边框颜色为蓝色
border-width: 3.97 # 边框宽度为3.97
font-color: #3661f8 # 字体颜色为蓝色
height: 0.55in # 高度为0.55英寸
line-height: 1 # 行高为1
recto: # 正面(奇数页)的内容
left: # 左侧内容
content: 'Banana Pi Compute Module 4' # 内容为'Banana Pi Compute Module 4'
verso: # 背面(偶数页)的内容
left: # 左侧内容
content: 'Banana Pi Compute Module 4' # 内容为'Banana Pi Compute Module 4'
footer: # 页脚样式
border-color: #3661f8 # 边框颜色为蓝色
border-width: 3.97 # 边框宽度为3.97
font-color: #3661f8 # 字体颜色为蓝色
height: 0.75in # 高度为0.75英寸
line-height: 1 # 行高为1
recto: # 正面(奇数页)的内容
left: # 左侧内容
content: '{chapter-title}' # 内容为当前章节标题
right: # 右侧内容
content: '*{page-number}*' # 内容为当前页码
verso: # 背面(偶数页)的内容
left: # 左侧内容
content: '{chapter-title}' # 内容为当前章节标题
right: # 右侧内容
content: '*{page-number}*' # 内容为当前页码
image: # 图片样式
align: center # 对齐方式为居中
caption: # 标题样式
align: center # 对齐方式为居中
font-color: #3661f8 # 字体颜色为蓝色
font-size: 10 # 字体大小为10

BIN
src/theme/header.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB