Jump to content

[DEV][ROM][13.11.] CyanogenMod 12.1 (Android 5.1.1) for Huawei Y5


Recommended Posts

Guest KonstaT
Posted (edited)

New build. First one with source built kernel but everything seems to be running smoothly and stable. :)

cm-12.1-20161113-UNOFFICIAL-KonstaKANG-y560.zip
https://www.androidfilehost.com/?fid=457095661767115298
md5:8256c2acc631a02264a90688dc3cabd5

-build kernel & wifi driver from source
-remove kernel modules support (go moduleless)
-kernel performance optimizations (Cortex-A7 tuning & optimized memutils)
-add BFQ i/o scheduler and enable it by default
-add vibrator intensity control
-add kernel patch for DriveDroid
-fix glitchy notification sounds, etc
-enable KSM
-patch shtload of known vulnerabilities in kernel (CVE-xxxx-xxxx, and more)
-Android security patch level: 1 October 2016 (merged)

 

U23 patch also needs an update. Hopefully source built kernel also works there or I'm going to have to drop support. Please someone test and report back.

cm-12.1-20161113-y560-u23.zip
https://www.androidfilehost.com/?fid=457095661767115302
md5:793d33e8f6d1e1e2ae10dfe3bc3d42e0

Edited by KonstaT
Guest Prince420
Posted

