Porting Android on Freescale IMX31 board

373 views
Skip to first unread message

Rajesh N

unread,
Jan 11, 2009, 2:16:21 AM1/11/09
to android...@googlegroups.com
Hi All,

I am very much new to Android, I have been asked to port android on Freescale IMX31 board which is shipped with Linux BSP.
I went through few questions on forum which states some incomplete statements on porting on IMX31 board.

I would like to know if Android kernel which is downloaded from source.android.com comes with Freescale IMX31 BSP, or we have to merge source code given Freescale and android
using "DIFF" and adding android patch as stated in android fourms, which I am not very clear till now!.

 If any one in the group help me our in giving clear picture on how to go about in porting Android on IMX31 platform, I appreciate your suggestions and road map to go about with porting issues.

 Best Regards,
 Rajesh N

s.a...@gmail.com

unread,
Jan 11, 2009, 8:07:25 AM1/11/09
to android...@googlegroups.com
> if Android kernel which is downloaded from source.android.com comes
> with Freescale IMX31 BSP
The kernel is Vanilla plus Android related patches. So, IMX31 support
in the kernel would be as much as what is available in the Vanilla
version. Note that you will first need to setup/compile the kernel for
MX31 configuration.

> we have to merge source code given Freescale and android
> using "DIFF" and adding android patch as stated in android fourms,
> which I am not very clear till now!.
If you already have a BSP, you might want to "diff" that against Vanilla first.

Avtar

Rajesh N

unread,
Jan 11, 2009, 11:48:05 AM1/11/09
to android...@googlegroups.com
Hi s.avtar,

 Thanks for kind reply,

  I am bit confused with u r statements, I went through the linux resources given by freescale for IMX31 board, the CD contained Linux kernel with some toolchains.

 As u said, in u r last statement as I need to DIFF  IMX BSP with vanilla kernel ! , I have learnt from the forum that I need to make
 a DIFF my IMX31 BSP with Android kernel to take a patch which I should apply to IMX31 BSP where by I can add all these nessesary Android functionality to my IMX31 BSP (Removing unwanted goldfish and relatated stuffs before I port to real hardware).

 I would like to know u r veiw on my statements, correct me if I am wrong anyway!

 Best Regards,
 Rajesh N

deepak singal

unread,
Jan 11, 2009, 11:36:37 PM1/11/09
to android...@googlegroups.com
Hi Rajesh,


