以前のリビジョンの文書です
初期設定
SSH有効化
[RASPI-CONFIG]→[5 Interfacing Options]→[P2 SSH]→[YES]
参考) http://eagle0wl.hatenadiary.jp/entry/2016/09/06/225219
最初の設定
ユーザ設定
$ sudo su - # passwd pi # passwd root # update-alternatives --config editor # useradd -m -s /bin/bash -g users USER # passwd USER # visudo pi ALL=(ALL) ALL rpi ALL=(ALL) ALL ====SSH root ログインの制限==== # vi /etc/ssh/sshd_config #PermitRootLogin yes PermitRootLogin no ====ネットワーク設定==== <code> # vi /etc/resolv.conf # vi /etc/network/interfaces allow-hotplug wlan0 iface wlan0 inet manual wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf # vi /etc/wpa_supplicant/wpa_supplicant.conf # update-rc.d dphys-swapfile remove
bash設定
- bashrc
export PATH=~/bin:${PATH} # Language configuration case $TERM in xterm*) export LANG="ja_JP.UTF-8" ;; *) export LANG="en_GB.UTF-8" ;; esac if [ -e /boot/nofsprotect ] then echo "[fsprotect: writable]" PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;31m\][writable]\[\033[00m\] :\[\033[01;34m\]\w \$\[\033[00m\] ' else echo "[fsprotect: protected]" PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\] \[\033[01;30m\][protected]\[\033[00m\] :\[\033[01;34m\]\w \$\[\033[00m\] ' fi
- bash_aliases
alias lsa="\ls -lsAF --color=auto" alias ls="\ls -lsF --color=auto" alias l="\ls -lsFC --color=auto" alias v="\less" alias g="\grep" alias c='clear'
rc.local有効化
# raspi-config
[Boot Options]→[Wait for Network at Boot] →[Yes]
overlayfs
スクリプト
・celeanlog
・maintenance_reboot
config.txt
dtparam=i2c_arm=on,spi=on
dtoverlay=pitft28-resistive,rotate=90,speed=48000000,fps=30
fbcp
https://github.com/howardqiao/zpod
# wget https://github.com/howardqiao/zpod/raw/master/zpod_res/fbcp
# chmod a+x fbcp
# cp /usr/local/bin
#vi /etc/rc.local
/usr/local/bin/fbcp&
HDMI設定
# vi /boot/config.txt
#disable_overscan=1 hdmi_force_hotplug=1 framebuffer_width=320 framebuffer_height=240 hdmi_drive=2
# vi /opt/retropie/configs/all/emulationstation/es_input.cfg
- es_input.cfg
<?xml version="1.0"?> <inputList> <inputAction type="onfinish"> <command>/opt/retropie/supplementary/emulationstation/scripts/inputconfiguration.sh</command> </inputAction> <inputConfig type="keyboard" deviceName="Keyboard" deviceGUID="-1"> <input name="start" type="key" id="122" value="1"/> <input name="up" type="key" id="1073741906" value="1"/> <input name="a" type="key" id="106" value="1"/> <input name="b" type="key" id="107" value="1"/> <input name="down" type="key" id="1073741905" value="1"/> <input name="right" type="key" id="1073741903" value="1"/> <input name="x" type="key" id="117" value="1"/> <input name="select" type="key" id="120" value="1"/> <input name="y" type="key" id="105" value="1"/> <input name="left" type="key" id="1073741904" value="1"/> </inputConfig> <inputConfig type="joystick" deviceName="USB Gamepad " deviceGUID="03000000790000001100000010010000"> <input name="pageup" type="button" id="4" value="1"/> <input name="start" type="button" id="7" value="1"/> <input name="up" type="axis" id="1" value="-1"/> <input name="a" type="button" id="3" value="1"/> <input name="b" type="button" id="2" value="1"/> <input name="down" type="axis" id="1" value="1"/> <input name="pagedown" type="button" id="5" value="1"/> <input name="right" type="axis" id="0" value="1"/> <input name="x" type="button" id="1" value="1"/> <input name="select" type="button" id="6" value="1"/> <input name="y" type="button" id="0" value="1"/> <input name="left" type="axis" id="0" value="-1"/> </inputConfig> <inputConfig type="joystick" deviceName="HORI CO.,LTD HORI PAD 3 TURBO" deviceGUID="030000000d0f00000900000011010000"> <input name="pageup" type="button" id="4" value="1"/> <input name="start" type="button" id="9" value="1"/> <input name="up" type="hat" id="0" value="1"/> <input name="a" type="button" id="2" value="1"/> <input name="b" type="button" id="1" value="1"/> <input name="down" type="hat" id="0" value="4"/> <input name="pagedown" type="button" id="5" value="1"/> <input name="right" type="hat" id="0" value="2"/> <input name="x" type="button" id="3" value="1"/> <input name="select" type="button" id="8" value="1"/> <input name="y" type="button" id="0" value="1"/> <input name="left" type="hat" id="0" value="8"/> </inputConfig> </inputList>
コントローラBー=J・コントローラA=Kにするならば次の様に設定
- es_input.cfg
<input name="a" type="key" id="13" value="1"/> <input name="b" type="key" id="27" value="1"/>