Booting the target with boot.img generated by Android

by kanagesh radhakrishnan » Thu, 24 Sep 2009 05:12:28 GMT


Sponsored Links
 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 onsole=ttyS0,38400 mem=128M* Copy the Linux kernel into Android sources under vendor/hw/platform/kernel
* Ensure that ARGET_NO_KERNELis 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 oot=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=oot       -> CONFIG_CMDLINE is set to onsole=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 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

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. Plans for Change (Was: Petition: Google, please improve the Android Market.)



Yes. By default, it is all regions, but you can limit it.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 

2. How to launch an activity from a listview?

Hi all,

All I'm trying to do is start my activity from the home screen. This
brings up a list of items and I wanna be able to click on each item
and launch a separate activity. Is there an easy way to do this?

Thanks in advance

--

3. Get reference to Checkmark in ListActivity

4. Testing dialog in Android鈥檚 A ctivityUnitTestCase

5. Developing android apps that auto-update/install

6. Need Devs for Easter Contest

7. live streaming + vod streaming + SMIL on Android