A20 not booting android from Nand

Started by Ruler, June 15, 2013, 05:24:23 PM

Previous topic - Next topic

Ruler

Hi,

I recently bought a A20 board and when I tried to boot it I got no video on the HDMI.
So I connected the UART0 to see what's going on.  This is the console log

HELLO! BOOT0 is starting!
boot0 version : 2.0.0˜
read dram para.
dram size =1024MB
0xea00000a
super_standby_flag = 0
Succeed in opening nand flash.
block from 2 to 6
deal block 2
Succeed in reading Boot1 file head.
The size of Boot1 is 0x00068000.
The file stored in 0x00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.151] boot1 version : 2.0.0
[       0.160] script installed early ok
[       0.161] pmu type = 3
[       0.162] bat vol = 0 mv
[       0.180] axi:ahb:apb=4:2:2
[       0.180] set dcdc2=1400mv, clock=912M successed
[       0.182] key
[       0.195] no key found
[       0.195] flash init start
[       2.137] flash init finish
[       2.163] fs init ok
[       2.165] fattype FAT16
[       2.165] fs mount ok
[       2.170] nand good_block_ratio=944
[       2.170] storage_type=0
[       2.216] 0
[       2.230] set pc
[       2.232] usbdc_vol = 4000, usbdc_cur = 0
[       2.232] usbpc_vol = 4400, usbpc_cur = 500
[       2.235] init to usb pc
[       2.238] set pc
[       2.430] battery enough
[       2.430] power_start=0x00000000
[       2.431] pre sys mode
[       2.433] key value = 0
[       2.436] recovery key high 40, low 4
[       2.531] show pic finish
[       2.531] load kernel start
[       2.560] load kernel successed
[       2.560] start address = 0x4a000000
[       3.312] power exit detect
[       3.313] usb exit detect

U-Boot 2011.09-rc1-00000-geceb6aa-dirty (May 16 2013 - 10:16:54) Allwinner Technology

CPU:   SUNXI Family
Board: SUN7I-EVB
DRAM:  1 GiB
NAND:  NB1 : enter NFB_Init
[NAND] nand driver version: 0x2, 0x11, data: 20130104
[NAND] nand driver: secure debug v1.2.9, 20121103, 13:09
[NAND] set nand_good_block_ratio 944
NB1 : nand phy init ok
NB1 : init ok
3776 MiB
In:    serial
Out:   serial
Err:   serial
--------fastboot partitions--------
-total partitions:10-
-name-        -start-       -size-
bootloader  : 8000          8000
env         : 10000         8000
boot        : 18000         8000
system      : 20000         100000
data        : 120000        100000
misc        : 220000        8000
recovery    : 228000        10000
cache       : 238000        80000
databk      : 2b8000        80000
UDISK       : 338000        428000
-----------------------------------
bootcmd set setargs_nand
Hit any key to stop autoboot:  0

Starting kernel ...

aw_clkevt_init: sun7i_timer0_clockevent mult 6442450, max_delta_ns 170000, min_delta_ns 1000, cpumask 0xc047e8c0, irq 54
[    0.975259] init: /init.rc: 558: ignored duplicate definition of service 'iprenew_wlan0'
[    2.206208] init: width = 1024
[    2.209273] init: height = 600
[    2.212447] init: s.st_size = 2457600
[    2.655274] init: do_umount: /data
[    2.959494] init: do_umount: /cache
[    3.060438] init: dont need format /dev/block/UDISK
[    3.081797] init: do_umount: /databk
[    3.207009] init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
[    4.102145] android_usb: already disabled
[    4.106497] init: using deprecated syntax for specifying property 'sys.usb.config', use ${name} instead
[    4.123378] init: using deprecated syntax for specifying property 'sys.usb.config', use ${name} instead
sh
root@android:/ #

I can type a few commands but then the board becomes unresponsive (if I wait more than 3 sec before entering a new command).

As a TTL conveter I use this board:

http://lh4.ggpht.com/-ok1CKFLtps8/UI0gtM0i4WI/AAAAAAAAD9I/Eed3OVgvy0s/s1600-h/image%25255B5%25255D.png


It is supposed to boot android by itself right?


Please advise,

Kind regards,

Roel

Lurch

