[CM12.1] Build CyanogenMod 12.1 with device tree

s2k7

Senior Member
Nov 5, 2006
182
45
48
Tokyo
Not boot

:crying:

Thanks for your great effort.
Following your device tree, I built a rom myself, but it DID not boot.
After comparing your flashable ROM and my rom, I found there were some files missing.
Please confirm the attached pictures.

May I ask you to modify your device tree ?
Here is the list.
alterbang.system.new_\app\WhisperPush\arm64\WhisperPush.odex.gz
alterbang.system.new_\app\WhisperPush\WhisperPush.apk
alterbang.system.new_\framework\cneapiclient.jar
alterbang.system.new_\framework\com.qti.dpmframework.jar
alterbang.system.new_\framework\com.qti.snapdragon.sdk.display.jar
alterbang.system.new_\framework\com.qualcomm.location.vzw_library.jar
alterbang.system.new_\framework\com.quicinc.cne.jar
alterbang.system.new_\framework\org.codeaurora.Performance.jar
alterbang.system.new_\framework\qcom.fmradio.jar
alterbang.system.new_\lib\hw\activity_recognition.msm8994.so
alterbang.system.new_\lib\hw\consumerir.msm8992.so
alterbang.system.new_\lib\hw\copybit.msm8992.so
alterbang.system.new_\lib\hw\sensors.lsm6db0.so
alterbang.system.new_\lib\modules\wlan.ko
alterbang.system.new_\lib64\hw\activity_recognition.msm8994.so
alterbang.system.new_\lib64\hw\consumerir.msm8992.so
alterbang.system.new_\lib64\hw\copybit.msm8992.so
alterbang.system.new_\lib64\libcurve25519-old.so
alterbang.system.new_\priv-app\com.qualcomm.msapm\arm64\com.qualcomm.msapm.odex.gz
alterbang.system.new_\priv-app\com.qualcomm.qti.services.secureui\arm64\com.qualcomm.qti.services.secureui.odex.gz
alterbang.system.new_\priv-app\com.qualcomm.qti.services.secureui\com.qualcomm.qti.services.secureui.apk
alterbang.system.new_\priv-app\qcrilmsgtunnel\arm64\qcrilmsgtunnel.odex.gz
alterbang.system.new_\priv-app\TimeService\arm64\TimeService.odex.gz
alterbang.system.new_\priv-app\TimeService\TimeService.apk
alterbang.system.new_\vendor\lib\libactuator_bu64244gwz_s5k3m2xm.so
alterbang.system.new_\vendor\lib\libactuator_bu64244gwz_s5k3m2xm_camcorder.so
alterbang.system.new_\vendor\lib\libactuator_bu64244gwz_s5k3m2xm_camera.so
alterbang.system.new_\vendor\lib\libchromatix_imx258_snapshot_street.so
alterbang.system.new_\vendor\lib\libchromatix_imx258_sunny_snapshot_street.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_common.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_cpp_hfr_60.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_cpp_hfr_90.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_cpp_hfr_120.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_cpp_liveshot.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_cpp_preview.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_cpp_snapshot.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_cpp_video.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_default_video.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_hfr_60.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_hfr_90.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_hfr_120.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_liveshot.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_postproc.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_preview.so
alterbang.system.new_\vendor\lib\libchromatix_s5k3m2xm_ofilm_snapshot.so
alterbang.system.new_\vendor\lib\libEGL_adreno.so
alterbang.system.new_\vendor\lib\libmmcamera_s5k3m2xm_ofilm.so
alterbang.system.new_\vendor\lib\libmmcamera_s5k3m2xm_ofilm_eeprom.so
alterbang.system.new_\vendor\lib64\libEGL_adreno.so
 

Attachments

Last edited:

alterbang

Member
Apr 16, 2011
46
41
48
Milan
It's really strange, the zip i posted was build with my device tree.
I'll double check my commits to github to see if there's something missing in the device tree, or maybe in other folders.
Thank you for the feedback!
 

alterbang

Member
Apr 16, 2011
46
41
48
Milan
@s2k7
I found some differences in vendor folder, so i have uploaded my skeleton (to fill with proprietary files).
I also decided to include xiaobai's kernel folder (which doesnt'contains kernel source, but it does have includes and header files) to provide a more-than-complete build environment.

I committed changes so sync my repo, and also please add these to your build environment and let me know!
android-vendor-xiaomi-libra
android-kernel-xiaomi-libra

Good luck :)
 

s2k7

Senior Member
Nov 5, 2006
182
45
48
Tokyo
Cannot finish compiling. End with errors.:crying:
Please help.

