Maguro / Galaxy Nexus CM 12.1 build - General Questions and Answers

Hi,
I've been playing a bit with CM's build as I expect to retire my Galaxy Nexus from its duty soon. The build went fine if not for the following build error:
Code:
target Executable: pvrsrvinit (/home/user/Development/Cyanogenmod/android/system/out/target/product/p5100/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit)
/home/user/Development/Cyanogenmod/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_init_SGX540_120
/home/user/Development/Cyanogenmod/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_um_SGX540_120
hardware/ti/omap4/pvrsrvinit/pvrsrvinit.c:8: error: undefined reference to 'SrvInit'
collect2: error: ld returned 1 exit status
make: *** [/home/user/Development/Cyanogenmod/android/system/out/target/product/p5100/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/user/Development/Cyanogenmod/android/system'
Other threads[0] reference the following fix, namely adding
Code:
<project name="DonkeyCoyote/proprietary_vendor_samsung" path="vendor/samsung" remote="github" revision="android-5.0" />
in
Code:
.repo/local_manifests/roomservice.xml
Unfortunately this trick didn't work. Upon closer inspection, the required libraries are part of the `omap4-common` subdirectory which is *not* sourced during the build[1]. I was nevertheless able to fix the build with the following change
Code:
% repo diff hardware/ti/omap4/
project hardware/ti/omap4/
diff --git a/pvrsrvinit/Android.mk b/pvrsrvinit/Android.mk
index 97d27c4..cdc6441 100644
--- a/pvrsrvinit/Android.mk
+++ b/pvrsrvinit/Android.mk
@@ -9,9 +9,9 @@ LOCAL_LDLIBS := -lsrv_init_SGX544_112 -lsrv_um_SGX544_112
pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_init_SGX544_112.so
pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_um_SGX544_112.so
else
-LOCAL_LDLIBS := -lsrv_init_SGX540_120 -lsrv_um_SGX540_120
-pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_init_SGX540_120.so
-pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_um_SGX540_120.so
+LOCAL_LDLIBS := -lsrv_init -lsrv_um
+pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_init.so
+pvrsrvinit: $(TARGET_OUT_VENDOR)/lib/libsrv_um.so
endif
LOCAL_MODULE_PATH := $(TARGET_OUT_EXECUTABLES)
LOCAL_MODULE := pvrsrvinit
Which means that the libraries are definitively extracted by `cd device/samsung/maguro/ && ./extract-files.sh` however, the libraries are merely named differently.
Has anybody encountered such a failure ?
ps: on another side note. how are you suppose to extract all the files from the stock 4.2.1 upstream build ? `system/bin/fRom`, `system/vendor/lib/mediadrm/libwvdrmengine.so` and `system/vendor/lib/libfrsdk.so` are missing from the image...
[0]: http://forum.xda-developers.com/showpost.php?p=59115913&postcount=1372
[1]: confirmed by `inotifywait -m vendor/samsung/omap4-common/*mk`

Btw, I looked at the content of a CM11 nightly[0], there is no trace of `libsrv_init_SGX540_120.so` or `libsrv_um_SGX540_120.so` either...
[0]: cm-11-20151213-NIGHTLY-maguro.zip

Related

[BUILD] Use Raspberry Pi to build Android Project (AOSP)

Hi all !
My current project is to use my Raspberry Pi as a Build Machine to build all Android sources (AOSP). In fact, I'll not build AOSP but the CyanogenMod (wich is mainly a fork from AOSP).
I know this may sound crazy, dumb or useless (according to Google, a 64-bit environment is required, and a lot (>> 4GB) of RAM if you're in a hurry), especially to use an ARM processor to build while all the Makefiles has been written to be used on x86...
But what I'm thinking about is a really cheap, silent, but working build machine, to sync the repo and build nightlies everyday. The first build will take some days but then, only the changes will be build so I think that only some hours per day will be required.
If I success, I'll create a big tutorial to explain what changes was required.
First of all, I had to add the Linux-armv61 arch as Host OS/ARCH :
Code:
[email protected] ~/buildspace/android/system/build $ git diff
diff --git a/core/envsetup.mk b/core/envsetup.mk
index 862b7f0..34eb31a 100644
--- a/core/envsetup.mk
+++ b/core/envsetup.mk
@@ -77,6 +77,10 @@ ifneq (,$(findstring Power,$(UNAME)))
HOST_ARCH := ppc
endif
[COLOR="SeaGreen"]+ifneq (,$(findstring arm,$(UNAME)))
+ HOST_ARCH := armv61
+endif
+[/COLOR]
BUILD_ARCH := $(HOST_ARCH)
ifeq ($(HOST_ARCH),)
then, I did this (because the raspbian ld doesn't support --icf) :
AdamOutler said:
so I did a
Code:
[email protected] ~/adb $ grep -r 'icf=safe' ./*
./build/core/combo/TARGET_linux-arm.mk: -Wl,--icf=safe \
and I removed that icf parameter.
Click to expand...
Click to collapse
-->
Code:
[email protected] ~/buildspace/android/system/build $ git diff
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk
index b36111f..24e0d99 100644
--- a/core/combo/TARGET_linux-arm.mk
+++ b/core/combo/TARGET_linux-arm.mk
@@ -146,7 +146,6 @@ TARGET_GLOBAL_LDFLAGS += \
-Wl,-z,relro \
-Wl,-z,now \
-Wl,--warn-shared-textrel \
[COLOR="Red"]- -Wl,--icf=safe \[/COLOR]
$(arch_variant_ldflags)
# We only need thumb interworking in cases where thumb support
but now I am stuck with this error :
Code:
make -C kernel/samsung/smdk4210 O=/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /media/totoext4part/cyanogenmod/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-" headers_install
make[1]: Entering directory `/media/totoext4part/cyanogenmod/system/kernel/samsung/smdk4210'
/media/totoext4part/cyanogenmod/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: 1: /media/totoext4part/cyanogenmod/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-gcc: Syntax error: "(" unexpected
CHK include/linux/version.h
make[1]: Leaving directory `/media/totoext4part/cyanogenmod/system/kernel/samsung/smdk4210'
/bin/bash: r: command not found
make: [/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/lib/crtbegin_static.o] Error 127 (ignored)
[COLOR="SeaGreen"]target SharedLib[/COLOR]: libdl (/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so)
/usr/bin/ld: error: /media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so uses VFP register arguments, /media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o does not
/usr/bin/ld: failed to merge target specific data of file /media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o
/usr/bin/ld: warning: creating a DT_TEXTREL in a shared object.
collect2: ld returned 1 exit status
make: *** [/media/totoext4part/cyanogenmod/system/out/target/product/n7000/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so] Error 1
I don't really know what I have to do and if it is because the HOST is an arm arch...
It have been a long time since I didn't put my hands in this kind of things and I need help to solve this problems... Thanks in advance !

[Q] Build a native c helloworld with DynamicLinkLibrary?

Hi everyone, I want to make a native c program with a dynamic link library, so I put these files in Android/development/hello/: hello.c, myprint.h,myprint.c, the main() is in hello.c and include myprint.h, and the Android.mk is:
---------------------------------------------------------------------
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := myprint
LOCAL_SRC_FILES := myprint.c
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := helloworld
LOCAL_SRC_FILES := hello.c
LOCAL_SHARED_LIBRARIES := myprint
include $(BUILD_EXECUTABLE)
---------------------------------------------------------------------
Then I make helloworld, and the output info is that:
---------------------------------------------------------------------
target thumb C: helloworld <= development/hello/hello.c
target thumb C: myprint <= development/hello/myprint.c
target SharedLib: myprint (out/target/product/generic/obj/SHARED_LIBRARIES/myprint_intermediates/LINKED/myprint.so)
target Symbolic: myprint (out/target/product/generic/symbols/system/lib/myprint.so)
target Strip: myprint (out/target/product/generic/obj/lib/myprint.so)
target Executable: helloworld (out/target/product/generic/obj/EXECUTABLES/helloworld_intermediates/LINKED/helloworld)
/home/neil/dev/google_422/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin/../lib/gcc/arm-linux-androideabi/4.7/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lmyprint.so
development/hello/hello.c:5: error: undefined reference to 'myprint'
collect2: error: ld returned 1 exit status
---------------------------------------------------------------------
Please help me...

[Q] Htc evo 4g build error ( boot.img too large)!!

I want to compile the kernel from source for the HTC evo 4g (model: supersonic). I downloaded the kernel source from https://github.com/CyanogenMod/htc-kernel-supersonic .
I compiled it successfully getting the zImage.
However, when i try to build the whole tree ,using the previous zImage instead of the prebuilt kernel, i get an error:
out/target/product/supersonic/boot.img total size is 2457600
error: out/target/product/supersonic/boot.img too large (2457600 > [2703360 - 270336])
make: *** [out/target/product/supersonic/boot.img] Error 1
make: *** Deleting file `out/target/product/supersonic/boot.img'
I found that the size of partitions are defined in the file device/htc/supersonic/BoardConfig.mk.
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00280000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00500000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x15e00000 # limited so we enforce room to grow
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x1aba0000
BOARD_FLASH_BLOCK_SIZE := 131072
I dont know how to solve this issue. Please help! :crying:

Samsung Galaxy Tab 2 - p5100 Cyanogenmod

Hello!
I am quite new to this comunity. I am trying to build my own Cyanogenmod 12.1 for the Samsung p5100.
I always get stuck with the following error:
Code:
target Executable: pvrsrvinit (/home/user/Development/Cyanogenmod/android/system/out/target/product/p5100/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit)
/home/user/Development/Cyanogenmod/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_init_SGX540_120
/home/user/Development/Cyanogenmod/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_um_SGX540_120
hardware/ti/omap4/pvrsrvinit/pvrsrvinit.c:8: error: undefined reference to 'SrvInit'
collect2: error: ld returned 1 exit status
make: *** [/home/user/Development/Cyanogenmod/android/system/out/target/product/p5100/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/user/Development/Cyanogenmod/android/system'
I would have liked to post this Question in the right forum but i am not allowed to unless i have 10 posts. So i am doing it here.
I have searched the forums already but i didnt find any answer that worked for me.
Any help would be greatly appreciated!
THX!
Are there any solutions?
I run into the same problem.
Code:
.../android/cm-12.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_init_SGX540_120
.../android/cm-12.1/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_um_SGX540_120
hardware/ti/omap4/pvrsrvinit/pvrsrvinit.c:8: error: undefined reference to 'SrvInit'
collect2: error: ld returned 1 exit status
make: *** [.../android/cm-12.1/out/target/product/p5100/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit] Fehler 1
jameson777 said:
Hello!
I am quite new to this comunity. I am trying to build my own Cyanogenmod 12.1 for the Samsung p5100.
I always get stuck with the following error:
Code:
target Executable: pvrsrvinit (/home/user/Development/Cyanogenmod/android/system/out/target/product/p5100/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit)
/home/user/Development/Cyanogenmod/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_init_SGX540_120
/home/user/Development/Cyanogenmod/android/system/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_um_SGX540_120
hardware/ti/omap4/pvrsrvinit/pvrsrvinit.c:8: error: undefined reference to 'SrvInit'
collect2: error: ld returned 1 exit status
make: *** [/home/user/Development/Cyanogenmod/android/system/out/target/product/p5100/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/user/Development/Cyanogenmod/android/system'
I would have liked to post this Question in the right forum but i am not allowed to unless i have 10 posts. So i am doing it here.
I have searched the forums already but i didnt find any answer that worked for me.
Any help would be greatly appreciated!
THX!
Click to expand...
Click to collapse
I found a solution.
add
Code:
<project name="CyanogenMod/android_device_samsung_omap4-common" path="device/samsung/omap4-common" remote="github" revision="refs/heads/cm-12.1" />
to
Code:
roomservice.xml
and then run
Code:
./extract-files.sh
with your device connected. The proprietary blobs will be downloaded and the error is gone.
OldSparky said:
I found a solution.
add
Code:
<project name="CyanogenMod/android_device_samsung_omap4-common" path="device/samsung/omap4-common" remote="github" revision="refs/heads/cm-12.1" />
to
Code:
roomservice.xml
and then run
Code:
./extract-files.sh
with your device connected. The proprietary blobs will be downloaded and the error is gone.
Click to expand...
Click to collapse
I'm trying to build a maguro 12.1 image and this didn't work. The build is still dying on:
Code:
target Strip: ping (/Cyanogenmod/out/target/product/maguro/obj/EXECUTABLES/ping_intermediates/ping)
target Executable: ping6 (/Cyanogenmod/out/target/product/maguro/obj/EXECUTABLES/ping6_intermediates/LINKED/ping6)
target Executable: pngtest (/Cyanogenmod/out/target/product/maguro/obj/EXECUTABLES/pngtest_intermediates/LINKED/pngtest)
target Executable: pvrsrvinit (/Cyanogenmod/out/target/product/maguro/obj/EXECUTABLES/pvrsrvinit_intermediates/LINKED/pvrsrvinit)
target Strip: librilutils (/Cyanogenmod/out/target/product/maguro/obj/lib/librilutils.so)
/Cyanogenmod/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_init_SGX540_120
/Cyanogenmod/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsrv_um_SGX540_120
hardware/ti/omap4/pvrsrvinit/pvrsrvinit.c:8: error: undefined reference to 'SrvInit'
Im pretty late but have the same issue have any of you guys x0ra , jameson777, OldSparky be able to fix it?

ninja: error: missing 'out/target/product/cancro/obj/lib/libtime_genoff.so.toc'

Hi, I am trying to build CM 14 for cancro (Mi3) on Ubuntu 16:10 but I am getting following error. Full logs are : http://pastebin.com/0k1i6N7v
Can someone please help me. Thanks in advance.
Code:
build/core/Makefile:34: warning: overriding commands for target `/home/kailash/android/system/out/target/product/cancro/system/vendor/lib/mediadrm/libdrmclearkeyplugin.so'
build/core/base_rules.mk:316: warning: ignoring old commands for target `/home/kailash/android/system/out/target/product/cancro/system/vendor/lib/mediadrm/libdrmclearkeyplugin.so'
Starting build with ninja
ninja: Entering directory `.'
ninja: error: '/home/kailash/android/system/out/target/product/cancro/obj/lib/libtime_genoff.so.toc', needed by '/home/kailash/android/system/out/target/product/cancro/obj/SHARED_LIBRARIES/libandroid_servers_intermediates/LINKED/libandroid_servers.so', missing and no known rule to make it
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed
make: *** [ninja_wrapper] Error 1
make: Leaving directory '/home/kailash/android/system'
#### make failed to build some targets (37 seconds) ####
[email protected]:~/android/system$
same here
Did anyone find a solution to this?
Anyone have a solution for this?
frustrated, I have the same problem.
nousername12 said:
frustrated, I have the same problem.
Click to expand...
Click to collapse
Code:
include $(CLEAR_VARS)
LOCAL_MODULE := libtime_genoff
LOCAL_MODULE_OWNER := xiaomi
LOCAL_SRC_FILES := proprietary/vendor/lib/libtime_genoff.so
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_SUFFIX := .so
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
include $(BUILD_PREBUILT)
put this in vendor/xiaomi/cancro/Android.mk can solve the problem.
from https://forum.xda-developers.com/general/xda-assist/ninjawrapper-error-t3540887

Categories

Resources