Mine does boot Android. Trouble at first because the power supply was too weak.  Dies during boot.
Then, when Android boots, there's a short time-frame to unlock it (pull the lock left/right/whatever on the screen) before it shuts back off in power-saving mode. This was just a few seconds for mine.
I think that's what's happening on your board.  I'm using a 10" LCD and that worked 'out of the box'.  Haven't tried HDMI yet, need a cable. 
If you can unlock it and set the timeout higher, that should help.

Ruler

Thanks for you reply. I'm using a 12V PSU capable of running 3 amps so I should be more than ok with that. I have no LCD screen yet. Is there anyway to set the HDMI as the primairy display?

Could you paste me the output of your UART0 during boot?

Lurch

Quote
HELLO! BOOT0 is starting!
boot0 version : 2.0.0˜
read dram para.
dram size =1024MB
0xffffffff
super_standby_flag = 0
Succeed in opening nand flash.
block from 2 to 6
deal block 2
Succeed in reading Boot1 file head.
The size of Boot1 is 0x00068000.
The file stored in 0x00000000 of block 2 is perfect.
Check is correct.
Ready to disable icache.
Succeed in loading Boot1.
Jump to Boot1.
[       0.151] boot1 version : 2.0.0
[       0.160] script installed early ok
[       0.161] pmu type = 3
[       0.162] bat vol = 4 mv
[       0.180] axi:ahb:apb=4:2:2
[       0.180] set dcdc2=1400mv, clock=912M successed
[       0.182] key
[       0.194] no key found
[       0.194] flash init start
[       0.281] flash init finish
[       0.308] fs init ok
[       0.309] fattype FAT16
[       0.309] fs mount ok
[       0.315] nand good_block_ratio=944
[       0.315] storage_type=0
[       0.360] 0
[       0.374] set pc
[       0.377] usbdc_vol = 4000, usbdc_cur = 0
[       0.377] usbpc_vol = 4400, usbpc_cur = 500
[       0.380] init to usb pc
[       0.383] set pc
[       0.575] battery enough
[       0.575] power_start=0x00000000
[       0.576] key trigger
[       0.578] key value = 0
[       0.581] recovery key high 40, low 4
[       0.676] show pic finish
[       0.676] load kernel start
[       0.705] load kernel successed
[       0.705] start address = 0x4a000000
[       1.461] power exit detect
[       1.462] usb exit detec

U-Boot 2011.09-rc1-00000-geceb6aa-dirty (May 16 2013 - 10:16:54) Allwinner Technology

CPU:   SUNXI Family
Board: SUN7I-EVB
DRAM:  1 GiB
NAND:  NB1 : enter NFB_Init
[NAND] nand driver version: 0x2, 0x11, data: 20130104
[NAND] nand driver: secure debug v1.2.9, 20121103, 13:09
[NAND] set nand_good_block_ratio 944
NB1 : nand phy init ok
NB1 : init ok
3776 MiB
In:    serial
Out:   serial
Err:   serial
--------fastboot partitions--------
-total partitions:10-
-name-        -start-       -size-
bootloader  : 8000          8000
env         : 10000         8000
boot        : 18000         8000
system      : 20000         100000
data        : 120000        100000
misc        : 220000        8000
recovery    : 228000        10000
cache       : 238000        80000
databk      : 2b8000        80000
UDISK       : 338000        428000
-----------------------------------
bootcmd set setargs_nand
Hit any key to stop autoboot:  0

Starting kernel ...

aw_clkevt_init: sun7i_timer0_clockevent mult 6442450, max_delta_ns 170000, min_delta_ns 1000, cpumask 0xc047e8c0, irq 54
[    0.977708] init: /init.rc: 558: ignored duplicate definition of service 'iprenew_wlan0'
[    2.504929] init: width = 1024
[    2.507996] init: height = 600
[    2.511056] init: s.st_size = 2457600
[    2.564157] init: do_umount: /data
[    2.849801] init: do_umount: /cache
[    2.940883] init: dont need format /dev/block/UDISK
[    2.959018] init: do_umount: /databk
[    3.089626] init: cannot find '/system/etc/install-recovery.sh', disabling 'flash_recovery'
[    4.358993] android_usb: already disabled
[    4.363627] init: using deprecated syntax for specifying property 'sys.usb.config', use ${name} instead
[    4.376767] init: using deprecated syntax for specifying property 'sys.usb.config', use ${name} instead
[    5.650114] init: untracked pid 1447 exited
[    5.655755] init: untracked pid 1443 exited
[    5.659998] init: untracked pid 1445 exited
[   31.248548] init: sys_prop: permission denied uid:1003  name:service.bootanim.exit

