6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

はじめに

Nerves のファームウェア更新ツール fwup を、mise を使ってインストールした手順の記録です。

筆者の環境は Debian 系ですが、他の OS でも基本的な流れは同じです。

Installation

まず、fwup の公式ドキュメントでは mise(または asdf)を利用したインストール方法が案内されています。

If you're already using asdf or mise-en-place, install fwup via asdf-fwup. This will allow you to manage fwup versions in your software projects via .tool-versions files.

fwup README

asdf または mise-en-place を使用している場合は、asdf-fwup 経由で fwup をインストールできます。
.tool-versions ファイルを通じて、プロジェクト単位で fwup のバージョン管理が可能になります。

mise では .tool-versions により、プロジェクトごとに異なるバージョンを簡単に切り替えられます。

asdf-fwup プラグインについて

fwup 用の asdf / mise プラグインは asdf-fwup です。

This is the fwup plugin for the asdf and mise-en-place package managers.

asdf-fwup README

これは、asdf および mise-en-place 向けの fwup プラグインです。

mise は asdf のプラグインエコシステムをそのまま利用できます。

mise can use asdf's plugin ecosystem under the hood for backward compatibility.

mise plugins

mise は下位互換のために、asdf のプラグインエコシステムを内部的に利用できます。

そのため、asdf 用プラグインをそのまま mise で扱えます。

依存パッケージについて

各 OS に応じて必要な依存パッケージを事前にインストールしてください。

例として、Debian 系の場合の例は以下のとおりです。

sudo apt-get install autoconf pkg-config help2man libconfuse-dev libarchive-dev

macOS や他の OS を使用している場合は、README の「Dependencies」セクション
を参照してください。

mise 経由でのインストール

プラグインを追加して、fwup をインストールします。

mise plugin install fwup https://github.com/fwup-home/asdf-fwup.git
mise use --global fwup@latest

これで mise 管理下に fwup が導入され、グローバル環境で利用できるようになります。

動作確認

インストールが完了したら、バージョンを確認します。

fwup --version

mise ls

バージョンが表示されればインストール成功です。

補足:Nerves 1.12 での改善点

以前は、asdf や mise 経由でインストールした fwup を使用すると mix burn 実行時に権限エラーが発生することがあり、Nerves の Issue #1088 で報告されました。

その後、Nerves 1.12 で改良され、asdfでインストールしたfwupでも安全に mix burn できるようになりました 🎉

おわりに

fwup は Nerves プロジェクトでのファームウェア更新や SD カード書き込みに欠かせないツールです。
mise と組み合わせることで、プロジェクト単位のバージョン管理をシンプルに実現できます。
また、Nerves 1.12 以降では mise 経由の fwup も安全に利用可能になりました。

6
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?