付属のSDカードで起動した場合のSSH
user=pi, password=pi
32bit OSの模様。
$ uname -a
Linux NanoPi-NEO 4.14.52 #93 SMP Thu Jun 28 17:46:52 CST 2018 armv7l armv7l armv7l GNU/Linux
とりあえずいつもの
$ sudo apt update
$ sudo apt upgrade
尚、GLIBCのバージョンが低かったのでこのイメージで進めるのは辛い。
Armbianを新規インストール
下記サイトからNanopiNeo用のBusterをダウンロード。
balenaEtcherなどを使ってmicroSDに焼く。
ssh
root/1234でuserとしてログインし、いわれるがままにrootのパスワードとuserを作成。その後いろいろ聞かれるが、languageはen_US.UTF-8を、タイムゾーンはAsia/Japanで設定。終わったら一旦exit。
update/upgrade
作成したユーザーでログインしなおして、updateとupgrade。
$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade
ちょっとエラーが出たけど気にしないで進む。
E: The repository 'https://apt.armbian.com bullseye Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
N: Repository 'http://deb.debian.org/debian bullseye InRelease' changed its 'Version' value from '11.2' to '11.3'
gccやgitは既に入っていて、GLIBCのバージョンは2.31だった。
$ ldd --version
ldd (Debian GLIBC 2.31-13+deb11u2) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
WiFi内蔵ではない
WiFiを使うにはUSBのWiFiアダプタが必要。
JUCEの開発に必要なライブラリを入れる
$ sudo apt-get install clang freeglut3-dev g++ libasound2-dev libcurl4-openssl-dev libfreetype6-dev libjack-jackd2-dev libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev mesa-common-dev webkit2gtk-4.0-dev -y
デスクトップ環境をインストール
$ sudo apt install task-xfce-desktop
VNCサーバーも。
$ sudo apt install tightvncserver -y
内臓オーディオを有効にする
$ sudo armbian-config
で、System->Hardwareでanalog-codecを有効にする。複数のアプリから同時に鳴らしたい場合はPulse Audioも。
$ sudo apt install pulseaudio -y
GPIO
OLED Hatについてるボタンを使いたいのでGPIO…と思って探したらこちらがビンゴ。
$ git clone git clone https://github.com/wertyzp/WiringNP.git
$ cd WiringNP
$ chmod 755 build
$ sudo ./build
$ gpio readall
root権限でビルドする必要があった。