Moderator Control Panel ]

How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.13

Re: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby NightMare » Fri Feb 21, 2014 11:23 pm

Please explain to us step by step :)
NightMare
 
Posts: 8
Joined: Wed May 30, 2012 9:36 am

Re: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby updatelee » Fri Feb 21, 2014 11:38 pm

I'll post something tonight when i get home

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: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby updatelee » Sat Feb 22, 2014 5:13 am

I use imx_usb_loader to load a custom u-boot and boot the box. works good.

Im now using the 2013 u-boot included in yocto. I can boot my SD card now very easily.

Code: Select All Code
U-Boot > printenv
baudrate=115200
boot_fdt=try
bootcmd=mmc dev ${mmcdev};if mmc rescan; then if run loadbootscript; then run bootscript; else if run loaduimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fi
bootdelay=1
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0
ethact=FEC
ethprime=FEC
fdt_addr=0x18000000
fdt_file=imx6q-sabresd.dtb
fdt_high=0xffffffff
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x12000000
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}
loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}
mmcargs=setenv bootargs console=${console},${baudrate} ${mmcroot} ${video}
mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootm ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootm; else ec;
mmcdev=2
mmcpart=1
mmcroot=root=/dev/mmcblk1p2 rootwait rw
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_cmd} ${uimage}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if;
script=boot.scr
uimage=uImage
update_sd_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if mmc dev ${mmcdev}; then if ${get_cmd} ${update_sd_firmware_filename}; then setexpr fw_sz ${filesize} / 0x200i
video=video=mxcfb1[biggrin]ev=ldb,LDB-XGA,if=RGB666 video=mxcfb0[biggrin]ev=hdmi,1920x1080M@60 video=mxcfb1[redface]ff video=mxcfb2[redface]ff fbmem=28M consoleblank=0
 
Environment size: 2053/8188 bytes


that'll boot the eMMC. To boot the SD card change

setenv mmcdev 1
setenv mmcroot root=/dev/mmcblk0p2 rootwait rw
run bootcmd

the partition layout is for example on eMMC (same idea for SD)

Code: Select All Code
root@imx6qsabresd:~# fdisk /dev/mmcblk1
 
The number of cylinders for this disk is set to 481280.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
 
Command (m for help): p
 
Disk /dev/mmcblk1: 15.7 GB, 15770583040 bytes
4 heads, 16 sectors/track, 481280 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
 
        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk1p1   *          65         192        4096   c Win95 FAT32 (LBA)
/dev/mmcblk1p2             193      481280    15394816  83 Linux


format the partitions
mkfs.vfat /dev/mmcblk1p1
mkfs.ext3 /dev/mmcblk1p2

mkdir /media/mmcblk1p1
mkdir /media/mmcblk1p2
mount /dev/mmcblk1p1 /media/mmcblk1p1
mount /dev/mmcblk1p2 /media/mmcblk1p2

then copy uImage to /media/mmcblk1p1 and extract the rootfs.tar.bz2 to /media/mmcblk1p2

edit: I noticed after I was talking about eMMC and SD cards alot all mixed together.
mmcblk0 = SD
mmcblk1 = eMMC

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: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby updatelee » Sat Feb 22, 2014 5:15 am

So for additional hardware you need a usb cable (mini usb on one end) and also a ttl usart usb adapter.

flip the switch on the Matrix to burn mode.

open minicom and Ctrl-A O to change the options, select the right com port, 115200 8N1 turn all flow control off.

bootup the Matrix, run imx_usb_loader, quickly press enter in minicom to stop the boot process.

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: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby NeuerUser » Thu Mar 20, 2014 6:07 pm

Hi

I just received my Matrix and am now trying to get working what I need. I am pretty new to embedded development (although do know Linux), and this seems to be a major task. Hope I am successful :-)

What I finally need is:
  • Kernel 3.10 (with driver support for a special miniPCIe card)
  • HW accelerated GPU and VPU
  • QT5
