Android port for beagle(OMAP3530)- Code Released

Hi,

Hello:

Just put this on a BB- should I expect USB Ethernet to work? Or do I
have to build in support and build my own kernel? I'm using the pre-
build version that you have kindly supplied. I'm using a linksys USB
Ethernet dongle.

  

You are welcome to integrate it with BB. Please post your efforts and progress.
Indeed USB ethernet work in our prebuild version. We have tested it. You don’t need to build support in your kernel.

I read that Android doesn't know about USB, so how is working on the
BB ?

  

Your information is incorrect. Android have full support for USB

Regards,

Hi,
  We are upgrading our source code with latest Android cupcake release.
Release Features:-
1. Android kernel is upgraded to 2.6.27, with new functionalities.
2. Fixed broken ALSA sound for Android build.

We have moved our "Android Porting Guide to Beagle Board" page to new
wiki page for easy maintenance and future release modifications.

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

You can browse kernel source at:-
http://labs.embinux.org/git/

We have tested input device (keyboard,mouse), network and sound(*.mp3)
with this release, all is working fine.

I will like to thanks Sean for sharing a patch that fixed ALSA issue.

Regards,

Hi,
  We are upgrading our source code with latest Android cupcake release.
Release Features:-
1. Android kernel is upgraded to 2.6.27, with new functionalities.
2. Fixed broken ALSA sound for Android build.

We have moved our "Android Porting Guide to Beagle Board" page to new
wiki page for easy maintenance and future release modifications.

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

You can browse kernel source at:-
http://labs.embinux.org/git/

We have tested input device (keyboard,mouse), network and sound(*.mp3)
with this release, all is working fine.

I will like to thanks Sean for sharing a patch that fixed ALSA issue.

Regards,

-- Rupesh Gujare http://embinux.com

Hi Rupesh,

I was just looking over the "Android Porting Guide to Beagle Board"
and I think there my be a couple of typo errors

1. In the "Ownership" section, the command

   $ chmod -R 666 /data /system

   will override the permission you set in the previous step

   $chmod -R 777 /system/use/keychar

Did you mean to reverse those two steps?

2. I think there is a space missing in the TLS Patch:

   Should the line "/* get the TLS */" be " /* get the TLS */"?

Thanks for the all the hard work put into creating this document.

Cheers,
Jay

Jay,
Thanks for pointing out, We have updated wiki page.

Regards,
JayBird wrote:

Rupesh Gujare wrote:

2. Fixed broken ALSA sound for Android build.

I'm currently hunting this in Angstrom. Any hints?

Hello Rupesh,

I tried following your new Wiki page, and it works well. One correction: I had to chmod -R 777 the filesystem to get it to work. After that, it works well. I was able to get the Amazon MP3 app (pulled from a G1) to work, and even could preview the songs. So sound is working.

I was not able to get your patches for the kernel, remote disconnected unexpectedly, or some message like that, but I just used the kernel you posted in December, and it seems to work ok.

Most other proprietary apps like Market will not run, but I guess that is some sort of signing issue.

Thanks for the great work.

-Howard

Hello Rupesh,

I tried following your new Wiki page, and it works well. One
correction: I had to chmod -R 777 the filesystem to get it to work.
After that, it works well. I was able to get the Amazon MP3 app
(pulled from a G1) to work, and even could preview the songs. So
sound is working.

I was not able to get your patches for the kernel, remote disconnected
unexpectedly, or some message like that, but I just used the kernel
you posted in December, and it seems to work ok.

Actually the git failure is as follows:
$ git remote update
Updating labs.embinux
fatal: The remote end hung up unexpectedly
fetch labs.embinux: command returned error: 128

-Howard

Hello:

Just put this on a BB- should I expect USB Ethernet to work? Or do I
have to build in support and build my own kernel? I'm using the pre-
build version that you have kindly supplied. I'm using a linksys USB
Ethernet dongle.

No, your USB Ethernet adapter will not work with demo image, we have
tested it with
"Davicom DM9601 based USB Ethernet adapter", hence you needs to build
your own image with linksys driver support.

I read that Android doesn't know about USB, so how is working on the
BB ?

   I believe, Android doesn't needs to know about USB if your kernel
and platform has support for USB.

Regards,
Shivdas Gujare

The GIT remote update problem was due to my firewall, I guess. I
changed git:// to http:// and it works fine now.

I hacked some of the system/bluedroid code in Android, and got
Bluetooth to sort of work, but eventually the kernel panics, either
because of the USB host driver or the btusb driver. Given the
problems I've had with USB memory stick and USB Ethernet on Beagle,
I'd guess the usb host driver is the problem.

