Skip to content

Commit 1d80ebf

Browse files
authored
Merge pull request #36 from niwatori-chicken/develop
Upgrade README-ja.md
2 parents 9426e0a + 73c46a4 commit 1d80ebf

File tree

1 file changed

+108
-113
lines changed

1 file changed

+108
-113
lines changed

README-ja.md

+108-113
Original file line numberDiff line numberDiff line change
@@ -14,62 +14,62 @@ Milk-V DuoはCV1800Bをベースにした超小型の組み込みプラットフ
1414
# SDKのディレクトリ構造
1515

1616
```text
17-
├── build // compilation scripts and board configs コンパイルスクリプトとボード設定
18-
├── build_milkv.sh // one-click compilation script 自動コンパイルスクリプト
19-
├── buildroot-2021.05 // buildroot source code Buildrootのソースコード
20-
├── freertos // freertos system freeRTOSのシステム
21-
├── fsbl // fsbl firmware in prebuilt form 完成済みfsblファームウェア
22-
├── install // temporary images stored here 一時イメージの仮置き場
23-
├── isp_tuning // camera effect parameters カメラ効果パラメータ
24-
├── linux_5.10 // linux kernel Linuxカーネル
25-
├── middleware // self-developed multimedia framework 自家製マルチメディアフレームワーク
26-
├── milkv // configuration files for milkv Milk-Vのコンフィグレーションファイル
27-
├── opensbi // opensbi library opensbiライブラリ
28-
├── out // final image for SD card 完成したSDカード用イメージはここに出てきます
29-
├── ramdisk // prebuilt ramdisk 完成済みramsidk
30-
└── u-boot-2021.10 // u-boot source code u-bootのソースコード
17+
├── build // コンパイルスクリプトとボード設定
18+
├── build_milkv.sh // 自動コンパイルスクリプト
19+
├── buildroot-2021.05 // Buildrootのソースコード
20+
├── freertos // FreeRTOSのシステム
21+
├── fsbl // 完成済みfsblファームウェア
22+
├── install // 一時イメージの仮置き場
23+
├── isp_tuning // カメラ効果パラメータ
24+
├── linux_5.10 // Linuxカーネル
25+
├── middleware // 自家製マルチメディアフレームワーク
26+
├── milkv // Milk-Vのコンフィグレーションファイル
27+
├── opensbi // opensbiライブラリ
28+
├── out // 完成したSDカード用イメージはここに出てきます
29+
├── ramdisk // 完成済みramsidk
30+
└── u-boot-2021.10 // u-bootのソースコード
3131
```
3232

3333
# クイックスタート
3434

35-
Prepare the Compilation Environment. Using a local Ubuntu system, the officially supported compilation environment is `Ubuntu Jammy 22.04.x amd64` only!
35+
コンパイル環境を準備する前に、ローカルのubuntuを使用する際にサポートされているのは`Ubuntu Jammy 22.04.x amd64`のみです。
3636

37-
If you are using other Linux distributions, we strongly recommend that you use the Docker environment to compile to reduce the probability of compilation errors.
37+
他のLinuxディストロを使用している場合、問題を回避するためにDocker環境を使用することを強くお勧めします。
3838

39-
The following describes the compilation methods in the two environments.
39+
2つの環境でのコンパイル方法について解説します。
4040

41-
## 1. Compiled using Ubuntu 22.04
41+
## 1. Ubuntu 22.04を使用してコンパイル
4242

43-
### Packages to be installed
43+
### インストールするパッケージ
4444

45-
Install the packages that compile dependencies:
45+
コンパイルに必要なパッケージをインストールします。
4646

4747
```bash
4848
sudo apt install -y pkg-config build-essential ninja-build automake autoconf libtool wget curl git gcc libssl-dev bc slib squashfs-tools android-sdk-libsparse-utils jq python3-distutils scons parallel tree python3-dev python3-pip device-tree-compiler ssh cpio fakeroot libncurses5 flex bison libncurses5-dev genext2fs rsync unzip dosfstools mtools tcl openssh-client cmake
4949
```
5050

51-
### Get SDK Source Code
51+
### SDKのソースコードを入手
5252

5353
```bash
5454
git clone https://github.com/milkv-duo/duo-buildroot-sdk.git --depth=1
5555
```
5656

57-
### <1>. One-click Compilation
57+
### <1>. 自動コンパイル
5858

