Skip to content

Commit 28e76b0

Browse files
authored
Merge pull request #72 from TakayukiMatsuo/jp_ssh_boot
2 parents c818fa2 + 74b5b6a commit 28e76b0

40 files changed

+7772
-6
lines changed

Custom-wolfSSL-theme-JA.patch

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
diff --git a/material/base.html b/material/base.html
2+
index be0a8c88e..1c1380746 100644
3+
--- a/material/base.html
4+
+++ b/material/base.html
5+
@@ -67,6 +67,15 @@
6+
{% include "partials/integrations/analytics.html" %}
7+
{% endblock %}
8+
{% block extrahead %}{% endblock %}
9+
+ <!-- Global site tag (gtag.js) - Google Analytics -->
10+
+ <script async src="https://www.googletagmanager.com/gtag/js?id=UA-64826966-1"></script>
11+
+ <script>
12+
+ window.dataLayer = window.dataLayer || [];
13+
+ function gtag(){dataLayer.push(arguments);}
14+
+ gtag('js', new Date());
15+
+
16+
+ gtag('config', 'UA-64826966-1');
17+
+ </script>
18+
</head>
19+
{% set direction = config.theme.direction or lang.t('direction') %}
20+
{% if config.theme.palette %}
21+
diff --git a/material/partials/header.html b/material/partials/header.html
22+
index 4872af867..6b3573812 100644
23+
--- a/material/partials/header.html
24+
+++ b/material/partials/header.html
25+
@@ -66,6 +66,15 @@
26+
</div>
27+
</div>
28+
{% endif %}
29+
+ <div class="md-ellipsis-nav" style="font-size:120%;">
30+
+ <a href="https://www.wolfssl.jp/">ホーム</a>
31+
+ <a href="https://www.wolfssl.jp/products/">製品</a>
32+
+ <a href="https://www.wolfssl.jp/download/">ダウンロード</a>
33+
+ <a href="https://www.wolfssl.jp/license/">ライセンス</a>
34+
+ <a href="https://www.wolfssl.jp/docs/">ドキュメント</a>
35+
+ <a href="https://www.wolfssl.jp/contact/">ご質問</a>
36+
+ </div>
37+
+
38+
{% if "search" in config["plugins"] %}
39+
<label class="md-header__button md-icon" for="__search">
40+
{% include ".icons/material/magnify.svg" %}

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,32 @@ To run a local HTML server (HTML is built to a temporary area for this):
6464
```sh
6565
make serve
6666
```
67+
68+
## Localization
69+
70+
By default, the built output documentation is in English. If you assign a language code to the DOC_LANG variable and call 'make' with it, the output will be localized in that specified language. As of now (end of 2022), the only supported language code is 'JA', which means 'Japanese'. Not all wolfSSL products documentation supports localization. 'make' with DOC_LANG variable for unsupported products is ignored and output in English.
71+
72+
```sh
73+
make DOC_LANG=JA
74+
```
75+
76+
### Pre-requisites
77+
78+
For localization to work, the build environment must have the correct fonts installed for the specified language.
79+
80+
#### Japanese font
81+
'Noto Sans CJK JP' font is used for Japanese localization. You can get the font files from the following Github repository:
82+
https://github.com/googlefonts/noto-cjk/tree/main/Sans/OTF/Japanese
83+
84+
You can download the seven `NotoSansCJKjp-xxx.otf` files from there and put them into `/usr/local/share/fonts`. You may need 'sudo' for the operation. After coping font files, you need to update font cache by calling:
85+
86+
```sh
87+
sudo fc-cache -fv
88+
```
89+
Then you can confirm the font cache includes the installed font files by 'fc-list'.
90+
91+
```sh
92+
fc-list | grep NotoSansCJKjp
93+
```
94+
You will get the list of installed font files.
95+

common/common.am

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
HTML = html/
44

5+
ifeq ($(DOC_LANG),JA)
6+
PATCH = ../Custom-wolfSSL-theme-JA.patch
7+
SRC = src-ja
8+
MKDOC = mkdocs-ja.yml
9+
CJK = --variable CJKmainfont="Noto Sans CJK JP"
10+
else
11+
PATCH = ../Custom-wolfSSL-theme.patch
12+
SRC = src
13+
MKDOC = mkdocs.yml
14+
CJK =
15+
endif
16+
517
.PHONY: builddir
618
builddir:
719
@mkdir -p build/pdf
@@ -10,8 +22,8 @@ builddir:
1022
.PHONY: html-setup
1123
html-setup:
1224
@git submodule update --init
13-
-cd ../mkdocs-material; patch -p1 < ../Custom-wolfSSL-theme.patch --ignore-whitespace -N
14-
@cp -a src/* build/html/
25+
-cd ../mkdocs-material; patch -p1 < $(PATCH) --ignore-whitespace -N
26+
@cp -a $(SRC)/* build/html/
1527
@cp ../common/*.png build/html/
1628
@cp ../common/*.css build/html/
1729
@perl -i -pe 's/ ```/```/g' build/html/*.md
@@ -21,11 +33,11 @@ html-setup:
2133
.PHONY: html
2234
html: builddir html-setup html-prep
2335
@mkdir -p html
24-
@mkdocs build
36+
@mkdocs build -f $(MKDOC)
2537

2638
.PHONY: pdf-setup
2739
pdf-setup: builddir
28-
@cp -a src/* build/pdf/
40+
@cp -a $(SRC)/* build/pdf/
2941
@cp ../common/*.png build/pdf/
3042
@perl -i -pe "s/chapter[0-9][0-9].md|appendix[0-9][0-9].md//g" build/pdf/*.md
3143
@perl -i -pe "s/\#--/\#/g" build/pdf/*.md
@@ -39,6 +51,7 @@ pdf: pdf-setup pdf-prep
3951
--variable mainfont="Noto Sans" \
4052
--variable sansfont="Noto Sans" \
4153
--variable monofont="Noto Sans Mono" \
54+
$(CJK) \
4255
--variable papersize=letter \
4356
--variable geometry="margin=2.5cm" \
4457
--variable version=2.0 \

wolfBoot/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ SOURCES = chapter01.md \
1212
chapter07.md \
1313
chapter08.md
1414

15-
PDF = wolfBoot-Manual.pdf
15+
ifeq ($(DOC_LANG),JA)
16+
PDF = wolfBoot-Manual-jp.pdf
17+
else
18+
PDF = wolfBoot-Manual.pdf
19+
endif
1620

1721
.PHONY: html-prep
1822
html-prep:

wolfBoot/mkdocs-ja.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
site_name: wolfBoot マニュアル
2+
site_url: https://wolfssl.com/
3+
docs_dir: build/html/
4+
site_dir: html/
5+
copyright: wolfSSL Inc. 2022
6+
nav:
7+
- "1. イントロダクション": index.md
8+
- "2. wolfBootのビルド": chapter02.md
9+
- "3. ターゲット": chapter03.md
10+
- "4. ハードウエア抽象化レイヤー": chapter04.md
11+
- "5. Flushメモリのパーティション": chapter05.md
12+
- "6. wolfBootの機能": chapter06.md
13+
- "7. wolfBootの既存プロジェクトへの統合": chapter07.md
14+
- "8. トラブルシューティング": chapter08.md
15+
theme:
16+
name: null
17+
custom_dir: ../mkdocs-material/material
18+
language: en
19+
palette:
20+
primary: indigo
21+
accent: indigo
22+
font:
23+
text: Roboto
24+
code: Roboto Mono
25+
icon: "logo.png"
26+
logo: logo.png
27+
favicon: logo.png
28+
feature:
29+
tabs: true
30+
extra_css: [skin.css]
31+
extra:
32+
generator: false
33+
use_directory_urls: false

wolfBoot/src-ja/chapter01.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
3+
# イントロダクション
4+
5+
6+
7+
[wolfBoot](https://www.wolfssl.com/products/wolfboot/)は、32ビットマイクロコントローラー向けのポータブルでOSに依存しないセキュアなブートローダーソリューションであり、ファームウェア認証用のwolfCryptに依存して、ファームウェアの更新メカニズムを提供します。
8+
9+
10+
ブートローダーと小さなHAL APIの最小限設計により、wolfBootはあらゆるOSまたは裸の金属アプリケーションから完全に独立しており、安全なファームウェア更新メカニズムを提供するために、既存の埋め込みソフトウェアプロジェクトに簡単に移植および統合できます。
11+
12+
13+
14+
15+
**機能**
16+
17+
18+
19+
- フラッシュデバイスのマルチスロットパーティション
20+
21+
22+
- ファームウェアイメージの整合性検証
23+
24+
25+
- wolfCryptのデジタル署名アルゴリズム(DSA)を使用したファームウェアイメージの信頼性検証
26+
27+
28+
- 最小限のハードウェア抽象化レイヤー(HAL)インターフェースは、さまざまなベンダー/MCUの移植性を促進するためのインターフェース
29+
30+
31+
- セカンダリスロットからプライマリスロットにイメージをコピー/スワップして、ファームウェアの更新操作に同意する
32+
33+
34+
- プライマリスロットでのファームウェアイメージのインプレースチェーンロード
35+
36+
37+
- TPMのサポート
38+
39+
40+
- 測定されたブートサポート、ファームウェアイメージハッシュのTPMプラットフォーム構成レジスタ(PCR)への保存
41+
42+
43+
44+
**コンポーネント**
45+
46+
47+
[wolfBoot GitHubリポジトリ](https://github.com/wolfSSL/wolfBoot)には、次のコンポーネントが含まれています。
48+
49+
50+
51+
- wolfBoot ブートローダ
52+
53+
54+
- 鍵生成とイメージ署名ツール(python 3.xおよびwolfcrypt-py https://github.com/wolfssl/wolfcrypt-pyが必要です)
55+
56+
57+
- 非OSのテストアプリケーション

0 commit comments

Comments
 (0)