[CM12.1] Build CyanogenMod 12.1 with device tree

alterbang

Member
Apr 16, 2011
46
41
48
Milan
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 :)
 
Last edited:

muff99

Senior Member
Jan 6, 2011
388
150
0
Wow, awesome work!!
I'm not a dev, but I build CM 12.1 for klimtlte and CM 13 for mako (before I got my shiny new Mi 4c ...).

Double thumbs-up for your work on the extract-files-from-miui-zip.sh. Have you thought about uploading the files to TheMuppets github? Would make it even easier to build, and aries and cancro are already there.

Also I like that you shared your findings and how you got it to work and what you used to get it to work, much appreciated!! This is the way to do it in my opinion!

I very much like the idea of running my own build on my phone, however I am not sure if I should put too much effort into 12.1 any more with all the nice CM13 roms getting better and better (Team Superluminals cm13 builds work great on my phone) ... I will keep an eye on your github, though, and might ask your for your local manifest in the future :p

Again, you did great work so far!

Oh, one mroe thing: Whats the state of SELinux with your build? Is it permissive? Or did you or xiobai have an enforcing SELinux working?
 
  • Like
Reactions: kevinkvothe

muff99

Senior Member
Jan 6, 2011
388
150
0
I am trying to put together a cm 13 build, this is how my local manifest looks so far:
Code:
 <manifest>
  <remote name="ghub" fetch="git://github.com/"/>
<!-- <project name="thune-xiaobai/android_device_xiaomi_libra.git" path="device/xiaomi/libra" remote="ghub" revision="cm-13.0"/>-->
 <project name="xiaomi-dev/android_device_xiaomi_libra.git" path="device/xiaomi/libra" remote="ghub" revision="cm-13.0"/>
 <project name="CyanogenMod/android_device_qcom_common" path="device/qcom/common" remote="ghub" revision="cm-13.0"/>
 <project name="AndropaX/proprietary_vendor_xiaomi_libra" path="vendor/xiaomi/libra" remote="ghub" reviSion="master"/>
...
</manifest>
It seems like Xiaobai is not using his thune-xiaobai Github any more, but he is contributing to xiaomi-dev, so I chose that device tree as did @alterbang.

@dexxa05:
Thnx! You sure the dev roms are a good source? After this locked-bootloader news I am hesitant to use dev rom files ...

Got until this one:
Code:
 make: *** No rule to make target `/home/freddi/android/system/out/target/product/libra/obj/KERNEL_OBJ/usr', needed by `/home/freddi/android/system/out/target/product/libra/dt.img'.  Stop.
Seems like @alterbang ran into this here:
http://forum.xda-developers.com/mi-...12-1-mi-4c-t3226541/post64204905#post64204905

Which dependencies did you add to fix this?

Oh btw, I dont wanna hijack your cm 12.1 thread to talk about cm 13 ... should I open another thread?

UPDATE: Oh I just saw all the stuff that you did to your device tree in /include, have to work through that ... cancro already has cm13, looks like there is even a kernel source.
 
Last edited:

dexxa05

Senior Member
May 5, 2007
493
61
0
Metz
Hi Guys,

Small issues i'm trying to build 12.1 but the system try to build 13.0

Code:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
CM_VERSION=13.0-20160119-UNOFFICIAL-libra
TARGET_PRODUCT=cm_libra
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-3.2.0-4-amd64-x86_64-with-debian-7.9
HOST_BUILD_TYPE=release
BUILD_ID=MMB29T
OUT_DIR=/home/dexxa05/android/system/out
============================================
Do you know how to change that?!

Thx in advance
 
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