Kodi Community Forum
[i.MX6] XBMC running on Freescale SoC's - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: [i.MX6] XBMC running on Freescale SoC's (/showthread.php?tid=161793)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39


RE: GK802/Hi802 - mtx512 - 2013-07-13

(2013-06-25, 00:39)wolfgar Wrote: Hi mtx,

Last night I found a workaround to prevent the transient black screens, not the ones related to overheating but the ones which appeared with BSP4.0.0...
I will rebuild xbmc with this patch for your last image to check whether it also helps.

Regarding my quad wandboard, I should receive it around the 4th of July because I ordered other items (RF chips I want to evaluate for another project) which should be available at the end of this week.
I will tell you about it and my first test with XBMC if you are interested...

Last but not least, If you find reproducible bugs while testing, do not hesitate to report them, I will do my best to track and solve them...

Best regards
Stephan

Hi Stephan,

Any chance you could do another build with the transient black screen patch for my xubuntu rootfs. I fried my last GK802 Smile and just got another and want to continue testing.

Thanks


RE: GK802/Hi802 - wolfgar - 2013-07-14

Hi jas,

Nice to see you back,
Here is the updated binary for your latest linaro image...
Regards


RE: GK802/Hi802 - xn2000 - 2013-07-15

(2013-07-13, 03:39)wolfgar Wrote: Regarding GPU, It is normal, You have to use the GPU libraries blobs from BSP V4.0.0 to get it working (the openGLES libs have to match the kernel driver)
The best is to wait a little bit that I release a fully coherent image but if you really want to make it work right now, you can get the compatible vivante libs in the archive for ubuntu I posted here a few days ago ...
Unfortunately i don´t have much time right now so i better wait till you finished your image. But i will give it a shot should the occasion arise.
(2013-07-13, 03:39)wolfgar Wrote: Regarding preempt_rt, ok it is a little out of topic here but I will apply the patchset (I have given it a quick try I only have a few conflicts I should be able to solve) and I will try to explain the way to do it. Basically it is as simple as applying patches and configuring the kernel, in practice solving conflicts may be trivial or quite touchy depending on the cases...

I had no time to investigate my stability issue today but I hope to be able to work on it tomorrow night...

Regards
Shure, take your time. I appreciate your help.
I did see only patches for Kernel 3.0.80, and i´m not that experienced to solve dependencies or conflicts on my own. I´m lacking the software dev background.
Do whatever you deem neccessary. Wink

Have a nice day Smile


RE: GK802/Hi802 - mtx512 - 2013-07-15

(2013-07-14, 16:03)wolfgar Wrote: Hi jas,

Nice to see you back,
Here is the updated binary for your latest linaro image...
Regards

Tried the new image, still got some black screen partly because the screen saver seems to crash, logs here. However other times it seems to be other errors, not sure if this log helps. In most cases xbmc is running.

The bad news is that with BSP 4.0.0 and after black screen the temperature kept rising and it looks as though another GK802 is fried Sad.

Having looked at the thermal code it seems the default critical temperature is 100C, the CPU is graded at 95C max and the RAM is graded for 80C. Given the +/- 10% accuracy for the temp sensor the HOT point probably needs to be set <80 to give RAM a chance to function correctly and critical temp set to 80 or 85C.


RE: GK802/Hi802 - wolfgar - 2013-07-16

Unfortunately there is not a single error in the logs you post : Just normal logs related to python scripts...
The thermal protection is set at 90°C on my kernel not 100.
Mine always manage to drop below 80°c very quickly after the protection triggers : I don't know how you manage to burn you device. : Out of the box they are almost good for nothing but they should not burn ! How do you cool your device ??

PS : On wandboard my worst stress tests result in 52°C core temperature : Another world for sure...


RE: GK802/Hi802 - wolfgar - 2013-07-16

(2013-07-15, 12:46)xn2000 Wrote: Unfortunately i don´t have much time right now so i better wait till you finished your image.

OK ! I have a stable image which is ready to publish for tests ...
Time to cleanup and to upload. Should be available tomorrow...

Regards, have a nice day (or night) Wink
Stephan


RE: GK802/Hi802 - ProsjektX - 2013-07-16

