porting android

hello friends,

I am new to android. I am sorry if am discussing this in a worng
community.
i am trying to port android on omap3evm,
i have followed the procedure given in
http://labs.embinux.org/wiki/index.php/Android_Porting_Guide_to_Beagle_Board
. I added the android specifics in config file and i could build the
kernel. I tried it with the filesys given by embinux team but i failed
and got the error

<4>Warning: unable to open an initial console.
Warning: unable to open an initial console.
<0>Kernel panic - not syncing: Attempted to kill init!
Kernel panic - not syncing: Attempted to kill init!

the bootargs which i used are console=ttyS0,115200n8=noinitrd rw
ip=192.168.1.78 root=/dev/nfs nfsroot=192.168.1.77:/home/vishal/
workdir/filesys,nolock mem=128M video=omap24xxfb:rotation=90 init=/
init

I have few questions,
1.Is my approach right ?
2. If it is right then what could be the problem.
        or If the approach is wrong then how should I try ?

Hi,

I'm not sure if this the past approach since the source was released.
You may want to following this thread

http://groups.google.com/group/beagleboard/browse_thread/thread/7b422f113ce489b5

--- Jay

Also, chmod -R 777 the whole filesystem. The chmod -R 666 in the
instructions gave me the same error messages you saw. I'm sure
chmoding the entire filesystem is overkill, but it works.

-Howard

Vishal,
   Which kernel you are using? Are you using kernel for omap3evm along
with Android patches? Kernel configuration mentioned on wiki page, is
for beagle board.

Regards,

Rupesh,

I am using 2.6.25 Kernel . i checked out
git checkout -b beagle.android labs.embinux/android

then I modified omap3_evm_defconfig to enable android specific
configurations and I could build the Kernel.
while building filesystem i got this error

Rupesh ,

i amde a mistake.
I am actually using 2.6.27 kernel .

git checkout -b beagle.android-2.6.27 labs.embinux/android-2.6.27

hello Rupesh,

I get the android robot on the screen but after that nothing happens. when I checked the log i see that dalvik-cahce/ elements are not getting created.
I have put the logs here

http://pastebin.com/d3b038a0a
Can anyone tell me the reason why it is failing .
It’ll be of great help.

Vishal,
Take fresh RFS as well change permission for complete RFS to 777.
$chmod -R 777 /path_to_android_RFS

Regards, vishal bhoj wrote:

Hi,
    I have some errors.
Warning: unable to open an initial console.
init: cannot open '/initlogo.rle'
init: cannot find '/system/bin/playmp3', disabling 'bootsound'
sh: can't access tty; job control turned off
# warning: `rild' uses 32-bit capabilities (legacy support in use)

Does anyone know the problem?
My bootargsis: setenv bootargs console=ttyS2,115200n8 noinitrd root=/
de
v/mmcblk0p2 vidio=omapfb:mode:1280x720@50 init=/init rootfstype=ext3
rw rootdela
y=1 nohz=off

BTW, is the S-video support the TV?
After reading the FileSystem from SD card, what it will happen next?
sorry for such silly question..

Thanks in advanced

Hi, I am new with Linux so I have this question:
When I do compile kernel with Android patches where should I start in the terminal? Which kernel version I should use? and when I compile with
make ARC=arm CROSS_COMPILE=PATH_TO_CODE_SOURCERY_TOOL_CHAIN uImage
I have PATH = $HOME//CodeSourcery/Sourcery_G++_Lite/bin
then I got: make: *** No rule to make target ‘uImage’.

Could you please tell me what I should do?

Thang,

Hi, I am new with Linux so I have this question:
When I do compile kernel with Android patches where should I start in the terminal? Which kernel version I should use?

You can use kernel from embinux site, you should use kernel version is 2.6.27.

and when I compile with
make ARC=arm CROSS_COMPILE=PATH_TO_CODE_SOURCERY_TOOL_CHAIN uImage
I have PATH = $HOME//CodeSourcery/Sourcery_G++_Lite/bin
then I got: make: *** No rule to make target ‘uImage’.

Could you please tell me what I should do?

Are you following steps from embinux wiki page ? You should not get this error if you are following it.

http://labs.embinux.org/index.php/Android_Porting_Guide_to_Beagle_Board

