Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Boot android from SD card A20

5,383 views
Skip to first unread message

cubie...@gmail.com

unread,
Oct 30, 2013, 11:18:01 AM10/30/13
to cubie...@googlegroups.com
Cubieboard 2 A20
Find this manual http://linux-sunxi.org/Boot_Android_from_SdCard
Download Android 4.2_v1.05 (RTL8192CU) http://docs.cubieboard.org/tutorials/cb2/installation/cubieboard2_android-4.2.2_releases the same image write to nand.

At the manual

Modify the name partition in init.sun7i.rc

sed -i "s/nandd/mmcblk0p3/g"  /mnt/init.sun7i.rc
sed -i "s/nande/mmcblk0p5/g"  /mnt/init.sun7i.rc
sed -i "s/nandh/mmcblk0p8/g"  /mnt/init.sun7i.rc
sed -i "s/nandi/mmcblk0p10/g" /mnt/init.sun7i.rc

has no success. Because in the file init.sun7i.rc no rows nand* or mmc* .

After all, getting a boot log http://pastebin.com/yBqrNiF0
What is missing for a successful boot?

Gerardo Di Iorio

unread,
Oct 30, 2013, 4:16:24 PM10/30/13
to cubie...@googlegroups.com


Il 30/ott/2013 16:18 <cubie...@gmail.com> ha scritto:
>
> Cubieboard 2 A20
> Find this manual http://linux-sunxi.org/Boot_Android_from_SdCard
> Download Android 4.2_v1.05 (RTL8192CU) http://docs.cubieboard.org/tutorials/cb2/installation/cubieboard2_android-4.2.2_releases the same image write to nand.
>
> At the manual
>
> Modify the name partition in init.sun7i.rc
>
> sed -i "s/nandd/mmcblk0p3/g"  /mnt/init.sun7i.rc
> sed -i "s/nande/mmcblk0p5/g"  /mnt/init.sun7i.rc
> sed -i "s/nandh/mmcblk0p8/g"  /mnt/init.sun7i.rc
> sed -i "s/nandi/mmcblk0p10/g" /mnt/init.sun7i.rc
>

hi, this procedure work with android 4, i now try to download android 4.2 for 20 and test pocedure

>
> has no success. Because in the file init.sun7i.rc no rows nand* or mmc* .
>
> After all, getting a boot log http://pastebin.com/yBqrNiF0
> What is missing for a successful boot?
>

> --
> You received this message because you are subscribed to the Google Groups "Cubieboard" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to cubieboard+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cubieboard.
> For more options, visit https://groups.google.com/groups/opt_out.

cubie...@gmail.com

unread,
Nov 1, 2013, 1:05:36 AM11/1/13
to cubie...@googlegroups.com
Together with Silverio Diquigiovanni found files that mention nand
/ system / etc / vold.fstab
/ system / bin / data_resume.sh
/ system / bin / sop.sh

The manual mentions 9 real partitions.
/dev/sdc1 16MiB bootloader VFAT Files to assist the bootloader.
/dev/sdc2 36MiB boot EXT4 ramdisk
/dev/sdc3 500 MiB system EXT4 Android's /system partition
/dev/sdc4 Fill all space extend Extend Partition
/dev/sdc5 300MiB data EXT4
/dev/sdc6 16 MiB misc EXT4
/dev/sdc7 36 Mib recovery EXT4 Android's recovery partition
/dev/sdc8 125 MiB cache EXT4
/dev/sdc9 16 MiB private EXT4
/dev/sdc10 1-2 GiB UDISK VFAT

When booting Android 4.2.2 with nand 11 partitions

-------- fastboot partitions --------
-total partitions: 11 -
-name- -start- -size-
bootloader: 8000 8000
env: 10000 8000
boot: 18000 8000
system: 20000 100000
data: 120000 100000
misc: 220000 8000
recovery: 10000 228000
cache: 238000 a0000
private: 2d8000 8000
databk: 2e0000 80000
UDISK: 360000 400000
-----------------------------------
Does it matter?

