Hello guys,my name is Joe,i would like to share with you my problem that i am experiencing with android build for A13 tablet similar to olinuxino A13 "q8_a13_tablet_defconfig" and i hope you will help me boot android successfully.
So first i am using Ubuntu 14.04 LTS 64bit,and i am willing to boot from sdcard.
I have Android 4.3.1 source from AOSP and Linux 3.4 and uboot from sunxi.
First,for test purposes i followed all instructions on https://linux-sunxi.org/Manual_build_howto to compile linux kernel and uboot and building the script.bin and boot.scr,and then flash them on my "MicroSd HC class 4 8GB" sdcard.i also downloaded a linaro rootfs and all boot successfully.
When building the linux kernel i am only enabling the "ThumbEE cpu" and the wifi drivers.
When building the uboot i am only enabling the "Workaround to boot old kernel".And all is ok and it's booting with no problem even the wifi worked.
Note:for the above instructions i am using
CROSS_COMPILE=arm-linux-gnueabihf-
for both kernel and uboot.My arm-linux-gnueabihf- version is 4.7.3 linaro,and same for gcc.
Now i decided to start building the android 4.3.1 source and i copied the "device/softwinner" folder from android4.1 wish it comes in a tar file downloaded form Olinuxino github.
i modified the init files (replaced all "nandx" variables with "mmcblk0px".
My sdcard partitions look like this:
- /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
from https://linux-sunxi.org/Boot_Android_from_SdCard
i tried couple ways for formating the sdcard ,one way using Gparted" and the second way using the instruction from the above page.
here is the init.sun5i.rc:
- import init.sun5i.usb.rc
on early-init
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
mkdir /mnt/extsd 0000 system system
mkdir /mnt/usbhost1 0000 system system
mkdir /databk 0700 root system
on fs
mount ext4 /dev/mmcblk0p3 /system wait noatime nodev barrier=0
# try to mount /data
wait /dev/mmcblk0p5
mount ext4 /dev/mmcblk0p5 /data wait noatime nosuid nodev barrier=0
setupfs /dev/mmcblk0p5
umount /data
exec /system/bin/logwrapper /system/bin/e2fsck -y /dev/mmcblk0p5
exec /system/bin/busybox mount -t ext4 -o noatime,nosuid,nodev,barrier=0,journal_checksum,noauto_da_alloc /dev/mmcblk0p5 /data
# try to mount /cache
mount ext4 /dev/mmcblk0p8 /cache wait noatime nosuid nodev barrier=0
setupfs /dev/mmcblk0p8
umount /cache
exec /system/bin/logwrapper /system/bin/e2fsck -y /dev/mmcblk0p8
exec /system/bin/busybox mount -t ext4 -o noatime,nosuid,nodev,barrier=0,journal_checksum,noauto_da_alloc /dev/mmcblk0p8 /cache
format_userdata /dev/mmcblk0p10 NUCLEAR
#try to format /databk
wait /dev/mmcblk0p11
mount ext4 /dev/mmcblk0p11 /databk wait noatime nosuid nodev barrier=0
setupfs /dev/mmcblk0p11
umount /databk
rmdir /databk
on boot
#insmod key & tp driver
insmod /system/vendor/modules/sun4i-ts.ko
# insmod /system/vendor/modules/sun4i-keyboard.ko
#insmod mali driver
insmod /system/vendor/modules/ump.ko
insmod /system/vendor/modules/mali.ko
#insmod video driver
insmod /system/vendor/modules/cedarx.ko
#csi module
insmod /system/vendor/modules/videobuf-core.ko
insmod /system/vendor/modules/videobuf-dma-contig.ko
#network module
insmod /system/vendor/modules/asix.ko bsize=0
insmod /system/vendor/modules/qf9700.ko
insmod /system/vendor/modules/mcs7830.ko
insmod /system/vendor/modules/8188eu.ko
# WEXT: only support sta
#service wpa_supplicant /system/bin/wpa_supplicant -Dwext -iwlan0 \
# -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
# class main
# socket wpa_wlan0 dgram 660 wifi wifi
# group system wifi inet
# disabled
# oneshot
# 1.1 realtek wifi sta service
service wpa_supplicant /system/bin/wpa_supplicant -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
# 1.2 realtek wifi sta p2p concurrent service
service p2p_supplicant /system/bin/wpa_supplicant \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -N \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
Here is my boot.cmd script:
- setenv bootm_boot_mode sec
setenv bootargs root=/dev/mmcblk0p2 loglevel=8 rootwait console=ttyS0,115200 rw init=/init mac_addr=00:AE:99:A3:E4:AF
load mmc 0:1 0x43000000 script.bin || load mmc 0:1 0x43000000 boot/script.bin
load mmc 0:1 0x42000000 uImage || load mmc 0:1 0x42000000 boot/uImage
bootm 0x42000000
The "prebuilts" folder inside the android source "../prebuilts/gcc/linux-x86/" has multiple toolchains "arm-eabi-4.6","arm-eabi-4.7","arm-linux-androideabi-4.6","arm-linux-androideabi-4.7".
I tried to compile the linux kernel and uboot using all these versions and ofcource i tried first with "arm-linux-gnueabihf-"and i tried to use uImage and zImage converted to uImage using mkimage command.
When i boot the board,the uboot comes first and post some commands on screen,then it loads the kernel with no problem,when the kernel loaded the android logo appears and that's it,it hangs here.
Now i tried to hack the problem by adding mkdir after " mount ext4 /dev/mmcblk0p3 /system wait noatime nodev barrier=0" but with no luck.
I am out of ideas,i will be glad if someone really help me know what is going on and fix the problem,maybe it is a crosscompiler issue.
Thank you for your time,appreciate your reply.
I would like also to know,should i compile the kernel and uboot with the same toolchain that compiled android source?
What Image should i use:zImage or converted zImage or just the uImage althought i tried them all.
I also enabled android device drivers in menuconfig of the kernel build.
I did lots of researches about compiling android kernels and the android boot process,all i found is just scripts and few lines of commands, i cant really find a clear declaration on how to configure android for a real device.