~/Mi4C/device/xiaomi/libra$ ./extract-files-from-miui-zip.sh
~/Mi4C/vendor/xiaomi/libra$ unzip -x android-vendor-xiaomi-libra.zip TO OVERWRITE THE ABOVE FILES.
~/Mi4C/kernel/xiaomi/libra$ unzip -x android-kernel-xiaomi-libra.zip
~/Mi4C$ brunch libra
In file included from hardware/qcom/audio-caf/msm8994/hal/msm8974/platform.c:44:0:
/home/s2k7/Mi4C/out/target/product/libra/obj/KERNEL_OBJ/usr/include/sound/msmcal-hwdep.h:27:14: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
__u8 __user *buffer;
^
hardware/qcom/audio-caf/msm8994/hal/msm8974/platform.c: In function 'send_codec_cal':
hardware/qcom/audio-caf/msm8994/hal/msm8974/platform.c:961:21: error: 'struct wcdcal_ioctl_buffer' has no member named 'buffer'
codec_buffer.buffer = calib.buff;
^
hardware/qcom/audio-caf/msm8994/hal/msm8974/platform.c:963:21: error: 'struct wcdcal_ioctl_buffer' has no member named 'cal_type'
codec_buffer.cal_type = type;
^
hardware/qcom/audio-caf/msm8994/hal/msm8974/platform.c: In function 'platform_get_device_to_be_id_map':
hardware/qcom/audio-caf/msm8994/hal/msm8974/platform.c:3213:23: warning: assignment from incompatible pointer type [enabled by default]
*device_to_be_id = msm_device_to_be_id;
^
make: *** [/home/s2k7/Mi4C/out/target/product/libra/obj_arm/SHARED_LIBRARIES/audio.primary.msm8992_intermediates/msm8974/platform.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/s2k7/Mi4C'
@s2k7
I found some differences in vendor folder, so i have uploaded my skeleton (to fill with proprietary files).
I also decided to include xiaobai's kernel folder (which doesnt'contains kernel source, but it does have includes and header files) to provide a more-than-complete build environment.

I committed changes so sync my repo, and also please add these to your build environment and let me know!
android-vendor-xiaomi-libra
android-kernel-xiaomi-libra

Good luck :)
 
Last edited:
Dec 10, 2012
9
9
0
Following your device tree, I built a rom myself, but it DID not boot.
The reason why the image did not boot is that libEGL_adreno.so is placed at a wrong position. It should be /system/vendor/lib64 instead of /system/vendor/lib64/egl/.
 

s2k7

Senior Member
Nov 5, 2006
182
45
48
Tokyo
I reverted your latest commit, then the compiling finished well.
The phone booted without WIFI.:crying:

But I can check if my two sims work.

The base rom is xiaomi.eu_multi_libra_V7.1.4.0.LXKCNCK_v7-5.1.zip.

@s2k7
I found some differences in vendor folder, so i have uploaded my skeleton (to fill with proprietary files).
I also decided to include xiaobai's kernel folder (which doesnt'contains kernel source, but it does have includes and header files) to provide a more-than-complete build environment.

I committed changes so sync my repo, and also please add these to your build environment and let me know!
android-vendor-xiaomi-libra
android-kernel-xiaomi-libra

Good luck :)
 
Dec 10, 2012
9
9
0
The phone booted without WIFI.:crying:
You need to create a symbolic link qca_cld_wlan.ko to wlan.ko in somewhere. init.qcom.wifi.sh. is commonly used for the purpose. Like this:

--- a/misc/init.qcom.wifi.sh
+++ b/misc/init.qcom.wifi.sh
@@ -497,6 +497,11 @@ case "$target" in

msm7630*)
;;
+ msm8992*)
+ rm /system/lib/modules/wlan.ko
+ ln -sf /system/lib/modules/qca_cld_wlan.ko \
+ /system/lib/modules/wlan.ko
+ ;;

*)
;;
 

wolkenjaeger

Member
Jul 6, 2015
33
103
0
I really hope you all keep this little project running. I am currently not able to do any build by myself, but really appreciate the time all you guys invest here! :laugh:

(Speaking of, is it possible to update the image always with the latest Android Security Patch Version, to have the security features enabled?)
 

emfox

Senior Member
Mar 16, 2011
270
887
0
Hello everybody,

I have finally completed version 1 of my device tree for our device.
You can find it at
https://github.com/alterbang/android_device_xiaomi_libra
If you have a working CM local source you can lunch && mka otapackage for the glory :)

A few details:
  • I forked from xiaomi-dev, xiaobai's testing repo
  • Copied include folder from https://github.com/CyanogenMod/android_device_xiaomi_cancro
  • Edited AndroidBoard.mk with an "#alterbang" section with dir creation and patched files copy
  • Edited BoardConfig.mk with TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include
  • Added "#alterbang" section with missing files to proprietary-files.txt, and removed a couple files.
BONUS: i have added a script "extract-files-from-miui-zip" to extract files from a miui.zip file (like the roms over at xiaomi.eu) so you can extract them without having to flash miui to your phone :)

ANY COMMENT OR COLLABORATION IS WELCOME
It's the first time i work actively with CM, so have mercy on me :D
I created this project because i believe in collaboration and openness, so get your hands dirty!

Thank you!
alterbang

Build 20160129 DOWNLOAD LINK
https://mega.nz/#!wBVlUJ4D!E-TDy01wNqBuLQvbznNfOd6bfkpPvaAcSePWZdlDXbY
-works: everything
-bugs: wakeup is sometimes slow. if you know how to fix, please tell me :)
any progress on cm13 tree?
 

alterbang

Member
Apr 16, 2011
46
41
48
Milan
none at the moment.
i'm testing TS CM13 roms and until we have kernel sources (official or not) i guess another tree it wouldn't be much of use, their roms are already pretty good.

so...any progress with the kernel? :)
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone