Can't get Android KK4.4.3_2 to build for IMX6 on Ubuntu 14.04 LTS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't get Android KK4.4.3_2 to build for IMX6 on Ubuntu 14.04 LTS

3,208 Views
bill123
Contributor III

Trying to Build Android KK 4.4.3_2 for iMX6 SabreSD board.

Using Ubuntu 14.04 LTS as host environment.

I have been able to successfully build and run Android KK for Sabre lite board using instructions from http://boundarydevices.com/android-kitkat-second-release-mx6-boards/.  This would seems to say that my host machine is setup correctly for building Android.

I want build a Android install for the IMX6 using FreeScales build instructions.  I am following the Freescale Android User's Guide (Rev KK4.4.3_2.0.0-ga, 2/2015 found here

i.MX 6 Series Software and Development Tool R|Freescale  and 

IMX6_KK443_200_ANDROID_SOURCE_BSP

Steps I completed  from Section 3)

$ cd ~

$ mkdir myandroid

$ mkdir bin

$ cd myandroid

$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

$ chmod a+x ~/bin/repo

$ ~/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-4.4.3_r1

$ ~/bin/repo sync # this command loads most needed repos. Therefore, it can take several

hours to load.

Get KK4.4.3_2.0.0-ga kernel source code from Freescale open source git:

$ cd myandroid

$ git clone git://git.freescale.com/imx/linux-2.6-imx.git kernel_imx # the kernel repo is

heavy. Therefore, this process can take a while.

$ cd kernel_imx

$ git checkout kk4.4.3_2.0.0-ga

$ cd myandroid/bootable

$ cd bootloader

$ git clone git://git.freescale.com/imx/uboot-imx.git uboot-imx

$ cd uboot-imx

$ git checkout kk4.4.3_2.0.0-ga

$ cd ~/myandroid

$ source /opt/android_KK4.4.3_2.0.0-ga_core_source/code/KK4.4.3_2.0.0-ga/and_patch.sh

$ c_patch /opt/android_KK4.4.3_2.0.0-ga_core_source/code/KK4.4.3_2.0.0-ga

imx_KK4.4.3_2.0.0-ga


3. If everything is OK, "c_patch" will generate the following output to indicate the successful patch:

**************************************************************

Success: Now you can build the Android code for FSL i.MX platform

**************************************************************



I get the correct output.. All looks Good...

$ cd ~/myandroid

$ source build/envsetup.sh

$ lunch sabresd_6dq-user

The Last Command FAILS!..

After investigation it does NOT look like the PATCH completed..


For example

   myandriod/devices/fsl is not populated

user@ubuntu:/opt/Android/myandroid/device/fsl$ ls -la

total 12

drwxrwxr-x  3 user user 4096 Mar 25 15:02 .

drwxrwxr-x 11 user user 4096 Mar 25 15:02 ..

-rw-rw-r--  1 user user    0 Mar 25 15:02 .dummy

drwxrwxr-x  8 user user 4096 Mar 25 15:02 .git

In myandroid/kernel_imx/arch/arm/

I would expect a mx6 subdirectory.. This is missing.

I have done the complete process 2 times..

What Am I missing?

Thanks

0 Kudos
8 Replies

1,207 Views
JayTu
NXP Employee
NXP Employee

c_patch is a shell script, you can patch yourself (by git am xxx.patch). We don't hear the issue before and I can't reproduce it on Ubuntu 14.04 as you mentioned.

0 Kudos

1,207 Views
madhuwesly
Contributor I

I have downloaded android_jb4.3_1.1.0-ga_source and unzipped into /opt folder. But I am getting Base commit version errors. Could you suggest me the correct imx patch for Android 4.3_r2.1 version.

0 Kudos

1,207 Views
JayTu
NXP Employee
NXP Employee

Please make sure you get the correct patch and you've checked out android-4.3_r2.1 correctly. Attach the jb4.3_1.1.0 Android user guide here for your reference.

0 Kudos

1,207 Views
madhuwesly
Contributor I

Hi Bill, 

I have followed the same process as you mentioned in the same post. After I downloaded the android source code repo from the below mentioned website: http://commondatastorage.googleapis.com/git-repo-downloads/repo

I don't have opt folder in myandroid folder. Could you help me with this ?  

0 Kudos

1,207 Views
JayTu
NXP Employee
NXP Employee

You will need unzip our android patches to /opt. Please check NXP android release user guide.

0 Kudos

1,207 Views
bill123
Contributor III

Sergio:

Thanks for the answer.. I believe I tried that.

To answer my own thread.. I got it to work by going back 12.04 LTS.. (and a lot of setup and apt-get).. As many many others threads have talked about it ussually relates to Java version.

I got Linux Android to work and run on Sabre SD.

0 Kudos

1,207 Views
bill123
Contributor III

After a week, Still no assistance from Freescale.. :smileyconfused:

However, I have an update.

I built a new Unbuntu VM machine based on 12.04 LTS 64bit.. Running the c_patch command seems to have worked. It appears that the SED/AWK commands in the scripts fail in 14.04 LTS . In 12.04 LTS version c_patch displays line after line of comments about "Newline" terminations..

New VM machine (12.04) didnt have java JDK working correctly, even though I followed the prereq as described in the FreeScale Android Guide & https://community.freescale.com/docs/DOC-98441

This is what worked for me (found in comments)

The "deb http://archive.canonical.com/ lucid partner" source doesn't work. Try:

$ sudo add-apt-repository "deb http://ppa.launchpad.net/ferramroberto/java/ubuntu natty main"

$ sudo apt-get update

$ sudo apt-get install sun-java6-jdk

Would be nice to understand:

- Why C_PATCH works for 12.04 but not 14.04

- Fix the Final banner that says it completed correctly when it clearly didn't


$"make" is currently blowing up pretty quick along the way but I believe that is because I don't have all the needed tools installed yet.. wish me luck



0 Kudos

1,207 Views
SergioSolis
NXP Employee
NXP Employee

Hello Bill,

There is a document that explains step by step how to build android using ubuntu 14.04 as a host.

[GUIDE] Setup Android Development Environment on Ubuntu 14.04 Trusty Tahr

Please take a look at it, you can guide by it.

0 Kudos