(2013-07-16, 00:30)wolfgar Wrote: OK ! I have a stable image which is ready to publish for tests ...
Time to cleanup and to upload. Should be available tomorrow...

Cool! I guess taking your root filesystem and moving over a kernel and related modules for Sabrelite/Nitrogen6q is the easiest way to get it running on those boards..?


RE: GK802/Hi802 - mtx512 - 2013-07-16

(2013-07-16, 00:12)wolfgar Wrote: Unfortunately there is not a single error in the logs you post : Just normal logs related to python scripts...
The thermal protection is set at 90°C on my kernel not 100.
Mine always manage to drop below 80°c very quickly after the protection triggers : I don't know how you manage to burn you device. : Out of the box they are almost good for nothing but they should not burn ! How do you cool your device ??

GK802 was cooled with a large Southbridge heatsink sandwiched with a copper shim to the CPU. So wasn't expecting to it be damaged, earlier stress testing of the GPU (non XBMC testing) only managed 76°C.

BTW - I created a armhf rootfs with GPU acceleration (BSP 1.1.0) which seems snappy (no VPU). The video bits of VPU can be compiled, whats missing are the binary audio codec blobs.

(2013-07-16, 00:12)wolfgar Wrote: PS : On wandboard my worst stress tests result in 52°C core temperature : Another world for sure...

... if anyones willing to donate any type of imx6 board happy to accept.


RE: GK802/Hi802 - wolfgar - 2013-07-17

Hi there

Here is a first sd image for wandboard quad !
login /password is root/xbmcpoc
Known limitations :
- spdif and analog audio (sgtl5000) output are voluntary disabled for now (so that xbmc properly selects HDMI as output for sound)
- wifi is untested (likely not working)

It is far from been perfect but it is first delivery which already enables to have fun with XBMC on this great board...


If you are interested only in RFS : here it is : It should work on other imx6 boards as long as the kernel has V4.0.0 VPU/GPU drivers...

Best regards
Stephan


PS : I will post more info on a blog as soon as I can. Don't be afraid by the overheating issues reported in this thread reagrding GK802. On wandboard quad, I have never seen a core temp above 52°C (and I monitor it very carefully as the overheating issue is one of the reason why I switched from gk802 to wandboard)


RE: GK802/Hi802 - wolfgar - 2013-07-17

(2013-07-16, 09:14)mtx512 Wrote: GK802 was cooled with a large Southbridge heatsink sandwiched with a copper shim to the CPU. So wasn't expecting to it be damaged, earlier stress testing of the GPU (non XBMC testing) only managed 76°C.

And you confirm your device is really definitively damaged with such cooling ?!
It is all the more surprising as GPU is the main contributor to the overheating issue and that core temperatures I was able to observe while running XBMC are very similar to the ones observed during GPU benchmarks...
Were the kernel logs saved ? I wonder whether the thermal protection behaves correctly (on my own device the temperature drops by 10°C almost immediately when the core temp reaches 90°C and the protection triggers...)


RE: GK802/Hi802 - wolfgar - 2013-07-18

Official announcement for the wandboard image is here


RE: GK802/Hi802 - Pulento - 2013-07-18

Stephan,

Lots of thanks for your great work. I do have a WQ that I plan to use to replace a Mac Mini first gen with Linux/XBMC I've been using for years. So I did test your image with great success and some problems. But this is one of the best if not the best I've seen on many ARM BSPs (Panda, Beagle, etc).

Let me say that I mostly store my movies on a home server which serves files through CIFS/NFS/AFS/whatever and it works great with my old HTPC; so most of my tests have been playing MKV at 1080p; and mostly they play great Smile

Your image as played almost everything I've tested with the exception of BD images; but maybe that isn't compiled on your XBMC. Things I've noted:

1- The Kernel reports 512MB of RAM, other images I've tested reports the 2G:

Code:
Jul 17 23:04:02 wandboard user.info kernel: [    0.000000] Memory: 496MB = 496MB total
Jul 17 23:04:02 wandboard user.notice kernel: [    0.000000] Memory: 495752k/495752k available, 192376k reserved, 0K highmem

