6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

DragonBoardにLinuxをインストールしてGPIOを動かすまで

Last updated at Posted at 2016-02-16

Linuxをインストール

サイトで配布されるディストリビューションは、UbuntuからDebianに変わったようです。

  • DragonBoardのサイトで配布されているDebianインストールイメージをダウンロードする
    DragonBoard™ 410c Downloads

  • micro SDカードに解凍したインストールイメージを書き込み(on Mac)
    MacにSDカードを挿して、アンマウント
    sudo diskutil unmountDisk /dev/disk2
    イメージをddコマンドで書き込み
    sudo dd if=db410c_sd_install_debian.img of=/dev/disk2 bs=4m

  • micro SDをDragonBoardに挿す

  • DragonBoardにキーボード/マウス/HDMIケーブルを挿す

  • DragonBoard裏のDIPスイッチを0-1-0-0に変更する

  • DragonBoardに電源を挿す

  • 書き込みを待つ

  • 書き込みが終わったらmicro SDを抜いて、DragonBoard裏のDIPスイッチを元に戻す(0-0-0-0)

  • DragonBoard再起動

Debian起動

起動してWifiを設定してみましたが、ぶちぶち切れて使い物になりませんでした。たまたまUSB有線LANアダプタ Logitec LAN-TXU2H3Aがあったので、これを挿して使います。これで安定してNetworkに接続できました。

Debianパッケージを追加

  • アップデート
sudo apt-get update
sudo apt-get upgrade

※updateのとき、Hash Sum mismatchと表示されてしまうことがあったので、apt-get update 時にHash Sum mismatch エラーが出力される場合の対処を参考にさせていただきました。

cd /var/lib/apt/
sudo mv lists lists.old
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get update
  • GPIOライブラリをコンパイルするためのtoolを追加

sudo apt-get install autoconf automake libtool

ライブラリのコンパイル

libsoc

git clone https://github.com/jackmitch/libsoc.git
cd libsoc
./autogen.sh
./configure --enable-board="dragonboard410c"
make
sudo make install

96BoardsGPIO

git clone https://github.com/96boards/96BoardsGPIO.git
cd 96BoardsGPIO
./autogen.sh
./configure
make
sudo make install
sudo ldconfig

LEDをつなぐ

DragonBoardのLow speed Expansion connectorにLEDと抵抗をつなぎます。

  • PIN1がGND
  • PIN23がGPIO-A

96BoardsGPIOのLチカサンプルを動かす

LEDが10回点滅します。

cd 96BoardsGPIO/examples
make
sudo ./blink
6
5
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
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?