cubie...@gmail.com

unread,
Nov 8, 2013, 2:01:18 AM11/8/13
to cubie...@googlegroups.com
make sd card, see picture

Disk /dev/sdb: 3980 MB, 3980394496 byte
123 header, 62 sectors/tracks, 1019 cylinder, total 7774208 sectors
Units = sectors of 1 * 512 = 512 bytes
Size of sector (logical/phisical): 512 byte / 512 byte
I/O size (minimum/optimal): 512 bytes / 512 bytes
ID: 0x00000000

Dev Boot         Start       End           Blocks   Id  System
/dev/sdb1           61008      129641       34317    c  W95 FAT32 (LBA)
/dev/sdb2          129642      198275       34317   83  Linux
/dev/sdb3          198276      266909       34317   83  Linux
/dev/sdb4          266910     7770893     3751992    5  Ext
/dev/sdb5          266911     1578581      655835+  83  Linux
/dev/sdb6         1578583     2890253      655835+  83  Linux
/dev/sdb7         2890255     2958887       34316+  83  Linux
/dev/sdb8         2958889     3096155       68633+  83  Linux
/dev/sdb9         3096157     4148543      526193+  83  Linux
/dev/sdb10        4148545     4217177       34316+  83  Linux
/dev/sdb11        4217179     5269565      526193+  83  Linux
/dev/sdb12        5269567     7770893     1250663+  83  Linux

made changes nand* to mmcblk0p* (see files)
The boot log the same, boot from nand partitions.
What else is missing?

card.png
sop.sh
data_resume.sh
vold.fstab
sdcardBoot_err.txt

Gerardo Di Iorio

unread,
Nov 21, 2013, 9:02:44 AM11/21/13
to cubie...@googlegroups.com
hi,
i have problem to see the log of kernel wirh current uboot,
you can share you u-boot.bin and spl?

regards
Gerardo Di Iorio


2013/11/8 <cubie...@gmail.com>

cubie...@gmail.com

unread,
Nov 22, 2013, 1:27:14 AM11/22/13
to cubie...@googlegroups.com
For me work only hwpack u-boot. Try latest git u-boot and some one, they hangs at Starting kernel with green led.

http://pastebin.com/yBqrNiF0
http://pastebin.com/87HFPwmd

One card, one kernel. different only u-boot.


u-boot_nwpack.zip

Gerardo Di Iorio

unread,
Nov 22, 2013, 8:40:25 AM11/22/13
to cubie...@googlegroups.com
ok,
i have try with you uboot
but have the message

Error: unrecognized/unsupported machine ID (r1 = 0x00000f35).
D (hex)        NAME
000010bb        sun7i
000010bb        sun7i



the allwinner kernel have different mach-id
i have add 
setenv machid 0x000010bb
to boot.cmd and boot
now i try boot android 4.3 from sd card for cubie2








2013/11/22 <cubie...@gmail.com>

Puneet B

unread,
Dec 24, 2013, 8:38:34 AM12/24/13
to cubie...@googlegroups.com
Hi,

I also have the same issue.

but i am able to execute all services ,by making change in init.sun7i.rc.

here i am attaching changed file.

but i am able to get only boot logo.

there onwards there is repeated execution zygote,netd,media...services.

this will be my boot log  error:

  25.250785] WRN:L2663(drivers/usb/sun7i_usb/udc/sw_udc.c):ERR: usb device is not active

