Page 15 of 26

Re: Openelec for MatrixTBS

PostPosted: Fri Oct 17, 2014 10:07 pm
by vpeter
PeterB Wrote:echo 8 - lol ... I understand your point of view ... but the engineer in me wants to understand, and find out whether there's anything useful that can be achieved.
Ok, I google a bit and seems I found what this means.

In eMMC partitioning note from Micron there is on page 13 Partitions Configuration Register:
Code: Select All Code
1. Bit[7]: Reserved
2. Bit[6]: BOOT_ACK
– 0x0: No boot acknowledge is sent (default).
– 0x1: Boot acknowledge is sent during the boot operation.
3. Bit[5:3]: BOOT_PARTITION_ENABLE
The user selects the boot data that will be sent to the master.
– 0x0: Device is not boot-enabled (default).
– 0x1: Boot partition 1 is enabled for boot.
– 0x2: Boot partition 2 is enabled for boot.
– 0x3 to 0x6: Reserved
– 0x7: User area is enabled for boot.
4. Bit[2:0]: PARTITION_ACCESS (before BOOT_PARTITION_ACCESS)
The user selects the partition to access.
– 0x0: Access to user data area
– 0x1: R/W boot partition 1
– 0x2: R/W boot partition 2
– 0x3: R/W replay-protected memory block (RPMB)
– 0x4: Access to general-purpose partition 1
– 0x5: Access to general-purpose partition 2
– 0x6: Access to general-purpose partition 3
– 0x7: Access to general-purpose partition 4

As you can see writing 8 to it means Boot partition 1 is enabled for boot. And we wrote u-boot to boot partition 1. We could write 9 to it and leave boot partition 1 writable.

Some more info here.

Code: Select All Code
# enable R/W boot partition 1
echo 0 > /sys/block/mmcblk0boot0/force_ro
# write u-boot to boot partition 1
dd if=u-boot-matrix.imx of=/dev/mmcblk0boot0 bs=1024 seek=1
# enable R only boot partition 1
echo 1 > /sys/block/mmcblk0boot0/force_ro
# enable boot partition 1 is for boot
echo 8 > /sys/devices/platform/sdhci-esdhc-imx3/mmc_host/mmc0/mmc0:0001/boot_config

Re: Openelec for MatrixTBS

PostPosted: Sat Oct 18, 2014 1:42 am
by vpeter
PeterB, if you have OpenELEC's u-boot in eMMC it runs OpenELEC fine from SD card. To boot MatrixTV you need to add file uEnv.txt to first partition on eMMC (on root folder of matrixTV):

Code: Select All Code
loadaddr=0x10800000
bootargs_base=setenv bootargs console=ttymxc0,115200 di0_primary console=tty1
bootargs_mmc=setenv bootargs ${bootargs} root=/dev/mmcblk0p1 rootwait video=mxcfb1:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb0:dev=hdmi,1920x1080M@60 video=mxcfb1:off video=mxcfb2:off fbmem=28M consoleblank=0 quiet
bootcmd_mmc=run bootargs_base; run bootargs_mmc; mmc dev 2; mmc read ${loadaddr} 0x800 0x4000; bootm ${loadaddr}
uenvcmd=run bootcmd_mmc
Just tested and works on my box.

Re: Openelec for MatrixTBS

PostPosted: Sat Oct 18, 2014 2:18 am
by vpeter
New OpenELEC Matrix version:
OpenELEC-iMX6.arm-devel-20141017185658-r19393-g4556014-Helix.tar: http://l.bitcasa.com/OEJP21Cy
OpenELEC-iMX6.arm-devel-20141018132309-r19393-g4556014-Gotham-ui_fix.tar: http://l.bitcasa.com/KT3b4KFi

obsolete
OpenELEC-iMX6.arm-devel-20141017191026-r19393-g4556014-Gotham.tar: http://l.bitcasa.com/QUAnjHh8

Changes:
latest Kodi-Helix
XBMC-Gotham is the same version as before
device tree file renamed from imx6q-sabresd.dtb to imx6q-tbs2910.dtb
same MfgTool2 .bat file for different hw matrix versions
uEnv.txt file is the same for different hw matrix versions
MAC address set in uEnv.txt only if there is no address set by u-boot

Re: Openelec for MatrixTBS

