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. Tarif Internet Unlimited Three Nai

sama..baru dapet sms nya juga nih..

bagi yg udah berlangganan sebelum 6 april, tarif baru berlaku 6 mei..

masih ada perpanjangan waktu sebulan.. :)




Pelanggan Yth,

Per 8 Apr 2010 tarif langganan 3 Mobile Broadband mjd Rp99rb/30hr (diluar
PPN), jk pulsa tdk mencukupi utk layanan bulanan maka otomatis dipmingguan
dg biaya Rp29rb/7hr (diluar PPN).
Utk pelanggan yg sdh berlangganan sblm 6 Apr 2010 tarif baru akan berlaku
mulai 6 Mei 2010. Info:200


*************
Deska Affif
088-1100-GAYA (4292) | Y!: GadgetGaya
www.gadgetgaya.com  |  Light Up Your Gadget!

-- 
"Indonesian Android Community [id-android]"

2. Terima kasih suhu SA

Dalam kesempatan ini saya lagi2 ingin mengucapkan terimakasih kepada suhu SA
yg selalu "sedia setiap saat" pas saya gangguin.
Tadi siang hh saya tiba2 gakmau dinyalain, looping aja di gambar fireworks
itu (saya pake Manup Eclair 2.1).
Kemudian atas petunjuk beliau saya cabut batre, masuk k recovery, nand+ext
backup (yg gak mungkin direstore lg, karena kalo direstore tetep akan
looping),wipe data+cache+ext, kemudian flash ulang rom nya.
Daannn... berhasiiilll...
Walau ada beberapa apps yg harus download ulang karena blom sempet dibackup
di astro.

M{*filter*}of the story: rajin2lah mem-back-up aplikasi maupun data, siapa tau
one day kejadian kaya saya.
Trus pelajaran kedua: markiflash !!! Hehehehee...

Rgds,
Enya
-blom bikin siggy lagi-

-- 
"Indonesian Android Community [id-android]" 

Join:  http://www.***.com/ 
Moderator: id.andr...@gmail.com
ID Android Developer:  http://www.***.com/ 
ID Android Surabaya:  http://www.***.com/ 
ID Android on FB:  http://www.***.com/ 

To unsubscribe, reply using "remove me" as the subject.

3. OOT: Paging oom Hoesin

4. HttpsUrlConnection and OpenSSL freeing session

5. Custom ROM Spica

6. Ticker View in Notification

7. Making money through advertising in an Android Application