-------- above was the boot sequence ---------------- below just shows ls ------------
right after the start screen shows, I unlock it. 
I'm using a keyboard and mouse plugged into a hub with an USB Ethernet.
Touch doesn't work yet.

ls -l
drwxr-xr-x root     root              2013-06-15 19:53 acct
drwxrwx--- system   cache             1970-01-01 01:00 cache
dr-x------ root     root              2013-06-15 19:53 config
lrwxrwxrwx root     root              2013-06-15 19:53 d -> /sys/kernel/debug
drwxrwx--x system   system            2013-06-14 10:52 data
-rw-r--r-- root     root          116 1970-01-01 01:00 default.prop
drwxr-xr-x root     root              2013-06-15 19:54 dev
-rw-r--r-- root     root      3450389 1970-01-01 01:00 disp.ko
lrwxrwxrwx root     root              2013-06-15 19:53 etc -> /system/etc
-rw-r--r-- root     root       476183 1970-01-01 01:00 hdmi.ko
-rwxr-x--- root     root       113584 1970-01-01 01:00 init
-rwxr-x--- root     root         2487 1970-01-01 01:00 init.goldfish.rc
-rwxr-x--- root     root        19076 1970-01-01 01:00 init.rc
-rwxr-x--- root     root         4518 1970-01-01 01:00 init.sun7i.rc
-rwxr-x--- root     root         3445 1970-01-01 01:00 init.sun7i.usb.rc
-rwxr-x--- root     root         1795 1970-01-01 01:00 init.trace.rc
-rwxr-x--- root     root         3915 1970-01-01 01:00 init.usb.rc
-rwxr-x--- root     root      2457600 1970-01-01 01:00 initlogo.rle
-rw-r--r-- root     root       243389 1970-01-01 01:00 lcd.ko
drwxrwxr-x root     system            2013-06-15 19:53 mnt
-rw-r--r-- root     root       650465 1970-01-01 01:00 nand.ko
dr-xr-xr-x root     root              1970-01-01 01:00 proc
drwx------ root     root              2013-05-16 09:08 root
drwxr-x--- root     root              1970-01-01 01:00 sbin
lrwxrwxrwx root     root              2013-06-15 19:53 sdcard -> /mnt/sdcard
drwxr-xr-x root     root              2013-06-15 19:53 sys
drwxr-xr-x root     root              1970-01-01 01:00 system
-rw-r--r-- root     root       261868 1970-01-01 01:00 touch.ko
-rw-r--r-- root     root          272 1970-01-01 01:00 ueventd.goldfish.rc
-rw-r--r-- root     root         4024 1970-01-01 01:00 ueventd.rc
-rw-r--r-- root     root          680 1970-01-01 01:00 ueventd.sun7i.rc
lrwxrwxrwx root     root              2013-06-15 19:53 vendor -> /system/vendor
I'll have a look at HDMI. I need to plug some stuff together for that.

Lurch

I see that there is a large delay between flash init start and finish on your bootlog.
Strange. Almost 2 seconds.

Ruler

#5
Update. Well finally got it working!  Turns out because I didn't have the mouse connected it gave no video on HDMI. When I finally had video everything was in japanese characters though :o  But I managed to change the language back:)

Thanks for the effort man :)

rz2k

Quote from: Ruler on June 15, 2013, 07:34:18 PM
I have no LCD screen yet. Is there anyway to set the HDMI as the primairy display?
A20 is sunxi series processor, you can use android external screen detection (if it works) or you can grab script.bin from your /dev/block/nanda partition (mount it as vfat), decompile it with "bin2fex" from sunxi-tools package, then read http://linux-sunxi.org/Fex_Guide, change the display section settings, you can use HDMI, LCD or VGA outputs with variety of resolutions and compile it back with "fex2bin". "fex" here is file format that looks like .ini files from Windows.

Gaurav Pathak

Hello, I got a mars board with A20 processor. I tried to boot from NAND but kernel doesn't boot, the boot log is pasted below:

U-Boot 2011.09-rc1 (Sep 14 2013 - 09:32:08) Allwinner Technology