[   32.768896] warning: `zygote' uses 32-bit capabilities (legacy support in use)
[   33.677191] BatteryStats-Wr used greatest stack depth: 5376 bytes left
[   36.672869] request_suspend_state: wakeup (3->0) at 36665033145 (2000-01-01 08:24:55.111614684 UTC)
[   37.486230] acc_open                                  +-----------------------------+
[   37.488514] acc_release                               |                             |
[   37.885070] er.ServerThread used greatest stack depth:|  Cannot open /dev/ttyUSB0!  |
[   37.935833] binder: 1748:1748 transaction failed 29189|                             |
[   38.178179] alarm_release: clear alarm, pending 0     +-----------------------------+
[   38.182897] alarm_release: clear alarm, pending 0
[   38.679813] init: waitpid returned pid 1069, status = 00000009
[   38.685710] init: process 'zygote', pid 1069 exited
[   38.690631] init: process 'zygote' killing any children in process group
[   38.697534] request_suspend_state: wakeup (0->0) at 38689707228 (2000-01-01 08:24:57.136291976 UTC)
[   38.706679] init: service 'media' is being killed
[   38.711780] init: starting 'media'
[   38.716580] init: service 'netd' is being killed
[   38.725119] init: starting 'netd'
[   38.729229] init: waitpid returned pid 1065, status = 00000009
[   38.735113] init: untracked pid 1065 exited
[   38.740096] init: Created socket '/dev/socket/mdns' with mode '660', user '0', group '1000'
[   38.748765] init: waitpid returned pid 1071, status = 00000009
[   38.754669] init: untracked pid 1071 exited
[   38.759312] init: Created socket '/dev/socket/dnsproxyd' with mode '660', user '0', group '3003'
[   38.759443] init: Created socket '/dev/socket/netd' with mode '660', user '0', group '1000'
[   38.759676] init: starting 'zygote'
[   38.760888] init: Created socket '/dev/socket/zygote' with mode '660', user '0', group '1000'
[   42.969557] request_suspend_state: wakeup (0->0) at 42961718772 (2000-01-01 08:25:01.408303144 UTC)
[   43.570689] [AXP]b

Here we can see binder problem also.

i am using android 4.2 and linux kernel 3.3.

Kindly tell me , if you have any solution .Did you solve this issue.

same source code from  nand, is booting fine.(no issue with kernel and file system).

kindly suggest me.

Regards
Punith

  
init.sun7i.rc.txt

Ji Yonggang

unread,
Dec 24, 2013, 8:46:29 PM12/24/13
to cubie...@googlegroups.com, Puneet B
At Tue, 24 Dec 2013 05:38:34 -0800 (PST),
Puneet B <puni...@gmail.com> wrote:
>
> Hi,
>
> I also have the same issue.
>
> this will be my boot log error:
>
> [ 37.935833] binder: 1748:1748 transaction failed
> 29189| |
> [ 38.178179] alarm_release: clear alarm, pending 0
> +-----------------------------+
> [ 38.182897] alarm_release: clear alarm, pending 0
> [ 38.679813] init: waitpid returned pid 1069, status = 00000009
> [ 38.685710] init: process 'zygote', pid 1069 exited
>
> Here we can see binder problem also.
>
> i am using android 4.2 and linux kernel 3.3.
>
> Kindly tell me , if you have any solution .Did you solve this issue.
>
> same source code from nand, is booting fine.(no issue with kernel and file
> system).
>
> kindly suggest me.
>

I encountered the similar problem when I try to boot a10 from sdcard with android 4.1.2.

That problem was fixed by modify vold.fstab and overlay/../storage_list.xml.

I found it out in the logcat output, there were many exceptions in vold and
MountService caused by misconfigured ExtSd.

My suggestion is checking your logcat first.

--
Jungle

Puneet B

unread,
Dec 26, 2013, 12:25:20 AM12/26/13
to cubie...@googlegroups.com, Puneet B
Hi Jungle Ji,

Thanks for your reply.

Here i am attaching logcat , vold.fstab and storage_list.xml.

kindly suggest me where i am wrong.

to make sd card i fallow this link.

http://linux-sunxi.org/Boot_Android_from_SdCard.

 Regards
Punith
logcat_a20.txt
storage_list.xml
vold.fstab

Ji Yonggang

unread,
Dec 26, 2013, 5:57:31 AM12/26/13
to cubie...@googlegroups.com, Puneet B
Hi Punith,

At Wed, 25 Dec 2013 21:25:20 -0800 (PST),
I follow this link too, but it works perfectly on android 4.0 only.

>
> [ 32.495167] binder: send failed reply for transaction 2327 to 1754:1754
> [ 32.513598] binder: 1754:1754 transaction failed 29189, size 136-0
> [ 32.535317] binder: 1754:1754 transaction failed 29189, size 2788-4
> [ 32.709561] alarm_release: clear alarm, pending 0
> [ 32.714358] alarm_release: clear alarm, pending 0
> [ 33.151657] init: waitpid returned pid 1073, status = 00000009
> [ 33.157523] init: process 'zygote', pid 1073 exited
> [ 33.162444] init: process 'zygote' killing any children in process group

The log you caught behind the error, it does not show useful info.

With following steps I can catch the whole logcat:

1. Add these props to sdcard root /default.prop

ro.adb.secure=0
ro.secure=0
ro.debuggable=1

2. Open a term window, enter

$ adb logcat

it will prompt:

- waiting for device -

3. Open another term window, monitor TTL output

4. Connect PC and cubieboard with usb-miniusb cable, power up cubieboard.

After adb server launched, the adb window will display logcat output.

> # Mounts the first usable partition of the specified device
> dev_mount sdcard /mnt/sdcard 1 /devices/virtual/block/mmcblk0p10 /devices/platform/sunxi-mmc.0/mmc_host

In my a10 system, there is no "/devices/virtual/block/mmcblk0p10" sysfs path.
I still use the old nand partition in vold.fstab:

dev_mount sdcard /mnt/sdcard auto /devices/virtual/block/nandi

For your reference, I replay the problem with my a10 on android 4.1.2.

Original vold.fstab:

dev_mount sdcard /storage/sdcard0 auto /devices/virtual/block/nandi
dev_mount extsd /storage/sdcard1 auto /devices/platform/sunxi-mmc.1/mmc_host /devices/platform/sunxi-mmc.0/mmc_host
dev_mount usbhost1 /storage/sdcard2 auto /devices/platform/sw-ehci.1 /devices/platform/sw_hcd_host0 /devices/platform/sw-ehci.2 /devices/platform/sw-ohci.1 /devices/platform/sw-ohci.2

and logcat error messages:

W/dalvikvm( 271): threadid=11: thread exiting with uncaught exception (group=0x41e32300)
W/MountService( 271): getVolumeState(/storage/sdcard1): Unknown volume
E/AndroidRuntime( 271): *** FATAL EXCEPTION IN SYSTEM PROCESS: android.server.ServerThread
E/AndroidRuntime( 271): java.lang.RuntimeException: Error receiving broadcast Intent { act=android.hardware.usb.action.USB_STATE flg=0x20000010 (has extras) } in com.android.server.MountService$1@422ff3e0
E/AndroidRuntime( 271): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:765)
E/AndroidRuntime( 271): at android.os.Handler.handleCallback(Handler.java:615)
E/AndroidRuntime( 271): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 271): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 271): at com.android.server.ServerThread.run(SystemServer.java:968)
E/AndroidRuntime( 271): Caused by: java.lang.IllegalArgumentException
E/AndroidRuntime( 271): at com.android.server.MountService.getVolumeState(MountService.java:1410)
E/AndroidRuntime( 271): at com.android.server.MountService.notifyShareAvailabilityChange(MountService.java:1037)
E/AndroidRuntime( 271): at com.android.server.MountService.access$1300(MountService.java:96)
E/AndroidRuntime( 271): at com.android.server.MountService$1.onReceive(MountService.java:567)
E/AndroidRuntime( 271): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:755)
E/AndroidRuntime( 271): ... 4 more
I/Process ( 271): Sending signal. PID: 271 SIG: 9

Delete extsd and usbhost1 line, keep sdcard in vold.fstab will fix this issue.

--
Jungle

Puneet B

unread,
Dec 26, 2013, 8:53:39 AM12/26/13
to cubie...@googlegroups.com, Puneet B
Hi Jungle Ji,

I tried your method but problem is not yet solved.

Before that i also  booted A10 board with android4.0  successfully.

Did you know how many partition is required for android4.2 to boot over sdcard.

Here i am attaching complete logcat.

Kindly tell me what will be the issue.

Regards
Punith
minicom.cap

Ji Yonggang

unread,
Dec 27, 2013, 1:18:36 AM12/27/13
to cubie...@googlegroups.com, Puneet B
Hi Punith,

At Thu, 26 Dec 2013 05:53:39 -0800 (PST),
Puneet B <puni...@gmail.com> wrote:
>
> I tried your method but problem is not yet solved.
>
> Before that i also booted A10 board with android4.0 successfully.
>
> Did you know how many partition is required for android4.2 to boot over
> sdcard.
>

For developing, you must prepare boot, root, system, data, cache, private partitions.

> Here i am attaching complete logcat.

You attached a wrong file, it's ttl log, not logcat.

--
Jungle

Puneet B

unread,
Dec 27, 2013, 1:49:34 AM12/27/13
to cubie...@googlegroups.com, Puneet B
Hi Jungle Ji,

Thanks for your reply.

That file contain logcat also.see fully.

Regards
Punith

Ji Yonggang

unread,
Dec 27, 2013, 5:17:26 AM12/27/13
to cubie...@googlegroups.com, Puneet B
At Thu, 26 Dec 2013 22:49:34 -0800 (PST),
Puneet B <puni...@gmail.com> wrote:
>
> Hi Jungle Ji,
>
> Thanks for your reply.
>
> That file contain logcat also.see fully.
>

I checked that 2.3M minicom.cap with:

$ grep -i vold minicom.cap
[ 17.562407] init: starting 'vold'
[ 17.580466] init: Created socket '/dev/socket/vold' with mode '660', user '0', group '1009'
[ 8.789999] init: starting 'vold'
[ 8.822975] init: Created socket '/dev/socket/vold' with mode '660', user '0', group '1009'
[ 4.523831] init: starting 'vold'
[ 4.551944] init: Created socket '/dev/socket/vold' with mode '660', user '0', group '1009'
[ 5.618286] init: starting 'vold'
[ 5.662843] init: Created socket '/dev/socket/vold' with mode '660', user '0', group '1009'
...

But grep on a correct logcat log, it output:

$ grep -i vold cubie.log
I/Vold ( 73): Vold 2.1 (the revenge) firing up
D/Vold ( 73): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 73): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
D/Vold ( 73): Volume sdcard state changing 2 (Pending) -> 1 (Idle-Unmounted)
I/Vold ( 73): /dev/block/vold/8:1 being considered for volume sdcard
D/Vold ( 73): Volume sdcard state changing 1 (Idle-Unmounted) -> 3 (Checking)
D/Vold ( 73): Trying to get filesystem type for /dev/block/vold/8:1
D/Vold ( 73): Found vfat filesystem on /dev/block/vold/8:1
I//system/bin/fsck_msdos( 73): ** /dev/block/vold/8:1
I/Vold ( 73): Filesystem check completed OK
I/Vold ( 73): Device /dev/block/vold/8:1, target /mnt/sdcard mounted @ /mnt/secure/staging
D/Vold ( 73): Volume sdcard state changing 3 (Checking) -> 4 (Mounted)
E/VoldConnector( 379): NDC Command {3 volume mount /mnt/sdcard} took too long (6251ms)
E/VoldConnector( 379): NDC Command {4 asec list} took too long (2437ms)

--
Jungle
Reply all
Reply to author
Forward
0 new messages