PostPosted: Sat Oct 18, 2014 3:06 am
by antonl1911
vpeter Wrote:New OpenELEC Matrix version:
OpenELEC-iMX6.arm-devel-20141017185658-r19393-g4556014-Helix.tar: http://l.bitcasa.com/OEJP21Cy
OpenELEC-iMX6.arm-devel-20141017191026-r19393-g4556014-Gotham.tar: http://l.bitcasa.com/QUAnjHh8

Changes:
latest Kodi-Helix
XBMC-Gotham is the same version as before
device tree file renamed from imx6q-sabresd.dtb to imx6q-tbs2910.dtb
same MfgTool2 .bat file for different hw matrix versions
uEnv.txt file is the same for different hw matrix versions
MAC address set in uEnv.txt only if there is no address set by u-boot


Peter, what about ir receiver support? Also there is no analog sound option in xbmc config.
I mean, if they are missing for everyone, not just me, I'd be delighted to work on adding these features.

Re: Openelec for MatrixTBS

PostPosted: Sat Oct 18, 2014 3:38 am
by vpeter
IR receiver is working on Matrix v1.2 with external DIY receiver connected on GPIO pins. Also working on Matrix v2.1 with build-in IR receiver.
But maybe there is a problem with receiver protocol. I set rc-rc6-mce:
https://github.com/OpenELEC/OpenELEC.tv ... e.patch#L7

Code: Select All Code
OpenELEC:~ # cat /sys/class/rc/rc0/uevent
NAME=rc-rc6-mce
DRV_NAME=gpio-rc-recv
and my MCE remote works as expected.

Also according to TBS MAtrix info page
Remote Support: HDMI-CEC, MCE
MCE is fine. Don't know what is the cause of non-working IR. Maybe someone else can check/confirm?

Analog output is also working thanks to @milan which add sgtl5000 audio codec in device tree.

WiFi is also working. But it is slow.

So everything is working. Good job ;)

Re: Openelec for MatrixTBS

PostPosted: Sat Oct 18, 2014 4:46 am
by antonl1911
vpeter Wrote:IR receiver is working on Matrix v1.2 with external DIY receiver connected on GPIO pins. Also working on Matrix v2.1 with build-in IR receiver.
But maybe there is a problem with receiver protocol. I set rc-rc6-mce:
https://github.com/OpenELEC/OpenELEC.tv ... e.patch#L7

Code: Select All Code
OpenELEC:~ # cat /sys/class/rc/rc0/uevent
NAME=rc-rc6-mce
DRV_NAME=gpio-rc-recv
and my MCE remote works as expected.

Also according to TBS MAtrix info page
Remote Support: HDMI-CEC, MCE
MCE is fine. Don't know what is the cause of non-working IR. Maybe someone else can check/confirm?

Analog output is also working thanks to @milan which add sgtl5000 audio codec in device tree.

WiFi is also working. But it is slow.

So everything is working. Good job ;)

I have board v1.3. I am using built-in IR receiver with TBS remote (from TBS6118 card). It's working in MatrixTV, with LIRC protocol.
I've been using your previous Gotham build.
UPDATE: current Gotham build solved the audio issue for me, thanks.

Re: Openelec for MatrixTBS

PostPosted: Sat Oct 18, 2014 3:37 pm
by vpeter
antonl1911 Wrote:I have board v1.3. I am using built-in IR receiver with TBS remote (from TBS6118 card). It's working in MatrixTV, with LIRC protocol.
I will check what it can be done to get it working.

Re: Openelec for MatrixTBS

PostPosted: Sat Oct 18, 2014 4:35 pm
by mikebzh44
+1 for getting inboard IR receiver ;)

Am I the only one who have align issues in OpenELEC addon settings ? Labels are far too left so I can only see last letters.
Will send a screenshoot soon.

Re: Openelec for MatrixTBS

PostPosted: Sat Oct 18, 2014 4:44 pm
by vpeter
mikebzh44 Wrote:Am I the only one who have align issues in OpenELEC addon settings ? Labels are far too left so I can only see last letters.
Helix is fine but Gotham has some issues. Already investigating.

Re: Openelec for MatrixTBS

PostPosted: Sat Oct 18, 2014 4:50 pm
by mikebzh44
Ok, will make some tests on helix.