Page 2 of 2

Re: Boot problem

PostPosted: Sat Oct 03, 2015 11:57 pm
by Dinos52
So now all is ok?

Regarding 50/60Hz, uEnv.txt and fan control: YES! Many thanks for your support! The Matrix is going to get much more useful with your fantastic efforts on the implementation of "official" OpenELEC on this device :) :) :) Why ist the Matrix not mentioned under Freescale iMX6 Builds on the official OpenELEC site? Does TBS not pay them? ;)

But there is still this big issue regarding (u)SD-Cards (see first message of this topic).

About sed: I forgot to use -i argument which means edit in place .

Not to be curious but what would be the correct command string?

Re: Boot problem

PostPosted: Sun Oct 04, 2015 12:27 am
by vpeter
Yes, bootloader and (u)SD card issue will check and fix.

Regarding official support on openelec web page: someone must support the image. And because currently I'm the only one doing this I can't check every single option. Image mostly works and bugs like you have are fixed (probably by me). But it is not perfect.

Correct sed line would be
Code: Select All Code
sed -i 's|1920x1080M@60|1920x1080M@50|g' /flash/uEnv.txt

It means replace every occurrence of 1920x1080M@60 with 1920x1080M@50. It is easy to tell someone inexperienced to run this command then edit file with vi/nano.

Re: Boot problem

PostPosted: Mon Oct 05, 2015 12:08 am
by vpeter
I didn't managed to fix booting with SD card attached in elegant way with current kernel (don't know why yet).

But I still have manual solution. Instead of directly mounting internal eMMC partitions by specifying device id we can also use UUID which stands for Universally Unique Identifier. You get this by command blkid. In file uEnv.txt we must change boot= and disk= parameters.
Code: Select All Code
OpenELEC:~ # blkid
/dev/mmcblk0p1: LABEL="SYSTEM" UUID="7AE3-07B2" TYPE="vfat"
/dev/mmcblk0p2: LABEL="Storage" UUID="d1d628ed-3a63-41dd-abe0-ab1db48fc702" TYPE="ext4"

OpenELEC:~ # cat /flash/uEnv.txt | grep mmcargs
mmcargs=setenv bootargs boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2 ${ssh_arg} ${console_arg} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 dmfc=3 consoleblank=0

OpenELEC:~ # cat /flash/uEnv.txt | grep mmcargs
mmcargs=setenv bootargs boot=UUID=7AE3-07B2 disk=UUID=d1d628ed-3a63-41dd-abe0-ab1db48fc702 ${ssh_arg} ${console_arg} video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32 dmfc=3 consoleblank=0

To simplify this I prepared all the commands which needs to be run

Code: Select All Code
mount -o remount,rw /flash
cp /flash/uEnv.txt /flash/uEnv.txt_orig
PART1=$(blkid | awk '/mmcblk0p1/ {gsub(/"/, "", $3); print $3}')
PART2=$(blkid | awk '/mmcblk0p2/ {gsub(/"/, "", $3); print $3}')
sed -i "s|boot=/dev/[a-z0-9]*|boot=$PART1|g" /flash/uEnv.txt
sed -i "s|disk=/dev[/a-z0-9]*|disk=$PART2|g" /flash/uEnv.txt
sync
cat /flash/uEnv.txt | grep mmcargs
mount -o remount,ro /flash
reboot

Obviously this must be changed on every reinstall of openelec to internal eMMC. Until I find better solution (which already works on newer kernel).

Re: Boot problem

PostPosted: Mon Oct 05, 2015 10:54 pm
by Dinos52
Wow! It works, many thanks! I've put you commands into a shell so I have no problem to call it again if necessary. All 4 combinations were tested well with (u)SD Cards with normal data (e.g. music).

However: Now we have a problem with a bootable SD; the system hangs on boot with the same error message as in the first message of this topic. I think you already noticed that and I don't need it yet. But it would be good if you consider this in your new fix. I will be glad to test it again!

Re: Boot problem

PostPosted: Tue Oct 06, 2015 12:02 am
by vpeter
Dinos52 Wrote:However: Now we have a problem with a bootable SD; the system hangs on boot with the same error message as in the first message of this topic. I think you already noticed that and I don't need it yet. But it would be good if you consider this in your new fix. I will be glad to test it again!

This I don't understand. What exactly is the problem (what scenario)?

Does you SD card has file uEnv.txt on first DOS partition? If yes remove/rename it.
If there is this file bootloader assumes it is bootable SD card.

Re: Boot problem

PostPosted: Tue Oct 06, 2015 3:44 am
by Dinos52
Ok, in the past I had the OS Matrix-TV in internal flash and an older version of OpenELEC on a bootable SD card (with DOS partition). So I could boot by choice Matrix-TV (with Gotham) or OpenELEC for comparison. With your help, I moved OpenELEC to the internal flash. Up to the last change, I could boot from the old SD card also. This is for test only. Now with the latest change, the system fails with a bootable SD (old OpenELEC version) instead of booting FROM SD.

Summary:
Before latest change: Boot with data SD card fails, boot with bootable SD is ok (system boots OS from SD).
After latest change: Boot with data SD card ok, boot with bootable SD fails.

So I would appreciate if finally I could also boot another OS (e.g. Android or Ubuntu) from SD card without change of the internal OS because OpenELEC will be my favourite main application ;)

Re: Boot problem

PostPosted: Tue Oct 06, 2015 3:27 pm
by vpeter
Yes, you need to change boot= and disk= on SD card also.
So boot openelec from eMMC without SD card attached. After that open SSH console and attach SD card. Both partitions will be mounted. Run command blkid to see UUID for this two partitions. Then open uEnv.txt on SD card and change boot= and disk= for UUID usage. Just like on internal eMMC.

You could also set boot= and disk= to be used by label. Like
Code: Select All Code
boot=LABEL=sd_system disk=LABEL=sd_storage

Of course you need to change label of both partitions.

Re: Boot problem

PostPosted: Tue Oct 06, 2015 7:58 pm
by Dinos52
Success with first option :D
Code: Select All Code
mmcargs=setenv bootargs 'boot=UUID=BD74-809B disk=UUID=108039cb-e941-47e7-b5ec-fb1ea6effdd6 quiet video=mxcfb0:dev=hdmi,1920x1080M@50,if=RGB24,bpp=16 dmfc=3'

Re: Boot problem

PostPosted: Tue Oct 06, 2015 8:00 pm
by vpeter
Great! Then I understand the problem correctly.

Don't forget to do this step again when new image is written to SD card or internal eMMC. Maybe in the future this will be handled better. But for now this workaround is fine too (by my oppinion).

Re: Boot problem

PostPosted: Tue Oct 06, 2015 8:52 pm
by Dinos52
Yes, thank you!