Hi Rupesh,

I am following the android Porting guide on Beagleboard.
I did the following steps:

    $git clone git://source.mvista.com/git/linux-omap-2.6-historic.git

------> Please see "linux-omap-2.6-historic.git". Is it correct ?
          This creates linux-omap-2.6-historic and not "linux-
omap-2.6" as written in porting guide ..
           so is the URL correct ?

    $cd linux-omap-2.6-historic
    $git remote add labs.embinux git://labs.embinux.org/linux-omap-2.6
    $git remote update

    For 2.6.27 Kernel-
    $git checkout -b beagle.android-2.6.27 labs.embinux/android-2.6.27

    $make ARCH=arm omap3_beagle_android_defconfig

Sonal,

Hi Rupesh,

I am following the android Porting guide on Beagleboard.
I did the following steps:

$git clone git://source.mvista.com/git/linux-omap-2.6-historic.git

------> Please see “linux-omap-2.6-historic.git”. Is it correct ?
This creates linux-omap-2.6-historic and not “linux-
omap-2.6” as written in porting guide …
so is the URL correct ?

$cd linux-omap-2.6-historic
$git remote add labs.embinux git://labs.embinux.org/linux-omap-2.6
$git remote update

For 2.6.27 Kernel-
$git checkout -b beagle.android-2.6.27 labs.embinux/android-2.6.27

$make ARCH=arm omap3_beagle_android_defconfig

configuration written to .config

Now, I get following ERROR---------------------

$make ARCH=arm CROSS_COMPILE=PATH_TO_CODE_SOURCERY_TOOL_CHAIN
uImage

Which tool chain you are using ? Above command expects path to “arm-none-linux-gnueabi-gcc” after CROSS_COMPILE=.

Regards,
Rupesh Gujare

i am using CodeSourcery Sourcery G++ Lite 2007q3-51) 4.2.1

My make command looks like this :
make ARCH=arm CROSS_COMPILE=/home/test/arm2007-q3/arm-2007q3/bin/arm-
none-linux-gnueabi- uImage

is the error linked to HOSTCC , than the Cross compile toolchain by
any chance?
I am just guessing ?
my HOSTCC is gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3)

Please help....

Sonal,
It works fine for me with following toolchain and host gcc versions

gcc version 4.2.1 (CodeSourcery Sourcery G++ Lite 2007q3-51)
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12)

Regards,
Rupesh Gujare

ok. I will try to upgrade to gcc 4.3.2 and try....
but does it have any such dependencies on HOSTCC ??

I believe it should not have any dependency on HOSTCC for compiling kernel. Although I am not 100% sure.

Regards,
Rupesh Gujare

Ok i could build 2.6.25 kernel, so i will stick with that for now...

Hi Rupesh,

I am following the steps to build the android now..
I could apply patches for Tls and Gl Wrapper, but I am stuck when
applying alsa_sound patch.

On giving this command : "patch -p1 < ~/Alsa_sound-v1.1.patch"

I get the following :
Reversed (or previously applied) patch detected! Assume -R? [n]
I gave [n], and asked to apply the patch anyway..

Then it stops like this:
Hunk #1 FAILED at 30.
Hunk #2 FAILED at 106.
Hunk #3 FAILED at 187.
Hunk #4 FAILED at 218.
Hunk #5 succeeded at 985 with fuzz 1 (offset 70 lines).
Hunk #6 succeeded at 1071 with fuzz 1 (offset 77 lines).
4 out of 6 hunks FAILED -- saving rejects to file
AudioHardwareALSA.cpp.rej
patching file AudioHardwareALSA.h
Reversed (or previously applied) patch detected! Assume -R? [n] n
Apply anyway? [n] y
Hunk #1 FAILED at 22.
Hunk #2 FAILED at 157.
Hunk #3 FAILED at 213.
3 out of 3 hunks FAILED -- saving rejects to file
AudioHardwareALSA.h.rej
can't find file to patch at input line 253
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

Ok i am skipping the alsa patch and going ahead with the build,
without alsa support..

I got the build done.
Am I supposed to see any contents in android_build/out/target/product/
generic/data folder.. ??
It is empty ....

Just wanted to confirm..