-Howard

Hi All,
We have fixed git issue, It was a problem with our git server. Now it should work fine, please let me know if you are still facing any problems.

Regards,

Howard M Harte wrote:

Hi Rupesh,

I'm not an expert with git, but I think the
omap3_beagle_android_defconfig file is missing. I did the following:

    $git clone git://source.mvista.com/git/linux-omap-2.6.git
    $cd linux-omap-2.6
    $git remote add labs.embinux git://labs.embinux.org/linux-omap-2.6
    $git remote update
    $git checkout -b beagle.android-2.6.27 labs.embinux/android-2.6.27
    $make ARCH=arm omap3_beagle_android_defconfig

Afterwards, I get the following error

Hi Rupesh,

I'm having some problems with the patches from the new site. I cut-
paste the text into patch files. I think it would be helpful if you
can provide a link to them as a tar image or individually.

1. The libC patch fails to add the "arch-arm/bionic/ffs.S \" entry to
Android.mk. I did this one manually.

2. The alsa_sound patch fails:

jayw@kittredge:~/alsa_sound$ patch -p1 < /home/jayw/Android/
beagleboard/Patches/Alsa_sound.patch
patching file AudioHardwareALSA.cpp
Hunk #2 FAILED at 187.
Hunk #3 FAILED at 218.
patch: **** malformed patch at line 107: //

Jay,
  Thanks for your help and suggestions, Please see inline comments:-
JayBird wrote:

Hi Rupesh,

I'm having some problems with the patches from the new site. I cut-
paste the text into patch files. I think it would be helpful if you
can provide a link to them as a tar image or individually.

1. The libC patch fails to add the "arch-arm/bionic/ffs.S \" entry to
Android.mk. I did this one manually.

This patch is removed, as now it is in mainline Android build.

2. The alsa_sound patch fails:

jayw@kittredge:~/alsa_sound$ patch -p1 < /home/jayw/Android/
beagleboard/Patches/Alsa_sound.patch
patching file AudioHardwareALSA.cpp
Hunk #2 FAILED at 187.
Hunk #3 FAILED at 218.
patch: **** malformed patch at line 107: //
----------------------------------------------------------------------------

I haven't tried to figure this one out yet. I think I will wait to
hear you response.
  

We have removed patches from wiki page, and given link to clean patches
so that you dont have to copy & paste.

Here are some suggestions for the build instructions:

1. I think the instructions would flow better if you move alsa_sound
path to the ALSA Support section. Currently, you have the LibC patch
following the ALSA Support.
  

Libc patch do not exist, so I think this have automatically solved problem

2. The initrc.patch is broken into multiple blocks. Kinda of confused
me at first.
  
3. The qwerty.kl.patch is also broken into multiple blocks.
  

Removed it from wiki page and given a link to clean patch.

4. In the instructions for applying the patches. I would be helpful
if you could specify the root directory for which to execute the patch
command.
  

Now all patches mention, root directory from where you can apply them.

Once again, thanks for all the hardware work you put into this
document. If you update them, I'm more than happy to run through
them from beginning to end to help you iron out the details.

Cheers,
Jay

Hi Rupesh,

I'm not an expert with git, but I think the
omap3_beagle_android_defconfig file is missing. I did the following:

    $git clone git://source.mvista.com/git/linux-omap-2.6.git
    $cd linux-omap-2.6
    $git remote add labs.embinux git://labs.embinux.org/linux-omap-2.6
    $git remote update
    $git checkout -b beagle.android-2.6.27 labs.embinux/android-2.6.27
    $make ARCH=arm omap3_beagle_android_defconfig

Afterwards, I get the following error

***
*** Can't find default configuration "arch/arm/configs/
omap3_beagle_android_defconfig"!
***

I have fixed the git, and added latest patches from android-2.6.27 kernel.
It will be of great help if you can run through all steps from beginning
to end, and let me know if there exists any more troubles.

Regards,

Hi Rupesh,

Thanks for response. I will try running through the instructions
again:)

Note, I was going to try to compile using the 2.6.27 Kernel. Did I
miss a step, there is no config file for

omap3_beagle_android_defconfig

in branch "beagle.android-2.6.27" (See previous post for steps I
executed).

Cheers,
Jay

JayBird wrote:

Hi Rupesh,

Thanks for response.  I will try running through the instructions
again:)

