Moderator Control Panel ]

Openelec for MatrixTBS

Re: Openelec for MatrixTBS

Postby vpeter » Wed Oct 15, 2014 7:43 pm

Now everything is clear. You just need to prepare SD card like I wrote. If I found some time I will try making some script.
You can help me buy new work notebook with paypal donation, after 8 years it's time to upgrade.
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FLVT7ACMYAPS6
vpeter
 
Posts: 427
Joined: Sun Jul 27, 2014 2:12 am
Location: Slovenia

Re: Openelec for MatrixTBS

Postby PeterB » Wed Oct 15, 2014 9:06 pm

vpeter Wrote:Now everything is clear. You just need to prepare SD card like I wrote. If I found some time I will try making some script.


Thank you very much for all your assistance, but let's visit that again ...

vpeter Wrote:Write u-boot-matrix.imx to sd card boot partition (like /dev/mmcblk0boot0)

I'm not clear on how to do this! :oops: You talk about a boot partition before you create the vfat and ext4 partitions. I assumed that this was done by using dd to write to the raw device (/dev/sdg on my Linux desktop). This would then require that some free space is left below the vfat partition (32 blocks left by default?).

Create 2 partitions: first vfat and second ext4:
mkfs.vfat /dev/mmcblk0p1 -L System

Code: Select All Code
[peter@desktop ~]$ sudo mkfs.vfat /dev/sdg1 -L System
mkfs.fat 3.0.26 (2014-03-07)
mkfs.vfat: invalid option -- 'L'
Unknown option: ?


What size should this partition be?



mkfs.ext4 -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p2 -L Storage

This appears to work:
Code: Select All Code
[peter@desktop ~]$ sudo mkfs.ext4 -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 /dev/sdg2 -L Storage
mke2fs 1.42.12 (29-Aug-2014)
/dev/sdg2 contains a ext4 file system
   last mounted on Wed Oct 15 20:45:25 2014
Proceed anyway? (y,n) y
Creating filesystem with 943232 4k blocks and 236176 inodes
Filesystem UUID: 027b2260-4511-443a-82b2-955afb39a9cc
Superblock backups stored on blocks:
   32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                           
Writing inode tables: done                           
Writing superblocks and filesystem accounting information: done

[peter@desktop ~]$


On first partition save files KERNEL, SYSTEM, imx6q-sabresd.dtb, uEnv.txt, oemsplash.png

KERNEL and SYSTEM from the 'target' directory?
imx6q-sabresd.dtb from the '3rdparty/bootloader' directory?
uEnv.txt and oemsplash.png from the 'TBS-Matrix-MfgTool2/Profiles/MX6Q Linux Update/OS Firmware' directory?

And it should boot if you select booting from sd card.

I wish!
PeterB
 
Posts: 52
Joined: Thu Apr 10, 2014 11:17 am

Re: Openelec for MatrixTBS

Postby vpeter » Wed Oct 15, 2014 9:26 pm

Writing u-boot was mentioned on previous page. I don't know how this is done on big Linux machine. Boot partition on SD card is special place not the same where you make 2 partitions later - see the boot0. With mfgtool2 I do with commands
Code: Select All Code
echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=u-boot-matrix.imx of=/dev/mmcblk0boot0 bs=1024 seek=1
echo 1 > /sys/block/mmcblk0boot0/force_ro
echo 8 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config


Create 2 partitions. With gparted, fdisk, cfdisk, ... First one should be 250 MB large.
Then format both partitions.
For exact command you need to adapt for your machine. If you are using some graphic program for partitioning and formating you don't need to know exact command. Just set size, type and label.

Copy files from the 'target':
KERNEL
SYSTEM

Copy files from the '3rdparty/bootloader':
imx6q-sabresd.dtb
uEnv-matrix-vX.txt renamed to uEnv.txt

Copy file from the 'TBS-Matrix-MfgTool2/Profiles/MX6Q Linux Update/OS Firmware':
oemsplash.png


