Moderator Control Panel ]

Linux questions

Linux questions

Postby updatelee » Thu Jan 23, 2014 11:00 am

OK Ive searched everywhere, cant find the info anywhere.

How do I flash the Matrix in Liinux ?

UDL
TBS6925/5980, Prof 7301/7500/8000, Genpix Skywalker-1, Skystar 2 Express HD
Hauppauge 950Q, Kworld 330U/435v3/445v3
Dreambox 800

I use Linux and support open source projects.
User avatar
updatelee
 
Posts: 374
Joined: Wed Jul 25, 2012 11:48 am
Location: CFB Edmonton

Re: Linux questions

Postby Cjcr » Thu Jan 23, 2014 9:41 pm

updatelee Wrote:OK Ive searched everywhere, cant find the info anywhere.

How do I flash the Matrix in Liinux ?

UDL

I think I've saw something about it (and how to do) in a BoundaryDevices(.com) page ... but I can't find the link right now.

I think they have written a tool to write on the eMMC/flash from Linux but I don't know if it will work on Matrix ...
Cjcr
 
Posts: 75
Joined: Sun Apr 18, 2010 10:22 pm

Re: Linux questions

Postby updatelee » Fri Jan 24, 2014 12:11 am

It's worth a try, esp if it's open source. I'll look tonight.

Wine doesn't have access to low level USB interactions, qemu doesn't support USB hot plug. Virtual box kernel modules won't compile on 3.13

So I'm stuck

UDL
TBS6925/5980, Prof 7301/7500/8000, Genpix Skywalker-1, Skystar 2 Express HD
Hauppauge 950Q, Kworld 330U/435v3/445v3
Dreambox 800

I use Linux and support open source projects.
User avatar
updatelee
 
Posts: 374
Joined: Wed Jul 25, 2012 11:48 am
Location: CFB Edmonton

Re: Linux questions

Postby mijanek » Fri Jan 24, 2014 12:41 am

Actually I don't know (didn't try ) hoy you can access the flash in boot mode under linux. But the relevant files and procedures from log:

booting into flash mode (but don't know how):
Code: Select All Code
ModuleID[2] LevelID[10]: ExecuteCommand--Boot[WndIndex:0], File is G:\Matrix\Matrix-System\MatrixTV\Profiles\MX6Q Linux Update\OS Firmware\u-boot-mx6q-sabresd.bin
ModuleID[2] LevelID[10]: ExecuteCommand--Load[WndIndex:0], File is G:\Matrix\Matrix-System\MatrixTV\Profiles\MX6Q Linux Update\OS Firmware\uImage, address is 0x10800000
ModuleID[2] LevelID[10]: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID[2] LevelID[10]: ExecuteCommand--Load[WndIndex:0], File is G:\Matrix\Matrix-System\MatrixTV\Profiles\MX6Q Linux Update\OS Firmware\initramfs.cpio.gz.uboot, address is 0x10C00000
ModuleID[2] LevelID[10]: PortMgrDlg(0)--Command Load excute successfully, retry count: 0
ModuleID[2] LevelID[10]: ExecuteCommand--Jump[WndIndex:0]


At this stage it changes the device to block device so you may write the flash...

The Update:
Code: Select All Code
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ ls /dev/*
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=1536 count=16
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ echo 0 > /sys/block/mmcblk0boot0/force_ro
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is send
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ dd if=$FILE of=/dev/mmcblk0boot0 bs=512 seek=2 skip=2
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ echo 1 > /sys/block/mmcblk0boot0/force_ro
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ echo 8 > /sys/devices/platform/sdhci-esdhc-imx.3/mmc_host/mmc0/mmc0:0001/boot_config
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is send
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ dd if=$FILE of=/dev/mmcblk0 bs=1M seek=1 conv=fsync
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is send
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ tar xf $FILE
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ sh mksdcard.sh /dev/mmcblk0
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ mkfs.ext3 -j /dev/mmcblk0p1
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ mkdir -p /mnt/mmcblk0p1
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ mount -t ext3 /dev/mmcblk0p1 /mnt/mmcblk0p1
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is pipe tar -jxv -C /mnt/mmcblk0p1
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is frf
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ umount /mnt/mmcblk0p1
ModuleID[2] LevelID[10]: ExecuteCommand--Push[WndIndex:0], Body is $ echo Update Complete!


Here it looks like it writes raw the uImage kernel on the begin of the mmcblk0 with 1M offset, which is behind the boot part of the u-boot, then in makes the FS... this looks like that:
Code: Select All Code
#!/bin/sh

# partition size in MB
BOOT_ROM_SIZE=10


# call sfdisk to create partition table
# destroy the partition table
node=$1
dd if=/dev/zero of=${node} bs=1024 count=1

sfdisk --force -uM ${node} << EOF
${BOOT_ROM_SIZE},,83
EOF

and than you just untar the rootfs on it...

but all is more or les guessing... :-(
mijanek
 
Posts: 70
Joined: Wed Jan 08, 2014 1:32 pm

Re: Linux questions

Postby l3iggs » Sun Apr 13, 2014 6:42 am

I'm very interested in how to flash the matrix from a linux host as well. I've done some searching and I found this thread: https://community.freescale.com/thread/284170
It doesn't look good...
I'd love the hear if anyone else has made any headway on this.
l3iggs
 
Posts: 11
Joined: Sat Apr 05, 2014 9:09 am

Re: Linux questions

Postby updatelee » Sun Apr 13, 2014 8:55 am

I gave up, wasnt worth the time.

I now flash by booting to an SD card then writing the eMMC from there. or just boot by tftp, its super fast if your going to be making alot of changes.

UDL
TBS6925/5980, Prof 7301/7500/8000, Genpix Skywalker-1, Skystar 2 Express HD
Hauppauge 950Q, Kworld 330U/435v3/445v3
Dreambox 800

I use Linux and support open source projects.
User avatar
updatelee
 
Posts: 374
Joined: Wed Jul 25, 2012 11:48 am
Location: CFB Edmonton


Return to General discussion

Who is online

Users browsing this forum: No registered users and 5 guests