remove kernel modules support (go moduleles

I didnt understand this thing.. M a newbie in this field.. Tried ur all roms for Y5 .. N using CM13 right now.. Curious about this new build kernel.. R u going to work this on CM13?

Guest KonstaT
Posted (edited)
1 hour ago, Prince420 said:

remove kernel modules support (go moduleles

I didnt understand this thing.. M a newbie in this field.. Tried ur all roms for Y5 .. N using CM13 right now.. Curious about this new build kernel.. R u going to work this on CM13?

It means that drivers that were previously kernel modules (/system/lib/modules) are now built into the kernel - most notably wifi driver. There's also security aspect to removing modules support as it's not possible to load potentially malicious modules. This is how things are set up on most Qualcomm devices running CM these days (at least officially supported ones).

Yeah, going to do the same with CM13 eventually. There's also a lot more that needs to be done there and finally having a kernel source is going to solve a lot of the issues there as well. All the work I've done with the kernel so far will directly benefit CM13 later. Just a lot easier and more reasonable to start with the Android version the kernel source matches.

Edited by KonstaT
Guest Prince420
Posted

Just installed cm12.1 .. V v well done sir.. Curious to get the update about cm13 .. One more thing.. As now u have a full kernel source now r u going to port cm14 also??

Guest KonstaT
Posted
9 hours ago, Prince420 said:

Just installed cm12.1 .. V v well done sir.. Curious to get the update about cm13 .. One more thing.. As now u have a full kernel source now r u going to port cm14 also??

Patience. Nothing stopping you from doing it yourself if you're in such a hurry.

Guest Prince420
Posted

Haha.. M not so brilliant to port or to modify.. Need to wait for u.. 

Guest smiffyma
Posted

just installed your new twrp & cm12 build KonstaT and all seems to be running well, nice and smooth- thanks ...

 

only thing to report is that I still have the eralier problem where the operator names are not appearing ... only the codes ...

eg on the lock screen I have 234 15 GB rather than vodafone ...

(gsm.operator.alpha contains 234 15 as does the gsm.operator.numeric, and as does ril.imsi.mcc.nc)

 

Other than that glitch, all is good

thanks

 

  • 3 weeks later...
Posted (edited)

Hello,

I'm having a problem with compiling the ROM from source (using the device, kernel, and proprietary files from the first post). I am using Ubuntu 14.04 x86_64. Here are the steps I did:

  1. Downloaded the source with:
  • repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0
    curl --create-dirs -L -o .repo/local_manifests/manifest_huawei_y560.xml -O -L https://raw.githubusercontent.com/legaCyMod/android_local_manifest/cm-13.0/manifest_huawei_y560.xml
    repo sync

      2. Executed:    

. build/envsetup.sh
brunch y560

 

But then I got this error:

 

device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp: In function 'void loc_eng_agps_init(loc_eng_data_s_type&, AGpsExtCallbacks*)':
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2351:25: error: 'loc_gps_cfg_s_type' has no member named 'USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL'
             if(gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL) {
                         ^
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp: In function 'int loc_eng_set_server(loc_eng_data_s_type&, LocServerType, const char*, int)':
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2571:20: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
             url[0] = NULL;
                    ^
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp: In function 'int loc_eng_agps_install_certificates(loc_eng_data_s_type&, const DerEncodedCertificate*, size_t)':
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2721:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i=0; i < numberOfCerts; ++i)
                           ^
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp: In function 'void loc_eng_configuration_update(loc_eng_data_s_type&, const char*, int32_t)':
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2765:30: error: 'loc_gps_cfg_s_type' has no member named 'SUPL_MODE'             if (gps_conf_tmp.SUPL_MODE != gps_conf.SUPL_MODE) {
                              ^
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2765:52: error: 'loc_gps_cfg_s_type' has no member named 'SUPL_MODE'             if (gps_conf_tmp.SUPL_MODE != gps_conf.SUPL_MODE) {
                                                    ^
make: *** [/home/red/android/system_untouched/out/target/product/y560/obj/SHARED_LIBRARIES/libloc_eng_intermediates/loc_eng.o] Error 1
make: Leaving directory `/home/red/android/system_untouched'

#### make failed to build some targets (22:44 (mm:ss)) ####

----------------------

 

Can anybody tell me how to fix this issue? I have OpenJDK 7 installed.

Edited by redxz
Guest KonstaT
Posted (edited)
1 hour ago, redxz said:

Hello,

I'm having a problem with compiling the ROM from source (using the device, kernel, and proprietary files from the first post). I am using Ubuntu 14.04 x86_64. Here are the steps I did:

  1. Downloaded the source with:
  • 
    repo init -u git://github.com/CyanogenMod/android.git -b cm-13.0
    curl --create-dirs -L -o .repo/local_manifests/manifest_huawei_y560.xml -O -L https://raw.githubusercontent.com/legaCyMod/android_local_manifest/cm-13.0/manifest_huawei_y560.xml
    repo sync

      2. Executed:    


. build/envsetup.sh
brunch y560

 

But then I got this error:

 

device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp: In function 'void loc_eng_agps_init(loc_eng_data_s_type&, AGpsExtCallbacks*)':
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2351:25: error: 'loc_gps_cfg_s_type' has no member named 'USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL'
             if(gps_conf.USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL) {
                         ^
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp: In function 'int loc_eng_set_server(loc_eng_data_s_type&, LocServerType, const char*, int)':
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2571:20: warning: converting to non-pointer type 'char' from NULL [-Wconversion-null]
             url[0] = NULL;
                    ^
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp: In function 'int loc_eng_agps_install_certificates(loc_eng_data_s_type&, const DerEncodedCertificate*, size_t)':
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2721:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (int i=0; i < numberOfCerts; ++i)
                           ^
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp: In function 'void loc_eng_configuration_update(loc_eng_data_s_type&, const char*, int32_t)':
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2765:30: error: 'loc_gps_cfg_s_type' has no member named 'SUPL_MODE'             if (gps_conf_tmp.SUPL_MODE != gps_conf.SUPL_MODE) {
                              ^
device/huawei/y560/gps/libloc_api_50001/loc_eng.cpp:2765:52: error: 'loc_gps_cfg_s_type' has no member named 'SUPL_MODE'             if (gps_conf_tmp.SUPL_MODE != gps_conf.SUPL_MODE) {
                                                    ^
make: *** [/home/red/android/system_untouched/out/target/product/y560/obj/SHARED_LIBRARIES/libloc_eng_intermediates/loc_eng.o] Error 1
make: Leaving directory `/home/red/android/system_untouched'

#### make failed to build some targets (22:44 (mm:ss)) ####

----------------------

 

Can anybody tell me how to fix this issue? I have OpenJDK 7 installed.

Which one? This is CM12.1 thread and you're trying to build CM13? You've synced CM13 sources but error lines matches CM12.1 gps HAL.

Remove this line (or even better change it to "$(LOCAL_PATH)") and it should build. I've locally removed hardware/qcom/gps from my source tree so I haven't hit that error.

Edited by KonstaT
Posted (edited)
31 minutes ago, KonstaT said:

Which one? This is CM12.1 thread and you're trying to build CM13? You've synced CM13 sources but error lines matches CM12.1 gps HAL.

Oh my, sorry. I copied the installation instructions from the CM 13.0 branch :P Yes, I'm compiling CM 12.1.

Judging from the module name, will that affect the GPS functionality on the device?

Edited by redxz
Posted
27 minutes ago, KonstaT said:

Remove this line (or even better change it to "$(LOCAL_PATH)") and it should build. I've locally removed hardware/qcom/gps from my source tree so I haven't hit that error.

So if I understood correctly, this:

hardware/qcom/gps/loc_api/libloc_api_50001

Changes to this:

$(LOCAL_PATH)

Is that right?

Guest KonstaT
Posted
13 minutes ago, redxz said:

So if I understood correctly, this:

hardware/qcom/gps/loc_api/libloc_api_50001

Changes to this:

$(LOCAL_PATH)

Is that right?

Yes.

Posted
1 hour ago, KonstaT said:

Yes.

Thank you very much, that solved the problem.

 

I will proceed the compilation and will report if anything goes wrong.

Posted (edited)

Okay, now I have another problem. The build process fails at compiling hwc, which looks really similar to the previous error I had. Here is the full output:

-------------------------------------

target thumb C++: hwcomposer.msm8909 <= hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp
target thumb C++: hwcomposer.msm8909 <= hardware/qcom/display-caf/msm8916/libhwcomposer/hwc_utils.cpp
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp: In function 'int hwc_getDisplayAttributes(hwc_composer_device_1*, int, uint32_t, const uint32_t*, int32_t*)':
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp:792:9: error: 'HWC_DISPLAY_FBFORMAT' was not declared in this scope
         HWC_DISPLAY_FBFORMAT,
         ^
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp:800:53: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
     for (size_t i = 0; i < NUM_DISPLAY_ATTRIBUTES - 1; i++) {
                                                     ^
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp:832:14: error: the value of 'HWC_DISPLAY_FBFORMAT' is not usable in a constant expression
         case HWC_DISPLAY_FBFORMAT:
              ^
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp:792:9: note: 'HWC_DISPLAY_FBFORMAT' does not have integral or enumeration type
         HWC_DISPLAY_FBFORMAT,
         ^
cc1plus: all warnings being treated as errors
make: *** [/home/red/android/system/out/target/product/y560/obj/SHARED_LIBRARIES/hwcomposer.msm8909_intermediates/hwc.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/red/android/system'

#### make failed to build some targets (14:15 (mm:ss)) ####

----------------------------------------------------

Please note that I had a problem with zconf.hash.c being not found, so I fixed (?) that issue by running 'make mrproper' in the kernel directory, and afterwards removing the '~/android/system/out/target/product/y560' directory. Not sure if this is somehow linked to the issue I'm currently having.

Edited by redxz
Guest KonstaT
Posted
1 hour ago, redxz said:

Okay, now I have another problem. The build process fails at compiling hwc, which looks really similar to the previous error I had. Here is the full output:

-------------------------------------

target thumb C++: hwcomposer.msm8909 <= hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp
target thumb C++: hwcomposer.msm8909 <= hardware/qcom/display-caf/msm8916/libhwcomposer/hwc_utils.cpp
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp: In function 'int hwc_getDisplayAttributes(hwc_composer_device_1*, int, uint32_t, const uint32_t*, int32_t*)':
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp:792:9: error: 'HWC_DISPLAY_FBFORMAT' was not declared in this scope
         HWC_DISPLAY_FBFORMAT,
         ^
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp:800:53: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits]
     for (size_t i = 0; i < NUM_DISPLAY_ATTRIBUTES - 1; i++) {
                                                     ^
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp:832:14: error: the value of 'HWC_DISPLAY_FBFORMAT' is not usable in a constant expression
         case HWC_DISPLAY_FBFORMAT:
              ^
hardware/qcom/display-caf/msm8916/libhwcomposer/hwc.cpp:792:9: note: 'HWC_DISPLAY_FBFORMAT' does not have integral or enumeration type
         HWC_DISPLAY_FBFORMAT,
         ^
cc1plus: all warnings being treated as errors
make: *** [/home/red/android/system/out/target/product/y560/obj/SHARED_LIBRARIES/hwcomposer.msm8909_intermediates/hwc.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/red/android/system'

#### make failed to build some targets (14:15 (mm:ss)) ####

----------------------------------------------------

Please note that I had a problem with zconf.hash.c being not found, so I fixed (?) that issue by running 'make mrproper' in the kernel directory, and afterwards removing the '~/android/system/out/target/product/y560' directory. Not sure if this is somehow linked to the issue I'm currently having.

Remove this line from BoardConfig.mk or add following patches. I have the patches locally because msm8909 BSP has them.
https://source.codeaurora.org/quic/la/platform/hardware/libhardware/commit/?h=LA.BR.1.2.3.c3&id=136ae5e978338cd8aee208a563b186a758ec569f
https://source.codeaurora.org/quic/la/platform/frameworks/native/commit/?h=LA.BR.1.2.3.c3&id=7881155de311b020983abc99ad84eed6065c9a96

I never really intended someone to build this. You have more trouble to come. ;) You need to revert this or cherry-pick quite a few commits from cm-13.0. Yep telephony implementation is the biggest problem. I spent two weeks reverse engineering that so I'm not sure if I'm going to make that patch available. You can probably still get RIL working by using couple of prebuilt jars from the latest build I've released.

Posted (edited)
53 minutes ago, KonstaT said:

I never really intended someone to build this. You have more trouble to come. ;) You need to revert this or cherry-pick quite a few commits from cm-13.0. Yep telephony implementation is the biggest problem. I spent two weeks reverse engineering that so I'm not sure if I'm going to make that patch available. You can probably still get RIL working by using couple of prebuilt jars from the latest build I've released.

Well yeah, I need some features enabled in the kernel (OTG, Realtek/Atheros drivers and NTFS support), that's why I'm doing all of this :P

Edited by redxz
Posted (edited)
1 hour ago, KonstaT said:

You have more trouble to come. ;)

Yeah, now I have issues with archrandom.h being missing... Here is the full log:

------------

  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/arm/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    /home/red/android/system_beta/kernel/huawei/msm8909/scripts/checksyscalls.sh
  CC      init/main.o
In file included from /home/red/android/system_beta/kernel/huawei/msm8909/include/linux/stackprotector.h:6:0,
                 from /home/red/android/system_beta/kernel/huawei/msm8909/init/main.c:19:
/home/red/android/system_beta/kernel/huawei/msm8909/include/linux/random.h:59:29: fatal error: asm/archrandom.h: No such file or directory
 # include <asm/archrandom.h>
                             ^
compilation terminated.
make[3]: *** [init/main.o] Error 1
make[2]: *** [init] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/red/android/system_beta/kernel/huawei/msm8909'make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
warning: string '[insert some module name here]' has no default translation.

make: Leaving directory `/home/red/android/system_beta'

#### make failed to build some targets (07:53 (mm:ss)) ####

----------------

Oh my...

Edited by redxz
Guest KonstaT
Posted
55 minutes ago, redxz said:

Well yeah, I need some features enabled in the kernel (OTG, Realtek/Atheros drivers and NTFS support), that's why I'm doing all of this :P

You don't need to build the whole ROM for that. Just do:

mka bootimage -jX
20 minutes ago, redxz said:

Yeah, now I have issues with archrandom.h being missing... Here is the full log:

------------

  CC      kernel/bounds.s
  GEN     include/generated/bounds.h
  CC      arch/arm/kernel/asm-offsets.s
  GEN     include/generated/asm-offsets.h
  CALL    /home/red/android/system_beta/kernel/huawei/msm8909/scripts/checksyscalls.sh
  CC      init/main.o
In file included from /home/red/android/system_beta/kernel/huawei/msm8909/include/linux/stackprotector.h:6:0,
                 from /home/red/android/system_beta/kernel/huawei/msm8909/init/main.c:19:
/home/red/android/system_beta/kernel/huawei/msm8909/include/linux/random.h:59:29: fatal error: asm/archrandom.h: No such file or directory
 # include <asm/archrandom.h>
                             ^
compilation terminated.
make[3]: *** [init/main.o] Error 1
make[2]: *** [init] Error 2
make[1]: *** [sub-make] Error 2
make[1]: Leaving directory `/home/red/android/system_beta/kernel/huawei/msm8909'make: *** [TARGET_KERNEL_BINARIES] Error 2
make: *** Waiting for unfinished jobs....
warning: string '[insert some module name here]' has no default translation.

make: Leaving directory `/home/red/android/system_beta'

#### make failed to build some targets (07:53 (mm:ss)) ####

----------------

Oh my...

Most likely due to some modifications you've done to the kernel yourself.

Posted (edited)
17 minutes ago, KonstaT said:

You don't need to build the whole ROM for that. Just do:


mka bootimage -jX

Most likely due to some modifications you've done to the kernel yourself.

Could running 'make mrproper' and replacing the msm8909-y560_defconfig with .config made with 'make ARCH=arm menuconfig' be the issue that archrandom.h can't be located?

Edited by redxz
Guest KonstaT
Posted
20 minutes ago, redxz said:

Could running 'make mrproper' and replacing the msm8909-y560_defconfig with .config made with 'make ARCH=arm menuconfig' be the issue that archrandom.h can't be located?

You've enabled CONFIG_ARCH_RANDOM, that's the problem. msm8909-y560_defconfig is what you need to use build the kernel.

Nothing gets built inside kernel/huawei/msm8909 so you don't need to make clean/mrproper. Kernel out dir is out/target/product/y560/obj/KERNEL_OBJ.

Posted
23 minutes ago, KonstaT said:

You've enabled CONFIG_ARCH_RANDOM, that's the problem. msm8909-y560_defconfig is what you need to use build the kernel.

Nothing gets built inside kernel/huawei/msm8909 so you don't need to make clean/mrproper. Kernel out dir is out/target/product/y560/obj/KERNEL_OBJ.

Strange, because if I don't do 'make mrproper', it requests me to do it after i run 'make ARCH=arm menuconfig' and 'mv .config arch/arm/configs/msm8909-y560_defconfig'... And I'm sure I didn't enable ArchRandom. Can that be fixed via menuconfig?

Guest KonstaT
Posted
15 minutes ago, redxz said:

Strange, because if I don't do 'make mrproper', it requests me to do it after i run 'make ARCH=arm menuconfig' and 'mv .config arch/arm/configs/msm8909-y560_defconfig'... And I'm sure I didn't enable ArchRandom. Can that be fixed via menuconfig?

Whaaat? You're not even supposed to do make menuconfig. Just remove the whole kernel/huawei/msm8909, 'repo sync' again, don't touch _anything_, and 'make bootimage'. That's it.

Posted
33 minutes ago, KonstaT said:

Whaaat? You're not even supposed to do make menuconfig. Just remove the whole kernel/huawei/msm8909, 'repo sync' again, don't touch _anything_, and 'make bootimage'. That's it.

Well I don't know how am I supposed to enable the drivers then...

 

Maybe I can backup the msm8909-y560_defconfig and after I have done repo sync replace it?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.