Firefly Open Source Community

Title: How to build android to boot from SD card? [Print This Page]

Author: sjwlaoda    Time: 9/10/2015 16:04
Title: How to build android to boot from SD card?
Hi,
I am building android lollipop by myself, I want to make it boot from SD card on rk3288 board.
I build the android code, and generate images via mkimage.sh.I download the android 4.4 sd card image from firefly website, extract it and replace boot.img, kernel.img, system.img with my own version, repack these image to release_update.img, and flash to SD card, and now the board cannot start correctly, the errors are like:
Failed to mount an un-encryptable or wiped partition on/dev/block/platform/ff0f0000.rksdmmc/by-name/system at /system options: noauto_da_alloc error: No such file or directory
It seems the boot.img for emmc and sdcard are different, does anyone know how to configure/build boot.img to make it run from SD card?
Or is there any special codes/steps I have to do before building?



Author: busybee    Time: 9/12/2015 10:52
Please have a look at the scripts post at:
https://plus.google.com/+IanMORRISON/posts/22Vxc6Sr5Ei
Author: sjwlaoda    Time: 9/14/2015 12:56
busybee Posted at 9/12/2015 10:52
Please have a look at the scripts post at:
https://plus.google.com/+IanMORRISON/posts/22Vxc6Sr5Ei

Hi
thanks for your help, I tried this tool before, I have downloaded two android package from this website, one is android4.4 sd card version, the other is android4.4 non-sd card version. the steps I tried are:
1. flash RK3288Loader_uboot_V2.17.02.bin
   ./create-android-sdcard android4.4_sd card
   this one can boot successfully from sd card
2. flash RK3288Loader_uboot_V2.17.02.bin
   ./create-android-sdcard android4.4_sd non-card
   this one cannot boot, cannot find file system
3. flash RK3288Loader_uboot_V2.17.02.bin
   extract these two images, and copy the boot.img, kernel.img, system.img from non-sd package to sd package, and then re-pack the sd package
   ./create-android-sdcard the_new_package
   the one has the same issue with 2, cannot find file system (cannot find system, userdata...)

and I also replaced with my own built images, the issues are similar.
Is there any problem with my steps?

Author: busybee    Time: 9/15/2015 10:20
I think you need the kernel.img & boot.img from sd package.

Normally, the kernel will only parse the MBR partition of the sd card.

I guess that kernel.img & boot.img from sd package will also parse
and handle the mtd partitions of the sd card.
Author: sjwlaoda    Time: 9/15/2015 15:33
If I use the images from sd package (4.4), and replace system.img with my own built 5.1 image, the kernel can bootup and file system can be load successfully, but severicemanager cannot start:
[   24.315467] binder: 147:147 transaction failed 29189, size 0-0
[   25.299560] binder: 147:147 transaction failed 29189, size 0-0
[   26.283657] binder: 147:147 transaction failed 29189, size 0-0
[   26.591163] binder: 260:260 transaction failed 29189, size 0-0
[   26.807166] binder: send failed reply for transaction 8 to 265:265
[   26.807322] init: critical process 'servicemanager' exited 4 times in 4 minutes; rebooting into recovery mode

29189 is BR_DEAD_REPLY, I think it may be that my system.img is incompatible with 4.4_sd package, because if I replace the system.img with non-sd package (4.4), it can work.
so the problem maybe that I don't know how to configure the sd card version of boot.img (the boot.img from mkimage.sh is only about 1MB, but the boot.img from sd package is about 7MB, and if I use mkimage.sh ota and replace boot.img, then the board cannot find kernel)
Author: dewet    Time: 9/15/2015 23:48
I think you need a boot.img with kernel inside, separate kernel.img I don't think will work with SD boot.
Author: sjwlaoda    Time: 9/16/2015 10:18
dewet Posted at 9/15/2015 23:48
I think you need a boot.img with kernel inside, separate kernel.img I don't think will work with SD  ...

so do you know how to make boot.img work with sd card?
Author: dewet    Time: 9/18/2015 00:06
Have you tried
https://bitbucket.org/T-Firefly/ ... r=file-view-default
Author: sjwlaoda    Time: 9/18/2015 10:31
dewet Posted at 9/18/2015 00:06
Have you tried
https://bitbucket.org/T-Firefly/firenow-lollipop/src/c27bca778047567048811e9e8e17dd4 ...

I was using this tool to flash the update.img, but this tool is just used to flash images to sd card, it doesn't help to config the boot.img.




Welcome Firefly Open Source Community (https://bbs.t-firefly.com/) Powered by Discuz! X3.1