Please note the 0K highmem, other images do report a lot of highmem; maybe we have to enable highmem on Kernel at compile time ?

2- Lots of MKVs I have are paired with its respective .SRT subtitle file; and I've noted that those text file that are ISO-8859 encoded fail to play on your build.

Code:
23:09:30 T:1223816288  NOTICE: Opening Subtitle stream: 0 source: 1024
23:09:30 T:1223816288   DEBUG: CSmbFile::Open - opened tank_movies/papas/Avatar 1080p/avatar.2009.1080p.bluray.x264.srt, fd=10001
23:09:30 T:1223816288   DEBUG: CSmbFile::Close closing fd 10001
23:09:30 T:1223816288   ERROR: convert_checked iconv_open() failed from CP1252 to WCHAR_T, errno=22(Invalid argument)

Do we need to enable some charset in Kernel or Yocto to support CP1252 ? I've noted I don't get the error with UTF-8 subs and they do play nice.

Edit: It seems your Yocto eglibc's doesn't have support for this charset and some others, it seems we need eglibc-gconv-cp1252-*.rpm installed.

3- With some videos I get dropped frames but it doesn't seem to be a problem with not enough resources more like something about the particular codec; also sometimes a I get a bit of out-of-sync video/audio and I don't find the options for video sync in System->Video->Playback that I have on the usual Intel XBMC builds. I'll try to get a pattern on which kind of file/codec gives me dropped frames and report back.

And more important; how can I reproduce your build ? Kernel isn't problem for me since I do a lot of work on Beaglebones/Pandaboards/etc to compile my own Kernel and I'm cloning your GIT repo to compile my own.

The hard part for me is Yocto; what I want is to add some things to the rootfs to enable my Playstation Remote using Wandboard BT, timezone support, my preferred editor and some minor tools; maybe try NFS rootf support, automount and get rootfs on ramfs so the uSD card doesn't die in 1 month Smile just need the GIT that your using to build your image and some links to try to build a Yocto basic image.

Edit: I was able to build current Yocto master branch thanks to Otavio's help but it is 1.4 based not 1.3.1 as yours. Wonder how long will take to move your builds on top of this release, not considering Kernel just base image. Or maybe I can try to compile your exact Yocto version, was it danny ? Which target and layers ?

And if I can replicate your XBMC build in order to help you in someway it will be great also Smile

Something I also noted is that Ethernet is increasing since each reboot (eth4...eth6...and so on) and this is fixable changing this udev rule:

Code:
root@wandboard:~# cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

And your public key is on /home/root/.ssh so you can log in on a lots of Wandboards now Big Grin

Thanks a lot !


RE: GK802/Hi802 - wolfgar - 2013-07-18

Hi pulento,

First of all, many thanks for this very detailed and valuable feedback...

1. The Kernel reports 512MB of RAM
You are perfectly right !
Short story : My mistake with kernel config.
Long story : I changed a lot of settings regarding memory while I was trying to understand why I did not have the theorical 184MiB available to allocate DMA buffers.
At the begining I tweaked the config to have a 2G/2G split and no highmem at all to avoid highmem overhead. During my tests I reverted to a standard 3G/1G split and forgot to reenable highmem Wink

Anyway, it is already solved : If you want I can even repost the kernel which gives all your memory back right now.... Wink

2. Once again you are right : I have not properly installed CP1252 locales in my RFS
Yet I am unsure about the required package to solve this issue
Be aware that the zypper package manager utility is installed and that I host a repository with additional packages....
you can do :
zypper refresh
zypper search xxxxx
zypper install xxxxx

3. For the dropped frames : I think I know the issue : Could you check the XBMC log when it happens please ?
You will find it in /home/root/.xbmc/temp/xbmc.log
If it is the issue I am aware of, you should have some explicit messages which state that I am voluntary dropping frames...
Here again you are right : Not a resource issue (just a buggy behavior I have to investigate regarding the way V4L buffers are sometimes given back after rendering)

Reproducing the build is not so trivial at this time : kernel and xbmc sources are already public but I made a rfs build 2 months ago and I patched some components by hand...
I plan to clean up everything and enable to perform a full build with yocto in the near future : If you are not in a hurry it is the best way.
Otherwise I can tell you and to rebuild specific components : kernel would be easy for instance

