LCDをコンソールにする
Core MP135には、LCDモニターが搭載されています。
画面の解像度が240x320なので狭いですが、モニターなど接続せずに利用できるので便利な用途もあるかもしれません。
方法を紹介します。
切り替え方法
通常通りNervesのプロジェクトを作成し、mix deps.get
を実行します。
deps/core_mp135
ディレクトリにあるfwup.conf
とextlinux.conf
をconfig
ディレクトリにコピーします。
$ cp deps/core_mp135/fwup.conf config
$ cp deps/core_mp135/extlinux.conf config
次の3か所を修正します。
config/fwup.conf
}
file-resource extlinux.conf {
- host-path = "${NERVES_SYSTEM}/images/extlinux.conf"
+ host-path = "${NERVES_APP}/config/extlinux.conf"
}
config/extlinux.conf
label stm32mp135f-coremp135-buildroot
kernel zImage
devicetree stm32mp135f-coremp135.dtb
- append root=/dev/mmcblk0p5 rootwait console=tty1 console=ttySTM0,115200n8 quiet
+ append root=/dev/mmcblk0p5 rootwait fbcon=map:10 console=tty1 console=ttySTM0,115200n8 quiet
config/config.exs
# Customize non-Elixir parts of the firmware. See
# https://hexdocs.pm/nerves/advanced-configuration.html for details.
-config :nerves, :firmware, rootfs_overlay: "rootfs_overlay"
+config :nerves, :firmware, rootfs_overlay: "rootfs_overlay", fwup_conf: "config/fwup.conf"
# Set the SOURCE_DATE_EPOCH date for reproducible builds.
# See https://reproducible-builds.org/docs/source-date-epoch/ for more information
これでファームを作成すると、LCDにiexのコンソールが表示されます。
Core MP135用のNerves