For checking what is going wrong serial console is very helpful.
You can help me buy new work notebook with paypal donation, after 8 years it's time to upgrade.
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FLVT7ACMYAPS6
vpeter
 
Posts: 427
Joined: Sun Jul 27, 2014 2:12 am
Location: Slovenia

Re: Openelec for MatrixTBS

Postby PeterB » Wed Oct 15, 2014 11:55 pm

Wow, that worked! Many, many thanks, vpeter!

Now to get my 'standard' configuration in to place.
PeterB
 
Posts: 52
Joined: Thu Apr 10, 2014 11:17 am

Re: Openelec for MatrixTBS

Postby mikebzh44 » Thu Oct 16, 2014 2:04 am

Can someone can write an Howto ?

thanks.
mikebzh44
 
Posts: 56
Joined: Wed Oct 01, 2014 9:37 pm

Re: Openelec for MatrixTBS

Postby vpeter » Thu Oct 16, 2014 2:17 am

mikebzh44 Wrote:Can someone can write an Howto ?
I think PeterB is the best candidate ;)

He should post commands he used with small comments. Because typing such dangerous commands as root can destroy whole Linux if you don't know what you are doing.
You can help me buy new work notebook with paypal donation, after 8 years it's time to upgrade.
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FLVT7ACMYAPS6
vpeter
 
Posts: 427
Joined: Sun Jul 27, 2014 2:12 am
Location: Slovenia

Re: Openelec for MatrixTBS

Postby PeterB » Thu Oct 16, 2014 10:37 am

vpeter Wrote:
mikebzh44 Wrote:Can someone can write an Howto ?
I think PeterB is the best candidate ;)


Okay, watch this space ====> [ ]
PeterB
 
Posts: 52
Joined: Thu Apr 10, 2014 11:17 am

Re: Openelec for MatrixTBS

Postby PeterB » Thu Oct 16, 2014 10:33 pm

Editted to highlight changes when using the new 'universal' boot (.imx) file.

Okay, for what it's worth:

To create a bootable OpenELEC SD card, using a Linux desktop system:

These instructions should work on most Linux distributions - I used ArchLinux, but Ubuntu/Debian should work just as well.

Tools which I used and which might not be installed, by default, in your system:
dosfstools - needed to create a fat format drive/partition
gnome-disk-utility - for identifying, formatting and partitioning, your SD card drive
a de-archiving tool of your choice.

To proceed, first of all extract the contents of the OpenELEC distribution zip file to a convenient area on your computer. Next, launch the gnome-disk-utility, normally simply called 'Disks' on the applications menu. Take note of what devices are shown in the left hand side of the Disks window. Now insert the SD card into the reader/connect the reader to the computer. One of the drives should change in the Disks window, or a new drive should appear. Click on this drive to select/highlight it. Now, near the bottom of the information on the right hand side of the window, you should see an entry for 'Device' - on my system it is /dev/sdg. Take a note of this device - be very careful here ... get it wrong and you could corrupt your system drive, or another device connected to the computer. Every time you issue a command via the 'Disks' utility, make sure that the correct drive is still highlighted. Also, make sure that the drive is not marked as 'Read-only' - if it is you need to eject the SD card and move the little write-protect switch on the side of the card.

Now, with the card inserted, select 'Format...' in the main menu at the top of the Disks window. In the window which pops up you can select 'Don't overwrite existing data (Quick)', and 'Compatible with all systems and devices (MBR/DOS)'. Now click the 'Format' button. This will clear any existing partitions and directory entries from the card, when you click the 'Format' button in the pop-up confirmation window.

Next we need to write the Master Boot Record to the SD card, so start up a terminal session and set your default directory to 3rdparty/bootloader directory in the area where you extracted the OpenELEC zip file.

Type the following command, having substituted the 'Device' name noted earlier (eg '/dev/sdg') where I have entered 'XXX':
Code: Select All Code
sudo dd if=u-boot-matrix.imx of=XXX bs=1024 seek=1


