http://inaba.hatenablog.com/entry/2016/12/13/023251を参考にして
SWAPが少なすぎるし かつ マイクロSDメモリでは これがこわれちゃうので
(マイクロSDメモリには システムがはいってる)
SWAPを本体から 分離する
cat /etc/rc.local
.
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
swapon /dev/sda2
service dphys-swapfile stop
exit 0
b)ラスビアンで ハイレゾ編
まず
# aptitude update
# aptitude upgrade
# rpi-update
をします
$ ls -l /lib/modules/4.9.37-v7+/kernel/sound/soc/bcm/
total 356
-rw-r--r-- 1 root root 7684 Jul 20 16:02 snd-soc-adau1977-adc.ko
-rw-r--r-- 1 root root 12528 Jul 20 16:02 snd-soc-allo-boss-dac.ko
-rw-r--r-- 1 root root 10720 Jul 20 16:02 snd-soc-allo-digione.ko
-rw-r--r-- 1 root root 8592 Jul 20 16:02 snd-soc-allo-piano-dac.ko
-rw-r--r-- 1 root root 19396 Jul 20 16:02 snd-soc-allo-piano-dac-plus.ko
-rw-r--r-- 1 root root 13248 Jul 20 16:02 snd-soc-audioinjector-octo-soundcard.ko
-rw-r--r-- 1 root root 10104 Jul 20 16:02 snd-soc-audioinjector-pi-soundcard.ko
-rw-r--r-- 1 root root 13468 Jul 20 16:02 snd-soc-bcm2835-i2s.ko
-rw-r--r-- 1 root root 16092 Jul 20 16:02 snd-soc-digidac1-soundcard.ko
-rw-r--r-- 1 root root 7872 Jul 20 16:02 snd-soc-dionaudio-loco.ko
-rw-r--r-- 1 root root 8704 Jul 20 16:02 snd-soc-dionaudio-loco-v2.ko
-rw-r--r-- 1 root root 8628 Jul 20 16:02 snd-soc-fe-pi-audio.ko
-rw-r--r-- 1 root root 9896 Jul 20 16:02 snd-soc-googlevoicehat-codec.ko
-rw-r--r-- 1 root root 8240 Jul 20 16:02 snd-soc-googlevoicehat-soundcard.ko
-rw-r--r-- 1 root root 7848 Jul 20 16:02 snd-soc-hifiberry-amp.ko
-rw-r--r-- 1 root root 8028 Jul 20 16:02 snd-soc-hifiberry-dac.ko
-rw-r--r-- 1 root root 11424 Jul 20 16:02 snd-soc-hifiberry-dacplus.ko
-rw-r--r-- 1 root root 11020 Jul 20 16:02 snd-soc-hifiberry-digi.ko
-rw-r--r-- 1 root root 11180 Jul 20 16:02 snd-soc-iqaudio-dac.ko
-rw-r--r-- 1 root root 10508 Jul 20 16:02 snd-soc-iqaudio-digi.ko
-rw-r--r-- 1 root root 9204 Jul 20 16:02 snd-soc-justboom-dac.ko
-rw-r--r-- 1 root root 9180 Jul 20 16:02 snd-soc-justboom-digi.ko
-rw-r--r-- 1 root root 26244 Jul 20 16:02 snd-soc-pisound.ko
-rw-r--r-- 1 root root 9528 Jul 20 16:02 snd-soc-raspidac3.ko
-rw-r--r-- 1 root root 23584 Jul 20 16:02 snd-soc-rpi-cirrus.ko
-rw-r--r-- 1 root root 7628 Jul 20 16:02 snd-soc-rpi-dac.ko
-rw-r--r-- 1 root root 8312 Jul 20 16:02 snd-soc-rpi-proto.ko
なので
/etc/modules
----------------------------------
i2c-dev
snd-soc-hifiberry-dacplus
ls -l /boot/overlays
total 269
-rwxr-xr-x 1 root root 1027 Jul 20 16:02 adau1977-adc.dtbo
-rwxr-xr-x 1 root root 1587 Jul 20 16:02 adau7002-simple.dtbo
-rwxr-xr-x 1 root root 2425 Jul 20 16:02 ads1015.dtbo
-rwxr-xr-x 1 root root 2425 Jul 20 16:02 ads1115.dtbo
-rwxr-xr-x 1 root root 2426 Jul 20 16:02 ads7846.dtbo
-rwxr-xr-x 1 root root 1387 Jul 20 16:02 akkordion-iqdacplus.dtbo
-rwxr-xr-x 1 root root 1473 Jul 20 16:02 allo-boss-dac-pcm512x-audio.dtbo
-rwxr-xr-x 1 root root 1208 Jul 20 16:02 allo-digione.dtbo
-rwxr-xr-x 1 root root 1011 Jul 20 16:02 allo-piano-dac-pcm512x-audio.dtbo
-rwxr-xr-x 1 root root 1585 Jul 20 16:02 allo-piano-dac-plus-pcm512x-audio.dtbo
-rwxr-xr-x 1 root root 1668 Jul 20 16:02 at86rf233.dtbo
-rwxr-xr-x 1 root root 1972 Jul 20 16:02 audioinjector-addons.dtbo
-rwxr-xr-x 1 root root 787 Jul 20 16:02 audioinjector-wm8731-audio.dtbo
-rwxr-xr-x 1 root root 575 Jul 20 16:02 audremap.dtbo
-rwxr-xr-x 1 root root 449 Jul 20 16:02 bmp085_i2c-sensor.dtbo
-rwxr-xr-x 1 root root 983 Jul 20 16:02 dht11.dtbo
-rwxr-xr-x 1 root root 663 Jul 20 16:02 dionaudio-loco.dtbo
-rwxr-xr-x 1 root root 1027 Jul 20 16:02 dionaudio-loco-v2.dtbo
-rwxr-xr-x 1 root root 765 Jul 20 16:02 dpi18.dtbo
-rwxr-xr-x 1 root root 789 Jul 20 16:02 dpi24.dtbo
-rwxr-xr-x 1 root root 852 Jul 20 16:02 dwc2.dtbo
-rwxr-xr-x 1 root root 423 Jul 20 16:02 dwc-otg.dtbo
-rwxr-xr-x 1 root root 1403 Jul 20 16:02 enc28j60.dtbo
-rwxr-xr-x 1 root root 1279 Jul 20 16:02 enc28j60-spi2.dtbo
-rwxr-xr-x 1 root root 1932 Jul 20 16:02 fe-pi-audio.dtbo
-rwxr-xr-x 1 root root 1437 Jul 20 16:02 goodix.dtbo
-rwxr-xr-x 1 root root 1259 Jul 20 16:02 googlevoicehat-soundcard.dtbo
-rwxr-xr-x 1 root root 1036 Jul 20 16:02 gpio-ir.dtbo
-rwxr-xr-x 1 root root 901 Jul 20 16:02 gpio-poweroff.dtbo
-rwxr-xr-x 1 root root 1250 Jul 20 16:02 gpio-shutdown.dtbo
-rwxr-xr-x 1 root root 779 Jul 20 16:02 hifiberry-amp.dtbo
-rwxr-xr-x 1 root root 655 Jul 20 16:02 hifiberry-dac.dtbo
-rwxr-xr-x 1 root root 1693 Jul 20 16:02 hifiberry-dacplus.dtbo
-rwxr-xr-x 1 root root 959 Jul 20 16:02 hifiberry-digi.dtbo
-rwxr-xr-x 1 root root 1125 Jul 20 16:02 hifiberry-digi-pro.dtbo
-rwxr-xr-x 1 root root 2468 Jul 20 16:02 hy28a.dtbo
-rwxr-xr-x 1 root root 2939 Jul 20 16:02 hy28b.dtbo
-rwxr-xr-x 1 root root 1182 Jul 20 16:02 i2c0-bcm2708.dtbo
-rwxr-xr-x 1 root root 854 Jul 20 16:02 i2c1-bcm2708.dtbo
-rwxr-xr-x 1 root root 270 Jul 20 16:02 i2c-bcm2708.dtbo
-rwxr-xr-x 1 root root 991 Jul 20 16:02 i2c-gpio.dtbo
-rwxr-xr-x 1 root root 2185 Jul 20 16:02 i2c-mux.dtbo
-rwxr-xr-x 1 root root 644 Jul 20 16:02 i2c-pwm-pca9685a.dtbo
-rwxr-xr-x 1 root root 3442 Jul 20 16:02 i2c-rtc.dtbo
-rwxr-xr-x 1 root root 4143 Jul 20 16:02 i2c-rtc-gpio.dtbo
-rwxr-xr-x 1 root root 2864 Jul 20 16:02 i2c-sensor.dtbo
-rwxr-xr-x 1 root root 343 Jul 20 16:02 i2s-gpio28-31.dtbo
-rwxr-xr-x 1 root root 1272 Jul 20 16:02 iqaudio-dac.dtbo
-rwxr-xr-x 1 root root 1511 Jul 20 16:02 iqaudio-dacplus.dtbo
-rwxr-xr-x 1 root root 1326 Jul 20 16:02 iqaudio-digi-wm8804-audio.dtbo
-rwxr-xr-x 1 root root 1276 Jul 20 16:02 justboom-dac.dtbo
-rwxr-xr-x 1 root root 955 Jul 20 16:02 justboom-digi.dtbo
-rwxr-xr-x 1 root root 1348 Jul 20 16:02 lirc-rpi.dtbo
-rwxr-xr-x 1 root root 1329 Jul 20 16:02 mcp23017.dtbo
-rwxr-xr-x 1 root root 15229 Jul 20 16:02 mcp23s17.dtbo
-rwxr-xr-x 1 root root 1833 Jul 20 16:02 mcp2515-can0.dtbo
-rwxr-xr-x 1 root root 1833 Jul 20 16:02 mcp2515-can1.dtbo
-rwxr-xr-x 1 root root 4237 Jul 20 16:02 mcp3008.dtbo
-rwxr-xr-x 1 root root 720 Jul 20 16:02 midi-uart0.dtbo
-rwxr-xr-x 1 root root 857 Jul 20 16:02 midi-uart1.dtbo
-rwxr-xr-x 1 root root 1099 Jul 20 16:02 mmc.dtbo
-rwxr-xr-x 1 root root 796 Jul 20 16:02 mpu6050.dtbo
-rwxr-xr-x 1 root root 2850 Jul 20 16:02 mz61581.dtbo
-rwxr-xr-x 1 root root 569 Jul 20 16:02 pi3-act-led.dtbo
-rwxr-xr-x 1 root root 818 Jul 20 16:02 pi3-disable-bt.dtbo
-rwxr-xr-x 1 root root 265 Jul 20 16:02 pi3-disable-wifi.dtbo
-rwxr-xr-x 1 root root 1105 Jul 20 16:02 pi3-miniuart-bt.dtbo
-rwxr-xr-x 1 root root 2617 Jul 20 16:02 piscreen2r.dtbo
-rwxr-xr-x 1 root root 2713 Jul 20 16:02 piscreen.dtbo
-rwxr-xr-x 1 root root 2454 Jul 20 16:02 pisound.dtbo
-rwxr-xr-x 1 root root 1544 Jul 20 16:02 pitft22.dtbo
-rwxr-xr-x 1 root root 2385 Jul 20 16:02 pitft28-capacitive.dtbo
-rwxr-xr-x 1 root root 2802 Jul 20 16:02 pitft28-resistive.dtbo
-rwxr-xr-x 1 root root 2802 Jul 20 16:02 pitft35-resistive.dtbo
-rwxr-xr-x 1 root root 1043 Jul 20 16:02 pps-gpio.dtbo
-rwxr-xr-x 1 root root 1057 Jul 20 16:02 pwm-2chan.dtbo
-rwxr-xr-x 1 root root 946 Jul 20 16:02 pwm.dtbo
-rwxr-xr-x 1 root root 1315 Jul 20 16:02 qca7000.dtbo
-rwxr-xr-x 1 root root 1301 Jul 20 16:02 raspidac3.dtbo
-rwxr-xr-x 1 root root 66511 Jul 20 16:02 README
-rwxr-xr-x 1 root root 1275 Jul 20 16:02 rotary-encoder.dtbo
-rwxr-xr-x 1 root root 489 Jul 20 16:02 rpi-backlight.dtbo
-rwxr-xr-x 1 root root 3406 Jul 20 16:02 rpi-cirrus-wm5102.dtbo
-rwxr-xr-x 1 root root 643 Jul 20 16:02 rpi-dac.dtbo
-rwxr-xr-x 1 root root 2524 Jul 20 16:02 rpi-display.dtbo
-rwxr-xr-x 1 root root 462 Jul 20 16:02 rpi-ft5406.dtbo
-rwxr-xr-x 1 root root 771 Jul 20 16:02 rpi-proto.dtbo
-rwxr-xr-x 1 root root 893 Jul 20 16:02 rpi-sense.dtbo
-rwxr-xr-x 1 root root 499 Jul 20 16:02 rpi-tv.dtbo
-rwxr-xr-x 1 root root 1298 Jul 20 16:02 rra-digidac1-wm8741-audio.dtbo
-rwxr-xr-x 1 root root 1174 Jul 20 16:02 sc16is750-i2c.dtbo
-rwxr-xr-x 1 root root 1875 Jul 20 16:02 sc16is752-spi1.dtbo
-rwxr-xr-x 1 root root 846 Jul 20 16:02 sdhost.dtbo
-rwxr-xr-x 1 root root 1078 Jul 20 16:02 sdio-1bit.dtbo
-rwxr-xr-x 1 root root 1116 Jul 20 16:02 sdio.dtbo
-rwxr-xr-x 1 root root 699 Jul 20 16:02 sdtweak.dtbo
-rwxr-xr-x 1 root root 376 Jul 20 16:02 smi-dev.dtbo
-rwxr-xr-x 1 root root 981 Jul 20 16:02 smi.dtbo
-rwxr-xr-x 1 root root 1508 Jul 20 16:02 smi-nand.dtbo
-rwxr-xr-x 1 root root 919 Jul 20 16:02 spi0-cs.dtbo
-rwxr-xr-x 1 root root 492 Jul 20 16:02 spi0-hw-cs.dtbo
-rwxr-xr-x 1 root root 1547 Jul 20 16:02 spi1-1cs.dtbo
-rwxr-xr-x 1 root root 1920 Jul 20 16:02 spi1-2cs.dtbo
-rwxr-xr-x 1 root root 2293 Jul 20 16:02 spi1-3cs.dtbo
-rwxr-xr-x 1 root root 1547 Jul 20 16:02 spi2-1cs.dtbo
-rwxr-xr-x 1 root root 1920 Jul 20 16:02 spi2-2cs.dtbo
-rwxr-xr-x 1 root root 2293 Jul 20 16:02 spi2-3cs.dtbo
-rwxr-xr-x 1 root root 666 Jul 20 16:02 spi-gpio35-39.dtbo
-rwxr-xr-x 1 root root 635 Jul 20 16:02 spi-rtc.dtbo
-rwxr-xr-x 1 root root 4878 Jul 20 16:02 tinylcd35.dtbo
-rwxr-xr-x 1 root root 980 Jul 20 16:02 uart1.dtbo
-rwxr-xr-x 1 root root 1412 Jul 20 16:02 vc4-fkms-v3d.dtbo
-rwxr-xr-x 1 root root 3108 Jul 20 16:02 vc4-kms-v3d.dtbo
-rwxr-xr-x 1 root root 758 Jul 20 16:02 vga666.dtbo
-rwxr-xr-x 1 root root 1116 Jul 20 16:02 w1-gpio.dtbo
-rwxr-xr-x 1 root root 1251 Jul 20 16:02 w1-gpio-pullup.dtbo
-rwxr-xr-x 1 root root 1080 Jul 20 16:02 wittypi.dtbo
なので
------------------------------------------
dtoverlay=hifiberry-dacplus
dtparam=audio=on
●あとはi2s-DACを常用にするために
メニューからPreferences > Audio Device Settingsを選びます。
デフォルトではSound card の欄にはbcm2835 ALSA(Alsa mixer)しか出ていませんが、HypaerberryなんたらDAC(Alsa mixer)が選べます。
Hypaerberryなんたら(Alsa mixer)を選び、Select Contorolsをクリックすると、Hypaerberryなんたらの機能が出るので、Analogueにチェックしました。
DSP Proguramをチェックすると、内部のフィルタなどの制御ができます。
DSP Proguramをチェックすると、内部のフィルタなどの制御ができます。
この設定をデフォルトにするため、Make Defaultをクリックします。
OKを押します。
これ以降、HDMIではなくi2s-DACボードから音が出ます。
1)日本語環境
素描だけ
pi の パスワードは raspberry
sudo su で root権限になれる
pi の パスワードは raspberry
sudo su で root権限になれる
aptitude search ipa | grep gothic ー>fonts-ipafont-gothic
aptitude install fcitx-mozc im-config zenity
dpkg-revonfigure locales
nano /etc/defaults/keyboard
2)wifi access point をつくる
ただ 英語の
https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/
のとおり
最終のスクリプトは
./wifi-accessPoint.batsh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
service hostapd start
service dnsmasq start
aptitude install hostapd dnsmasq
/etc/dhcpcd.conf
hostname
clientid
persistent
option rapid_commit
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
option ntp_servers
require dhcp_server_identifier
slaac private
nohook lookup-hostname
denyinterfaces wlan0
/etc/network/interfaces
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet static
address 172.24.1.1
netmask 255.255.255.0
network 172.24.1.0
broadcast 172.24.1.255
/etc/dnsmasq.conf
interface=wlan0 # Use interface wlan0
listen-address=172.24.1.1 # Explicitly specify the address to listen on
bind-interfaces # Bind to the interface to make sure we aren't sending things elsewhere
server=8.8.8.8 # Forward DNS requests to Google DNS
domain-needed # Don't forward short names
bogus-priv
dhcp-range=172.24.1.50,172.24.1.55,12h
nginxの change rootは ー> /var/www/html/
/etc/nginx/nginx.conf
user www-data;
worker_processes 4;
pid /run/nginx.pid;
events {
worker_connections 768;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
auth_basic "Restricted";
auth_basic_user_file /usr/share/nginx/.htpasswd;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
./comment-out.bat /var/www/html/test/pre.bat
for x in ` ls *.mp4 `
do
echo "<a href=$x > $x </a> </p> </p>"
done
0 件のコメント:
コメントを投稿