Toradex Verdin AM62 Dual で meta-slint を動かしてみた

# はじめに

この記事は [Slint Advent Calendar 2024](https://qiita.com/advent-calendar/2024/slint) ５日目の記事です。

昨日は @hermit4 さんによる [Pyside6(QML) vs Slint-Python(Slint)](https://qiita.com/hermit4/items/a73b18f82623748cd82a) という記事でした。

現時点での最新版での Slint 1.8 で対応がはじまった Python ですが、コードがシンプルでとてもいいですね。
QML との比較も一長一短でとても参考になります。

---

先月後半に [合同会社シグナルスロット](https://signal-slot.co.jp/) としてはじめて [EdgeTech+](https://www.jasa.or.jp/expo/) 2024 に参加するにあたり、[Toradex Japan 株式会社](https://www.toradex.com/ja-jp) から展示用のボードをお借りすることができました。今回はそのうちの１つで Qt6 のデモを動かした際の作業を記事にしました。


[Qt Advent Calendar 2024](https://qiita.com/advent-calendar/2024/qt) の３日目に書いた [Toradex Verdin AM62 Solo で meta-qt6 を動かしてみた](https://qiita.com/task_jp/items/bfc8594bf6eb022f05d8) の Slint 版です。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/85cacd3f-dbb0-a2b5-0d4e-044c7f143180.png)

# ハードウェア構成

- [Toradex Verdin AM62 Dual 1GB IT](https://www.toradex.com/ja-jp/computer-on-modules/verdin-arm-family/ti-am62)
  - **GPU あり**
  - ディスプレイは LVDS / **DSI** をサポート
- [Mallow Carrier Board](https://www.toradex.com/ja-jp/products/carrier-board/mallow-carrier-board)
- [Capacitive Touch Display 10.1” DSI](https://www.toradex.com/ja-jp/accessories/capacitive-touch-display-10.1-inch-dsi)

# デバイスの準備

Toradex Development Center の [Quickstart Guide](https://developer.toradex.com/quickstart-landing/) のデバイスを設定していきます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/4e3958aa-f857-660b-73af-18ddeff7490a.png)

## 配線

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/563dc9b3-ae44-d349-95df-9e0189084777.png)

### Verdin AM62 を Mallow にセットする

[Unboxing and Setup Cables - Mallow Carrier Board](https://developer.toradex.com/quickstart/bringup/unboxing-mallow/?module=verdin_am62&carrier=mallow&host=linux&os=torizon&learning_path=unbox_setup) に手順が書いてあります。

### ディスプレイを Mallow に接続する

[First Steps with Capacitive Touch Display 10.1 Inch DSI](https://developer.toradex.com/hardware/hardware-resources/peripherals/displays/first-steps-with-capacitive-touch-display-101-inch-dsi/) に手順が書いてあります。

# イメージのフラッシュの手順

## Toradex Easy Installer

[Download Toradex Easy Installer](https://developer.toradex.com/easy-installer/toradex-easy-installer/download-tezi/) から Version 6 の Verdin AM62 のものをダウンロードし、展開します。

ホストPCに dfu-util が必要です。
```console
// Gentoo Linux の場合
$ sudo emerge -avt dfu-util
```

## リカバリーモードにする

[NXP i.MX and TI AM62x Recovery Mode](https://developer.toradex.com/hardware/hardware-resources/recovery-mode/imx-ti-recovery-mode/?module=verdin_am62&carrier=mallow#start) に手順が書いてあります。

以下のピンをショートさせて、電源を入れます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/5a56ffef-9e20-778b-04d6-1080c16b7077.png)

## USB-C でホスト PC と接続する

以下のように認識されました。

```console
[2280653.562256] usb 7-2.3: new high-speed USB device number 15 using xhci_hcd
[2280653.654786] usb 7-2.3: New USB device found, idVendor=0451, idProduct=6165, bcdDevice= 2.00
[2280653.654799] usb 7-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[2280653.654804] usb 7-2.3: Product: AM62x DFU
[2280653.654808] usb 7-2.3: Manufacturer: Texas Instruments, Inc.
[2280653.654813] usb 7-2.3: SerialNumber: 01.00.00.00
```

## リカバリー

```console
$ ./recovery-linux.sh
Bus 007 Device 121: ID 0451:6165 Texas Instruments, Inc. AM62x DFU
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #1 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 512
Copying data from DFU device to PC
Upload  [=========================] 100%          200 bytes
Upload done.
Received a total of 200 bytes
dfu-util: can't detach
Resetting USB to switch back to Run-Time mode
Bus 007 Device 121: ID 0451:6165 Texas Instruments, Inc. AM62x DFU
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Waiting for device, exit with ctrl-C
Opening DFU capable USB device...
Device ID 0451:6165
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 512
Copying data from PC to DFU device
Download        [=========================] 100%       321922 bytes
Download done.
DFU state(6) = dfuMANIFEST-SYNC, status(0) = No error condition is present
dfu-util: unable to read DFU status after completion (LIBUSB_ERROR_IO)
Bus 007 Device 122: ID 1b67:4000 Toradex USB download gadget
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Waiting for device, exit with ctrl-C
Opening DFU capable USB device...
Device ID 1b67:4000
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download        [=========================] 100%      1036059 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode
Bus 007 Device 123: ID 1b67:4000 Toradex USB download gadget
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Waiting for device, exit with ctrl-C
Opening DFU capable USB device...
Device ID 1b67:4000
Device DFU version 0110
Claiming USB DFU Interface...
Setting Alternate Interface #1 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 0110
Device returned transfer size 4096
Copying data from PC to DFU device
Download        [=========================] 100%       985963 bytes
Download done.
DFU state(7) = dfuMANIFEST, status(0) = No error condition is present
DFU state(2) = dfuIDLE, status(0) = No error condition is present
Done!
Resetting USB to switch back to Run-Time mode
Downloading Toradex Easy Installer...
uuu (Universal Update Utility) for nxp imx chips -- libuuu_1.5.165-0-g7347a80

Success 1    Failure 0


7:21     8/ 8 [Done                                  ] FB: done
```

## USB デバイスの認識

リカバリー後はNICとして認識されます。

```console
[2280984.055215] usb 7-2.3: new high-speed USB device number 23 using xhci_hcd
[2280984.148231] usb 7-2.3: New USB device found, idVendor=1b67, idProduct=4049, bcdDevice= 0.01
[2280984.148243] usb 7-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[2280984.148248] usb 7-2.3: Product: 0073 Verdin AM62 Dual 1GB ET
[2280984.148253] usb 7-2.3: Manufacturer: Toradex
[2280984.148257] usb 7-2.3: SerialNumber: 15479088
[2280984.226483] cdc_ncm 7-2.3:1.0: MAC-Address: 32:ab:2b:da:f6:d3
[2280984.226829] cdc_ncm 7-2.3:1.0 eth1: register 'cdc_ncm' at usb-0000:22:00.3-2.3, CDC NCM (NO ZLP), 32:ab:2b:da:f6:d3
[2280984.254033] cdc_ncm 7-2.3:1.0 enp34s0f3u2u3: renamed from eth1
```

## VNC 接続をする

今回の SoM はデフォルトでは DSI 接続のディスプレイには対応しておらず、HDMI には非対応のため、ネットワーク経由で GUI を表示する必要があります。

[Tezi の詳細ドキュメント](https://developer.toradex.com/easy-installer/toradex-easy-installer/flashing-new-image-using-tezi/#display-the-gui) などを読むと、RDNIS は `192.168.11.1` が初期状態で割り当てられているようなので、対応する `enp34s0f3u2u3` を `192.168.11.2` などに設定し、VNC で実機にアクセスします。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/cb6dd0d7-092e-6978-b842-2667eadca437.png)

実機の有線LANを接続すると、インストール可能なイメージの一覧をインターネット経由で取得します。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/ed50ed68-eef4-707f-9fd6-939026993708.png)

イメージを格納した USB メモリを差し込むと、それが表示されるようになります。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/a3865628-3411-a12d-1a36-f62c5da1663b.png)

では、次にこのイメージを自分で作成していきましょう。

# OS のイメージの作成

なるべく最低限の環境からはじめたいので、Yocto を自分でビルドすることにします。

## 初期設定

Docker で Ubuntu 24.04 を起動し、初期設定を行います。
```console
$ docker run -it ubuntu:24.04 /bin/bash
root@fee456f40266:/# apt-get update
root@fee456f40266:/# DEBIAN_FRONTEND=noninteractive apt-get install -y build-essential chrpath cpio curl debianutils diffstat file gawk gcc-multilib git-core iproute2 iputils-ping language-pack-en liblz4-tool openssh-server pigz python3 python3-git python3-jinja2 python3-pexpect python3-pip rsync socat sudo texinfo tmux unzip vim wget xz-utils zstd
root@fee456f40266:/# update-locale LANG=en_US.UTF-8
```

24.04 の docker イメージには既に `ubuntu` ユーザーが存在するので、以降の作業はそのユーザーで行います。

```console
root@fee456f40266:/# su - ubuntu
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
```

## git のユーザーの設定

```console
ubuntu@fee456f40266:~$ git config --global user.email "[メールアドレス]"
ubuntu@fee456f40266:~$ git config --global user.name "[名前]"
```

## repo の取得

```console
ubuntu@fee456f40266:~$ curl https://storage.googleapis.com/git-repo-downloads/repo > repo
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 47141  100 47141    0     0   520k      0 --:--:-- --:--:-- --:--:--  523k
ubuntu@fee456f40266:~$ chmod +x repo
```

## Toradex の kirkstone を取得

```console
ubuntu@fee456f40266:~$ ~/repo init -u git://git.toradex.com/toradex-manifest.git -b kirkstone-6.x.y -m tdxref/default.xml
Downloading Repo source from https://gerrit.googlesource.com/git-repo
repo: Updating release signing keys to keyset ver 2.3

Your identity is: Tasuku Suzuki <tasuku.suzuki@signal-slot.co.jp>
If you want to change this, please re-run 'repo init' with --config-name

Testing colorized output (for 'repo diff', 'repo status'):
  black    red      green    yellow   blue     magenta   cyan     white
  bold     dim      ul       reverse
Enable color display in this user account (y/N)? y

repo has been initialized in /home/ubuntu
ubuntu@fee456f40266:~$ ~/repo sync
Fetching: 100% (16/16), done in 3m20.524s
Checking out:  93% (15/16), done in 0.398s
Checking out:   6% (1/16), done in 0.062s
repo sync has finished successfully.
ubuntu@fee456f40266:~$ ls layers/
meta-arm        meta-freescale-3rdparty  meta-openembedded  meta-security  meta-toradex-bsp-common  meta-toradex-distro  meta-toradex-ti  openembedded-core
meta-freescale  meta-freescale-distro    meta-qt5           meta-ti        meta-toradex-demos       meta-toradex-nxp     meta-yocto
```

## meta-slint を追加

Slint 公式の [meta-slint](https://github.com/slint-ui/meta-slint) を追加しましょう。
なお、この meta-slint は C++ から slint を扱うためのレイヤーで、Rust を利用する場合は [meta-rust](https://github.com/meta-rust/meta-rust) を利用するのがよいようです。
今回は meta-slint に含まれる slint のデモを動かしてみます。

meta-slint は [meta-rust-bin](https://github.com/rust-embedded/meta-rust-bin) に依存しているので、こちらも追加します。
また、デモが [meta-clang](https://github.com/kraj/meta-clang) に依存しているので、こちらも追加します。

```console
ubuntu@fee456f40266:~/layers$ git clone https://github.com/rust-embedded/meta-rust-bin.git layers/meta-rust-bin
Cloning into 'meta-rust-bin'...
remote: Enumerating objects: 1223, done.
remote: Counting objects: 100% (590/590), done.
remote: Compressing objects: 100% (171/171), done.
remote: Total 1223 (delta 448), reused 461 (delta 403), pack-reused 633 (from 1)
Receiving objects: 100% (1223/1223), 396.04 KiB | 6.29 MiB/s, done.
Resolving deltas: 100% (631/631), done.
ubuntu@fee456f40266:~/layers$ git clone https://github.com/slint-ui/meta-slint.git layers/meta-slint
Cloning into 'meta-slint'...
remote: Enumerating objects: 906, done.
remote: Counting objects: 100% (234/234), done.
remote: Compressing objects: 100% (118/118), done.
remote: Total 906 (delta 93), reused 209 (delta 80), pack-reused 672 (from 1)
Receiving objects: 100% (906/906), 113.33 KiB | 4.53 MiB/s, done.
Resolving deltas: 100% (424/424), done.
ubuntu@fee456f40266:~/layers$ git clone https://github.com/kraj/meta-clang.git --branch kirkstone
Cloning into 'meta-clang'...
remote: Enumerating objects: 11763, done.
remote: Counting objects: 100% (544/544), done.
remote: Compressing objects: 100% (325/325), done.
remote: Total 11763 (delta 314), reused 349 (delta 204), pack-reused 11219 (from 1)
Receiving objects: 100% (11763/11763), 2.45 MiB | 6.88 MiB/s, done.
Resolving deltas: 100% (7158/7158), done.
```

## am62 ディレクトリ以下にビルドの設定をする

```console
ubuntu@fee456f40266:~$ . layers/openembedded-core/oe-init-build-env am62
You had no conf/local.conf file. This configuration file has therefore been
created for you from /home/ubuntu/layers/openembedded-core/meta/conf/local.conf.sample
You may wish to edit it to, for example, select a different MACHINE (target
hardware). See conf/local.conf for more information as common configuration
options are commented.

You had no conf/bblayers.conf file. This configuration file has therefore been
created for you from /home/ubuntu/layers/openembedded-core/meta/conf/bblayers.conf.sample
To add additional metadata layers into your configuration please add entries
to conf/bblayers.conf.

The Yocto Project has extensive documentation about OE including a reference
manual which can be found at:
    https://docs.yoctoproject.org

For more information about OpenEmbedded see the website:
    https://www.openembedded.org/


### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-full-cmdline
    core-image-sato
    core-image-weston
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86-64'.

Other commonly useful commands are:
 - 'devtool' and 'recipetool' handle common recipe tasks
 - 'bitbake-layers' handles common layer tasks
 - 'oe-pkgdata-util' handles common target package tasks
```

### レイヤーの追加

```console
ubuntu@fee456f40266:~/am62$ bitbake-layers add-layer ../layers/meta-arm/meta-arm-toolchain/
NOTE: Starting bitbake server...
ubuntu@fee456f40266:~/am62$ bitbake-layers add-layer ../layers/meta-arm/meta-arm/
NOTE: Starting bitbake server...
ubuntu@fee456f40266:~/am62$ bitbake-layers add-layer ../layers/meta-ti/meta-ti-bsp/
NOTE: Starting bitbake server...
ubuntu@fee456f40266:~/am62$ bitbake-layers add-layer ../layers/meta-toradex-bsp-common/
NOTE: Starting bitbake server...
ubuntu@fee456f40266:~/am62$ bitbake-layers add-layer ../layers/meta-toradex-ti/
NOTE: Starting bitbake server...
ubuntu@fee456f40266:~/am62$ bitbake-layers add-layer ../layers/meta-openembedded/meta-oe/
NOTE: Starting bitbake server...
ubuntu@fee456f40266:~/am62$ bitbake-layers add-layer ../layers/meta-rust-bin/
NOTE: Starting bitbake server...
ubuntu@fee456f40266:~/am62$ bitbake-layers add-layer ../layers/meta-slint/
NOTE: Starting bitbake server...
ubuntu@fee456f40266:~/am62$ bitbake-layers add-layer ../layers/meta-clang/
NOTE: Starting bitbake server...
```

### ビルドの設定

```console
ubuntu@fee456f40266:~/am62$ vi conf/local.conf
```

ビルド対象の設定をします。

```text
MACHINE = "verdin-am62"
```

DSI のディスプレイを使えるようにデバイスツリーの設定をします。
[Device Tree Overlays on Toradex System on Modules](https://developer.toradex.com/software/linux-resources/device-tree/device-tree-overlays-on-toradex-soms/#verdin-am62) を参考にしました。

```text
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT:remove = " verdin-am62_dsi-to-hdmi_overlay.dtbo"
TEZI_EXTERNAL_KERNEL_DEVICETREE_BOOT:append = " verdin-am62_panel-cap-touch-10inch-dsi_overlay.dtbo"
```

それから、meta-slint の README に従って、以下の設定をします。

```text
PREFERRED_VERSION_slint-cpp = "1.8.0"
PREFERRED_VERSION_slint-cpp-native = "1.8.0"

PACKAGECONFIG:append:pn-slint-cpp = " backend-linuxkms renderer-skia "
PACKAGECONFIG:remove:pn-slint-cpp = " renderer-femtovg "

# TOOLCHAIN_HOST_TASK:append = " nativesdk-slint-cpp"
```

linuxkms で動作させるには egl が必要なので、以下の設定を追加します。

```text
DISTRO_FEATURES:append = " opengl"
```

slint のデモを追加します。

```text
IMAGE_INSTALL:append = " slint-demos"
```

ssh で入れるようにします。

```text
IMAGE_FEATURES:append = " ssh-server-openssh"
IMAGE_INSTALL:append = " openssh openssh-sftp-server"
IMAGE_INSTALL:append = " source-han-sans-jp-fonts"
```

## ビルド

```console
ubuntu@fee456f40266:~/am62$ bitbake core-image-base
Loading cache: 100% |########################################################################################################################################| Time: 0:00:00
Loaded 167 entries from dependency cache.
ERROR: /home/ubuntu/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.64.0.bb: Unsupported OS: eabi. Only Linux is supported.                      | ETA:  0:00:16
ERROR: /home/ubuntu/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.57.0.bb: Unsupported OS: eabi. Only Linux is supported.
ERROR: /home/ubuntu/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.66.1.bb: Unsupported OS: eabi. Only Linux is supported.
ERROR: /home/ubuntu/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.82.0.bb: Unsupported OS: eabi. Only Linux is supported.
ERROR: /home/ubuntu/layers/meta-slint/recipes-slint/slint/slint-cpp_1.3.0.bb: Unsupported OS: eabi. Only Linux is supported.                                 | ETA:  0:00:14
WARNING: /home/ubuntu/layers/meta-slint/recipes-slint/slint/slint-cpp_1.3.0.bb: Exception during build_dependencies for cmake_do_configure
WARNING: /home/ubuntu/layers/meta-slint/recipes-slint/slint/slint-cpp_1.3.0.bb: Error during finalise of mc:k3r5:/home/ubuntu/layers/meta-slint/recipes-slint/slint/slint-cpp_1.3.0.bb
ERROR: /home/ubuntu/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.59.0.bb: Unsupported OS: eabi. Only Linux is supported.                      | ETA:  0:00:15
ERROR: /home/ubuntu/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.67.1.bb: Unsupported OS: eabi. Only Linux is supported.
ERROR: /home/ubuntu/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.83.0.bb: Unsupported OS: eabi. Only Linux is supported.
ERROR: /home/ubuntu/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.77.0.bb: Unsupported OS: eabi. Only Linux is supported.
ERROR: Parsing halted due to errors, see error messages above                                                                                                | ETA:  0:00:16
ERROR: /home/ubuntu/layers/meta-rust-bin/recipes-devtools/rust/rust-bin-cross_1.75.0.bb: Unsupported OS: eabi. Only Linux is supported.

Summary: There were 2 WARNING messages.
Summary: There were 11 ERROR messages, returning a non-zero exit code.
```

というエラーが出ます。設定が悪いのか、コードが悪いのかは不明ですが、とりあえず os が 'linux' でないということはないので、os は 'linux' であることにして回避しました。

```console
ubuntu@fee456f40266:~/am62$ vi ../layers/meta-rust-bin/classes/rust_bin-common.bbclass
```

```text
    if not os == 'linux':
        os = 'linux'
        # bb.fatal("Unsupported OS: %s. Only Linux is supported." % os)
```

再度 bitbake をすることで、すべてが正常にビルドできました。

## インストールイメージのコピー

```console
ubuntu@fee456f40266:~/am62$ scp deploy-ti/images/verdin-am62/core-image-base-verdin-am62-20241204075709-Tezi.tar tasuku@172.17.0.1:/home/tasuku/Downloads/
(tasuku@172.17.0.1) Password:
core-image-base-verdin-am62-20241204075709-Tezi.tar                                                                                       100%   77MB 630.2MB/s   00:00
```

## USB メモリ上に展開し、ボードに差します

```console
$ tar xf ~/Downloads/core-image-base-verdin-am62-20241204075709-Tezi.tar -C /run/media/tasuku/usbmemory/ && sudo umount /run/media/tasuku/usbmemory/
```

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/758f8925-4266-214c-d163-f5f81baf9ab9.png)

一番上のエントリーが自分でビルドした Yocto のイメージなので、それをダブルクリックします。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/29b630a7-9d5e-3730-d1e7-51c578bfb732.png)

「Yes」をクリックします。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/0318f67a-086b-1b8b-4170-7042a4badabc.png)

インストールが終わると以下の画面に遷移します。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/ac522a2d-f886-c96e-20f7-07406f4bc8d8.png)

「Reboot」をクリックします。

# デモアプリの実行

実機に ssh で入ります。

```console
$ ssh root@verdin-am62.local
```

```console
root@verdin-am62:~# printerdemo
```

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/3616f631-986a-f671-110f-9f17f6fffb4c.png)

```console
root@verdin-am62:~# slide_puzzle
```

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/b63c3560-d468-0e8f-22bb-01d1f2766653.png)

```console
root@verdin-am62:~# gallery
```

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/85cacd3f-dbb0-a2b5-0d4e-044c7f143180.png)

```console
root@verdin-am62:~# energy-monitor
```

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/13867/a28b1a61-7469-eb91-a709-d32de0a6cab7.png)


# おわりに

今回は [Toradex Japan](https://www.toradex.com/ja-jp) さんにお借りした AM62 のボードで meta-slint をビルドし、Slint のデモアプリを実行してみました。

実際に自分で書いたのアプリを動かす場合はどうするのか気になりますね。

明日は @hermit4 さんによる [Slint言語入門(1) 概要](https://qiita.com/hermit4/items/81cd36d65f33178085e6) です。お楽しみに！