After entering your password, if prompted, you should see output similar to the following:
Code: Select All Code
263+0 records in
263+0 records out
269312 bytes (269 kB) copied, 0.294678 s, 914 kB/s

Now return to the 'Disks' window and select '+' at the bottom of the 'Volumes' pane. This opens the 'Create Partition' dialogue. Select 'Don't overwrite ...', 'Compatible ... (FAT)' and enter 'System' in the 'Name' field. Set the 'Partition Size' to 250MB. Click the 'Create' button.

Next, highlight the 'Free Space' area in the 'Volumes' pane, and select '+' again. This time, select 'Don't overwrite ...', 'Compatible with Linux systems (Ext4)' and enter the name: 'Storage'. Leave the 'Partition Size' as default - this should claim all the remaining free space for the new partition - and click the 'Create' button.

Now highlight the 'System' partition in the 'Volumes' pane and click the mount button at the bottom of the pane (normally appears as a right-pointing triangle, or 'play button' symbol).

This will mount the partition so that it is accessible to your computer. At the bottom of the window, click the directory path which appears after the text 'Mounted at'. This should open a directory view onto the System partition of your SD card.

Into this window, drag the following files from the area where you extracted the OpenELEC zip file:
target/KERNEL
target/SYSTEM
TBS-Matrix-MfgTool2/Profiles/MX6Q Linux Update/OS Firmware/oemsplash.png
<strike>3rdparty/bootloader/imx6q-sabresd.dtb</strike>
3rdparty/bootloader/imx6q-tbs2910.dtb
[strike]3rdparty/bootloader/uEnv-matrix-vX.txt (where X is replaced by '1' for a v1.x Matrix board and '2' for a v2.x Matrix board)[/strike]
3rdparty/bootloader/uEnv-matrix.txt

Hmmm ... strike doesn't appear to be implemented, so I've marked the old text in red.

Finaly, rename that last file to uEnv.txt and then dismount the SD card by clicking the dismount (square or stop symbol) at the bottom of the 'Volumes' pane before ejecting or removing the card.


You should now be able to insert the SD card into your Matrix system, and boot into OpenELEC - provided that the dip-switches (v2.x board) or zero ohm links (v1.x board) have been set appropriately for SD card boot (01000010).

I have followed these instructions as I typed them, and proven that they result in a card which will boot in my system, so I hope that they make sense. Apologies for any errors, omissions or typing mistakes.
Last edited by PeterB on Mon Oct 20, 2014 11:52 am, edited 4 times in total.
PeterB
 
Posts: 52
Joined: Thu Apr 10, 2014 11:17 am

Re: Openelec for MatrixTBS

Postby mikebzh44 » Thu Oct 16, 2014 10:50 pm

Thanks a lot !!!

PeterB Wrote:To proceed, first of all extract the contents of the OpenELEC distribution zip


Which file are you talking about ?

Official OpenELEC release ?
OpenELEC provide by TBS : http://sourceforge.net/projects/matrixt ... /OpenELEC/
OpenELEC provide in this thread : viewtopic.php?f=155&t=8859&start=80#p32005
Other OpenELEC file ?
mikebzh44
 
Posts: 56
Joined: Wed Oct 01, 2014 9:37 pm

Re: Openelec for MatrixTBS

Postby vpeter » Thu Oct 16, 2014 10:52 pm

mikebzh44 Wrote:Which file are you talking about ?
OpenELEC provide in this thread : viewtopic.php?f=155&t=8859&start=80#p32005
OpenELEC-iMX6.arm-devel-20141003181523-r19314-gf779b3e......
You can help me buy new work notebook with paypal donation, after 8 years it's time to upgrade.
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=FLVT7ACMYAPS6
vpeter
 
Posts: 427
Joined: Sun Jul 27, 2014 2:12 am
Location: Slovenia

PreviousNext

Return to Announcements

Who is online

Users browsing this forum: No registered users and 9 guests