Porting of Google Android-1.0 Version to IMX31 board Steps-----> Port Android on IMX31(ARM-11 core) using following steps: --->linux-2.6.25-android-1.0_r1.tar.gz Android kernel Source Code (Download Site---> http://code.google.com/p/android/downloads/list ) --->Freescale IMX31 specific patchs (Available for Linux-2.6.24 kernel) (Download Site---> http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31PDK&fpsp=1&tab=Design_Tools_Tab ) --->linux-2.6.25.tar.gz Clean kernel Source Code (Download Site---> http://www.kernel.org/pub/linux/kernel/v2.6/ ) I am starting with the 2.6.25 kernel Source code. I am in the process of trying to make a 2.6.25 Android kernel for the I.MX31 board. Current approach is this: (1) Download All the above kernel source code and patches from above mention sites. (2) Apply Freescale imx31 specific Patch into Linux-2.6.25 kernel source code (some thing applied by the automated mechanism and other are left for manual patching) (3) Apply my board specific change into (linux-2.6.25 + freescale patch) kernel source code (4) Get the proper tested imx31 kernel (linux-2.6.25 + freescale Patchs + my board patch) (5) Use the tool diff to create a patch from a clean linux-2.6.25 kernel source and the android specific linux-2.6.25-android-1.0_r1 kernel source. diff -Naur linux-2.6.25/ linux-2.6.25-android-0.9_r1/ --> android.patch (6) Remove all stuff from the android.patch file that will not need (goldfish related things, yaffs2 things because freescale kernel provides already yaffs2) (7) Apply android.patch into (linux-2.6.25 + freescale Patchs + my board patch) kernel Source Code (some thing applied by the automated mechanism and other are left for manual patching)

Please feel free to discuss anything.

Best Regards,

Deepak Singal

Rajesh N

unread,
Jan 12, 2009, 1:39:58 AM1/12/09
to android...@googlegroups.com
Hi Deepak,

 Thanks for u r kind reply,
 
 I am unable to get few statements which u have mentioned in 7 step procedure to port Android on IMX31 board/

 In step 3 u have mentioned "my board specific changes" and in step 4 u have mentioned a patch which should have got from step 3. I unable to follow step 3 and step 4 out of ur  7 point procedure to make android up with imx31 board, can u please be more specific on step 3 & 4.

 I am working on IMX31 PDK board, I hope it doesn't make any difference with both versions of IMX31 board which r available in market.

 Regards,
 Rajesh N

deepak singal

unread,
Jan 12, 2009, 2:34:59 AM1/12/09
to android...@googlegroups.com

Hi Rajesh,

Actually m using NEC imx31  board .

First  port  freescale imx31  linux-2.6.24 kernel into NEC imx31 board ------> (need some changes into freescale kernel for imx31 board)

--->linux-2.6.25-android-1.0_r1.tar.gz Android kernel Source Code
(Download Site---> http://code.google.com/p/android/downloads/list )

--->Freescale IMX31 specific patchs (Available for Linux-2.6.24 kernel)
(Download Site---> http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31PDK&fpsp=1&tab=Design_Tools_Tab )

--->linux-2.6.25.tar.gz and linux-2.6.24.tar.gz Clean kernel Source Code

PLZ use below step:
(1) Download All the above kernel source code and patches from above mention sites.

(2) Apply Freescale imx31 specific Patch into Linux-2.6.25 kernel source code (some thing applied by the automated mechanism and other are left for manual patching)

(3) Get the proper tested imx31 kernel (linux-2.6.25 + freescale Patchs ) 

(4) Use the tool diff to create a patch from a clean linux-2.6.25 kernel source and the android specific linux-2.6.25-android-1.0_r1 kernel source.

diff -Naur linux-2.6.25/ linux-2.6.25-android-0.9_r1/ --> android.patch

(5) Remove all stuff from the android.patch file that will not need (goldfish related things, yaffs2 things because freescale kernel provides already yaffs2)

(6) Apply android.patch into (linux-2.6.25 + freescale Patchs ) kernel Source Code (some thing applied by the automated mechanism and other are left for manual patching)

OR

(1) Download All the above kernel source code and patches from above mention sites.

(2) Apply Freescale imx31 specific Patch into Linux-2.6.24 kernel source code. 

(3) Get the proper tested imx31 kernel (linux-2.6.24 + freescale Patchs )

(4) Use the tool diff to create a patch from a clean linux-2.6.25 kernel source and the android specific linux-2.6.25-android-1.0_r1 kernel source.

diff -Naur linux-2.6.25/ linux-2.6.25-android-0.9_r1/ --> android.patch

(5) Remove all stuff from the android.patch file that will not need (goldfish related things, yaffs2 things because freescale kernel provides already yaffs2)

(6) Apply android.patch into (linux-2.6.24 + freescale Patchs ) kernel Source Code (some thing applied by the automated mechanism and other are left for manual patching)

Best Regards,

Deepak Singal

mvniekerk

unread,
Jan 12, 2009, 2:41:41 AM1/12/09
to android-porting
Hi Rajesh

I'm on the same boat as you. What worked for me is the following:

1) Get the 2.6.25 Android kernel and extract to a directory of choice.
Note that the latest Android source uses kernel 2.6.27
2) Make sure you download the latest BSP for the **PDK** on
Freescale's site, r14. I think there was one released in October 2008.
Install it, but If you're using Ubuntu, "sudo aptitude install alien
rpm" and make sure /etc/sudoers have your username in it.
3.i) In the LTIB directory created by your PDK installation, run "./
ltib" and be sure to choose the IMX31_3STACK as platform (PDK's
alternative name).
3.ii) In kernel selection, select kernel 2.6.24, and make sure that
"Leave sources after building" is checked. To save time, make sure all
other packages in "Package Selection" is deselected". Also check the
"Configure kernel" option.
3.iiI) Exit, it will start to compile the BSP. After it has finished
extracting the kernel source it will run "make menuconfig" by itself.
Exit, and it will start to compile the kernel. It is safe to Control-C
yourself out of it
4) In the BSP installation directory (where you ran "./ltib") there is
a folder rpm/BUILD/linux-2.6.24. That is where your BSP kernel folder
is.

You can then procede in downloading a vanilla 2.6.24 from kernel.org
and do a diff on it. A good tool to visually do this is meld. If you
have Ubuntu, "sudo aptitude install meld" is your helper.

Here is a list of directories that you must focus on in porting to
your Android kernel
arch/arm/mach-mx3
arch/arm/plat-mx3
include/asm-arm/arch-mxc
sound/arm
sound/soc
drivers/mxc
drivers/watchdog/
drivers/video/mxc
drivers/spi
drivers/serial
drivers/regulator
drivers/rtc

Be sure all the Kconfig and Makefiles reflect your changes.

Hope this will prod you in the right direction. There is one issue on
Android and that is x-panning on video - the screen looks as though it
is only updated once every 2nd keypress, and I still have to get the
sound working. I've also forced the LCD backlighting on on init, but
that is about how deep my hacking went to get this "usable". If you
have flicker on the screen, mail me.




