Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 48 additions & 2 deletions docs/getting-started/firmware-update/net-boot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,51 @@ Use Net Boot Recovery when you need to boot the DevKit over the network instead
This guide uses images that SiMa.ai provides, and it needs a working U-Boot prompt on the board. It does not describe how to install an image that you built yourself. For that, see [Flash an Image to eMMC](/hardware/deployment/flash-image).
:::

Use the `--netboot` option with `sima-cli bootimg`. It downloads the boot image for the target board and serves it from a built-in TFTP server on the host. You then configure the DevKit in U-Boot to boot from that TFTP server and flash the new image to eMMC.
Use the `--netboot` option with `sima-cli bootimg`. It downloads the boot image for the target board and serves it from a built-in TFTP server on the host. The DevKit then boots from that TFTP server, and `sima-cli` flashes the new image to eMMC.

There are two ways to run it:

- **Automatic.** If the DevKit boots Linux and the host can reach it over SSH, one command sets up the network boot, reboots the DevKit, and flashes the eMMC. You do not need the serial console. See [Automatic Net Boot and Flash](#automatic).
- **Manual.** If the DevKit does not boot Linux, or the host cannot reach it over SSH, you set up the network boot in U-Boot through the serial console. Follow Steps 1 to 4.

## Automatic Net Boot and Flash {#automatic}

This needs `sima-cli` 2.1.17 or later. To check the installed version, run `sima-cli --version`.

1. Connect the **DevKit's Ethernet port** to the host, directly or through a switch. Check that the host can reach the DevKit at its current IP address, for example `ping 192.168.1.20`.

2. Run `sima-cli bootimg` with `--devkit` and `--autoflash`. Replace `<version>` with the target SDK version (for example `%platform_version%`), and `<devkit-ip>` with the DevKit's current IP address.

**On macOS:**

```console
sima-user@sima-user-machine:~$ sima-cli bootimg -v <version> --netboot --devkit <devkit-ip> --autoflash
```

**On Linux:** the TFTP server binds to port 69, which is privileged, so `sudo` is required:

```console
sima-user@sima-user-machine:~$ sudo ~/.sima-cli/.venv/bin/sima-cli bootimg -v <version> --netboot --devkit <devkit-ip> --autoflash
```

The command installs eLxr on a Modalix DevKit by default. For Yocto, add `--fwtype yocto`. If you leave out `--devkit`, `sima-cli` looks for DevKits on the network and asks you to choose one.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pass the Modalix and eLxr target flags explicitly

When users copy either automatic command, the omitted target flags do not select the target claimed here: the generated sima-cli bootimg --help lists mlsoc and yocto as the defaults. The examples can therefore prepare incompatible MLSoC/Yocto firmware instead of the intended Modalix/eLxr image; add --boardtype modalix --fwtype elxr to both commands and their translations.

Useful? React with 👍 / 👎.


3. `sima-cli` connects to the DevKit over SSH and shows the network settings it will use. Check them, then confirm. `sima-cli` then:

1. Saves the DevKit's U-Boot environment, and sets it to boot from the TFTP server on the host.
2. Reboots the DevKit, which interrupts any running applications.
3. Waits until the DevKit has booted from the network and SSH is available on it.
4. Writes the image to the eMMC.

This takes several minutes. Keep the command running. To watch the boot, you can open the serial console, but you do not have to.

4. When `sima-cli` prints `✅ Flash completed`, type `q` at the `netboot>` prompt. `sima-cli` writes the saved U-Boot environment back to the DevKit, so that it boots from eMMC again.

5. Power-cycle the DevKit. It boots the target version from eMMC.

If `sima-cli` cannot connect to the DevKit over SSH, or cannot change the U-Boot environment safely, it does not change or reboot the DevKit. It keeps the TFTP server running, and it can print the U-Boot commands to enter. Set up the network boot through the serial console as in Step 3 of [Manual Net Boot and Flash](#manual), then type `f` as in Step 4.

## Manual Net Boot and Flash {#manual}

<details open>
<summary><strong>Step 1. Physical Setup</strong></summary>
Expand Down Expand Up @@ -129,10 +173,12 @@ sima:~$ setenv serverip 10.0.0.10; setenv ipaddr 10.0.0.1; saveenv; boot
<details open>
<summary><strong>Step 4. Flash the eMMC</strong></summary>

The `--netboot` shell on the host supports two commands:
The `--netboot` shell on the host supports these commands:

- `c` — Show all connected clients and the firmware version currently running on them.
- `d` — Look for DevKits on the network.
- `f` — Flash the selected client's eMMC.
- `q` — End the session and stop the TFTP server.

Wait for the DevKit to finish netbooting. This may take several minutes. Once the login prompt is shown on the serial console, the board is ready. We recommend keeping the serial console connected throughout to observe the full boot sequence.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,51 @@ sidebar_position: 2
このガイドでは SiMa.ai が提供するイメージを使用します。また、ボード上で U-Boot プロンプトが動作している必要があります。独自にビルドしたイメージのインストール方法は、このガイドでは説明していません。その場合は、[イメージを eMMC に書き込む](/hardware/deployment/flash-image)を参照してください。
:::

`sima-cli bootimg`と組み合わせて、`--netboot`オプションを使用します。これにより、ターゲットボード用のブートイメージがダウンロードされ、ホスト上の組み込みTFTPサーバーから提供されます。次に、U-BootでDevKitを構成し、そのTFTPサーバーからブートするように設定し、新しいイメージをeMMCに書き込みます。
`sima-cli bootimg`と組み合わせて、`--netboot`オプションを使用します。これにより、ターゲットボード用のブートイメージがダウンロードされ、ホスト上の組み込みTFTPサーバーから提供されます。DevKit はその TFTP サーバーから起動し、`sima-cli` が新しいイメージを eMMC に書き込みます。

実行方法は 2 つあります。

- **自動。** DevKit が Linux を起動でき、ホストから SSH で接続できる場合は、1 つのコマンドでネットワークブートの設定、DevKit の再起動、eMMC への書き込みまで行えます。シリアルコンソールは不要です。[自動ネットワークブートと書き込み](#automatic)を参照してください。
- **手動。** DevKit が Linux を起動できない場合や、ホストから SSH で接続できない場合は、シリアルコンソールから U-Boot でネットワークブートを設定します。ステップ1からステップ4に従ってください。

## 自動ネットワークブートと書き込み {#automatic}

`sima-cli` 2.1.17 以降が必要です。インストールされているバージョンは `sima-cli --version` で確認できます。

1. **DevKit のイーサネットポート**を、直接またはスイッチ経由でホストに接続します。ホストから DevKit の現在の IP アドレスに到達できることを確認します(例:`ping 192.168.1.20`)。

2. `--devkit` と `--autoflash` を指定して `sima-cli bootimg` を実行します。`<version>` をターゲットとなる SDK のバージョン(例:`%platform_version%`)に、`<devkit-ip>` を DevKit の現在の IP アドレスに置き換えてください。

**macOS の場合:**

```console
sima-user@sima-user-machine:~$ sima-cli bootimg -v <version> --netboot --devkit <devkit-ip> --autoflash
```

**Linux の場合:** TFTPサーバーは特権ポートである69にバインドされるため、`sudo` が必要です。

```console
sima-user@sima-user-machine:~$ sudo ~/.sima-cli/.venv/bin/sima-cli bootimg -v <version> --netboot --devkit <devkit-ip> --autoflash
```

このコマンドは、デフォルトで Modalix DevKit に eLxr をインストールします。Yocto の場合は `--fwtype yocto` を追加します。`--devkit` を省略すると、`sima-cli` はネットワーク上の DevKit を探し、どれを使うかを尋ねます。

3. `sima-cli` は SSH で DevKit に接続し、使用するネットワーク設定を表示します。設定を確認してから承認してください。その後、`sima-cli` は次の処理を行います。

1. DevKit の U-Boot 環境を保存し、ホスト上の TFTP サーバーから起動するように設定します。
2. DevKit を再起動します。実行中のアプリケーションは中断されます。
3. DevKit がネットワークから起動し、SSH が使用できるようになるまで待ちます。
4. イメージを eMMC に書き込みます。

この処理には数分かかります。コマンドは実行したままにしてください。起動の様子はシリアルコンソールで確認できますが、必須ではありません。

4. `sima-cli` が `✅ Flash completed` と表示したら、`netboot>` プロンプトで `q` と入力します。`sima-cli` は保存した U-Boot 環境を DevKit に書き戻し、DevKit が再び eMMC から起動するようにします。

5. DevKit の電源を入れ直してください。eMMC からターゲットバージョンが起動します。

`sima-cli` が SSH で DevKit に接続できない場合や、U-Boot 環境を安全に変更できない場合、DevKit の変更や再起動は行いません。TFTP サーバーは動作したままで、入力すべき U-Boot コマンドが表示されることがあります。[手動ネットワークブートと書き込み](#manual)のステップ3のとおりにシリアルコンソールからネットワークブートを設定し、ステップ4のとおりに `f` と入力してください。

## 手動ネットワークブートと書き込み {#manual}

<details open>
<summary><strong>ステップ1:物理的なセットアップ</strong></summary>
Expand Down Expand Up @@ -129,10 +173,12 @@ sima:~$ setenv serverip 10.0.0.10; setenv ipaddr 10.0.0.1; saveenv; boot
<details open>
<summary><strong>ステップ4:eMMCに書き込みます</strong></summary>

ホスト上の`--netboot`シェルは、次の2つのコマンドをサポートしています。
ホスト上の`--netboot`シェルは、次のコマンドをサポートしています。

- `c` — 接続されているすべてのクライアントと、現在それらのクライアントで実行されているファームウェアのバージョンを表示します。
- `d` — ネットワーク上の DevKit を探します。
- `f` — 選択したクライアントのeMMCにファームウェアを書き込みます。
- `q` — セッションを終了し、TFTP サーバーを停止します。

DevKit がネットワークブートを完了するまで待ちます。これには数分かかる場合があります。シリアルコンソールにログインプロンプトが表示されたら、ボードは準備完了です。完全なブートシーケンスを観察するために、シリアルコンソールを接続したままにしておくことをお勧めします。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,51 @@ sidebar_position: 2
이 가이드는 SiMa.ai가 제공하는 이미지를 사용하며, 보드에서 U-Boot 프롬프트가 동작해야 합니다. 직접 빌드한 이미지를 설치하는 방법은 이 가이드에서 다루지 않습니다. 그 경우에는 [eMMC에 이미지 플래싱](/hardware/deployment/flash-image)을 참조하십시오.
:::

`sima-cli bootimg`와 함께 `--netboot` 옵션을 사용합니다. 그러면 대상 보드에 대한 부트 이미지를 다운로드하고 호스트에 내장된 TFTP 서버에서 해당 이미지를 제공합니다. 그런 다음 U-Boot에서 DevKit을 구성하여 해당 TFTP 서버에서 부팅하고 새 이미지를 eMMC에 플래싱합니다.
`sima-cli bootimg`와 함께 `--netboot` 옵션을 사용합니다. 그러면 대상 보드에 대한 부트 이미지를 다운로드하고 호스트에 내장된 TFTP 서버에서 해당 이미지를 제공합니다. DevKit은 이 TFTP 서버에서 부팅하고, `sima-cli`가 새 이미지를 eMMC에 플래싱합니다.

실행 방법은 두 가지입니다.

- **자동.** DevKit이 Linux로 부팅되고 호스트에서 SSH로 접속할 수 있으면, 명령 하나로 네트워크 부팅 설정, DevKit 재부팅, eMMC 플래싱까지 진행됩니다. 시리얼 콘솔은 필요하지 않습니다. [자동 네트워크 부팅 및 플래싱](#automatic)을 참조하세요.
- **수동.** DevKit이 Linux로 부팅되지 않거나 호스트에서 SSH로 접속할 수 없으면, 시리얼 콘솔을 통해 U-Boot에서 네트워크 부팅을 설정합니다. 1단계부터 4단계까지 따르세요.

## 자동 네트워크 부팅 및 플래싱 {#automatic}

`sima-cli` 2.1.17 이상이 필요합니다. 설치된 버전은 `sima-cli --version`으로 확인합니다.

1. **DevKit의 이더넷 포트**를 호스트에 직접 또는 스위치를 통해 연결합니다. 호스트에서 DevKit의 현재 IP 주소에 접근할 수 있는지 확인합니다(예: `ping 192.168.1.20`).

2. `--devkit`과 `--autoflash`를 지정해 `sima-cli bootimg`를 실행합니다. `<version>`은 대상 SDK 버전(예: `%platform_version%`)으로, `<devkit-ip>`는 DevKit의 현재 IP 주소로 바꿉니다.

**macOS:**

```console
sima-user@sima-user-machine:~$ sima-cli bootimg -v <version> --netboot --devkit <devkit-ip> --autoflash
```

**Linux:** TFTP 서버는 권한이 필요한 포트 69에 바인딩되므로 `sudo`가 필요합니다.

```console
sima-user@sima-user-machine:~$ sudo ~/.sima-cli/.venv/bin/sima-cli bootimg -v <version> --netboot --devkit <devkit-ip> --autoflash
```

이 명령은 기본적으로 Modalix DevKit에 eLxr를 설치합니다. Yocto를 설치하려면 `--fwtype yocto`를 추가합니다. `--devkit`을 생략하면 `sima-cli`가 네트워크에서 DevKit을 찾아 어느 것을 사용할지 묻습니다.

3. `sima-cli`는 SSH로 DevKit에 접속하고, 사용할 네트워크 설정을 표시합니다. 설정을 확인한 뒤 승인합니다. 그러면 `sima-cli`는 다음을 수행합니다.

1. DevKit의 U-Boot 환경을 저장하고, 호스트의 TFTP 서버에서 부팅하도록 설정합니다.
2. DevKit을 재부팅합니다. 실행 중인 애플리케이션은 중단됩니다.
3. DevKit이 네트워크에서 부팅되고 SSH를 사용할 수 있을 때까지 기다립니다.
4. 이미지를 eMMC에 기록합니다.

이 과정은 몇 분이 걸립니다. 명령을 계속 실행 상태로 두세요. 부팅 과정은 시리얼 콘솔로 볼 수 있지만, 꼭 그럴 필요는 없습니다.

4. `sima-cli`가 `✅ Flash completed`를 출력하면 `netboot>` 프롬프트에서 `q`를 입력합니다. `sima-cli`는 저장해 둔 U-Boot 환경을 DevKit에 다시 기록하여 DevKit이 다시 eMMC에서 부팅되도록 합니다.

5. DevKit의 전원을 껐다 켭니다. eMMC에서 대상 버전으로 부팅됩니다.

`sima-cli`가 SSH로 DevKit에 접속할 수 없거나 U-Boot 환경을 안전하게 변경할 수 없으면, DevKit을 변경하거나 재부팅하지 않습니다. TFTP 서버는 계속 실행되며, 입력할 U-Boot 명령을 출력할 수도 있습니다. [수동 네트워크 부팅 및 플래싱](#manual)의 3단계처럼 시리얼 콘솔에서 네트워크 부팅을 설정한 다음, 4단계처럼 `f`를 입력합니다.

## 수동 네트워크 부팅 및 플래싱 {#manual}

<details open>
<summary><strong>1단계: 물리적 설정</strong></summary>
Expand Down Expand Up @@ -127,12 +171,14 @@ sima:~$ setenv serverip 10.0.0.10; setenv ipaddr 10.0.0.1; saveenv; boot
</details>

<details open>
<summary> 4단계: eMMC를 플래싱합니다. <strong> </strong> </summary>
<summary><strong>4단계: eMMC를 플래싱합니다</strong></summary>

호스트의 `--netboot` 셸은 두 가지 명령을 지원합니다.
호스트의 `--netboot` 셸은 다음 명령을 지원합니다.

- `c` — 연결된 모든 클라이언트와 현재 해당 클라이언트에서 실행 중인 펌웨어 버전을 표시합니다.
- `d` — 네트워크에서 DevKit을 찾습니다.
- `f` — 선택한 클라이언트의 eMMC를 플래싱합니다.
- `q` — 세션을 종료하고 TFTP 서버를 중지합니다.

DevKit이 네트워크 부팅을 완료할 때까지 기다립니다. 이 과정은 몇 분 정도 걸릴 수 있습니다. 시리얼 콘솔에 로그인 프롬프트가 표시되면 보드가 준비된 것입니다. 전체 부팅 과정을 관찰하기 위해 시리얼 콘솔을 계속 연결해 두는 것이 좋습니다.

Expand Down
Loading