Well, I am already stuck at some of the very first steps:
  • I can't get network working on the pre-installed u-boot. E.g. "dhcp" never returns any address. The HW is ok, as I have network in the preinstalled xbmc.
  • Seems I need a newer u-boot anyway as the newer kernels require a dtb (not sure where to get that from; hope, it's included in Yocto...).
So, I started with this thread, following the instructions linked by Cjcr in the first post. I temporarily loaded the compiled u-boot onto the Matrix as described by updatelee. However, u-boot is not able to recognize the mmc card (not mmcdev 0 nor mmcdev1 nor mmcdev 3). Network is not working either, so no tftpboot.
U-Boot 2013.10 (Mar 20 2014 - 08:28:12)

CPU: Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: WDOG
Board: MX6-SabreSD
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
MMC: no card present
MMC init failed
Using default environment

auto-detected panel HDMI
Display: HDMI (1024x768)
In: serial
Out: serial
Err: serial
Net: Phy not found
PHY reset timed out
FEC [PRIME]
Warning: failed to set MAC address

Hit any key to stop autoboot: 0
MMC: no card present
mmc1(part 0) is current device
MMC: no card present
U-Boot > setenv ethaddr 1E:ED:19:27:1A:B3
U-Boot > setenv autoload no
U-Boot > dhcp
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5

Retry count exceeded; starting again

Abort
U-Boot > printenv
autoload=no
baudrate=115200
boot_fdt=try
bootcmd=mmc dev ${mmcdev};if mmc rescan; then echo SD/MMC found on device ${mmcdev};if run loadbootenv; then run importbootenv;fi;echo ;
bootdelay=1
bootscript=echo Running bootscript from mmc ...; source
console=ttymxc0,115200
ethact=FEC
ethaddr=1E:ED:19:27:1A:B3
ethprime=FEC
fdt_addr=0x11000000
fdt_file=imx6q-sabresd.dtb
fdt_high=0xffffffff
importbootenv=echo Importing environment from mmc (uEnv.txt)...; env import -t ${loadaddr} ${filesize}
initrd_high=0xffffffff
ip_dyn=yes
loadaddr=0x12000000
loadbootenv=load mmc ${mmcdev}:${mmcpart} ${loadaddr} uEnv.txt;
loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};
loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} /dtbs/${fdt_file}
loaduimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${uimage}
loadzimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} zImage
mmcargs=setenv bootargs console=${console}${optargs} root=${mmcroot} rootfstype=${mmcrootfstype} video=${video}
mmcboot=echo Booting from mmc ...; run mmcargs; bootz ${loadaddr} - ${fdt_addr};
mmcdefault=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootm;
mmcdev=1
mmcpart=1
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait fixrtc
netargs=setenv bootargs console=${console},${baudrate} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp
netboot=echo Booting from net ...; run netargs; if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; ${get_;
script=boot.scr
uimage=uImage
update_sd_firmware=if test ${ip_dyn} = yes; then setenv get_cmd dhcp; else setenv get_cmd tftp; fi; if mmc dev ${mmcdev}; then if ${geti

Environment size: 2486/8188 bytes
U-Boot > setenv mmcdev 3
U-Boot > boot
MMC Device 3 not found
no mmc device at slot 3
MMC: no card present
U-Boot > setenv mmcdev 0
U-Boot > boot
Card did not respond to voltage select!
mmc0(part 0) is current device
Card did not respond to voltage select!
U-Boot > setenv mmcdev 1
U-Boot > boot
MMC: no card present
mmc1(part 0) is current device
MMC: no card present
U


Can anybody help me getting a working updated u-boot onto the Matrix?
NeuerUser
 
Posts: 21
Joined: Thu Mar 20, 2014 5:07 pm

Re: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby updatelee » Thu Mar 20, 2014 10:57 pm

Im using 2013.10

networking is not working within u-boot nor 3.10.17 for me. 3.0.35 works fine.

3.10.17 is working well for GPU (VPU and GL), yocto has qt5.

Im using yocto, MatrixTV is good for a HTPC but yocto is alot better for a desktop interface.

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: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby NeuerUser » Thu Mar 20, 2014 11:14 pm

Hi updatelee

Could you share a bit about how you compiled 2013.10?

As I said: I did it according to the link of Cjcr in th efirst post, but the u-boot does not recognize any MMC in the Matrix. So something is definitely wrong.
NeuerUser
 
Posts: 21
Joined: Thu Mar 20, 2014 5:07 pm

Re: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby updatelee » Fri Mar 21, 2014 2:09 am

yocto uses 2013.10

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: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby milan » Fri Mar 21, 2014 4:06 am

Hi,

to get ethernet working in u-boot you have look for CONFIG_FEC_MXC_PHYADDR in mx6sabre_common.h and change it from 1 to 4. For the linux kernel you need 3.14-rcx. If you want 3.10 you have to backbort the phyfixup for the ar8085, it is in mach-imx6q.c i think.

Michael
milan
 
Posts: 16
Joined: Thu Feb 27, 2014 4:10 am

Re: How to boot from MicroSD/SD slot (?) - Ubuntu 13.10/K3.1

Postby updatelee » Fri Mar 21, 2014 6:03 am

ya I noticed 3.14 worked. Thanks at least I know where to look now, really appreciate it.

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

PreviousNext

Return to General discussion

Who is online

Users browsing this forum: No registered users and 6 guests