Note, I was going to try to compile using the 2.6.27 Kernel.  Did I
miss a step, there is no config file for

omap3_beagle_android_defconfig

in branch "beagle.android-2.6.27" (See previous post for steps I
executed).

  

No you didn’t missed any step, “omap3_beagle_android_defconfig” file was missing, I have corrected it.

Regards,

Rupesh Gujare

Ive been having problems with this Android.
Im trying to get it to work with the binaries provided (http://
labs.embinux.org/index.php/Main_Page#About_EMBINUX.E2.84.A2)
Im trying 2 ways... using an nfs, and using the SD card for the
filesystem... both are failing with the same errors.

during boot:

If you press return at the serial console, do you get a # prompt? You
should, and if so, you can take a look at the log using the 'logcat'
utility. Also do a 'ps' and see that zygote and a bunch of Android
processes are running. Also make sure your display is working
properly. You can do 'cat somefile > /dev/fb0' and you should see
some junk on the display.

I ran into a similar problem with Android on a different platform.
Android was running properly, but the LCD was not initialized properly
by the bootloader.

-Howard

Hi Rupesh,

I went through the build process again:) Overall, I was able create a
working system; however, it wasn't perfect.

I was able to build the 2.6.25 kernel with no problems. I haven't
tried the 2.6.27 branch yet; however, I think I will have some time
tomorrow to try it out. I was also able to build Android (haven't
tried cupcake yet) with your patches; however, ALSA fails (See error
below). As a result, I had to remove that option from my
BoardConfig.mk. Note, I did apply the Alsa_sound.patch.

As I built the system, I took some notes. Below is list of changes
that you may want to integrate in your build instructions:

1. If one wants to cut-and-paste the patch commands, either the patch
files need to be re-named to match the text, or the text modified to
reflect the patch file names (i.e qwerty.kl.patch should be
Qwerty.patch)

2. May want to add

      $ make

    in the Compile Build

3. In the Alsa_sound section, you ask the user to apply the patches,
but give the incorrect Root Dir. I think you it may flow better if re-
work it a little:

                1 - $ cd ~
                2 - Clone alsa-lib from
                         $ git clone git://android.git.kernel.org/platform/external/alsa-lib.git
                3 - Clone ALSA based libaudio
                         $ git clone git://android.git.kernel.org/platform/hardware/alsa_sound.git
                 4 - Apply following patches to build
                         Root DIR : alsa_sound
                         Media:alsa_sound.patch
                         $ patch -p1 < Alsa_sound.patch

                  5- Change directory to the root "Android_build"
                         $ cd Android_build
                  6 - Add ALSA audio support to the board config file
and comment our generic audio support.
                        $ vim Android_build/build/target/board/generic/
BoardConfig.mk
                                 add BOARD_USES_ALSA_AUDIO := true
                                 #BOARD_USES_GENERIC_AUDIO := true
                  7 - Copy ALSA support supporting code from steps 3
and 4 above
                               $cp -a ~/alsa-lib external
                               $cp -a ~/alsa_sound hardware

4. I think the instructions in the Ownership section are incorrect.
The following seem to work for me.

                  1. Do the following as either root or use sudo
                         $ cd ~/Android_rfs
                         $ chown -R root.root *
                         $ chmod -R 777 system/user/keychars

If I compile Andorid with ALSA support, I get the following error:

target arm C++: libaudio <= hardware/alsa_sound/AudioHardwareStub.cpp
hardware/alsa_sound/AudioHardwareStub.cpp: In member function 'virtual
android::AudioStreamOut* android::AudioHardwareStub::openOutputStream
(int, int, uint32_t, android::status_t*)':
hardware/alsa_sound/AudioHardwareStub.cpp:52: error: cannot allocate
an object of abstract type 'android::AudioStreamOutStub'
hardware/alsa_sound/AudioHardwareStub.h:30: note: because the
following virtual functions are pure within
'android::AudioStreamOutStub':
hardware/libhardware/include/hardware/AudioHardwareInterface.h:88:
note: virtual android::status_t android::AudioStreamOut::standby()
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/
libaudio_intermediates/AudioHardwareStub.o] Error 1
jayw@Rubicon:~/Android/beagleboard/mydroid$

I haven't tried to dig through the code to understand the problem, but
I thought this was fixed a while back. Do you have a fix?

Cheers,
Jay

Hey Rupesh,

I grab the beagle.android-2.6.27 branch for the kernel, and it appears
the omap3_beagle_android_defconfig file is a diff file. Did you check
in the right file?

--- Jay