CPU:   SUNXI Family

Board: SUN7I-MarsBoard-A20

DRAM:  1 GiB

NAND:  [NAND] set nand_good_block_ratio 944

3776 MiB

In:    serial

Out:   serial

Err:   serial

--------fastboot partitions--------

-total partitions:10-

-name-        -start-       -size-

bootloader  : 8000          8000

env         : 10000         8000

boot        : 18000         8000

system      : 20000         100000

data        : 120000        100000

misc        : 220000        8000

recovery    : 228000        10000

cache       : 238000        100000

databk      : 338000        80000

UDISK       : 3b8000        3a8000

-----------------------------------

bootcmd set setargs_nand

Hit any key to stop autoboot:  0



Starting kernel ...



aw_clkevt_init: sun7i_timer0_clockevent mult 6442450, max_delta_ns 170000, min_d
elta_ns 1000, cpumask 0xc04b2900, irq 54

[    0.372733] axp_mfd 0-0034: failed reading at 0x03

[    1.333593] ctp_fetch_sysconfig_para: ctp_unused.

[    1.351528] regulator_virtual_consumer_probe:can't get regulator: axp20_analo
g/fm

[    1.359649] regulator_virtual_consumer_probe:can't get regulator: axp20_pll

[    1.367363] regulator_virtual_consumer_probe:can't get regulator: axp20_hdmi

[    1.375923] regulator_virtual_consumer_probe:can't get regulator: axp20_core

[    1.383701] regulator_virtual_consumer_probe:can't get regulator: axp20_ddr

[    1.391181] regulator_virtual_consumer_probe:can't get regulator: axp20_mic

[    2.259651] init: width = 1280

[    2.262741] init: height = 720

[    2.265802] init: s.st_size = 2457600

[    2.269468] init: logo match failed!fbsize = 3686400

[    2.892738] init: do_umount: /data

[    3.192223] init: do_umount: /cache

[    3.298115] init: dont need format /dev/block/UDISK

[    3.326466] init: do_umount: /databk

[    3.454021] init: cannot find '/system/etc/install-recovery.sh', disabling 'f
lash_recovery'

[    4.010558] android_usb: already disabled

[    4.015342] init: using deprecated syntax for specifying property 'sys.usb.co
nfig', use ${name} instead

[    4.028455] init: using deprecated syntax for specifying property 'sys.usb.co
nfig', use ${name} instead

[   32.367445] init: sys_prop: permission denied uid:1003  name:service.bootanim
.exit

[  122.121056] binder: release proc 5371, transaction 27257, not freed

[  122.128392] binder: release proc 5371, transaction 27258, not freed

[  146.263444] binder: release proc 5864, transaction 30497, not freed

[  146.269723] binder: release proc 5864, transaction 30496, not freed

[  151.917801] binder: 5973: binder_alloc_buf, no vma

[  185.747760] binder: release proc 6649, transaction 35563, not freed

[  391.807944] binder: release proc 10735, transaction 61817, not freed

[  391.819458] binder: release proc 10735, transaction 61818, not freed

[  504.667361] binder: release proc 12964, transaction 76196, not freed

[  504.673773] binder: release proc 12964, transaction 76199, not freed

[  504.680125] binder: release proc 12964, transaction 76200, not freed

[  511.137021] binder: release proc 13095, transaction 77046, not freed

[  512.828282] binder: release proc 13132, transaction 77239, not freed

[  522.939498] binder: release proc 13332, transaction 78488, not freed

[  522.948396] binder: release proc 13332, transaction 78491, not freed

[  523.924017] binder: release proc 13351, transaction 78601, not freed

[  524.829772] binder: release proc 13369, transaction 78702, not freed

[  524.837454] binder: release proc 13369, transaction 78703, not freed

[  525.847791] binder: release proc 13387, transaction 78804, not freed

[  525.855318] binder: release proc 13387, transaction 78807, not freed

[  525.861678] binder: release proc 13387, transaction 78808, not freed

[  533.052291] binder: release proc 13533, transaction 79719, not freed

[  533.058665] binder: release proc 13533, transaction 79722, not freed

[  533.067905] binder: release proc 13533, transaction 79723, not freed


Can anyone suggest what I am missing?

junetec

D'ont work on mine.
My sd card has the script to output to the 10" LCD.
I don't know if that can be a problem.