On Jan 12, 8:39 am, "Rajesh N" <rajesh.andr...@gmail.com> wrote:
> Hi Deepak,
>
>  Thanks for u r kind reply,
>
>  I am unable to get few statements which u have mentioned in 7 step
> procedure to port Android on IMX31 board/
>
>  In step *3* u have mentioned "*my board specific changes*" and in
> step *4*u have mentioned a patch which should have got from step 3. I
> unable to
> follow step 3 and step 4 out of ur  7 point procedure to make android up
> with imx31 board, can u please be more specific on step 3 & 4.
>
>  I am working on IMX31 *PDK* board, I hope it doesn't make any difference
> with both versions of IMX31 board which r available in market.
>
>  Regards,
>  Rajesh N
>
> On Mon, Jan 12, 2009 at 10:06 AM, deepak singal <deesin...@gmail.com> wrote:
> > Hi Rajesh,
>
> > Porting of Google Android-1.0 Version to IMX31 board Steps----->
>
> > Port Android on IMX31(ARM-11 core) using following steps:
>
> > --->linux-2.6.25-android-1.0_r1.tar.gz Android kernel Source Code
> > (Download Site--->http://code.google.com/p/android/downloads/list)
>
> > --->Freescale IMX31 specific patchs (Available for Linux-2.6.24 kernel)
> > (Download Site--->http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX31...)
>
> > --->linux-2.6.25.tar.gz Clean kernel Source Code
> > (Download Site--->http://www.kernel.org/pub/linux/kernel/v2.6/)
>
> > I am starting with the 2.6.25 kernel Source code. I am in the process of trying to make a 2.6.25 Android kernel for the I.MX31 board.
>
> > Current approach is this:
>
> > (1) Download All the above kernel source code and patches from above mention sites.
>
> > (2) Apply Freescale imx31 specific Patch into Linux-2.6.25 kernel source code (some thing applied by the automated mechanism and other are left for manual patching)
>
> > (3) Apply my board specific change into (linux-2.6.25 + freescale patch) kernel source code
>
> > (4) Get the proper tested imx31 kernel (linux-2.6.25 + freescale Patchs + my board patch)
>
> > (5) Use the tool diff to create a patch from a clean linux-2.6.25 kernel source and the android specific linux-2.6.25-android-1.0_r1 kernel source.
> > diff -Naur linux-2.6.25/ linux-2.6.25-android-0.9_r1/ --> android.patch
>
> > (6) Remove all stuff from the android.patch file that will not need (goldfish related things, yaffs2 things because freescale kernel provides already yaffs2)
>
> > (7) Apply android.patch into (linux-2.6.25 + freescale Patchs + my board patch) kernel Source Code (some thing applied by the automated mechanism and other are left for manual patching)
>
> > Please feel free to discuss anything.
>
> > Best Regards,
>
> > *Deepak Singal*
>
> > *
> > *
>
> > On Sun, Jan 11, 2009 at 10:18 PM, Rajesh N <rajesh.andr...@gmail.com>wrote:
>
> >> Hi s.avtar,
>
> >>  Thanks for kind reply,
>
> >>   I am bit confused with u r statements, I went through the linux
> >> resources given by freescale for IMX31 board, the CD contained Linux kernel
> >> with some toolchains.
>
> >>  As u said, in u r last statement as I need to DIFF  IMX BSP with vanilla
> >> kernel ! , I have learnt from the forum that I need to make
> >>  a DIFF my IMX31 BSP with Android kernel to take a patch which I should
> >> apply to IMX31 BSP where by I can add all these nessesary Android
> >> functionality to my IMX31 BSP (Removing unwanted goldfish and relatated
> >> stuffs before I port to real hardware).
>
> >>  I would like to know u r veiw on my statements, correct me if I am wrong
> >> anyway!
>
> >>  Best Regards,
> >>  Rajesh N
>
> >> On Sun, Jan 11, 2009 at 6:37 PM, <s.av...@gmail.com> wrote:
>
> >>> > if Android kernel which is downloaded from source.android.com comes
> >>> > with Freescale IMX31 BSP
> >>> The kernel is Vanilla plus Android related patches. So, IMX31 support
> >>> in the kernel would be as much as what is available in the Vanilla
> >>> version. Note that you will first need to setup/compile the kernel for
> >>> MX31 configuration.
>
> >>> > we have to merge source code given Freescale and android
> >>> > using "DIFF" and adding android patch as stated in android fourms,
> >>> > which I am not very clear till now!.
> >>> If you already have a BSP, you might want to "diff" that against Vanilla
> >>> first.
>
> >>> Avtar
>

Rajesh N

unread,
Jan 12, 2009, 3:11:23 AM1/12/09
to android...@googlegroups.com
 Deepak,

 Thanks for spending u r time on my query, I will go through all the steps which u have mentioned here n I hope I will be successful in porting Android on freescale IMX31 PDK board.

 If I have any question , I would requrie u r help. I hope I m not troubling u.

 Best Regards,
 Rajesh N

Rajesh N

unread,
Jan 12, 2009, 3:14:19 AM1/12/09
to android...@googlegroups.com
Hi,

 Thanks for all u r kind suggestion, I will go through u r procedure along with deepak's suggestion.
  I will come back to u with queries if at all,  I appreciate u r kind help

Best Regards,
 Rajesh N

deepak singal

unread,
Jan 12, 2009, 3:46:07 AM1/12/09
to android...@googlegroups.com

Rajesh N

unread,
Jan 16, 2009, 12:24:22 AM1/16/09
to android...@googlegroups.com

HI Deepak,


 "Use the tool diff to create a patch from a clean linux-2.6.25
 kernel source and the android specific linux-2.6.25-android-1.0_r1
 kernel source.
 diff -Naur linux-2.6.25/ linux-2.6.25-android-0.9_r1/ --> android.patch  "



 Deepak , I have done the above step what u mentioned in u r mail, the patch is very big, u said to remove goldfish and yaffs related things, I have few queries to u.


1 . Removing goldfish and yaffs means , to change patch file with the "=y" to "is not set" ? or u mean completely removing the section which starts from "++diff" line?

2. some Kconfig and Makefiles in patch contains goldfish and yaffs comments in which also includes some extra linux based configration, should I remove only goldfish related line in patch file or entire makefile diff statements?

Can u send me u r android patch file which u have created against vanilla kernel  version 2.6.25 against android linux-2.6.25-android-1.0_r1, where u have removed all goldfish and yaffs sections in patch file? I hope this patch file is working for u.

Kindly send me u r patch file, I appreciate u r help.

Best Regards,
Rajesh N

Gary

unread,
Jan 19, 2009, 5:05:26 PM1/19/09
to android-porting
Hi, Deepak,
I am porting Android1.0 on i.MX31 ADS r14 and follow the porting step
as you suggested (diff Android 1.0 kernel with Linux 2.6.25, and patch
the diff on r14, with rootfs from Android 1.0).
And I have the same problem with you that it will enter power suspend
after run init.
Have you fixed this problem? Could you share your experience to me?

android_power_suspend: 96021763662
android sleep state 0->2 at 96021763662
active wake lock PowerManagerService
android_power_suspend: enter suspend
Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.67 seconds) done.
Suspending console(s)

Thanks a lot!
Best Regards,
Gary

deepak singal

unread,
Jan 19, 2009, 11:17:01 PM1/19/09
to android...@googlegroups.com
Hi,

Disable ------->  Android power driver lock stats option

I hope this change is working for u.
 

Best Regards,

Deepak Singal

daniel.h...@googlemail.com

unread,
Feb 17, 2009, 10:41:30 AM2/17/09
to android-porting
Have you already found a solution for the x-panning issue? We are
currently faced with the same problem.

mvniekerk

unread,
Feb 17, 2009, 11:05:05 AM2/17/09
to android-porting
Seems as though there has been work done on it for kernel 2.6.29 by
Freescale. I'll have a look into it some time.

On Feb 17, 5:41 pm, "daniel.himmel...@googlemail.com"

daniel.h...@googlemail.com

unread,
Feb 18, 2009, 4:37:56 AM2/18/09
to android-porting
Hi,
I found a solution to the x-panning issue. Simply replace
FBIOPUT_VSCREENINFO with FBIOPAN_DISPLAY for i.MX31 boards.
See also http://groups.google.com/group/android-porting/browse_thread/thread/e939f7e86a555892

mvniekerk

unread,
Feb 18, 2009, 8:07:25 AM2/18/09
to android-porting
Tested it, man it works like a charm!
For those who don't know (or too lazy to read the threads :-) ),
change all FBIOPUT_VSCREENINFO to FBIOPAN_DISPLAY in frameworks/base/
libs/ui/EGLDisplaySurface.cpp


On Feb 18, 11:37 am, "daniel.himmel...@googlemail.com"
<daniel.himmel...@googlemail.com> wrote:
> Hi,
> I found a solution to the x-panning issue. Simply replace
> FBIOPUT_VSCREENINFO with FBIOPAN_DISPLAY for i.MX31 boards.
> See alsohttp://groups.google.com/group/android-porting/browse_thread/thread/e...

Justin

unread,
Mar 2, 2009, 6:13:57 AM3/2/09
to android-porting
I'm trying to port Android to IMX31_3stack board. Since I'm new to
Linux enviroment it bring me quite a bit of confussion.
About the final version of android kernel, where should I place it to
or should I configure "Choose your Kernel" to kernel directory?
Entering "./ltib -c" is there any packages I should select?
Thanks.
Reply all
Reply to author
Forward
0 new messages