
ffmpegの調子が悪かったのでTV BOXをアップグレードしようとしたところamlogicのLibreELECは開発中止になっていました。そこで調べたところCoreELEC 8.95.2(9/19/2018現在)があったのでアップグレードしました。
Libreelecと互換性があるので設定を開いてバックアップを取ります。(あとでリストアします)
つぎにダウンロードしたファイル(CoreELEC-S905.arm-{ver}.img.gz)をgunzipで解凍します。
そのファイルをマイクロSDかUSBディスクに書き込みます。
dd if=CoreELEC-S905.arm-{ver}.img of=/dev/sdx bs=1M
または
gunzip -c CoreELEC-S905.arm-{ver}.img.gz | dd of=/dev/sdx bs=1M
コピーが終わったらディスクにマウントしてシステム領域を開きます。そのなかのdevice_treesの中から適当なdtbをとってその下のディレクトリに移しdtb.imgとリネームします。
TX3Proの場合:
mv gxl_p212_1g.dtb dtb.img
TV Boxに接続してブートします。もし本体にコピーする場合はinstalltointernalを実行して、デュアルブートの場合はそのまま実行します。
つぎにリストアををします。このとき古いアドオンは自動的にアップグレードしてくれます。
Embyを使ってる場合は一部パスに不具合があるのでターミナルから次のように修正します。
Note: CoreELEC-9.2.0は修正済み
cd /storage/.kodi/addons/tools.dotnet-runtime/bin
ln -s dotnet-runtime-{ver}/* .
つぎにリモコンに設定に入ります。仕様が大きく変更になったのでスクラッチから始めます。
Kodiを停止します。
systemctl stop kodi
systemctl stop eventlircd
ir-keytableコマンドでデバイスを調べます。
Found /sys/class/rc/rc0/ (/dev/input/event3) with:
Driver: meson-ir, table: rc-empty
lirc device: /dev/lirc0
Supported protocols: lirc rc-5 jvc sony nec sanyo mce_kbd rc-6
Enabled protocols: lirc rc-5 jvc sony nec sanyo mce_kbd rc-6
Name: meson-ir
bus: 25, vendor/product: 0000:0000, version: 0x0000
Repeat delay = 500 ms, repeat period = 125 m
Enabled protocolsで使えるプロトコルを調べます。TX3Proの場合、ir-keytable -p nec -tとコマンド打ち、リモコンのキーを押して調べます。
Protocols changed to nec
Testing events. Please, press CTRL-C to abort.
2566.063076: event type EV_MSC(0x04): scancode = 0x800d
2566.063076: event type EV_KEY(0x01) key_down: KEY_ENTER(0x001c)
ボタン名の一覧を表示して調べます。
irrecord -l
リモコンの設定ファイルを完成させたら/storage/.config/rc_keymapsにコピーします。また/storage/.config/rc_maps.cfgを次のように変更します。
/storage/.config/rc_maps.cfg:TX3Proの場合
meson-ir * tx3pro
Kodiをスタートします。
systemctl start eventlircd
systemctl start kodi
参考:TR3PRO
/storage/.config/rc_keymaps/tx3pro
0x8030 KEY_0
0x8031 KEY_1
0x8032 KEY_2
0x8033 KEY_3
0x8034 KEY_4
0x8035 KEY_5
0x8036 KEY_6
0x8037 KEY_7
0x8038 KEY_8
0x8039 KEY_9
0x8058 KEY_DOT
0x8044 KEY_BACKSPACE
0x800d KEY_ENTER
0x8026 KEY_UP
0x8028 KEY_DOWN
0x8025 KEY_LEFT
0x8027 KEY_RIGHT
0x804e KEY_VOLUMEUP
0x8056 KEY_VOLUMEDOWN
0x80bb KEY_NEXT
0x80bd KEY_PREVIOUS
0x8054 KEY_INFO
0x8049 KEY_MENU
0x8053 KEY_HOME # home
#0x8052 KEY_CONTEXT_MENU # mouse
0x8052 KEY_PLAYPAUSE # mouse
0x801b KEY_BACK # back
0x8051 KEY_POWER
0x804d KEY_MUTE
空のファイルを作ります。
touch /storage/.config/udev.rules.d/98-eventlircd.rules
/storage/.kodi/userdata/Lircmap.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file contains the mapping of LIRC keys to XBMC keys used in Keymap.xml -->
<!-- -->
<!-- How to add remotes -->
<!-- <remote device="name_Lirc_calls_the_remote"> -->
<!-- -->
<!-- For the commands the layout following layout is used -->
<!-- <XBMC_COMMAND>LircButtonName</XBMC_COMMAND> -->
<!-- -->
<!-- For a list of XBMC_COMMAND's check out the <remote> sections of keymap.xml -->
<lircmap>
<remote>
<left>KEY_LEFT</left>
<right>KEY_RIGHT</right>
<up>KEY_UP</up>
<down>KEY_DOWN</down>
<select>KEY_ENTER</select>
<backspace>KEY_BACKSPACE</backspace>
<escape>KEY_ESC</escape>
<play>KEY_PLAYPAUSE</play>
<forward>KEY_FASTFORWARD</forward>
<reverse>KEY_REWIND</reverse>
<volumeplus>KEY_VOLUMEUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
<epg>KEY_EPG</epg>
<home>KEY_HOME</home>
<config>KEY_CONFIG</config>
<power>KEY_POWER</power>
<menu>KEY_MENU</menu>
<one>KEY_1</one>
<two>KEY_2</two>
<three>KEY_3</three>
<four>KEY_4</four>
<five>KEY_5</five>
<six>KEY_6</six>
<seven>KEY_7</seven>
<eight>KEY_8</eight>
<nine>KEY_9</nine>
<zero>KEY_0</zero>
</remote>
</lircmap>
/storage/.kodi/userdata/keymaps/keymaps.xml
<!-- <?xml version="1.0" encoding="UTF-8"?> -->
<!-- This file contains the mapping of keyboard keys to actions within Kodi. -->
<!-- -->
<!-- The format is: -->
<!-- <window> -->
<!-- <device> -->
<!-- <button>action</button> -->
<!-- </device> -->
<!-- </window> -->
<!-- -->
<!-- The <global> section is a fall through - they will only be used if the button is -->
<!-- not used in the current window's section. -->
<!-- -->
<!-- Actions can be built-in functions. -->
<!-- eg <B>ActivateWindow(Music)</B> -->
<!-- would automatically go to Music on the press of the B button. -->
<!-- -->
<!-- An empty action removes the corresponding mapping from default and parent keymaps. -->
<!-- This is different from a "noop" action, which disables a button. -->
<!-- -->
<!-- More documentation on keymaps can be found on http://kodi.wiki/view/keymaps -->
<keymap>
<global>
<keyboard>
<power mod="longpress">ShutDown()</power>
<power>ActivateWindow(ShutdownMenu)</power>
<home>ActivateWindow(Home)</home>
<home mod="longpress">PlayerProcessInfo</home>
</keyboard>
</global>
<VirtualKeyboard>
<keyboard>
<backspace>Backspace</backspace>
</keyboard>
</VirtualKeyboard>
<PlayerProcessInfo>
<keyboard>
<home>Back</home>
</keyboard>
</PlayerProcessInfo>
</keymap>
TX3Proの現時点での問題点
- Wi-Fiドライバ(9082xs.ko)がないため使えない
参考:A95X
/storage/.config/rc_keymaps/a95x
0xdf0c KEY_0
0xdf54 KEY_1
0xdf16 KEY_2
0xdf15 KEY_3
0xdf50 KEY_4
0xdf12 KEY_5
0xdf11 KEY_6
0xdf4c KEY_7
0xdf0e KEY_8
0xdf0d KEY_9
0xdf41 KEY_DOT
0xdf10 KEY_BACKSPACE
0xdf06 KEY_ENTER
0xdf1a KEY_UP
0xdf48 KEY_DOWN
0xdf47 KEY_LEFT
0xdf07 KEY_RIGHT
0xdf18 KEY_MENU
0xdf0a KEY_BACK
0xdf5d KEY_VOLUMEUP
0xdf5c KEY_VOLUMEDOWN
0xdf4f KEY_NEXT
0xdf4b KEY_PREVIOUS
0xdf5f KEY_INFO
0xdf01 KEY_EPG
0xdf1c KEY_POWER
0xdff1 KEY_MUTE
0xdf42 KEY_HOME # home
0xdf41 KEY_FAVORITE # planet
#0xdf03 KEY_CONTEXT_MENU # mouse
0xdf03 KEY_PLAYPAUSE
空のファイルを作ります。
touch /storage/.config/udev.rules.d/98-eventlircd.rules
/storage/.kodi/userdata/Lircmap.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file contains the mapping of LIRC keys to XBMC keys used in Keymap.xml -->
<!-- -->
<!-- How to add remotes -->
<!-- <remote device="name_Lirc_calls_the_remote"> -->
<!-- -->
<!-- For the commands the layout following layout is used -->
<!-- <XBMC_COMMAND>LircButtonName</XBMC_COMMAND> -->
<!-- -->
<!-- For a list of XBMC_COMMAND's check out the <remote> sections of keymap.xml -->
<lircmap>
<remote>
<left>KEY_LEFT</left>
<right>KEY_RIGHT</right>
<up>KEY_UP</up>
<down>KEY_DOWN</down>
<select>KEY_ENTER</select>
<backspace>KEY_BACKSPACE</backspace>
<escape>KEY_ESC</escape>
<play>KEY_PLAYPAUSE</play>
<forward>KEY_FASTFORWARD</forward>
<reverse>KEY_REWIND</reverse>
<volumeplus>KEY_VOLUMEUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
<epg>KEY_EPG</epg>
<home>KEY_HOME</home>
<config>KEY_CONFIG</config>
<power>KEY_POWER</power>
<menu>KEY_MENU</menu>
<one>KEY_1</one>
<two>KEY_2</two>
<three>KEY_3</three>
<four>KEY_4</four>
<five>KEY_5</five>
<six>KEY_6</six>
<seven>KEY_7</seven>
<eight>KEY_8</eight>
<nine>KEY_9</nine>
<zero>KEY_0</zero>
<red>KEY_RED</red>
<green>KEY_GREEN</green>
<yellow>KEY_YELLOW</yellow>
<blue>KEY_BLUE</blue>
<favorites>KEY_FAVORITES</favorites>
</remote>
</lircmap>
/storage/.kodi/userdata/keymaps/keymaps.xml
<!-- <?xml version="1.0" encoding="UTF-8"?> -->
<!-- This file contains the mapping of keyboard keys to actions within Kodi. -->
<!-- -->
<!-- The format is: -->
<!-- <window> -->
<!-- <device> -->
<!-- <button>action</button> -->
<!-- </device> -->
<!-- </window> -->
<!-- -->
<!-- The <global> section is a fall through - they will only be used if the button is -->
<!-- not used in the current window's section. -->
<!-- -->
<!-- Actions can be built-in functions. -->
<!-- eg <B>ActivateWindow(Music)</B> -->
<!-- would automatically go to Music on the press of the B button. -->
<!-- -->
<!-- An empty action removes the corresponding mapping from default and parent keymaps. -->
<!-- This is different from a "noop" action, which disables a button. -->
<!-- -->
<!-- More documentation on keymaps can be found on http://kodi.wiki/view/keymaps -->
<keymap>
<global>
<keyboard>
<power mod="longpress">ShutDown()</power>
<power>ActivateWindow(ShutdownMenu)</power>
<home>ActivateWindow(Home)</home>
<home mod="longpress">PlayerProcessInfo</home>
</keyboard>
</global>
<VirtualKeyboard>
<keyboard>
<backspace>Backspace</backspace>
</keyboard>
</VirtualKeyboard>
<PlayerProcessInfo>
<keyboard>
<home>Back</home>
</keyboard>
</PlayerProcessInfo>
</keymap>
References: