FORUMS
Remove All Ads from XDA

[CM12.1] Build CyanogenMod 12.1 with device tree

44 posts
Thanks Meter: 40
 
By alterbang, Member on 12th January 2016, 04:25 PM
Post Reply Email Thread
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...e_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/andro..._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
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-TDy01wN...aAcSePWZdlDXbY
-works: everything
-bugs: wakeup is sometimes slow. if you know how to fix, please tell me
The Following 16 Users Say Thank You to alterbang For This Useful Post: [ View ] Gift alterbang Ad-Free
 
 
12th January 2016, 08:47 PM |#2  
muff99's Avatar
Senior Member
Thanks Meter: 115
 
More
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

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?
The Following User Says Thank You to muff99 For This Useful Post: [ View ] Gift muff99 Ad-Free
13th January 2016, 09:07 AM |#3  
alterbang's Avatar
OP Member
Flag Milan
Thanks Meter: 40
 
More
Thank you muff99!
As for your question: i saw SELinux permissive removed in the mk files, but i don't know if that's enough. I'll let you know!
For Marshmallow / CM13: the idea is to do the same thing also for that branch
The Following 2 Users Say Thank You to alterbang For This Useful Post: [ View ] Gift alterbang Ad-Free
15th January 2016, 04:34 AM |#4  
Member
Thanks Meter: 7
 
More
Hey !
Somebody could explain me what are the differences of this version between the Xiaobi one ?
Ty
15th January 2016, 07:42 AM |#5  
Senior Member
Flag Budapest
Thanks Meter: 88
 
More
Quote:
Originally Posted by DFurax

Hey !
Somebody could explain me what are the differences of this version between the Xiaobi one ?
Ty

You can compile this to yourself, you can take part of the development with this tree.

Sent from my Mi-4c using Tapatalk
17th January 2016, 07:28 PM |#6  
AndropaX's Avatar
Senior Member
Flag San Escobar
Thanks Meter: 925
 
Donate to Me
More
Here are non open source binaries :
https://github.com/AndropaX/propriet...r_xiaomi_libra
Pull requests with updates (from dev version please) are welcome.

Wysłane z mojego Mi-4c przy użyciu Tapatalka
18th January 2016, 05:17 PM |#7  
Senior Member
Metz
Thanks Meter: 59
 
More
Hi,

I'm new in building ROM, so i'm trying to build rom but it seems local_manifest.xml needed ?! Where i can found it?!

Thx in advance
18th January 2016, 07:41 PM |#8  
muff99's Avatar
Senior Member
Thanks Meter: 115
 
More
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-4...5#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.
18th January 2016, 08:03 PM |#9  
alterbang's Avatar
OP Member
Flag Milan
Thanks Meter: 40
 
More
that is just a missing dir, search my repo and yes please open a new thread! so we can start together on cm13
19th January 2016, 10:11 AM |#10  
Senior Member
Metz
Thanks Meter: 59
 
More
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
19th January 2016, 08:27 PM |#11  
muff99's Avatar
Senior Member
Thanks Meter: 115
 
More
Quote:
Originally Posted by dexxa05

Hi Guys,

Small issues i'm trying to build 12.1 but the system try to build 13.0
Do you know how to change that?!

Thx in advance

How did you init your repo? You have to do it like this, I guess:
repo init -u https://github.com/CyanogenMod/android.git -b cm-12.1

Also, check the "revision" attribute in your .repo/local_manifests/*.xml files, it should be "revision="cm-12.1" " for you
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes