Hello All,
I am working with Android on a custom PXA310 based platform. I am
facing issues while launching the Linux kernel and Android from
boot.img that is generated as part of Android build. I have
summarized two scenarios below.
Case 1 (NOT WORKING)
-----------------------------------------
I am attempting to use boot.img built by Android to launch the Linux
kernel and Android
* Build the Linux kernel to generate arch/arm/boot/zImage
* The kernel has been built with
-> CONFIG_BLK_DEV_INITRD=y and CONFIG_INITRAMFS_SOURCE not set
->CONFIG_CMDLINE set to “console=ttyS0,38400 mem=128M”
* Copy the Linux kernel into Android’s sources under vendor/hw/platform/kernel
* Ensure that ‘TARGET_NO_KERNEL’ is set to false in
vendor/hw/platform/BoardConfig.mk
* Build Android. This generates boot.img and recovery.img with the
prebuilt kernel
* Program boot.img, recovery.img to NAND flash on target platform
* On booting, Bootloader finds the default boot kernel or recovery
kernel (depending on the command in BCB)
* However, kernel boot fails while attempting to find a root file system (RFS)
* This is because the Linux kernel has no knowledge of where RFS
exists (we need to pass ‘root=’ option at kernel boot time? Or is it
some kernel config setting??)
CASE 2 – (WORKING)
----------------------------------
I don't use the boot.img with this scenario. In this scenario, I am
building Android's ramdisk (the contents of ramdisk.img) statically
with the Linux kernel.
* Build Android. Copy the contents of ramdisk.img (from Android
folder out/target/hw/platform/root) to kernel sources to a folder
named 'root'
* Build the Linux kernel to generate arch/arm/boot/zImage
* The kernel has been built with
-> CONFIG_BLK_DEV_INITRD=y and CONFIG_INITRAMFS_SOURCE=”root”
-> CONFIG_CMDLINE is set to “console=ttyS0,38400 mem=128M”
* Program this Linux kernel to NAND Flash on target platform
* On booting:
* Bootloader launches this kernel
-> mounts the ramdisk provided as INITRAMFS, runs Android’s init
-> mounts system.img and userdata.img programmed in NAND flash
-> launches Android
Versions of Software being used are as follows:
Linux Kernel - Sources based on linux-2.6.28
Android - Sources based on Android source with tag 'android-sdk-1.5_r1'
On going through the build logs for Kernel and Android, I have
determined that the way boot.img is built is different from the way
the Linux kernel builds the kernel binary with CONFIG_INITRAMFS_SOURCE
set to point to a RAM disk.
Has anyone got the boot.img to launch the kernel and Android
successfully? Any pointers on where I need to look or what parameters
I need to pass to the kernel to mount the ramdisk while using boot.img
would be extremely helpful.
Thank you for your time.
Regards,
Kanagesh
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---