59-
- Execute the one-click compilation script `build_milkv.sh`:
59+
- 自動コンパイルスクリプト`build_milkv.sh`を実行
6060

6161
```
6262
cd duo-buildroot-sdk/
6363
./build_milkv.sh
6464
```
6565

66-
- After a successful compilation, you can find the generated SD card burning image `milkv-duo-*-*.img` in the `out` directory.
66+
- 正常にコンパイルされるとSDカード用イメージ`milkv-duo-*-*.img``out`ディレクトリの中に出てきます。
6767

68-
*Note: The first compilation will automatically download the required toolchain, which is approximately 840MB in size. Once downloaded, it will be automatically extracted to the `host-tools` directory in the SDK directory. For subsequent compilations, if the `host-tools` directory is detected, the download will not be performed again*.
68+
*注意:最初のコンパイル時に必要なツールチェーン(およそ840MB)が自動でダウンロードされます。一度ダウンロードされると`host-tools`内に自動で展開されます。以後のコンパイルでは`host-tools`ディレクトリがある場合再びダウンロードはされません。*
6969

70-
### <2>. Step-by-step Compilation
70+
### <2>. 手動コンパイル
7171

72-
If you wish to perform step-by-step compilation, you can enter the following commands sequentially:
72+
手動コンパイルをしたい場合は以下のコマンドを順に実行します。
7373

7474
```bash
7575
export MILKV_BOARD=milkv-duo
@@ -82,75 +82,74 @@ build_all
8282
pack_sd_image
8383
```
8484

85-
Location of the generated image: `install/soc_cv1800b_milkv_duo_sd/milkv-duo.img`.
85+
生成されたイメージは`install/soc_cv1800b_milkv_duo_sd/milkv-duo.img`に出てきます。
8686

87-
## 2. Compiled using Docker
87+
## 2. Dockerを使用してコンパイル
8888

