| FORUM

FEDEVEL
Platform forum

Updating u-boot imx6-rex pro

Suriken , 11-30-2016, 09:21 AM
Hello,

I am having some doubts trying to update u-boot from my new board. I have not find a contact in the tutorial I am following so I hope you can point my in the right direction.
I have a imx6-rex pro with a development kit. I want to replace the ubuntu version which came with the microSD with yocto version but I am having a hard time to make it works.
I have been able to download the repository, compile images (base image since time needed to compile them is huge) but at the time of loading them, u-boot seems not to recognize the zImage as good so I get an error.
Then, I read on the internet that the 2009 u-boot version usually gives errors with other linux distros so I started to think about uploading the version to a newer one.

Then, here is when I found this page: http://www.imx6rex.com/contributors/uboot-2014/ which teaches how to upload u-boot without all the problems of tftpd and so on.
After such long introduction, here are my doubts:
Which version should I use (http://www.imx6rex.com/ > binaries)? 2GB I guess, but I'd prefer to be sure.

The biggest doubt comes when I try to modify ucl2.xml on MFGTools:
<LIST name="RexuBoot-2014" desc="Only boot u-Boot.bin">
<CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot-2014.imx" >Loading U-boot</CMD>
<CMD state="BootStrap" type="load" file="firmware/zImage" address="0x12000000" loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">Loading Kernel.</CMD>

<CMD state="BootStrap" type="load" file="firmware/fsl-image-mfgtool-initramfs-imx6qdlsolo.cpio.gz.u-boot" address="0x12C00000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">Loading Initramfs.</CMD>

<CMD state="BootStrap" type="load" file="firmware/zImage-imx6q-%board%.dtb" address="0x18000000"
loadSection="OTH" setSection="OTH" HasFlashHeader="FALSE">Loading device tree.</CMD>

<CMD state="BootStrap" type="jump" > Jumping to OS image. </CMD>
</LIST>
Should I update all imx6qdlsolo, imx6x and other names with my board name (imx6-rexpro...) or I can leave them as they are in the example.
Also, inside cfg.ini file, all SabreSD and sabresd names to imx6-rexpro or same as before?

Sorry for this long post but I have expent some days trying to figure out how to do this and I do not dare to try it becasuse of the risk of bricking the board.
robertferanec , 11-30-2016, 10:23 AM
@Suriken, this may help you http://www.imx6rex.com/open-rex/openrex-content/

Also, have a look at VOIPAC's wiki: http://wiki.voipac.com/xwiki/bin/view/imx6+rex/

- If you would like to update uBoot, do not forget, it is stored in SPI memory. Also, for Kernel 3.14 you can not use uBoot 2009 (it doesn't support Device tree).

- Rex PRO has 2GB DDR3.

- this may help you with MFG TOOL: http://www.imx6rex.com/open-rex/soft...setup-mfgtool/

For the latest MFGTOOL, just use this, should work:
<LIST name="OpenRex-uBootOnly" desc="Only boot u-boot.imx">
<CMD state="BootStrap" type="boot" body="BootStrap" file ="u-boot.imx" >Loading u-boot</CMD>
<CMD state="BootStrap" type="jump" > Jumping to u-boot. </CMD>
</LIST>

Also, have a look at our latest course, that could help you too: Learn the Essentials of creating uBoot, Linux and YOCTO for a board >
Suriken , 12-01-2016, 01:09 AM
I have read that 2014 u-boot from voipac DvD is the 2009 version adapted to imx6 rex by fedevel. So I should download, compile and reflash the 2015 version.
So, names in mfg tool are just to identify the uboot I am flashing, nothing else. Putting the right uboot file is key. I will try to understand the proccess by reading a little bit more and I will come back with doubts.

If I follow the documentation for open-rex, there is a key step I have to modify to adapt it for rexpro? I guess, all related to fetch files but compiling, uploading... should be the same.
Suriken , 12-01-2016, 08:41 AM
Well, I already got the u-boot 2015 compiled (bin and imx files). I copied to my windows machine under /OS Firmware folder and added the lines on ucl2.xml and cfg.ini

Just one question I am concerned about. Reading the tutorial, I see that it explains what those lines on ucl2.xml do. I see that there is one to load uboot, load kernel (zImage), load initramfs, device tree and jump to the OS image.

With your lines, it just load uboot and jump to the Os image. What is about zImage, initramfs and device tree? What are they for?

Also, on cfg.ini, platform board could be left as SabreSD or should I replace for another name? REXPRO? Rex-PRO??? same for variable board...
robertferanec , 12-01-2016, 08:54 AM
You need to replace LIST name with "OpenRex-uBootOnly". Only what you need is load the new uBoot into CPU. Don't worry about other stuff. You can start Linux from uBoot.

If it works oki, use this uBoot to re-flash SPI with the same uBoot image.
Suriken , 12-01-2016, 08:57 AM
If I don't re-flash SPI with the new uboot image, when I power it down, and up again, the uboot will be the original one? Can I do some resets (with reset command) to see if it works ok?
robertferanec , 12-01-2016, 09:01 AM
Yes, if you do not re-flash SPI, you still will have the original uBoot in the SPI and when you switch off MFGTOOLS, the original uBoot will boot up after power down / up.

For uBoot debugging is always the best do power off / on, rather then using RESET (unless you are sure you have configured the critical pins correctly).
Suriken , 12-01-2016, 09:19 AM
Ok, I will try to upload it and if it works, then I will reflash spi. I don't know which mmc use. I have 2009 uboot (but I have read it is the 2014 version from fedevel). So which mmc should I use? 0 or 1?

When my uboot boots, I see this line:
MMC: FSL_USDHC: 0,FSL_USDHC: 1

Also, for SPI re-flash, I see:

"First, fill the RAM with 0xFF’s for 512kb (0×80000 = 524288 bytes), at the location 0×10800000. We use this location in RAM to store the uBoot. I think this location could vary, but this is what is used on the official website so we will stick to that.
mw.b 0x10800000 0xFF 0x80000"

In my case, 2GB...0x80000 should be 0x200000. Same location?

I guess offsets 1kb and 511kb are ok.

Last but not least, machine id (f8c) is needed? Well, I think I will find this when I try to boot kernel for the first time.


robertferanec , 12-01-2016, 02:41 PM
MMC: Depends in what socket the SD card is plugged in. You can simply try MMC commands. Just run help in uBoot, you will see how to use it, it is not difficult. Then, check info about the inserted card - you will immediately see what mmc number will work.

- 0x80000 is length. This is the space which is needed for uBoot (when you will be transferring uBoot over network, you will see how big it is and 0x80000 must be larger than uBoot size)

- I think machine ID is not used in the new kernels, but I am not 100% sure about this
Suriken , 12-02-2016, 12:38 AM
I had both resistors switched to micro usb position, also I switched JP1 to JP2 (JP1 no jumper, JP2 and JP3 with jumper) but the board doesn't boot up. When I plug it it sounds a bit (something electrical) but at a couple of seconds later, that sound stops and start over again.

That sound was made before moving resistors and jumper but it was constant all the time.

MFGTool doesn't detect anything (No device connected) and hyperterminal doesn't show anything on screen neither.

I think I will not be able to upload the uboot this way.
robertferanec , 12-02-2016, 10:11 AM
The sound is ok. These are inductors and it may depend on the current flowing into the module. So do not worry.

This is important ( http://www.imx6rex.com/software/how-...t_empty_module ):
If your module is completely new, JP2 must not be fitted. If you have already programmed efuses, JP2 must be fitted. The USB series resistors must be in positions: R62 Fitted / R65 Fitted / R63 Not Fitted / R67 Not Fitted.

It should then work. You need to wait until driver is installed.
Suriken , 12-12-2016, 12:13 AM
Sorry I have been out of work this very last week. I will try today or tomorrow to move resistors again and see what happens. I think my module is not completely new as it already has a uboot and mac address.

In this case (mine) I should fit JP2 and JP3 but JP1 should be unfitted, shouldn't I?

I am re-reading my notes from the previous week to see where I left, other question:

"0x80000 is length. This is the space which is needed for uBoot (when you will be transferring uBoot over network, you will see how big it is and 0x80000 must be larger than uBoot size)"

It is suppose that I don't transfer the uboot over network. The file size in my sd card or my computer should be enough, shouldn't it? so I convert the bytes to an hex value and it would be ok.
robertferanec , 12-12-2016, 10:12 AM
It is suppose that I don't transfer the uboot over network. The file size in my sd card or my computer should be enough, shouldn't it? so I convert the bytes to an hex value and it would be ok.
Approximately. Some software shows a little bit different numbers (e.g. file size vs space occupied etc.)
Suriken , 12-13-2016, 08:22 AM
Originally posted by robertferanec

Approximately. Some software shows a little bit different numbers (e.g. file size vs space occupied etc.)
in Windows, it takes about 322Kb. So if I set 0x80000 (512Kb) it would be ok. I won't break anything, will I?

I will try to have the dev board with the resistors changed by tomorrow so I can test the proccess again.

EDIT: I had the board modified today. I tested it with mfgtools and I got what you can see on the images.

the first one shows a bad crc... anything wrong? The second one, the version supposed to be at this time. Is everything ok? Should I be worried about something? Ready to replace uboot on SPI? What about my original question in this post?

robertferanec , 12-13-2016, 10:29 AM
Try "saveenv", that may help to fix the bad CRC error.

Before you flash it, you may want to test if your new uBoot is working correctly e.g. can you read SD cards, is ethernet working, can you access SPI memory, are the memory registers sets correctly and DDR memory is working reliably, etc ... Even if you flash it now, you still should able to use MFGTOOLS to reflash the SPI later - if needed.
Suriken , 12-14-2016, 01:28 AM
Ok, I will try that. It is a good idea see if everything is working fine before going further. Thank you!
Suriken , 12-16-2016, 01:47 AM
That fixed crc error. Thank you.

I have other problem right now. I have a version of yocto which comes with a uboot which can be loaded in memory. No need of reflashing. I got it from voipac page I think).

Now I have a newer uboot through mfgtools without flashing spi, I tried the command boot with this image. And it works. it loads yocto through my uboot 2015 version.

Then, I thought I could do the same with a newer version of ubuntu/debian. And for that, I followed the next tutorial http://www.imx6rex.com/software/how-...3-15-and-3-16/
I used 3.15 kernel.
Everything went fine, I got the sd card with zImage, uImage (both in / folder) and every file I think it needs. But at the time of using "boot" command, I get this message: (filesystem is ext3/4 (both tested) as fat32 can't handle symlinks)

Rex U-Boot > boot
switch to partitions #0, OK
mmc0 is current device
** Unrecognized filesystem type **
** Unrecognized filesystem type **
Booting from net ...
Using FEC device
TFTP from server 192.168.0.1; our IP address is 192.168.0.150
Filename 'imx6/zImage'.
Load address: 0x10800000
Loading: T T T T T T T T T T
Retry count exceeded; starting again
Using FEC device
TFTP from server 192.168.0.1; our IP address is 192.168.0.150
Filename 'imx6/zImage'.
Load address: 0x10800000
Loading: T T T T T T T T T

All "T"s start being an asterisk and they go increasing until count exceeds.

I see it tries imx6/zImage folder so I created one with that name and put inside both files. I got the same result.

Any ideas about this?
robertferanec , 12-16-2016, 08:31 AM
Did you use printenv /setenv / savenv to update the default env parameters according to your board?
Suriken , 12-19-2016, 12:05 AM
Um, I don't think so. I just did setenv to remove crc error. Also I tested some commands I found with "help". What should I modify with setenv/saveenv? My board is a imx6 rex pro 2gb.
robertferanec , 12-19-2016, 11:43 AM
In the environmental variables you need to setup some things about your board. For example, you need to setup where your kernel is located, where your filesystem is located, if you would like to boot up into display, what resolution, what interface, etc.

Here you have an example, it will help you:
Code:
setenv bootargs_mmc 'setenv bootargs ${bootargs} ip=dhcp root=/dev/mmcblk0p1 rootwait video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB666 vmalloc=400M fbmem=28M fbcon=28M'setenv bootcmd_mmc 'run bootargs_mmc ; mmc dev 1; ext2load mmc 1 0x10800000 uImage-gpu 3916636; bootm 0x10800000'
Suriken , 12-22-2016, 03:54 AM
I have tested for the last two days and I got nothing. I am able to read the uImage from SD card and my kernel it seems to be loading but at some point it got stuck and never ends.

I tried with a couple of tutorial for creating the filesystem, different images of ubuntu/debian prepared for imx6rexpro and same result.

It could be related with the load of u-boot? I haven't flashed it yet. I am testing it through mfgtool program.
robertferanec , 12-22-2016, 12:20 PM
Could you attach the complete console output?
Suriken , 12-30-2016, 04:52 AM
This is the output as soon as I execute "Start" on MFGtools:
Code:
U-Boot 2015.04-g9de6034 (Dec 13 2016 - 06:48:43)CPU:   Freescale i.MX6Q rev1.2 at 792 MHzCPU:   Temperature 23 CReset cause: PORBoard: MX6 Rex - proI2C:   readyDRAM:  2 GiBMMC:   FSL_SDHC: 0, FSL_SDHC: 1SF: Detected SST25VF032B with page size 256 Bytes, erase size 4 KiB, total 4 MiBIn:    serialOut:   serialErr:   serialNet:   FEC [PRIME]Boot from USB for mfgtoolsUse default environment for                  mfgtoolsRun bootcmd_mfg: <NULL>Rex U-Boot >

then, I execute:
Code:
Rex U-Boot > setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra}Rex U-Boot > ext2load mmc 0 0x48000000 uImage4454450 bytes read in 332 ms (12.8 MiB/s)Rex U-Boot >
And last:
bootm 0x48000000

The rest of the output from here:
Code:
Rex U-Boot > bootm 0x48000000## Booting kernel from Legacy Image at 48000000 ...   Image Name:   3.15.9-rex5   Image Type:   ARM Linux Kernel Image (uncompressed)   Data Size:    4454386 Bytes = 4.2 MiB   Load Address: 10008000   Entry Point:  10008000   Verifying Checksum ... OK   Loading Kernel Image ... OKNo gpc device node -9, force to ldo-enable.Starting kernel ...[    0.000000] Booting Linux on physical CPU 0x0[    0.000000] Initializing cgroup subsys cpuset[    0.000000] Initializing cgroup subsys cpu[    0.000000] Initializing cgroup subsys cpuacct[    0.000000] Linux version 3.15.9-rex5 (root@ubuntu) (gcc version 4.8.3 20140401 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2014.04 - Linaro GCC 4.8-2014.04) ) #1 SMP Wed Dec 21 23:51:40 PST 2016[    0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache[    0.000000] Machine model: Rex i.MX6 Quad Board[    0.000000] cma: CMA: reserved 16 MiB at 3e800000[    0.000000] Memory policy: Data cache writealloc[    0.000000] PERCPU: Embedded 9 pages/cpu @ed7ac000 s14528 r8192 d14144 u36864[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522768[    0.000000] Kernel command line: console=ttymxc0,115200 console=tty0 root=/dev/mmcblk0p1 rootwait video=HDMI-A-1:1280x720@60e[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)[    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)[    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)[    0.000000] allocated 4194304 bytes of page_cgroup[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups[    0.000000] Memory: 2045312K/2097152K available (8535K kernel code, 582K rwdata, 3208K rodata, 534K init, 950K bss, 51840K reserved, 1318912K highmem)[    0.000000] Virtual kernel memory layout:[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)[    0.000000]     vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)[    0.000000]     lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)[    0.000000]       .text : 0xc0008000 - 0xc0b7ff98   (11744 kB)[    0.000000]       .init : 0xc0b80000 - 0xc0c058c0   ( 535 kB)[    0.000000]       .data : 0xc0c06000 - 0xc0c97818   ( 583 kB)[    0.000000]        .bss : 0xc0c97818 - 0xc0d85304   ( 951 kB)[    0.000000] Hierarchical RCU implementation.[    0.000000]     RCU dyntick-idle grace-period acceleration is enabled.[    0.000000] NR_IRQS:16 nr_irqs:16 16[    0.000000] L310 cache controller enabled[    0.000000] l2x0: 16 ways, CACHE_ID 0x410000c7, AUX_CTRL 0x32070000, Cache size: 1024 kB[    0.000000] Switching to timer-based delay loop[    0.000007] sched_clock: 32 bits at 66MHz, resolution 15ns, wraps every 65075262448ns[    0.000655] Console: colour dummy device 80x30[    0.000983] console [tty0] enabled[    0.001003] Calibrating delay loop (skipped), value calculated using timer frequency.. 132.00 BogoMIPS (lpj=660000)[    0.001028] pid_max: default: 32768 minimum: 301[    0.001133] Security Framework initialized[    0.001168] AppArmor: AppArmor disabled by boot time parameter[    0.001182] Yama: becoming mindful.[    0.001350] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)[    0.001370] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)[    0.001999] Initializing cgroup subsys memory[    0.002029] Initializing cgroup subsys devices[    0.002048] Initializing cgroup subsys freezer[    0.002063] Initializing cgroup subsys net_cls[    0.002078] Initializing cgroup subsys blkio[    0.002092] Initializing cgroup subsys perf_event[    0.002141] CPU: Testing write buffer coherency: ok[    0.002426] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000[    0.002497] Setting up static identity map for 0x1081f8e8 - 0x1081f940[    0.006539] CPU1: Booted secondary processor[    0.006565] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001[    0.007587] CPU2: Booted secondary processor[    0.007608] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002[    0.008608] CPU3: Booted secondary processor[    0.008628] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003[    0.008745] Brought up 4 CPUs[    0.008824] SMP: Total of 4 processors activated.[    0.008839] CPU: All CPU(s) started in SVC mode.[    0.009484] devtmpfs: initialized[    0.013440] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4[    0.015193] xor: measuring software checksum speed[    0.110126]    arm4regs  :  1212.000 MB/sec[    0.210123]    8regs     :   776.400 MB/sec[    0.310123]    32regs    :   763.600 MB/sec[    0.410122]    neon      :   827.600 MB/sec[    0.410138] xor: using function: arm4regs (1212.000 MB/sec)[    0.410161] pinctrl core: initialized pinctrl subsystem[    0.410511] regulator-dummy: no parameters[    0.417961] NET: Registered protocol family 16[    0.420680] DMA: preallocated 256 KiB pool for atomic coherent allocations[    0.421389] cpuidle: using governor ladder[    0.421406] cpuidle: using governor menu[    0.421498] CPU identified as i.MX6Q, silicon rev 1.2[    0.429081] vdd1p1: 800 <--> 1375 mV at 1100 mV [    0.429463] vdd3p0: 2800 <--> 3150 mV at 3000 mV [    0.429836] vdd2p5: 2000 <--> 2750 mV at 2400 mV [    0.430231] vddarm: 725 <--> 1450 mV at 1150 mV [    0.430642] vddpu: 725 <--> 1450 mV [    0.431030] vddsoc: 725 <--> 1450 mV at 1175 mV [    0.438133] No ATAGs?[    0.438166] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.[    0.438191] hw-breakpoint: maximum watchpoint size is 4 bytes.[    0.439108] imx6q-pinctrl 20e0000.iomuxc: initialized IMX pinctrl driver[    0.610501] raid6: int32x1    116 MB/s[    0.780226] raid6: int32x2    155 MB/s[    0.950424] raid6: int32x4    168 MB/s[    1.120267] raid6: int32x8    190 MB/s[    1.290119] raid6: neonx1     592 MB/s[    1.460205] raid6: neonx2     638 MB/s[    1.630124] raid6: neonx4     634 MB/s[    1.800171] raid6: neonx8     501 MB/s[    1.800186] raid6: using algorithm neonx2 (638 MB/s)[    1.800201] raid6: using intx1 recovery algorithm[    1.802334] mxs-dma 110000.dma-apbh: initialized[    1.802934] 3P3V: 3300 mV [    1.803273] usbh1_vbus: 5000 mV [    1.803616] usb_otg_vbus: 5000 mV [    1.804550] SCSI subsystem initialized[    1.805026] usbcore: registered new interface driver usbfs[    1.805103] usbcore: registered new interface driver hub[    1.805237] usbcore: registered new device driver usb[    1.806568] i2c i2c-0: IMX I2C adapter registered[    1.807248] i2c i2c-1: IMX I2C adapter registered[    1.807528] i2c i2c-2: IMX I2C adapter registered[    1.807650] Linux video capture interface: v2.00[    1.807733] pps_core: LinuxPPS API ver. 1 registered[    1.807751] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>[    1.807787] PTP clock support registered[    1.808007] Advanced Linux Sound Architecture Driver Initialized.[    1.809321] cfg80211: Calling CRDA to update world regulatory domain[    1.809407] NetLabel: Initializing[    1.809421] NetLabel:  domain hash size = 128[    1.809434] NetLabel:  protocols = UNLABELED CIPSOv4[    1.809498] NetLabel:  unlabeled traffic allowed by default[    1.809890] Switched to clocksource mxc_timer1[    1.869167] NET: Registered protocol family 2[    1.869859] TCP established hash table entries: 8192 (order: 3, 32768 bytes)[    1.870008] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)[    1.870164] TCP: Hash tables configured (established 8192 bind 8192)[    1.870326] TCP: reno registered[    1.870349] UDP hash table entries: 512 (order: 2, 16384 bytes)[    1.870403] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)[    1.870702] NET: Registered protocol family 1[    1.871143] RPC: Registered named UNIX socket transport module.[    1.871163] RPC: Registered udp transport module.[    1.871175] RPC: Registered tcp transport module.[    1.871188] RPC: Registered tcp NFSv4.1 backchannel transport module.[    1.871655] hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available[    1.873256] futex hash table entries: 1024 (order: 4, 65536 bytes)[    1.873380] audit: initializing netlink subsys (disabled)[    1.873427] audit: type=2000 audit(1.859:1): initialized[    2.065572] bounce pool size: 64 pages[    2.065879] VFS: Disk quotas dquot_6.5.2[    2.065950] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)[    2.066567] NFS: Registering the id_resolver key type[    2.066615] Key type id_resolver registered[    2.066631] Key type id_legacy registered[    2.066655] nfs4filelayout_init: NFSv4 File Layout Driver Registering...[    2.066895] fuse init (API version 7.23)[    2.067111] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled[    2.067848] msgmni has been set to 1450[    2.069053] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)[    2.069224] io scheduler noop registered[    2.069242] io scheduler deadline registered[    2.069296] io scheduler cfq registered (default)[    2.069759] imx-weim 21b8000.weim: Driver registered.[    2.075361] imx-sdma 20ec000.sdma: initialized[    2.075903] imx-sdma 20ec000.sdma: firmware not found[    2.076100] Serial: IMX driver[    2.076421] 2020000.serial: ttymxc0 at MMIO 0x2020000 (irq = 58, base_baud = 5000000) is a IMX[    2.904720] console [ttymxc0] enabled[    2.909139] 21e8000.serial: ttymxc1 at MMIO 0x21e8000 (irq = 59, base_baud = 5000000) is a IMX[    2.918522] [drm] Initialized drm 1.1.0 20060810[    2.923708] at24 1-0057: 256 byte 24c02 EEPROM, writable, 1 bytes/write[    2.934335] ahci-imx 2200000.sata: SSS flag set, parallel bus scan disabled[    2.941368] ahci-imx 2200000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode[    2.950205] ahci-imx 2200000.sata: flags: ncq sntf stag pm led clo only pmp pio slum part ccc apst [    2.960911] scsi0 : ahci_platform[    2.964613] ata1: SATA max UDMA/133 mmio [mem 0x02200000-0x02203fff] port 0x100 irq 71[    2.974680] spi_imx 200c000.ecspi: probed[    2.979865] m25p80 spi2.0: sst25vf032b (4096 Kbytes)[    2.985969] spi_imx 2010000.ecspi: probed[    2.991137] 2188000.ethernet supply phy not found, using dummy regulator[    3.013659] libphy: fec_enet_mii_bus: probed[    3.018502] fec 2188000.ethernet eth0: registered PHC device 0[    3.024868] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver[    3.031449] ehci-mxc: Freescale On-Chip EHCI Host driver[    3.036941] usbcore: registered new interface driver usb-storage[    3.043841] imx6q-pinctrl 20e0000.iomuxc: pin MX6Q_PAD_GPIO_1 already requested by 2.regulator; cannot claim for 2184000.usb[    3.055121] imx6q-pinctrl 20e0000.iomuxc: pin-137 (2184000.usb) status -22[    3.062041] imx6q-pinctrl 20e0000.iomuxc: could not request pin 137 (MX6Q_PAD_GPIO_1) from group usbotggrp  on device 20e0000.iomuxc[    3.073989] imx_usb 2184000.usb: Error applying setting, reverse things back[    3.084427] imx6q-pinctrl 20e0000.iomuxc: pin MX6Q_PAD_EIM_D31 already requested by 1.regulator; cannot claim for 2184200.usb[    3.095782] imx6q-pinctrl 20e0000.iomuxc: pin-52 (2184200.usb) status -22[    3.102611] imx6q-pinctrl 20e0000.iomuxc: could not request pin 52 (MX6Q_PAD_EIM_D31) from group usbh1grp  on device 20e0000.iomuxc[    3.114471] imx_usb 2184200.usb: Error applying setting, reverse things back[    3.122806] ci_hdrc ci_hdrc.1: doesn't support gadget[    3.127887] ci_hdrc ci_hdrc.1: EHCI Host Controller[    3.132821] ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1[    3.159916] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00[    3.165591] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002[    3.172425] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1[    3.179670] usb usb1: Product: EHCI Host Controller[    3.184577] usb usb1: Manufacturer: Linux 3.15.9-rex5 ehci_hcd[    3.190441] usb usb1: SerialNumber: ci_hdrc.1[    3.195521] hub 1-0:1.0: USB hub found[    3.199335] hub 1-0:1.0: 1 port detected[    3.204075] mousedev: PS/2 mouse device common for all mice[    3.210219] i2c /dev entries driver[    3.214450] IR NEC protocol handler initialized[    3.219000] IR RC5(x) protocol handler initialized[    3.223831] IR RC6 protocol handler initialized[    3.228376] IR JVC protocol handler initialized[    3.232939] IR Sony protocol handler initialized[    3.237571] IR RC5 (streamzap) protocol handler initialized[    3.243168] IR SANYO protocol handler initialized[    3.247885] IR Sharp protocol handler initialized[    3.252618] IR MCE Keyboard/mouse protocol handler initialized[    3.260034] imx2-wdt 20bc000.wdog: IMX2+ Watchdog Timer enabled. timeout=60s (nowayout=1)[    3.268527] sdhci: Secure Digital Host Controller Interface driver[    3.274745] sdhci: Copyright(c) Pierre Ossman[    3.279117] sdhci-pltfm: SDHCI platform and OF driver helper[    3.285593] sdhci-esdhc-imx 2194000.usdhc: could not get ultra high speed state, work on normal mode[    3.295798] mmc0: no vqmmc regulator found[    3.299936] mmc0: no vmmc regulator found[    3.319923] ata1: SATA link down (SStatus 0 SControl 300)[    3.349912] mmc0: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA[    3.360822] sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode[    3.370032] mmc1: no vqmmc regulator found[    3.374147] mmc1: no vmmc regulator found[    3.419910] mmc1: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA[    3.430367] usbcore: registered new interface driver usbhid[    3.435958] usbhid: USB HID core driver[    3.443346] imx-ipuv3 2400000.ipu: IPUv3H probed[    3.448501] imx-ipuv3 2800000.ipu: IPUv3H probed[    3.456233] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).[    3.462902] [drm] No driver support for vblank timestamp query.[    3.471008] imx-drm display-subsystem.10: bound imx-ipuv3-crtc.0 (ops ipu_crtc_ops)[    3.480818] imx-drm display-subsystem.10: bound imx-ipuv3-crtc.1 (ops ipu_crtc_ops)[    3.490620] imx-drm display-subsystem.10: bound imx-ipuv3-crtc.2 (ops ipu_crtc_ops)[    3.498412] imx-drm display-subsystem.10: bound imx-ipuv3-crtc.3 (ops ipu_crtc_ops)[    3.507332] imx-hdmi 120000.hdmi: Detected HDMI controller 0x13:0xa:0xa0:0xc1[    3.514631] imx-drm display-subsystem.10: bound 120000.hdmi (ops hdmi_ops)[    3.521719] [drm] forcing HDMI-A-1 connector ON[    3.563780] mmc1: new high speed SDHC card at address 0007[    3.564238] mmcblk0: mmc1:0007 SD16G 14.4 GiB [    3.565714]  mmcblk0: p1[    3.579042] Console: switching to colour frame buffer device 160x45[    3.604039] imx-drm display-subsystem.10: fb0:  frame buffer device[    3.610420] imx-drm display-subsystem.10: registered panic notifier[    3.616774] [drm] Initialized imx-drm 1.0.0 20120507 on minor 0[    3.624654] sgtl5000 0-000a: sgtl5000 revision 0x11[    3.646946] 0-000a: 1200 mV normal [    3.650581] sgtl5000 0-000a: Using internal LDO instead of VDDD[    3.671653] imx-sgtl5000 sound.13: sgtl5000 <-> 2028000.ssi mapping ok[    3.683778] oprofile: using arm/armv7-ca9[    3.690329] TCP: cubic registered[    3.696041] NET: Registered protocol family 10[    3.703704] mip6: Mobile IPv6[    3.708985] NET: Registered protocol family 17[    3.715782] Key type dns_resolver registered[    3.724223] ThumbEE CPU extension supported.[    3.730299] Registering SWP/SWPB emulation handler[    3.737326] registered taskstats version 1[    3.743891] Btrfs loaded[    3.748238] usb_otg_vbus: disabling[    3.760522] ALSA device list:[    3.765211]   #0: imx6-rex-sgtl5000[    3.771823] EXT4-fs (mmcblk0p1): mounting ext3 file system using the ext4 subsystem[    3.792268] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)[    3.802201] VFS: Mounted root (ext3 filesystem) readonly on device 179:1.[    3.819761] devtmpfs: mounted[    3.825377] Freeing unused kernel memory: 532K (c0b80000 - c0c05000)[    4.248948] random: init urandom read with 28 bits of entropy available[    4.419288] init: plymouth-upstart-bridge main process (88) terminated with status 1[    4.429377] init: plymouth-upstart-bridge main process ended, respawning[    4.472411] init: plymouth-upstart-bridge main process (98) terminated with status 1[    4.482172] init: plymouth-upstart-bridge main process ended, respawning[    4.515010] init: plymouth-upstart-bridge main process (102) terminated with status 1[    4.525029] init: plymouth-upstart-bridge main process ended, respawning[    4.551438] init: plymouth-upstart-bridge main process (105) terminated with status 1[    4.561375] init: plymouth-upstart-bridge main process ended, respawning[    4.600995] init: ureadahead main process (91) terminated with status 5 * Starting Mount filesystems on boot                                                                                               [ OK ] * Starting Populate /dev filesystem                                                                                                [ OK ] * Stopping Populate /dev filesystem                                                                                                [ OK ] * Starting Populate and link to /run filesystem                                                                                    [ OK ] * Stopping Populate and link to /run filesystem                                                                                    [ OK ] * Stopping Track if upstart is running in a container                                                                              [ OK ] * Starting Initialize or finalize resolvconf                                                                                       [ OK ] * Starting Signal sysvinit that virtual filesystems are mounted                                                                    [ OK ] * Starting Signal sysvinit that virtual filesystems are mounted                                                                    [ OK ] * Starting Bridge udev events into upstart                                                                                         [ OK ] * Starting Signal sysvinit that remote filesystems are mounted                                                                     [ OK ] * Starting device node and kernel event manager                                                                                    [ OK ] * Starting load modules from /etc/modules                                                                                          [ OK ] * Starting cold plug devices                                                                                                       [ OK ] * Starting log initial device creation                                                                                             [ OK ] * Stopping load modules from /etc/modules                                                                                          [ OK ] * Starting set console font                                                                                                        [ OK ] * Stopping set console font                                                                                                        [ OK ] * Starting userspace bootsplash                                                                                                    [ OK ] * Stopping userspace bootsplash                                                                                                    [ OK ] * Starting Send an event to indicate plymouth is up                                                                                [ OK ] * Stopping Send an event to indicate plymouth is up                                                                                [ OK ] * Stopping cold plug devices                                                                                                       [ OK ] * Stopping log initial device creation                                                                                             [ OK ] * Starting configure network device security                                                                                       [ OK ] * Starting Mount network filesystems                                                                                               [ OK ] * Starting configure network device security                                                                                       [ OK ] * Stopping Mount network filesystems                                                                                               [ OK ] * Starting configure network device                                                                                                [ OK ] * Starting Bridge socket events into upstart                                                                                       [ OK ]The disk drive for / is not ready yet or not present.keys:Continue to wait, or Press S to skip mounting or M for manual recovery
If I press Enter, it does nothing, so I usually press S or M.


With S, it adds:
Code:
* Starting Signal sysvinit that local filesystems are mounted                                                                      [ OK ] * Starting configure network device security                                                                                       [ OK ] * Stopping Mount filesystems on boot                                                                                               [ OK ] * Starting Failsafe Boot Delay                                                                                                     [ OK ] * Starting flush early job output to logs                                                                                          [ OK ] * Starting configure virtual network devices                                                                                       [ OK ] * Starting flush early job output to logs                                                                                          [fail] * Starting Bridge file events into upstart                                                                                         [ OK ] * Starting system logging daemon                                                                                                   [ OK ] * Starting Mount network filesystems                                                                                               [ OK ] * Starting configure network device                                                                                                [ OK ] * Stopping Failsafe Boot Delay                                                                                                     [ OK ] * Starting System V initialisation compatibility                                                                                   [ OK ] * Stopping System V initialisation compatibility                                                                                   [ OK ] * Stopping Mount network filesystems                                                                                               [ OK ] * Starting System V runlevel compatibility                                                                                         [ OK ] * Starting regular background program processing daemon                                                                            [ OK ] * Starting save kernel messages                                                                                                    [ OK ] * Starting save kernel messages                                                                                                    [fail] * Stopping System V runlevel compatibility                                                                                         [ OK ] * Starting OpenSSH server                                                                                                          [ OK ]
With M:
Code:
 Starting Mount filesystems on boot                                                                                               [fail] * Starting set console keymap                                                                                                      [ OK ]
In any of those 3 options, the code goes further.

Red led on imx6 board keeps blinking red. Green is on the whole time.
robertferanec , 12-30-2016, 08:56 AM
I am not sure, but maybe this is the problem?

Code:
VFS: Mounted root (ext3 filesystem) readonly on device 179:1.
You may want to add 'rw' into your console command
Code:
Kernel command line: console=ttymxc0,115200 console=tty0 root=/dev/mmcblk0p1 rootwait video=HDMI-A-1:1280x720@60e
Maybe try something like this:
Code:
console=ttymxc0,115200 console=tty0 root=/dev/mmcblk0p1 rootwait rw video=HDMI-A-1:1280x720@60e
I am not sure if that is the problem, but that is what I would try.
Suriken , 01-02-2017, 12:33 AM
I tried your suggestion but I get the same result. I don't know how to get through this because I don't see any error message on the console output and I can't execute commands because it gets stuck there.

Could it be a failure in my sd card? Maybe I am copying the image/compiling the kernel in a wrong way. Or I should change any option while compiling kernel. I compiled it with the options it had by default.
robertferanec , 01-02-2017, 02:26 PM
How do you change the linux kernel command line? Because it looks to me like it is not changed. I see, that you run in uboot "setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 ${extra}", but in the kernel I see "console=ttymxc0,115200 console=tty0 root=/dev/mmcblk0p1 rootwait video=HDMI-A-1:1280x720@60e". Have you double check if the kernel command line is really changed?
Suriken , 01-03-2017, 03:36 AM
Actually, I don't. How can I check that? But, if I execute setenv.... command, it is supposed to update that, isn't it? Maybe that is the problem here.

what can I do if that line is not updated?
robertferanec , 01-04-2017, 06:28 PM
But, if I execute setenv.... command, it is supposed to update that, isn't it?
It depends ... depends how you compile kernel. Some kernels may have the command line compiled in and it may not be possible to change it from uBoot.
Suriken , 01-10-2017, 12:49 AM
Damm it, I am so lost here...

I compiled 3.15 kernel I found in this repository http://www.imx6rex.com/software/how-...3-15-and-3-16/ (it is the one provided by fedevel in this tutorial: http://www.imx6rex.com/software/how-...3-15-and-3-16/). They say that 3.16 is bugged and it is better 3.15.

Apart from that, debian image is taken too from that webpage, ported by Sam Nazarko.

I compiled kernel with its default parameters:
on console:
Code:
sudo ./build_kernel.sh
wait until it loads and then click on exit (to leave all the option as they were).

On the bottom of that tutorial webpage, I read this:
Code:
[COLOR=#373737][FONT=&quot][SIZE=15px]2. Because the new kernel cannot pass the parameters set in u-boot they need to be compiled directly into the kernel. Open defconfig file:...[/SIZE][/FONT][/COLOR] [COLOR=#373737][FONT=&quot][SIZE=15px]Look for [/SIZE][/FONT][/COLOR][I]CONFIG_CMDLINE[/I][COLOR=#373737][FONT=&quot][SIZE=15px] parameter. If you for example want to boot from hard drive you will change it to:...[/SIZE][/FONT][/COLOR]
the line which comes with the file is:
Code:
CONFIG_CMDLINE="console=ttymxc0,115200 console=tty0 root=/dev/mmcblk0p1 rootwait video=HDMI-A-1:1280x720@60e"[COLOR=#373737][FONT=&quot][SIZE=15px][/SIZE][/FONT][/COLOR]

Here is where we are supposed to change the cmd line. I want to boot from my microSD. It is the first one (dev board has 2 slots). What should I write here?



After this change, should I set in somewhere else a line to get uImage by default instead of load it by commands? If I wanted to load it by default as soon as the system boots up.
Comments:
robertferanec, 01-11-2017, 10:38 AM
You see your micro SD location in Kernel output, when the card is mounted .. it could be this one: [ 3.565714] mmcblk0: p1. So, just try to add &quot;rw&quot; to the line as I suggested above. You can also enable Kernel to take the line from uBoot, but I do not remember exactly what has to be changed.
Suriken , 01-11-2017, 01:09 AM
Ok, I have found a file on uboot folder under: /include/configs/mx6rex.h

This file contains multiple configuration lines, like: CONFIG_ENV_DEFAULT_IMG_FILE, FDT, SCR, ETH, CLIENT...

Part of the list:

Code:
/* Env settings */#define CONFIG_ENV_CONSOLE_DEV              "ttymxc0"#define CONFIG_ENV_MMCROOT                  "/dev/mmcblk2p2"#define CONFIG_ENV_DEFAULT_UBT_FILE         "u-boot-" CONFIG_REX_DEFAULT_ARCH_PREFIX "-rex" CONFIG_REX_DEFAULT_ARCH_POSTFIX ".imx"#define CONFIG_ENV_DEFAULT_IMG_FILE         "zImage-" CONFIG_REX_DEFAULT_ARCH_PREFIX "-rex" CONFIG_REX_DEFAULT_ARCH_POSTFIX#define CONFIG_ENV_DEFAULT_FDT_FILE                   CONFIG_REX_DEFAULT_ARCH_PREFIX "-rex" CONFIG_REX_DEFAULT_ARCH_POSTFIX ".dtb"#define CONFIG_ENV_DEFAULT_SCR_FILE         "boot-"   CONFIG_REX_DEFAULT_ARCH_PREFIX "-rex" CONFIG_REX_DEFAULT_ARCH_POSTFIX ".scr"#define CONFIG_ENV_DEFAULT_ETH_ADDR         "00:0D:15:00:D1:75"#define CONFIG_ENV_DEFAULT_CLIENT_IP        "192.168.0.150"#define CONFIG_ENV_DEFAULT_SERVER_IP        "192.168.0.1"#define CONFIG_ENV_DEFAULT_NETMASK          "255.255.255.0"#define CONFIG_ENV_DEFAULT_TFTP_DIR         "imx6"#ifdef CONFIG_SYS_MMC_ENV_DEV#define CONFIG_ENV_MMC_ENV_DEV              __stringify(CONFIG_SYS_MMC_ENV_DEV)#else#define CONFIG_ENV_MMC_ENV_DEV              __stringify(0)#endif
My image is called uImage. This the one I load by commands before call bootm. Should I modify this file? WHat should I set? Anything else? MMCROOT?
Comments:
robertferanec, 01-11-2017, 10:41 AM
You have several options: you can rename your file to meet uBoot expectations, you can update the uBoot prefix / postfix parameter and recompile it or you can simply use setenv to modify the lines which you need and change the expected image name to your image name - then do not forget saveenv.
Suriken , 01-13-2017, 03:04 AM
I have changed bootargs, image and mmcroot and saved them (in uboot).

this is my printenv output right now:

Code:
baudrate=115200boot_fdt=trybootargs=console=ttymxc0,115200 console=tty0 root=/dev/mmcblk0p1 rootwait video=HDMI-A-1:1280x720@60ebootcmd=mmc dev ${mmcdev};if mmc rescan; then if run loadbootscript; then run bootscript; else if run loadimage; then run mmcboot; else run netboot; fi; fi; else run netboot; fibootdelay=1bootscript=echo Running bootscript from mmc ...; sourceconsole=ttymxc0ethprime=FECfdt_addr=0x18000000fdt_file=imx6-rexpro.dtbfdt_high=0xffffffffimage=uImageinitrd_high=0xffffffffloadaddr=0x10800000loadbootscript=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}mmcargs=setenv bootargs console=${console},${baudrate} ${video} root=${mmcroot}mmcboot=echo Booting from mmc ...; run mmcargs; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if run loadfdt; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;mmcdev=0mmcpart=1mmcroot=/dev/mmcblk0p1netargs=setenv bootargs console=${console},${baudrate} ${video} root=/dev/nfs ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcpnetboot=echo Booting from net ...; run set_ethernet; run netargs; tftp ${tftp_dir}/${image}; if test ${boot_fdt} = yes || test ${boot_fdt} = try; then if tftp ${fdt_addr} ${tftp_dir}/${fdt_file}; then bootz ${loadaddr} - ${fdt_addr}; else if test ${boot_fdt} = try; then bootz; else echo WARN: Cannot load the DT; fi; fi; else bootz; fi;script=boot-imx6-rexpro.scrset_ethernet=if test -n ${ethaddr}; then; else setenv ethaddr  XX:XX:XX:XX:XX:XX; fi; if test -n ${ipaddr}; then; else setenv ipaddr   192.168.0.150; fi; if test -n ${serverip}; then; else setenv serverip 192.168.0.1; fi; if test -n ${netmask}; then; else setenv netmask  255.255.255.0; fispics=2spidev=2tftp_dir=imx6uboot=u-boot-imx6-rexpro.imxupdate_fdt=run set_ethernet; run update_set_filename; if mmc dev ${mmcdev}; then if tftp ${tftp_dir}/${upd_fdt}; then fatwrite mmc ${mmcdev}:${mmcpart} ${loadaddr} ${fdt_file} ${filesize}; fi; fiupdate_kernel=run set_ethernet; run update_set_filename; if mmc dev ${mmcdev}; then if tftp ${tftp_dir}/${upd_kernel}; then fatwrite mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image} ${filesize}; fi; fiupdate_script=run set_ethernet; run update_set_filename; if mmc dev ${mmcdev}; then if tftp ${tftp_dir}/${upd_script}; then fatwrite mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script} ${filesize}; fi; fiupdate_set_filename=if test -n ${upd_uboot}; then; else setenv upd_uboot u-boot-imx6-rexpro.imx; fi; if test -n ${upd_kernel}; then; else setenv upd_kernel zImage-imx6-rexpro; fi; if test -n ${upd_fdt}; then; else setenv upd_fdt    imx6-rexpro.dtb; fi; if test -n ${upd_script}; then; else setenv upd_script boot-imx6-rexpro.scr; fiupdate_uboot=run set_ethernet; run update_set_filename; if sf probe ${spidev}:${spics}; then if tftp ${tftp_dir}/${upd_uboot}; then setexpr align_sz ${filesize} + 0x7FFF; setexpr align_sz ${align_sz} / 0x8000; setexpr align_sz ${align_sz} * 0x8000; sf erase 0x0 ${align_sz}; sf write ${loadaddr} 0x400 ${filesize}; fi; fi
What else should I change?
robertferanec , 01-16-2017, 01:09 PM
@Suriken did you consider to take our Learn the Essentials of creating uBoot, Linux and YOCTO online course? Maybe it could help you

I am not really sure what should I answer - the uBoot environmental settings depends on the way how you use and boot up the board. There is quite good help in the uboot, when you run it, you can figure out what the current settings are and how you need to change them to
Use our interactive Discord forum to reply or ask new questions.
Discord invite
Discord forum link (after invitation)

Didn't find what you were looking for?