Regarding your remark about ramfs (you mean tmpfs in fact right ?), be aware that my image already takes care of storing logs in tmpfs var/tmp var/log and a few others (including /home/root/.xbmc/tmp/) end up in tmpfs in order to save erase/write cycles on sdcard... Not perfect but already much better than many images which just don't care at all ;-)
Yet on my side, I don't aim at having all the rfs in tmpfs as I wish to keep my xmbc database (what the hell if scrapers had to run at each boot lol) and I wish to be able to easily change a configuration file and so on....

At last, I was aware of the udev perm rule and was too lazy to change it before release ;-) Sorry for that...

Finally, sorry for the public key : My secret plan to take over the world thanks to a wandboard botnet has just failed ! ;-)
No, really sorry : I will add a comment in my blog regarding this issue and it will be solved in future images for sure...

Best regards
Stephan


RE: GK802/Hi802 - Pulento - 2013-07-19

(2013-07-18, 23:18)wolfgar Wrote: First of all, many thanks for this very detailed and valuable feedback...

You're welcome, your work is truly inspiring after trying XBMC on lots of ARM small boards and failing.

Quote:1. The Kernel reports 512MB of RAM
You are perfectly right !
Short story : My mistake with kernel config.
Long story : I changed a lot of settings regarding memory while I was trying to understand why I did not have the theorical 184MiB available to allocate DMA buffers.
At the begining I tweaked the config to have a 2G/2G split and no highmem at all to avoid highmem overhead. During my tests I reverted to a standard 3G/1G split and forgot to reenable highmem Wink

Anyway, it is already solved : If you want I can even repost the kernel which gives all your memory back right now....

No problem. I compiled a Kernel from your repo; will test it later though and report back.

Quote:2. Once again you are right : I have not properly installed CP1252 locales in my RFS
Yet I am unsure about the required package to solve this issue
Be aware that the zypper package manager utility is installed and that I host a repository with additional packages....
you can do :
zypper refresh
zypper search xxxxx
zypper install xxxxx

I'm a complete newbie on Yocto didn't know about zipper and that you tied the image to a functional repository Big Grin indeed installing eglic-gconv-cp1252 fixed my problem with ISO-8859-1 subs files. Why XBMC decode them as CP1252 instead of ISO-8859-1 I don't know but it's solved now Smile

Quote:3. For the dropped frames : I think I know the issue : Could you check the XBMC log when it happens please ?
You will find it in /home/root/.xbmc/temp/xbmc.log
If it is the issue I am aware of, you should have some explicit messages which state that I am voluntary dropping frames...
Here again you are right : Not a resource issue (just a buggy behavior I have to investigate regarding the way V4L buffers are sometimes given back after rendering)

Indeed, here is a log of a file MKV (H.264) @23.976 fps it has a periodic hiccup when playing (most people will not note them)

Code:
23:11:53 T:1219159136  NOTICE: Decode - No frame buffer available (min Free 6 - Ready picture 1)
23:11:53 T:1219159136  NOTICE: Decode - Dropping one frame at idx 2 to free frame buffer
23:11:53 T:1219159136  NOTICE: Decode - No frame buffer available (min Free 6 - Ready picture 1)
23:11:53 T:1219159136  NOTICE: Decode - Dropping one frame at idx 7 to free frame buffer
23:11:54 T:1467466848   DEBUG: CDVDPlayerAudio:: Discontinuity2 - was:173735482.519434, should be:173724812.641069, error:-10669.878365
23:11:55 T:1219159136   DEBUG: CPullupCorrection: detected pattern of length 47: 41500.00 41500.00 42000.00 41500.00 41500.00 42000.00 42000.00 41500.00 41500.00 42000.00 41500.00 41500.00 42000.0
0 41500.00 42000.00 41500.00 42000.00 41500.00 41500.00 42000.00 41500.00 41500.00 41500.00 42000.00 42000.00 41500.00 41500.00 42000.00 41500.00 41500.00 42000.00 41500.00 42000.00 41500.00 42000
.00 41500.00 41500.00 42000.00 83500.00 83500.00 41500.00 41500.00 42000.00 41500.00 42000.00 41500.00 42000.00, frameduration: 43478.723404
23:11:55 T:1219159136   DEBUG: CPullupCorrection: pattern lost on diff 42000.000000
23:11:56 T:1219159136  NOTICE: Decode - No frame buffer available (min Free 6 - Ready picture 1)
23:11:56 T:1219159136  NOTICE: Decode - Dropping one frame at idx 7 to free frame buffer

