No U-boot Access

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

No U-boot Access

Sat Nov 29, 2014 4:40 pm

I just got my VoCore and am ready to start playing with it.

First I messed up the WiFi configuration so I now have a connection through the UART and reset the configuration to factory with firstboot.

I have compiled a image following http://vonger.cn/?p=1585 but before I start flashing I want to ensure I can get into U boot to recover if things go badly.

I have tried using both picocom and minicom with 57600 8N1 settings but I can't get into U-Boot, the first output when I apply power is:

Code: Select all
Welcome to minicom 2.6.1

OPTIONS: I18n                                                               
Compiled on Feb 11 2012, 18:12:55.                                           
Port /dev/ttyUSB0                                                           
                                                                             
Press CTRL-A Z for help on special keys                                     
                                                                             
[    0.400000] gpio-export gpio-export.4: 17 gpio(s) exported               
[    0.420000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled     
[    0.430000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baudA


Just blindly typing "x" when powering up doesn't stop the boot process either.

How do I get the Uboot prompt?
Code: Select all
U-Boot for VoCore(based on RT5350)..
Version: May 30 2014 20:52:36

Press 'x' to console...

.
VoCore>

Vonger
 
Posts: 762
Joined: Sun Oct 19, 2014 6:00 am

Re: No U-boot Access

Mon Dec 01, 2014 2:54 pm

Not sure why you get that result.
Just connect VoCore to UART2TTL before you connect it to power, so you will get the full output, that contains the press 'x'.

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: No U-boot Access

Mon Dec 01, 2014 3:50 pm

I don't understand it either. If I connect with the UART2TTL, apply power and press "x" I get:
Code: Select all
:~$ picocom -b 57600 /dev/ttyUSB0
picocom v1.7

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 57600
parity is      : none
databits are   : 8
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        :
omap is        :
emap is        : crcrlf,delbs,

Terminal ready


And the the VoCore doesn't respond until I cycle power. With no key press I get:
Code: Select all
:~$ picocom -b 57600 /dev/ttyUSB0
picocom v1.7

port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 57600
parity is      : none
databits are   : 8
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv
imap is        :
omap is        :
emap is        : crcrlf,delbs,

Terminal ready
[    0.400000] gpio-export gpio-export.4: 17 gpio(s) exported
[    0.420000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.430000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    0.450000] console [ttyS0] enabled
[    0.450000] console [ttyS0] enabled
[    0.470000] bootconsole [early0] disabled
[    0.470000] bootconsole [early0] disabled
[    0.490000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.510000] m25p80 spi32766.0: unique id: D262481697244723
[    0.510000] 4 ofpart partitions found on MTD device spi32766.0
[    0.530000] Creating 4 MTD partitions on "spi32766.0":
[    0.530000] 0x000000000000-0x000000030000 : "uboot"
[    0.550000] 0x000000030000-0x000000040000 : "uboot-env"
[    0.570000] 0x000000040000-0x000000050000 : "factory"
[    0.570000] 0x000000050000-0x000001000000 : "firmware"
[    0.600000] 0x00000015059f-0x000001000000 : "rootfs"
[    0.600000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.630000] mtd: device 4 (rootfs) set to be root filesystem
[    0.650000] mtd: partition "rootfs_data" created automatically, ofs=0x3d0000, len=0xc30000
[    0.670000] 0x0000003d0000-0x000001000000 : "rootfs_data"


It looks like something is wrong in the uboot environment so I compiled and installed uboot-envtools but I can't get the fw_env.config set up right, it keeps telling me
Code: Select all
root@OpenWrt:/# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200


Here is my current fw_env.config, I have tried many settings without success:
Code: Select all
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
# Notice, that the "Number of sectors" is ignored on NOR and SPI-dataflash.
# Futhermore, if the Flash sector size is ommitted, this value is assumed to
# be the same as the Environment size, which is valid for NOR and SPI-dataflash
 
# NOR example
# MTD device name   Device offset   Env. size   Flash sector size   Number of sectors
#/dev/mtd0      0x00000      0x30000      0x10000
/dev/mtd1      0x00000      0x10000      0x10000         1
#/dev/mtd2      0x0000      0x4000      0x4000
 
# MTD SPI-dataflash example
# MTD device name   Device offset   Env. size   Flash sector size   Number of sectors
#/dev/mtd5      0x4200      0x4200
#/dev/mtd6      0x4200      0x4200
 
# NAND example
#/dev/mtd0      0x4000      0x4000      0x20000   


Can you give any hints on how to get the uboot-envtools working?

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: No U-boot Access

Tue Dec 02, 2014 3:14 pm

We do not have such problem. Maybe change another serial application will be ok, I use kermit and screen both work well.
That uboot is from MTK, tons of bug, I did not spend much time on that, better to use official uboot, but not support rt5350 yet...


This was posted under "Android and connecting to access point" I believe it belongs in this thread ;-)

A non "official" uboot probably means uboot-envtools won't work no matter what I do.

I tried screen and get the same results, no Uboot prompts, boot output starts around [ 0.400000] even though I have seen some at 0.38 or 0.39, I'm not familiar with all of screens options so I just used:
Code: Select all
screen /dev/ttyUSB0 57600
to start it.

I'm thinking something must be corrupted in the flash, dumps from dd if=/dev/mtdX of=/root/mtdXdump are at https://www.dropbox.com/s/qh0nnrb4jh0fwol/mtd0dump?dl=0 and https://www.dropbox.com/s/mk561dq82c5r3jp/mtd1dump?dl=0.

Code: Select all
cat /proc/mtd

infers that mtd1 should be the uboot environment but mtd1 on my unit is all one's (unwritten?) is this correct?

mtd0 has it's own copy of the uboot environment that starts as 0x18420 nothing sticks out as incorrect.

Would you send dumps of mtd0 and mtd1 on a working unit so I can compare?

Is the netconsole enabled in this uboot? I can try to access that if it is.

Thoughts?

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: No U-boot Access

Wed Dec 03, 2014 1:44 pm

Further investigation shows my U-boot in /dev/mtd0 is identical to that at http://vonger.cn/upload/uboot.img with the exception of /dev/mtd0 being padded with 1's past the end of uboot.img.

Comparing the uboot environment in /dev/mtd0 to that shown by the first printenv in http://vonger.cn/?topic=connecting-and-flashing-through-uart-u-boot-with-osx I find the only difference to be
Code: Select all
bootdelay=1
has been moved from near the beginning of the parameters to near the end and the addition of
Code: Select all
stdin=serial
stdout=serial
stderr=serial
at the end.

I suspect the stdxx parameters are not getting set on my VoCore! Can someone confirm these are set by either /dev/mtd0 or /dev/mtd1 on their VoCore?

To see the uboot environment I do this on the VoCore:
Code: Select all
root@VoCore:~# dd if=/dev/mtd0 of=/root/mtd0dump
384+0 records in
384+0 records out
root@VoCore:~# dd if=/dev/mtd1 of=/root/mtd1dump
128+0 records in
128+0 records out
root@VoCore:~#

And then on my Linux host:
Code: Select all
:~/vocore$ scp root@vocore.local:/root/mtd0dump ./
mtd0dump                                                                                100%  192KB 192.0KB/s   00:00   
:~/vocore$ scp root@vocore.local:/root/mtd1dump ./
mtd1dump                                                                                100%   64KB  64.0KB/s   00:00   
~/vocore$ xxd -s 0x18420 mtd0dump|less


A copy the dump files from another VoCore would be much appreciated!

noblepepper
 
Posts: 240
Joined: Sat Nov 29, 2014 3:22 pm

Re: No U-boot Access

Sat Dec 13, 2014 7:29 pm

I finally found it, a bad solder joint on txd2. I have no idea why it would start working at the 0.4000 entry in the boot process but after resoldering with a new tip all is fine.

Return to VoCore & VoCore+Dock

Who is online

Users browsing this forum: Bing [Bot] and 3 guests