This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Fail to boot Android on Beaglebone Black from eMMC

Hardware: Beaglebone Black, A5A, with or without LCD Cape 7, the problems are the same.

Software: TI-Android-JB-4.2.2-DevKit-4.1.1

Steps:

1. I git cloned the source repo according to dev guide wiki. 

2. make TARGET_PRODUCT=beagleboneblack OMAPES=4.x 

3. make TARGET_PRODUCT=beagleboneblack OMAPES=4.x sdcard_build

Then I create the sd card from the files in out/target/product/beagleboneblack/beagleboneblack, everything is OK. The board booted into android successfully, though painfully slow.

4. I enabled fastboot emmc macro in uboot config file, rebuild uboot, and tested. fastboot works.

5. I created all files required to flash eMMC according to dev guide wiki, and tried, there are several issues.

6. First, the size of system.img isn't right. 192x1M is not sufficient. Change it to 240x1M, it works.

7. Second, the following lines are added into init.rc file according to wiki.

on fs
    mount ext4 /dev/block/mmcblk0p6 /system wait ro
    mount ext4 /dev/block/mmcblk0p8 /data wait noatime nosuid nodev
    mount ext4 /dev/block/mmcblk0p7 /cache wait noatime nosuid nodev
And wiki says the mmcblk0px should be changed to mmcblk1px, I found this is wrong. Change to mmcblk1px does not work. It works if I keep them as is.

8. Third, I build the file system when I logged into ubuntu as normal user, not root. So the owner of all files are an normal user id, not root. The dev guide wiki use cp -rfp command to copy system and data files into mounted system.img and userdata.img, which preserves file owners. This causes trouble. At least for builld.prop file, which will be skipped during init and android won't boot into GUI.

I don't know if my solution to this problem is correct. I use 'sudo su' to change to root user. Then created boot, system, and userdata image as root user AND drop -p options in cp command.  Now at least the init can accept build.prop file and it seems the problem is solved.

9. Finanlly I am stucked by the following errors. I tried many ways but still can't solved the problem. It's fine in kernel log but logcat said:

E/dalvikvm( 421): cannot mountExternalStorage(): Invalid argument
E/dalvikvm( 421): VM aborting
F/libc ( 421): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 421 (zygote)
E/dalvikvm( 421): Failed to mount /mnt/shell/emulated/0 to /storage/emulated/0: Invalid argument
I/ActivityManager( 323): Start proc com.android.providers.calendar for broadcast com.android.providers.calendar/.CalendarUpgradeReceiver: pid=421 uid=10030 gids={50030, 3003, 1015, 1023, 1028}
I/DEBUG ( 67): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 67): Build fingerprint: 'Android/beagleboneblack/beagleboneblack:4.2.2/JDQ39/eng.ma.20130806.142514:eng/test-keys'
I/DEBUG ( 67): Revision: '0'
I/DEBUG ( 67): pid: 421, tid: 421, name: zygote >>> zygote <<<
I/DEBUG ( 67): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadd00d
I/DEBUG ( 67): r0 00000000 r1 00000000 r2 deadd00d r3 00000000
I/DEBUG ( 67): r4 4085e1b0 r5 0000020c r6 00000001 r7 00000002
I/DEBUG ( 67): r8 41dec2c0 r9 00000000 sl 0000272e fp 0000272e
I/DEBUG ( 67): ip 00004000 sp beaef610 lr 400430d9 pc 407f5bc0 cpsr 60000030
I/DEBUG ( 67): d0 74726f6261204d56 d1 6c616e726574786e
I/DEBUG ( 67): d2 419f40000000a375 d3 41de900041de906c
I/DEBUG ( 67): d4 00000006ffffffff d5 0000001800100103
I/DEBUG ( 67): d6 003f500000000014 d7 3eaaaaab3f800000
I/DEBUG ( 67): d8 0000000000000000 d9 0000000000000000
I/DEBUG ( 67): d10 0000000000000000 d11 0000000000000000
I/DEBUG ( 67): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 67): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 67): d16 0000000300000002 d17 0000000000000000
I/DEBUG ( 67): d18 0000000000000000 d19 0000000000000000
I/DEBUG ( 67): d20 3fc554e7eb0eb47c d21 3e66376972bea4d0
I/DEBUG ( 67): d22 3f4de16b9c24a98f d23 3fb0f4a31edab38b
I/DEBUG ( 67): d24 3fede16b9c24a98f d25 3fe55559ee5e69f9
I/DEBUG ( 67): d26 0000000000000000 d27 0000000000000000
I/DEBUG ( 67): d28 0000000000000005 d29 0000000000000000
I/DEBUG ( 67): d30 0000000000000000 d31 0000000000000000
I/DEBUG ( 67): scr 80000090

Please HELP!

And please provide prebuilt image file for eMMC fastboot, it will be very helpful when we encounter similar problem, we can check and compare files, line by line.

Tianfu Ma

  • Hi Tianfu, 

    Please try my procedure below:

    1. for build u-boot:make CROSS_COMPILE=arm-eabi- am335x_evm_config

    2. for build andriod linux kernel:make ARCH=arm CROSS_COMPILE=arm-eabi- am335x_evm_android_defconfig

    3. for build android linux kernel:make TARGET_PRODUCT=<product-name> OMAPES=4.x -j<N>

    Noted:Where <product-name> is:

    <beagleboneblack> for Beaglebone Black

    Noted:<N> should be twice the number of processors on your host machine. For example, a dual core machine would use -j4

    4. Modify fstab.am335xevm  which file at <Android source>/device/ti/beagleboneblack folder.

    add below scripts:

    /dev/block/mmcblk0p6 /system ext4 ro wait
    /dev/block/mmcblk0p7 /cache ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait
    /dev/block/mmcblk0p8 /data ext4 noatime,nosuid,nodev,nomblk_io_submit,errors=panic wait

    5. remove your scripts in init.rc file

    the following lines are added into init.rc file according to wiki.

    on fs
        mount ext4 /dev/block/mmcblk0p6 /system wait ro
        mount ext4 /dev/block/mmcblk0p8 /data wait noatime nosuid nodev
        mount ext4 /dev/block/mmcblk0p7 /cache wait noatime nosuid nodev