とりあえずインストーラーを使って esp-idf をインストールする。すると以下の環境ができるはず
"idf.toolsPath": "${env:IDF_TOOLS_PATH}"上記を追記して、configure extension を実行すると、インストール済みの esp-idf を選択して環境構築できる
$ sudo apt update $ sudo apt upgrade
[/etc/apt/apt.conf.d/20auto-upgrades] APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0";
[/etc/apt/apt.conf.d/50unattended-upgrades] // "${distro_id}:${distro_codename}"; // "${distro_id}:${distro_codename}-security"; // "${distro_id}ESMApps:${distro_codename}-apps-security"; // "${distro_id}ESM:${distro_codename}-infra-security";
$ sudo swapoff -a
$ sudo apt install nodejs npm $ sudo npm install n -g $ sudo n lts $ sudo n 18.20.2 # v18最新 $ sudo apt purge nodejs npm
[/etc/apt/sources.list.d/ubuntu.sources] Types: deb deb-src # 2箇所書き換え
$ sudo apt build-dep ffmpeg $ git clone https://github.com/FFmpeg/FFmpeg -b n6.1.1 $ sudo apt install libfdk-aac-dev libnuma-dev $ ./configure --prefix=/usr/local/ffmpeg --pkg-config-flags="--static" --bindir=/usr/local/bin --disable-debug --enable-gpl --enable-nonfree --arch=aarch64 --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libwebp --enable-libdrm $ make -j4 $ sudo make install
$ sudo apt install samba $ sudo pdbedit -a ユーザー名 # ユーザーとパスワードの設定 $ sudo mkdir /share $ sudo chmod 0777 /share
$ sudo nano /etc/samba/smb.conf
[global] dos charset = CP932 unix charset = UTF-8
interfaces = 192.168.1.0/24 eth0 bind interfaces only = yes map to guest = Bad User
[share] path = /share writable = yes guest ok = yes guest only = yes create mode = 0777 directory mode = 0777
$ testparm $ sudo systemctl restart smbd nmbd $ sudo systemctl enable smbd nmbd
$ hostnamectl set-hostname ホスト名
$ sudo npm install arib-b25-stream-test -g $ sudo apt install libpcsclite1 pcscd pcsc-tools
$ wget http://plex-net.co.jp/plex/px-s1ud/PX-S1UD_driver_Ver.1.0.1.zip $ unzip PX-S1UD_driver_Ver.1.0.1.zip $ sudo cp PX-S1UD_driver_Ver.1.0.1/x64/amd64/isdbt_rio.inp /lib/firmware/
$ sudo apt install dvb-tools
$ sudo npm install pm2 -g $ sudo pm2 install pm2-logrotate $ sudo npm install mirakurun -g --production $ sudo mirakurun init # to install as service
[Enable] adapter0 GR dvbv5-zap -a 0 -c ./config/dvbconf-for-isdb/conf/dvbv5_channels_isdbt.conf -r -P/dev/dvb/adapter0/dvr0 arib-b25-stream-test
$ curl -X PUT "http://127.0.0.1:40772/api/config/channels/scan?type=GR&setDisabledOnAdd=false&refresh=true"
$ sudo apt install mariadb-server $ sudo mysql_secure_installation 1. enter 2. n 3. n 4.- 全部 y
[/etc/mysql/mariadb.conf.d/50-server.cnf] character-set-server = utf8mb4 collation-server = utf8mb4_general_ci # このファイルを弄って expire_logs_days を設定してもいい。デフォルト 10
$ sudo mysql create database epgstation; grant all on epgstation.* to epgstation@localhost identified by 'epgstation'; SET GLOBAL expire_logs_days = 1; exit
$ git clone https://github.com/l3tnun/EPGStation $ cd EPGStation $ npm run all-install $ npm run build
$ cd config $ cp config.yml.template config.yml $ cp enc-enhance.js.template enc-enhance.js $ cp enc.js.template enc.js $ cp epgUpdaterLogConfig.sample.yml epgUpdaterLogConfig.yml $ cp operatorLogConfig.sample.yml operatorLogConfig.yml $ cp serviceLogConfig.sample.yml serviceLogConfig.yml
[config.yml] dbtype: mysql mysql: host: 127.0.0.1 # localhost だと駄目っぽい port: 3306 user: epgstation password: epgstation database: epgstation charset: utf8mb4 recordedFileExtension: .ts recorded: - name: recorded path: '/share/recorded' thumbnail: '/share/recorded/thumbnail'
[enc.js] const codec = 'h264_v4l2m2m'; // set bitrate for h264_v4l2m2m const videoBitrate = videoHeight > 720 ? '3000k' : '1500k'; Array.prototype.push.apply(args, ['-b:v', videoBitrate]);
$ sudo pm2 start dist/index.js --name "epgstation" $ sudo pm2 save
$ sudo apt install util-linux-extra
$ git clone https://github.com/util-linux/util-linux $ sudo apt install flex bison sqlite3 $ ./autogen.sh $ ./configure --disable-liblastlog2 # sqlite3 library って具体的に何だよ libsqlite3-0 とか入れてもエラーがでる
$ make rtcwake $ sudo cp rtcwake /usr/local/bin
$ sudo apt install linux-headers-raspi
$ sudo locale-gen ja_JP.UTF-8 $ sudo locale-gen en_US.UTF-8
$ lsusb -t # driver=uas を調べる /: Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/1p, 480M |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 004: Dev 003, If 0, Class=Hub, Driver=hub/4p, 480M |__ Port 002: Dev 007, If 0, Class=Chip/SmartCard, Driver=[none], 12M |__ Port 003: Dev 008, If 0, Class=Vendor Specific Class, Driver=smsusb, 480M |__ Port 004: Dev 009, If 0, Class=Vendor Specific Class, Driver=smsusb, 480M /: Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 5000M |__ Port 001: Dev 002, If 0, Class=Mass Storage, Driver=uas, 5000M /: Bus 003.Port 001: Dev 001, Class=root_hub, Driver=dwc2/1p, 480M $ lsusb # VID:PID を調べる Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub Bus 001 Device 003: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 001 Device 007: ID 04e6:5116 SCM Microsystems, Inc. SCR331-LC1 / SCR3310 SmartCard Reader Bus 001 Device 008: ID 3275:0080 VidzMedia Pte Ltd PX-S1UD Digital TV Tuner Bus 001 Device 009: ID 3275:0080 VidzMedia Pte Ltd PX-S1UD Digital TV Tuner Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 002: ID 174c:55aa ASMedia Technology Inc. ASM1051E SATA 6Gb/s bridge, ASM1053E SATA 6Gb/s bridge, ASM1153 SATA 3Gb/s bridge, ASM1153E SATA 6Gb/s bridge Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[/boot/firmware/cmdline.txt] usb-storage.quirks=174c:55aa:u console=serial0,115200 multipath=off dwc_otg.lpm_enable=0 console=tty1 root=LABEL=writable rootfstype=ext4 rootwait fixrtc