Building i.MX6 Android L5.1.1_2.1.0 on Ubuntu 16.04

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

Building i.MX6 Android L5.1.1_2.1.0 on Ubuntu 16.04

Building i.MX6 Android L5.1.1_2.1.0 on Ubuntu 16.04

Few issues encountered trying to build L5.1.1_2.1.0 Android for i.MX6:

(some of them can apply to Android M6 build also)

Issue-1: OpenJDK-7 required to build L5.1.1_2.1.0 but not able to download/install in Ubuntu 16.04:

solution: Ubuntu 16.04 and openjdk 7 - Ask Ubuntu

===============================

sudo add-apt-repository ppa:openjdk-r/ppa

sudo apt-get update

sudo apt-get install openjdk-7-jdk

===============================

Issue-2: without any modification, got error message like: "You have tried to change the API from what has been previously approved." during compilation.

solution: follow the suggestion in the error message, do "make update-api"

Issue-3: error messages like

=========================================

external/libcxx/include/thread:149: error: unsupported reloc 43

clang: error: linker command failed with exit code 1 (use -v to see invocation)

build/core/host_shared_library_internal.mk:44: recipe for target 'out/host/linux-x86/obj32/lib/libc++.so' failed

make: *** [out/host/linux-x86/obj32/lib/libc++.so] Error 1

=========================================

related post on Internet:

http://stackoverflow.com/questions/36048358/building-android-from-sources-unsupported-reloc-43

https://bbs.archlinux.org/viewtopic.php?id=209698

solution:(as mentioned in the link above)

replaced "prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.6/x86_64-linux/bin/ld" with the symlink to "/usr/bin/ld.gold"

so this should look like:

=========================================

~/myandroid/prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin$ ls -l ld*

lrwxrwxrwx 1 jimlin jimlin      16     May  6 14:48 ld -> /usr/bin/ld.gold

-rwxrwxr-x 1 jimlin jimlin 1645584 May  6 11:24 ld.bfd

-rwxrwxr-x 1 jimlin jimlin 3497448 May  6 11:24 ld.gold

-rwxrwxr-x 1 jimlin jimlin 3497448 May  6 11:24 ld.org

=========================================

to this point I can build L5.1.1_2.1.0 successfully.(on 2016, May, 12.)

Issue-4: can't run the SD tool "fsl-sdcard-partition.sh" used to partition/format SD card in "~/myandroid/device/fsl/common/tools"

root-cause: in Ubuntu 16.04, "sfdisk" tool doesn't support "-u" parameter:

==================================

sfdisk from util-linux 2.27.1

-u, --unit S              deprecated, only sector unit is supported

==================================

error message encountered when running the script:

==================================

~/myandroid/device/fsl/common/tools$ sudo ./fsl-sdcard-partition.sh /dev/sdc

sfdisk: unsupported unit 'M'

sfdisk: unsupported unit 'M'

==================================

I've modified the script a bit to adapt the changes, as attached.

