Hi,
I have a imx6 android question.
In Android User Guide, writes:
Get R13.4-GA kernel source code from freescale's opensource git:
$ cd myandroid
$ git clone git://git.freescale.com/imx/linux-2.6-imx.git kernel_imx # the kernel repo is
heavy, so this can take a while
$ cd kernel_imx
$ git checkout imx-android-13.4.1
Does it mean that I do not need to do this in "Patch code for i.MX"
Assume you had unzipped i.MX Android release package to /opt/imx-android-13.4.1/.
$ cd ~/myandroid
$ source /opt/imx-android-13.4.1/code/13.4.1/and_patch.sh
$ help
Now you should see that the "c_patch" function is available
$ c_patch /opt/imx-android-13.4.1/code/13.4.1 imx_13.4.1
I just need to do this ?
If your software has upgraded to R13.4-GA and you would only like to apply the additional patches between R13.4-GA and
13.4.1, please use the following steps:
Take framwork/base.git as an example. Assume you had unzipped i.MX Android release package
to /opt/imx-android-13.4.1/ .
$ cd /opt/imx-android-13.4.1/code/13.4.1-delta/platform/frameworks/base.git
$ ls *.patch > series
$ cd ~/myandroid/frameworks/base
$ git quiltimport --patches /opt/imx-android-13.4.1/code/13.4.1-delta/platform/frameworks/
base.git
I just have some confuse.
Thanks!!
Solved! Go to Solution.
Dears,
I had solved this problem. It should use "imx-android-13.4.1/code/13.4.1/" instead of "imx-android-13.4.1/code/13.4.1-delta".
But I still have one question:
When I compiling the source code, there are some error messages.
ex:
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
:0:0: error: “_FORTIFY_SOURCE” redefined [-Werror]
:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
or
ERROR: frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23:
error: variable ‘ParamName’ set but not used [-Werror=unused-but-set- variable]
I had building image successfully by correcting source code. But I'm confused that these error are source code problem or compiling environment problem?
My environment is Ubuntu 12.04 64 bit.
Dears,
I had solved this problem. It should use "imx-android-13.4.1/code/13.4.1/" instead of "imx-android-13.4.1/code/13.4.1-delta".
But I still have one question:
When I compiling the source code, there are some error messages.
ex:
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
:0:0: error: “_FORTIFY_SOURCE” redefined [-Werror]
:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
or
ERROR: frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23:
error: variable ‘ParamName’ set but not used [-Werror=unused-but-set- variable]
I had building image successfully by correcting source code. But I'm confused that these error are source code problem or compiling environment problem?
My environment is Ubuntu 12.04 64 bit.
Hi Dean, it would be great if you post the patch with all the changes needed to compile android on your Ubuntu machine. About your question, I am not sure, but it may be the host system your are using to compile Android.
Hi Leonardo,
These are the error messages and solutions I found from network. There may be other solutions.
My Environment:
Ubuntu 12.04 64 bit
imx-android-13.4.1.tar.gz
Sorry for that I forget what ubuntu packages I installed before building Android.
Q1
host C++: obbtool <= frameworks/base/tools/obbtool/Main.cpp
:0:0: error: “_FORTIFY_SOURCE” redefined [-Werror]
:0:0: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
S1
To fix this, edit build/core/combo/HOST_linux-x86.mk and replace:
HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
with
HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
Q2
ERROR: frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23:
error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-
variable]
S2
android/ics/frameworks/compile/slang/Android.mk
-local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
+local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
Q3
external/mesa3d/src/glsl/linker.cpp: In function ‘void link_shaders(const gl_context*, gl_shader_program*)’:
external/mesa3d/src/glsl/linker.cpp:1734:49: error: expected primary-expression before ‘,’ token
external/mesa3d/src/glsl/linker.cpp:1734:50: error: ‘fragColor’ was not declared in this scope
external/mesa3d/src/glsl/linker.cpp:1734:59: error: ‘offsetof’ was not declared in this scope
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1
S3
Adding a "#include <stddef.h>" to linker.cpp
Q4
ERROR: external/oprofile/libpp/format_output.h:94:22: error:
reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]
S4
external/oprofile/libpp/format_output.h
- mutable counts_t & counts;
+ counts_t & counts;
Q5
android_repo/external/llvm/lib/Support/Mutex.cpp:69: undefined reference to `pthread_mutexattr_init'
android_repo/external/llvm/lib/Support/Mutex.cpp:75: undefined reference to `pthread_mutexattr_settype'
android_repo/external/llvm/lib/Support/Mutex.cpp:80: undefined reference to `pthread_mutexattr_setpshared'
android_repo/external/llvm/lib/Support/Mutex.cpp:89: undefined reference to `pthread_mutexattr_destroy'
out/host/linux-x86/obj/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a(Mutex.o): In function `llvm::sys::MutexImpl::tryacquire()':
android_repo/external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock'
collect2: ld returned 1 exit status
S5
Way1:
system/extras/tests/bionic/libc/Android.mk
LOCAL_MODULE_TAGS := tests
-LOCAL_LDFLAGS := \
+LOCAL_LDLIBS := \
-lpthread \
-ldl
Way2:
external/llvm/llvm-host-build.mk
LOCAL_LDLIBS := -lpthread -ldl
Q6
external/gtest/src/../src/gtest-filepath.cc:180:28: warning: missing initializer for member ‘stat::st_dev’ [-Wmissing-field-initializers]
external/gtest/src/../src/gtest-filepath.cc:180:28: warning: missing initializer for member ‘stat::__pad1’ [-Wmissing-field-initializers]
...
...
...
external/gtest/src/../src/gtest-filepath.cc:208:28: warning: missing initializer for member ‘stat::st_ino’ [-Wmissing-field-initializers]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libgtest_host_intermediates/gtest-all.o] Error 1
S6
external/gtest/include/gtest/internal/gtest-param-util.h
add
#include <cstddef>