89-
Docker support is required on hosts running Linux systems. For how to use Docker, please refer to the [official documentation](https://docs.docker.com/) or other tutorials.
89+
DockerはホストのLinuxシステムからサポートされている必要があります。Dockerの使い方については[公式ドキュメント](https://docs.docker.com/)とか他の使い方を見てください。
9090

91-
We put the SDK source code on the Linux host system and call the Docker image environment provided by Milk-V to compile it.
91+
SDKのソースコードをLinuxホストシステムに置いて、Milk-Vから提供されているコンパイル用イメージをDockerで呼び出してコンパイルします。
9292

93-
### Pull SDK code on Linux host
93+
### SDKのソースコードをホストに持ってくる
9494

9595
```
9696
git clone https://github.com/milkv-duo/duo-buildroot-sdk.git --depth=1
9797
```
9898

99-
### Enter the SDK code directory
99+
### SDKのコードディレクトリに入る
100100

101101
```
102102
cd duo-buildroot-sdk
103103
```
104104

105-
### Pull the Docker image and run
105+
### Dockerイメージを持ってきて実行する
106106

107107
```
108108
docker run -itd --name duodocker -v $(pwd):/home/work milkvtech/milkv-duo:latest /bin/bash
109109
```
110110

111-
Description of some parameters in the command:
112-
- `duodocker` Docker name, you can use the name you want to use.
113-
- `$(pwd)` The current directory, here is the duo-buildroot-sdk directory that was 'cd' to in the previous step.
114-
- `-v $(pwd):/home/work` Bind the current code directory to the /home/work directory in the Docker image.
115-
- `milkvtech/milkv-duo:latest` The Docker image provided by Milk-V will be automatically downloaded from hub.docker.com for the first time.
111+
コマンド中のパラメータについて:
112+
- `duodocker` Dockerの名前です。好きな名前を使えます。
113+
- `$(pwd)` カレントディレクトリです。ここでは先程cdしたduo-buildroot-sdkを指しています。
114+
- `-v $(pwd):/home/work` 現在のコードディレクトリをDockerイメージの/home/workに結びつけます。
115+
- `milkvtech/milkv-duo:latest` Milk-VによるDockerイメージです。最初にhub.docker.comから自動でダウンロードされます。
116116

117-
After Docker runs successfully, you can use the `docker ps -a` command to view the running status:
117+
Dockerが正常に実行されたら`docker ps -a`コマンドで実行状態を見ることができます。
118118
```
119119
$ docker ps -a
120120
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
121121
8edea33c2239 milkvtech/milkv-duo:latest "/bin/bash" 2 hours ago Up 2 hours duodocker
122122
```
123123

124-
### <1>. One-click compilation using Docker
125-
124+
### <1>. Dockerを使用して自動コンパイル
126125
```
127126
docker exec duodocker /bin/bash -c "cd /home/work && cat /etc/issue && ./build_milkv.sh"
128127
```
129128

130-
Description of some parameters in the command:
131-
- `duodocker` The name of the running Docker must be consistent with the name set in the previous step.
132-
- `"*"` In quotes is the shell command to be run in the Docker image.
133-
- `cd /home/work` Switch to the /home/work directory. Since this directory has been bound to the host's code directory during runtime, the /home/work directory in Docker is the source code directory of the SDK.
134-
- `cat /etc/issue` Displays the version number of the image used by Docker. It is currently Ubuntu 22.04.3 LTS and is used for debugging.
135-
- `./build_milkv.sh` Execute one-click compilation script.
129+
コマンド中のパラメータについて:
130+
- `duodocker` 実行中のDockerの名前です。先程設定したものと同じである必要があります。
131+
- `"*"` クオートの中にDockerイメージ中で実行したいコマンドが入ります。
132+
- `cd /home/work` /home/workディレクトリに移動します。このディレクトリは実行時にホストのコードディレクトリに紐付けられているため、Docker中の/home/workディレクトリはSDKのコードディレクトリになります。
133+
- `cat /etc/issue` Dockerで実行されているイメージのバージョンを表示します。これはいまのところ「Ubuntu 22.04.3 LTS」で、デバッグに使われます。
134+
- `./build_milkv.sh` 自動コンパイルスクリプトを実行します。
136135

137-
After successful compilation, you can see the generated SD card burning image `milkv-duo-*-*.img` in the `out` directory.
136+
コンパイルが成功すると、`out`ディレクトリの中に`milkv-duo-*-*.img`が出てきます。
138137

139-
### <2>. Compile step by step using Docker
138+
### <2>. Dockerを使用して手動コンパイル
140139

141-
Step-by-step compilation requires logging into Docker to operate. Use the command `docker ps -a` to view and record the ID number of the container, such as 8edea33c2239.
140+
手動コンパイルをする場合はDockerにログインする必要があります。`docker ps -a`コマンドを使用して8edea33c2239みたいな形式のコンテナのIDを表示します。
142141

143-
Enter Docker:
142+
Dockerに入る:
144143
```
145144
docker exec -it 8edea33c2239 /bin/bash
146145
```
147146

148-
Enter the code directory bound in Docker
147+
Dockerに紐付けられたコードディレクトリに入る
149148
```
150149
root@8edea33c2239:/# cd /home/work/
151150
```
152151

153-
Compile step by step
152+
手動でコンパイルする
154153
```bash
155154
export MILKV_BOARD=milkv-duo
156155
source milkv/boardconfig-milkv-duo.sh
@@ -162,70 +161,69 @@ build_all
162161
pack_sd_image
163162
```
164163

165-
Generated firmware location: `install/soc_cv1800b_milkv_duo_sd/milkv-duo.img`.
164+
生成されたイメージは`install/soc_cv1800b_milkv_duo_sd/milkv-duo.img`に出てきます。
166165

167-
After compilation is completed, you can use the `exit` command to exit the Docker environment:
166+
コンパイルが完了したら`exit`コマンドでDockerから抜けれます:
168167
```
169168
root@8edea33c2239:/home/work# exit
170169
```
171-
The generated firmware can also be seen in the host code directory.
170+
生成されたイメージはホストのコードディレクトリからも見れます。
172171

173-
### Stop Docker
172+
### Dockerを停止する
174173

175-
After compilation is completed, if the above Docker running environment is no longer needed, you can stop it first and then delete it:
174+
コンパイルが完了して、もし上のDocker環境がもう必要ないなら止めて削除できます:
176175
```
177176
docker stop 8edea33c2239
178177
docker rm 8edea33c2239
179178
```
180179

181-
## Other compilation considerations
180+
## その他の環境でのコンパイルに関する注意
182181

183-
If you want to try to compile this SDK in an environment other than the above two environments, the following are things you may need to pay attention to, for reference only.
182+
もしこのSDKを上の2つの環境以外で行いたいなら、参考までに以下のことに注意してください。
184183

185-
### cmake version
184+
### Cmakeのバージョン
186185

187-
Note`cmake` minimum version requirement is `3.16.5`.
186+
注意`cmake`は最低でもバージョン`3.16.5`以降が必要です。
188187

189-
Check the version of `cmake` in the system:
188+
システムの`cmake`バージョンの確認
190189

191190
```bash
192191
cmake --version
193192
```
194193

195-
For example, the version of `cmake` installed using apt in the `Ubuntu 20.04` is:
194+
例として、`Ubuntu 20.04`のaptでインストールされる`cmake`のバージョンは
196195

197-
```
196+
```text
198197
cmake version 3.16.3
199198
```
200-
201-
The minimum requirement of this SDK is not met. Manual installation of the latest version `3.27.6` is needed:
199+
です。条件を満たしていないので手動で最新の`cmake`をインストールしてください
202200

203201
```bash
204202
wget https://github.com/Kitware/CMake/releases/download/v3.27.6/cmake-3.27.6-linux-x86_64.sh
205203
chmod +x cmake-3.27.6-linux-x86_64.sh
206204
sudo sh cmake-3.27.6-linux-x86_64.sh --skip-license --prefix=/usr/local/
207205
```
208206

209-
When manually installed, `cmake` is located in `/usr/local/bin`. To check its version, use the command `cmake --version`, which should display:
207+
手動でインストールした`cmake``/usr/local/bin`に配置されます。`cmake --version`すると以下のように出力されるはずです。
210208

211209
```
212210
cmake version 3.27.6
213211
```
214212

215-
### Compiling with Windows Linux Subsystem (WSL)
213+
### Windows Subsystem for Linux(WSL)を使用してコンパイル
216214

217-
If you wish to perform the compilation with WSL, there's an small issue building the image.
218-
The $PATH, due Windows interoperability, has Windows environment variables which include some spaces between the paths.
215+
WSLでコンパイルするには少し問題があります。
216+
互換性のために$PATHにいくつかのスペース文字を含むWindows用の環境変数が入っています。
219217

220-
To solve this problem you need to change the `/etc/wsl.conf` file and add the following lines:
218+
解決するには`/etc/wsl.conf`ファイルに以下を追記します。
221219

222220
```
223221
[interop]
224222
appendWindowsPath = false
225223
```
226224

227-
After that, you need to reboot the WSL with `wsl.exe --reboot`. Then you able to run the `./build_milkv.sh` script or the `build_all` line in the step-by-step compilation method.
228-
To rollback this change in `/etc/wsl.conf` file set `appendWindowsPath` as true. To reboot the WSL, can you use the Windows PowerShell command `wsl.exe --shutdown` then `wsl.exe`, after that the Windows environment variables become avaliable again in $PATH.
225+
その後、`wsl.exe --reboot`でWSLを再起動する必要があります。そうすれば、自動コンパイルスクリプトを実行するか、手動コンパイルのを行うことができます。
226+
変更を元に戻すには、`/etc/wsl.conf``appendWindowsPath`をtrueに設定します。Powershellから`wsl.exe --shutdown`を実行してから`wsl.exe`すれば、また$PATHからWindowsの環境変数が使えるようになります。
229227

230228
## SDカードへの書き込み
231229

@@ -261,69 +259,66 @@ milkv
261259

262260
もしDuoに載っているLEDの点滅を無効にしたいならDuoのターミナルで以下のコマンドを実行してください。
263261

264-
```bash
265-
mv /mnt/system/blink.sh /mnt/system/blink.sh_backup && sync
266-
```
262+
```bash
263+
mv /mnt/system/blink.sh /mnt/system/blink.sh_backup && sync
264+
```
267265

268266
以上のコマンドはLEDの点滅スクリプトをリネームしています。そしてDuoを再起動するとLEDは点滅しなくなります。
269267

270268
DuoのLEDをまた点滅させたい場合、スクリプトのファイル名を元に戻します。
271269

272-
```bash
273-
mv /mnt/system/blink.sh_backup /mnt/system/blink.sh && sync
274-
```
270+
```bash
271+
mv /mnt/system/blink.sh_backup /mnt/system/blink.sh && sync
272+
```
275273

276274
### IO-Boardを使う
277275

278276
IO-Boardを使用する場合、USBネットワーク(RNDIS)は使用できないので、IO-Boardのイーサネットインターフェースを使用してください。
279277
IO-BoardのEthernetポートに固定MACアドレスを割り当てる必要がある場合は、以下のコマンドを実行してください(**コマンド中のMACアドレスは設定したいMACアドレスに置き換えてください。また、同一ネットワークセグメント内の異なるデバイスのMACアドレスは重複してはいけません**)。
280278

281-
```bash
282-
echo "pre-up ifconfig eth0 hw ether 78:01:B3:FC:E8:55" >> /etc/network/interfaces"
283-
```
284-
285-
それからボードを再起動してください。
279+
```bash
280+
echo "pre-up ifconfig eth0 hw ether 78:01:B3:FC:E8:55" >> /etc/network/interfaces"
281+
```
282+
- それからボードを再起動してください。
286283
287284
IO-Board上の4発のUSBポートを有効化する:
288285
289-
```bash
290-
rm /mnt/system/usb.sh
291-
ln -s /mnt/system/usb-host.sh /mnt/system/usb.sh
292-
sync
293-
```
294-
295-
それからボードを再起動してください。
286+
```bash
287+
rm /mnt/system/usb.sh
288+
ln -s /mnt/system/usb-host.sh /mnt/system/usb.sh
289+
sync
290+
```
291+
- それからボードを再起動してください。
296292
297293
たとえば、USBフラッシュドライブがIO-Board上のUSBポートに接続されている場合`ls /dev/sd*`で認識していることを確認できます。
298294
299295
USBフラッシュドライブをマウントしてその内容を見る(/dev/sda1を例に)。
300296
301-
```bash
302-
mkdir /mnt/udisk
303-
mount /dev/sda1 /mnt/udisk
304-
```
297+
```bash
298+
mkdir /mnt/udisk
299+
mount /dev/sda1 /mnt/udisk
300+
```
305301
306302
`/mnt/udisk`ディレクトリの内容が予想と一致するか確認する。
307303
308-
```bash
309-
ls /mnt/udisk
310-
```
304+
```bash
305+
ls /mnt/udisk
306+
```
311307
312-
USBフラッシュドライブをアンマウントするコマンド
308+
USBフラッシュドライブをアンマウントするコマンド
313309
314-
```bash
315-
umount /mnt/udisk
316-
```
317-
318-
USBネットワーク(RNDIS)の機能をIO-Board不使用時に使う場合は以下のコマンドを実行してください
310+
```bash
311+
umount /mnt/udisk
312+
```
319313
320-
```bash
321-
rm /mnt/system/usb.sh
322-
ln -s /mnt/system/usb-rndis.sh /mnt/system/usb.sh
323-
sync
324-
```
314+
USBネットワーク(RNDIS)の機能をIO-Board不使用時に使う。
325315
326-
それからボードを再起動してください。
316+
```bash
317+
rm /mnt/system/usb.sh
318+
ln -s /mnt/system/usb-rndis.sh /mnt/system/usb.sh
319+
sync
320+
```
321+
- それからボードを再起動してください。
327322
328323
# よくある質問
329324
@@ -333,7 +328,7 @@ sync
333328
334329
2. なぜ28MBしかRAMが使えないのですか。
335330
336-
RAMの一部が[ION](https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/default/dts/cv180x/cv180x_default_memmap.dtsi#L15)に割り当てられており、カメラを使ってアルゴリズムを実行するときに使用するメモリだからです。カメラを使用しない場合は、この[ION_SIZE](https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/cv180x/cv1800b_milkv_duo_sd/memmap.py#L43)の値を0に変更し、再コンパイルしてください。
331+
RAMの一部が[ION](https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/default/dts/cv180x/cv180x_default_memmap.dtsi#L15)に割り当てられており、カメラを使ってアルゴリズムを実行するときに使用するメモリに割り当てられているからです。カメラを使用しない場合は、この[ION_SIZE](https://github.com/milkv-duo/duo-buildroot-sdk/blob/develop/build/boards/cv180x/cv1800b_milkv_duo_sd/memmap.py#L43)の値を0に変更し、再コンパイルしてください。
337332
338333
## チップ製造元のドキュメント
339334

0 commit comments

Comments
 (0)