Labels (3)
Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1104221%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EBuilding%20i.MX6%20Android%20L5.1.1_2.1.0%20on%20Ubuntu%2016.04%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1104221%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EFew%20issues%20encountered%20trying%20to%20build%20L5.1.1_2.1.0%20Android%20for%20i.MX6%3A%3C%2FP%3E%3CP%3E(some%20of%20them%20can%20apply%20to%20Android%20M6%20build%20also)%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIssue-1%3C%2FSTRONG%3E%3A%20OpenJDK-7%20required%20to%20build%20L5.1.1_2.1.0%20but%20not%20able%20to%20download%2Finstall%20in%20Ubuntu%2016.04%3A%3C%2FP%3E%3CP%3Esolution%3A%20%3CA%20href%3D%22http%3A%2F%2Faskubuntu.com%2Fquestions%2F761127%2Fubuntu-16-04-and-openjdk-7%22%20title%3D%22http%3A%2F%2Faskubuntu.com%2Fquestions%2F761127%2Fubuntu-16-04-and-openjdk-7%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3EUbuntu%2016.04%20and%20openjdk%207%20-%20Ask%20Ubuntu%3C%2FA%3E%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3Esudo%20add-apt-repository%20ppa%3Aopenjdk-r%2Fppa%3C%2FP%3E%3CP%3Esudo%20apt-get%20update%3C%2FP%3E%3CP%3Esudo%20apt-get%20install%20openjdk-7-jdk%20%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIssue-2%3C%2FSTRONG%3E%3A%20without%20any%20modification%2C%20got%20error%20message%20like%3A%20%22You%20have%20tried%20to%20change%20the%20API%20from%20what%20has%20been%20previously%20approved.%22%20during%20compilation.%3C%2FP%3E%3CP%3Esolution%3A%20follow%20the%20suggestion%20in%20the%20error%20message%2C%20do%20%22make%20update-api%22%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIssue-3%3A%3C%2FSTRONG%3E%20error%20messages%20like%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3Eexternal%2Flibcxx%2Finclude%2Fthread%3A149%3A%20error%3A%20unsupported%20reloc%2043%3C%2FP%3E%3CP%3Eclang%3A%20error%3A%20linker%20command%20failed%20with%20exit%20code%201%20(use%20-v%20to%20see%20invocation)%3C%2FP%3E%3CP%3Ebuild%2Fcore%2Fhost_shared_library_internal.mk%3A44%3A%20recipe%20for%20target%20'out%2Fhost%2Flinux-x86%2Fobj32%2Flib%2Flibc%2B%2B.so'%20failed%3C%2FP%3E%3CP%3Emake%3A%20***%20%5Bout%2Fhost%2Flinux-x86%2Fobj32%2Flib%2Flibc%2B%2B.so%5D%20Error%201%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Erelated%20post%20on%20Internet%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fstackoverflow.com%2Fquestions%2F36048358%2Fbuilding-android-from-sources-unsupported-reloc-43%22%20title%3D%22http%3A%2F%2Fstackoverflow.com%2Fquestions%2F36048358%2Fbuilding-android-from-sources-unsupported-reloc-43%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttp%3A%2F%2Fstackoverflow.com%2Fquestions%2F36048358%2Fbuilding-android-from-sources-unsupported-reloc-43%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fbbs.archlinux.org%2Fviewtopic.php%3Fid%3D209698%22%20title%3D%22https%3A%2F%2Fbbs.archlinux.org%2Fviewtopic.php%3Fid%3D209698%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fbbs.archlinux.org%2Fviewtopic.php%3Fid%3D209698%3C%2FA%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Esolution%3A(as%20mentioned%20in%20the%20link%20above)%3C%2FP%3E%3CP%3Ereplaced%20%22prebuilts%2Fgcc%2Flinux-x86%2Fhost%2Fx86_64-linux-glibc2.15-4.6%2Fx86_64-linux%2Fbin%2Fld%22%20with%20the%20symlink%20to%20%22%2Fusr%2Fbin%2Fld.gold%22%3C%2FP%3E%3CP%3Eso%20this%20should%20look%20like%3A%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22color%3A%20%23eb7a3d%3B%22%3E~%2Fmyandroid%2Fprebuilts%2Fgcc%2Flinux-x86%2Fhost%2Fx86_64-linux-glibc2.11-4.6%2Fx86_64-linux%2Fbin%3C%2FSPAN%3E%24%20ls%20-l%20ld*%3C%2FP%3E%3CP%3Elrwxrwxrwx%201%20jimlin%20jimlin%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2016%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20May%26nbsp%3B%206%2014%3A48%20%3CSPAN%20style%3D%22color%3A%20%23eb7a3d%3B%22%3E%3CSTRONG%3Eld%20-%26gt%3B%20%2Fusr%2Fbin%2Fld.gold%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E-rwxrwxr-x%201%20jimlin%20jimlin%201645584%20May%26nbsp%3B%206%2011%3A24%20ld.bfd%3C%2FP%3E%3CP%3E-rwxrwxr-x%201%20jimlin%20jimlin%203497448%20May%26nbsp%3B%206%2011%3A24%20ld.gold%3C%2FP%3E%3CP%3E-rwxrwxr-x%201%20jimlin%20jimlin%203497448%20May%26nbsp%3B%206%2011%3A24%20ld.org%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Eto%20this%20point%20I%20can%20build%20L5.1.1_2.1.0%20successfully.(on%202016%2C%20May%2C%2012.)%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EIssue-4%3C%2FSTRONG%3E%3A%20can't%20run%20the%20SD%20tool%20%22fsl-sdcard-partition.sh%22%20used%20to%20partition%2Fformat%20SD%20card%20in%20%22~%2Fmyandroid%2Fdevice%2Ffsl%2Fcommon%2Ftools%22%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Eroot-cause%3A%20in%20Ubuntu%2016.04%2C%20%22sfdisk%22%20tool%20doesn't%20support%20%22-u%22%20parameter%3A%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3Esfdisk%20from%20util-linux%202.27.1%3C%2FP%3E%3CP%3E-u%2C%20--unit%20S%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20deprecated%2C%20only%20sector%20unit%20is%20supported%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3Eerror%20message%20encountered%20when%20running%20the%20script%3A%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3E~%2Fmyandroid%2Fdevice%2Ffsl%2Fcommon%2Ftools%24%20sudo%20.%2Ffsl-sdcard-partition.sh%20%2Fdev%2Fsdc%3C%2FP%3E%3CP%3Esfdisk%3A%20unsupported%20unit%20'M'%3C%2FP%3E%3CP%3Esfdisk%3A%20unsupported%20unit%20'M'%3C%2FP%3E%3CP%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI've%20modified%20the%20script%20a%20bit%20to%20adapt%20the%20changes%2C%20as%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1104221%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAndroid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX6_All%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX7Dual%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎05-16-2016 09:08 PM
Updated by: