Guest k2wl Posted May 8, 2015 Report Posted May 8, 2015 i need kernel source for zte v5 max there seems to be a kernel source for zte v5s on github from zte https://github.com/ztemt/V5s_N918St_KitKat_kernel i need source for n958st @KonstaT can you please help me finding the source on ztedevice.com site...i didnt seem to find it. thank you very much
Guest KonstaT Posted May 9, 2015 Report Posted May 9, 2015 Looks like you've already found it. ;) ZTE usually releases kernel sources for families of devices and several device can build off the same source. V5 Max and V5s are both msm8916 devices and you can actually find default defconfigs for both (msm8916-N958X_defconfig and msm8916-N918X_defconfig, respectively) in the source tree you linked.
Guest k2wl Posted May 9, 2015 Report Posted May 9, 2015 (edited) but the source seems incomplete. can you try to compile it ?? i have merged it with caf in my github https://github.com/k2wlxda/android_kernel_N958St/tree/196cd also master tree is stock source. but it fails to compile in dtb formation also there are few compilation errors. that is why i though that there may be other source to it. sorry if i am asking too much!! Looks like you've already found it. ;) ZTE usually releases kernel sources for families of devices and several device can build off the same source. V5 Max and V5s are both msm8916 devices and you can actually find default defconfigs for both (msm8916-N958X_defconfig and msm8916-N918X_defconfig, respectively) in the source tree you linked. Edited May 9, 2015 by k2wl
Guest KonstaT Posted May 9, 2015 Report Posted May 9, 2015 but the source seems incomplete. can you try to compile it ?? i have merged it with caf in my github https://github.com/k2wlxda/android_kernel_N958St/tree/196cd also master tree is stock source. but it fails to compile in dtb formation also there are few compilation errors. that is why i though that there may be other source to it. sorry if i am asking too much!! What defconfig are you using? You should use one extracted from your device (/proc/config.gz or if you have boot.img you can extract it from zImage using extract-ikconfig tool). Standalone kernel build is a bit different than building it as part of Android build system (where headers are exported). If you get errors about missing header, change <header.h> to "header.h" (or vice versa) on the insulting line.
Guest k2wl Posted May 10, 2015 Report Posted May 10, 2015 What defconfig are you using? You should use one extracted from your device (/proc/config.gz or if you have boot.img you can extract it from zImage using extract-ikconfig tool). Standalone kernel build is a bit different than building it as part of Android build system (where headers are exported). If you get errors about missing header, change <header.h> to "header.h" (or vice versa) on the insulting line. ikconfig tool does not work and proc/config.gz does not exist. also i am using msm8916-N958X_defconfig i am trying to build it in cm source. i will put up the errors here ...i hope you can help me out for sure(your work with zte devices is amazing) thank you very much!!!
Guest k2wl Posted May 10, 2015 Report Posted May 10, 2015 first error HOSTCC scripts/mod/file2alias.o HOSTLD scripts/mod/modpost CHK include/generated/compile.h make[6]: *** No rule to make target 'drivers/video/msm/mdss/zte_disp_enhance.o', needed by 'drivers/video/msm/mdss/built-in.o'. Stop. /home/k2wlxda/cm-source/cm11/kernel/zte/196cb/scripts/Makefile.build:455: recipe for target 'drivers/video/msm/mdss' failed make[5]: *** [drivers/video/msm/mdss] Error 2 /home/k2wlxda/cm-source/cm11/kernel/zte/196cb/scripts/Makefile.build:455: recipe for target 'drivers/video/msm' failed make[4]: *** [drivers/video/msm] Error 2 /home/k2wlxda/cm-source/cm11/kernel/zte/196cb/scripts/Makefile.build:455: recipe for target 'drivers/video' failed make[3]: *** [drivers/video] Error 2 /home/k2wlxda/cm-source/cm11/kernel/zte/196cb/Makefile:799: recipe for target 'drivers' failed make[2]: *** [drivers] Error 2 Makefile:130: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 make[1]: Leaving directory '/home/k2wlxda/cm-source/cm11/kernel/zte/196cb' build/core/tasks/kernel.mk:188: recipe for target 'TARGET_KERNEL_BINARIES' failed make: *** [TARGET_KERNEL_BINARIES] Error 2 i can get pass this error if i disable zte disp enhance in defconfig. as i cant seem to find zte_disp_enhance.c file in source.
Guest KonstaT Posted May 10, 2015 Report Posted May 10, 2015 ikconfig tool does not work and proc/config.gz does not exist. also i am using msm8916-N958X_defconfig /proc/config.gz is not there if kernel was compiled with CONFIG_IKCONFIG_PROC not set. extract-ikconfig should work unless CONFIG_IKCONFIG was not set (or they've used some strange compression). They're just being mean if they've disabled both on purpose. :( Those default/template defconfigs you find in the source tree are only something to be used as a guideline. Always build with a defconfig extracted from a running device. i can get pass this error if i disable zte disp enhance in defconfig. as i cant seem to find zte_disp_enhance.c file in source. Like said, without proper defconfig can't tell if it's even supposed to be set or not (likely not if it's missing a file and doesn't compile). Next?
Guest k2wl Posted May 10, 2015 Report Posted May 10, 2015 (edited) ok next one OBJCOPY arch/arm/boot/zImage Kernel: arch/arm/boot/zImage is readymake[1]: Leaving directory '/home/k2wlxda/cm-source/cm11/kernel/zte/196cb' make -C kernel/zte/196cb O=/home/k2wlxda/cm-source/cm11/out/target/product/n958st/obj/KERNEL_OBJ ARCH=arm CROSS_COMPILE=" /home/k2wlxda/cm-source/cm11/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi-" dtbs make[1]: Entering directory '/home/k2wlxda/cm-source/cm11/kernel/zte/196cb' CC scripts/mod/devicetable-offsets.s GEN scripts/mod/devicetable-offsets.h HOSTCC scripts/mod/file2alias.o HOSTLD scripts/mod/modpost DTC arch/arm/boot/dts/qcom/../msm8916-sim.dtb DTC arch/arm/boot/dts/qcom/../msm8916-rumi.dtb DTC arch/arm/boot/dts/qcom/../msm8916-cdp.dtb ERROR (phandle_references): Reference to non-existent node or label "mpu6050_default" ERROR (phandle_references): Reference to non-existent node or label "mpu6050_sleep" ERROR (phandle_references): Reference to non-existent node or label "apds99xx_default" ERROR (phandle_references): Reference to non-existent node or label "apds99xx_sleep" ERROR (phandle_references): Reference to non-existent node or label "ak8963_default" ERROR (phandle_references): Reference to non-existent node or label "ak8963_sleep" ERROR (phandle_references): Reference to non-existent node or label "nfc_disable_active" ERROR (phandle_references): Reference to non-existent node or label "nfc_disable_suspend" ERROR: Input tree has errors, aborting (use -f to force output) /home/k2wlxda/cm-source/cm11/kernel/zte/196cb/arch/arm/boot/dts/qcom/Makefile:174: recipe for target 'arch/arm/boot/dts/qcom/../msm8916-cdp.dtb' failed make[3]: *** [arch/arm/boot/dts/qcom/../msm8916-cdp.dtb] Error 2 /home/k2wlxda/cm-source/cm11/kernel/zte/196cb/arch/arm/Makefile:307: recipe for target 'dtbs' failed make[2]: *** [dtbs] Error 2 Makefile:130: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 make[1]: Leaving directory '/home/k2wlxda/cm-source/cm11/kernel/zte/196cb' build/core/tasks/kernel.mk:188: recipe for target 'TARGET_KERNEL_BINARIES' failed make: [TARGET_KERNEL_BINARIES] Error 2 (ignored) this is one error i cant seem to fix...i tried everything...but it is still there. some of the commits from yu yureka tree may be useful to remove the error but still it leads to more errors https://github.com/CyanogenMod/android_kernel_yu_msm8916/commits/225d1dfc2c81001505668ee8b94b3ee7823ee171/arch/arm/boot/dts/qcom/msm8916-qrd-skui.dtsi ZTE is being mean for all this source thing. also the CAF branch LNX.LA.3.7.2.c5 on which this source based seems to have same error as above. BTW thank for replying to my posts!!!! Edited May 10, 2015 by k2wl
Guest KonstaT Posted May 10, 2015 Report Posted May 10, 2015 ZTE is being mean for all this source thing. also the CAF branch LNX.LA.3.7.2.c5 on which this source based seems to have same error as above. That would rather indicate there's something wrong with the build system then. I highly doubt ZTE would release a source that doesn't build, but I'm absolutely certain CAF sources should build. There just might be some difference between CM and CAF build systems. I don't have any experience in building these newest Qualcomm kernels (3.10.x) but looking yu tomato sources there shouldn't be anything too strange about it. Might be worth checking if there's other msm8916/msm8939 devices with CM as well. You could also try compiling it as part of a CAF build (like it actually should be). Sync CAF manifest with the same tag as your kernel (replace kernel with the ZTE source of course) and lunch generic msm8916 target. You should be able to build a kernel with 'make bootimage'.
Guest k2wl Posted May 10, 2015 Report Posted May 10, 2015 ok i will try that !!! That would rather indicate there's something wrong with the build system then. I highly doubt ZTE would release a source that doesn't build, but I'm absolutely certain CAF sources should build. There just might be some difference between CM and CAF build systems. I don't have any experience in building these newest Qualcomm kernels (3.10.x) but looking yu tomato sources there shouldn't be anything too strange about it. Might be worth checking if there's other msm8916/msm8939 devices with CM as well. You could also try compiling it as part of a CAF build (like it actually should be). Sync CAF manifest with the same tag as your kernel (replace kernel with the ZTE source of course) and lunch generic msm8916 target. You should be able to build a kernel with 'make bootimage'.
Guest KonstaT Posted May 10, 2015 Report Posted May 10, 2015 ok i will try that !!! Actually, don't do that. ;) Don't waste your time downloading CAF sources (it's huge). It's not going to make any difference. I have a pretty good idea what's going on... Do you have a N958St boot.img? Is the dt.img 167,936 bytes? I only have N918St boot.img and I've managed to build right dtbs for it. My zImage is still bigger than the original so the defconfig probably isn't quite right. These should not be picked up so comment out those 23 lines (not setting CONFIG_ARCH_MSM8916 doesn't feel quite right either). This can be changed back to CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES (but not absolutely necessary). These need to be added to defconfig: CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="qcom/msm8916-mtp-N958X" Edit. No, correct way would be to export this variable. They probably have something like 'DTS_NAME := qcom/msm8916-mtp-N958X' defined somewhere in their device tree. export CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES_ZTEMT=qcom/msm8916-mtp-N958X zImage you already built. To create dt.img: dtbToolCM -2 -o dt.img -s 2048 -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/arm/boot/dts/qcom/ Having a copy of the original defconfig certainly would have saved a lot of trouble. :P
Guest k2wl Posted May 11, 2015 Report Posted May 11, 2015 (edited) thanks again....i am about to download whole caf source....i will try this out!!! Edited May 11, 2015 by k2wl
Guest k2wl Posted May 11, 2015 Report Posted May 11, 2015 (edited) @KonstaT ok so i manged to build dt.img with following command ~/cm-source/cm11/out/host/linux-x86/bin/dtbToolCM -2 -o dt.img -s 2048 -p ~/cm-source/cm11/out/target/product/n958st/obj/KERNEL_OBJ/scripts/dtc/ ~/cm-source/cm11/out/target/product/n958st/obj/KERNEL_OBJ/arch/arm/boot/dts/qcom/ so now main question is can we implement this in mkbootimg.mk like you did in your kis3 device tree so that we compile it during cm rom build. good news!!!-- the kernel build with this boots.. :) thank you so much!!! you being god sent for me... god bless you... now i need to find a way to compile dt image during cm build. Edited May 12, 2015 by k2wl
Guest KonstaT Posted May 12, 2015 Report Posted May 12, 2015 so now main question is can we implement this in mkbootimg.mk like you did in your kis3 device tree so that we compile it during cm rom build. good news!!!-- the kernel build with this boots.. :) now i need to find a way to compile dt image during cm build. Great. :) All hardware working too? mkbootimg.mk should look exactly like on yu tomato. https://github.com/CyanogenMod/android_device_yu_tomato/blob/cm-11.0/mkbootimg.mk You'd need to change '$(KERNEL_OUT)/arch/arm/boot/dts/' to '$(KERNEL_OUT)/arch/arm/boot/dts/qcom/' though because the way ZTE is doing this spits the dtb to a 'wrong' directory. Personally I'd just put 'dtb-$(CONFIG_ARCH_MSM8916) += msm8916-mtp-N958X.dtb' where we removed/commented out the 23 lines and ignore the ZTE way of doing this (setting a variable in device tree and exporting it). Maybe even introduce new config options and put some ifdefs for all the supported ZTE targets (N918X, N958X and NX406E) if I wanted to do it properly... BTW, I see your device already has CM11, MIUI, etc. Are these using the stock kernel or are they just not releasing the source? Can you extract defconfig from the kernels used in these ROMs?
Guest k2wl Posted May 12, 2015 Report Posted May 12, 2015 (edited) those roms are from china and they didnt release a single line of code...i tries to contact them but none of them want to help....now i will build my own cm11 or cm12 and try to make it perfect. there is no defconfig in all those roms i already tried. i will put up the lines in makefile in dts/qcom as you suggested as tomato mkbootimg does not work i already tried. yes all hardware working expect wifi as i didnt put source for prima wlan in my code ...i will put that up today and then make boot img again. you are great sir...i never find anyone like you in my whole life...i have been compiling and making roms for last 4 yrs ...been struggling to get to make things work but none of the developers having experience helped me like you did. thank you once again. i will bother you little more if i get into anymore trouble. i will get back to you with all the rom development and bugs for this phone. Great. :) All hardware working too? mkbootimg.mk should look exactly like on yu tomato. https://github.com/CyanogenMod/android_device_yu_tomato/blob/cm-11.0/mkbootimg.mk You'd need to change '$(KERNEL_OUT)/arch/arm/boot/dts/' to '$(KERNEL_OUT)/arch/arm/boot/dts/qcom/' though because the way ZTE is doing this spits the dtb to a 'wrong' directory. Personally I'd just put 'dtb-$(CONFIG_ARCH_MSM8916) += msm8916-mtp-N958X.dtb' where we removed/commented out the 23 lines and ignore the ZTE way of doing this (setting a variable in device tree and exporting it). Maybe even introduce new config options and put some ifdefs for all the supported ZTE targets (N918X, N958X and NX406E) if I wanted to do it properly... BTW, I see your device already has CM11, MIUI, etc. Are these using the stock kernel or are they just not releasing the source? Can you extract defconfig from the kernels used in these ROMs? Edited May 12, 2015 by k2wl
Guest k2wl Posted May 13, 2015 Report Posted May 13, 2015 i manages to build kernel in cm in-line build. although in the start it gives error make[3]: *** No rule to make target 'arch/arm/boot/dts/qcom/../dtb-', needed by 'dtbs'. Stop. /home/k2wlxda/cm-source/cm12/kernel/zte/196cd/arch/arm/Makefile:307: recipe for target 'dtbs' failed make[2]: *** [dtbs] Error 2 Makefile:130: recipe for target 'sub-make' failed make[1]: *** [sub-make] Error 2 make[1]: Leaving directory '/home/k2wlxda/cm-source/cm12/kernel/zte/196cd' build/core/tasks/kernel.mk:229: recipe for target 'TARGET_KERNEL_BINARIES' failed make: [TARGET_KERNEL_BINARIES] Error 2 (ignored) then i used following mkbootimg.mk and it build dt.img in the last LOCAL_PATH := $(call my-dir) ## Build and run dtbtool DTBTOOL := $(HOST_OUT_EXECUTABLES)/dtbToolCM$(HOST_EXECUTABLE_SUFFIX) INSTALLED_DTIMAGE_TARGET := $(PRODUCT_OUT)/dt.img $(INSTALLED_DTIMAGE_TARGET): $(DTBTOOL) $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr $(INSTALLED_KERNEL_TARGET) $(call pretty,"Target dt image: $(INSTALLED_DTIMAGE_TARGET)") $(hide) $(DTBTOOL) -2 -o $(INSTALLED_DTIMAGE_TARGET) -s $(BOARD_KERNEL_PAGESIZE) -p $(KERNEL_OUT)/scripts/dtc/ $(KERNEL_OUT)/arch/arm/boot/dts/ @echo -e ${CL_CYN}"Made DT image: $@"${CL_RST} ## Overload bootimg generation: Same as the original, + --dt arg $(INSTALLED_BOOTIMAGE_TARGET): $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_FILES) $(INSTALLED_DTIMAGE_TARGET) $(call pretty,"Target boot image: $@") $(hide) $(MKBOOTIMG) $(INTERNAL_BOOTIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@ $(hide) $(call assert-max-image-size,$@,$(BOARD_BOOTIMAGE_PARTITION_SIZE),raw) @echo -e ${CL_CYN}"Made boot image: $@"${CL_RST} ## Overload recoveryimg generation: Same as the original, + --dt arg $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTIMG) $(INSTALLED_DTIMAGE_TARGET) \ $(recovery_ramdisk) \ $(recovery_kernel) @echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST} $(hide) $(MKBOOTIMG) $(INTERNAL_RECOVERYIMAGE_ARGS) $(BOARD_MKBOOTIMG_ARGS) --dt $(INSTALLED_DTIMAGE_TARGET) --output $@ $(hide) $(call assert-max-image-size,$@,$(BOARD_RECOVERYIMAGE_PARTITION_SIZE),raw) @echo -e ${CL_CYN}"Made recovery image: $@"${CL_RST} this gives following output target Prebuilt: (/home/k2wlxda/cm-source/cm12/out/target/product/n958st/kernel) Target dt image: /home/k2wlxda/cm-source/cm12/out/target/product/n958st/dt.img DTB combiner: Input directory: '/home/k2wlxda/cm-source/cm12/out/target/product/n958st/obj/KERNEL_OBJ/arch/arm/boot/dts/' Output file: '/home/k2wlxda/cm-source/cm12/out/target/product/n958st/dt.img' Found file: msm8916-mtp-N958X.dtb ... chipset: 206, rev: 0, platform: 8, subtype: 0 additional chipset: 248, rev: 0, platform: 8, subtype: 0 additional chipset: 249, rev: 0, platform: 8, subtype: 0 additional chipset: 250, rev: 0, platform: 8, subtype: 0 => Found 4 unique DTB(s) Generating master DTB... completed Made DT image: /home/k2wlxda/cm-source/cm12/out/target/product/n958st/dt.img Target boot image: /home/k2wlxda/cm-source/cm12/out/target/product/n958st/boot.img /home/k2wlxda/cm-source/cm12/out/target/product/n958st/boot.img maxsize=34197504 blocksize=135168 total=7989248 reserve=405504 Made boot image: /home/k2wlxda/cm-source/cm12/out/target/product/n958st/boot.img so now i will try to build cm for this device.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now