I don't know H.264 internals but I thought that PULLUP/PULLDOWN was something that was only signaled on interlaced MPEG-2 streams. And this particular stream seems progressive to me. I think (correct me if I wrong) the video signal is keep at 1080p@60 so this XBMC CPullupCorrection is to correct the 23.976 HZ stream played on a 60HZ signal.

Quote:Reproducing the build is not so trivial at this time : kernel and xbmc sources are already public but I made a rfs build 2 months ago and I patched some components by hand...
I plan to clean up everything and enable to perform a full build with yocto in the near future : If you are not in a hurry it is the best way.
Otherwise I can tell you and to rebuild specific components : kernel would be easy for instance

I'll wait since I do think it is better to rebuild based on last Yocto, any help testing build or Yocto layers I can help Smile Building last master following Otavio's blog was fairly easy; modifying it and adding bb recipes should be a different matter.

Quote:Regarding your remark about ramfs (you mean tmpfs in fact right ?), be aware that my image already takes care of storing logs in tmpfs var/tmp var/log and a few others (including /home/root/.xbmc/tmp/) end up in tmpfs in order to save erase/write cycles on sdcard... Not perfect but already much better than many images which just don't care at all ;-)
Yet on my side, I don't aim at having all the rfs in tmpfs as I wish to keep my xmbc database (what the hell if scrapers had to run at each boot lol) and I wish to be able to easily change a configuration file and so on....

I use to install XBMC on top of a minimal Debian, there is a package on it called flashybrid. You tell it which parts go on volatile tmpfs and what goes to non-volatile tmpfs; it basically rsync changes on reboot and when you want it (using crontab) and it mounts these tmps on top of the original fs so is somewhat transparent. I want to have something similar if it speeds things and keep my cards safe. I use it on work on about 700 units and is working like a champ.

But first I'll like to enable my PS3 remote Smile

Quote:At last, I was aware of the udev perm rule and was too lazy to change it before release ;-) Sorry for that...

Finally, sorry for the public key : My secret plan to take over the world thanks to a wandboard botnet has just failed ! ;-)
No, really sorry : I will add a comment in my blog regarding this issue and it will be solved in future images for sure...

No problem. There are lot of ways to take over the world, one of them is making XBMC really works on a cheap SBC Wink

I minor thing I just noted. On some H.264 files (using iMX-H264 decoder) the last (bottom) line of macroblocks looks shifted somehow it is very subtle and maybe 16 or 32 pixels wide I cannot tell but it seems to be one or two bottom line of macroblocks. It actually seems like that the first line of the last macroblock line was copied on the next lines of the macroblock line.

I tried to take screenshots but I just got 0 byte PNGs so I just taked a crappy picture with my phone and I cannot find how to attach it here so I'll send it by email on the Wandboard forum. O my god this thing is complaining about the number of emoticons I use !!! I had to erase them. I miss when mailing lists ruled the world.


RE: GK802/Hi802 - rude78 - 2013-07-19

Hi Stephan,

you did an excellent job. Thank you! Just thinking about buying a WBQUAD. Have you already tested the SPDIF. I own an old amp without HDMI support. Therefore SPDIF is a must have requirement.
What about the progress of your CEC implementation for the imx?
Have you tested the jpeg image playback performance. Especially large MP images take a long time to get loaded by my rasp pi. Do you know if the HW accelerated jpeg decoding is used to decode the jpeg images? I don't think so. As far is I know the i.mx6 VPU support HW accelerated jpeg decoding. Not sure about the maximum resolution supported by the i.MX6 VPU.
I am even not sure if jpeg decoding or IO is the bottleneck.

Best regards
Rudi